/* sdc-style.css — Snowdon Design & Craft Guild · Welsh slate quarry and limewash */
:root {
  --sdc-limewash: #F4F3EF;
  --sdc-paper: #FBFAF7;
  --sdc-slate: #1E242B;
  --sdc-slate-soft: #2B343D;
  --sdc-slate-line: #46515C;
  --sdc-heather: #6B21A8;
  --sdc-heather-light: #D8B4FE;
  --sdc-heather-wash: #EFE7F6;
  --sdc-lichen: #4D7C0F;
  --sdc-lichen-wash: #EAF1DC;
  --sdc-stone: #D1CFC9;
  --sdc-muted: #4A535C;
  --sdc-serif: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --sdc-sans: 'Work Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --sdc-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --sdc-measure: 68ch;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body.sdc-body {
  margin: 0;
  background: var(--sdc-limewash);
  color: var(--sdc-slate);
  font-family: var(--sdc-sans);
  font-size: 1.0625rem;
  line-height: 1.65;
}
img, svg { max-width: 100%; height: auto; }
a { color: var(--sdc-heather); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--sdc-heather); outline-offset: 2px; }

.sdc-skiplink {
  position: absolute; left: -999px; top: 0; z-index: 10;
  background: var(--sdc-heather); color: #fff; padding: .6rem 1rem;
}
.sdc-skiplink:focus { left: 0; }

.sdc-mono, .sdc-eyebrow, .sdc-tally-sheet dt, .sdc-badge {
  font-family: var(--sdc-mono);
}
code.sdc-mono {
  font-size: .88em; background: var(--sdc-heather-wash); color: #3B0764;
  padding: .08em .35em; border-radius: 2px; white-space: nowrap;
}

/* Lintel (header slab) */
header.sdc-lintel {
  background-color: var(--sdc-slate);
  background-image: repeating-linear-gradient(172deg, rgba(255,255,255,.035) 0 1px, transparent 1px 9px);
  border-bottom: 4px solid var(--sdc-heather);
  color: var(--sdc-limewash);
}
.sdc-lintel__inner {
  max-width: 1180px; margin: 0 auto; padding: 1rem 1.25rem;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem 2rem;
}
.sdc-mark {
  display: inline-flex; align-items: center; gap: .65rem;
  font-family: var(--sdc-serif); font-weight: 700; font-size: 1.55rem; line-height: 1.1;
  color: var(--sdc-limewash); text-decoration: none;
}
.sdc-mark::before {
  content: ''; width: 1.1rem; height: 1.35rem; background: var(--sdc-heather);
  clip-path: polygon(0 18%, 100% 0, 100% 82%, 0 100%);
  box-shadow: inset 0 0 0 2px var(--sdc-heather-light);
}
.sdc-mark small { display: block; font-family: var(--sdc-mono); font-weight: 400; font-size: .62rem; letter-spacing: .14em; text-transform: uppercase; color: #C9C7C0; margin-top: .2rem; }
.sdc-waymarks ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .15rem 1.1rem; }
.sdc-waymarks a {
  color: #E8E6E0; text-decoration: none; font-size: .95rem; font-weight: 500;
  padding: .35rem 0; border-bottom: 2px solid transparent;
}
.sdc-waymarks a:hover, .sdc-waymarks a[aria-current="page"] { border-bottom-color: var(--sdc-heather-light); color: #fff; }
header.sdc-lintel :focus-visible, footer.sdc-plinth :focus-visible, .sdc-quarry :focus-visible { outline-color: var(--sdc-heather-light); }

/* Workshop grid */
main.sdc-workshop-grid {
  max-width: 1180px; margin: 0 auto; padding: 2.5rem 1.25rem 4.5rem;
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 2.5rem;
}
@media (min-width: 62rem) {
  main.sdc-workshop-grid { grid-template-columns: minmax(0, 1fr) 19rem; gap: 3.5rem; }
  .sdc-marginalia { position: sticky; top: 1.5rem; align-self: start; }
}

/* Craft monograph */
.sdc-craft-monograph { min-width: 0; }
.sdc-craft-monograph h1, .sdc-craft-monograph h2, .sdc-craft-monograph h3 { font-family: var(--sdc-serif); color: var(--sdc-slate); }
.sdc-craft-monograph h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); line-height: 1.05; margin: .4rem 0 1rem; font-weight: 700; }
.sdc-craft-monograph h2 { font-size: clamp(1.6rem, 3vw, 2.05rem); line-height: 1.15; margin: 2.6rem 0 .8rem; font-weight: 700; }
.sdc-craft-monograph h2::before {
  content: ''; display: block; width: 2.6rem; height: 3px; background: var(--sdc-heather); margin-bottom: .7rem;
}
.sdc-craft-monograph h3 { font-size: 1.35rem; margin: 0 0 .4rem; font-weight: 700; }
.sdc-craft-monograph p, .sdc-craft-monograph ol, .sdc-craft-monograph ul.sdc-plain { max-width: var(--sdc-measure); }
.sdc-eyebrow { font-size: .75rem; letter-spacing: .14em; text-transform: uppercase; color: var(--sdc-heather); margin: 0; font-weight: 500; }
.sdc-standfirst { font-family: var(--sdc-serif); font-size: 1.45rem; line-height: 1.4; color: #323B44; max-width: 44rem; margin: 0 0 1.5rem; font-weight: 600; }

.sdc-badge {
  display: inline-block; background: var(--sdc-lichen); color: #fff;
  font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; padding: .18rem .5rem; border-radius: 2px;
}

/* Tally sheet (definition list) */
.sdc-marginalia__title { font-family: var(--sdc-mono); font-size: .75rem; letter-spacing: .14em; text-transform: uppercase; color: var(--sdc-muted); margin: 0 0 .6rem; font-weight: 500; }
dl.sdc-tally-sheet {
  margin: 0; padding: 1.1rem 1.25rem .4rem; background: var(--sdc-paper);
  border: 1px solid var(--sdc-stone); border-top: 4px solid var(--sdc-lichen);
}
.sdc-tally-sheet dt { font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; color: var(--sdc-muted); }
.sdc-tally-sheet dd { margin: .1rem 0 .95rem; font-weight: 500; line-height: 1.45; }

/* Tables */
.sdc-tablewrap { overflow-x: auto; margin: 1.5rem 0; border: 1px solid var(--sdc-stone); background: var(--sdc-paper); }
table.sdc-headlap-schedule, table.sdc-schedule-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.sdc-headlap-schedule caption, .sdc-schedule-table caption {
  caption-side: top; text-align: left; padding: .8rem 1rem; font-family: var(--sdc-serif); font-size: 1.2rem; font-weight: 700;
}
.sdc-headlap-schedule th, .sdc-headlap-schedule td, .sdc-schedule-table th, .sdc-schedule-table td {
  padding: .55rem .9rem; text-align: left; border-top: 1px solid var(--sdc-stone); vertical-align: top;
}
.sdc-headlap-schedule thead th, .sdc-schedule-table thead th {
  background: var(--sdc-slate); color: var(--sdc-limewash); font-family: var(--sdc-mono); font-size: .7rem; letter-spacing: .06em; text-transform: uppercase; font-weight: 500; border-top: 0;
}
.sdc-headlap-schedule td, .sdc-headlap-schedule tbody th { font-family: var(--sdc-mono); }
.sdc-headlap-schedule tbody tr:nth-child(even), .sdc-schedule-table tbody tr:nth-child(even) { background: #F3F1EC; }

/* Calculator (the quarry) */
.sdc-quarry {
  margin: 0 0 2.5rem; padding: 1.75rem; color: var(--sdc-limewash); border-radius: 3px;
  background-color: var(--sdc-slate);
  background-image: repeating-linear-gradient(172deg, rgba(255,255,255,.03) 0 1px, transparent 1px 11px);
  border-top: 4px solid var(--sdc-heather);
}
.sdc-quarry h2 { color: var(--sdc-limewash) !important; margin-top: 0 !important; }
.sdc-quarry h2::before { background: var(--sdc-heather-light) !important; }
.sdc-quarry p { color: #DCDAD3; }
.sdc-quarry__form fieldset { border: 0; margin: 0 0 1.25rem; padding: 0; min-width: 0; }
.sdc-quarry__form legend { font-family: var(--sdc-mono); font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--sdc-heather-light); padding: 0; margin-bottom: .5rem; }
.sdc-choices { display: grid; gap: .6rem; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); }
.sdc-choice { position: relative; display: block; cursor: pointer; }
.sdc-choice input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.sdc-choice__face {
  display: block; height: 100%; padding: .7rem .85rem; border: 1px solid var(--sdc-slate-line); background: var(--sdc-slate-soft); border-radius: 2px;
}
.sdc-choice__face strong { display: block; font-family: var(--sdc-mono); font-weight: 500; font-size: .86rem; }
.sdc-choice__face small { display: block; color: #C9C7C0; font-size: .8rem; line-height: 1.4; margin-top: .2rem; }
.sdc-choice input:checked + .sdc-choice__face { background: var(--sdc-heather); border-color: var(--sdc-heather-light); }
.sdc-choice input:checked + .sdc-choice__face small { color: #F1E4FC; }
.sdc-choice input:focus-visible + .sdc-choice__face { outline: 3px solid var(--sdc-heather-light); outline-offset: 2px; }
.sdc-pitchrow { display: flex; align-items: center; gap: 1rem; }
.sdc-pitchrow input[type="range"] { flex: 1; accent-color: var(--sdc-heather-light); min-width: 0; height: 2rem; }
.sdc-pitchrow output { font-family: var(--sdc-mono); font-size: 1.6rem; min-width: 4rem; text-align: right; }
.sdc-pitchscale { display: flex; justify-content: space-between; font-family: var(--sdc-mono); font-size: .72rem; color: #C9C7C0; }
.sdc-quarry dl.sdc-tally-sheet { color: var(--sdc-slate); display: grid; grid-template-columns: repeat(auto-fit, minmax(8.5rem, 1fr)); gap: 0 1rem; margin-top: .5rem; padding-bottom: .2rem; }
.sdc-readout { font-family: var(--sdc-mono); font-size: 2rem; line-height: 1.1; font-weight: 500; color: var(--sdc-heather); }
.sdc-readout-unit { font-family: var(--sdc-mono); font-size: .8rem; color: var(--sdc-muted); }
.sdc-calc-summary { font-weight: 500; margin: 1rem 0 .4rem; color: #fff !important; }
.sdc-calc-warning { background: #FDF2D0; color: #4A3A00 !important; padding: .7rem .9rem; border-left: 4px solid #B7791F; font-size: .92rem; }
.sdc-calc-warning[hidden] { display: none; }
.sdc-calc-note { font-size: .85rem; margin: .8rem 0 0; }
.sdc-quarry a { color: var(--sdc-heather-light); }

/* Figure */
.sdc-figure { margin: 1.5rem 0 2rem; padding: 1rem; background: var(--sdc-paper); border: 1px solid var(--sdc-stone); }
.sdc-figure figcaption { font-size: .88rem; color: var(--sdc-muted); margin-top: .6rem; }
.sdc-svg-label { font-family: var(--sdc-sans); font-size: 12px; fill: var(--sdc-slate); }
.sdc-svg-title { font-family: var(--sdc-serif); font-size: 20px; font-weight: 700; fill: var(--sdc-slate); }
.sdc-svg-accent { fill: var(--sdc-heather); font-family: var(--sdc-mono); font-size: 12px; font-weight: 500; }

/* Discipline cards */
.sdc-discipline-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); margin: 1.25rem 0 0; }
.sdc-discipline { background: var(--sdc-paper); border: 1px solid var(--sdc-stone); border-top: 4px solid var(--sdc-heather); padding: 1.1rem 1.2rem 1.2rem; }
.sdc-discipline:nth-child(2n) { border-top-color: var(--sdc-lichen); }
.sdc-discipline p { margin: .4rem 0 .7rem; font-size: .96rem; }
.sdc-discipline a { font-weight: 600; }

/* Notes, steps, call-outs */
.sdc-note { margin: 1.5rem 0; padding: 0 0 0 1.25rem; border-left: 4px solid var(--sdc-heather); max-width: 60ch; }
.sdc-note p { font-family: var(--sdc-serif); font-size: 1.3rem; line-height: 1.4; font-weight: 600; margin: 0 0 .4rem; }
.sdc-note footer { font-family: var(--sdc-mono); font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; color: var(--sdc-muted); }
ol.sdc-steps { list-style: none; counter-reset: sdc-step; padding: 0; margin: 1.25rem 0; }
ol.sdc-steps li { counter-increment: sdc-step; position: relative; padding: 0 0 1rem 3rem; }
ol.sdc-steps li::before {
  content: counter(sdc-step); position: absolute; left: 0; top: .1rem; width: 2rem; height: 2rem; border-radius: 2px;
  background: var(--sdc-slate); color: var(--sdc-limewash); font-family: var(--sdc-mono); font-size: .85rem; display: grid; place-items: center;
}
.sdc-callout { background: var(--sdc-lichen-wash); border-left: 4px solid var(--sdc-lichen); padding: .9rem 1.1rem; margin: 1.5rem 0; max-width: var(--sdc-measure); }
.sdc-callout p { margin: 0; }

/* Plinth (footer) */
footer.sdc-plinth {
  background-color: var(--sdc-slate); color: #CFCDC7; border-top: 4px solid var(--sdc-heather); font-size: .93rem;
  background-image: repeating-linear-gradient(172deg, rgba(255,255,255,.03) 0 1px, transparent 1px 9px);
}
.sdc-plinth__inner { max-width: 1180px; margin: 0 auto; padding: 2.25rem 1.25rem 1.5rem; display: grid; gap: 1.75rem; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); }
.sdc-plinth h2 { font-family: var(--sdc-mono); font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--sdc-heather-light); margin: 0 0 .6rem; font-weight: 500; }
.sdc-plinth p { margin: 0 0 .4rem; }
.sdc-plinth a { color: #EADCF8; }
.sdc-plinth ul { list-style: none; margin: 0; padding: 0; }
.sdc-plinth li { margin-bottom: .3rem; }
.sdc-plinth__legal { max-width: 1180px; margin: 0 auto; padding: 1rem 1.25rem 2rem; border-top: 1px solid var(--sdc-slate-line); font-size: .82rem; color: #B5B3AC; }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
@media print {
  header.sdc-lintel, footer.sdc-plinth, .sdc-quarry__form, .sdc-skiplink { display: none; }
  body.sdc-body { background: #fff; font-size: 11pt; }
  main.sdc-workshop-grid { display: block; padding: 0; }
}
