/* Top C website. Tokens come from mobile/DESIGN.md; see site/DESIGN.md for how they map to the page. */

@font-face { font-family: "Space Grotesk"; src: url("../fonts/space-grotesk-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Space Grotesk"; src: url("../fonts/space-grotesk-500.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Space Grotesk"; src: url("../fonts/space-grotesk-600.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Space Grotesk"; src: url("../fonts/space-grotesk-700.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Manrope"; src: url("../fonts/manrope-500.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Manrope"; src: url("../fonts/manrope-600.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Manrope"; src: url("../fonts/manrope-700.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Manrope"; src: url("../fonts/manrope-800.woff2") format("woff2"); font-weight: 800; font-style: normal; font-display: swap; }

/* ---------- Themes ---------- */

/* Acid: the default. Night gallery black, acid lime, Space Grotesk. */
:root {
  color-scheme: dark;
  --bg: #0B0B0D;
  --surface: #141418;
  --card: #1A1A1F;
  --card-hi: #22222A;
  --text: #FFFFFF;
  --dim: rgba(255, 255, 255, 0.65);
  --faint: rgba(255, 255, 255, 0.55);
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.20);
  --control: rgba(255, 255, 255, 0.40);
  --accent: #D6FF3A;          /* accent as colour on a fact */
  --accent-fill: #D6FF3A;     /* the one fill */
  --accent-ink: #0B0B0D;      /* label on the fill */
  --accent-tint: rgba(214, 255, 58, 0.14);
  --glow: none;
  --frame-edge: rgba(255, 255, 255, 0.22);
  --frame-shadow: none;
  --font: "Space Grotesk", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --w-body: 400;
  --w-strong: 600;
  --w-head: 600;
  --w-display: 600;
  --track-head: -0.03em;
}

/* Coral: cream wall, flame fill, brick text, Manrope one weight step heavier. */
@media (prefers-color-scheme: light) {
  :root:not([data-theme="acid"]) {
    color-scheme: light;
    --bg: #F4F0E9;
    --surface: #FBF8F2;
    --card: #FFFFFF;
    --card-hi: #EFE9DF;
    --text: #15110D;
    --dim: rgba(21, 17, 13, 0.72);
    --faint: rgba(21, 17, 13, 0.64);
    --line: rgba(21, 17, 13, 0.08);
    --line-strong: rgba(21, 17, 13, 0.18);
    --control: rgba(21, 17, 13, 0.50);
    --accent: #C8361A;
    --accent-fill: #FF4E2C;
    --accent-ink: #15110D;
    --accent-tint: rgba(255, 78, 44, 0.12);
    --glow: none;
    --frame-edge: rgba(21, 17, 13, 0.10);
    --frame-shadow: 0 16px 40px -12px rgba(21, 17, 13, 0.28);
    --font: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --w-body: 500;
    --w-strong: 700;
    --w-head: 800;
    --w-display: 800;
    --track-head: -0.035em;
  }
  :root:not([data-theme="acid"]) .shot--acid { display: none; }
  :root:not([data-theme="acid"]) .shot--coral { display: block; }
}
:root[data-theme="coral"] {
  color-scheme: light;
  --bg: #F4F0E9;
  --surface: #FBF8F2;
  --card: #FFFFFF;
  --card-hi: #EFE9DF;
  --text: #15110D;
  --dim: rgba(21, 17, 13, 0.72);
  --faint: rgba(21, 17, 13, 0.64);
  --line: rgba(21, 17, 13, 0.08);
  --line-strong: rgba(21, 17, 13, 0.18);
  --control: rgba(21, 17, 13, 0.50);
  --accent: #C8361A;
  --accent-fill: #FF4E2C;
  --accent-ink: #15110D;
  --accent-tint: rgba(255, 78, 44, 0.12);
  --glow: none;
  --frame-edge: rgba(21, 17, 13, 0.10);
  --frame-shadow: 0 16px 40px -12px rgba(21, 17, 13, 0.28);
  --font: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --w-body: 500;
  --w-strong: 700;
  --w-head: 800;
  --w-display: 800;
  --track-head: -0.035em;
}
:root[data-theme="coral"] .shot--acid { display: none; }
:root[data-theme="coral"] .shot--coral { display: block; }

/* ---------- Base ---------- */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: 24px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-weight: var(--w-body);
  font-size: 17px;
  line-height: 1.55;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

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

[hidden] { display: none !important; }

h1, h2, h3 {
  margin: 0;
  font-weight: var(--w-head);
  letter-spacing: var(--track-head);
  line-height: 1.05;
  text-wrap: balance;
}

p { margin: 0; text-wrap: pretty; }

strong, b { font-weight: var(--w-strong); }

a {
  color: inherit;
  text-decoration-line: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  text-decoration-color: var(--control);
  transition: color 150ms ease-out, text-decoration-color 150ms ease-out;
}
a:hover { color: var(--accent); text-decoration-color: currentColor; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

::selection { background: var(--accent-fill); color: var(--accent-ink); }

.tnum { font-variant-numeric: tabular-nums; }

.skip {
  position: absolute;
  left: 16px;
  top: -100px;
  z-index: 10;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--text);
  color: var(--bg);
  font-weight: var(--w-strong);
  text-decoration: none;
}
.skip:focus { top: 12px; }
.skip:hover { color: var(--bg); }

.wrap {
  width: 100%;
  max-width: 1240px;
  margin-inline: auto;
  padding-inline: 16px;
}
@media (min-width: 768px) { .wrap { padding-inline: 32px; } }

/* ---------- Header ---------- */

.site-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 72px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  font-size: 20px;
  font-weight: var(--w-head);
  letter-spacing: -0.02em;
  text-decoration: none;
}
.brand:hover { color: inherit; }
.brand svg { width: 22px; height: 22px; flex: none; }
.brand .mark-bar { fill: currentColor; }

.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 16px 0 12px;
  border: 1px solid var(--control);
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 15px;
  font-weight: var(--w-strong);
  cursor: pointer;
  transition: background-color 150ms ease-out;
}
.theme-toggle:hover { background: var(--card-hi); }
.theme-toggle[hidden] { display: none; }
.theme-toggle .swatch {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
}
/* The swatch previews the theme the button switches to. */
.theme-toggle .swatch { background: #FF4E2C; box-shadow: inset 0 0 0 4px #F4F0E9; }
:root[data-theme="coral"] .theme-toggle .swatch { background: #D6FF3A; box-shadow: inset 0 0 0 4px #0B0B0D; }
@media (prefers-color-scheme: light) {
  :root:not([data-theme="acid"]) .theme-toggle .swatch { background: #D6FF3A; box-shadow: inset 0 0 0 4px #0B0B0D; }
}

/* ---------- The Play link: the one accent fill ---------- */

.play {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 26px;
  border-radius: 999px;
  background: var(--accent-fill);
  color: var(--accent-ink);
  box-shadow: var(--glow);
  font-size: 17px;
  font-weight: var(--w-head);
  letter-spacing: -0.01em;
  text-decoration: none;
  transition: opacity 150ms ease-out;
}
.play[hidden] { display: none; }
.play:hover { color: var(--accent-ink); opacity: 0.88; }
.play svg { width: 18px; height: 18px; flex: none; }
.play:focus-visible { outline-color: var(--text); }

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

/* ---------- Phone frame (an exhibit; the same in both themes) ---------- */

.phone {
  position: relative;
  width: var(--pw, 280px);
  padding: 9px;
  border-radius: calc(var(--pw, 280px) * 0.15);
  background: #15110D;
  box-shadow: 0 0 0 1px var(--frame-edge), var(--frame-shadow);
}
.phone img {
  width: 100%;
  border-radius: calc(var(--pw, 280px) * 0.15 - 9px);
  background: #FBF8F2;
}
.shot--coral { display: none; }

/* A phone sunk into the case edge: its screen is cropped, so the frame ends at a rule. */
.phone--cut {
  padding-bottom: 0;
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}
.phone--cut img { border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
.cut-edge {
  position: relative;
  padding-bottom: 0;
  border-bottom: 1px solid var(--line-strong);
}

.exhibit { margin: 0; position: relative; z-index: 1; }
.exhibit figcaption {
  margin-top: 16px;
  max-width: 34ch;
  color: var(--faint);
  font-size: 14px;
  line-height: 1.45;
}

/* ---------- Numerals: the page's ledger ---------- */

.num {
  color: var(--accent);
  font-weight: var(--w-display);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.04em;
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  display: grid;
  gap: 40px;
  padding-top: 24px;
  padding-bottom: clamp(72px, 12vw, 160px);
}

.hero h1 { font-size: clamp(34px, 9.4vw, 60px); line-height: 1.02; }
.hero h1 .num {
  display: block;
  font-size: clamp(150px, 60vw, 260px);
  line-height: 0.74;
  margin: 0 0 0.12em -0.06em;
}
.hero .lede {
  margin-top: 20px;
  max-width: 34ch;
  color: var(--dim);
  font-size: clamp(18px, 2vw, 21px);
  line-height: 1.45;
}
.hero .cta { margin-top: 28px; }

.hero .exhibit { --pw: min(76vw, 300px); justify-self: center; }

@media (min-width: 960px) {
  .hero {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-areas: "copy exhibit";
    align-items: center;
    gap: 48px;
    min-height: calc(100svh - 72px);
    padding-top: 8px;
    padding-bottom: 64px;
  }
  .hero-copy { grid-area: copy; }
  .hero .exhibit { grid-area: exhibit; --pw: clamp(250px, min(21vw, 37svh), 330px); justify-self: end; margin-right: 0; }
  .hero h1 { font-size: clamp(44px, 4.6vw, 72px); }
  /* The numeral stands in the copy column, above the sentence it starts; the phone is on the other side. */
  .hero h1 .num { font-size: clamp(200px, min(20vw, 34svh), 300px); }
  .hero h1 .rest { display: block; }
}

/* ---------- Ledger sections ---------- */

.ledger {
  position: relative;
  display: grid;
  gap: 40px;
  padding-block: clamp(72px, 12vw, 160px);
  border-top: 1px solid var(--line);
}

.ledger h2 { font-size: clamp(32px, 8.6vw, 56px); }
.ledger h2 .num {
  display: block;
  font-size: clamp(112px, 36vw, 168px);
  line-height: 0.78;
  margin: 0 0 0.1em -0.05em;
}
.ledger-copy > p { margin-top: 20px; max-width: 40ch; color: var(--dim); font-size: 18px; }
.ledger-copy > p strong { color: var(--text); }

.facts {
  list-style: none;
  margin: 28px 0 0;
  padding: 0;
  max-width: 44ch;
  border-top: 1px solid var(--line-strong);
}
.facts li {
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  font-size: 16px;
  line-height: 1.45;
}
.facts li strong { display: block; }
.facts li span { color: var(--dim); }

.ledger .exhibit { --pw: min(72vw, 290px); justify-self: center; }

.pair { display: flex; align-items: flex-start; justify-content: center; }
.pair .phone + .phone { margin-left: -18%; margin-top: 18%; }
.pair { --pw: min(46vw, 250px); }

@media (min-width: 960px) {
  .ledger {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-areas: "copy exhibit";
    align-items: center;
    gap: 64px;
  }
  .ledger--flip { grid-template-areas: "exhibit copy"; }
  .ledger-copy { grid-area: copy; }
  .ledger .exhibit { grid-area: exhibit; --pw: clamp(250px, 22vw, 310px); }
  .ledger h2 { font-size: clamp(40px, 4vw, 60px); }
  .ledger h2 .rest { display: block; }

  /* In a numbered section the count stands above its headline, in the copy column; the phone is on the other side. */
  .ledger--num { --nfs: clamp(170px, 16vw, 230px); }
  .ledger--num2 { --nfs: clamp(150px, 14vw, 200px); }
  .ledger--num h2 .num { font-size: var(--nfs); }
  .pair { --pw: clamp(220px, 18vw, 270px); justify-content: flex-end; }
}

.kicker { margin: 0 0 12px; color: var(--faint); font-size: 15px; font-weight: var(--w-strong); }

/* ---------- Text sections ---------- */

.plain {
  padding-block: clamp(72px, 12vw, 160px);
  border-top: 1px solid var(--line);
}
.plain h2 { font-size: clamp(32px, 7vw, 64px); max-width: 16ch; }
.plain .intro { margin-top: 20px; max-width: 46ch; color: var(--dim); font-size: 18px; }

.rows {
  list-style: none;
  margin: 40px 0 0;
  padding: 0;
  border-top: 1px solid var(--line-strong);
}
.rows li {
  display: grid;
  gap: 4px 32px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}
.rows li strong { font-size: 19px; letter-spacing: -0.01em; }
.rows li span { color: var(--dim); max-width: 52ch; }
@media (min-width: 768px) {
  .rows li { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: baseline; }
}

.later {
  display: grid;
  gap: 0;
  margin: 40px 0 0;
  border-top: 1px solid var(--line-strong);
}
.later div { padding: 20px 0; border-bottom: 1px solid var(--line); }
.later dt { font-size: 19px; font-weight: var(--w-head); letter-spacing: -0.01em; }
.later dd { margin: 6px 0 0; color: var(--dim); max-width: 36ch; }
@media (min-width: 768px) {
  .later { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 32px; }
}
@media (min-width: 1100px) {
  .later { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .later div { border-bottom: 0; }
}

.tag {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 10px;
  border: 1px solid var(--control);
  border-radius: 999px;
  color: var(--dim);
  font-size: 12px;
  font-weight: var(--w-strong);
  letter-spacing: 0.04em;
  vertical-align: 0.35em;
}

/* ---------- Close ---------- */

.close {
  padding-block: clamp(96px, 16vw, 200px);
  border-top: 1px solid var(--line);
}
.close h2 { font-size: clamp(38px, 8vw, 96px); max-width: 14ch; }
.close h2 .accent { color: var(--accent); }
.close .cta { margin-top: 36px; }

/* A second action beside the Play link: an outline pill, never a second fill. */
.ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 52px;
  padding: 0 24px;
  border: 1px solid var(--control);
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 17px;
  font-weight: var(--w-strong);
  letter-spacing: -0.01em;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 150ms ease-out;
}
.ghost:hover { color: var(--text); background: var(--card-hi); }
.ghost svg { width: 18px; height: 18px; flex: none; }
.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }

/* The hero's quiet way to the closet check. */
.hero-check { margin-top: 20px; max-width: 40ch; font-size: 16px; line-height: 1.45; }
.hero-check a { font-weight: var(--w-strong); }

/* ---------- Doubts (home FAQ) ---------- */

.doubts {
  margin: 40px 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line-strong);
}
.doubts li {
  display: grid;
  gap: 8px 32px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}
.doubts h3 { font-size: 21px; line-height: 1.25; letter-spacing: -0.015em; max-width: 26ch; }
.doubts p { color: var(--dim); max-width: 52ch; }
.doubts p strong { color: var(--text); }
@media (min-width: 768px) {
  .doubts li { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: baseline; }
}

/* ---------- Closet check (check.html) ---------- */

.tool { padding-block: 32px clamp(72px, 10vw, 128px); }
.tool-head h1 { font-size: clamp(38px, 8.4vw, 76px); max-width: 15ch; }
.tool-head .intro { margin-top: 20px; max-width: 52ch; color: var(--dim); font-size: 18px; }

.tool-grid { display: grid; gap: 56px; margin-top: 48px; }
@media (min-width: 1024px) {
  .tool-grid { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 64px; align-items: start; }
  .result { position: sticky; top: 24px; }
}

.tool h2.step { font-size: clamp(24px, 4.4vw, 32px); line-height: 1.15; }
.tool .hint { margin-top: 8px; color: var(--faint); font-size: 15px; max-width: 52ch; }

.settings { display: flex; flex-wrap: wrap; gap: 16px 24px; margin-top: 24px; }

.field { display: grid; gap: 6px; min-width: 0; }
.field > span { color: var(--dim); font-size: 14px; font-weight: var(--w-strong); }
.field .opt { color: var(--faint); font-weight: var(--w-body); }
.field input,
.field select {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid var(--control);
  border-radius: 12px;
  background: var(--card);
  color: var(--text);
  font: inherit;
  font-size: 17px;
  caret-color: var(--accent);
  transition: border-color 150ms ease-out;
}
.field input::placeholder { color: var(--faint); opacity: 1; }
.field input:hover, .field select:hover { border-color: var(--text); }
.field input:focus-visible, .field select:focus-visible { outline-offset: 2px; border-color: var(--accent); }
.field input[inputmode="decimal"] { font-variant-numeric: tabular-nums; }
.field input[aria-invalid="true"] { border-color: var(--accent); border-style: dashed; }
.field .err { color: var(--text); font-size: 13px; }
.field .err[hidden] { display: none; }

.select { position: relative; }
.select select { appearance: none; -webkit-appearance: none; padding-right: 40px; cursor: pointer; }
.select::after {
  content: "";
  position: absolute;
  right: 18px;
  top: 50%;
  width: 8px;
  height: 8px;
  margin-top: -6px;
  border-right: 2px solid var(--dim);
  border-bottom: 2px solid var(--dim);
  transform: rotate(45deg);
  pointer-events: none;
}
.settings .field { width: min(100%, 220px); }

.pieces { margin: 24px 0 0; padding: 0; list-style: none; border-top: 1px solid var(--line-strong); counter-reset: piece; }
.piece {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 44px;
  grid-template-areas: "name name remove" "price wears .";
  gap: 12px;
  align-items: start;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}
.piece .f-name { grid-area: name; }
.piece .f-price { grid-area: price; }
.piece .f-wears { grid-area: wears; }
.piece .remove { grid-area: remove; margin-top: 28px; } /* level with the inputs, under their 22px labels */
@media (min-width: 640px) {
  .piece {
    grid-template-columns: minmax(0, 5fr) minmax(0, 3fr) minmax(0, 3fr) 44px;
    grid-template-areas: "name price wears remove";
  }
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 48px;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--dim);
  cursor: pointer;
  transition: background-color 150ms ease-out, color 150ms ease-out;
}
.icon-btn:hover { background: var(--card-hi); color: var(--text); }
.icon-btn svg { width: 20px; height: 20px; }
.icon-btn:disabled { opacity: 0.35; cursor: not-allowed; }
.icon-btn:disabled:hover { background: transparent; color: var(--dim); }

.list-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-top: 24px; }
.list-actions .ghost { min-height: 48px; font-size: 16px; }
.text-btn {
  min-height: 44px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--dim);
  font: inherit;
  font-size: 15px;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  text-decoration-color: var(--control);
  cursor: pointer;
}
.text-btn:hover { color: var(--accent); text-decoration-color: currentColor; }
.list-actions .limit { color: var(--faint); font-size: 14px; }

/* One-line running answer above the list, for screens where the answer box is below it. */
.runline {
  position: sticky;
  top: 0;
  z-index: 2;
  margin: 16px 0 0;
  padding: 12px 0;
  background: var(--bg);
  border-bottom: 1px solid var(--line-strong);
  color: var(--text);
  font-size: 16px;
  font-weight: var(--w-strong);
  font-variant-numeric: tabular-nums;
}
@media (min-width: 1024px) { .runline { display: none; } }

/* The answer: one true share at display size, then the plain facts. */
.result { padding-top: 32px; border-top: 1px solid var(--line-strong); }
@media (min-width: 1024px) { .result { padding-top: 0; border-top: 0; } }
.result .empty { color: var(--dim); font-size: 18px; max-width: 36ch; }
.result .share { margin: 0; font-size: clamp(30px, 6vw, 40px); font-weight: var(--w-head); letter-spacing: var(--track-head); line-height: 1.08; text-wrap: balance; }
.result .share .num {
  display: block;
  font-size: clamp(112px, 34vw, 184px);
  line-height: 0.78;
  margin: 0 0 0.14em -0.05em;
}
.result .facts { max-width: none; }
.result .facts li { display: flex; justify-content: space-between; gap: 16px; align-items: baseline; }
.result .facts li strong { display: inline; }
.result .facts li span { text-align: right; font-variant-numeric: tabular-nums; }
.result .facts li span b { color: var(--text); }

.ranked { margin-top: 32px; }
.ranked ol { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line-strong); }
.ranked h3 { font-size: 15px; color: var(--faint); font-weight: var(--w-strong); letter-spacing: 0; margin-bottom: 8px; }
.ranked li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2px 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.ranked .p-name { font-weight: var(--w-strong); overflow-wrap: anywhere; }
.ranked .p-cpw { text-align: right; font-weight: var(--w-strong); font-variant-numeric: tabular-nums; }
.ranked .p-meta { grid-column: 1 / -1; color: var(--dim); font-size: 15px; font-variant-numeric: tabular-nums; }
.ranked .rare .p-cpw { color: var(--accent); }
.ranked .tag { margin-left: 8px; vertical-align: 0.1em; }

.tool-next {
  margin-top: clamp(72px, 12vw, 140px);
  padding-top: clamp(56px, 8vw, 96px);
  border-top: 1px solid var(--line);
}
.tool-next h2 { font-size: clamp(32px, 7vw, 64px); max-width: 17ch; }
.tool-next p { margin-top: 20px; color: var(--dim); font-size: 18px; max-width: 46ch; }
.tool-next .cta { margin-top: 32px; }

.nojs { margin-top: 32px; max-width: 52ch; }

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

/* ---------- Footer ---------- */

.site-foot {
  padding-block: 40px 48px;
  border-top: 1px solid var(--line-strong);
  font-size: 15px;
}
.foot-grid { display: grid; gap: 24px; }
.foot-nav ul { display: flex; flex-wrap: wrap; gap: 4px 24px; margin: 0; padding: 0; list-style: none; }
.foot-nav a { display: inline-flex; align-items: center; min-height: 44px; }
.foot-meta { color: var(--faint); font-size: 14px; }
.foot-meta p + p { margin-top: 6px; }
@media (min-width: 768px) {
  .foot-grid { grid-template-columns: auto 1fr; align-items: start; column-gap: 48px; }
  .foot-nav ul { justify-content: flex-end; }
  .foot-meta { grid-column: 1 / -1; }
}

/* Visible placeholders the founder must fill in. */
mark.ph {
  padding: 0 0.25em;
  border: 1px dashed var(--accent);
  border-radius: 4px;
  background: var(--accent-tint);
  color: var(--text);
  font-weight: var(--w-strong);
  overflow-wrap: anywhere;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

/* ---------- Documents (legal pages) ---------- */

.doc { padding-block: 32px clamp(72px, 10vw, 128px); }

.doc-head { padding-bottom: 32px; border-bottom: 1px solid var(--line-strong); }
.doc-head h1 { font-size: clamp(40px, 9vw, 80px); max-width: 14ch; }
.doc-head .meta { margin-top: 16px; color: var(--dim); }

.notice {
  margin-top: 24px;
  max-width: 68ch;
  padding: 14px 16px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--card);
  font-size: 15px;
}
.notice strong { color: var(--accent); }

.doc-body { display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px; margin-top: 32px; }

.toc { font-size: 15px; }
.toc summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 48px;
  padding: 0 16px;
  border: 1px solid var(--control);
  border-radius: 12px;
  cursor: pointer;
  font-weight: var(--w-strong);
  list-style: none;
}
.toc summary::-webkit-details-marker { display: none; }
.toc summary::after {
  content: "";
  width: 9px;
  height: 9px;
  margin: -4px 4px 0 0;
  border-right: 2px solid var(--dim);
  border-bottom: 2px solid var(--dim);
  transform: rotate(45deg);
  transition: transform 150ms ease-out;
}
.toc[open] summary::after { margin-top: 4px; transform: rotate(-135deg); }
.toc ol { margin: 8px 0 0; padding: 0; list-style: none; }
.toc li a {
  display: flex;
  gap: 10px;
  min-height: 40px;
  align-items: center;
  padding: 4px 0;
  color: var(--dim);
  text-decoration: none;
}
.toc li a:hover { color: var(--text); }
.toc li a .n { min-width: 1.6em; color: var(--accent); font-variant-numeric: tabular-nums; font-weight: var(--w-strong); }

@media (min-width: 1024px) {
  .doc-body { grid-template-columns: 240px minmax(0, 1fr); gap: 64px; align-items: start; }
  .toc { position: sticky; top: 24px; }
  .toc summary { padding: 0; border: 0; min-height: 32px; color: var(--faint); cursor: default; pointer-events: none; }
  .toc summary::after, .toc[open] summary::after { content: none; }
}

.prose { max-width: 68ch; font-size: 17px; line-height: 1.65; }
.prose > * + * { margin-top: 1em; }
.prose h2 {
  display: flex;
  gap: 0.5em;
  margin-top: 2.6em;
  font-size: clamp(24px, 4.4vw, 32px);
  line-height: 1.15;
  scroll-margin-top: 24px;
}
.prose h2:first-child { margin-top: 0; }
.prose h2 .n { color: var(--accent); font-variant-numeric: tabular-nums; }
.prose h2 + * { margin-top: 0.8em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: 0.45em; }
.prose li::marker { color: var(--faint); }
.prose code {
  padding: 0.1em 0.4em;
  border-radius: 6px;
  background: var(--card-hi);
  font-family: inherit;
  font-weight: var(--w-strong);
}
.prose hr { margin: 3em 0; border: 0; border-top: 1px solid var(--line-strong); }

.steps { list-style: none; padding-left: 0 !important; counter-reset: step; }
.steps li {
  position: relative;
  padding: 12px 0 12px 3.2em;
  border-bottom: 1px solid var(--line);
  counter-increment: step;
}
.steps li + li { margin-top: 0; }
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 4px;
  color: var(--accent);
  font-size: 32px;
  font-weight: var(--w-display);
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--card);
}
.table-wrap:focus-visible { outline-offset: 2px; }
.prose table { width: 100%; min-width: 620px; border-collapse: collapse; font-size: 15px; line-height: 1.5; }
.prose th, .prose td { padding: 12px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.prose tr:last-child td { border-bottom: 0; }
.prose th { color: var(--dim); font-size: 13px; font-weight: var(--w-strong); background: var(--card-hi); }

/* ---------- 404 ---------- */

.lost { padding-block: 40px clamp(96px, 14vw, 180px); }
.lost h1 { font-size: clamp(36px, 7vw, 72px); max-width: 16ch; }
.lost h1 .num { display: block; font-size: clamp(120px, 34vw, 300px); line-height: 0.8; margin-bottom: 0.1em; }
.lost p { margin-top: 20px; color: var(--dim); max-width: 40ch; font-size: 18px; }
.lost ul { list-style: none; margin: 32px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 12px; }
.lost ul a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid var(--control);
  border-radius: 999px;
  font-weight: var(--w-strong);
  text-decoration: none;
}
.lost ul a:hover { color: var(--text); background: var(--card-hi); }

/* ---------- Motion preference ---------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
