/* Reps — paper and ink with a single ember accent.
   Tokens mirror Packages/RepsDesign/Sources/RepsDesign/Theme.swift, light and dark. */

:root {
  --canvas: #F4F1EA;
  --surface: #FFFDF8;
  --sunken: #EBE6DC;
  --ink: #17130E;
  --ink-2: #6E655A;
  --ink-3: #A69C8E;
  --accent: #D9481F;
  --accent-fill: #E8A188;
  --accent-soft: #F6E3DA;
  --on-accent: #17130E;
  --hairline: #E2DBCE;
  --edge: #2B2419;
  --shadow: rgba(23, 19, 14, .14);

  --again: #C0432B;
  --hard: #8A6A33;
  --good: #4F7C78;
  --easy: #35635F;

  --clay: #B5705F; --teal: #5E8F92; --olive: #7C8659; --lavender: #8A7BA8;
  --ochre: #B08A4F; --slate: #6685A8; --sage: #6A9375; --mauve: #A87089;

  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: ui-serif, "New York", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --rounded: ui-rounded, "SF Pro Rounded", var(--sans);

  --edge-w: 1.5px;
  --offset: 3px;
  --radius-card: 16px;
  --radius-hero: 22px;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --canvas: #212121;
    --surface: #333333;
    --sunken: #181818;
    --ink: #F7F7F6;
    --ink-2: #A8A8A6;
    --ink-3: #8A8A88;
    --accent: #FF6A3C;
    --accent-fill: #EBAA93;
    --accent-soft: #4A2A1E;
    --on-accent: #14120F;
    --hairline: #4D4D4D;
    --edge: #000000;
    --shadow: rgba(0, 0, 0, .55);

    --again: #E9684C;
    --hard: #D5A055;
    --good: #5E9F99;
    --easy: #A5D8D3;

    --clay: #C08272; --teal: #74A5A8; --olive: #929C6D; --lavender: #9E8FBC;
    --ochre: #C29E63; --slate: #7C9BBE; --sage: #80A98B; --mauve: #BC849D;
  }
}

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

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  position: relative;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
p { margin: 0 0 1em; }
h1, h2, h3 { margin: 0; line-height: 1.12; letter-spacing: -0.02em; }

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

.skip {
  position: absolute; left: 16px; top: -60px; z-index: 10;
  background: var(--surface); border: var(--edge-w) solid var(--edge); border-radius: 999px;
  padding: 8px 16px; text-decoration: none; font-weight: 600;
}
.skip:focus { top: 16px; }

.wrap { width: min(1120px, 100% - 48px); margin-inline: auto; }
.narrow { width: min(720px, 100% - 48px); margin-inline: auto; }

/* The printed grain: a staggered dot screen, densest in the corner and fading out. */
.halftone {
  position: absolute; top: 0; left: 0; z-index: -1;
  width: min(760px, 90vw); height: 560px;
  background-image:
    radial-gradient(circle, var(--accent) 0.95px, transparent 1.2px),
    radial-gradient(circle, var(--accent) 0.95px, transparent 1.2px);
  background-size: 7px 7px;
  background-position: 0 0, 3.5px 3.5px;
  opacity: .28;
  -webkit-mask-image: radial-gradient(ellipse 100% 100% at 0 0, #000 0%, transparent 72%);
          mask-image: radial-gradient(ellipse 100% 100% at 0 0, #000 0%, transparent 72%);
  pointer-events: none;
}
.halftone.right {
  left: auto; right: 0; top: auto; bottom: 0;
  -webkit-mask-image: radial-gradient(ellipse 100% 100% at 100% 100%, #000 0%, transparent 72%);
          mask-image: radial-gradient(ellipse 100% 100% at 100% 100%, #000 0%, transparent 72%);
}

/* ---------- Header & footer ---------- */

.site-header { padding: 22px 0; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; font-size: 20px; letter-spacing: -0.01em; }
.brand svg { width: 26px; height: 26px; color: var(--accent); }
.site-nav { display: flex; align-items: center; gap: 6px; }
.site-nav a { text-decoration: none; color: var(--ink-2); font-size: 15px; font-weight: 500; padding: 8px 12px; border-radius: 999px; }
.site-nav a:hover { color: var(--ink); background: var(--sunken); }
.site-nav a[aria-current="page"] { color: var(--ink); }
.site-nav a.btn { margin-left: 6px; color: var(--on-accent); background: var(--accent-fill); }
.site-nav a.btn:hover { color: var(--on-accent); background: var(--accent-fill); }
@media (max-width: 560px) {
  .site-nav .hide-sm { display: none; }
}

.site-footer { margin-top: 96px; padding: 40px 0 56px; border-top: 1px solid var(--hairline); color: var(--ink-2); font-size: 14px; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 20px 40px; justify-content: space-between; align-items: flex-start; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.site-footer .brand { font-size: 17px; color: var(--ink); }
.site-footer .brand svg { width: 20px; height: 20px; }
.site-footer small { display: block; margin-top: 8px; font-size: 13px; color: var(--ink-3); }

/* ---------- Type ---------- */

.eyebrow { font-size: 14px; color: var(--ink-3); margin: 0 0 14px; }
.display { font-weight: 700; font-size: clamp(40px, 6.4vw, 76px); line-height: 1.02; letter-spacing: -0.035em; }
.title { font-weight: 700; font-size: clamp(32px, 4.4vw, 50px); line-height: 1.06; letter-spacing: -0.03em; }
/* The accent phrase: New York medium italic, a step larger than the sans around it. */
.display em, .title em, .page-title em {
  font-family: var(--serif); font-style: italic; font-weight: 500;
  font-size: 1.08em; letter-spacing: -0.01em; color: var(--accent);
}
.lede { font-size: clamp(18px, 2vw, 21px); color: var(--ink-2); line-height: 1.5; max-width: 34em; }
.muted { color: var(--ink-2); }
.serif { font-family: var(--serif); }

/* ---------- Controls ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font: 600 16px/1 var(--sans); text-decoration: none; color: var(--on-accent);
  background: var(--accent-fill); border: var(--edge-w) solid var(--edge); border-radius: 999px;
  padding: 15px 24px; box-shadow: var(--offset) var(--offset) 0 var(--shadow);
  transition: transform .12s ease, box-shadow .12s ease;
  cursor: pointer; white-space: nowrap;
}
.btn:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--shadow); }
.btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--shadow); }
.btn.small { font-size: 14px; padding: 9px 15px; }
.btn.plain { background: var(--surface); color: var(--ink); }
.btn svg { width: 18px; height: 18px; }

.card {
  background: var(--surface); border: var(--edge-w) solid var(--edge); border-radius: var(--radius-card);
  box-shadow: var(--offset) var(--offset) 0 var(--shadow);
}

/* ---------- Home: hero ---------- */

.hero { padding: 40px 0 72px; }
.hero .wrap { display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center; }
.hero .display { margin-bottom: 22px; }
.hero .lede { margin-bottom: 32px; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 20px; }
.hero-note { font-size: 14px; color: var(--ink-3); }
@media (max-width: 900px) {
  .hero .wrap { grid-template-columns: 1fr; gap: 56px; }
  .hero-copy { text-align: center; }
  .hero .lede { margin-inline: auto; }
  .hero-actions { justify-content: center; }
}

/* A sketched phone: a keyline drawing, not a photograph of one. */
.phone {
  position: relative; width: 340px; aspect-ratio: 340 / 700; margin-inline: auto;
  background: var(--surface); border: 2px solid var(--edge); border-radius: 54px;
  box-shadow: 7px 7px 0 var(--shadow); padding: 10px; transform: rotate(-2.5deg);
}
.screen {
  position: relative; height: 100%; border-radius: 44px; overflow: hidden;
  border: var(--edge-w) solid var(--edge);
  background:
    radial-gradient(120% 70% at 100% 0%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 60%),
    radial-gradient(90% 60% at 0% 100%, color-mix(in srgb, var(--good) 20%, transparent), transparent 65%),
    var(--sunken);
  padding: 16px 16px 0;
}
.island { width: 96px; height: 28px; border-radius: 20px; background: #0B0907; margin: 0 auto; }
.status { position: absolute; top: 20px; left: 30px; right: 26px; display: flex; justify-content: space-between; font: 600 14px/1 var(--sans); }
.status i { display: inline-block; width: 22px; height: 11px; border: 1.5px solid currentColor; border-radius: 4px; position: relative; top: 1px; }
.status i::after { content: ""; position: absolute; inset: 1.5px 6px 1.5px 1.5px; background: currentColor; border-radius: 1.5px; }

.apps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px 14px; padding: 18px 8px 0; }
.app { aspect-ratio: 1; border-radius: 15px; border: var(--edge-w) solid var(--edge); box-shadow: 2px 2px 0 var(--shadow); position: relative; }
.app::after { content: ""; position: absolute; inset: 30%; border-radius: 50%; background: rgba(255, 253, 248, .75); }
.app.sq::after { border-radius: 4px; }
.app.bar::after { inset: 44% 24%; border-radius: 3px; }

/* The large Review widget, as ReviewWidgetBody draws it. */
.widget {
  margin: 16px 0 0; background: var(--canvas); border-radius: 26px; padding: 14px 14px 14px;
  box-shadow: 0 1px 0 rgba(0,0,0,.04);
}
.w-head { display: flex; align-items: center; justify-content: space-between; padding: 0 2px 10px; }
.w-deck { font-size: 12px; color: var(--ink-3); display: flex; align-items: center; gap: 6px; }
.w-deck b { width: 8px; height: 8px; border-radius: 50%; background: var(--ochre); }
.w-due { display: flex; align-items: center; gap: 8px; }
.ticks { display: flex; gap: 3px; align-items: center; }
.ticks i { width: 3px; height: 14px; border-radius: 2px; background: var(--hairline); }
.ticks i.on { background: var(--accent); }
.w-count { position: relative; font: 700 22px/1 var(--rounded); min-width: 14px; text-align: right; }
.w-panel {
  position: relative; background: var(--surface); border: var(--edge-w) solid var(--edge); border-radius: 14px;
  box-shadow: 2px 2px 0 var(--shadow); height: 176px; text-align: center; overflow: hidden;
}
.w-q, .w-a { position: absolute; left: 0; right: 0; font-family: var(--serif); }
.w-q { top: 50%; transform: translateY(-50%); font-size: 30px; }
.w-a { top: 0; bottom: 0; display: flex; flex-direction: column; justify-content: center; }
.w-a .q { font-size: 17px; color: var(--ink-2); }
.w-a hr { width: 46%; border: 0; border-top: 1px solid var(--hairline); margin: 12px auto; }
.w-a .a { font-size: 30px; }
.w-controls { position: relative; height: 46px; margin-top: 12px; }
.w-reveal, .w-grades { position: absolute; inset: 0; }
.w-reveal {
  display: flex; align-items: center; justify-content: center; border-radius: 999px;
  background: var(--accent-fill); color: var(--on-accent); border: var(--edge-w) solid var(--edge);
  font: 600 14px/1 var(--sans);
}
.w-grades { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; }
.g {
  border-radius: 999px; border: var(--edge-w) solid var(--edge); color: var(--ink);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  font: 600 12px/1 var(--sans);
}
.g small { font: 500 10px/1 var(--sans); color: var(--ink-2); }
.g.again { background: color-mix(in srgb, var(--again) 20%, var(--surface)); }
.g.hard  { background: color-mix(in srgb, var(--hard) 20%, var(--surface)); }
.g.good  { background: color-mix(in srgb, var(--good) 22%, var(--surface)); }
.g.easy  { background: color-mix(in srgb, var(--easy) 22%, var(--surface)); }
.w-name { text-align: center; font-size: 11px; color: var(--ink); margin-top: 6px; opacity: .8; }
.tap {
  position: absolute; width: 38px; height: 38px; border-radius: 50%; pointer-events: none;
  border: 2.5px solid var(--edge); background: color-mix(in srgb, var(--accent) 30%, transparent); opacity: 0;
}

/* One rep, on a loop: reveal, grade Good, the count drops, a tick fills. */
@media (prefers-reduced-motion: no-preference) {
  .loop .w-q, .loop .w-reveal { animation: showQ 9s infinite; }
  .loop .w-a, .loop .w-grades { animation: showA 9s infinite; }
  .loop .tap.t1 { animation: tap1 9s infinite; }
  .loop .tap.t2 { animation: tap2 9s infinite; }
  .loop .g.good { animation: press 9s infinite; }
  .loop .ticks i.next { animation: tick 9s infinite; }
  .loop .w-count .after { animation: countAfter 9s infinite; }
  .loop .w-count .before { animation: countBefore 9s infinite; }
}
.w-count .after { position: absolute; right: 0; top: 0; opacity: 0; }
@media (prefers-reduced-motion: reduce) {
  .loop .w-q, .loop .w-reveal { opacity: 0; }
  .w-a, .w-grades { opacity: 1; }
}
@keyframes showQ   { 0%, 30% { opacity: 1; } 34%, 88% { opacity: 0; } 94%, 100% { opacity: 1; } }
@keyframes showA   { 0%, 30% { opacity: 0; } 34%, 86% { opacity: 1; } 90%, 100% { opacity: 0; } }
@keyframes tap1    { 0%, 20% { opacity: 0; transform: scale(1.5); } 25% { opacity: 1; transform: scale(1); } 32%, 100% { opacity: 0; transform: scale(.8); } }
@keyframes tap2    { 0%, 58% { opacity: 0; transform: scale(1.5); } 63% { opacity: 1; transform: scale(1); } 70%, 100% { opacity: 0; transform: scale(.8); } }
@keyframes press   { 0%, 62% { transform: none; } 65% { transform: scale(.94); } 69%, 100% { transform: none; } }
@keyframes tick    { 0%, 65% { background: var(--hairline); } 68%, 90% { background: var(--accent); } 94%, 100% { background: var(--hairline); } }
@keyframes countAfter { 0%, 65% { opacity: 0; } 68%, 88% { opacity: 1; } 94%, 100% { opacity: 0; } }
@keyframes countBefore { 0%, 65% { opacity: 1; } 68%, 88% { opacity: 0; } 94%, 100% { opacity: 1; } }

.hero-chip {
  position: absolute; display: inline-flex; align-items: center; gap: 8px; white-space: nowrap;
  background: var(--surface); border: var(--edge-w) solid var(--edge); border-radius: 999px;
  padding: 10px 16px; font-weight: 600; font-size: 15px; box-shadow: var(--offset) var(--offset) 0 var(--shadow);
}
.hero-chip svg { width: 18px; height: 18px; color: var(--good); }
.phone-stage { position: relative; padding: 10px 0 20px; }
.phone-stage .hero-chip { right: max(0px, calc(50% - 250px)); bottom: 70px; transform: rotate(3deg); }
@media (max-width: 420px) {
  .phone { width: 300px; }
  .phone-stage .hero-chip { right: 4px; bottom: 30px; font-size: 14px; }
}

/* ---------- Home: feature sections ---------- */

.feature { padding: 88px 0; position: relative; }
.feature + .feature { border-top: 1px solid var(--hairline); }
.feature .wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.feature.flip .copy { order: 2; }
.feature .title { margin-bottom: 18px; }
.feature .lede { margin-bottom: 22px; }
@media (max-width: 900px) {
  .feature { padding: 64px 0; }
  .feature .wrap { grid-template-columns: 1fr; gap: 40px; }
  .feature.flip .copy { order: 0; }
}

.ticklist { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.ticklist li { position: relative; padding-left: 28px; color: var(--ink); }
.ticklist li::before {
  content: ""; position: absolute; left: 4px; top: .3em; width: 3px; height: 1em; border-radius: 2px; background: var(--accent);
  box-shadow: 5px 0 0 var(--accent);
}
.ticklist li span { color: var(--ink-2); }

.art { position: relative; }

/* Sources into cards */
.sources { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.source {
  display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 16px 8px 14px;
  font-weight: 600; font-size: 14px;
}
.source svg { width: 26px; height: 26px; color: var(--ink); }
.source:nth-child(1) { transform: rotate(-3deg); background: color-mix(in srgb, var(--ochre) 20%, var(--surface)); }
.source:nth-child(2) { transform: rotate(1.5deg) translateY(6px); background: color-mix(in srgb, var(--sage) 20%, var(--surface)); }
.source:nth-child(3) { transform: rotate(-1.5deg); background: color-mix(in srgb, var(--clay) 20%, var(--surface)); }
.source:nth-child(4) { transform: rotate(3deg) translateY(4px); background: color-mix(in srgb, var(--slate) 20%, var(--surface)); }
.funnel { width: 100%; height: 120px; color: var(--edge); }
.funnel .spark { fill: var(--accent); }
.outcards { position: relative; height: 210px; }
.mini {
  position: absolute; width: 31.5%; height: 170px; padding: 16px 12px; text-align: center;
  display: flex; flex-direction: column; justify-content: center; font-family: var(--serif);
}
.mini .q { font-size: 15px; color: var(--ink-2); line-height: 1.25; }
.mini hr { width: 40%; border: 0; border-top: 1px solid var(--hairline); margin: 10px auto; }
.mini .a { font-size: 21px; }
.mini:nth-child(1) { left: 0; top: 20px; transform: rotate(-5deg); }
.mini:nth-child(2) { left: 34.25%; top: 0; }
.mini:nth-child(3) { right: 0; top: 20px; transform: rotate(5deg); }
.imports { margin-top: 30px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 14px; color: var(--ink-2); }
.pill { border: 1px solid var(--hairline); background: var(--surface); border-radius: 999px; padding: 5px 12px; color: var(--ink); font-size: 13px; font-weight: 500; }

/* Forgetting curve */
.curve { padding: 24px 22px 18px; }
.curve svg { width: 100%; height: auto; }
.curve .axis { stroke: var(--hairline); }
.curve .line { stroke: var(--accent); fill: none; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.curve .wash { fill: var(--accent); opacity: .08; }
.curve .dot { fill: var(--surface); stroke: var(--edge); stroke-width: 1.5; }
.curve text { fill: var(--ink-3); font: 500 12px var(--sans); }
.curve .cap { display: flex; justify-content: space-between; font-size: 13px; color: var(--ink-2); margin-top: 6px; }
.chips { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; margin-top: 26px; }
.chip {
  display: inline-flex; align-items: center; gap: 9px; border-radius: 999px; border: var(--edge-w) solid var(--edge);
  padding: 9px 18px 9px 12px; font-weight: 600; font-size: 16px; background: var(--surface);
}
.chip svg { width: 20px; height: 20px; }
.chip:nth-child(1) { background: color-mix(in srgb, #4F7C78 18%, var(--surface)); transform: rotate(-3deg); margin-left: 6%; }
.chip:nth-child(1) svg { color: #4F7C78; }
.chip:nth-child(2) { background: color-mix(in srgb, #D9481F 18%, var(--surface)); transform: rotate(2.5deg); margin-left: 30%; }
.chip:nth-child(2) svg { color: #D9481F; }
.chip:nth-child(3) { background: color-mix(in srgb, #B56E00 18%, var(--surface)); transform: rotate(-2deg); margin-left: 14%; }
.chip:nth-child(3) svg { color: #B56E00; }

/* Catalogue */
.decks { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.deck { display: flex; align-items: center; gap: 12px; padding: 14px 16px; }
.deck b { flex: none; width: 12px; height: 12px; border-radius: 50%; }
.deck div { min-width: 0; }
.deck strong { display: block; font-weight: 600; font-size: 15px; line-height: 1.25; }
.deck span { display: block; font-size: 13px; color: var(--ink-3); }
.deck:nth-child(odd) { transform: rotate(-.6deg); }
.deck:nth-child(even) { transform: rotate(.6deg) translateY(8px); }
@media (max-width: 420px) { .decks { grid-template-columns: 1fr; } .deck:nth-child(even) { transform: rotate(.6deg); } }

/* Card kinds */
.kinds { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.kind { padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.kind .face {
  height: 118px; border-radius: 10px; background: var(--canvas); border: 1px solid var(--hairline);
  display: flex; align-items: center; justify-content: center; text-align: center; padding: 10px;
  font-family: var(--serif); font-size: 18px; line-height: 1.25; overflow: hidden; position: relative;
}
.kind .label { font-weight: 600; font-size: 15px; }
.kind .label span { display: block; font-weight: 400; font-size: 13px; color: var(--ink-2); }
.cloze-gap { color: var(--accent); }
.kind svg { width: 100%; height: 100%; }

/* Library promise */
.promises { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 44px; }
.promise { padding: 24px; }
.promise svg { width: 28px; height: 28px; color: var(--accent); margin-bottom: 14px; }
.promise h3 { font-size: 18px; margin-bottom: 6px; letter-spacing: -0.01em; }
.promise p { margin: 0; color: var(--ink-2); font-size: 15px; }
@media (max-width: 800px) { .promises { grid-template-columns: 1fr; } }
.centered { text-align: center; }
.centered .lede { margin-inline: auto; }

/* Closing */
.closing { padding: 96px 0 24px; text-align: center; position: relative; }
.closing .mark { width: 76px; height: 76px; margin: 0 auto 26px; border-radius: 18px; border: var(--edge-w) solid var(--edge); box-shadow: var(--offset) var(--offset) 0 var(--shadow); }
.closing .title { margin-bottom: 16px; }
.closing .lede { margin: 0 auto 30px; }

/* ---------- Inner pages ---------- */

.page-head { padding: 48px 0 28px; position: relative; }
.page-title { font-weight: 700; font-size: clamp(36px, 5vw, 56px); line-height: 1.05; letter-spacing: -0.035em; margin-bottom: 14px; }
.page-head .lede { margin: 0; }
.updated { font-size: 14px; color: var(--ink-3); margin-top: 14px; }

.prose { font-size: 17px; }
.prose h2 { font-size: 24px; letter-spacing: -0.02em; margin: 48px 0 12px; }
.prose h3 { font-size: 18px; letter-spacing: -0.01em; margin: 28px 0 8px; }
.prose p, .prose li { color: var(--ink); }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1em; }
.prose li { margin: 6px 0; }
.prose li::marker { color: var(--ink-3); }
.prose a { color: var(--accent); text-underline-offset: 3px; text-decoration-thickness: 1px; }
.prose strong { font-weight: 600; }
.prose a.btn { color: var(--on-accent); text-decoration: none; }
.prose .path { font-weight: 500; white-space: nowrap; }
.prose table { width: 100%; border-collapse: collapse; font-size: 15px; margin: 8px 0 20px; }
.prose th, .prose td { text-align: left; vertical-align: top; padding: 10px 12px 10px 0; border-bottom: 1px solid var(--hairline); }
.prose th { font-weight: 600; color: var(--ink-2); font-size: 13px; }
.table-scroll { overflow-x: auto; }

.summary { padding: 22px 24px; margin: 8px 0 12px; }
.summary h2 { margin: 0 0 10px; font-size: 18px; }
.summary ul { margin: 0; }

.toc { padding: 18px 22px; margin: 24px 0 8px; font-size: 15px; }
.toc strong { display: block; font-size: 13px; color: var(--ink-3); font-weight: 500; margin-bottom: 6px; }
.toc ol { margin: 0; padding-left: 1.2em; columns: 2; column-gap: 28px; }
.toc li { margin: 0 0 5px; break-inside: avoid; }
.toc a { color: var(--ink); text-decoration: none; }
.toc a:hover { color: var(--accent); }
@media (max-width: 560px) { .toc ol { columns: 1; } }

/* FAQ */
.faq-group { margin-top: 44px; }
.faq-group h2 { font-size: 14px; font-weight: 500; color: var(--ink-3); letter-spacing: 0; margin: 0 0 12px; }
.faq-list { display: grid; gap: 10px; }
details.q { background: var(--surface); border: var(--edge-w) solid var(--edge); border-radius: 14px; box-shadow: var(--offset) var(--offset) 0 var(--shadow); }
details.q summary {
  list-style: none; cursor: pointer; padding: 16px 52px 16px 20px; font-weight: 600; font-size: 17px; position: relative;
}
details.q summary::-webkit-details-marker { display: none; }
details.q summary::after {
  content: ""; position: absolute; right: 22px; top: 50%; width: 9px; height: 9px; margin-top: -7px;
  border-right: 2px solid var(--ink-2); border-bottom: 2px solid var(--ink-2); transform: rotate(45deg); transition: transform .18s ease;
}
details.q[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
details.q .a { padding: 0 20px 6px; color: var(--ink); }
details.q .a p, details.q .a li { font-size: 16px; }
details.q .a a { color: var(--accent); text-underline-offset: 3px; }
details.q .a ol, details.q .a ul { padding-left: 1.3em; margin-top: 0; }

/* Support */
.contact { padding: 28px; display: grid; grid-template-columns: auto 1fr; gap: 22px; align-items: center; margin: 12px 0 8px; }
.contact .icon { width: 56px; height: 56px; border-radius: 50%; background: var(--accent-soft); border: var(--edge-w) solid var(--edge); display: grid; place-items: center; }
.contact .icon svg { width: 26px; height: 26px; color: var(--accent); }
.contact h2 { margin: 0 0 4px !important; font-size: 20px; }
.contact p { margin: 0 0 14px; color: var(--ink-2); }
@media (max-width: 560px) { .contact { grid-template-columns: 1fr; } }
.help-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin: 16px 0; }
.help { padding: 18px 20px; text-decoration: none; display: block; transition: transform .12s ease, box-shadow .12s ease; }
.help:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--shadow); }
.help strong { display: block; font-size: 16px; margin-bottom: 2px; color: var(--ink); }
.help span { font-size: 14px; color: var(--ink-2); }
@media (max-width: 560px) { .help-grid { grid-template-columns: 1fr; } }

/* Credits */
.credits-intro { margin-bottom: 8px; }
.credit-deck { margin-top: 34px; }
.credit-deck h2 { font-size: 19px; margin: 0 0 2px; }
.credit-deck .cat { font-size: 13px; color: var(--ink-3); margin: 0 0 10px; }
.credit-deck ul { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--hairline); }
.credit-deck li { padding: 9px 0; border-bottom: 1px solid var(--hairline); font-size: 15px; margin: 0; }
.credit-deck li .lic { color: var(--ink-2); }
.credit-deck li a { white-space: nowrap; }

/* 404 */
.lost { text-align: center; padding: 80px 0 20px; }
.lost .lede { margin: 0 auto 28px; }
