/* Built by sites/lot313/build.mjs from styles/tokens.css + styles/components.css. */
/* ==========================================================================
   Lot 313 site design tokens.
   Principles follow Vercel's Geist design language (near-monochrome neutrals,
   one accent, precise type, hairline borders, subtle radii). Values are our
   own. Components (components.css) may reference ONLY these custom properties.
   See sites/lot313/DESIGN.md.
   ========================================================================== */

/* --- Fonts (self-hosted Geist, SIL OFL 1.1; see /fonts/OFL.txt) ---------- */
@font-face {
  font-family: "Geist";
  src: url("/fonts/Geist-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Geist Mono";
  src: url("/fonts/GeistMono-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
/* Metric-matched fallback so the swap to Geist causes no layout shift.
   Geist: unitsPerEm 1000, ascender 1005, descender -295, lineGap 0
   (read from the font's hhea table). size-adjust 104.76% matches Geist's
   average Latin glyph width to Arial; overrides = metric / size-adjust. */
@font-face {
  font-family: "Geist Fallback";
  src: local("Arial"), local("Helvetica Neue"), local("Helvetica");
  size-adjust: 104.76%;
  ascent-override: 95.94%;
  descent-override: 28.16%;
  line-gap-override: 0%;
}

:root {
  color-scheme: light dark;

  /* --- Color: neutral scale -------------------------------------------- */
  --neutral-50: #fafafa;
  --neutral-100: #f4f4f4;
  --neutral-200: #ebebeb;
  --neutral-300: #d6d6d6;
  --neutral-400: #a3a3a3;
  --neutral-500: #8a8a8a;
  --neutral-600: #666666;
  --neutral-700: #4d4d4d;
  --neutral-800: #262626;
  --neutral-900: #141414;
  --neutral-950: #0a0a0a;
  --white: #ffffff;

  /* --- Color: accent (one hue) and status ------------------------------ */
  --blue-300: #8cc4ff;
  --blue-400: #52a8ff;
  --blue-600: #0a63d6;
  --blue-700: #0052b8;
  --green-400: #3fcf8e;
  --green-700: #0a7a3d;
  --amber-400: #f5a524;
  --amber-700: #9a4d00;
  --red-400: #ff6166;
  --red-700: #c4242c;

  /* --- Semantic aliases: light (default) ------------------------------- */
  --color-bg: var(--white);
  --color-bg-subtle: var(--neutral-50);
  --color-surface: var(--white);
  --color-surface-raised: var(--neutral-50);
  --color-border: var(--neutral-200);
  --color-border-strong: var(--neutral-300);
  --color-text: var(--neutral-900);
  --color-text-muted: var(--neutral-600);
  --color-text-subtle: var(--neutral-600);
  --color-accent: var(--blue-600);
  --color-accent-hover: var(--blue-700);
  --color-inverse-bg: var(--neutral-900);
  --color-inverse-text: var(--white);
  --color-inverse-bg-hover: var(--neutral-700);
  --color-success: var(--green-700);
  --color-warning: var(--amber-700);
  --color-error: var(--red-700);
  --color-focus: var(--blue-600);
  --color-header-bg: rgb(255 255 255 / 0.85);
  --mask-solid: #000; /* alpha source for CSS masks, not a visible color */

  /* --- Typography --------------------------------------------------------
     Modular scale, ratio 1.25 (major third) from a 16px base. Display steps
     are fluid between a 360px and a 1280px viewport via clamp(). Each step
     has a matching line-height (--lh-*) and letter-spacing (--ls-*).     */
  --font-sans: "Geist", "Geist Fallback", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-mono: "Geist Mono", ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

  --text-xs: 0.75rem;   /* 12 */
  --text-sm: 0.875rem;  /* 14 */
  --text-base: 1rem;    /* 16 */
  --text-lg: 1.125rem;  /* 18 */
  --text-xl: 1.25rem;   /* 20 */
  --text-2xl: clamp(1.375rem, 1.27rem + 0.45vw, 1.5625rem);  /* 22 -> 25 */
  --text-3xl: clamp(1.625rem, 1.4rem + 1vw, 1.953rem);       /* 26 -> 31 */
  --text-4xl: clamp(2rem, 1.6rem + 1.8vw, 2.441rem);         /* 32 -> 39 */
  --text-5xl: clamp(2.375rem, 1.6rem + 3.4vw, 3.815rem);     /* 38 -> 61 */

  --lh-xs: 1rem;
  --lh-sm: 1.25rem;
  --lh-base: 1.625;
  --lh-lg: 1.6;
  --lh-xl: 1.5;
  --lh-2xl: 1.3;
  --lh-3xl: 1.2;
  --lh-4xl: 1.12;
  --lh-5xl: 1.04;

  --ls-xs: 0.02em;
  --ls-eyebrow: 0.08em;
  --ls-sm: 0;
  --ls-base: 0;
  --ls-lg: -0.005em;
  --ls-xl: -0.01em;
  --ls-2xl: -0.015em;
  --ls-3xl: -0.025em;
  --ls-4xl: -0.035em;
  --ls-5xl: -0.045em;

  --weight-regular: 400;
  --weight-medium: 500;
  --weight-semibold: 600;
  --weight-bold: 700;

  /* --- Spacing: 4px base ------------------------------------------------ */
  --space-0: 0;
  --space-1: 0.25rem;  /* 4 */
  --space-2: 0.5rem;   /* 8 */
  --space-3: 0.75rem;  /* 12 */
  --space-4: 1rem;     /* 16 */
  --space-5: 1.25rem;  /* 20 */
  --space-6: 1.5rem;   /* 24 */
  --space-8: 2rem;     /* 32 */
  --space-10: 2.5rem;  /* 40 */
  --space-12: 3rem;    /* 48 */
  --space-16: 4rem;    /* 64 */
  --space-20: 5rem;    /* 80 */
  --space-24: 6rem;    /* 96 */
  --space-32: 8rem;    /* 128 */
  --space-0-5: 0.125rem; /* 2 (optical nudges only) */
  --space-section: clamp(4rem, 2.8rem + 5.2vw, 7rem);
  --space-hero-top: clamp(4.5rem, 2.5rem + 9vw, 9rem);
  --space-hero-bottom: clamp(4rem, 2.5rem + 6vw, 7rem);
  --space-page-top: clamp(3.5rem, 2rem + 6vw, 6rem);

  /* --- Radii, borders, shadows ----------------------------------------- */
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 8px;
  --radius-xl: 12px;
  --radius-full: 9999px;
  --border-width: 1px;
  --border-hairline: var(--border-width) solid var(--color-border);
  --shadow-sm: 0 1px 2px rgb(0 0 0 / 0.04);
  --shadow-md: 0 1px 2px rgb(0 0 0 / 0.04), 0 4px 12px rgb(0 0 0 / 0.04);
  --backdrop-header: saturate(180%) blur(12px);

  /* --- Layout ------------------------------------------------------------
     Breakpoints (custom properties cannot be used inside @media, so these
     document the literal values components.css uses):
       --bp-sm 40rem (640px) · --bp-md 48rem (768px) · --bp-lg 64rem (1024px) */
  --bp-sm: 40rem;
  --bp-md: 48rem;
  --bp-lg: 64rem;
  --container: 72rem;      /* 1152px page grid */
  --container-narrow: 48rem;
  --measure: 68ch;         /* legal/reading text */
  --gutter: clamp(1rem, 0.6rem + 1.8vw, 2rem);
  --header-height: 4rem;
  --measure-title: 18ch;   /* hero headline */
  --width-lede: 38rem;     /* supporting paragraphs */
  --width-toc: 14rem;      /* legal table of contents column */
  --width-label: 11rem;    /* contact panel labels */
  --control-height: 2.5rem;
  --icon-sm: 16px;
  --icon-md: 20px;

  /* --- Focus, motion ----------------------------------------------------- */
  --focus-ring-width: 2px;
  --focus-ring-offset: 2px;
  --duration-fast: 120ms;
  --ease-standard: cubic-bezier(0.2, 0, 0, 1);
}

/* --- Semantic aliases: dark ----------------------------------------------- */
@media (prefers-color-scheme: dark) {
  :root {
    --color-bg: var(--neutral-950);
    --color-bg-subtle: var(--neutral-900);
    --color-surface: var(--neutral-950);
    --color-surface-raised: var(--neutral-900);
    --color-border: var(--neutral-800);
    --color-border-strong: var(--neutral-700);
    --color-text: var(--neutral-100);
    --color-text-muted: var(--neutral-400);
    --color-text-subtle: var(--neutral-400);
    --color-accent: var(--blue-400);
    --color-accent-hover: var(--blue-300);
    --color-inverse-bg: var(--neutral-100);
    --color-inverse-text: var(--neutral-950);
    --color-inverse-bg-hover: var(--neutral-300);
    --color-success: var(--green-400);
    --color-warning: var(--amber-400);
    --color-error: var(--red-400);
    --color-focus: var(--blue-400);
    --color-header-bg: rgb(10 10 10 / 0.85);
    --shadow-sm: none;
    --shadow-md: none;
  }
}

/* ==========================================================================
   Lot 313 site components. Uses only tokens from tokens.css.
   Literal media-query values mirror --bp-sm/md/lg (40/48/64rem).
   ========================================================================== */

/* --- Base ------------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-height) + var(--space-6));
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: var(--lh-base);
  letter-spacing: var(--ls-base);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-wrap: break-word;
}

main { flex: 1 0 auto; }
main:focus { outline: none; }

h1, h2, h3, h4 { margin: 0; font-weight: var(--weight-semibold); color: var(--color-text); text-wrap: balance; }
p, ul, ol, dl { margin: 0; }
p { text-wrap: pretty; }

a {
  color: var(--color-accent);
  text-decoration: underline;
  text-decoration-thickness: var(--border-width);
  text-underline-offset: 0.2em;
}
a:hover { color: var(--color-accent-hover); }

:focus-visible {
  outline: var(--focus-ring-width) solid var(--color-focus);
  outline-offset: var(--focus-ring-offset);
  border-radius: var(--radius-sm);
}

::selection { background: var(--color-accent); color: var(--color-inverse-text); }

svg { display: block; flex-shrink: 0; }

.container {
  width: 100%;
  max-width: calc(var(--container) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* --- Skip link & preview banner ------------------------------------------- */
.skip-link {
  position: absolute;
  top: var(--space-2);
  left: var(--space-2);
  z-index: 100;
  padding: var(--space-2) var(--space-4);
  background: var(--color-inverse-bg);
  color: var(--color-inverse-text);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  border-radius: var(--radius-md);
  text-decoration: none;
  transform: translateY(-200%);
}
.skip-link:focus-visible { transform: none; color: var(--color-inverse-text); }

.preview-banner {
  padding: var(--space-2) var(--gutter);
  background: var(--color-warning);
  color: var(--color-inverse-text);
  font-size: var(--text-sm);
  line-height: var(--lh-sm);
  font-weight: var(--weight-medium);
  text-align: center;
}

/* --- Header ---------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--color-header-bg);
  border-bottom: var(--border-hairline);
  -webkit-backdrop-filter: var(--backdrop-header);
  backdrop-filter: var(--backdrop-header);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  min-height: var(--header-height);
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--color-text);
  font-size: var(--text-lg);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--ls-xl);
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
}
.wordmark:hover { color: var(--color-text); }
.wordmark svg { width: var(--icon-md); height: var(--icon-md); }

.site-nav ul {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  padding: 0;
  list-style: none;
}
.site-nav a {
  display: inline-block;
  padding: var(--space-2) var(--space-2);
  border-radius: var(--radius-md);
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  line-height: var(--lh-sm);
  text-decoration: none;
  white-space: nowrap;
}
.site-nav a:hover { color: var(--color-text); background: var(--color-bg-subtle); }
.site-nav a[aria-current="page"] { color: var(--color-text); font-weight: var(--weight-medium); }
@media (min-width: 40rem) {
  .site-nav ul { gap: var(--space-2); }
  .site-nav a { padding-inline: var(--space-3); }
}
@media (max-width: 23.5rem) {
  .wordmark span { font-size: var(--text-base); }
  .site-nav a { padding-inline: var(--space-1); }
}

/* --- Buttons --------------------------------------------------------------- */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: var(--control-height);
  padding: var(--space-2) var(--space-4);
  border: var(--border-width) solid transparent;
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  line-height: var(--lh-sm);
  font-weight: var(--weight-medium);
  text-decoration: none;
  white-space: nowrap;
}
.button svg { width: var(--icon-sm); height: var(--icon-sm); }
.button--primary { background: var(--color-inverse-bg); color: var(--color-inverse-text); }
.button--primary:hover { background: var(--color-inverse-bg-hover); color: var(--color-inverse-text); }
.button--secondary { background: var(--color-surface); color: var(--color-text); border-color: var(--color-border); }
.button--secondary:hover { background: var(--color-bg-subtle); border-color: var(--color-border-strong); color: var(--color-text); }

/* --- Eyebrow, section heads ------------------------------------------------ */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
  color: var(--color-text-muted);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  line-height: var(--lh-xs);
  letter-spacing: var(--ls-eyebrow);
  text-transform: uppercase;
}
.eyebrow::before {
  content: "";
  width: var(--space-2);
  height: var(--space-2);
  border-radius: var(--radius-full);
  background: var(--color-accent);
}

.section {
  padding-block: var(--space-section);
  border-top: var(--border-hairline);
}
.section-head { max-width: var(--width-lede); margin-bottom: var(--space-12); }
.section-title {
  font-size: var(--text-4xl);
  line-height: var(--lh-4xl);
  letter-spacing: var(--ls-4xl);
}
.section-lede {
  margin-top: var(--space-4);
  color: var(--color-text-muted);
  font-size: var(--text-lg);
  line-height: var(--lh-lg);
  letter-spacing: var(--ls-lg);
}

/* --- Hero ------------------------------------------------------------------ */
.hero {
  position: relative;
  isolation: isolate;
  padding-block: var(--space-hero-top) var(--space-hero-bottom);
  overflow: hidden;
}
/* Hairline grid, faded out with a radial mask. Purely decorative. */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(to right, var(--color-border) var(--border-width), transparent var(--border-width)),
    linear-gradient(to bottom, var(--color-border) var(--border-width), transparent var(--border-width));
  background-size: var(--space-16) var(--space-16);
  background-position: center top;
  -webkit-mask-image: radial-gradient(ellipse 70% 80% at 50% 0%, var(--mask-solid) 30%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 80% at 50% 0%, var(--mask-solid) 30%, transparent 75%);
}
.hero__title {
  max-width: var(--measure-title);
  font-size: var(--text-5xl);
  line-height: var(--lh-5xl);
  letter-spacing: var(--ls-5xl);
  font-weight: var(--weight-semibold);
}
.hero__lede {
  max-width: var(--width-lede);
  margin-top: var(--space-6);
  color: var(--color-text-muted);
  font-size: var(--text-xl);
  line-height: var(--lh-xl);
  letter-spacing: var(--ls-xl);
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-top: var(--space-10);
}

/* --- Joined grid (features, steps) ----------------------------------------
   Cells share hairline dividers: the 1px gap shows the border color.        */
.grid-joined {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--border-width);
  padding: 0;
  list-style: none;
  background: var(--color-border);
  border: var(--border-hairline);
  border-radius: var(--radius-xl);
  overflow: hidden;
}
@media (min-width: 48rem) {
  .grid-joined--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.grid-joined > li { margin: 0; background: var(--color-surface); }

.feature {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  height: 100%;
  padding: var(--space-8) var(--space-6);
}
.feature__icon {
  display: grid;
  place-items: center;
  width: var(--space-10);
  height: var(--space-10);
  margin-bottom: var(--space-3);
  color: var(--color-text);
  background: var(--color-bg-subtle);
  border: var(--border-hairline);
  border-radius: var(--radius-lg);
}
.feature__icon svg { width: var(--icon-md); height: var(--icon-md); }
.feature__title {
  font-size: var(--text-lg);
  line-height: var(--lh-lg);
  letter-spacing: var(--ls-lg);
}
.feature__body { color: var(--color-text-muted); font-size: var(--text-base); }

/* --- Steps (how buying works) ---------------------------------------------- */
.steps { counter-reset: step; }
.step {
  counter-increment: step;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  height: 100%;
  padding: var(--space-8) var(--space-6);
}
.step::before {
  content: counter(step, decimal-leading-zero);
  margin-bottom: var(--space-4);
  color: var(--color-text-muted);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  line-height: var(--lh-sm);
}
.step__title { font-size: var(--text-lg); line-height: var(--lh-lg); letter-spacing: var(--ls-lg); }
.step__body { color: var(--color-text-muted); }

/* --- Callout ------------------------------------------------------------- */
.callout {
  display: flex;
  gap: var(--space-3);
  align-items: flex-start;
  margin-top: var(--space-8);
  padding: var(--space-4) var(--space-5);
  background: var(--color-bg-subtle);
  border: var(--border-hairline);
  border-radius: var(--radius-lg);
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  line-height: var(--lh-sm);
}
.callout svg { width: var(--icon-sm); height: var(--icon-sm); margin-top: var(--space-0-5); color: var(--color-text); }
.callout p + p { margin-top: var(--space-2); }
.callout strong { color: var(--color-text); font-weight: var(--weight-medium); }

/* --- Products ---------------------------------------------------------------- */
.product-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
  padding: 0;
  list-style: none;
}
@media (min-width: 48rem) { .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.product-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  height: 100%;
  padding: var(--space-6);
  background: var(--color-surface);
  border: var(--border-hairline);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
}
.product-card:hover { border-color: var(--color-border-strong); box-shadow: var(--shadow-md); }
.product-card__title { font-size: var(--text-lg); line-height: var(--lh-lg); letter-spacing: var(--ls-lg); }
.product-card__title a { color: var(--color-text); text-decoration: none; }
/* Whole card is the link target; the focus ring follows the card. */
.product-card__title a::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius-xl); }
.product-card__title a:focus-visible { outline: none; }
.product-card__title a:focus-visible::after { outline: var(--focus-ring-width) solid var(--color-focus); outline-offset: var(--focus-ring-offset); }
.product-card__body { color: var(--color-text-muted); }
.product-card__url {
  margin-top: auto;
  padding-top: var(--space-4);
  color: var(--color-text-muted);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  line-height: var(--lh-xs);
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-16) var(--space-6);
  text-align: center;
  background-color: var(--color-bg-subtle);
  background-image: radial-gradient(var(--color-border) var(--border-width), transparent var(--border-width));
  background-size: var(--space-4) var(--space-4);
  border: var(--border-width) dashed var(--color-border-strong);
  border-radius: var(--radius-xl);
}
.empty-state__icon {
  display: grid;
  place-items: center;
  width: var(--space-12);
  height: var(--space-12);
  margin-bottom: var(--space-3);
  color: var(--color-text-muted);
  background: var(--color-surface);
  border: var(--border-hairline);
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-sm);
}
.empty-state__icon svg { width: var(--icon-md); height: var(--icon-md); }
.empty-state__title { font-size: var(--text-lg); line-height: var(--lh-lg); }
.empty-state__body { max-width: var(--width-lede); color: var(--color-text-muted); }

/* --- Page header (inner pages) ------------------------------------------- */
.page-header { padding-block: var(--space-page-top) var(--space-12); }
.page-title {
  font-size: var(--text-4xl);
  line-height: var(--lh-4xl);
  letter-spacing: var(--ls-4xl);
}
.page-lede {
  max-width: var(--width-lede);
  margin-top: var(--space-4);
  color: var(--color-text-muted);
  font-size: var(--text-lg);
  line-height: var(--lh-lg);
}

/* --- Contact panel ------------------------------------------------------- */
.contact-panel {
  max-width: var(--container-narrow);
  border: var(--border-hairline);
  border-radius: var(--radius-xl);
  overflow: hidden;
}
.contact-panel__row {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-1);
  padding: var(--space-5) var(--space-6);
  background: var(--color-surface);
}
.contact-panel__row + .contact-panel__row { border-top: var(--border-hairline); }
@media (min-width: 40rem) {
  .contact-panel__row { grid-template-columns: var(--width-label) 1fr; gap: var(--space-6); }
}
.contact-panel dt {
  color: var(--color-text-muted);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  line-height: var(--lh-sm);
  letter-spacing: var(--ls-eyebrow);
  text-transform: uppercase;
  padding-top: var(--space-0-5);
}
.contact-panel dd { margin: 0; }
.contact-panel address { font-style: normal; }
.contact-panel__primary { font-size: var(--text-lg); font-weight: var(--weight-medium); }

.stack-section { padding-bottom: var(--space-section); }
.stack-section .callout { max-width: var(--container-narrow); }

/* --- Legal document layout ---------------------------------------------- */
.legal {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-10);
  padding-bottom: var(--space-section);
}
@media (min-width: 64rem) {
  .legal {
    grid-template-columns: var(--width-toc) minmax(0, var(--measure));
    column-gap: var(--space-16);
  }
  .legal > .page-header { grid-column: 1 / -1; }
}
.legal > .page-header { padding-bottom: 0; }

.doc-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-4);
  margin-top: var(--space-6);
  padding: 0;
  list-style: none;
  color: var(--color-text-muted);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  line-height: var(--lh-xs);
}
.doc-meta li {
  padding: var(--space-1) var(--space-2);
  border: var(--border-hairline);
  border-radius: var(--radius-full);
}

.toc {
  align-self: start;
  padding: var(--space-5);
  border: var(--border-hairline);
  border-radius: var(--radius-lg);
  font-size: var(--text-sm);
  line-height: var(--lh-sm);
}
@media (min-width: 64rem) {
  .toc {
    position: sticky;
    top: calc(var(--header-height) + var(--space-8));
    padding: 0;
    border: 0;
  }
}
.toc__title {
  margin-bottom: var(--space-3);
  color: var(--color-text);
  font-weight: var(--weight-medium);
}
.toc__list { counter-reset: toc; padding: 0; list-style: none; }
.toc__list li { counter-increment: toc; display: flex; gap: var(--space-2); }
.toc__list li + li { margin-top: var(--space-2); }
.toc__list li::before {
  content: counter(toc) ".";
  min-width: var(--space-6);
  color: var(--color-text-muted);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
}
.toc__list a { color: var(--color-text-muted); text-decoration: none; }
.toc__list a:hover { color: var(--color-text); text-decoration: underline; }

.legal-doc { max-width: var(--measure); }
.legal-doc > p, .legal-doc li { color: var(--color-text); }
.legal-doc p + p, .legal-doc p + ul, .legal-doc ul + p { margin-top: var(--space-4); }
.legal-doc ul { padding-left: var(--space-5); }
.legal-doc li + li { margin-top: var(--space-2); }
.legal-doc li::marker { color: var(--color-text-muted); }
.legal-doc h2 {
  display: flex;
  align-items: baseline;
  gap: var(--space-3);
  margin-top: var(--space-12);
  margin-bottom: var(--space-4);
  padding-top: var(--space-8);
  border-top: var(--border-hairline);
  font-size: var(--text-2xl);
  line-height: var(--lh-2xl);
  letter-spacing: var(--ls-2xl);
}
.legal-doc .section-num {
  color: var(--color-text-muted);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  font-weight: var(--weight-regular);
  letter-spacing: 0;
}
.legal-doc strong { font-weight: var(--weight-semibold); }
.legal-doc .legal-intro { color: var(--color-text-muted); font-size: var(--text-lg); line-height: var(--lh-lg); }

/* --- 404 ----------------------------------------------------------------- */
.not-found {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding-block: var(--space-hero-top);
}
.not-found__code {
  margin-bottom: var(--space-4);
  color: var(--color-text-muted);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  line-height: var(--lh-sm);
  letter-spacing: var(--ls-eyebrow);
}

/* --- Footer -------------------------------------------------------------- */
.site-footer {
  margin-top: auto;
  background: var(--color-bg-subtle);
  border-top: var(--border-hairline);
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  line-height: var(--lh-sm);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-10);
  padding-block: var(--space-16) var(--space-12);
}
@media (min-width: 40rem) {
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-brand { grid-column: 1 / -1; }
}
@media (min-width: 64rem) {
  .footer-grid { grid-template-columns: 2fr 1fr 1fr; }
  .footer-brand { grid-column: auto; }
}
.footer-brand .wordmark { margin-bottom: var(--space-4); }
.site-footer .wordmark, .site-footer .wordmark:hover { color: var(--color-text); text-decoration: none; }
.footer-brand p + p, .footer-brand p + address { margin-top: var(--space-2); }
.footer-brand address { font-style: normal; }
.footer-heading {
  margin-bottom: var(--space-4);
  color: var(--color-text);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
}
.footer-links { padding: 0; list-style: none; }
.footer-links li + li { margin-top: var(--space-3); }
.site-footer a { color: var(--color-text-muted); text-decoration: none; }
.site-footer a:hover { color: var(--color-text); text-decoration: underline; }
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-2) var(--space-6);
  padding-block: var(--space-6);
  border-top: var(--border-hairline);
  font-size: var(--text-xs);
  line-height: var(--lh-xs);
}

/* --- Motion (optional, minimal) ------------------------------------------ */
@media (prefers-reduced-motion: no-preference) {
  a, .button, .product-card, .site-nav a {
    transition-property: color, background-color, border-color, box-shadow;
    transition-duration: var(--duration-fast);
    transition-timing-function: var(--ease-standard);
  }
  html:focus-within { scroll-behavior: smooth; }
}
