/* ==========================================================================
   Buglyph — /assets/site.css
   Sections: fonts · tokens · base · layout · header · footer · type · links &
   buttons · sections · home · techno · palettes · legal · forms · 404 · motion
   Design reference: design-spec.md (tokens §2, components §4). Contrast pairs
   for every token are measured in design-spec §2.1.
   ========================================================================== */

/* shared:start ------------------------------------------------------------
   Everything from here to shared:end is prepended to the docs stylesheet by
   tools/techno-docs/build.mjs: fonts, tokens, base, layout, header, footer,
   type, links and buttons. Page-specific rules go after shared:end. */

/* Fonts ----------------------------------------------------------------------
   Self-hosted, Latin subset, WOFF2 (tools/build-fonts.mjs from src/fonts/;
   OFL.txt beside them). Absolute URLs, because the docs build copies this
   chunk into docs.css. Only the regular cut is preloaded (src/chrome.mjs and
   tools/techno-docs/page.html); a file whose glyphs change needs a new name,
   because /assets/fonts/* is cached as immutable. */
@font-face { font-family: "Instrument Sans"; src: url("/assets/fonts/instrument-sans-regular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Instrument Sans"; src: url("/assets/fonts/instrument-sans-bold.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Instrument Sans"; src: url("/assets/fonts/instrument-sans-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url("/assets/fonts/geist-mono-regular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }

/* tokens:start --------------------------------------------------------------
   Everything between tokens:start and tokens:end is shared with the docs
   (tools/techno-docs/build.mjs prepends it to docs.css). */
:root {
  color-scheme: light dark;

  /* Colour — light (default). Contrast figures: design-spec §2.1 */
  --bg: #fbfbf9;            /* paper */
  --surface: #f2f1ed;       /* cards, stages, code blocks */
  --surface-2: #e8e7e2;     /* hover fill on surface */
  --text: #141413;          /* headings, primary text, buttons */
  --text-2: #43423e;        /* body copy */
  --text-3: #65645e;        /* metadata, captions, hints */
  --line: #e2e0da;          /* decorative hairlines (no contrast requirement) */
  --line-strong: #cfcdc6;   /* rules that separate rows; link underlines */
  --control: #7b7972;       /* input/radio/select borders: >= 3:1 */
  --accent: #e60012;        /* brand red: mark, focus ring, current-page bar. Non-text only */
  --accent-text: #c20010;   /* red when it must be text (required marker, error title) */
  --error: #b3000f;         /* error text + invalid field border */
  --button-bg: #141413;
  --button-text: #fbfbf9;
  --button-bg-hover: #3a3936;
  --selection: #e6001226;
  --focus: var(--accent);

  /* Type */
  --font-sans: "Instrument Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "Geist Mono", ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;

  --step--1: 0.8125rem;                                   /* 13  mono meta, labels */
  --step-0: 0.9375rem;                                    /* 15  UI, nav, captions, hints */
  --step-1: 1.0625rem;                                    /* 17  body */
  --step-2: 1.25rem;                                      /* 20  lead, h3 */
  --step-3: clamp(1.5rem, 1.25rem + 0.8vw, 1.875rem);     /* 24 → 30  h2 (small), legal h2 */
  --step-4: clamp(1.875rem, 1.35rem + 1.9vw, 2.75rem);    /* 30 → 44  section h2 */
  --step-5: clamp(2.375rem, 1.5rem + 3.6vw, 4.5rem);      /* 38 → 72  page h1 */
  --step-6: clamp(3.5rem, 1.6rem + 7.2vw, 8.5rem);        /* 56 → 136 product name */

  --lh-tight: 1.04;
  --lh-heading: 1.12;
  --lh-snug: 1.35;
  --lh-body: 1.65;

  /* Space (4px base) */
  --space-1: 0.25rem;  /* 4 */
  --space-2: 0.5rem;   /* 8 */
  --space-3: 0.75rem;  /* 12 */
  --space-4: 1rem;     /* 16 */
  --space-5: 1.5rem;   /* 24 */
  --space-6: 2rem;     /* 32 */
  --space-7: 3rem;     /* 48 */
  --space-8: 4rem;     /* 64 */
  --space-9: 6rem;     /* 96 */
  --space-10: 8rem;    /* 128 */
  --section: clamp(4rem, 2.5rem + 6vw, 8.5rem);          /* 64 → 136 between sections */

  /* Layout */
  --wrap: 80rem;                                          /* 1280 content */
  --margin: clamp(1rem, 5.5vw - 0.1rem, 5rem);            /* 16 @320 · 20 @390 · 41 @768 · 55 @1024 · 78 @1440 */
  --gutter: clamp(1rem, 0.6rem + 1.2vw, 1.5rem);          /* 16 → 24 */
  --measure: 40rem;                                       /* 640, ~68ch prose */
  --header-h: 4.5rem;                                     /* 72 */

  /* Shape & motion */
  --radius: 0;
  --hairline: 1px;
  --dur-fast: 120ms;
  --dur: 200ms;
  --ease: cubic-bezier(0.2, 0, 0, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f0f0e;
    --surface: #181817;
    --surface-2: #222220;
    --text: #ededea;
    --text-2: #c3c2bc;
    --text-3: #9c9b95;
    --line: #2a2927;
    --line-strong: #3b3a37;
    --control: #7c7b75;
    --accent: #e60012;       /* brand red unchanged: 3.99:1 on --bg, 3.70:1 on --surface (non-text, needs 3:1) */
    --accent-text: #ff6259;
    --error: #ff7a70;
    --button-bg: #ededea;
    --button-text: #0f0f0e;
    --button-bg-hover: #cfcec8;
    --selection: #e6001252;
  }
}
/* tokens:end */

/* Base ---------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  background: var(--bg);
  color: var(--text-2);
  font-family: var(--font-sans);
  font-size: var(--step-1);
  line-height: var(--lh-body);
  font-kerning: normal;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  display: flex; flex-direction: column;
}
main { flex: 1; }
img, picture, svg, video { display: block; max-width: 100%; }
img { height: auto; }
input, button, textarea, select { font: inherit; color: inherit; }
h1, h2, h3, h4 { color: var(--text); font-weight: 400; text-wrap: balance; }
p, li, dd { text-wrap: pretty; }
strong, b { font-weight: 700; color: var(--text); }
::selection { background: var(--selection); color: var(--text); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }

.nowrap { white-space: nowrap; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: var(--margin); top: var(--space-3); z-index: 100;
  padding: var(--space-2) var(--space-4); background: var(--button-bg); color: var(--button-text);
  font-size: var(--step-0); text-decoration: none; transform: translateY(-200%);
}
.skip-link:focus { transform: none; }

/* Layout -------------------------------------------------------------------- */
.wrap { width: min(100% - 2 * var(--margin), var(--wrap)); margin-inline: auto; }
.grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); }

/* Header -------------------------------------------------------------------- */
.site-header { border-bottom: var(--hairline) solid var(--line); }
.site-header__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0 var(--space-5); min-height: var(--header-h); }
.brand { display: inline-flex; align-items: center; gap: 0.625rem; color: var(--text); text-decoration: none; }
.brand__mark { width: calc(28px * 40 / 42); height: 28px; flex: none; } /* viewBox 40 × 42 */
.brand__mark .b { fill: currentColor; }
.brand__mark .h { fill: var(--accent); }
.brand__name { font-size: 1.1875rem; font-weight: 700; letter-spacing: -0.015em; line-height: 1; }
.nav ul { display: flex; flex-wrap: wrap; justify-content: flex-end; column-gap: var(--space-6); list-style: none; padding: 0; }
/* Both rows may wrap only when text is enlarged or spaced out (WCAG 1.4.10,
   1.4.12); at normal settings everything fits on one row down to 320px. */
.nav li { display: flex; align-items: center; }
.nav a {
  position: relative; display: flex; align-items: center; min-height: var(--header-h);
  color: var(--text-2); text-decoration: none; font-size: var(--step-0);
  transition: color var(--dur-fast) var(--ease);
}
.nav a:hover { color: var(--text); }
.nav a[aria-current] { color: var(--text); }
.nav a[aria-current]::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--accent);
}
@media (max-width: 599px) {
  .site-header__inner, .nav a { min-height: 3.75rem; }
  .brand__name { font-size: 1.0625rem; }
  .nav ul { column-gap: var(--space-5); }
  .nav a { font-size: var(--step-1); }
}
@media (max-width: 359px) {
  .site-header__inner { column-gap: var(--space-3); }
  .brand { gap: 0.5rem; }
  .brand__mark { width: 20px; height: 21px; }
  .nav ul { column-gap: var(--space-4); }
  .nav a { font-size: var(--step-0); }
}

/* Footer -------------------------------------------------------------------- */
.site-footer { border-top: var(--hairline) solid var(--line); margin-top: var(--section); padding-block: var(--space-8) var(--space-6); font-size: var(--step-0); line-height: 1.55; }
.site-footer__top { row-gap: var(--space-7); }
.site-footer__brand { grid-column: 1 / span 3; display: grid; gap: var(--space-3); align-content: start; }
.site-footer__brand .brand { color: var(--text); margin-bottom: var(--space-2); }
.site-footer__brand p { max-width: 17rem; color: var(--text-3); }
.site-footer__nav { grid-column: 4 / -1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: var(--gutter); row-gap: var(--space-7); }
.site-footer h2 { font: 400 var(--step--1)/1.4 var(--font-mono); color: var(--text-3); margin-bottom: var(--space-4); }
.site-footer ul { list-style: none; padding: 0; display: grid; gap: var(--space-2); }
.site-footer a { color: var(--text-2); text-decoration: none; }
.site-footer a:hover { color: var(--text); text-decoration: underline; text-underline-offset: 0.2em; text-decoration-color: var(--accent); }
.site-footer__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--space-2) var(--space-6); margin-top: var(--space-8); padding-top: var(--space-5); border-top: var(--hairline) solid var(--line); color: var(--text-3); font-family: var(--font-mono); font-size: var(--step--1); }
@media (max-width: 1023px) {
  .site-footer__brand, .site-footer__nav { grid-column: 1 / -1; }
}
@media (max-width: 599px) {
  .site-footer__nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Type ---------------------------------------------------------------------- */
.meta { font-family: var(--font-mono); font-size: var(--step--1); line-height: 1.5; color: var(--text-3); letter-spacing: 0; }
.display { font-size: var(--step-5); line-height: var(--lh-tight); letter-spacing: -0.032em; }
.display .quiet { color: var(--text-3); }
.product-name { font-size: var(--step-6); line-height: 0.95; letter-spacing: -0.05em; margin-left: -0.04em; }
.h2 { font-size: var(--step-4); line-height: var(--lh-heading); letter-spacing: -0.022em; }
.h3 { font-size: var(--step-2); line-height: var(--lh-snug); letter-spacing: -0.01em; }
.lead { font-size: var(--step-2); line-height: 1.55; color: var(--text-2); letter-spacing: -0.005em; }
.small { font-size: var(--step-0); line-height: 1.55; }

/* Links & buttons ----------------------------------------------------------- */
a { color: var(--text); text-decoration-line: underline; text-decoration-thickness: 1px; text-underline-offset: 0.22em; text-decoration-color: var(--line-strong); transition: text-decoration-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease); }
a:hover { text-decoration-color: var(--accent); }
.link-arrow { color: var(--text); text-decoration: none; }
/* A no-break space keeps the arrow on the line with the last word, while a
   long label can still wrap on a narrow screen. */
.link-arrow::after { content: "\a0\2192"; }
.link-arrow:hover { text-decoration: underline; text-decoration-color: var(--accent); }

.actions { display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: center; }
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  min-height: 3rem; padding: 0 1.375rem; border: 1px solid var(--button-bg); border-radius: var(--radius);
  background: var(--button-bg); color: var(--button-text);
  font-size: 1rem; line-height: 1; text-decoration: none; cursor: pointer;
  transition: background-color var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.button:hover { background: var(--button-bg-hover); border-color: var(--button-bg-hover); }
.button--secondary { background: transparent; color: var(--text); border-color: var(--text); }
.button--secondary:hover { background: var(--surface); border-color: var(--text); }
.status {
  display: inline-flex; align-items: center; gap: var(--space-2);
  font-family: var(--font-mono); font-size: var(--step--1); color: var(--text-2);
}
.status::before { content: ""; width: 7px; height: 7px; background: var(--accent); flex: none; }

/* shared:end */

/* Sections ------------------------------------------------------------------ */
.section { padding-top: var(--section); }
.section__label { grid-column: 1 / span 3; padding-top: 0.5rem; }
.section__body { grid-column: 4 / -1; }
.section__rule { border-top: var(--hairline) solid var(--line); padding-top: var(--space-5); }
@media (max-width: 1023px) {
  .section__label { grid-column: 1 / -1; padding-top: 0; margin-bottom: var(--space-5); }
  .section__body { grid-column: 1 / -1; }
}

/* Screenshots */
.shot { background: var(--surface); outline: 1px solid color-mix(in srgb, var(--text) 12%, transparent); outline-offset: -1px; }
.shot img { width: 100%; }

/* Home ---------------------------------------------------------------------- */
/* One block: the headline with a one-line lead. */
.home-hero { padding-block: clamp(3rem, 1.5rem + 5vw, 7rem) clamp(2.5rem, 1.5rem + 3vw, 4.5rem); row-gap: var(--space-5); align-items: end; }
.home-hero__title { grid-column: 1 / span 8; font-size: var(--step-5); line-height: var(--lh-tight); letter-spacing: -0.032em; max-width: 15ch; }
.home-hero__lead { grid-column: 9 / -1; max-width: 22rem; font-size: var(--step-2); line-height: 1.5; color: var(--text-2); padding-bottom: 0.35em; }
@media (max-width: 1023px) {
  .home-hero__title, .home-hero__lead { grid-column: 1 / -1; }
  .home-hero__lead { max-width: 30rem; padding-bottom: 0; }
}


/* Fact rows (support page) */
.facts { grid-column: 1 / -1; list-style: none; padding: 0; margin-top: var(--space-7); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-5) var(--gutter); }
.facts li { border-top: var(--hairline) solid var(--line); padding-top: var(--space-4); color: var(--text); font-size: var(--step-1); line-height: 1.5; padding-right: var(--space-6); }
.facts .meta { display: block; margin-bottom: var(--space-2); }
@media (max-width: 767px) { .facts { grid-template-columns: minmax(0, 1fr); } .facts li { padding-right: 0; } }

/* Techno page --------------------------------------------------------------- */
.p-hero { padding-top: clamp(3rem, 2rem + 4vw, 6rem); row-gap: var(--space-6); align-items: end; }
.p-hero__title { grid-column: 1 / -1; }
.p-hero__title .meta { margin-bottom: var(--space-5); }
.p-hero__lead { grid-column: 1 / span 7; }
.p-hero__aside { grid-column: 9 / -1; display: grid; gap: var(--space-4); justify-items: start; }
@media (max-width: 1023px) {
  .p-hero__lead, .p-hero__aside { grid-column: 1 / -1; }
}

/* Palette switcher (no JS: radios + sibling selectors) */
.palettes-section { padding-top: clamp(2.5rem, 1.5rem + 3vw, 4.5rem); }
.section-head.section-head--compact { margin-bottom: var(--space-5); align-items: baseline; }
.section-head--compact .h3 { grid-column: 1 / span 6; font-size: var(--step-3); letter-spacing: -0.015em; }
.section-head--compact p:not(.meta) { grid-column: 7 / -1; color: var(--text-2); }
@media (max-width: 1023px) { .section-head--compact .h3, .section-head--compact p:not(.meta) { grid-column: 1 / -1; } }
.palettes { border: 0; padding: 0; min-width: 0; }
.palettes__legend { float: left; width: 100%; margin-bottom: var(--space-4); padding: 0; }
.palettes__input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.palettes__tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: var(--hairline) solid var(--line-strong); }
.palettes__tab {
  display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-2) var(--space-3);
  position: relative; min-height: 3.5rem; padding: var(--space-3) var(--space-4) var(--space-3) 0;
  color: var(--text-3); cursor: pointer; font-size: var(--step-1);
  border-top: 2px solid transparent; margin-top: -1px;
  transition: color var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease);
}
.palettes__tab:hover { color: var(--text); }
.swatches { display: inline-flex; gap: 3px; }
.swatches i { width: 12px; height: 12px; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--text) 18%, transparent); }
/* Each palette's page · text · line · accent, from the theme's snippets/css-variables.liquid */
.swatches--techno i:nth-child(1) { background: #000305; } .swatches--techno i:nth-child(2) { background: #c8feff; } .swatches--techno i:nth-child(3) { background: #2ee6e0; } .swatches--techno i:nth-child(4) { background: #b6ff3c; }
.swatches--dreamy i:nth-child(1) { background: #16161e; } .swatches--dreamy i:nth-child(2) { background: #c0caf5; } .swatches--dreamy i:nth-child(3) { background: #7aa2f7; } .swatches--dreamy i:nth-child(4) { background: #bb9af7; }
.swatches--blueprint i:nth-child(1) { background: #eceff3; } .swatches--blueprint i:nth-child(2) { background: #0f172a; } .swatches--blueprint i:nth-child(3) { background: #17458a; } .swatches--blueprint i:nth-child(4) { background: #a63e12; }
.swatches--monolith i:nth-child(1) { background: #e7e4dd; } .swatches--monolith i:nth-child(2) { background: #191817; } .swatches--monolith i:nth-child(3) { background: #2a2926; } .swatches--monolith i:nth-child(4) { background: #9c350f; }
#pal-techno:checked ~ .palettes__tabs [for="pal-techno"],
#pal-dreamy:checked ~ .palettes__tabs [for="pal-dreamy"],
#pal-blueprint:checked ~ .palettes__tabs [for="pal-blueprint"],
#pal-monolith:checked ~ .palettes__tabs [for="pal-monolith"] { color: var(--text); border-top-color: var(--accent); }
#pal-techno:focus-visible ~ .palettes__tabs [for="pal-techno"],
#pal-dreamy:focus-visible ~ .palettes__tabs [for="pal-dreamy"],
#pal-blueprint:focus-visible ~ .palettes__tabs [for="pal-blueprint"],
#pal-monolith:focus-visible ~ .palettes__tabs [for="pal-monolith"] { outline: none; }
/* The focus ring for the (visually hidden) radio, drawn on its tab: it keeps
   clear of the red selected bar at the top, starts 8px before the label and
   stops 8px short of the next tab, so the label itself stays on the grid edge. */
#pal-techno:focus-visible ~ .palettes__tabs [for="pal-techno"]::after,
#pal-dreamy:focus-visible ~ .palettes__tabs [for="pal-dreamy"]::after,
#pal-blueprint:focus-visible ~ .palettes__tabs [for="pal-blueprint"]::after,
#pal-monolith:focus-visible ~ .palettes__tabs [for="pal-monolith"]::after {
  content: ""; position: absolute; inset: 6px 8px 4px -8px; outline: 2px solid var(--focus); pointer-events: none;
}

.palettes__stage { --stage: #000305; --stage-line: #2ee6e033; background: var(--stage); padding: clamp(1rem, 0.25rem + 3vw, 3rem); transition: background-color var(--dur) var(--ease); }
#pal-dreamy:checked ~ .palettes__stage { --stage: #16161e; --stage-line: #7aa2f740; }
#pal-blueprint:checked ~ .palettes__stage { --stage: #eceff3; --stage-line: #17458a33; }
#pal-monolith:checked ~ .palettes__stage { --stage: #e7e4dd; --stage-line: #2a292633; }
.palette { display: none; }
#pal-techno:checked ~ .palettes__stage .palette--techno,
#pal-dreamy:checked ~ .palettes__stage .palette--dreamy,
#pal-blueprint:checked ~ .palettes__stage .palette--blueprint,
#pal-monolith:checked ~ .palettes__stage .palette--monolith { display: grid; }
.palette { grid-template-columns: minmax(0, 69fr) minmax(0, 31fr); gap: clamp(0.75rem, 0.25rem + 1.5vw, 1.5rem); }
.palette picture { outline: 1px solid var(--stage-line); outline-offset: -1px; }
.palette picture:last-of-type img { height: 100%; object-fit: cover; object-position: top; }
.palettes__captions { margin-top: var(--space-4); display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); }
.palettes__captions p { display: none; grid-column: 1 / span 7; }
#pal-techno:checked ~ .palettes__captions .cap-techno,
#pal-dreamy:checked ~ .palettes__captions .cap-dreamy,
#pal-blueprint:checked ~ .palettes__captions .cap-blueprint,
#pal-monolith:checked ~ .palettes__captions .cap-monolith { display: block; }
.palettes__captions strong { font-weight: 400; color: var(--text); }
@media (max-width: 599px) {
  .palettes__tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--gutter); }
  .palettes__tab { font-size: var(--step-0); }
  .palette { grid-template-columns: minmax(0, 1fr); }
  .palette picture:last-of-type { display: none; }
  .palettes__captions p { grid-column: 1 / -1; }
}

.explain { margin-top: var(--space-8); row-gap: var(--space-6); }
.explain > div { grid-column: span 4; border-top: var(--hairline) solid var(--line); padding-top: var(--space-4); }
.explain > div:first-child { grid-column: 1 / span 4; }
.explain p { margin-top: var(--space-2); font-size: var(--step-1); }
@media (max-width: 767px) { .explain > div, .explain > div:first-child { grid-column: 1 / -1; } }

.section-head { row-gap: var(--space-4); margin-bottom: var(--space-7); align-items: end; }
.section-head .meta { grid-column: 1 / -1; }
.section-head .h2 { grid-column: 1 / span 7; }
.section-head p:not(.meta) { grid-column: 9 / -1; font-size: var(--step-1); }
@media (max-width: 1023px) {
  .section-head .h2, .section-head p:not(.meta) { grid-column: 1 / -1; }
}

.phones { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--gutter); }
.phones figure { display: grid; gap: var(--space-4); align-content: start; }
.phones figcaption { font-size: var(--step-0); line-height: 1.5; }
.phones figcaption .meta { display: block; margin-top: var(--space-1); }
@media (max-width: 1023px) { .phones { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: var(--space-7); } }

.features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-8) var(--gutter); }
.feature { border-top: var(--hairline) solid var(--line); padding-top: var(--space-5); display: grid; align-content: start; gap: var(--space-3); padding-right: var(--space-5); }
.feature p { font-size: var(--step-1); }
.feature .link-arrow { font-size: var(--step-0); margin-top: var(--space-2); }
@media (max-width: 1023px) { .features { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 599px) { .features { grid-template-columns: minmax(0, 1fr); gap: var(--space-7); } .feature { padding-right: 0; } }

.specs { border-top: var(--hairline) solid var(--line-strong); }
.specs > div { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); padding-block: var(--space-4); border-bottom: var(--hairline) solid var(--line); }
.specs dt { grid-column: 1 / span 3; font-family: var(--font-mono); font-size: var(--step--1); color: var(--text-3); padding-top: 0.2rem; }
.specs dd { grid-column: 4 / -1; color: var(--text); }
@media (max-width: 767px) { .specs dt, .specs dd { grid-column: 1 / -1; } .specs dt { margin-bottom: var(--space-1); } }

.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gutter); }
.card {
  position: relative; display: grid; align-content: space-between; gap: var(--space-7);
  min-height: 15rem; padding: clamp(1.25rem, 0.75rem + 1.5vw, 2rem);
  background: var(--surface); color: var(--text-2); text-decoration: none;
  transition: background-color var(--dur-fast) var(--ease);
}
.card:hover { background: var(--surface-2); }
.card .h2 { font-size: var(--step-3); letter-spacing: -0.015em; }
.card p { margin-top: var(--space-3); max-width: 28rem; }
.card .link-arrow { font-size: var(--step-0); }
.card:hover .link-arrow { text-decoration: underline; text-decoration-color: var(--accent); }
@media (max-width: 767px) { .cards { grid-template-columns: minmax(0, 1fr); } }

.ideas { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-7) var(--gutter); }
.ideas li { border-top: var(--hairline) solid var(--line); padding-top: var(--space-5); padding-right: var(--space-4); display: grid; gap: var(--space-3); align-content: start; }
.ideas .meta { margin-bottom: var(--space-2); }
@media (max-width: 1023px) { .ideas { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 599px) { .ideas { grid-template-columns: minmax(0, 1fr); } }

.groups { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-8) var(--gutter); }
.group { border-top: var(--hairline) solid var(--line-strong); padding-top: var(--space-4); display: grid; gap: var(--space-4); align-content: start; }
.group ul { list-style: none; padding: 0; }
.group li { padding-block: var(--space-3); border-bottom: var(--hairline) solid var(--line); color: var(--text); line-height: 1.45; padding-right: var(--space-4); }
.group .link-arrow { font-size: var(--step-0); }
@media (max-width: 1023px) { .groups { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 599px) { .groups { grid-template-columns: minmax(0, 1fr); gap: var(--space-7); } }

.cards--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 1023px) { .cards--3 .card { min-height: 12rem; } .cards--3 .card .h2 { font-size: var(--step-2); } }
@media (max-width: 767px) { .cards--3 { grid-template-columns: minmax(0, 1fr); } .cards--3 .card { min-height: 0; } }

.closing { border-top: var(--hairline) solid var(--line-strong); padding-top: var(--space-6); row-gap: var(--space-6); align-items: end; }
.closing__text { grid-column: 1 / span 7; }
.closing__text p { margin-top: var(--space-3); max-width: 34rem; }
.closing__cta { grid-column: 9 / -1; display: grid; gap: var(--space-4); justify-items: start; }
@media (max-width: 1023px) { .closing__text, .closing__cta { grid-column: 1 / -1; } }

/* Breadcrumb */
.crumbs { font-size: var(--step-0); color: var(--text-3); }
.crumbs ol { display: flex; flex-wrap: wrap; gap: var(--space-2); list-style: none; padding: 0; }
.crumbs li + li::before { content: "/"; margin-right: var(--space-2); color: var(--line-strong); }
.crumbs a { color: var(--text-3); text-decoration: none; }
.crumbs a:hover { color: var(--text); text-decoration: underline; text-decoration-color: var(--accent); }

/* Legal --------------------------------------------------------------------- */
.page-head { padding-top: clamp(3rem, 2rem + 4vw, 6rem); padding-bottom: var(--space-7); border-bottom: var(--hairline) solid var(--line); }
.page-head .meta { margin-top: var(--space-5); }
.page-head .h1 { font-size: var(--step-5); line-height: var(--lh-tight); letter-spacing: -0.032em; margin-top: var(--space-5); }
.page-head .lead { margin-top: var(--space-5); max-width: 40rem; }
.legal { padding-top: var(--space-8); }
.toc { grid-column: 1 / span 3; }
.toc__inner { position: sticky; top: var(--space-6); }
.toc h2 { font: 400 var(--step--1)/1.4 var(--font-mono); color: var(--text-3); margin-bottom: var(--space-4); }
.toc ol { list-style: none; padding: 0; display: grid; gap: var(--space-2); font-size: var(--step-0); line-height: 1.4; counter-reset: toc; }
.toc a { color: var(--text-2); text-decoration: none; display: block; }
.toc a:hover { color: var(--text); }
.prose { grid-column: 4 / span 7; max-width: var(--measure); }
.prose > * + * { margin-top: var(--space-4); }
.prose h2 { font-size: var(--step-3); line-height: 1.25; letter-spacing: -0.015em; margin-top: var(--space-8); padding-top: var(--space-5); border-top: var(--hairline) solid var(--line); scroll-margin-top: var(--space-6); }
.prose h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.prose h3 { font-size: var(--step-2); line-height: var(--lh-snug); margin-top: var(--space-6); }
.prose ul, .prose ol { padding-left: 1.25em; }
.prose li + li { margin-top: var(--space-2); }
.prose li::marker { color: var(--text-3); }
.prose .table-wrap { overflow-x: auto; border-top: var(--hairline) solid var(--line-strong); }
.prose table { width: 100%; border-collapse: collapse; font-size: var(--step-0); }
.prose th, .prose td { text-align: left; vertical-align: top; padding: var(--space-3) var(--space-4) var(--space-3) 0; border-bottom: var(--hairline) solid var(--line); }
.prose th { font: 400 var(--step--1)/1.4 var(--font-mono); color: var(--text-3); }
.prose td:first-child { color: var(--text); }
@media (min-width: 600px) { .prose td:first-child { white-space: nowrap; } }
.prose a { overflow-wrap: anywhere; }
.prose a[href^="mailto:"] { white-space: nowrap; overflow-wrap: normal; }
@media (max-width: 1023px) {
  .toc { grid-column: 1 / -1; margin-bottom: var(--space-7); }
  .toc__inner { position: static; border: var(--hairline) solid var(--line); padding: var(--space-5); }
  .prose { grid-column: 1 / -1; }
}

/* Forms --------------------------------------------------------------------- */
.facts--support { margin-top: var(--space-7); }
.support { padding-top: var(--space-8); row-gap: var(--space-7); }
.support__form { grid-column: 1 / span 7; grid-row: 1; }
.support__aside { grid-column: 9 / -1; grid-row: 1; }
.support__aside .checklist { position: sticky; top: var(--space-6); }
.checklist ol { list-style: none; padding: 0; counter-reset: step; display: grid; gap: var(--space-4); }
.checklist li { counter-increment: step; position: relative; padding-left: 2rem; font-size: var(--step-0); line-height: 1.55; }
.checklist li::before { content: counter(step, decimal-leading-zero); position: absolute; left: 0; top: 0.1rem; font-family: var(--font-mono); font-size: var(--step--1); color: var(--text-3); }
.scope { padding-top: var(--space-9); row-gap: var(--space-7); }
.grid.scope > .aside-block { grid-column: span 4; margin: 0; }
.scope .aside-block p { margin-top: var(--space-3); }
@media (max-width: 1023px) {
  .support__form, .support__aside { grid-column: 1 / -1; grid-row: auto; }
  .support__aside { order: -1; }
  .support__aside .checklist { position: static; }
  .grid.scope > .aside-block { grid-column: 1 / -1; }
}
.page-head--short { border-bottom: 0; padding-bottom: 0; }
.thanks { padding-top: var(--space-6); }
.thanks__body { grid-column: 1 / span 7; display: grid; gap: var(--space-4); max-width: var(--measure); }
@media (max-width: 1023px) { .thanks__body { grid-column: 1 / -1; } }

.form { display: grid; gap: var(--space-8); }
.form fieldset { border: 0; padding: 0; min-width: 0; display: grid; gap: var(--space-6); }
.form fieldset > legend { font: 400 var(--step--1)/1.4 var(--font-mono); color: var(--text-3); padding: 0 0 var(--space-3); width: 100%; border-bottom: var(--hairline) solid var(--line); margin-bottom: var(--space-2); }
.field { display: grid; gap: var(--space-2); min-width: 0; }
.form fieldset.field--group { gap: var(--space-2); }
.form fieldset.field--group > legend { font: inherit; font-size: var(--step-1); line-height: 1.4; color: var(--text); border: 0; padding: 0; margin-bottom: var(--space-2); }
.field__label { color: var(--text); font-size: var(--step-1); line-height: 1.4; }
.field__label .opt { color: var(--text-3); font-size: var(--step-0); }
.field__hint { color: var(--text-3); font-size: var(--step-0); line-height: 1.5; order: 3; }
.field__error { display: none; color: var(--error); font-size: var(--step-0); line-height: 1.5; order: 4; }
.input, .select, .textarea {
  width: 100%; min-height: 3rem; padding: 0.75rem 0.875rem; order: 2;
  background: var(--bg); color: var(--text); font-size: 1rem; line-height: 1.4;
  border: 1px solid var(--control); border-radius: var(--radius);
  transition: border-color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
}
.input::placeholder, .textarea::placeholder { color: var(--text-3); opacity: 1; }
.input:hover, .select:hover, .textarea:hover { border-color: var(--text-2); }
.input:focus-visible, .select:focus-visible, .textarea:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-color: var(--text); }
.input--short { max-width: 12rem; }
.textarea { min-height: 11rem; resize: vertical; line-height: var(--lh-body); }
.select {
  appearance: none; -webkit-appearance: none; padding-right: 2.75rem; cursor: pointer; max-width: 100%; text-overflow: ellipsis;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%2365645e' stroke-width='1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 1rem center;
}
.input:user-invalid, .select:user-invalid, .textarea:user-invalid,
.field.is-invalid .input, .field.is-invalid .select, .field.is-invalid .textarea { border-color: var(--error); box-shadow: inset 3px 0 0 var(--error); }
.field:has(:user-invalid) .field__error, .field.is-invalid .field__error { display: block; }
.field__error::before { content: "Error: "; font-weight: 700; }
.choices { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-6); order: 2; }
.choice { display: inline-flex; align-items: center; gap: var(--space-3); min-height: 2.75rem; cursor: pointer; color: var(--text); }
.choice input { width: 1.25rem; height: 1.25rem; margin: 0; accent-color: var(--text); cursor: pointer; }
.file { order: 2; width: 100%; max-width: 100%; min-width: 0; font-size: var(--step-0); color: var(--text-2); }
.file::file-selector-button {
  margin-right: var(--space-4); min-height: 2.75rem; padding: 0 1rem; cursor: pointer;
  background: transparent; color: var(--text); border: 1px solid var(--text); border-radius: 0; font: inherit;
}
.file::file-selector-button:hover { background: var(--surface); }
.form__submit { display: grid; gap: var(--space-4); justify-items: start; padding-top: var(--space-2); }
.form__submit .field__hint { max-width: 32rem; }
.aside-block { border-top: var(--hairline) solid var(--line); padding-top: var(--space-4); }
.aside-block + .aside-block { margin-top: var(--space-7); }
.aside-block h2 { font-size: var(--step-2); line-height: var(--lh-snug); margin-bottom: var(--space-3); }
.aside-block ul { padding-left: 1.1em; font-size: var(--step-0); line-height: 1.55; display: grid; gap: var(--space-2); }
.aside-block p { font-size: var(--step-0); line-height: 1.55; }
.aside-block p + p { margin-top: var(--space-3); }
code { font-family: var(--font-mono); font-size: 0.875em; background: var(--surface); padding: 0.1em 0.3em; white-space: nowrap; }

/* 404 ----------------------------------------------------------------------- */
.notfound { padding-top: clamp(4rem, 2rem + 8vw, 10rem); }
.notfound > .meta { grid-column: 1 / -1; }
.notfound .display { grid-column: 1 / span 9; margin-top: var(--space-5); }
.notfound p.lead { grid-column: 1 / span 6; margin-top: var(--space-5); }
.notfound ul { grid-column: 1 / span 6; list-style: none; padding: 0; margin-top: var(--space-7); display: grid; border-top: var(--hairline) solid var(--line); }
.notfound li { border-bottom: var(--hairline) solid var(--line); }
.notfound li a { display: flex; justify-content: space-between; padding-block: var(--space-4); text-decoration: none; }
.notfound li a:hover { text-decoration: underline; text-decoration-color: var(--accent); }
@media (max-width: 767px) { .notfound .display, .notfound p.lead, .notfound ul { grid-column: 1 / -1; } }

/* Motion -------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
}
