/* Self-hosted fonts (no request to Google). Files and licences: website/fonts/README.md.
   Archivo (variable: weight and width) carries the words; Inter Tight, the desk's own typeface, carries numbers. */
@font-face {
  font-family: Archivo;
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  src: url("fonts/archivo-vf-latin.woff2") format("woff2");
}

@font-face {
  font-family: "Inter Tight";
  font-style: normal;
  font-display: swap;
  font-weight: 500;
  src: url("fonts/inter-tight-medium-latin.woff2") format("woff2");
}

@font-face {
  font-family: "Inter Tight";
  font-style: normal;
  font-display: swap;
  font-weight: 600;
  src: url("fonts/inter-tight-semibold-latin.woff2") format("woff2");
}

@font-face {
  font-family: "Inter Tight";
  font-style: normal;
  font-display: swap;
  font-weight: 700;
  src: url("fonts/inter-tight-bold-latin.woff2") format("woff2");
}

/* ------------------------------------------------------------------
   Metrilite design system ("Electric", 2026-11-06).
   Midnight black, deep-navy radial light, electric-blue accents and
   neon-cyan for the numbers that matter; ice-white headings, silver-grey
   copy. The nine brand tokens below are the source of truth; every older
   name (--bg, --ink, --accent ...) maps onto them so app.css and the
   console keep working unchanged. One type scale, one spacing scale,
   one button system. The logo keeps its own colours (build-brand.py).
   ------------------------------------------------------------------ */
:root {
  color-scheme: dark;

  /* Brand tokens (the brief's exact values). */
  --bg-primary: #0a0a0a;
  --bg-secondary: #111111;
  --bg-tertiary: #1c1c1c;
  --accent-primary: #fafafa;
  --accent-secondary: #fafafa;
  --accent-glow: #ffffff;
  --text-primary: #fafafa;
  --text-secondary: #8f8f8f;
  --border-subtle: rgba(255, 255, 255, 0.1);

  /* Derived: neon cyan for key data and highlighted words, and the glass card fill. */
  --accent-cyan: #ffffff;
  --glass: linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.01));
  --glass-hover: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));

  /* Older names the pages and the console read, mapped onto the brand tokens. */
  --bg: var(--bg-primary);
  --bg-2: var(--bg-secondary);
  --surface: #141414;
  --surface-2: var(--bg-tertiary);
  --ink: var(--text-primary);
  /* Reading copy: a lighter silver than --text-secondary so long paragraphs stay comfortable. */
  --ink-2: #d4d4d4;
  --mute: var(--text-secondary);
  --faint: #8a8a8a;
  --line: var(--border-subtle);
  --line-2: rgba(255, 255, 255, 0.24);
  /* Accent as text, rings and small fills: the secondary blue reads at 7:1 on the black page. */
  --accent: var(--accent-secondary);
  /* Dark text on accent fills (white on #159cf5 is under 3:1). */
  --on-accent: var(--bg-primary);
  --live: #4fd8ff;
  --danger: #ff6b5b;
  --amber: #ffd166;
  /* The logo's own tile (website/build-brand.py); never recoloured. */
  --logo-bg: #090c14;
  /* Electric blue into neon cyan: step numbers, flow lines, rules. */
  --grad: linear-gradient(100deg, #ffffff, #8f8f8f);
  /* Primary buttons: deep enough under the white label to stay readable (4.9:1 on #1764e8). */
  --btn: #fafafa;

  --font-sans: Archivo, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  /* Headlines in Inter Tight, the desk's own typeface: tight, modern, the same face as the numbers. */
  --font-display: "Inter Tight", Archivo, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-num: "Inter Tight", Archivo, ui-sans-serif, system-ui, sans-serif;
  /* Older names some console rules still read. */
  --sans: var(--font-sans);
  --display: var(--font-display);
  --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  /* Headlines: Inter Tight at its own width (font-stretch is ignored by a static face). */
  --h-stretch: 100%;
  --h-weight: 700;

  /* Type scale (fluid between 375 and 1440 px). */
  --t-display: clamp(2.9rem, 1.3rem + 5.2vw, 6rem);
  --t-h1: clamp(2.3rem, 1.5rem + 3vw, 4rem);
  --t-h2: clamp(2rem, 1.25rem + 2.4vw, 3.3rem);
  --t-h3: 1.15rem;
  --t-lede: clamp(1.1rem, 1.04rem + 0.3vw, 1.25rem);
  --t-body: 1.0625rem;
  --t-small: 0.9375rem;
  --t-micro: 0.8125rem;

  /* Spacing scale. */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 24px;
  --s-6: 32px;
  --s-7: 48px;
  --s-8: 64px;
  --s-9: 96px;
  --section: clamp(88px, 4rem + 6vw, 160px);
  --gutter: clamp(16px, 4vw, 40px);
  --wrap: 1200px;
  --head-h: 68px;
  --radius: 12px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);

  /* Screens, never a device: the AMOLED panel's own corner (22 of 480 px) and the light they cast. */
  --glow-r: 4.6%;
  --glow-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12), 0 30px 80px -28px rgba(255, 255, 255, 0.12);
  --paper-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 30px 70px -30px rgba(255, 255, 255, 0.1);
}

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

html {
  scroll-behavior: smooth;
  /* Anchors land below the sticky header, with room to breathe. */
  scroll-padding-top: calc(var(--head-h) + 24px);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: var(--t-body);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

/* Ambient light behind every page: navy pools and one soft electric-blue glow that drifts very slowly.
   Fixed, so it costs nothing on scroll; painted under all content; still under reduced motion. */
body::before {
  content: "";
  position: fixed;
  inset: -20vh -20vw;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(42% 38% at 78% 8%, rgba(255, 255, 255, 0.064), transparent 70%),
    radial-gradient(40% 45% at 8% 30%, rgba(24, 24, 24, 0.55), transparent 72%),
    radial-gradient(50% 40% at 60% 100%, rgba(17, 17, 17, 0.9), transparent 70%);
  animation: ambient-drift 38s ease-in-out infinite alternate;
}

@keyframes ambient-drift {
  to {
    transform: translate3d(-4vw, 3vh, 0) scale(1.06);
  }
}

img,
svg,
video {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
}

p {
  margin: 0;
}

pre {
  max-width: 100%;
  overflow-x: auto;
}

::selection {
  background: color-mix(in srgb, var(--accent) 22%, transparent);
  color: var(--ink);
}

h1,
h2 {
  font-family: var(--font-display);
  font-stretch: var(--h-stretch);
  font-weight: var(--h-weight);
  letter-spacing: -0.035em;
  text-wrap: balance;
  margin: 0;
}

h1 {
  font-size: var(--t-h1);
  line-height: 1.02;
}

h2 {
  font-size: var(--t-h2);
  line-height: 1.06;
}

h3 {
  font-family: var(--font-display);
  font-size: var(--t-h3);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.012em;
  margin: 0;
}

/* Highlighted words in a heading: electric blue into cyan. */
.hl {
  background: linear-gradient(100deg, #ffffff, #8f8f8f);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}


.lede {
  font-size: var(--t-lede);
  line-height: 1.55;
  color: var(--ink-2);
  max-width: 40rem;
  text-wrap: pretty;
}

.num {
  font-family: var(--font-num);
  font-feature-settings: "tnum";
}

/* --- Buttons: primary, secondary, quiet ----------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  min-height: 44px;
  padding: 0 20px;
  border-radius: 10px;
  border: 0;
  background: rgba(255, 255, 255, 0.025);
  box-shadow: inset 0 0 0 1px var(--line-2);
  color: var(--ink);
  font: inherit;
  font-size: var(--t-small);
  font-weight: 560;
  line-height: 1;
  letter-spacing: 0.005em;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.18s var(--ease), box-shadow 0.18s var(--ease), color 0.18s var(--ease),
    transform 0.18s var(--ease);
}

.btn:hover {
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.26);
  background: rgba(255, 255, 255, 0.028);
}

.btn:active {
  transform: translateY(1px);
}

.btn:disabled,
.btn[aria-disabled="true"] {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.btn-primary {
  background: var(--btn);
  color: var(--on-accent);
  box-shadow: none;
}

.btn-primary:hover {
  background: #e4e4e4;
  box-shadow: none;
  transform: translateY(-1px);
}

/* Secondary is the base .btn. */
.btn-secondary {
  background: rgba(255, 255, 255, 0.025);
}

.btn-quiet {
  min-height: 0;
  padding: 6px 0;
  box-shadow: none;
  border-radius: 4px;
  background: none;
  color: var(--ink-2);
}

.btn-quiet:hover {
  box-shadow: none;
  color: var(--ink);
}

.btn-sm {
  min-height: 38px;
  padding: 0 15px;
  font-size: 0.9rem;
}

.btn-lg {
  min-height: 52px;
  padding: 0 24px;
  font-size: 1.02rem;
  border-radius: 12px;
}

.btn-block {
  width: 100%;
}

/* Quiet stays flush with the text column at every size. */
.btn-quiet.btn-sm,
.btn-quiet.btn-lg {
  min-height: 36px;
  padding: 6px 0;
}

.btn-danger {
  box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--danger) 55%, transparent);
  color: var(--danger);
}

.btn-danger:hover {
  box-shadow: inset 0 0 0 1.5px var(--danger);
  background: color-mix(in srgb, var(--danger) 8%, transparent);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s-3);
}

/* --- The logo: the approved "Cursor" mark on its own dark tile --------- */
/* website/build-brand.py draws the same geometry for every icon; the header copy is inline so the cursor can blink,
   as it does on the approved concept (docs/mockups/metrilite-logos/, card 7). */
.logo-tile {
  fill: var(--logo-bg);
}

.logo-m {
  fill: none;
  stroke: #eaf0ff;
  stroke-width: 3.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.logo-cursor {
  animation: cursor-blink 1.1s steps(1) infinite;
}

/* The same mark from assets/logo.svg (static) on its tile, for footers. */
.logo-chip {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  flex: none;
  border-radius: 22%;
  background: var(--logo-bg);
}

@keyframes cursor-blink {
  50% {
    opacity: 0;
  }
}

/* --- Header ---------------------------------------------------------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  height: var(--head-h);
  display: flex;
  align-items: center;
  gap: var(--s-5);
  padding-inline: max(var(--gutter), calc((100% - var(--wrap)) / 2 + var(--gutter)));
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  -webkit-backdrop-filter: saturate(160%) blur(16px);
  backdrop-filter: saturate(160%) blur(16px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s var(--ease), background-color 0.2s var(--ease);
}

.nav.is-scrolled,
.nav-static {
  border-bottom-color: var(--line);
}

.mark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-variation-settings: "opsz" 60;
  font-size: 1.375rem;
  font-weight: 330;
  letter-spacing: 0;
  text-decoration: none;
  border-radius: 6px;
}

.mark img {
  width: 30px;
  height: 30px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--s-1);
  margin-left: auto;
}

.nav-links a {
  padding: 8px 12px;
  border-radius: 8px;
  color: var(--mute);
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.15s var(--ease), background-color 0.15s var(--ease);
}

.nav-links a:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.032);
}

.nav-end {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  margin-left: auto;
}

.nav-links + .nav-end {
  margin-left: var(--s-3);
}

.nav-signin {
  color: var(--ink-2);
}

.nav-drawer-signin {
  display: none;
}

.nav-menu-btn {
  display: none;
  width: 40px;
  height: 40px;
  margin: 0;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex: none;
}

.nav-menu-btn span {
  position: relative;
  display: block;
  width: 16px;
  height: 1.5px;
  background: currentColor;
}

.nav-menu-btn span::before,
.nav-menu-btn span::after {
  content: "";
  position: absolute;
  left: 0;
  width: 16px;
  height: 1.5px;
  background: currentColor;
}

.nav-menu-btn span::before {
  top: -5px;
}

.nav-menu-btn span::after {
  top: 5px;
}

.nav-menu-btn[aria-expanded="true"] span {
  background: transparent;
}

.nav-menu-btn[aria-expanded="true"] span::before {
  top: 0;
  transform: rotate(45deg);
}

.nav-menu-btn[aria-expanded="true"] span::after {
  top: 0;
  transform: rotate(-45deg);
}

@media (max-width: 960px) {
  .nav-menu-btn {
    display: inline-flex;
  }

  .nav-links {
    display: none;
    /* The header's backdrop-filter makes it the containing block of this fixed drawer, so bottom: 0 would end
       the drawer at the header's own bottom edge; size it to the viewport instead. */
    position: fixed;
    z-index: 30;
    top: var(--head-h);
    right: 0;
    left: 0;
    height: calc(100vh - var(--head-h));
    height: calc(100dvh - var(--head-h));
    margin: 0;
    padding: var(--s-4) max(var(--gutter), calc((100% - var(--wrap)) / 2 + var(--gutter))) var(--s-7);
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    background: radial-gradient(80% 50% at 80% 0%, rgba(255, 255, 255, 0.048), transparent 70%), var(--bg);
    overflow: auto;
    border-top: 1px solid var(--line);
  }

  .nav-links.is-open {
    display: flex;
  }

  .nav-links a {
    padding: 14px 12px;
    font-size: 1.0625rem;
  }

  .nav-links.is-open .nav-drawer-signin {
    display: block;
    margin-top: var(--s-3);
    color: var(--ink);
  }

  .nav-links + .nav-end {
    margin-left: auto;
  }

  body.nav-locked {
    overflow: hidden;
  }}


@media (max-width: 420px) {
  .nav {
    gap: var(--s-3);
  }

  .nav-signin {
    display: none;
  }}



/* The wordmark: Archivo set wide, beside the logo tile. */
.mark {
  font-family: var(--font-display);
  font-stretch: 114%;
  font-variation-settings: normal;
  font-size: 1.32rem;
  font-weight: 640;
  letter-spacing: -0.015em;
}

.mark svg {
  width: 30px;
  height: 30px;
  flex: none;
}

/* --- Sections -------------------------------------------------------- */
.section {
  padding-block: var(--section) 0;
}

.section-head {
  display: grid;
  gap: var(--s-4);
  max-width: 48rem;
  margin-bottom: clamp(36px, 2rem + 2vw, 64px);
}

.section-head .lede {
  max-width: 36rem;
}

/* Two columns: the heading stays in view while the list scrolls past. */
.split {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: var(--s-6) 72px;
  align-items: start;
}

.split .section-head {
  position: sticky;
  top: calc(var(--head-h) + 40px);
  margin-bottom: 0;
}

.split h2 {
  font-size: clamp(1.9rem, 1.2rem + 1.7vw, 2.75rem);
}

/* A section label: small caps in the secondary blue, matching the header link it belongs to. */
.section-head .eyebrow {
  margin-bottom: calc(var(--s-1) * -1);
}

/* --- Screens: only the panel, at its own shape and size --------------- */
/* Glow is the 480 x 480 AMOLED (black, glowing); Paper is the 800 x 480 e-paper (printed white). No case, no bezel. */
.tile-glow,
.tile-paper {
  position: relative;
  overflow: hidden;
  margin: 0;
}

.tile-glow {
  aspect-ratio: 1;
  border-radius: var(--glow-r);
  background: #000;
  box-shadow: var(--glow-shadow);
}

.tile-paper {
  aspect-ratio: 800 / 480;
  border-radius: 6px;
  background: #ececE7;
  box-shadow: var(--paper-shadow);
}

.tile-glow img,
.tile-paper img {
  width: 100%;
  height: 100%;
}

/* One orchestrated moment: Glow wakes up; Paper does the black-white flash every e-paper panel makes when it
   redraws. A feed button replays the flash on Paper, as the real panel would. */
.tile-glow img.is-waking {
  animation: glow-wake 0.9s var(--ease) both;
}

.tile-paper img.is-flashing {
  animation: paper-flash 0.46s steps(1) both;
}

@keyframes glow-wake {
  from {
    opacity: 0;
    filter: brightness(2.2) blur(2px);
  }
  to {
    opacity: 1;
    filter: none;
  }
}

@keyframes paper-flash {
  0% {
    filter: invert(1);
  }
  33% {
    filter: none;
    opacity: 0.15;
  }
  66% {
    filter: invert(1);
    opacity: 1;
  }
  100% {
    filter: none;
  }
}

/* --- Hero ------------------------------------------------------------ */
/* docs/mockups/site-premium/ as approved: copy on the left, both screens on a soft stage on the right, then a
   "works with" strip, four feature cards and a horizon band. One accent, line icons, hairline cards. */
.hero {
  position: relative;
  padding-top: clamp(40px, 5vw, 96px);
  background: radial-gradient(48% 58% at 78% 34%, rgba(255, 255, 255, 0.078), transparent 70%),
    radial-gradient(30% 34% at 70% 30%, rgba(255, 255, 255, 0.04), transparent 70%),
    radial-gradient(38% 44% at 4% 6%, rgba(24, 24, 24, 0.7), transparent 70%);
}

.hero > .wrap {
  max-width: 1320px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 40px;
  align-items: center;
}

.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.028);
  color: var(--ink-2);
  font-size: 0.875rem;
  font-weight: 500;
}

.live-pill i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--live);
  box-shadow: 0 0 0 4px rgba(79, 216, 255, 0.15);
  animation: live-pulse 2.4s var(--ease) infinite;
}

@keyframes live-pulse {
  50% {
    box-shadow: 0 0 0 7px rgba(79, 216, 255, 0.04);
  }
}

.hero h1 {
  margin-top: 24px;
  font-size: clamp(2.7rem, 1.1rem + 4.4vw, 5.2rem);
  line-height: 0.98;
  letter-spacing: -0.045em;
}

.hero h1 .hl-v {
  background: linear-gradient(100deg, #ffffff, #8f8f8f);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero h1 .hl-c {
  color: var(--accent-cyan);
  text-shadow: 0 0 28px rgba(255, 255, 255, 0.225);
}

.hero .lede {
  margin-top: 24px;
}

.hero .actions {
  margin-top: 32px;
}

/* Both screens, never a device: Paper behind, Glow in front over Paper's lower-left card, light on the floor. */
.stage {
  position: relative;
  aspect-ratio: 1.45;
  margin: 0;
}

.stage .tile-paper {
  position: absolute;
  right: 0;
  top: 0;
  width: 78%;
}

.stage .tile-glow {
  position: absolute;
  left: 0;
  bottom: 6%;
  width: 34%;
  z-index: 1;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.14), 0 0 60px -10px rgba(255, 255, 255, 0.18),
    0 30px 60px -20px rgba(0, 0, 0, 0.9);
}

.stage::after {
  content: "";
  position: absolute;
  left: 6%;
  right: 2%;
  bottom: 0;
  height: 14%;
  background: radial-gradient(50% 50% at 50% 50%, rgba(255, 255, 255, 0.16), transparent 70%);
  filter: blur(8px);
}

.stage::before {
  content: "";
  position: absolute;
  left: 12%;
  right: 8%;
  bottom: 7%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0.35), transparent);
}

/* The hero's feeds: one slim segmented row under the screens. */
.feed-switch {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px;
  width: fit-content;
  max-width: 100%;
  margin: 20px auto 0;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(17, 17, 17, 0.5);
}

.feed-switch button {
  height: 32px;
  padding: 0 12px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--mute);
  font: 500 0.85rem/1 var(--font-sans);
  cursor: pointer;
  transition: color 0.15s, background-color 0.15s;
}

.feed-switch button:hover {
  color: var(--ink);
}

.feed-switch button[aria-pressed="true"] {
  background: rgba(255, 255, 255, 0.072);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
  color: var(--ink);
}

.showcase-cap {
  margin-top: 10px;
  text-align: center;
  font-size: 0.8rem;
  color: var(--faint);
}

.features {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  margin-top: 28px;
}

.feature {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--glass);
  transition: border-color 0.25s var(--ease), transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.feature:hover {
  border-color: rgba(255, 255, 255, 0.128);
  background: var(--glass-hover);
  box-shadow: 0 24px 50px -30px rgba(255, 255, 255, 0.24);
  transform: translateY(-2px);
}

.feature svg {
  width: 40px;
  height: 40px;
  padding: 9px;
  border-radius: 11px;
  border: 1px solid rgba(255, 255, 255, 0.128);
  background: rgba(255, 255, 255, 0.04);
  stroke: var(--accent-cyan);
  fill: none;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.feature h3 {
  margin-top: 18px;
  font-size: 1.05rem;
}

.feature p {
  margin-top: 6px;
  color: var(--mute);
  font-size: 0.95rem;
  line-height: 1.5;
}

.hero-band {
  position: relative;
  height: 170px;
  margin-top: 72px;
  overflow: hidden;
  text-align: center;
}

.hero-band p {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  color: var(--mute);
  font-size: 0.8rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
}

.hero-band p::before,
.hero-band p::after {
  content: "";
  width: 72px;
  height: 1px;
  background: var(--line-2);
}

.hero-band::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 64px;
  width: 160%;
  aspect-ratio: 4;
  translate: -50% 0;
  border-radius: 50%;
  border-top: 1px solid rgba(255, 255, 255, 0.22);
  background: radial-gradient(60% 40% at 50% 0%, rgba(255, 255, 255, 0.08), transparent 70%);
  -webkit-mask: linear-gradient(90deg, transparent, #000 30%, #000 70%, transparent);
  mask: linear-gradient(90deg, transparent, #000 30%, #000 70%, transparent);
}

/* --- Product pages (glow.html, paper.html) --------------------------- */
.product-hero {
  padding-block: clamp(40px, 5vw, 96px) clamp(24px, 3vw, 48px);
  background: radial-gradient(48% 58% at 78% 34%, rgba(255, 255, 255, 0.072), transparent 70%),
    radial-gradient(38% 44% at 4% 6%, rgba(24, 24, 24, 0.7), transparent 70%);
}

.product-grid {
  display: grid;
  gap: 48px;
  align-items: center;
}

.product-glow {
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
}

.product-paper {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
}

.product-glow .product-shot {
  max-width: 440px;
  justify-self: center;
  width: 100%;
}

.product-hero + .section {
  padding-top: clamp(24px, 3vw, 48px);
}

.product .preview-panel {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.eyebrow {
  color: var(--accent-secondary);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.product-hero h1 {
  margin-top: 14px;
  font-size: clamp(2.4rem, 1.2rem + 3.2vw, 4.2rem);
  line-height: 1;
  letter-spacing: -0.04em;
}

.product-hero .lede {
  margin-top: 20px;
}

.product-hero .actions {
  margin-top: 28px;
}

.model-link {
  display: inline-block;
  margin-top: 14px;
  color: var(--accent-secondary);
  font-weight: 600;
  text-decoration: none;
  transition: color 0.2s var(--ease), text-shadow 0.2s var(--ease);
}

.model-link:hover {
  color: var(--accent-cyan);
  text-shadow: 0 0 18px rgba(255, 255, 255, 0.25);
}

/* Three steps as cards (Any API): the same card as .feature, three across. */
.features-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0 0 clamp(36px, 2rem + 2vw, 56px);
  padding: 0;
  list-style: none;
}

/* Security at a glance: source -> Metrilite -> screen, with what crosses each link. */
.sec-flow {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(90px, 0.6fr) minmax(0, 1fr) minmax(90px, 0.6fr) minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  margin: 0;
  padding: clamp(20px, 3vw, 36px);
  border: 1px solid var(--line);
  border-radius: 20px;
  background: radial-gradient(60% 80% at 50% 0%, rgba(255, 255, 255, 0.056), transparent 70%), rgba(17, 17, 17, 0.35);
}

.sec-node {
  padding: 22px 16px;
  border: 1px solid var(--line-2);
  border-radius: 16px;
  background: linear-gradient(180deg, var(--bg-secondary), var(--bg));
  text-align: center;
}

.sec-node svg {
  width: 44px;
  height: 44px;
  padding: 10px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.128);
  background: rgba(255, 255, 255, 0.04);
  stroke: var(--accent-cyan);
  fill: none;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sec-node b {
  display: block;
  margin-top: 12px;
  font-size: 1.05rem;
  font-weight: 600;
}

.sec-node span {
  display: block;
  margin-top: 4px;
  color: var(--mute);
  font-size: 0.9rem;
}

.sec-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: var(--mute);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-align: center;
  text-transform: uppercase;
}

.sec-link i {
  position: relative;
  display: block;
  width: 100%;
  height: 2px;
  border-radius: 2px;
  background: var(--grad);
}

.sec-link i::after {
  content: "";
  position: absolute;
  right: 0;
  top: 50%;
  width: 9px;
  height: 9px;
  border-top: 2px solid var(--accent-cyan);
  border-right: 2px solid var(--accent-cyan);
  transform: translateY(-50%) rotate(45deg);
}

/* A dot travels each link: data moving one way, from source to screen. */
.sec-link i::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 10px var(--accent-cyan);
  transform: translateY(-50%);
  animation: sec-travel 2.6s linear infinite;
}

@keyframes sec-travel {
  from {
    left: 0;
    opacity: 0;
  }
  15% {
    opacity: 1;
  }
  85% {
    opacity: 1;
  }
  to {
    left: calc(100% - 7px);
    opacity: 0;
  }
}

#security .features {
  margin-top: 20px;
}

#security .model-link {
  margin-top: 24px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

@media (max-width: 760px) {
  .sec-flow {
    grid-template-columns: minmax(0, 1fr);
  }

  .sec-link {
    flex-direction: row;
    justify-content: center;
  }

  .sec-link i {
    order: -1;
    width: 2px;
    height: 32px;
  }

  .sec-link i::after {
    right: auto;
    top: auto;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%) rotate(135deg);
  }

  .sec-link i::before {
    display: none;
  }
}

/* --- Glow and Paper --------------------------------------------------- */
.models {
  display: grid;
  grid-template-columns: 480fr 800fr;
  gap: clamp(24px, 4vw, 56px);
  align-items: start;
}

.model h3 {
  margin: 28px 0 10px;
  font-size: 1.7rem;
  font-weight: var(--h-weight);
  letter-spacing: -0.03em;
}

.model > p {
  max-width: 30rem;
  color: var(--ink-2);
}

.model .tile-glow {
  max-width: 400px;
}

.spec {
  display: grid;
  margin: 24px 0 0;
}

.spec div {
  display: grid;
  grid-template-columns: 8.5rem minmax(0, 1fr);
  gap: var(--s-4);
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.spec dt {
  color: var(--mute);
}

.spec dd {
  margin: 0;
  font-family: var(--font-num);
  font-weight: 500;
  font-feature-settings: "tnum";
}

/* --- Rows of screens -------------------------------------------------- */
.screen-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(16px, 2vw, 28px);
  margin: 0;
  padding: 0;
  list-style: none;
}

/* Metrilite Paper gallery: three e-paper screens a row, two on tablets, one on phones. */
.paper-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(20px, 3vw, 40px) clamp(16px, 2.4vw, 32px);
  margin: 0;
  padding: 0;
  list-style: none;
}

.paper-grid .tile-paper {
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.paper-grid .tile-paper:hover {
  transform: translateY(-4px);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.14), 0 36px 80px -30px rgba(255, 255, 255, 0.24);
}

@media (max-width: 960px) {
  .paper-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .paper-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.screen-row figure,
.paper-grid figure {
  margin: 0;
}

.screen-row .tile-glow,
.audience .tile-glow {
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.screen-row .tile-glow:hover,
.audience .tile-glow:hover {
  transform: translateY(-4px);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.18), 0 36px 80px -26px rgba(255, 255, 255, 0.28);
}

.paper-grid figcaption,
.screen-row figcaption {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 6px;
  margin-top: 14px;
  font-size: 0.95rem;
  color: var(--ink-2);
}

.paper-grid figcaption b,
.screen-row figcaption b {
  font-weight: 600;
  color: var(--ink);
}

.state {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--t-micro);
  font-weight: 560;
  color: var(--live);
}

.state::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

.note-fine {
  max-width: 44rem;
  margin: 28px 0 24px;
  font-size: 0.88rem;
  color: var(--mute);
}

.note-fine + .actions {
  margin-top: var(--s-2);
}

/* The live preview: the desk's real software, running in the page (custom-preview.js). */
.preview-panel {
  margin-top: clamp(48px, 2rem + 3vw, 80px);
  padding-top: clamp(32px, 2rem + 1vw, 48px);
  border-top: 1px solid var(--line);
}

.preview-panel h3 {
  font-size: 1.7rem;
  font-weight: var(--h-weight);
  letter-spacing: -0.03em;
  margin-bottom: var(--s-3);
}

.preview-panel > p {
  max-width: 40rem;
  margin-bottom: var(--s-6);
  color: var(--ink-2);
}

/* --- Lists that read like a spec sheet -------------------------------- */
.insights {
  display: grid;
  margin: 0;
  padding: 0;
  list-style: none;
}

.insights li {
  display: grid;
  grid-template-columns: minmax(0, 15rem) minmax(0, 1fr);
  gap: 10px 32px;
  padding: 26px 0;
  border-top: 1px solid var(--line-2);
  transition: border-color 0.25s var(--ease);
}

.insights li:hover {
  border-top-color: rgba(255, 255, 255, 0.2);
}

.insights li:last-child {
  border-bottom: 1px solid var(--line-2);
}

.insights p {
  color: var(--ink-2);
}

.insights-note {
  margin-top: var(--s-5);
  font-size: var(--t-small);
  color: var(--mute);
}

.insights-note b {
  color: var(--ink);
  font-weight: 600;
}

/* --- Who it's for ----------------------------------------------------- */
.audience {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 28px;
}

.audience .tile-glow,
.audience .tile-paper {
  width: 100%;
  margin-bottom: 22px;
}

/* Where it works: six use cases, each on a Paper screen */
.audience-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  row-gap: var(--s-7);
}

.audience h3 {
  margin-bottom: 8px;
}

.audience p {
  color: var(--ink-2);
}

/* --- How it works: a real sequence, so numbered ----------------------- */
.how-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 40px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.how-steps li {
  counter-increment: step;
  padding-top: 22px;
  border-top: 2px solid;
  border-image: var(--grad) 1;
}

.how-steps li::before {
  content: counter(step);
  display: block;
  margin-bottom: 18px;
  font-family: var(--font-num);
  font-weight: 700;
  font-size: 2.6rem;
  line-height: 1;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.how-steps h3 {
  margin-bottom: 8px;
}

.how-steps p {
  color: var(--ink-2);
}

/* --- FAQ ------------------------------------------------------------- */
.faq details {
  border-top: 1px solid var(--line-2);
}

.faq details:last-child {
  border-bottom: 1px solid var(--line-2);
}

.faq summary {
  position: relative;
  padding: 22px 44px 22px 0;
  font-weight: 560;
  font-size: 1.1rem;
  list-style: none;
  cursor: pointer;
  transition: color 0.2s var(--ease);
}

.faq summary:hover::after,
.faq details[open] summary::after {
  border-color: var(--accent-secondary);
}

.faq details[open] {
  border-top-color: rgba(255, 255, 255, 0.2);
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "";
  position: absolute;
  right: 8px;
  top: 50%;
  width: 11px;
  height: 11px;
  margin-top: -8px;
  border-right: 2px solid var(--ink-2);
  border-bottom: 2px solid var(--ink-2);
  transform: rotate(45deg);
  transition: transform 0.2s var(--ease), margin-top 0.2s var(--ease);
}

.faq details[open] summary::after {
  margin-top: -2px;
  transform: rotate(225deg);
}

.faq details p {
  max-width: 40rem;
  padding-bottom: 24px;
  color: var(--ink-2);
}

.faq details p + p {
  margin-top: -12px;
}

/* --- Closing call to action ----------------------------------------- */
.cta {
  padding-block: var(--section);
}

.cta-in {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--s-5);
  padding: clamp(28px, 1rem + 4vw, 72px);
  border: 1px solid rgba(255, 255, 255, 0.112);
  border-radius: 28px;
  background: radial-gradient(60% 120% at 100% 0%, rgba(255, 255, 255, 0.096), transparent 65%),
    radial-gradient(50% 90% at 0% 100%, rgba(24, 24, 24, 0.8), transparent 70%), var(--bg-secondary);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 40px 120px -60px rgba(255, 255, 255, 0.28);
  overflow: hidden;
}

.cta h2 {
  font-size: clamp(2.4rem, 1.2rem + 4vw, 5rem);
}

.cta h2 + .lede {
  margin-top: var(--s-4);
}

/* --- Footer ---------------------------------------------------------- */
.site-foot {
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(17, 17, 17, 0.45), transparent 60%);
  color: var(--faint);
  font-size: 0.875rem;
}

.foot-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 0.55fr));
  gap: var(--s-6);
  padding-block: var(--s-8) var(--s-7);
}

.foot-brand .mark {
  color: var(--ink);
}

.foot-brand p {
  margin-top: var(--s-3);
  max-width: 28rem;
}

.foot-col h2 {
  font-family: var(--font-display);
  font-size: var(--t-small);
  font-weight: 600;
  letter-spacing: 0;
  color: var(--ink);
  margin-bottom: var(--s-4);
}

.foot-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0;
}

.foot-links a,
.foot-col a {
  color: var(--ink-2);
  text-decoration: none;
  border-radius: 4px;
  /* 44px tap target without changing the visual rhythm */
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.foot-links a:hover,
.foot-col a:hover {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.foot-base {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--s-3);
  padding-block: var(--s-5) var(--s-6);
}

/* One rule on the content edge, not across the gutters. */
.foot-base::before {
  content: "";
  position: absolute;
  top: 0;
  left: var(--gutter);
  right: var(--gutter);
  border-top: 1px solid var(--line);
}

.foot-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-5);
}

/* --- Auth pages: one layout for log in, sign up, reset, confirm ------- */
.auth-page {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.auth-side {
  display: grid;
  grid-template-rows: auto 1fr auto;
  padding: var(--s-5) var(--gutter);
  min-width: 0;
}

.auth-shell {
  display: grid;
  align-content: start;
  justify-items: center;
  padding-block: clamp(48px, 14vh, 160px) var(--s-7);
}

.auth-card {
  width: min(400px, 100%);
}

.auth-card h1 {
  font-size: clamp(2rem, 1.7rem + 1vw, 2.5rem);
  line-height: 1.1;
}

.auth-card .lede,
.auth-sub {
  margin: var(--s-3) 0 var(--s-6);
  font-size: 1rem;
  color: var(--mute);
}

.field {
  display: grid;
  gap: var(--s-2);
  margin-bottom: var(--s-5);
}

.field-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--s-3);
}

.field label,
.auth-card label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ink-2);
}

.field-row a {
  font-size: 0.875rem;
  color: var(--mute);
  text-decoration: none;
  border-radius: 4px;
}

.field-row a:hover {
  color: var(--ink);
  text-decoration: underline;
}

.input,
.auth-card input[type="email"],
.auth-card input[type="text"],
.auth-card input[type="password"] {
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid var(--line-2);
  border-radius: 10px;
  background: var(--bg-2);
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
  transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease), background-color 0.15s var(--ease);
}

.auth-card input::placeholder {
  color: var(--faint);
}

.auth-card input:hover {
  border-color: color-mix(in srgb, var(--ink) 26%, transparent);
}

.auth-card input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 28%, transparent);
  background: var(--bg);
}

.auth-card input[readonly] {
  color: var(--mute);
  background: transparent;
}

.auth-card input[aria-invalid="true"] {
  border-color: var(--danger);
}

.auth-card input[aria-invalid="true"]:focus {
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--danger) 28%, transparent);
}

.pw {
  position: relative;
}

.pw input {
  padding-right: 72px;
}

.pw-toggle {
  position: absolute;
  top: 50%;
  right: 6px;
  translate: 0 -50%;
  min-height: 34px;
  padding: 0 10px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--mute);
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
}

.pw-toggle:hover {
  color: var(--ink);
  background: color-mix(in srgb, var(--ink) 6%, transparent);
}

.field-hint,
.field-err {
  font-size: 0.8125rem;
  line-height: 1.45;
  color: var(--faint);
}

.field-err {
  color: var(--danger);
}

.field-err:empty {
  display: none;
}

.auth-err {
  margin: 0 0 var(--s-5);
  padding: 12px 14px;
  border: 1px solid color-mix(in srgb, var(--danger) 40%, transparent);
  border-radius: 10px;
  background: color-mix(in srgb, var(--danger) 8%, transparent);
  color: var(--danger);
  font-size: 0.875rem;
}

.auth-err:empty {
  display: none;
}

.auth-note {
  margin-top: var(--s-4);
  font-size: 0.875rem;
  color: var(--live);
}

.auth-note:empty {
  display: none;
}

.auth-card .btn-primary {
  margin-top: var(--s-2);
}

.auth-card .alt {
  margin-top: var(--s-5);
  text-align: center;
  font-size: 0.9375rem;
  color: var(--mute);
}

.auth-card .alt a,
.auth-card .link-btn,
.consent a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--line-2);
  text-underline-offset: 3px;
}

.auth-card .alt a:hover,
.auth-card .link-btn:hover,
.consent a:hover {
  text-decoration-color: var(--ink);
}

.auth-card label.consent {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin: 0 0 var(--s-5);
  font-weight: 400;
  color: var(--mute);
  line-height: 1.5;
  cursor: pointer;
}

.auth-card label.consent input {
  flex: none;
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
  accent-color: var(--accent);
}

.auth-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-4);
  min-height: 44px;
}

.auth-side .site-foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--s-3);
  padding-top: var(--s-5);
  font-size: 0.8125rem;
}

.consent-err {
  margin: calc(var(--s-4) * -1) 0 var(--s-5);
}

.auth-art {
  position: relative;
  display: grid;
  align-content: center;
  justify-items: center;
  padding: var(--s-7) var(--gutter);
  background: radial-gradient(60% 50% at 60% 40%, rgba(255, 255, 255, 0.09), transparent 70%),
    linear-gradient(180deg, var(--bg-secondary), var(--bg));
  border-left: 1px solid var(--line);
  overflow: hidden;
}

/* The two screens, Paper behind and Glow in front, showing the same feed. */
.auth-screens {
  display: grid;
  width: min(100%, 460px);
}

.auth-screens .tile-glow {
  width: 56%;
  justify-self: end;
  margin: -16% -3% 0 0;
}

.auth-art-line {
  position: relative;
  z-index: 1;
  margin-top: var(--s-6);
  max-width: 24rem;
  text-align: center;
  color: var(--mute);
  font-size: var(--t-small);
}

@media (max-width: 900px) {
  .auth-page {
    grid-template-columns: 1fr;
  }

  .auth-art {
    display: none;
  }
}

/* --- 404 ------------------------------------------------------------- */
.notfound {
  min-height: calc(100vh - var(--head-h) - 200px);
  display: grid;
  align-content: center;
  padding-block: var(--section);
}

.notfound-code {
  font-family: var(--font-display);
  font-variation-settings: "opsz" 40;
  font-size: clamp(5rem, 3rem + 9vw, 10rem);
  line-height: 0.9;
  letter-spacing: -0.04em;
  background: linear-gradient(180deg, #2a2a2a, var(--bg-tertiary));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: var(--s-4);
  font-variant-numeric: lining-nums;
}

.notfound .lede {
  margin-top: var(--s-4);
}

.notfound .actions {
  margin-top: var(--s-6);
}

/* --- Legal pages ----------------------------------------------------- */
.legal {
  padding-block: clamp(48px, 7vw, 104px) var(--section);
}

.legal-grid {
  display: grid;
  grid-template-columns: minmax(0, 220px) minmax(0, 1fr);
  gap: clamp(32px, 6vw, 96px);
  align-items: start;
}

.legal-toc {
  position: sticky;
  top: calc(var(--head-h) + 32px);
  font-size: 0.875rem;
}

.legal-toc-title {
  font-size: var(--t-small);
  font-weight: 600;
  color: var(--faint);
  margin-bottom: var(--s-4);
}

.legal-toc ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 2px;
  border-left: 1px solid var(--line-2);
}

.legal-toc a {
  display: block;
  padding: 5px 0 5px 14px;
  margin-left: -1px;
  border-left: 1px solid transparent;
  color: var(--mute);
  text-decoration: none;
}

.legal-toc a:hover {
  color: var(--ink);
  border-left-color: var(--ink-2);
}

.legal article {
  max-width: 42rem;
}

.legal h1 {
  font-size: clamp(2.5rem, 1.9rem + 2vw, 3.5rem);
}

.legal-meta {
  margin-top: var(--s-4);
  color: var(--faint);
  font-size: var(--t-small);
  font-variant-numeric: tabular-nums;
}

.legal-draft {
  margin: var(--s-6) 0 var(--s-2);
  padding: 14px 16px;
  border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
  border-radius: 10px;
  background: color-mix(in srgb, var(--accent) 6%, transparent);
  color: var(--ink-2);
  font-size: var(--t-small);
}

.legal section {
  padding-top: var(--s-7);
}

.legal h2 {
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.3;
  margin-bottom: var(--s-4);
}

.legal section p {
  color: var(--ink-2);
  line-height: 1.7;
}

.legal section p + p {
  margin-top: var(--s-3);
}

.legal a {
  color: var(--ink);
  text-underline-offset: 3px;
}

/* --- Responsive ------------------------------------------------------ */
@media (max-width: 960px) {
  .hero-grid,
  .product-glow,
  .product-paper,
  .split {
    grid-template-columns: minmax(0, 1fr);
  }

  .features {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .features-3 {
    grid-template-columns: minmax(0, 1fr);
  }

  .split .section-head {
    position: static;
    margin-bottom: var(--s-6);
  }

  .screen-row,
  .audience {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: var(--s-7);
  }

  .models {
    grid-template-columns: minmax(0, 1fr);
    row-gap: var(--s-8);
  }

  .model .tile-glow {
    max-width: 320px;
  }

  .foot-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .foot-brand {
    grid-column: 1 / -1;
  }

  .legal-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .legal-toc {
    display: none;
  }
}

@media (max-width: 640px) {
  .features,
  .audience-3 {
    grid-template-columns: minmax(0, 1fr);
  }


  .how-steps {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
  }

  .insights li {
    grid-template-columns: minmax(0, 1fr);
  }

  .spec div {
    grid-template-columns: 6.5rem minmax(0, 1fr);
  }

  .foot-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero .actions,
  .cta .actions {
    width: 100%;
  }

  .hero .actions .btn,
  .cta .actions .btn {
    flex: 1 1 auto;
  }
}

/* --- Accessibility --------------------------------------------------- */
/* Visible keyboard focus on every interactive element (WCAG 2.4.7). */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.auth-card input:focus-visible {
  outline: none;
}

/* Skip link: hidden until focused. */
.skip-link {
  position: absolute;
  left: 12px;
  top: -64px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 8px;
  background: var(--ink);
  color: var(--bg);
  font-weight: 500;
  text-decoration: none;
  transition: top 0.15s var(--ease);
}

.skip-link:focus {
  top: 12px;
}

/* The skip target takes focus so the next Tab starts in the content; no ring on it. */
main[tabindex="-1"]:focus {
  outline: none;
}



@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }

  .logo-cursor,
  .tile-glow img.is-waking,
  .tile-paper img.is-flashing,
  .live-pill i,
  body::before {
    animation: none !important;
  }

  .feature:hover,
  .btn-primary:hover,
  .screen-row .tile-glow:hover,
  .audience .tile-glow:hover,
  .paper-grid .tile-paper:hover {
    transform: none;
  }
}


.hidden {
  display: none !important;
}

.link-btn {
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: none;
  color: inherit;
  font: inherit;
  text-decoration: underline;
  cursor: pointer;
}

/* --- W-custom: console wizard (matches mockup console-*.png) ----------- */
.cu-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 22px;
  font-size: 14px;
  color: var(--faint);
}

.cu-step {
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
}

.cu-step.done {
  color: var(--live);
  border-color: color-mix(in srgb, var(--live) 30%, transparent);
}

.cu-step.on {
  color: var(--on-accent);
  background: var(--accent);
  border-color: var(--accent);
  font-weight: 600;
}

.cu-cols {
  display: grid;
  grid-template-columns: minmax(260px, 340px) 1fr;
  gap: 22px;
  margin: 16px 0;
}

.cu-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 16px;
}

.cu-card-title {
  font: 500 16px var(--sans);
  margin: 0 0 8px;
}

.cu-src {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
  font-size: 13px;
  color: var(--mute);
}

.cu-pill {
  color: var(--live);
  border: 1px solid color-mix(in srgb, var(--live) 35%, transparent);
  border-radius: 999px;
  padding: 2px 10px;
  font-size: 12px;
}

.cu-tree {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 13px;
  font-family: var(--mono);
}

.cu-tree li {
  margin: 2px 0;
}

.cu-leaf {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.cu-leaf .k {
  color: var(--ink);
}

.cu-leaf .v {
  margin-left: auto;
  color: var(--faint);
  font-size: 12px;
}

.cu-leaf .lab {
  background: var(--accent);
  color: var(--on-accent);
  border-radius: 999px;
  padding: 1px 8px;
  font-size: 11px;
  font-weight: 600;
  font-family: var(--sans);
}

.cu-obj {
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 4px;
}

.cu-obj .sp {
  color: var(--mute);
  width: 1em;
}

.cu-count-row {
  display: flex;
  justify-content: space-between;
  margin-top: 12px;
  font-size: 13px;
  color: var(--mute);
}

.cu-meter-track {
  height: 4px;
  background: var(--surface-2);
  border-radius: 999px;
  margin-top: 6px;
  overflow: hidden;
}

.cu-meter-track > i {
  display: block;
  height: 100%;
  width: 0;
  background: var(--accent);
}

.cu-color-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.cu-color { width: 40px; height: 32px; padding: 0; border: 1px solid var(--line); border-radius: 8px; background: none; cursor: pointer; }
.cu-color.is-auto { opacity: 0.45; }
.cu-swatches { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.cu-swatch { width: 22px; height: 22px; padding: 0; border-radius: 50%; border: 2px solid transparent; cursor: pointer; }
.cu-swatch.is-on { border-color: var(--ink); box-shadow: 0 0 0 2px var(--surface) inset; }
.cu-swatch:focus-visible, .cu-color:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.cu-pick-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 12px;
  background: var(--surface-2);
}

.cu-pick-head {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
  font-size: 12px;
  color: var(--mute);
}

.cu-star {
  border: 0;
  background: transparent;
  color: var(--faint);
  cursor: pointer;
  font-size: 18px;
  padding: 0 4px;
}

.cu-star.is-on {
  color: var(--accent);
}

.cu-pick-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
}

/* "This is spend" shows on currency fields only (app.custom.js sets hidden); hidden must win over flex. */
.cu-spend-row[hidden] {
  display: none;
}

.cu-keep {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 13px;
  margin: 8px 0;
  color: var(--mute);
}

.cu-intervals {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 16px 0;
}

.cu-iv {
  border: 1px solid var(--line);
  background: var(--surface);
  color: inherit;
  border-radius: 999px;
  padding: 8px 14px;
  cursor: pointer;
  font: 600 14px var(--sans);
}

.cu-iv.is-on {
  background: var(--accent);
  color: var(--on-accent);
  border-color: var(--accent);
}

.cu-desks {
  margin: 12px 0 20px;
  padding-left: 1.2em;
  color: var(--mute);
}

@media (max-width: 900px) {
  .cu-cols {
    grid-template-columns: 1fr;
  }}

/* --- W-preview: custom feed desk preview (real WASM paint) ----------- */
.cf-preview {
  margin-top: var(--s-6);
}

.cf-toolbar {
  margin-bottom: 16px;
}

/* Sample feeds: one calm segmented row, like the hero's feed buttons. */
.cf-samples {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  max-width: 100%;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(17, 17, 17, 0.5);
}

.cf-sample-btn {
  font: 500 0.9rem var(--sans);
  padding: 8px 14px;
  border-radius: 8px;
  border: 0;
  background: transparent;
  color: var(--mute);
  cursor: pointer;
  transition: color 0.15s, background-color 0.15s;
}

.cf-sample-btn:hover {
  color: var(--ink);
}

.cf-sample-btn.is-on {
  background: rgba(255, 255, 255, 0.072);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
  color: var(--ink);
}

.cf-tpls {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 22px;
}

.cf-tpl {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px;
  text-align: left;
  color: inherit;
  cursor: pointer;
  font: inherit;
}

.cf-tpl-thumb {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 10px;
  display: block;
  margin-bottom: 8px;
  background: #000;
}

.cf-tpl b {
  font-size: 14px;
  font-weight: 600;
}

.cf-tpl span {
  display: block;
  font-size: 12px;
  color: var(--mute);
  margin-top: 2px;
}

.cf-tpl:hover {
  border-color: var(--line-2);
}

.cf-tpl.is-on {
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.04);
}

/* .cf-tpl span (the blurb) would make the badge a full-width grey block; keep it a small pill. */
.cf-tpl .cf-rec {
  display: inline-block;
  margin-top: 0;
  font-size: 11px;
  color: var(--accent-cyan);
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  padding: 0 7px;
  margin-left: 6px;
  font-weight: 600;
  vertical-align: 1px;
}

/* Screen and its controls side by side: a fixed screen column (the canvas's own pixel width must not size it). */
.cf-stage {
  display: grid;
  grid-template-columns: minmax(0, 420px) minmax(0, 1fr);
  gap: clamp(28px, 4vw, 64px);
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: clamp(20px, 3vw, 36px);
  background: radial-gradient(60% 80% at 25% 40%, rgba(255, 255, 255, 0.056), transparent 70%), rgba(17, 17, 17, 0.35);
}

.cf-device-col {
  min-width: 0;
}

.cf-device {
  width: 100%;
}

.cf-big {
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  border-radius: var(--glow-r);
  display: block;
  background: #000;
  box-shadow: var(--glow-shadow);
}

.cf-pager {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  color: var(--mute);
  font-size: 13px;
}

.cf-pager button {
  border: 0;
  background: transparent;
  color: inherit;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  padding: 4px 10px;
}

.cf-side {
  max-width: 30rem;
}

.cf-side-title {
  font: 700 1.75rem/1.1 var(--display);
  letter-spacing: -0.03em;
  margin: 0 0 12px;
}

.cf-side-desc {
  color: var(--ink-2);
  margin: 0 0 22px;
  font-size: 1rem;
  line-height: 1.6;
}

.cf-accent-label {
  font-size: 13px;
  color: var(--mute);
}

.cf-swatches {
  display: flex;
  gap: 10px;
  margin: 6px 0 18px;
}

.cf-swatch {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2px solid transparent;
  padding: 0;
  cursor: pointer;
}

.cf-swatch.is-on {
  border-color: var(--ink);
  outline: 2px solid var(--bg);
  outline-offset: -4px;
}

.cf-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.cf-note {
  font-size: 13px;
  color: var(--faint);
  margin-top: 14px;
}

@media (max-width: 960px) {
  .cf-tpls {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cf-stage {
    grid-template-columns: minmax(0, 1fr);
    padding: 18px;
  }

  .cf-device-col {
    max-width: 420px;
  }
}


@media (max-width: 420px) {
  .cf-tpls {
    grid-template-columns: minmax(0, 1fr);
  }}

