/* ==========================================================================
   Black Peak design system  (css/site.css)
   One shared file. No build step. Sections:
   1 Tokens   2 Base   3 Type   4 Layout   5 Header and nav   6 Footer
   7 Buttons and links   8 Cards and steps   9 Field Log   10 BM chart
   11 Forms   12 Tables   13 Placeholders and misc   14 Motion and print
   Contrast notes (WCAG AA): Trig Black on Survey Paper 15:1, Datum Blue on
   Survey Paper 6:1, Field Red on Survey Paper 5:1. Contour Brown is for
   rules and large text only. Benchmark Brass is never used as text colour.
   ========================================================================== */

/* 1 TOKENS ---------------------------------------------------------------- */
:root {
  /* Palette (BRAND.md section 6) */
  --trig-black: #14161A;
  --survey-paper: #F2EEE3;
  --snowline: #FAF8F3;
  --contour-brown: #9A6B3F;
  --datum-blue: #2F5D7C;
  --brass: #B8923A;
  --field-red: #A8402E;
  --grid-grey: #C9C4B6;
  --ink-soft: #4B4E54;          /* secondary text on light, 7:1 on paper */
  --paper-soft: #C9C4B6;        /* secondary text on Trig Black */

  /* Type */
  --font-head: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Source Serif 4", Georgia, "Times New Roman", serif;
  --font-mono: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;

  /* Fluid type scale */
  --fs-body: 1.125rem;                                   /* 18px */
  --fs-small: 0.9375rem;
  --fs-label: 0.75rem;
  --fs-h4: 1.125rem;
  --fs-h3: clamp(1.2rem, 1.05rem + 0.6vw, 1.5rem);
  --fs-h2: clamp(1.65rem, 1.1rem + 2.2vw, 2.75rem);
  --fs-h1: clamp(2.05rem, 1rem + 4.6vw, 4.75rem);
  --fs-lede: clamp(1.15rem, 1.05rem + 0.5vw, 1.4rem);

  /* Space (4px base) */
  --s1: 0.25rem; --s2: 0.5rem; --s3: 0.75rem; --s4: 1rem; --s5: 1.5rem;
  --s6: 2rem; --s7: 3rem; --s8: 4.5rem; --s9: 7rem;
  --section-y: clamp(3.5rem, 2rem + 6vw, 7rem);

  /* Layout */
  --wrap: 72rem;                /* 1152px */
  --wrap-narrow: 46rem;
  --gutter: clamp(1.25rem, 0.5rem + 3vw, 2.5rem);
  --header-h: 4.25rem;
  --radius: 2px;                /* instrument plate, not pill */
  --hair: 1px solid var(--grid-grey);
  --ease: cubic-bezier(.2, .6, .2, 1);
}

/* 2 BASE ------------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 1rem); }
body {
  margin: 0;
  background: var(--survey-paper);
  color: var(--trig-black);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.65;
  font-weight: 400;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--datum-blue); text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--datum-blue); outline-offset: 3px; border-radius: 1px; }
.on-dark :focus-visible, .section--dark :focus-visible, .site-footer :focus-visible { outline-color: var(--snowline); }
::selection { background: var(--trig-black); color: var(--snowline); }
p { margin: 0 0 1em; }
ul, ol { margin: 0 0 1em; padding-left: 1.25em; }
hr { border: 0; border-top: var(--hair); margin: var(--s6) 0; }
[hidden] { display: none !important; }

/* Skip link: first element in <body> */
.skip-link {
  position: absolute; left: var(--s4); top: -4rem; z-index: 100;
  background: var(--trig-black); color: var(--snowline);
  font-family: var(--font-mono); font-size: var(--fs-small);
  padding: var(--s3) var(--s4); text-decoration: none;
}
.skip-link:focus { top: var(--s4); }
.sr-only {
  position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* 3 TYPE ------------------------------------------------------------------ */
/* Headlines: Archivo Expanded. Only two headline sizes per screen (h1/h2). */
h1, h2, h3, h4, .h1, .h2, .h3 {
  font-family: var(--font-head);
  font-stretch: 125%;
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.005em;
  margin: 0 0 0.5em;
  text-wrap: balance;
  overflow-wrap: break-word;
}
h1, .h1 { font-size: var(--fs-h1); line-height: 1.02; }
h2, .h2 { font-size: var(--fs-h2); }
h3, .h3 { font-size: var(--fs-h3); font-weight: 700; line-height: 1.2; }
h4 { font-size: var(--fs-h4); font-weight: 700; line-height: 1.3; }
.lede { font-size: var(--fs-lede); line-height: 1.55; max-width: 38em; color: var(--ink-soft); }
.on-dark .lede, .section--dark .lede { color: var(--paper-soft); }
.small { font-size: var(--fs-small); }
.muted { color: var(--ink-soft); }
.section--dark .muted, .on-dark .muted { color: var(--paper-soft); }

/* Mono labels. Every measurement is set in Plex Mono with tabular figures. */
.label, .eyebrow, .mono, .num, .tag, th {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}
.eyebrow, .label {
  font-size: var(--fs-label);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 500;
  line-height: 1.4;
}
.eyebrow { display: flex; align-items: center; gap: var(--s3); margin: 0 0 var(--s5); color: var(--ink-soft); }
.eyebrow::before { content: ""; width: 1.75rem; height: 1px; background: var(--contour-brown); flex: none; }
.section--dark .eyebrow, .on-dark .eyebrow { color: var(--paper-soft); }
.num { font-weight: 500; }

.prose { max-width: 40em; }
.prose h2 { margin-top: 1.6em; }
.prose h3 { margin-top: 1.6em; }
.prose li { margin-bottom: 0.4em; }
.prose a { font-weight: 600; }

/* Trig-mark bullets */
.list-trig { list-style: none; padding: 0; }
.list-trig li { position: relative; padding-left: 1.6em; margin-bottom: 0.7em; }
.list-trig li::before {
  content: ""; position: absolute; left: 0; top: 0.5em; width: 0.8em; height: 0.7em;
  background: currentColor;
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
}
/* Cross bullets for "we will not" lists, still plain, no icons */
.list-not { list-style: none; padding: 0; }
.list-not li { position: relative; padding-left: 1.6em; margin-bottom: 0.7em; }
.list-not li::before {
  content: ""; position: absolute; left: 0; top: 0.78em; width: 0.9em; height: 2px; background: var(--trig-black);
}
.section--dark .list-not li::before { background: var(--snowline); }

/* 4 LAYOUT ---------------------------------------------------------------- */
.container { width: 100%; max-width: calc(var(--wrap) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }
.container--narrow { max-width: calc(var(--wrap-narrow) + 2 * var(--gutter)); }
.section { padding-block: var(--section-y); position: relative; }
.section--snow { background: var(--snowline); border-block: var(--hair); }
.section--dark { background: var(--trig-black); color: var(--snowline); }
.section--dark a:not(.btn) { color: var(--snowline); text-decoration: underline; text-underline-offset: 3px; }
.section--tight { padding-block: calc(var(--section-y) * 0.6); }
.section-head { max-width: 46rem; margin-bottom: var(--s7); }
.section-head > :last-child { margin-bottom: 0; }

.grid { display: grid; gap: var(--s5); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); }
.split { display: grid; gap: var(--s7); align-items: center; }
@media (min-width: 60rem) {
  .split { grid-template-columns: 1.1fr 0.9fr; gap: var(--s8); }
  .split--even { grid-template-columns: 1fr 1fr; }
  .split--reverse > :first-child { order: 2; }
}
.grid > *, .split > *, .hero-grid > *, .footer-grid > *, .field-row > *, .step > * { min-width: 0; }
.stack > * + * { margin-top: var(--s5); }
.cluster { display: flex; flex-wrap: wrap; gap: var(--s4); align-items: center; }
.rule { border: 0; height: 1px; background: var(--grid-grey); margin: var(--s6) 0; }
.rule--brown { background: var(--contour-brown); }

/* Page hero for inner pages */
.page-hero { padding-block: clamp(3rem, 2rem + 5vw, 6rem) clamp(2.5rem, 2rem + 3vw, 4.5rem); border-bottom: var(--hair); position: relative; overflow: hidden; }
.page-hero h1 { max-width: 16em; }
.page-hero .lede { margin-bottom: 0; }

/* Contour detail, used with restraint: one per page at most */
.contour-bg { position: relative; isolation: isolate; }
.contour-bg::before {
  content: ""; position: absolute; z-index: -1; inset: -10% -12% -10% auto; width: min(70rem, 90vw); aspect-ratio: 1;
  background: url("../assets/contours.svg") center / contain no-repeat; opacity: 0.35; pointer-events: none;
}
.contour-bg--left::before { inset: -10% auto -10% -20%; }

/* 5 HEADER AND NAV -------------------------------------------------------- */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(242, 238, 227, 0.96); border-bottom: var(--hair); backdrop-filter: saturate(1.2) blur(6px); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: var(--s5); min-height: var(--header-h); }
.brand { display: inline-flex; align-items: center; gap: 0.75rem; color: var(--trig-black); text-decoration: none; flex: none; }
.brand:hover { text-decoration: none; }
.brand-mark { width: 2.4rem; height: auto; flex: none; }
.brand-word { font-family: var(--font-head); font-stretch: 125%; font-weight: 800; font-size: 1.05rem; letter-spacing: 0.16em; line-height: 1; }

.nav-toggle {
  display: none; align-items: center; gap: var(--s2); background: transparent; color: var(--trig-black);
  border: 1px solid var(--trig-black); border-radius: var(--radius); padding: 0.55rem 0.8rem; cursor: pointer;
  font-family: var(--font-mono); font-size: var(--fs-label); letter-spacing: 0.12em; text-transform: uppercase;
}
.nav-toggle-bars { width: 1rem; height: 0.7rem; position: relative; display: inline-block; }
.nav-toggle-bars::before, .nav-toggle-bars::after, .nav-toggle-bars i { content: ""; position: absolute; left: 0; right: 0; height: 2px; background: currentColor; transition: transform .25s var(--ease), opacity .2s; }
.nav-toggle-bars::before { top: 0; } .nav-toggle-bars i { top: 50%; margin-top: -1px; } .nav-toggle-bars::after { bottom: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before { transform: translateY(0.33rem) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars i { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after { transform: translateY(-0.33rem) rotate(-45deg); }

.site-nav { display: flex; align-items: center; gap: var(--s6); }
.nav-list { display: flex; gap: var(--s5); list-style: none; margin: 0; padding: 0; }
.nav-list a {
  font-family: var(--font-mono); font-size: 0.8125rem; letter-spacing: 0.1em; text-transform: uppercase; font-weight: 500;
  color: var(--trig-black); text-decoration: none; padding: 0.4rem 0; display: inline-block;
  background: linear-gradient(var(--contour-brown), var(--contour-brown)) left bottom / 0 2px no-repeat; transition: background-size .3s var(--ease);
}
.nav-list a:hover { background-size: 100% 2px; }
.nav-list a[aria-current="page"] { background-size: 100% 2px; background-image: linear-gradient(var(--trig-black), var(--trig-black)); }

@media (max-width: 56rem) {
  .js .nav-toggle { display: inline-flex; }
  .js .site-nav {
    position: absolute; left: 0; right: 0; top: 100%; background: var(--survey-paper); border-bottom: var(--hair);
    flex-direction: column; align-items: stretch; gap: var(--s5); padding: var(--s5) var(--gutter) var(--s6);
    display: none;
  }
  .js .site-nav[data-open="true"] { display: flex; }
  .js .nav-list { flex-direction: column; gap: 0; }
  .js .nav-list a { display: block; padding: 0.95rem 0; border-bottom: var(--hair); font-size: 0.9rem; background-image: none; }
  .js .nav-list a[aria-current="page"] { border-bottom-color: var(--trig-black); }
  .js .site-nav .btn { width: 100%; }
  /* Without JS the nav simply wraps under the brand */
  html:not(.js) .header-inner { flex-wrap: wrap; padding-block: var(--s3); }
  html:not(.js) .site-nav { flex-wrap: wrap; gap: var(--s3) var(--s5); }
  html:not(.js) .nav-list { flex-wrap: wrap; gap: var(--s2) var(--s4); }
}

/* 6 FOOTER ---------------------------------------------------------------- */
.site-footer { background: var(--trig-black); color: var(--snowline); padding-block: var(--s8) var(--s6); font-size: var(--fs-small); line-height: 1.6; }
.site-footer a { color: var(--snowline); text-decoration-color: var(--contour-brown); }
.site-footer a:hover { text-decoration-color: var(--snowline); }
.footer-grid { display: grid; gap: var(--s7); grid-template-columns: 1fr; }
@media (min-width: 48rem) { .footer-grid { grid-template-columns: 1.4fr 0.8fr 1fr; } }
.footer-brand { display: flex; align-items: center; gap: 0.75rem; color: var(--snowline); margin-bottom: var(--s4); text-decoration: none; }
.footer-brand .brand-mark { width: 2.2rem; }
.footer-tag { font-family: var(--font-head); font-stretch: 125%; font-weight: 700; font-size: 1.05rem; line-height: 1.3; margin: 0 0 var(--s3); }
.footer-title { font-family: var(--font-mono); font-size: var(--fs-label); letter-spacing: 0.14em; text-transform: uppercase; color: var(--paper-soft); margin: 0 0 var(--s4); font-weight: 500; }
.footer-links { list-style: none; margin: 0; padding: 0; }
.footer-links li { margin-bottom: 0.45rem; }
.footer-legal { margin: 0; font-style: normal; }
.footer-legal dt { font-family: var(--font-mono); font-size: var(--fs-label); letter-spacing: 0.12em; text-transform: uppercase; color: var(--paper-soft); margin-top: var(--s3); }
.footer-legal dd { margin: 0; }
.care-label {
  margin-top: var(--s8); padding-top: var(--s5); border-top: 1px solid rgba(201, 196, 182, 0.35);
  font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.06em; color: var(--paper-soft); line-height: 1.7;
}
.care-label p { margin: 0 0 0.35rem; }
.site-footer .tbd { background: rgba(184, 146, 58, 0.22); color: var(--snowline); border-color: var(--brass); }

/* 7 BUTTONS AND LINKS ----------------------------------------------------- */
.btn {
  --btn-bg: var(--trig-black); --btn-fg: var(--snowline); --btn-bd: var(--trig-black);
  display: inline-flex; align-items: center; justify-content: center; gap: 0.6rem; min-height: 2.9rem;
  padding: 0.7rem 1.35rem; background: var(--btn-bg); color: var(--btn-fg); border: 1px solid var(--btn-bd); border-radius: var(--radius);
  font-family: var(--font-mono); font-size: 0.8125rem; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; text-decoration: none;
  cursor: pointer; line-height: 1.2; position: relative; transition: background-color .2s, color .2s, transform .2s var(--ease);
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
/* Primary: Trig Black plate with a Benchmark Brass underline (the one brass use per screen) */
.btn--primary { box-shadow: inset 0 -3px 0 var(--brass); padding-bottom: 0.8rem; }
.btn--primary:hover { background: var(--datum-blue); }
.nav-cta.btn--primary { box-shadow: none; padding-bottom: 0.7rem; }
.btn--secondary { --btn-bg: transparent; --btn-fg: var(--trig-black); }
.btn--secondary:hover { background: var(--trig-black); color: var(--snowline); }
.btn--on-dark { --btn-bg: var(--snowline); --btn-fg: var(--trig-black); --btn-bd: var(--snowline); }
.btn--on-dark:hover { background: var(--survey-paper); }
.btn--outline-on-dark { --btn-bg: transparent; --btn-fg: var(--snowline); --btn-bd: var(--snowline); }
.btn--outline-on-dark:hover { background: var(--snowline); color: var(--trig-black); }
.btn--sm { min-height: 2.4rem; padding: 0.45rem 1rem; font-size: 0.75rem; }
.nav-cta { margin-left: var(--s2); }

.link-arrow { font-family: var(--font-mono); font-size: 0.8125rem; letter-spacing: 0.1em; text-transform: uppercase; font-weight: 500; text-decoration: none; display: inline-flex; gap: 0.5rem; align-items: center; color: var(--datum-blue); border-bottom: 1px solid currentColor; padding-bottom: 2px; }
.link-arrow::after { content: "\2192"; transition: transform .25s var(--ease); }
.link-arrow:hover::after { transform: translateX(4px); }
.section--dark .link-arrow { color: var(--snowline); }

/* 8 CARDS AND STEPS ------------------------------------------------------- */
.card { background: var(--snowline); border: var(--hair); border-radius: var(--radius); padding: var(--s6); position: relative; display: flex; flex-direction: column; }
.card > :last-child { margin-bottom: 0; }
.card h3 { margin-bottom: 0.4em; }
.card--flat { background: transparent; }
.card--dark { background: var(--trig-black); border-color: rgba(201, 196, 182, 0.28); color: var(--snowline); }
.card--link { text-decoration: none; color: inherit; transition: border-color .2s, transform .25s var(--ease); }
.card--link:hover { border-color: var(--trig-black); transform: translateY(-2px); text-decoration: none; }
.card-index { font-family: var(--font-mono); font-size: var(--fs-label); letter-spacing: 0.14em; color: var(--ink-soft); margin-bottom: var(--s5); display: flex; align-items: center; gap: var(--s2); }
.card-index::before { content: ""; width: 0.7rem; height: 0.6rem; background: var(--trig-black); clip-path: polygon(50% 0, 100% 100%, 0 100%); }
.card .link-arrow { margin-top: auto; align-self: flex-start; }
.card p + .link-arrow { margin-top: var(--s4); }

/* Method steps: numbered, trig node on a vertical contour rule */
.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; }
.step { display: grid; grid-template-columns: 3.25rem 1fr; gap: 0 var(--s5); padding-bottom: var(--s7); position: relative; }
.step:last-child { padding-bottom: 0; }
.step::before { /* vertical rule */
  content: ""; position: absolute; left: 1.55rem; top: 2.6rem; bottom: 0.4rem; width: 1px; background: rgba(154, 107, 63, 0.7);
}
.step:last-child::before { display: none; }
.step-num { font-family: var(--font-mono); font-size: 0.9rem; font-weight: 500; letter-spacing: 0.08em; display: inline-flex; align-items: flex-start; justify-content: center; padding-top: 0.2rem; }
.step-num::after { content: ""; }
.step h3 { margin-bottom: 0.35em; }
.step p:last-child { margin-bottom: 0; }
.section--dark .step p { color: var(--paper-soft); }
.step-num span { display: block; }

/* Callout / notes */
.callout { border-left: 3px solid var(--trig-black); background: var(--snowline); padding: var(--s5) var(--s6); }
.callout--warn { border-left-color: var(--field-red); }
.callout > :last-child { margin-bottom: 0; }
.tag { display: inline-block; font-size: 0.6875rem; letter-spacing: 0.12em; text-transform: uppercase; padding: 0.2rem 0.5rem; border: 1px solid currentColor; border-radius: 1px; line-height: 1.3; font-weight: 500; }
.tag--illustrative { color: var(--ink-soft); }
.tag--warn { color: var(--field-red); }

/* FAQ (details/summary) */
.faq details { border-top: var(--hair); padding: var(--s4) 0; }
.faq details:last-child { border-bottom: var(--hair); }
.faq summary { cursor: pointer; font-family: var(--font-head); font-stretch: 125%; font-weight: 700; font-size: 1.05rem; line-height: 1.35; list-style: none; display: flex; justify-content: space-between; gap: var(--s5); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--font-mono); font-weight: 500; }
.faq details[open] summary::after { content: "\2212"; }
.faq details > :not(summary) { margin-top: var(--s3); max-width: 40em; }

/* 9 FIELD LOG ------------------------------------------------------------- */
/* DATE / READING / ACTION / RESULT. Dated Plex Mono entries. */
.field-log { background: var(--snowline); border: 1px solid var(--trig-black); border-radius: var(--radius); font-family: var(--font-mono); font-size: 0.84rem; line-height: 1.55; font-variant-numeric: tabular-nums; }
.field-log-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s2) var(--s4); padding: var(--s3) var(--s5); border-bottom: 1px solid var(--trig-black); font-size: var(--fs-label); letter-spacing: 0.14em; text-transform: uppercase; background: var(--trig-black); color: var(--snowline); }
.field-log-entry { display: grid; grid-template-columns: 5.5rem 1fr; gap: var(--s1) var(--s4); padding: var(--s4) var(--s5); margin: 0; }
.field-log-entry + .field-log-entry { border-top: 1px dashed var(--grid-grey); }
.field-log-entry dt { color: var(--ink-soft); text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.7rem; padding-top: 0.2rem; }
.field-log-entry dd { margin: 0; }
.field-log-entry--bad { box-shadow: inset 3px 0 0 var(--field-red); }
.field-log-entry--bad dd.flag { color: var(--field-red); font-weight: 600; }
@media (max-width: 30rem) { .field-log-entry { grid-template-columns: 1fr; } .field-log-entry dt { padding-top: var(--s2); } }

/* 10 BM BASELINE CHART ---------------------------------------------------- */
/* Every results chart shows the fixed BM line in Benchmark Brass.
   Chart is inline SVG inside <figure class="bm-chart">. */
.bm-chart { margin: 0; background: var(--snowline); border: var(--hair); border-radius: var(--radius); padding: var(--s5); }
.bm-chart-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s2) var(--s4); margin-bottom: var(--s4); align-items: baseline; }
.bm-chart-scroll { overflow-x: auto; }
.bm-chart svg { width: 100%; min-width: 34rem; height: auto; overflow: visible; }
.bm-chart figcaption { font-size: var(--fs-small); color: var(--ink-soft); margin-top: var(--s4); line-height: 1.5; }
.bm-chart .grid-line { stroke: var(--grid-grey); stroke-width: 1; }
.bm-chart .axis-text { font-family: var(--font-mono); font-size: 11px; fill: var(--ink-soft); }
.bm-chart .bm-line { stroke: var(--brass); stroke-width: 2.5; }
.bm-chart .bm-tab { fill: var(--brass); }
.bm-chart .bm-label { font-family: var(--font-mono); font-size: 11px; font-weight: 600; fill: var(--trig-black); letter-spacing: 0.08em; }
.bm-chart .series-tracked { fill: none; stroke: var(--datum-blue); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.bm-chart .series-platform { fill: none; stroke: var(--ink-soft); stroke-width: 1.75; stroke-dasharray: 5 4; }
.bm-chart .pt { fill: var(--snowline); stroke: var(--datum-blue); stroke-width: 2; }
.bm-chart .pt--bad { stroke: var(--field-red); }
.bm-chart .flag-bad { fill: var(--field-red); }
.bm-chart .flag-text { font-family: var(--font-mono); font-size: 11px; fill: var(--field-red); font-weight: 600; }
.chart-legend { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s5); list-style: none; margin: var(--s4) 0 0; padding: 0; font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.04em; }
.chart-legend li { display: flex; align-items: center; gap: 0.5rem; }
.chart-legend i { width: 1.6rem; height: 0; border-top: 2.5px solid; display: inline-block; }
.chart-legend .k-bm { border-color: var(--brass); }
.chart-legend .k-tracked { border-color: var(--datum-blue); }
.chart-legend .k-platform { border-color: var(--ink-soft); border-top-style: dashed; border-top-width: 2px; }

/* 11 FORMS ---------------------------------------------------------------- */
.form { display: grid; gap: var(--s5); background: var(--snowline); border: var(--hair); border-radius: var(--radius); padding: clamp(1.25rem, 1rem + 2vw, 2.5rem); }
.field { display: grid; gap: var(--s2); }
.field-row { display: grid; gap: var(--s5); grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); }
.field label, .field legend { font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.1em; text-transform: uppercase; font-weight: 500; padding: 0; }
.field .hint { font-size: var(--fs-small); color: var(--ink-soft); line-height: 1.45; }
.req { color: var(--field-red); }
input::placeholder, textarea::placeholder { color: var(--ink-soft); opacity: 1; }
input[type="text"], input[type="email"], input[type="tel"], input[type="url"], select, textarea {
  width: 100%; font: inherit; font-size: 1rem; color: var(--trig-black); background: var(--survey-paper);
  border: 1px solid var(--ink-soft); border-radius: var(--radius); padding: 0.75rem 0.85rem; min-height: 2.9rem; line-height: 1.4;
}
textarea { min-height: 8rem; resize: vertical; }
input:hover, select:hover, textarea:hover { border-color: var(--trig-black); }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid var(--datum-blue); outline-offset: 1px; border-color: var(--datum-blue); }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.check-group { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s5); margin-top: var(--s2); }
.check { display: inline-flex; align-items: center; gap: 0.55rem; font-size: 1rem; cursor: pointer; }
.check input { width: 1.15rem; height: 1.15rem; accent-color: var(--trig-black); margin: 0; }
.form-note { font-size: var(--fs-small); color: var(--ink-soft); margin: 0; }
.form .btn { justify-self: start; }
input:user-invalid, select:user-invalid, textarea:user-invalid { border-color: var(--field-red); }

/* 12 TABLES --------------------------------------------------------------- */
.table-wrap { overflow-x: auto; border: var(--hair); background: var(--snowline); -webkit-overflow-scrolling: touch; }
.table { width: 100%; border-collapse: collapse; font-size: 1rem; line-height: 1.5; min-width: 32rem; }
.table caption { text-align: left; padding: var(--s4) var(--s5); font-family: var(--font-mono); font-size: var(--fs-label); letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-soft); }
.table th, .table td { text-align: left; vertical-align: top; padding: var(--s4) var(--s5); border-top: var(--hair); }
.table th { font-size: 0.75rem; letter-spacing: 0.12em; text-transform: uppercase; font-weight: 500; color: var(--ink-soft); background: var(--survey-paper); }
.table tbody th { font-family: var(--font-head); font-stretch: 125%; font-size: 0.95rem; text-transform: none; letter-spacing: 0; font-weight: 700; color: var(--trig-black); background: transparent; }
.table td.num { font-family: var(--font-mono); white-space: nowrap; }

/* 13 PLACEHOLDERS AND MISC ------------------------------------------------ */
/* Unknown facts. Visible, tidy, never invented: <span class="tbd">[Licence no.]</span> */
.tbd {
  font-family: var(--font-mono); font-size: 0.86em; font-style: normal; font-weight: 500; letter-spacing: 0.02em;
  background: rgba(184, 146, 58, 0.18); border-bottom: 1px dashed var(--brass); padding: 0.05em 0.35em; border-radius: 1px; color: inherit; white-space: normal; overflow-wrap: anywhere;
}
.section--dark .tbd { background: rgba(184, 146, 58, 0.25); }

/* Photo placeholder block: for where BRAND.md calls for real photography */
.photo-placeholder {
  position: relative; aspect-ratio: 4 / 3; background: var(--snowline); border: 1px dashed var(--contour-brown); border-radius: var(--radius);
  display: grid; place-items: center; text-align: center; padding: var(--s5); overflow: hidden; color: var(--ink-soft);
  font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; line-height: 1.6;
}
.photo-placeholder::before { content: ""; position: absolute; inset: 0; background: url("../assets/contours.svg") center / 140% no-repeat; opacity: 0.18; }
.photo-placeholder > * { position: relative; }
.photo-placeholder--portrait { aspect-ratio: 3 / 4; }

/* Key/value readout, e.g. time zone panel */
.readout { display: grid; grid-template-columns: auto 1fr; gap: var(--s2) var(--s5); margin: 0; font-family: var(--font-mono); font-size: 0.875rem; font-variant-numeric: tabular-nums; }
.readout dt { color: var(--ink-soft); text-transform: uppercase; letter-spacing: 0.1em; font-size: 0.72rem; padding-top: 0.2rem; }
.readout dd { margin: 0; }
.section--dark .readout dt { color: var(--paper-soft); }

/* Panel on dark ground */
.panel { border: 1px solid rgba(201, 196, 182, 0.35); padding: var(--s6); border-radius: var(--radius); }

/* Reveal: short entrance, progressive enhancement only. Content is visible by default. */
@media (prefers-reduced-motion: no-preference) {
  html.js .rise { animation: rise 400ms var(--ease) both; }
  html.js .rise--2 { animation-delay: 80ms; }
  html.js .rise--3 { animation-delay: 160ms; }
  @keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
  html { scroll-behavior: smooth; }
}

/* 14 MOTION AND PRINT ----------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
@media print {
  .site-header, .nav-toggle, .skip-link, .btn { display: none !important; }
  body { background: var(--snowline); font-size: 11pt; }
  .section--dark, .site-footer { background: var(--snowline); color: var(--trig-black); }
}

/* 15 HOMEPAGE HERO ------------------------------------------------------- */
.hero { padding-block: clamp(3rem, 2rem + 6vw, 7rem) clamp(3rem, 2rem + 5vw, 6rem); overflow: hidden; }
.hero-grid { display: grid; gap: var(--s7); align-items: center; }
@media (min-width: 60rem) { .hero-grid { grid-template-columns: 1.15fr 0.85fr; gap: var(--s8); } }
.hero h1 { margin-bottom: 0.45em; }
.hero .lede { margin-bottom: var(--s6); }
.hero-where { margin-top: var(--s6); color: var(--ink-soft); }
.hero-art { margin: 0; position: relative; aspect-ratio: 1; max-width: 34rem; width: 100%; justify-self: center; }
.hero-art img { width: 100%; height: 100%; object-fit: contain; }
.hero-art .hero-mark { position: absolute; left: 50%; top: 50%; width: 22%; transform: translate(-50%, -50%); color: var(--trig-black); }
.hero-art figcaption { position: absolute; left: 0; bottom: 0; font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-soft); }
@media (max-width: 59.99rem) { .hero-art { max-width: 20rem; } }
.cta-band { text-align: left; }
.cta-band h2 { max-width: 14em; }
.cta-band p { max-width: 36em; }
.three-col-text { columns: 1; }
