/* Whatever: site. Cores e raios iguais à app (src/theme/tokens.ts). Sem itálicos. */
@font-face {
  font-family: 'Geologica';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url('/assets/fonts/geologica-latin-wght-normal.woff2') format('woff2-variations');
  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: 'Geologica';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url('/assets/fonts/geologica-latin-ext-wght-normal.woff2') format('woff2-variations');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --bg: #F7F5F2;
  --surface: #FFFFFF;
  --surface-alt: #EEEBE6;
  --line: #E2DDD6;
  --hairline: rgba(28, 37, 65, 0.09);
  --text: #1C2541;
  --muted: #585F74;
  --accent: #D93A42;       /* botões (4,5:1 com branco) */
  --accent-pressed: #C4313A;
  --on-accent: #FFFFFF;
  --accent-ink: #C42F38;   /* texto coral (5,1:1 no fundo) */
  --accent-soft: #FCE5E4;
  --brand: #E8434A;        /* só decoração */
  --brand-back: #1C2541;
  --inverse: #1C2541;
  --on-inverse: #FFFFFF;
  --inverse-muted: #C3C8D8;
  --inverse-accent: #FF8A8D;
  --inverse-line: rgba(255, 255, 255, 0.12);
  --match: #1C2541;
  --todo-bg: #FFF1C9;
  --todo-text: #6B4A00;
  --shadow: 28, 37, 65;
  --r-sm: 12px; --r-md: 18px; --r-lg: 26px; --r-xl: 32px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --font: 'Geologica', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0D1222;
    --surface: #161C30;
    --surface-alt: #1F2740;
    --line: #2C3550;
    --hairline: rgba(235, 240, 255, 0.08);
    --text: #F5F3EF;
    --muted: #A6ADC2;
    --accent: #FF6B70;
    --accent-pressed: #F2585E;
    --on-accent: #0D1222;
    --accent-ink: #FF7A7E;
    --accent-soft: #3A1E29;
    --brand-back: #3A4670;
    --inverse: #161C30;
    --on-inverse: #F5F3EF;
    --inverse-muted: #A6ADC2;
    --inverse-accent: #FF7A7E;
    --inverse-line: rgba(235, 240, 255, 0.1);
    --match: #2B3558;
    --todo-bg: #3D3214;
    --todo-text: #FFD978;
    --shadow: 0, 0, 0;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
em, i, cite, dfn, address { font-style: normal; }
img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: var(--accent-ink); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { line-height: 1.1; letter-spacing: -0.02em; margin: 0; font-weight: 700; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
b, strong { font-weight: 650; }
.i { width: 1.15em; height: 1.15em; flex: none; }
.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 768px) { .wrap { padding: 0 32px; } }

.skip { position: absolute; left: 12px; top: -60px; z-index: 30; background: var(--inverse); color: var(--on-inverse); padding: 10px 16px; border-radius: var(--r-sm); text-decoration: none; }
.skip:focus { top: 12px; }

mark.todo { background: var(--todo-bg); color: var(--todo-text); padding: 0 4px; border-radius: 4px; font-weight: 600; white-space: nowrap; }

/* ---------- navegação ---------- */
.nav { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: saturate(160%) blur(14px); -webkit-backdrop-filter: saturate(160%) blur(14px); border-bottom: 1px solid var(--hairline); }
.nav-in { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 12px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 750; font-size: 20px; letter-spacing: -0.03em; }
.brand .mark { width: 34px; height: 34px; }
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a { color: var(--text); text-decoration: none; font-size: 15px; font-weight: 500; padding: 10px 12px; border-radius: 999px; min-height: 44px; display: inline-flex; align-items: center; gap: 6px; transition: background-color .2s var(--ease); }
.nav-links a:hover, .nav-links a[aria-current="page"] { background: var(--surface-alt); }
.nav-links .lang { border: 1px solid var(--line); font-weight: 600; font-size: 14px; }
.nav-how { display: none !important; }
@media (min-width: 560px) { .nav-how { display: inline-flex !important; } }

/* ---------- botões das lojas ---------- */
.stores { display: flex; flex-wrap: wrap; gap: 12px; }
.store { display: inline-flex; flex-direction: column; justify-content: center; min-height: 56px; padding: 8px 22px; border-radius: 999px; text-decoration: none; line-height: 1.15; transition: transform .25s var(--ease), background-color .2s; }
.store-pre { font-size: 12px; font-weight: 500; opacity: .85; }
.store-name { font-size: 17px; font-weight: 700; letter-spacing: -0.01em; }
.store-primary { background: var(--accent); color: var(--on-accent); box-shadow: 0 10px 24px -12px rgba(217, 58, 66, .7); }
.store-secondary { background: var(--surface); color: var(--text); border: 1px solid var(--line); }
a.store:hover { transform: translateY(-2px); }
a.store:active { transform: translateY(1px) scale(.98); }
a.store-primary:hover { background: var(--accent-pressed); }
.store.is-soon { cursor: default; }
.stores-center { justify-content: center; }

.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 22px; border-radius: 999px; background: var(--accent); color: var(--on-accent); font-weight: 650; text-decoration: none; }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--line); }

/* ---------- herói ---------- */
.hero { padding: 36px 0 56px; }
.hero-in { display: grid; gap: 40px; align-items: center; }
.hero h1 { font-size: clamp(44px, 12.4vw, 84px); line-height: 1; letter-spacing: -0.045em; font-weight: 800; }
.hero h1 span { display: inline-block; }
.accent-word { color: var(--accent-ink); }
.hero-sub { margin: 20px 0 28px; font-size: clamp(18px, 4.6vw, 21px); color: var(--muted); max-width: 30ch; line-height: 1.5; }
@media (min-width: 900px) {
  .hero { padding: 64px 0 48px; }
  .hero-in { grid-template-columns: 1.05fr 1fr; gap: 48px; }
  .deck { width: min(100%, 460px); }
  .match { bottom: 12%; }
}

/* Baralho: os cartões inclinados ecoam o logo (navy atrás, coral à frente). */
.hero-art { display: flex; justify-content: center; }
.deck { position: relative; width: min(100%, 420px); aspect-ratio: 1 / 1.12; }
.dcard { position: absolute; margin: 0; width: 62%; left: 19%; top: 3%; background: var(--surface); border-radius: var(--r-lg); padding: 8px 8px 0; box-shadow: 0 24px 50px -24px rgba(var(--shadow), .45), 0 0 0 1px var(--hairline); transform-origin: 50% 90%; }
.dcard img { width: 100%; aspect-ratio: 4 / 4.4; object-fit: cover; border-radius: calc(var(--r-lg) - 8px); background: var(--surface-alt); }
.dcard figcaption { padding: 10px 6px 12px; font-weight: 650; font-size: 15px; letter-spacing: -0.01em; }
.dcard-3 { transform: translate(-24%, 6%) rotate(-12deg); }
.dcard-2 { transform: translate(22%, 3%) rotate(9deg); }
.dcard-1 { transform: rotate(-2deg); outline: 3px solid var(--brand); outline-offset: -1px; }
.match { position: absolute; left: 50%; bottom: 0; transform: translateX(-50%); display: flex; align-items: center; gap: 12px; padding: 10px 20px 10px 10px; border-radius: 999px; background: var(--match); color: #F5F3EF; white-space: nowrap; box-shadow: 0 18px 36px -16px rgba(var(--shadow), .6); }
.match b { display: block; font-size: 16px; font-weight: 700; }
.match small { display: block; font-size: 13px; color: var(--inverse-muted); }
.match-ic { width: 40px; height: 40px; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; }
.match-ic .i { width: 20px; height: 20px; }
.swipes { position: absolute; right: -2%; top: 44%; display: grid; gap: 10px; }
.sw { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); box-shadow: 0 10px 22px -12px rgba(var(--shadow), .5), 0 0 0 1px var(--hairline); }
.sw-no { color: var(--muted); }
.sw-yes { color: var(--brand); }
@media (max-width: 420px) { .swipes { display: none; } .deck { width: 86%; } }

@media (prefers-reduced-motion: no-preference) {
  .hero-copy > * { animation: rise .8s var(--ease) both; }
  .hero-copy > :nth-child(2) { animation-delay: .08s; }
  .hero-copy > :nth-child(3) { animation-delay: .16s; }
  .dcard-3 { animation: deal3 .9s var(--ease) .15s both; }
  .dcard-2 { animation: deal2 .9s var(--ease) .28s both; }
  .dcard-1 { animation: deal1 .9s var(--ease) .41s both; }
  .match { animation: pop .6s var(--spring) 1.25s both; }
  .sw-yes { animation: tap .5s var(--ease) 1s both; }
}
@keyframes rise { from { opacity: 0; transform: translateY(18px); } }
@keyframes deal3 { from { opacity: 0; transform: translate(0, 18%) rotate(0); } }
@keyframes deal2 { from { opacity: 0; transform: translate(0, 18%) rotate(0); } }
@keyframes deal1 { from { opacity: 0; transform: translate(0, 18%) rotate(0); } }
@keyframes pop { from { opacity: 0; transform: translateX(-50%) translateY(14px) scale(.85); } }
@keyframes tap { 50% { transform: scale(.86); background: var(--accent-soft); } }

/* ---------- como funciona ---------- */
section { position: relative; }
.how { padding: 56px 0; }
.how h2, .mixed h2, .bento h2 { font-size: clamp(32px, 7.6vw, 52px); letter-spacing: -0.035em; font-weight: 750; }
.lead { margin-top: 14px; font-size: 19px; color: var(--muted); max-width: 52ch; }
.steps { list-style: none; margin: 40px 0 0; padding: 0; display: grid; gap: 0; }
.step { display: grid; grid-template-columns: 56px 1fr; column-gap: 16px; row-gap: 6px; padding: 26px 0; border-top: 1px solid var(--line); }
.step-n { grid-row: span 2; width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); border: 1px solid var(--line); font-weight: 700; font-size: 18px; color: var(--accent-ink); }
.step:last-child .step-n { background: var(--accent); color: var(--on-accent); border-color: transparent; }
.step h3 { font-size: clamp(24px, 5.6vw, 32px); letter-spacing: -0.03em; font-weight: 700; align-self: center; }
.step p { color: var(--muted); max-width: 52ch; }
.nomatch { display: flex; gap: 12px; align-items: flex-start; margin-top: 8px; padding: 18px 20px; border-radius: var(--r-md); background: var(--surface-alt); color: var(--text); font-weight: 500; }
.nomatch .i { color: var(--accent-ink); margin-top: 4px; }
@media (min-width: 900px) {
  .how { padding: 96px 0; }
  .steps { grid-template-columns: repeat(12, 1fr); }
  .step { grid-column: span 12; grid-template-columns: 72px minmax(0, 5fr) minmax(0, 6fr); align-items: center; padding: 32px 0; }
  .step-n { grid-row: auto; width: 56px; height: 56px; font-size: 20px; }
  .step p { font-size: 18px; }
  .nomatch { max-width: 640px; margin-left: 88px; }
}

/* ---------- votos misturados ---------- */
.mixed { padding: 24px 0 56px; }
.mixed-panel { background: var(--inverse); color: var(--on-inverse); border-radius: var(--r-xl); padding: 32px 20px; display: grid; gap: 32px; overflow: hidden; position: relative; isolation: isolate; }
.mixed-panel::before { content: ''; position: absolute; z-index: -1; width: 420px; height: 420px; right: -160px; top: -180px; border-radius: 60px; transform: rotate(18deg); background: linear-gradient(160deg, rgba(232, 67, 74, .35), rgba(232, 67, 74, 0)); }
.mixed-copy p { margin-top: 16px; color: var(--inverse-muted); font-size: 18px; max-width: 44ch; }
.matrix { display: grid; gap: 10px; }
.mrow { display: grid; grid-template-columns: 1fr; gap: 10px; padding: 16px; border-radius: var(--r-md); border: 1px solid var(--inverse-line); background: rgba(255, 255, 255, .03); }
.mrow.is-mixed { border-color: rgba(255, 138, 141, .55); background: rgba(232, 67, 74, .14); }
.mvotes { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.plus { color: var(--inverse-muted); font-weight: 600; }
.marrow { display: none; color: var(--inverse-muted); }
.mres { font-weight: 600; font-size: 17px; }
.mrow.is-mixed .mres { color: var(--on-inverse); }
.vote { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px 6px 10px; border-radius: 999px; background: rgba(255, 255, 255, .1); font-size: 14px; font-weight: 600; color: var(--on-inverse); }
.vote .i { width: 16px; height: 16px; color: var(--inverse-accent); }
.matrix-note { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 6px; color: var(--inverse-muted); font-size: 15px; }
@media (min-width: 900px) {
  .mixed { padding: 24px 0 96px; }
  .mixed-panel { grid-template-columns: 1fr 1.15fr; padding: 56px; gap: 48px; align-items: center; }
  .mrow { grid-template-columns: 210px 24px 1fr; align-items: center; padding: 16px 20px; }
  .marrow { display: block; }
}

/* ---------- grátis + línguas ---------- */
.bento { padding: 0 0 56px; }
.bento-in { display: grid; gap: 16px; }
.tile { border-radius: var(--r-xl); padding: 32px 24px; overflow: hidden; position: relative; }
.tile p { margin-top: 14px; font-size: 18px; max-width: 40ch; }
.tile-free { background: var(--accent); color: var(--on-accent); }
.tile-free h2 { color: var(--on-accent); }
.tile-free p { opacity: .92; }
.tile-link { display: inline-flex; align-items: center; gap: 8px; margin-top: 24px; min-height: 44px; color: var(--on-accent); font-weight: 650; text-decoration: underline; text-underline-offset: 4px; }
.tile-link .i { transition: transform .25s var(--ease); }
.tile-link:hover .i { transform: translateX(4px); }
.tile-langs { background: var(--surface); border: 1px solid var(--line); padding-bottom: 0; }
.tile-langs p { color: var(--muted); }
.marquee { display: flex; gap: 12px; margin: 28px -24px 0; padding-bottom: 28px; overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.marquee ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 12px; flex: none; }
.marquee li { white-space: nowrap; padding: 10px 16px; border-radius: 999px; background: var(--surface-alt); font-weight: 550; font-size: 15px; font-family: var(--font), 'Hiragino Sans', 'Noto Sans', sans-serif; }
@media (prefers-reduced-motion: no-preference) {
  .marquee ul { animation: slide 70s linear infinite; }
  .marquee:hover ul { animation-play-state: paused; }
}
@media (prefers-reduced-motion: reduce) {
  .marquee { flex-wrap: wrap; mask-image: none; -webkit-mask-image: none; margin: 24px 0 0; }
  .marquee ul { flex-wrap: wrap; }
  .marquee ul + ul { display: none; }
}
@keyframes slide { to { transform: translateX(calc(-100% - 12px)); } }
@media (min-width: 900px) {
  .bento { padding-bottom: 96px; }
  .bento-in { grid-template-columns: 5fr 7fr; }
  .tile { padding: 48px; }
  .tile-langs { padding-bottom: 0; }
  .marquee { margin: 36px -48px 0; padding-bottom: 48px; }
}

/* ---------- fecho ---------- */
.closing { padding: 24px 0 80px; }
.closing-in { display: grid; justify-items: center; text-align: center; gap: 20px; }
.closing-in .mark { width: 88px; height: 88px; }
.closing-q { font-size: clamp(30px, 7vw, 48px); font-weight: 750; letter-spacing: -0.035em; line-height: 1.1; max-width: 18ch; text-wrap: balance; }

/* revelar ao entrar no ecrã (site.js põe .is-in) */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s var(--ease), transform .7s var(--ease); transition-delay: calc(var(--i, 0) * 80ms); }
  .js .reveal.is-in { opacity: 1; transform: none; }
  .js .step:nth-child(2) { --i: 1; }
  .js .step:nth-child(3) { --i: 2; }
}

/* ---------- rodapé ---------- */
.foot { border-top: 1px solid var(--line); padding: 40px 0 calc(32px + env(safe-area-inset-bottom)); font-size: 15px; }
.foot-in { display: grid; gap: 24px; }
.foot-brand p { margin-top: 8px; color: var(--muted); }
.foot-links { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.foot-links a, .foot-lang a { color: var(--text); text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; }
.foot-links a:hover, .foot-lang a:hover { text-decoration: underline; }
.foot-lang { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; color: var(--muted); }
.foot-lang a[aria-current] { font-weight: 650; }
.foot-copy { color: var(--muted); font-size: 14px; }
@media (min-width: 900px) {
  .foot-in { grid-template-columns: 1fr auto; align-items: start; }
  .foot-links { justify-content: flex-end; max-width: 560px; }
  .foot-lang { grid-column: 2; justify-content: flex-end; }
  .foot-copy { grid-row: 2; grid-column: 1; align-self: end; }
}

/* ---------- páginas de texto ---------- */
.page { padding: 40px 0 72px; }
.page-in { max-width: 860px; }
.page-head h1, .doc-head h1 { font-size: clamp(36px, 8.4vw, 56px); letter-spacing: -0.04em; font-weight: 800; }
.page-head { margin-bottom: 32px; }
.pill { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--text); text-decoration: none; font-weight: 600; font-size: 15px; }
.pill:hover { background: var(--surface-alt); }

/* Ajuda */
.faq { display: grid; gap: 10px; }
.qa { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); }
.qa summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 20px; min-height: 56px; }
.qa summary::-webkit-details-marker { display: none; }
.qa summary h2 { font-size: 18px; letter-spacing: -0.01em; font-weight: 650; line-height: 1.3; }
.caret { transition: transform .3s var(--ease); color: var(--muted); }
details[open] > summary .caret { transform: rotate(180deg); }
.qa-a { padding: 0 20px 20px; display: grid; gap: 12px; color: var(--muted); }
.qa-a b { color: var(--text); }
.contact { margin-top: 32px; display: flex; gap: 16px; align-items: flex-start; padding: 24px; border-radius: var(--r-lg); background: var(--surface-alt); }
.contact-ic { width: 28px; height: 28px; color: var(--accent-ink); }
.contact h2 { font-size: 22px; margin-bottom: 6px; }

/* Eliminar conta */
.del-grid { display: grid; gap: 16px; }
.del-card { border-radius: var(--r-lg); padding: 24px; background: var(--surface); border: 1px solid var(--line); }
.del-card h2, .del-data h2 { display: flex; align-items: center; gap: 10px; font-size: 21px; margin-bottom: 14px; }
.del-card h2 .i, .del-data h2 .i { color: var(--accent-ink); }
.del-steps { margin: 0; padding: 0; list-style: none; counter-reset: s; display: grid; gap: 12px; }
.del-steps li { counter-increment: s; display: grid; grid-template-columns: 32px 1fr; gap: 12px; align-items: start; }
.del-steps li::before { content: counter(s); width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-ink); font-weight: 700; font-size: 14px; margin-top: 1px; }
.note { margin-top: 18px; padding: 14px 16px; border-radius: var(--r-sm); background: var(--surface-alt); font-size: 15px; color: var(--muted); }
.del-mail p { color: var(--muted); }
.del-data { margin-top: 40px; display: grid; gap: 32px; }
.del-data ul { margin: 0; padding-left: 20px; display: grid; gap: 8px; color: var(--muted); }
.del-data p { color: var(--muted); max-width: 62ch; }
.more { margin-top: 40px; color: var(--muted); }
@media (min-width: 900px) {
  .page { padding: 64px 0 112px; }
  .del-grid { grid-template-columns: 1.4fr 1fr; }
  .del-data { grid-template-columns: 1fr 1fr; gap: 40px 48px; }
}

/* Créditos */
.credits { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.credits li { display: grid; grid-template-columns: 64px 1fr; gap: 16px; align-items: center; padding: 12px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); }
.credits img { width: 64px; height: 64px; object-fit: cover; border-radius: var(--r-sm); }
.credits p { min-width: 0; overflow-wrap: anywhere; }
.credits span { display: block; color: var(--muted); font-size: 15px; }

/* Textos legais */
.doc { padding: 40px 0 72px; }
.doc-in { display: grid; gap: 28px; }
.doc-head { display: grid; gap: 14px; justify-items: start; }
.doc-meta { color: var(--muted); }
.toc details { border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); }
.toc summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; min-height: 52px; font-weight: 650; }
.toc summary::-webkit-details-marker { display: none; }
.toc ol { margin: 0; padding: 0 18px 16px 38px; display: grid; gap: 4px; }
.toc a { color: var(--text); text-decoration: none; display: block; padding: 4px 0; }
.toc a:hover { color: var(--accent-ink); text-decoration: underline; }
.prose { max-width: 68ch; min-width: 0; }
.prose h2 { font-size: 26px; letter-spacing: -0.025em; margin: 44px 0 14px; scroll-margin-top: 88px; }
.prose h2:first-child { margin-top: 0; }
.prose p, .prose ul { margin: 0 0 16px; }
.prose ul { padding-left: 22px; display: grid; gap: 8px; }
.prose a { overflow-wrap: anywhere; }
.to-top { margin-top: 40px !important; }
@media (min-width: 1024px) {
  .doc { padding: 64px 0 112px; }
  .doc-in { grid-template-columns: 260px minmax(0, 1fr); column-gap: 64px; }
  .doc-head { grid-column: 1 / -1; }
  .toc { position: sticky; top: 96px; align-self: start; }
  .toc details { border: 0; background: transparent; }
  .toc summary { padding: 0 0 10px; min-height: 0; pointer-events: none; color: var(--muted); font-size: 14px; }
  .toc summary .caret { display: none; }
  .toc ol { padding: 0 0 0 24px; font-size: 15px; }
}

/* 404 */
.nf-in { display: grid; justify-items: center; text-align: center; gap: 12px; padding: 40px 16px; }
.nf .mark { width: 96px; height: 96px; margin-bottom: 12px; }
.nf h1 { font-size: clamp(34px, 8vw, 52px); letter-spacing: -0.04em; font-weight: 800; }
.nf-links { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 16px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; }
}
