/* Tordroid design system: shared by tordroid.com, docalto.tordroid.com and droidstream.tordroid.com.
   Source: shared/site.css. Run `node tools/sync-shared.mjs` to copy it into each site's public/assets/. */

/* ---------- Tokens ---------- */
:root {
  color-scheme: dark;
  --bg: #0d0c0a;
  --bg-2: #12110e;
  --surface: #171612;
  --surface-2: #1f1d18;
  --surface-3: #29261f;
  --line: rgba(255, 244, 220, .09);
  --line-2: rgba(255, 244, 220, .16);
  --text: #f5f2ea;
  --text-2: #b4ae9f;
  --text-3: #8a8476;
  --gold: #e8b84a;
  --gold-2: #f6d27a;
  --gold-deep: #b98a22;
  --gold-text: #f0c35c;
  --gold-soft: rgba(232, 184, 74, .12);
  --ok: #4fd18b;
  --ok-soft: rgba(79, 209, 139, .12);
  --info: #7cb4ff;
  --info-soft: rgba(124, 180, 255, .12);

  /* Per-app accent (Tordroid gold by default) */
  --accent: var(--gold);
  --accent-2: var(--gold-2);
  --accent-ink: #17130a;
  --accent-text: var(--gold-text);
  --accent-soft: var(--gold-soft);
  --accent-glow: rgba(232, 184, 74, .28);
  --grad-a: var(--accent-2);
  --grad-b: var(--accent);

  --shadow-1: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .28);
  --shadow-2: 0 2px 6px rgba(0, 0, 0, .45), 0 24px 64px rgba(0, 0, 0, .45);
  --header-bg: rgba(13, 12, 10, .78);

  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 24px;
  --r-xl: 32px;
  --maxw: 1180px;
  --gutter: clamp(16px, 4vw, 32px);
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI Variable Text", "Segoe UI", Roboto, "Noto Sans", "Helvetica Neue", Arial, sans-serif;
  --font-display: ui-sans-serif, system-ui, -apple-system, "Segoe UI Variable Display", "Segoe UI", Roboto, "Noto Sans", "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Code", "SF Mono", "JetBrains Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

[data-app="docalto"] {
  --accent: #e5392b;
  --accent-2: #ff6a5c;
  --accent-btn: #d4301f;
  --accent-ink: #ffffff;
  --accent-text: #ff8378;
  --accent-soft: rgba(229, 57, 43, .13);
  --accent-glow: rgba(229, 57, 43, .3);
}
[data-app="droidstream"] {
  --accent: #f0b43c;
  --accent-2: #ffd77a;
  --accent-ink: #17130a;
  --accent-text: #f4c158;
  --accent-soft: rgba(240, 180, 60, .13);
  --accent-glow: rgba(240, 180, 60, .3);
}

/* Light theme: follows the system unless the visitor picked a theme */
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    color-scheme: light;
    --bg: #faf8f3;
    --bg-2: #f4f1e9;
    --surface: #ffffff;
    --surface-2: #f5f2ea;
    --surface-3: #ebe6da;
    --line: rgba(40, 30, 10, .1);
    --line-2: rgba(40, 30, 10, .18);
    --text: #17150f;
    --text-2: #5a5448;
    --text-3: #6b6558;
    --gold-text: #8a6410;
    --gold-soft: rgba(232, 184, 74, .18);
    --ok: #157a46;
    --ok-soft: rgba(21, 122, 70, .1);
    --info: #1d5fbf;
    --info-soft: rgba(29, 95, 191, .09);
    --accent-text: #8a6410;
    --shadow-1: 0 1px 2px rgba(40, 30, 10, .06), 0 8px 24px rgba(40, 30, 10, .08);
    --shadow-2: 0 2px 6px rgba(40, 30, 10, .08), 0 24px 64px rgba(40, 30, 10, .14);
    --header-bg: rgba(250, 248, 243, .82);
    --grad-a: #b98a22;
    --grad-b: #8a6410;
  }
  :root[data-app="docalto"]:not([data-theme="dark"]) { --grad-a: #d4301f; --grad-b: #a81f14; --accent-text: #b8261a; --accent-soft: rgba(229, 57, 43, .09); }
  :root[data-app="droidstream"]:not([data-theme="dark"]) { --accent-text: #8a6410; --accent-soft: rgba(240, 180, 60, .16); }
}
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #faf8f3;
  --bg-2: #f4f1e9;
  --surface: #ffffff;
  --surface-2: #f5f2ea;
  --surface-3: #ebe6da;
  --line: rgba(40, 30, 10, .1);
  --line-2: rgba(40, 30, 10, .18);
  --text: #17150f;
  --text-2: #5a5448;
  --text-3: #6b6558;
  --gold-text: #8a6410;
  --gold-soft: rgba(232, 184, 74, .18);
  --ok: #157a46;
  --ok-soft: rgba(21, 122, 70, .1);
  --info: #1d5fbf;
  --info-soft: rgba(29, 95, 191, .09);
  --accent-text: #8a6410;
  --shadow-1: 0 1px 2px rgba(40, 30, 10, .06), 0 8px 24px rgba(40, 30, 10, .08);
  --shadow-2: 0 2px 6px rgba(40, 30, 10, .08), 0 24px 64px rgba(40, 30, 10, .14);
  --header-bg: rgba(250, 248, 243, .82);
  --grad-a: #b98a22;
  --grad-b: #8a6410;
}
:root[data-theme="light"][data-app="docalto"] { --grad-a: #d4301f; --grad-b: #a81f14; --accent-text: #b8261a; --accent-soft: rgba(229, 57, 43, .09); }
:root[data-theme="light"][data-app="droidstream"] { --accent-text: #8a6410; --accent-soft: rgba(240, 180, 60, .16); }

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 88px; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.65 var(--font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
@supports (overflow: clip) { body { overflow-x: clip; } }
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
a { color: var(--accent-text); text-underline-offset: .2em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.12; letter-spacing: -.02em; margin: 0; text-wrap: balance; }
p, ul, ol, dl, figure { margin: 0; }
p { text-wrap: pretty; }
code, kbd, pre { font-family: var(--mono); font-size: .9em; }
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--accent); color: var(--accent-ink); padding: 10px 16px; border-radius: var(--r-sm); font-weight: 700; text-decoration: none; transition: top .15s; }
.skip:focus { top: 12px; }
.icon { width: 1.25em; height: 1.25em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon.fill { fill: currentColor; stroke: none; }

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

/* ---------- Header ---------- */
.topline { height: 3px; background: linear-gradient(90deg, var(--gold-deep), var(--gold), var(--accent), var(--gold)); }
.site-header { position: sticky; top: 0; z-index: 50; background: var(--header-bg); -webkit-backdrop-filter: saturate(1.4) blur(14px); backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid var(--line); }
.site-header .bar { display: flex; align-items: center; gap: 12px; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--text); text-decoration: none; min-width: 0; margin-right: auto; }
.brand img { width: 38px; height: 38px; border-radius: 11px; flex: none; box-shadow: 0 0 0 1px var(--line-2); }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; min-width: 0; }
.brand-name { font-family: var(--font-display); font-weight: 750; font-size: 18px; letter-spacing: -.01em; white-space: nowrap; }
.brand-tag { font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-text); white-space: nowrap; }
.brand-by { font-size: 12px; color: var(--text-3); white-space: nowrap; }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a { color: var(--text-2); text-decoration: none; font-size: 15px; font-weight: 500; padding: 8px 12px; border-radius: 999px; transition: color .15s, background .15s; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--text); background: var(--surface-2); }
.tools { display: flex; align-items: center; gap: 6px; }
.icon-btn { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--text-2); cursor: pointer; transition: color .15s, border-color .15s, background .15s; padding: 0; font: inherit; }
.icon-btn:hover { color: var(--text); border-color: var(--line-2); }
.icon-btn .icon { width: 20px; height: 20px; }
.theme-btn .t-light, .theme-btn .t-dark { display: none; }
[data-theme="light"] .theme-btn .t-auto, [data-theme="dark"] .theme-btn .t-auto { display: none; }
[data-theme="light"] .theme-btn .t-light { display: block; }
[data-theme="dark"] .theme-btn .t-dark { display: block; }

/* App switcher */
.switcher { position: relative; }
.switcher > summary { list-style: none; }
.switcher > summary::-webkit-details-marker { display: none; }
.switcher[open] > summary { color: var(--text); border-color: var(--accent); }
.switcher-panel { position: absolute; right: 0; top: calc(100% + 10px); width: min(340px, calc(100vw - 24px)); background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-lg); box-shadow: var(--shadow-2); padding: 8px; z-index: 60; animation: pop .18s var(--ease); }
.switcher-panel p { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); padding: 8px 10px 6px; }
.switcher-panel a { display: grid; grid-template-columns: 40px 1fr auto; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 14px; color: var(--text); text-decoration: none; }
.switcher-panel a:hover, .switcher-panel a:focus-visible { background: var(--surface-2); }
.switcher-panel a[aria-current="page"] { background: var(--accent-soft); }
.switcher-panel img { width: 40px; height: 40px; border-radius: 11px; }
.switcher-panel b { display: block; font-size: 15px; line-height: 1.2; }
.switcher-panel small { display: block; color: var(--text-3); font-size: 12.5px; }
@keyframes pop { from { opacity: 0; transform: translateY(-6px) scale(.98); } to { opacity: 1; transform: none; } }

/* Second row nav on small screens */
@media (max-width: 760px) {
  .site-header .bar { flex-wrap: wrap; row-gap: 0; }
  .site-header .nav { order: 3; width: 100%; overflow-x: auto; scrollbar-width: none; margin: 0 calc(var(--gutter) * -1); padding: 0 var(--gutter) 10px; width: calc(100% + var(--gutter) * 2); }
  .site-header .nav::-webkit-scrollbar { display: none; }
  .nav a { font-size: 14px; padding: 6px 12px; background: var(--surface); border: 1px solid var(--line); white-space: nowrap; }
}
@media (max-width: 380px) {
  .brand-tag, .brand-by { display: none; }
}

/* ---------- Buttons, badges, chips ---------- */
.btn { --b-bg: var(--surface-2); --b-fg: var(--text); --b-line: var(--line-2);
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 12px 22px;
  border-radius: 14px; border: 1px solid var(--b-line); background: var(--b-bg); color: var(--b-fg);
  font: 650 16px/1.2 var(--font); text-decoration: none; cursor: pointer; text-align: center;
  transition: transform .18s var(--ease), box-shadow .18s var(--ease), background .18s, border-color .18s; }
.btn:hover { transform: translateY(-2px); text-decoration: none; border-color: var(--accent); }
.btn:active { transform: translateY(0); }
.btn .icon { width: 20px; height: 20px; }
.btn-primary { --b-bg: var(--accent-btn, var(--accent)); --b-fg: var(--accent-ink); --b-line: transparent; box-shadow: 0 8px 28px -8px var(--accent-glow), inset 0 1px 0 rgba(255,255,255,.25); }
.btn-primary:hover { box-shadow: 0 14px 36px -10px var(--accent-glow), inset 0 1px 0 rgba(255,255,255,.25); border-color: transparent; }
.btn-gold { --b-bg: var(--gold); --b-fg: #17130a; --b-line: transparent; }
.btn-ghost { --b-bg: transparent; }
.btn-lg { min-height: 56px; padding: 14px 28px; font-size: 17px; border-radius: 16px; }
.btn-sm { min-height: 38px; padding: 8px 14px; font-size: 14px; border-radius: 11px; }
.btn-col { flex-direction: column; gap: 2px; line-height: 1.15; }
.btn-col small { font-size: 12.5px; font-weight: 500; opacity: .8; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

.badge { display: inline-flex; align-items: center; gap: 7px; padding: 5px 11px; border-radius: 999px; font-size: 13px; font-weight: 600; line-height: 1.2; background: var(--surface-2); color: var(--text-2); border: 1px solid var(--line); white-space: nowrap; }
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: none; }
.badge.plain::before { display: none; }
.badge.live { color: var(--ok); background: var(--ok-soft); border-color: transparent; }
.badge.live::before { box-shadow: 0 0 0 0 currentColor; animation: ping 2.4s infinite; }
.badge.soon { color: var(--gold-text); background: var(--gold-soft); border-color: transparent; }
.badge.test { color: var(--info); background: var(--info-soft); border-color: transparent; }
.badge.invite { color: var(--text-2); }
@keyframes ping { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, currentColor 60%, transparent); } 70%, 100% { box-shadow: 0 0 0 7px transparent; } }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips span, .chip { display: inline-block; border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 5px 12px; font-size: 13.5px; color: var(--text-2); }

/* ---------- Layout blocks ---------- */
.section { padding-block: clamp(56px, 9vw, 112px); }
.section.tight { padding-block: clamp(40px, 6vw, 72px); }
.section + .section { padding-top: 0; }
.section-head { display: grid; gap: 14px; max-width: 760px; margin-bottom: clamp(28px, 4vw, 48px); }
.section-head.center { margin-inline: auto; text-align: center; justify-items: center; }
.kicker { display: inline-flex; align-items: center; gap: 8px; color: var(--accent-text); font-size: 13px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.kicker::before { content: ""; width: 18px; height: 2px; border-radius: 2px; background: currentColor; }
.h2 { font-size: clamp(28px, 4.4vw, 46px); font-weight: 780; }
.h3 { font-size: clamp(19px, 2vw, 22px); font-weight: 700; letter-spacing: -.01em; }
.lead { font-size: clamp(17px, 1.6vw, 20px); color: var(--text-2); max-width: 62ch; }
.muted { color: var(--text-2); }
.small { font-size: 14px; }
.grad-text { background: linear-gradient(100deg, var(--text) 0%, var(--text) 40%, var(--grad-a) 70%, var(--grad-b) 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* Ambient backdrop used by heroes */
.ambient { position: relative; isolation: isolate; overflow-x: clip; }
.ambient::before { content: ""; position: absolute; inset: 0; z-index: -2;
  background:
    radial-gradient(900px 520px at 85% 10%, var(--accent-soft), transparent 65%),
    radial-gradient(700px 420px at 5% 90%, var(--gold-soft), transparent 70%); }
.ambient::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 56px 56px; background-position: -1px -1px;
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 60% 30%, #000 20%, transparent 75%);
  mask-image: radial-gradient(ellipse 80% 70% at 60% 30%, #000 20%, transparent 75%); opacity: .7; }

/* Cards */
.card { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: clamp(20px, 2.6vw, 28px); box-shadow: var(--shadow-1); }
.card.flat { box-shadow: none; }
.card-glow { transition: transform .25s var(--ease), border-color .25s; }
.card-glow::after { content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; pointer-events: none;
  background: linear-gradient(140deg, var(--accent), transparent 35%, transparent 65%, var(--gold));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; opacity: 0; transition: opacity .25s; }
.card-glow:hover { transform: translateY(-3px); }
.card-glow:hover::after { opacity: 1; }

.grid { display: grid; gap: clamp(14px, 2vw, 20px); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); }

/* Feature tile */
.tile h3 { font-size: 18px; font-weight: 700; margin: 16px 0 8px; letter-spacing: -.01em; }
.tile p { color: var(--text-2); font-size: 15.5px; }
.tile ul { margin: 12px 0 0; padding: 0; list-style: none; display: grid; gap: 6px; color: var(--text-2); font-size: 15px; }
.tile li { position: relative; padding-left: 22px; }
.tile li::before { content: ""; position: absolute; left: 3px; top: .62em; width: 8px; height: 8px; border-radius: 3px; background: var(--accent); opacity: .85; transform: rotate(45deg); }
.ico { display: inline-grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; background: var(--accent-soft); color: var(--accent-text); border: 1px solid var(--line); }
.ico .icon { width: 24px; height: 24px; }

/* ---------- Device frame and carousel ---------- */
.device { position: relative; width: var(--dw, 240px); border-radius: calc(var(--dw, 240px) * .14); padding: calc(var(--dw, 240px) * .035);
  background: linear-gradient(160deg, #3a362d, #121110 40%, #0a0908); box-shadow: var(--shadow-2), inset 0 0 0 1px rgba(255,255,255,.08); }
.device img { width: 100%; border-radius: calc(var(--dw, 240px) * .11); background: #000; }
.device::before { content: ""; position: absolute; top: calc(var(--dw, 240px) * .065); left: 50%; width: 9%; aspect-ratio: 1; border-radius: 50%; transform: translateX(-50%); background: #050505; box-shadow: inset 0 0 0 2px #1d1b18; z-index: 1; }

.carousel { position: relative; }
.carousel-track { display: flex; gap: clamp(16px, 2.4vw, 28px); overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: var(--gutter);
  padding: 12px var(--gutter) 28px; margin-inline: calc(var(--gutter) * -1); scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; overscroll-behavior-x: contain; }
.carousel-track:focus-visible { outline-offset: -2px; }
.carousel-track > figure { flex: 0 0 auto; scroll-snap-align: start; display: grid; gap: 14px; justify-items: center; }
.carousel-track figcaption { text-align: center; max-width: var(--dw, 240px); }
.carousel-track figcaption b { display: block; font-size: 15.5px; }
.carousel-track figcaption span { color: var(--text-2); font-size: 14px; }
.carousel-nav { display: flex; gap: 8px; }
.carousel-nav button { width: 44px; height: 44px; }
.carousel-nav button[disabled] { opacity: .35; cursor: default; }
.carousel-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 12px; }
.carousel-head .section-head { margin-bottom: 0; }
html:not(.js) .carousel-nav { display: none; }

/* ---------- Steps, code, notes ---------- */
.steps { list-style: none; padding: 0; margin: 0; counter-reset: s; display: grid; gap: 14px; }
.steps > li { counter-increment: s; position: relative; padding: 18px 20px 18px 68px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); }
.steps > li::before { content: counter(s); position: absolute; left: 18px; top: 16px; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 11px; background: var(--accent); color: var(--accent-ink); font-weight: 800; font-size: 15px; }
.steps b { display: block; margin-bottom: 2px; }
.steps p { color: var(--text-2); font-size: 15px; }

.code { position: relative; display: flex; align-items: flex-start; gap: 12px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 14px; padding: 12px 12px 12px 16px; }
.code code { flex: 1; min-width: 0; padding-top: 7px; font-size: 14px; line-height: 1.55; color: var(--text); overflow-wrap: anywhere; word-break: break-all; }
.code .copy { flex: none; }
.code-label { display: block; font-size: 13px; color: var(--text-3); font-weight: 600; margin: 16px 0 6px; }
.copy[data-done]::after { content: attr(data-done); position: absolute; right: 56px; top: 50%; transform: translateY(-50%); background: var(--ok); color: #04130b; font-size: 12px; font-weight: 700; padding: 3px 8px; border-radius: 6px; }

.notice { display: flex; gap: 14px; align-items: flex-start; background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: var(--r-md); padding: 16px 18px; color: var(--text-2); font-size: 15px; }
.notice .icon { color: var(--accent-text); margin-top: 2px; }
.notice strong { color: var(--text); }

/* Accordion */
.acc { border-top: 1px solid var(--line); }
.acc:last-child { border-bottom: 1px solid var(--line); }
.acc summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 4px; cursor: pointer; list-style: none; font-weight: 650; font-size: 17px; }
.acc summary::-webkit-details-marker { display: none; }
.acc summary::after { content: ""; width: 10px; height: 10px; flex: none; border-right: 2px solid var(--text-2); border-bottom: 2px solid var(--text-2); transform: rotate(45deg) translate(-2px, -2px); transition: transform .2s var(--ease); }
.acc[open] summary::after { transform: rotate(225deg) translate(-2px, -2px); }
.acc summary:hover { color: var(--accent-text); }
.acc .acc-body { padding: 0 4px 20px; color: var(--text-2); }
.acc ul { margin: 0; padding-left: 20px; display: grid; gap: 6px; }

/* Prose (legal pages, release notes) */
.prose { color: var(--text-2); font-size: 16.5px; line-height: 1.75; overflow-wrap: break-word; }
.prose h1 { color: var(--text); font-size: clamp(28px, 4vw, 40px); font-weight: 780; margin-bottom: 8px; }
.prose h2 { color: var(--text); font-size: 21px; font-weight: 720; margin: 40px 0 12px; padding-top: 20px; border-top: 1px solid var(--line); }
.prose h3 { color: var(--text); font-size: 18px; margin: 24px 0 8px; }
.prose p, .prose ul, .prose ol { margin: 0 0 14px; }
.prose ul, .prose ol { padding-left: 22px; }
.prose li { margin: 6px 0; }
.prose li::marker { color: var(--accent-text); }
.prose strong { color: var(--text); }
.prose code { background: var(--surface-2); border: 1px solid var(--line); padding: 1px 6px; border-radius: 6px; font-size: .88em; }
.prose a { overflow-wrap: anywhere; }
.prose .updated { color: var(--text-3); font-size: 15px; margin-bottom: 24px; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); background: var(--bg-2); padding: clamp(40px, 6vw, 64px) 0 32px; margin-top: clamp(40px, 6vw, 80px); font-size: 15px; }
.foot-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 32px; }
.foot-brand { display: grid; gap: 14px; align-content: start; max-width: 320px; }
.foot-brand .brand { margin: 0; }
.foot-brand p { color: var(--text-2); font-size: 14.5px; }
.site-footer h2 { font-size: 13px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--text-3); margin-bottom: 14px; }
.site-footer ul { list-style: none; padding: 0; display: grid; gap: 10px; }
.site-footer ul a { color: var(--text-2); text-decoration: none; display: inline-flex; align-items: center; gap: 8px; }
.site-footer ul a:hover { color: var(--text); text-decoration: underline; }
.site-footer ul .icon { width: 18px; height: 18px; }
.foot-base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--line); color: var(--text-3); font-size: 13.5px; }
@media (max-width: 860px) { .foot-grid { grid-template-columns: 1fr 1fr; } .foot-brand { grid-column: 1 / -1; } }
@media (max-width: 420px) { .foot-grid { grid-template-columns: 1fr; } }

/* ---------- 404 ---------- */
.lost { min-height: 62vh; display: grid; place-items: center; text-align: center; }
.lost .big { font-family: var(--font-display); font-size: clamp(88px, 20vw, 180px); font-weight: 850; line-height: 1; letter-spacing: -.05em; }
.lost p { color: var(--text-2); margin: 12px auto 28px; max-width: 46ch; }
.lost .actions { justify-content: center; }

/* ---------- Motion ---------- */
html.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease); transition-delay: var(--d, 0s); }
html.js .reveal.in { opacity: 1; transform: none; }
/* If ui.js never runs, show everything after a moment */
html.js:not(.ui) .reveal { animation: reveal-fallback .4s 2s forwards; }
@keyframes reveal-fallback { to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  html.js .reveal { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

@media print {
  .site-header, .site-footer, .topline, .skip, .carousel-nav { display: none !important; }
  body { background: #fff; color: #000; }
}
html:not(.js) .theme-btn { display: none; }
