/* ==========================================================================
   Relayworks AI — Design System v2
   Editorial consulting language: image-led, dark brand panels, serif display,
   sharp corners, thin rules. Tokenised per the design audit (2026-09-04).
   ========================================================================== */

/* --- Tokens --------------------------------------------------------------- */
:root {
  /* Surfaces */
  --ink: #0f1a12;          /* near-black forest — primary dark surface */
  --panel: #16261b;        /* raised dark surface */
  --charcoal: #2c332c;
  --body: #4a5149;
  --muted: #5d645c;        /* audit: was #6d746c — 4.29:1 on sand, failed AA */
  --rule: #dcdcd4;
  --rule-strong: #b9bab0;  /* structural rules (table rows) */
  --rule-dark: #2e3f33;
  --sand: #f3f2ec;
  --sand-2: #e9e8e0;
  --paper: #ffffff;

  /* Brand */
  --brand: #47611f;
  --brand-dark: #35490f;
  --lime: #c8e07a;
  --lime-dim: #9fb85a;

  /* Type scale — 9 steps, replacing 43 ad-hoc values */
  --t-2xs: .69rem;   /* 11px   kickers, labels, table heads */
  --t-xs:  .78rem;   /* 12.5px breadcrumbs, meta, micro-links */
  --t-sm:  .84rem;   /* 13.5px buttons, arrow links, bullets */
  --t-base:.97rem;   /* 15.5px card copy, spec rows, fields */
  --t-md:  1.06rem;  /* 17px   body, prose */
  --t-lg:  1.16rem;  /* 18.5px the answer block */
  --t-xl:  1.31rem;  /* 21px   FAQ questions, lede */
  --t-2xl: clamp(1.2rem, 1.9vw, 1.5rem);
  --t-3xl: clamp(1.9rem, 3.6vw, 3rem);
  --t-4xl: clamp(2.5rem, 5.6vw, 4.6rem);

  /* Spacing scale — 4 steps, replacing 10 bespoke clamps */
  --sp-flow:    clamp(1.5rem, 2.6vw, 2.25rem);
  --sp-block:   clamp(2rem, 3.5vw, 3.5rem);
  --sp-split:   clamp(2rem, 5vw, 5rem);
  --sp-section: clamp(3.5rem, 7vw, 6.5rem);

  --font-display: "Newsreader", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --font-ui: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;

  --wrap: 1280px;
  --wrap-narrow: 720px;
  --gut: clamp(20px, 4vw, 56px);

  /* One image treatment, applied everywhere */
  --img-filter: saturate(.68) brightness(.94);
}

/* --- Reset ---------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 90px; }
body {
  margin: 0; overflow-x: hidden;
  font-family: var(--font-ui);
  font-size: 17px; line-height: 1.6;
  color: var(--body); background: var(--paper);
  -webkit-font-smoothing: antialiased;
}
img, svg, video { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; cursor: pointer; }
table { border-collapse: collapse; width: 100%; }
::selection { background: var(--lime); color: var(--ink); }

/* Focus — audit fix: --brand was 2.55:1 on --ink, below the 3:1 floor */
:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }
.on-dark :focus-visible, .site-header :focus-visible, .site-footer :focus-visible,
.hero :focus-visible, .pagehead :focus-visible, .cta-band :focus-visible,
.ocard:focus-visible { outline-color: var(--lime); }

/* --- Typography ----------------------------------------------------------- */
h1, h2, h3, h4 {
  font-family: var(--font-display); font-weight: 400; color: var(--ink);
  letter-spacing: -.018em; margin: 0 0 .5em; text-wrap: balance;
}
h1 { font-size: var(--t-4xl); line-height: 1.03; letter-spacing: -.03em; }
h2 { font-size: var(--t-3xl); line-height: 1.1; letter-spacing: -.025em; }
h3 { font-size: var(--t-2xl); line-height: 1.25; }
/* audit: h4 was 16.8px against 17px body — given a real step */
h4 { font-family: var(--font-ui); font-size: var(--t-xl); font-weight: 600; line-height: 1.3; letter-spacing: -.01em; }
h1 em, h2 em, h3 em { font-style: italic; }
p { margin: 0 0 1.15em; }
p:last-child { margin-bottom: 0; }
strong { color: var(--ink); font-weight: 600; }

.kicker {
  font-family: var(--font-ui); font-size: var(--t-2xs); font-weight: 600;
  letter-spacing: .16em; text-transform: uppercase;
  color: var(--brand); margin: 0 0 1rem; display: block;
}
.on-dark .kicker, .kicker-lime { color: var(--lime-dim); }

.lede { font-size: clamp(1.05rem, 1.6vw, 1.3rem); line-height: 1.55; color: var(--body); }
.answer {
  font-size: var(--t-lg); line-height: 1.58; color: var(--charcoal);
  border-left: 2px solid var(--brand); padding-left: 1.3rem;
  margin: 0 0 var(--sp-block); max-width: 66ch;
}
.tiny { font-size: var(--t-xs); color: var(--muted); line-height: 1.5; }

/* --- Layout --------------------------------------------------------------- */
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gut); }
.wrap-narrow { max-width: var(--wrap-narrow); margin-inline: auto; }
.section { padding: var(--sp-section) 0; }
.section-tight { padding: var(--sp-block) 0; }

.on-dark { background: var(--ink); color: #c3cbc2; }
.on-dark h1, .on-dark h2, .on-dark h3, .on-dark h4 { color: #fff; }
.on-dark strong { color: #fff; }
.on-dark .lede { color: #b7c0b6; }
.on-dark p a, .on-dark li a, .on-dark dd a, .on-dark td a { color: var(--lime); }
.bg-sand { background: var(--sand); }
.rule { border: 0; border-top: 1px solid var(--rule); margin: 0; }
.on-dark .rule { border-top-color: var(--rule-dark); }

/* Spacing utilities — audit fix: absorbs the 61 inline margin-top declarations */
.mt-flow { margin-top: var(--sp-flow); }
.mt-block { margin-top: var(--sp-block); }
.mt-sm { margin-top: 1rem; }

.grid { display: grid; gap: var(--sp-flow); }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid > .grid { grid-column: 1 / -1; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-split); align-items: center; }
.split-text { grid-template-columns: 1fr 1.15fr; align-items: start; }
.split--rev > *:first-child { order: 2; }

/* Breakpoints — audit fix: 9 collapsed to 4 */
@media (max-width: 1080px) { .g4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 900px)  { .g3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 700px) {
  .g2, .g3, .g4, .split, .split-text { grid-template-columns: minmax(0, 1fr); }
  .split { gap: var(--sp-block); }
}

.sec-head { margin-bottom: var(--sp-block); max-width: 58ch; }
.sec-head p { color: var(--muted); font-size: 1.05rem; margin: .8rem 0 0; }
.on-dark .sec-head p { color: #9aa599; }
.sec-head-row {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 2rem; flex-wrap: wrap; margin-bottom: var(--sp-block);
  border-bottom: 1px solid var(--rule); padding-bottom: 1.4rem;
}
.on-dark .sec-head-row { border-bottom-color: var(--rule-dark); }
.sec-head-row h2 { margin: 0; max-width: 20ch; }
.sec-head-row p { margin: 0; max-width: 46ch; color: var(--muted); font-size: 1rem; }

/* --- Buttons & links ------------------------------------------------------ */
.btn {
  display: inline-flex; align-items: center; gap: .6rem;
  font-family: var(--font-ui); font-size: var(--t-sm); font-weight: 600;
  letter-spacing: .09em; text-transform: uppercase; line-height: 1;
  padding: 1.05rem 1.7rem; border: 1px solid transparent; border-radius: 0;
  text-decoration: none; transition: background-color .16s, color .16s, border-color .16s;
}
/* audit fix: .btn-primary retired; .btn-solid is the light-surface counterpart */
.btn-solid { background: var(--brand); color: #fff; }
.btn-solid:hover { background: var(--brand-dark); color: #fff; }
.btn-lime { background: var(--lime); color: var(--ink); }
.btn-lime:hover { background: #d9ee94; color: var(--ink); }
.btn-outline { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn-outline:hover { background: var(--ink); color: #fff; }
.on-dark .btn-outline { border-color: rgba(255,255,255,.45); color: #fff; }
.on-dark .btn-outline:hover { background: #fff; color: var(--ink); }
.btn-block { width: 100%; justify-content: center; }

.alink {
  display: inline-flex; align-items: center; gap: .5rem;
  font-family: var(--font-ui); font-size: var(--t-sm); font-weight: 600;
  letter-spacing: .07em; text-transform: uppercase;
  color: var(--ink); text-decoration: none;
  border-bottom: 1px solid var(--ink); padding-bottom: .3rem;
  transition: color .16s, border-color .16s, gap .16s;
}
.alink::after { content: "→"; font-size: 1.05em; letter-spacing: 0; }
.alink:hover { color: var(--brand); border-color: var(--brand); gap: .75rem; }
.on-dark .alink { color: #fff; border-color: rgba(255,255,255,.5); }
.on-dark .alink:hover { color: var(--lime); border-color: var(--lime); }
.row { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; }

/* --- Header --------------------------------------------------------------- */
.site-header { position: sticky; top: 0; z-index: 60; background: var(--ink); color: #fff; border-bottom: 1px solid var(--rule-dark); }
.nav { display: flex; align-items: center; gap: 2.5rem; height: 74px; }
.brand { font-family: var(--font-display); font-size: 1.28rem; font-weight: 500; color: #fff; text-decoration: none; letter-spacing: -.02em; flex-shrink: 0; }
.brand span { color: var(--lime); }
.nav-links { display: flex; align-items: center; gap: 1.7rem; margin-right: auto; }
.nav-links a {
  font-size: var(--t-sm); font-weight: 500; letter-spacing: .02em; color: #c3cbc2;
  text-decoration: none; padding: .4rem 0; border-bottom: 2px solid transparent;
  transition: color .16s, border-color .16s;
}
.nav-links a:hover { color: #fff; }
.nav-links a[aria-current="page"] { color: #fff; border-bottom-color: var(--lime); }
.nav-actions { display: flex; align-items: center; gap: 1.2rem; flex-shrink: 0; }
.nav-actions .btn { padding: .78rem 1.25rem; font-size: var(--t-2xs); }
.nav-toggle { display: none; background: none; border: 0; color: #fff; padding: .4rem; }
@media (max-width: 1080px) {
  .nav-links { display: none; }
  .nav-toggle { display: inline-flex; }
  .nav-actions { margin-left: auto; }
}
@media (max-width: 560px) {
  .nav { gap: .75rem; height: 62px; }
  .brand { font-size: 1.08rem; }
  .nav-actions { gap: .4rem; }
  .nav-actions .btn { padding: .68rem .85rem; font-size: .66rem; letter-spacing: .06em; }
}
.mobile-nav { position: fixed; inset: 0; z-index: 70; background: var(--ink); color: #fff; overflow-y: auto; padding: 1rem var(--gut) 3rem; }
.mobile-nav[hidden] { display: none; }
.mobile-nav-top { display: flex; justify-content: space-between; align-items: center; height: 58px; margin-bottom: 1.5rem; }
.mobile-nav a { display: block; padding: 1rem 0; font-family: var(--font-display); font-size: 1.5rem; color: #fff; text-decoration: none; border-bottom: 1px solid var(--rule-dark); }
.mobile-nav .mobile-cta { margin-top: 2rem; }
.mobile-nav .mobile-cta a { border: 0; font-family: var(--font-ui); font-size: var(--t-sm); }

/* --- Hero ----------------------------------------------------------------- */
.hero { position: relative; background: var(--ink); color: #fff; overflow: hidden; }
.hero-media { position: absolute; inset: 0; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; opacity: .8; }
.hero-media::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(100deg, rgba(15,26,18,.93) 0%, rgba(15,26,18,.72) 44%, rgba(15,26,18,.2) 100%);
}
.hero-inner { position: relative; padding: clamp(3.5rem, 8vw, 6.5rem) 0 var(--sp-block); }
.hero h1 { color: #fff; max-width: 15ch; margin-bottom: 1.5rem; }
.hero h1 em { color: var(--lime); }
.hero-lede { font-size: clamp(1.06rem, 1.7vw, 1.3rem); line-height: 1.55; color: #bcc5bb; max-width: 46ch; margin-bottom: 2.2rem; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 1rem; }
.hero-foot { position: relative; border-top: 1px solid var(--rule-dark); display: grid; grid-template-columns: repeat(4, 1fr); }
.hero-foot div { padding: 1.6rem 1.5rem 1.6rem 0; }
.hero-foot div + div { padding-left: 1.5rem; border-left: 1px solid var(--rule-dark); }
.hero-foot dt { font-family: var(--font-display); font-size: clamp(1.5rem, 2.4vw, 2.1rem); color: #fff; line-height: 1; margin-bottom: .45rem; }
.hero-foot dd { margin: 0; font-size: var(--t-xs); color: #8f9a8e; line-height: 1.4; }
@media (max-width: 700px) {
  .hero-foot { grid-template-columns: repeat(2, 1fr); }
  .hero-foot div:nth-child(odd) { padding-left: 0; border-left: 0; }
  .hero-foot div:nth-child(n+3) { border-top: 1px solid var(--rule-dark); }
}

/* Interior page header */
.pagehead { background: var(--ink); color: #fff; position: relative; overflow: hidden; }
.pagehead-media { position: absolute; right: 0; top: 0; bottom: 0; width: 46%; }
.pagehead-media img { width: 100%; height: 100%; object-fit: cover; opacity: .78; }
.pagehead-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, var(--ink) 0%, rgba(15,26,18,.6) 42%, rgba(15,26,18,.15) 100%); }
.pagehead-inner { position: relative; padding: clamp(3rem, 6vw, 5rem) 0 var(--sp-block); max-width: 62ch; }
.pagehead h1 { color: #fff; margin-bottom: 1.4rem; }
.pagehead .answer { color: #c8d0c7; border-left-color: var(--lime); max-width: 60ch; }
.pagehead .answer strong { color: #fff; }
@media (max-width: 900px) { .pagehead-media { display: none; } }

/* --- Image primitives ----------------------------------------------------- */
.frame { position: relative; overflow: hidden; background: var(--sand-2); }
.frame img { width: 100%; height: 100%; object-fit: cover; filter: var(--img-filter); display: block; }
.frame-43 { aspect-ratio: 4 / 3; }
.frame-32 { aspect-ratio: 3 / 2; }
.frame-11 { aspect-ratio: 1 / 1; }
.frame-169 { aspect-ratio: 16 / 9; }
.frame-portrait { aspect-ratio: 3 / 4; }

/* Inline article figure */
.figure { margin: var(--sp-block) 0; }
.figure figcaption { font-size: var(--t-xs); color: var(--muted); margin-top: .8rem; line-height: 1.5; max-width: 62ch; }
.prose .figure { margin-inline: 0; }

/* Full-bleed image band with text over it */
.band { position: relative; background: var(--ink); color: #fff; overflow: hidden; }
.band > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: saturate(.6) brightness(.62); }
.band::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(15,26,18,.92) 0%, rgba(15,26,18,.7) 50%, rgba(15,26,18,.45) 100%); }
.band-inner { position: relative; z-index: 1; padding: clamp(4rem, 9vw, 7rem) 0; }
.band-inner h2 { color: #fff; max-width: 20ch; }
.band-inner p { color: #b7c0b6; max-width: 54ch; font-size: 1.08rem; }

/* Asymmetric image mosaic */
.mosaic { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 12px; }
.mosaic .frame:first-child { grid-row: span 2; }
@media (max-width: 900px) { .mosaic { grid-template-columns: 1fr 1fr; } .mosaic .frame:first-child { grid-row: span 1; } }
@media (max-width: 560px) { .mosaic { grid-template-columns: 1fr; } }

/* Image strip — a horizontal run of equal frames */
.strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
@media (max-width: 900px) { .strip { grid-template-columns: repeat(2, 1fr); } }

/* --- Cards ---------------------------------------------------------------- */
/* audit fix: one component, two variants (was .ecard + .ocard) */
.ecard { display: block; text-decoration: none; color: inherit; }
.ecard-img { position: relative; overflow: hidden; background: var(--sand-2); aspect-ratio: 4 / 3; margin-bottom: 1.1rem; }
.ecard-img img { width: 100%; height: 100%; object-fit: cover; filter: var(--img-filter); transition: transform .5s cubic-bezier(.2,.6,.2,1); }
.ecard:hover .ecard-img img { transform: scale(1.045); }
.ecard-label { font-size: var(--t-2xs); font-weight: 600; letter-spacing: .15em; text-transform: uppercase; color: var(--brand); display: block; margin-bottom: .55rem; }
.on-dark .ecard-label { color: var(--lime-dim); }
.ecard h3 { margin: 0 0 .55rem; transition: color .16s; }
.on-dark .ecard h3 { color: #fff; }
.ecard:hover h3 { color: var(--brand); }
.on-dark .ecard:hover h3 { color: var(--lime); }
.ecard p { font-size: var(--t-base); color: var(--muted); margin: 0; }
.on-dark .ecard p { color: #98a397; }
.ecard-more { display: inline-flex; align-items: center; gap: .4rem; margin-top: .8rem; font-size: var(--t-xs); font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ink); }
.ecard-more::after { content: "→"; transition: transform .18s; }
.ecard:hover .ecard-more::after { transform: translateX(4px); }
.on-dark .ecard-more { color: #fff; }

/* Overlay variant — text on the photograph */
.ecard--overlay {
  position: relative; display: flex; flex-direction: column; justify-content: flex-end;
  min-height: 400px; padding: 1.8rem; color: #fff; background: var(--ink); overflow: hidden;
}
.ecard--overlay > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: saturate(.55) brightness(.68); transition: transform .55s cubic-bezier(.2,.6,.2,1); }
.ecard--overlay::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(15,26,18,.99) 0%, rgba(15,26,18,.95) 34%, rgba(15,26,18,.72) 58%, rgba(15,26,18,.4) 82%, rgba(15,26,18,.28) 100%);
}
.ecard--overlay:hover > img { transform: scale(1.05); }
.ecard--overlay > *:not(img) { position: relative; z-index: 1; }
.ecard--overlay .ecard-label { color: var(--lime); }
.ecard--overlay h3 { color: #fff; text-shadow: 0 1px 14px rgba(10,18,12,.55); }
.ecard--overlay:hover h3 { color: var(--lime); }
.ecard--overlay p { color: #ccd4cb; text-shadow: 0 1px 12px rgba(10,18,12,.5); }
.ecard--overlay-lg { min-height: 540px; padding: 2.4rem; }
.ecard--overlay-lg h3 { font-size: clamp(1.7rem, 3vw, 2.4rem); }

/* Plain cards, rule-topped */
.card { background: transparent; border-top: 2px solid var(--ink); padding: 1.6rem 0 0; }
.on-dark .card { border-top-color: var(--lime); }
.card h3 { margin-bottom: .6rem; }
.card p { font-size: var(--t-base); color: var(--muted); margin: 0; }
a.card { text-decoration: none; display: block; }
a.card:hover h3 { color: var(--brand); }

/* --- Phases --------------------------------------------------------------- */
.phases { display: grid; grid-template-columns: repeat(4, 1fr); column-gap: 3.2rem; border-top: 1px solid var(--rule); }
.on-dark .phases { border-top-color: var(--rule-dark); }
.phase { display: flex; flex-direction: column; padding: 2rem 0 2.2rem; position: relative; }
.phase + .phase::before { content: ""; position: absolute; left: -1.6rem; top: 0; bottom: 0; width: 1px; background: var(--rule); }
.on-dark .phase + .phase::before { background: var(--rule-dark); }
.phase-img { height: clamp(140px, 13vw, 185px); overflow: hidden; margin-bottom: 1.4rem; background: var(--panel); }
.phase-img img { width: 100%; height: 100%; object-fit: cover; filter: saturate(.5) brightness(.8); }
.phase-n { font-family: var(--font-ui); font-size: var(--t-2xs); font-weight: 600; letter-spacing: .15em; text-transform: uppercase; color: var(--brand); display: block; margin-bottom: 1rem; }
.on-dark .phase-n { color: var(--lime-dim); }
.phase h3 { font-size: 1.35rem; margin-bottom: .6rem; }
.phase > p { font-size: var(--t-base); color: var(--muted); margin-bottom: 1rem; min-height: 6.4em; }
.on-dark .phase > p { color: #98a397; }
.phase ul { list-style: none; margin: 0 0 1.2rem; padding: 0; display: grid; gap: .4rem; }
.phase li { font-size: var(--t-sm); color: var(--muted); padding-left: .9rem; position: relative; line-height: 1.45; }
.phase li::before { content: ""; position: absolute; left: 0; top: .62em; width: 4px; height: 1px; background: var(--brand); }
.on-dark .phase li { color: #8f9a8e; }
.on-dark .phase li::before { background: var(--lime-dim); }
.phase-out { margin-top: auto; min-height: 5.6em; padding-top: .9rem; border-top: 1px solid var(--rule); font-size: var(--t-sm); color: var(--charcoal); }
.on-dark .phase-out { border-top-color: var(--rule-dark); color: #b7c0b6; }
.phase-out b { display: block; font-size: var(--t-2xs); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: .3rem; font-weight: 600; }
@media (max-width: 900px) {
  .phases { grid-template-columns: repeat(2, 1fr); }
  .phase:nth-child(odd)::before { display: none; }
  .phase:nth-child(n+3) { border-top: 1px solid var(--rule); margin-top: 1.5rem; padding-top: 2rem; }
}
@media (max-width: 700px) {
  .phases { grid-template-columns: 1fr; }
  .phase::before { display: none; }
  .phase + .phase { border-top: 1px solid var(--rule); }
  .phase > p, .phase-out { min-height: 0; }
  .phase-out { margin-top: 1.2rem; }
}

/* --- Steps ---------------------------------------------------------------- */
.steps { border-top: 1px solid var(--rule); }
.step { display: grid; grid-template-columns: 84px 1fr; gap: 1.5rem; padding: 1.8rem 0; border-bottom: 1px solid var(--rule); }
.step-num { font-family: var(--font-display); font-size: 2rem; color: var(--brand); line-height: 1; }
.step h3 { margin-bottom: .4rem; }
.step p { color: var(--muted); font-size: var(--t-base); margin: 0; }
.step-meta { font-size: var(--t-xs); letter-spacing: .07em; text-transform: uppercase; color: var(--brand); margin-top: .6rem; font-weight: 600; }
@media (max-width: 560px) { .step { grid-template-columns: 1fr; gap: .5rem; } }

/* --- Tables --------------------------------------------------------------- */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table-scroll table { min-width: 620px; font-size: var(--t-base); }
.table-scroll th, .table-scroll td { text-align: left; padding: 1rem 1.2rem 1rem 0; border-bottom: 1px solid var(--rule-strong); vertical-align: top; }
.table-scroll thead th {
  font-family: var(--font-ui); font-size: var(--t-2xs); font-weight: 600; letter-spacing: .14em;
  text-transform: uppercase; color: var(--ink); border-bottom: 1px solid var(--ink); white-space: nowrap;
}
.table-scroll tbody th { font-weight: 600; color: var(--ink); }
.on-dark .table-scroll th, .on-dark .table-scroll td { border-bottom-color: var(--rule-dark); }
.on-dark .table-scroll thead th { color: #fff; border-bottom-color: rgba(255,255,255,.5); }
.on-dark .table-scroll tbody th { color: #fff; }
.yes { color: var(--brand); font-weight: 600; }
.on-dark .yes { color: var(--lime); }
.no { color: var(--muted); }

/* --- Spec list ------------------------------------------------------------ */
.spec { border-top: 1px solid var(--rule); margin: 0; }
.spec-row { display: grid; grid-template-columns: 220px 1fr; gap: 1.8rem; padding: 1.1rem 0; border-bottom: 1px solid var(--rule); }
.spec-row dt { font-weight: 600; color: var(--ink); font-size: var(--t-base); }
/* Inside a half-width column a 220px label column starves the definition. */
.split .spec-row { grid-template-columns: 104px 1fr; gap: 1.4rem; }
.spec-row dd { margin: 0; color: var(--muted); font-size: var(--t-base); }
.on-dark .spec, .on-dark .spec-row { border-color: var(--rule-dark); }
.on-dark .spec-row dt { color: #fff; }
.on-dark .spec-row dd { color: #9aa599; }
@media (max-width: 700px) { .spec-row { grid-template-columns: 1fr; gap: .3rem; } }

/* --- FAQ ------------------------------------------------------------------ */
.faq { border-top: 1px solid var(--rule); }
.faq-item { border-bottom: 1px solid var(--rule); }
.faq-item h3 { margin: 0; }
.faq-q {
  width: 100%; display: flex; justify-content: space-between; align-items: flex-start; gap: 2rem;
  background: none; border: 0; padding: 1.4rem 0; text-align: left;
  font-family: var(--font-display); font-size: var(--t-xl); color: var(--ink); line-height: 1.35;
}
.faq-q:hover { color: var(--brand); }
.faq-icon { flex-shrink: 0; width: 20px; height: 20px; margin-top: .3rem; color: var(--brand); transition: transform .2s; }
.faq-q[aria-expanded="true"] .faq-icon { transform: rotate(180deg); }
.faq-a { padding: 0 0 1.5rem; max-width: 74ch; color: var(--muted); font-size: var(--t-md); }
.faq-a[hidden] { display: none; }

/* --- Prose ---------------------------------------------------------------- */
.prose { font-size: var(--t-md); line-height: 1.7; color: var(--body); max-width: 68ch; }
.prose h2 { margin-top: 2.8rem; font-size: clamp(1.6rem, 2.6vw, 2.1rem); }
.prose h3 { margin-top: 2rem; }
.prose ul, .prose ol { padding-left: 1.2rem; margin: 0 0 1.3rem; }
.prose li { margin-bottom: .55rem; }
.prose .table-scroll { margin: var(--sp-block) 0; }
.prose blockquote {
  margin: var(--sp-block) 0; padding: 0 0 0 1.4rem; border-left: 2px solid var(--brand);
  font-family: var(--font-display); font-size: 1.35rem; line-height: 1.4; color: var(--ink);
}
.prose hr.rule { margin: 3rem 0 1.5rem; }
.prose > .tiny:first-child { margin-bottom: var(--sp-block); }
.prose a { color: var(--brand); text-decoration: underline; text-underline-offset: 3px; }
.prose code { font-family: var(--font-mono); font-size: .88em; background: var(--sand); padding: .12em .4em; }
.callout:first-child { margin-top: 0; }
.callout { background: var(--sand); border-left: 2px solid var(--brand); padding: 1.3rem 1.5rem; margin: var(--sp-block) 0; font-size: var(--t-md); }
.on-dark .callout { background: var(--panel); border-left-color: var(--lime); color: #c3cbc2; }

/* --- Breadcrumbs ---------------------------------------------------------- */
.crumbs { font-size: var(--t-xs); letter-spacing: .04em; padding: 1rem 0 0; }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: .5rem; margin: 0; padding: 0; }
.crumbs li:not(:last-child)::after { content: "/"; margin-left: .5rem; color: var(--rule-strong); }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--brand); }
.crumbs span { color: var(--ink); }

/* --- CTA band ------------------------------------------------------------- */
.cta-band { position: relative; background: var(--ink); color: #fff; overflow: hidden; }
.cta-band > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: saturate(.5) brightness(.6); }
.cta-band::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(15,26,18,.94), rgba(15,26,18,.66)); }
.cta-inner { position: relative; z-index: 1; padding: var(--sp-section) 0; display: grid; grid-template-columns: 1.2fr .8fr; gap: 3rem; align-items: center; }
.cta-inner h2 { color: #fff; max-width: 18ch; margin: 0 0 1rem; }
.cta-inner p { color: #b7c0b6; max-width: 46ch; margin: 0; font-size: 1.05rem; }
@media (max-width: 900px) { .cta-inner { grid-template-columns: 1fr; gap: 1.8rem; } }

/* --- Form ----------------------------------------------------------------- */
.form-card { background: var(--sand); padding: clamp(1.6rem, 3vw, 2.4rem); }
.field { margin-bottom: 1.2rem; }
.field label { display: block; font-size: var(--t-2xs); font-weight: 600; letter-spacing: .11em; text-transform: uppercase; color: var(--ink); margin-bottom: .5rem; }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; font-size: var(--t-base); color: var(--ink);
  background: var(--paper); border: 1px solid var(--rule-strong); border-radius: 0; padding: .85rem .95rem;
  transition: border-color .16s;
}
.field textarea { resize: vertical; min-height: 110px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--brand); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; }
@media (max-width: 560px) { .field-row { grid-template-columns: 1fr; gap: 0; } }

/* --- Footer --------------------------------------------------------------- */
.site-footer { background: var(--ink); color: #98a397; padding: clamp(3rem, 6vw, 4.5rem) 0 2rem; }
.footer-grid { display: grid; grid-template-columns: 1.7fr repeat(4, 1fr); gap: 2.5rem; padding-bottom: 3rem; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; gap: 2.5rem 1.5rem; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-about p { font-size: var(--t-base); color: #8f9a8e; max-width: 32ch; margin: 1rem 0 1.4rem; }
.site-footer h2 { font-family: var(--font-ui); font-size: var(--t-2xs); font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: #fff; margin: 0 0 1.1rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; }
.site-footer li { font-size: var(--t-base); line-height: 1.45; }
.site-footer a { color: #98a397; text-decoration: none; }
.site-footer a:hover { color: var(--lime); }
.footer-bottom { border-top: 1px solid var(--rule-dark); padding-top: 1.6rem; display: flex; flex-wrap: wrap; gap: .8rem 2rem; justify-content: space-between; font-size: var(--t-xs); }
.social a { color: #98a397; }
.social a:hover { color: var(--lime); }

/* --- Utilities ------------------------------------------------------------ */
.skip-link { position: absolute; left: -9999px; top: 0; z-index: 100; background: var(--lime); color: var(--ink); padding: .8rem 1.2rem; text-decoration: none; font-weight: 600; }
.skip-link:focus { left: 0; }
.chips { display: flex; flex-wrap: wrap; gap: .5rem; list-style: none; padding: 0; margin: 0; }
.chips li { border: 1px solid var(--rule); padding: .5rem 1rem; font-size: var(--t-base); color: var(--muted); }
.chips--stack { flex-direction: column; align-items: stretch; }
.on-dark .chips li { border-color: var(--rule-dark); color: #98a397; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
@media print {
  .site-header, .site-footer, .cta-band, .mobile-nav, .hero-media, .band > img { display: none !important; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .faq-a[hidden] { display: block !important; }
}
