/* Repstack site. Every colour, duration and easing comes from tokens.css, generated from the product's
   token layer (platform/packages/ui/src/tokens.ts). Light and dark follow the visitor's system. */

@font-face {
  font-family: "Geist Variable";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(/fonts/geist-latin-wght-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Geist Mono Variable";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(/fonts/geist-mono-latin-wght-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Pixelify Sans Variable";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url(/fonts/pixelify-sans-latin-wght-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+2000-206F, U+2212;
}

:root {
  color-scheme: light dark;
  --bg: var(--rs-chalk);
  --surface: var(--rs-white);
  --text: var(--rs-ink);
  --muted: var(--rs-graphite);
  --line: var(--rs-smoke);
  --strong: var(--rs-ink);
  --accent: var(--rs-ember);
  --accent-text: var(--rs-rust);
  --on-accent: var(--rs-ink);
  --plate: var(--rs-ink);
  --lit: var(--rs-ember);
  --sleep: var(--rs-ash);
  --band: var(--rs-ink);
  --band-text: var(--rs-chalk);
  --band-muted: var(--rs-ash);
  --tint: color-mix(in srgb, var(--rs-ember) 14%, transparent);
  --gut: clamp(16px, 4vw, 40px);
  --max: 1200px;
  --radius: 4px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: var(--rs-ink);
    --surface: var(--rs-iron);
    --text: var(--rs-chalk);
    --muted: var(--rs-ash);
    --line: var(--rs-coal);
    --strong: var(--rs-chalk);
    --accent-text: var(--rs-ember);
    --plate: var(--rs-chalk);
    --sleep: var(--rs-graphite);
    --band: var(--rs-iron);
    --tint: color-mix(in srgb, var(--rs-ember) 20%, transparent);
  }
}

/* Base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 88px; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 17px/1.55 var(--font-text); -webkit-font-smoothing: antialiased; }
h1, h2, h3 { margin: 0; font-weight: 750; letter-spacing: -0.02em; line-height: 1.08; text-wrap: balance; }
h1 { font-size: clamp(40px, 5.6vw, 76px); letter-spacing: -0.035em; line-height: 1; }
h2 { font-size: clamp(28px, 3.2vw, 42px); }
h3 { font-size: 19px; letter-spacing: -0.01em; }
p { margin: 0; text-wrap: pretty; }
a { color: inherit; }
img, svg { display: block; }
.fig { font-family: var(--font-figure); font-weight: 600; letter-spacing: 0; font-variant-numeric: tabular-nums; }
.num { font-variant-numeric: tabular-nums; }
:focus-visible { outline: 3px solid var(--accent-text); outline-offset: 2px; border-radius: 2px; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 30; padding: 10px 14px; background: var(--text); color: var(--bg); font-weight: 700; }
.skip:focus { left: var(--gut); }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.tag { font-size: 13px; font-weight: 600; color: var(--muted); }
.lede { font-size: clamp(18px, 1.6vw, 21px); line-height: 1.5; color: var(--muted); max-width: 40rem; }

/* Missing facts and wording waiting for approval: loud on purpose, and gone before launch. */
.gap { background: var(--tint); color: inherit; border: 1px dashed var(--accent-text); border-radius: 2px; padding: 0 0.2em; font-weight: 600; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.draft { margin: 16px 0; padding: 16px 18px; border: 2px dashed var(--accent-text); border-radius: var(--radius); background: color-mix(in srgb, var(--rs-ember) 6%, transparent); }
.draft > p + p, .draft > p + ul, .draft > ul + p { margin-top: 10px; }
.draft__tag { font-size: 12px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--accent-text); margin-bottom: 8px !important; }
.draftbar { margin: 0; padding: 8px var(--gut); background: var(--text); color: var(--bg); font-size: 13px; font-weight: 600; text-align: center; }
.draftbar .gap { border-color: var(--rs-ember); }

/* Buttons: an Ember plate with an ink edge; it lifts a pixel under the pointer and presses down. */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 20px; border: 2px solid var(--rs-ink); border-radius: var(--radius);
  background: var(--accent); color: var(--on-accent); font-weight: 700; font-size: 16px; text-decoration: none; white-space: nowrap;
  transition: transform var(--motion-quick) var(--ease-out), box-shadow var(--motion-quick) var(--ease-out);
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 2px 0 var(--rs-ink); }
.btn:active { transform: translateY(0); box-shadow: none; transition-duration: var(--motion-press); }
.btn--line { background: transparent; color: var(--text); border-color: var(--strong); }
.btn--line:hover { box-shadow: 0 2px 0 var(--strong); }
.btn--small { min-height: 40px; padding: 0 14px; font-size: 15px; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; }

/* Header */
.top { position: relative; z-index: 20; }
.top__in { max-width: var(--max); margin: 0 auto; padding: 16px var(--gut); display: flex; align-items: center; gap: 32px; }
.top__home { display: block; padding: 13px 0; border-radius: 2px; }
.lockup { width: 112px; height: 19px; shape-rendering: crispEdges; overflow: visible; }
.lockup__top { transform-box: view-box; }
.lockup .ink { fill: var(--strong); }
.lockup .lit { fill: var(--lit); }
.top__nav { margin-left: auto; }
.top__nav ul, .menu ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 28px; }
.top__nav a { display: inline-flex; align-items: center; min-height: var(--tap-min); font-weight: 600; font-size: 15px; text-decoration: underline 2px transparent; text-underline-offset: 8px; transition: text-decoration-color var(--motion-quick) var(--ease-out); }
.top__nav a:hover { text-decoration-color: var(--line); }
.top__nav a[aria-current="page"] { text-decoration-color: var(--accent); }
.menu a:not(.btn) { text-decoration: none; font-weight: 600; }
.menu a[aria-current="page"] { border-color: var(--accent); }
.menu { display: none; margin-left: auto; }
.menu summary { list-style: none; cursor: pointer; min-height: 44px; padding: 0 14px; display: flex; align-items: center; border: 2px solid var(--strong); border-radius: var(--radius); font-weight: 700; }
.menu summary::-webkit-details-marker { display: none; }
.menu[open] summary { background: var(--text); color: var(--bg); }
.menu nav { position: absolute; left: 0; right: 0; top: 100%; padding: 8px var(--gut) 24px; background: var(--bg); border-bottom: 2px solid var(--strong); }
.menu nav ul { flex-direction: column; gap: 0; margin-bottom: 16px; }
.menu nav li a { display: block; padding: 14px 0; font-size: 20px; border-bottom: 1px solid var(--line); }
@media (max-width: 859px) {
  .top__nav, .top__cta { display: none; }
  .menu { display: block; }
}

/* Stack, drawn big: one head shows at a time, set by data-mood. */
.stack { shape-rendering: crispEdges; overflow: visible; }
.stack--big { width: min(280px, 100%); height: auto; transform-origin: 50% 100%; }
.stack .plate { fill: var(--plate); transition: fill var(--motion-base) var(--ease-out); }
.stack .p2 { fill: var(--lit); }
.stack .head { fill: var(--plate); display: none; }
.stack .head--idle { display: inline; }
[data-mood="happy"] .head--idle, [data-mood="right"] .head--idle, [data-mood="sleep"] .head--idle { display: none; }
[data-mood="happy"] .head--happy, [data-mood="right"] .head--right, [data-mood="sleep"] .head--blink, [data-mood="idle"] .head--blink { display: inline; }
[data-mood="idle"] .head--blink { opacity: 0; }

/* Inner pages */
.head { padding: clamp(40px, 9vh, 104px) 0 clamp(32px, 6vh, 64px); }
.head__in { max-width: var(--max); margin: 0 auto; padding: 0 var(--gut); display: flex; flex-direction: column; gap: 20px; }
.head h1 { max-width: 16ch; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gut) clamp(64px, 12vh, 128px); display: flex; flex-direction: column; gap: clamp(48px, 8vh, 80px); }
.block { display: grid; grid-template-columns: minmax(200px, 0.75fr) minmax(0, 1.6fr); gap: 32px; padding-top: 28px; border-top: 2px solid var(--strong); }
.block > h2 { font-size: clamp(24px, 2.4vw, 30px); }
.card { background: var(--surface); border: 2px solid var(--strong); border-radius: var(--radius); padding: 24px; display: flex; flex-direction: column; gap: 12px; }
.card h3 + p, .card p + p { color: var(--muted); }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }
.list { margin: 0; padding: 0; list-style: none; display: grid; gap: 0; }
.list li { padding: 12px 0; border-bottom: 1px solid var(--line); display: flex; gap: 12px; }
.list li::before { content: ""; flex: none; width: 10px; height: 10px; margin-top: 0.5em; background: var(--accent); }
.facts { margin: 0; display: grid; grid-template-columns: minmax(140px, auto) minmax(0, 1fr); }
.facts dt, .facts dd { margin: 0; padding: 12px 0; border-bottom: 1px solid var(--line); }
.facts dt { color: var(--muted); font-weight: 600; padding-right: 24px; }
/* A link alone in a row isn't inside a sentence, so it gets the full 24px target. */
.facts dd > a { display: inline-block; padding-block: 4px; margin-block: -4px; }
.price { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.price .fig { font-size: 44px; line-height: 1; }
.price small { color: var(--muted); font-size: 15px; }
.plan { gap: 18px; }
.plan .list li { padding: 9px 0; }
.note { font-size: 15px; color: var(--muted); }

/* Policies */
.doc { max-width: var(--max); margin: 0 auto; padding: 0 var(--gut) clamp(64px, 12vh, 128px); display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: clamp(32px, 6vw, 80px); align-items: start; }
.doc__toc { position: sticky; top: 24px; font-size: 14px; }
.doc__tochead { font-weight: 700; margin-bottom: 10px; }
.doc__toc ol { margin: 0; padding: 0 0 0 1.4em; display: flex; flex-direction: column; gap: 4px; color: var(--muted); }
.doc__toc a { display: inline-block; padding: 3px 0; text-decoration: none; color: var(--text); }
.doc__toc a:hover { text-decoration: underline; text-underline-offset: 3px; }
.doc__meta { color: var(--muted); font-size: 15px; }
.prose { max-width: 70ch; }
.prose section { padding-top: 8px; }
.prose h2 { font-size: 24px; letter-spacing: -0.015em; margin: 40px 0 12px; }
.prose h3 { margin: 24px 0 8px; font-size: 18px; }
.prose p, .prose ul, .prose ol, .prose table { margin: 0 0 14px; }
.prose ul, .prose ol { padding-left: 1.25em; }
.prose li + li { margin-top: 6px; }
.prose a { color: var(--accent-text); text-decoration-thickness: 1px; text-underline-offset: 3px; }
.prose a:hover { text-decoration-thickness: 2px; }
.prose table { width: 100%; border-collapse: collapse; font-size: 15px; }
.prose th, .prose td { text-align: left; vertical-align: top; padding: 10px 12px 10px 0; border-bottom: 1px solid var(--line); }
.prose th { font-weight: 700; border-bottom: 2px solid var(--strong); }
.callout { padding: 16px 18px; border: 2px solid var(--strong); border-radius: var(--radius); background: var(--surface); margin: 0 0 20px; }

/* Footer */
.foot { border-top: 2px solid var(--strong); padding: 56px 0 28px; font-size: 15px; }
.foot__in { max-width: var(--max); margin: 0 auto; padding: 0 var(--gut); display: grid; grid-template-columns: minmax(0, 1.3fr) repeat(2, minmax(0, 0.7fr)) minmax(0, 1.1fr); gap: 32px; }
.foot__brand { display: flex; flex-direction: column; gap: 16px; }
.foot__brand > a { align-self: flex-start; padding: 13px 0; margin: -13px 0; }
.foot__brand p { color: var(--muted); max-width: 26rem; }
.foot__head { font-weight: 700; margin-bottom: 12px; }
.foot__links ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.foot__links a { display: inline-block; padding: 3px 0; text-decoration: none; color: var(--muted); }
.foot__links a:hover { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.foot__co p:not(.foot__head) { color: var(--muted); }
.foot__co p + p { margin-top: 12px; }
.foot__base { margin: 40px max(var(--gut), calc((100% - var(--max)) / 2 + var(--gut))) 0; padding-top: 20px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; color: var(--muted); font-size: 13px; }
.foot__speed .fig { font-size: 15px; color: var(--text); }

/* Not found */
.lost { min-height: 60vh; display: grid; place-items: center; padding: 48px var(--gut); text-align: center; }
.lost__in { display: flex; flex-direction: column; align-items: center; gap: 20px; max-width: 32rem; }
.lost .stack { width: 168px; height: auto; }
.lost .fig { font-size: 64px; line-height: 1; }

/* Phones: art-directed, not squeezed. */
@media (max-width: 859px) {
  html { scroll-padding-top: 72px; }
  body { font-size: 16.5px; }
  .block { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .doc { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .doc__toc { position: static; padding: 16px; border: 2px solid var(--strong); border-radius: var(--radius); }
  .facts { grid-template-columns: minmax(0, 1fr); }
  .facts dt { padding-bottom: 0; border-bottom: 0; }
  .foot__in { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .foot__brand, .foot__co { grid-column: 1 / -1; }
}

/* Touch screens: every link in a list is at least --tap-min tall. */
@media (max-width: 859px), (pointer: coarse) {
  .foot__links ul, .doc__toc ol { gap: 0; }
  .foot__links a, .doc__toc a { display: inline-flex; align-items: center; min-height: var(--tap-min); padding: 0; }
}

/* Motion that only plays when the visitor allows it. Every piece ends within --motion-max. */
@media (prefers-reduced-motion: no-preference) {
  .lockup__top { animation: rep calc(var(--motion-max) - 120ms) var(--ease-in-out) 120ms 1 both; }
  /* Three short blinks after Stack settles into a moment, then still. */
  [data-mood="idle"] .head--blink { animation: blink var(--motion-quick) steps(1) 2.4s, blink var(--motion-quick) steps(1) 6.8s, blink var(--motion-quick) steps(1) 12.2s; }
}
@keyframes rep { 0%, 12% { transform: none; } 48%, 56% { transform: translateY(-4px); } 90%, 100% { transform: none; } }
@keyframes blink { from, to { opacity: 1; } }

/* Page changes: the old page steps back, the new one settles in; the header stays put. */
@view-transition { navigation: auto; }
.top { view-transition-name: top; }
::view-transition-old(root) { animation: vt-out var(--motion-quick) var(--ease-in) both; }
::view-transition-new(root) { animation: vt-in var(--motion-screen) var(--ease-out) both; }
@keyframes vt-out { to { opacity: 0; } }
@keyframes vt-in { from { opacity: 0; transform: translateY(var(--motion-shift)); } }
@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
  *, *::before, *::after { scroll-behavior: auto !important; }
}

@media print {
  .top, .foot, .draftbar, .menu, .doc__toc { display: none !important; }
  body { background: #fff; color: #000; }
}

/* Heading sizes for headings whose level differs from their look. */
.h2 { font-size: clamp(28px, 3.2vw, 42px); }
.h3 { font-size: 21px; letter-spacing: -0.01em; }
