/* ============================================================================
   Fenris site design system.

   Derived from the Flutter app so the website and the product read as one:
   colours, radii and type sizes follow lib/ui/cinematic/cinematic_tokens.dart
   with the default Deep Crimson theme (lib/theme/launcher_themes.dart); the
   launcher, tab bar, sidebar, pill chips and poster grid follow the app's own
   screens. Two deliberate deviations, both for web accessibility:
     - text in the accent colour uses --accent-text, a lighter crimson, because
       #A51C30 on black is below the 4.5:1 contrast text needs;
     - "faint" text is 52% white instead of the app's 38%, for the same reason.
   ========================================================================== */

:root {
    --bg: #000000;
    --surface: #030206;          /* lerp(black, bgGradient.last, 0.18) */
    --raised: #0a0810;           /* launcher tile panel */
    --bar: #07060c;              /* tab bar / sidebar */
    --field: #16151c;            /* search field */
    --accent: #a51c30;           /* Deep Crimson glowColor */
    --accent-text: #e0566b;
    --accent-soft: color-mix(in srgb, var(--accent) 16%, #000);
    --on-accent: #ffffff;
    --text: #ffffff;
    --muted: rgba(255, 255, 255, .66);
    --faint: rgba(255, 255, 255, .52);
    --hair: rgba(255, 255, 255, .09);
    --hair-strong: rgba(255, 255, 255, .18);
    --success: #4ade80;
    --danger: #ff6b6b;
    --r-tight: 3px;
    --r-card: 4px;
    --r-panel: 8px;
    --font: "Roboto", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
    --gutter: clamp(16px, 5vw, 64px);
    --max: 1240px;
    --focus-scale: 1.04;
    color-scheme: dark;
}

/* ── Base ─────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font: 400 16px/1.55 var(--font);
    -webkit-font-smoothing: antialiased;
}
/* Ambient backdrop: soft accent glows on a fixed layer behind every page, so
   sections stay transparent instead of flat black. Built on --accent, so the
   home page's theme swatches recolour it. Drift is transform-only (compositor). */
body::before {
    content: ""; position: fixed; inset: -15vmax; z-index: -1; pointer-events: none;
    background:
        radial-gradient(42vmax 26vmax at 30% 18%, color-mix(in srgb, var(--accent) 30%, transparent), transparent 70%),
        radial-gradient(36vmax 30vmax at 82% 40%, rgba(40, 16, 90, .42), transparent 70%),
        radial-gradient(44vmax 26vmax at 50% 100%, color-mix(in srgb, var(--accent) 14%, transparent), transparent 70%);
    animation: backdrop-drift 40s ease-in-out infinite alternate;
}
@keyframes backdrop-drift { to { transform: translate3d(4vmax, -3vmax, 0) scale(1.1); } }
/* Star canvas from fenris-public.js, above the glow and behind everything else. */
.sky { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; }
.fenris-elite-hero, .fenris-elite-section, .fenris-elite-home-section { background: transparent; }
.fenris-elite-hero::after { display: none; }
/* Legal pages: title block shares the text column instead of the page edge. */
.fenris-legal-head { max-width: 780px; margin-inline: auto; }
.fenris-legal-hero + .fenris-elite-section { padding-top: 0; }
img, svg { max-width: 100%; }
a { color: var(--accent-text); }
a:hover { color: #fff; }
h1, h2, h3, h4 { margin: 0; font-weight: 700; line-height: 1.15; text-wrap: balance; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 3px; border-radius: 2px; }
.container { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ic { width: 1.25em; height: 1.25em; fill: currentColor; flex: 0 0 auto; vertical-align: -0.25em; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 100; padding: 10px 14px; background: var(--accent); color: #fff; border-radius: var(--r-card); }
.skip-link:focus { top: 12px; }

/* ── Header: the app's tab bar ────────────────────────────────────────── */
.site-head {
    position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50;
    background: color-mix(in srgb, var(--bar) 92%, transparent);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--hair);
}
.site-head .container { display: flex; align-items: center; gap: 24px; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-weight: 700; font-size: 17px; white-space: nowrap; }
.brand svg { width: 38px; height: 30px; }
.brand:hover { color: #fff; }
.tabs { display: flex; align-items: center; margin: 0; padding: 0; list-style: none; }
.tabs li + li { border-left: 1px solid var(--hair); }
.tabs a { display: block; padding: 6px 18px; color: rgba(255, 255, 255, .72); text-decoration: none; font-weight: 500; font-size: 15px; }
.tabs a:hover { color: #fff; }
.tabs a[aria-current="page"] { color: var(--accent-text); }
.head-cta { margin-left: auto; }
.tabs-download { display: none; }
.menu-btn { display: none; margin-left: auto; background: none; border: 1px solid var(--hair); color: #fff; border-radius: var(--r-panel); width: 42px; height: 42px; align-items: center; justify-content: center; cursor: pointer; }
.menu-btn .ic { width: 22px; height: 22px; }

@media (max-width: 860px) {
    .menu-btn { display: inline-flex; }
    .tabs-download { display: list-item; }
    .site-head .head-cta { display: none; }
    .site-head nav { position: absolute; left: 0; right: 0; top: 64px; background: var(--bar); border-bottom: 1px solid var(--hair); display: none; padding: 8px var(--gutter) 18px; }
    .site-head.is-open nav { display: block; }
    .tabs { flex-direction: column; align-items: stretch; }
    .tabs li + li { border-left: 0; border-top: 1px solid var(--hair); }
    .tabs a { padding: 14px 4px; font-size: 16px; }
}

/* ── Pills (the app's chips) and info chips ───────────────────────────── */
.pill {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 44px; padding: 0 20px; border-radius: 999px;
    font: 600 15px/1 var(--font); text-decoration: none; cursor: pointer;
    color: rgba(255, 255, 255, .88); background: rgba(255, 255, 255, .07); border: 1px solid var(--hair);
    transition: transform .16s ease-out, background .16s, border-color .16s, box-shadow .16s;
}
.pill:hover { color: #fff; border-color: var(--hair-strong); background: rgba(255, 255, 255, .11); }
.pill--on { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.pill--on:hover { background: color-mix(in srgb, var(--accent) 88%, #fff); border-color: transparent; color: var(--on-accent); box-shadow: 0 0 22px 1px color-mix(in srgb, var(--accent) 45%, transparent); }
.pill:focus-visible { transform: scale(var(--focus-scale)); }
.pill .ic { width: 20px; height: 20px; }
.pill-row { display: flex; flex-wrap: wrap; gap: 10px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: rgba(255, 255, 255, .07); border: 1px solid var(--hair); font-size: 13.5px; font-weight: 700; color: rgba(255, 255, 255, .9); }
.chip .ic { width: 17px; height: 17px; color: var(--accent-text); }

/* ── Type helpers ─────────────────────────────────────────────────────── */
.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: 1.6px; text-transform: uppercase; color: var(--faint); }
.display { font-size: clamp(34px, 5vw, 58px); line-height: 1.04; letter-spacing: -.02em; }
.title { font-size: clamp(26px, 3.2vw, 38px); letter-spacing: -.01em; }
.lede { font-size: clamp(16px, 1.4vw, 18px); color: var(--muted); max-width: 58ch; }
.muted { color: var(--muted); }

/* ── Sections ─────────────────────────────────────────────────────────── */
main { display: block; }
.section { padding-block: clamp(56px, 8vw, 104px); }
.section + .section { border-top: 1px solid var(--hair); }
.hero + .section { padding-top: clamp(24px, 4vw, 56px); }
.section-head { display: grid; gap: 12px; margin-bottom: clamp(28px, 4vw, 44px); max-width: 760px; }

/* ── Hero ─────────────────────────────────────────────────────────────── */
@property --fx { syntax: "<percentage>"; inherits: true; initial-value: 10%; }
.hero {
    position: relative; isolation: isolate; overflow: hidden;
    padding-block: clamp(40px, 6vw, 88px) clamp(56px, 7vw, 96px);
}
.hero-grid { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(28px, 4vw, 64px); align-items: center; }
.hero-copy { display: grid; gap: 20px; justify-items: start; }
.themes { display: grid; gap: 8px; margin-top: 6px; }
.themes-row { display: flex; gap: 8px; flex-wrap: wrap; }
.themes button { width: 26px; height: 26px; border-radius: 999px; border: 2px solid transparent; padding: 0; cursor: pointer; box-shadow: inset 0 0 0 1px var(--hair); }
.themes button[aria-pressed="true"] { border-color: #fff; }
.themes-name { font-size: 13px; color: var(--muted); }
@media (max-width: 960px) { .hero-grid { grid-template-columns: 1fr; } }

/* ── The launcher (home screen), drawn in container units ─────────────── */
.device-frame { border: clamp(4px, .6vw, 9px) solid #16161c; border-radius: 10px; overflow: hidden; box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .9); background: #000; }
.launcher { container-type: inline-size; position: relative; isolation: isolate; padding-bottom: 8cqw; background: linear-gradient(180deg, var(--surface), #000); transition: --fx .32s cubic-bezier(.33, 1, .68, 1); }
.launcher::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(70% 90% at var(--fx) 22%, color-mix(in srgb, var(--accent) 30%, transparent), transparent 70%); }
.launcher::after { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(115% 115% at 50% 50%, transparent 45%, rgba(0, 0, 0, .6)); }
.l-head { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 3.2cqw 5cqw 0; }
.l-clock b { display: block; font-size: 2.6cqw; font-weight: 700; letter-spacing: -.02em; line-height: 1.1; }
.l-clock span { font-size: 1.05cqw; color: var(--muted); }
.l-head .l-logo { width: 6.2cqw; height: auto; }
.l-search { justify-self: end; display: inline-flex; align-items: center; gap: .6cqw; font-size: 1.1cqw; font-weight: 600; color: var(--muted); padding: .7cqw 1.4cqw; border: 1px solid var(--hair); border-radius: 999px; }
.l-search .ic { width: 1.5cqw; height: 1.5cqw; }
.l-cards { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1.6cqw; padding: 4.2cqw 5cqw 0; }
.l-card { position: relative; aspect-ratio: 1 / .78; border-radius: .7cqw; background: var(--raised); border: 1px solid var(--hair); padding: 1.5cqw 1.2cqw 1.4cqw 1.7cqw; display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; transition: transform .18s ease-out, box-shadow .18s ease-out; }
.l-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: .3cqw; background: var(--accent); }
.l-card .ic { width: 2.4cqw; height: 2.4cqw; color: var(--muted); }
.l-card b { display: block; font-size: 1.3cqw; font-weight: 700; letter-spacing: .1cqw; line-height: 1.1; }
.l-card small { display: block; margin-top: .5cqw; font-size: .9cqw; font-weight: 700; letter-spacing: .14cqw; text-transform: uppercase; color: rgba(255, 255, 255, .38); min-height: 1.2em; }
.l-card.is-focused { transform: scale(1.04); box-shadow: 0 0 0 .22cqw #fff, 0 0 2.4cqw .35cqw color-mix(in srgb, var(--accent) 55%, transparent); z-index: 2; }
.l-cw { padding: 3cqw 5cqw 0; }
.l-cw b { display: block; margin-bottom: 1.1cqw; font-size: 1.35cqw; font-weight: 600; }
.l-cw-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.4cqw; }
.cw { position: relative; aspect-ratio: 16 / 9; border-radius: .4cqw; overflow: hidden; }
.cw span { position: absolute; left: .8cqw; bottom: 1.3cqw; font-size: .95cqw; font-weight: 700; text-shadow: 0 1px 4px rgba(0, 0, 0, .7); }
.cw i { position: absolute; left: 0; bottom: 0; height: .3cqw; background: var(--accent); }
.l-status { position: absolute; left: 5cqw; right: 5cqw; bottom: 2.4cqw; display: flex; align-items: center; gap: 1.6cqw; font-size: 1cqw; color: var(--muted); }
.l-status .exp { display: inline-flex; gap: .5cqw; align-items: center; padding: .45cqw 1.1cqw; border-radius: 999px; border: 1px solid var(--hair); color: #fff; font-weight: 600; }
.l-status .exp::before { content: ""; width: .6cqw; height: .6cqw; border-radius: 50%; background: var(--success); }
.l-status .sp { flex: 1; }
.l-status .act { display: inline-flex; align-items: center; gap: .4cqw; font-weight: 600; }
.l-status .act .ic { width: 1.35cqw; height: 1.35cqw; }

/* Placeholder artwork: made-up titles, never real posters. */
.art1 { background: linear-gradient(160deg, #2e4c63, #0e1a24 70%); }
.art2 { background: linear-gradient(170deg, #6b3f2a, #1c1210 75%); }
.art3 { background: linear-gradient(150deg, #34533f, #0c1611 70%); }
.art4 { background: linear-gradient(165deg, #4a3b62, #120f1b 75%); }
.art5 { background: linear-gradient(155deg, #5f5a36, #16150c 72%); }
.art6 { background: linear-gradient(160deg, #5a2f3c, #150b10 72%); }
.art7 { background: linear-gradient(150deg, #2f5557, #0b1516 72%); }

/* ── Screen tour: the app's other screens ─────────────────────────────── */
.tour { display: grid; gap: clamp(48px, 7vw, 96px); }
.tour-row { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: clamp(24px, 4vw, 64px); align-items: center; }
.tour-row:nth-child(even) { grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); }
.tour-row:nth-child(even) .tour-text { order: 2; }
.tour-text { display: grid; gap: 14px; justify-items: start; }
.tour-text h3 { font-size: clamp(22px, 2.4vw, 30px); }
.tour-text ul { margin: 4px 0 0; padding: 0; list-style: none; display: grid; gap: 8px; color: var(--muted); }
.tour-text li { display: flex; gap: 10px; align-items: flex-start; }
.tour-text li .ic { color: var(--accent-text); width: 20px; height: 20px; margin-top: 2px; }
@media (max-width: 860px) { .tour-row, .tour-row:nth-child(even) { grid-template-columns: 1fr; } .tour-row:nth-child(even) .tour-text { order: 0; } }

.appf { container-type: inline-size; aspect-ratio: 16 / 9; border-radius: var(--r-panel); overflow: hidden; background: #050409; border: 1px solid var(--hair); box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .9); position: relative; }
.a-tabs { display: flex; align-items: center; height: 7.2cqw; padding: 0 2.4cqw; border-bottom: 1px solid var(--hair); background: var(--bar); font-size: 2.3cqw; font-weight: 600; color: rgba(255, 255, 255, .72); }
.a-tabs > span { padding: 0 2.2cqw; border-right: 1px solid var(--hair); }
.a-tabs > span:last-of-type { border-right: 0; }
.a-tabs > span.on { color: var(--accent-text); }
.a-tabs .srch { margin-left: auto; width: 34%; height: 5.4cqw; border-radius: .8cqw; background: var(--field); display: flex; align-items: center; gap: 1cqw; padding: 0 1.6cqw; font-size: 2cqw; color: rgba(255, 255, 255, .38); font-weight: 400; }
.a-tabs .srch .ic { width: 2.6cqw; height: 2.6cqw; }
.a-body { display: grid; height: calc(100% - 7.2cqw); }
.a-live { grid-template-columns: 18% 26.5% minmax(0, 1fr); }
.a-vod { grid-template-columns: 18% minmax(0, 1fr); }
.a-side { background: var(--bar); border-right: 1px solid var(--hair); padding: 1.2cqw .8cqw; display: flex; flex-direction: column; gap: .4cqw; }
.a-cat { display: flex; justify-content: space-between; align-items: center; padding: 1.3cqw 1.4cqw; border-radius: .6cqw; font-size: 1.9cqw; font-weight: 600; position: relative; }
.a-cat small { color: rgba(255, 255, 255, .38); font-size: 1.6cqw; }
.a-cat.on { background: var(--accent-soft); color: var(--accent-text); }
.a-cat.on::before { content: ""; position: absolute; left: .6cqw; top: 25%; bottom: 25%; width: .35cqw; border-radius: 1px; background: var(--accent); }
.a-side-top { display: grid; place-items: center; gap: 1cqw; padding: 1.4cqw 0 2cqw; border-bottom: 1px solid var(--hair); margin-bottom: 1cqw; font-size: 1.7cqw; color: var(--muted); }
.a-side-top .round { width: 6cqw; height: 6cqw; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--hair); background: #0c0b12; }
.a-side-top .round .ic { width: 3cqw; height: 3cqw; }
.a-chans { border-right: 1px solid var(--hair); }
.a-chan { display: grid; grid-template-columns: 3cqw 4cqw minmax(0, 1fr); gap: 1.2cqw; align-items: center; height: 7.4cqw; padding: 0 1.4cqw; border-bottom: 1px solid var(--hair); font-size: 1.9cqw; color: rgba(255, 255, 255, .8); transition: background .16s, box-shadow .16s; }
.a-chan i { font-style: normal; color: rgba(255, 255, 255, .38); font-size: 1.6cqw; }
.a-chan .lg { width: 4cqw; height: 4cqw; border-radius: .4cqw; background: #13121a; display: grid; place-items: center; }
.a-chan .lg .ic { width: 2.2cqw; height: 2.2cqw; color: var(--muted); }
.a-chan.on { background: color-mix(in srgb, var(--accent) 32%, #000); box-shadow: inset 0 0 0 .25cqw var(--accent); color: #fff; font-weight: 700; }
.a-chan.on i { color: var(--accent-text); }
.a-prev { padding: 1.6cqw; display: flex; flex-direction: column; gap: 1.2cqw; }
.a-vid { aspect-ratio: 16 / 9; border-radius: .8cqw; border: 1px solid var(--hair); position: relative; overflow: hidden; }
.a-vid b { position: absolute; left: 1.4cqw; bottom: 1.2cqw; font-size: 1.5cqw; background: rgba(0, 0, 0, .55); padding: .4cqw .9cqw; border-radius: .4cqw; }
.a-vid .live { position: absolute; right: 1.2cqw; top: 1.2cqw; font-size: 1.3cqw; font-weight: 700; padding: .3cqw .8cqw; border-radius: .4cqw; background: var(--accent); color: var(--on-accent); letter-spacing: .1cqw; }
.a-prev strong { font-size: 2.7cqw; }
.a-prev small { font-size: 1.6cqw; color: rgba(255, 255, 255, .38); }
.a-prev .fav { margin-top: auto; align-self: flex-end; width: 3cqw; height: 3cqw; }
.a-grid { padding: 1.4cqw 1.8cqw; min-width: 0; }
.a-chips { display: flex; gap: 1cqw; align-items: center; margin-bottom: 1.6cqw; }
.a-chips span { font-size: 1.7cqw; font-weight: 600; padding: .9cqw 1.8cqw; border-radius: 999px; background: rgba(255, 255, 255, .07); border: 1px solid var(--hair); }
.a-chips span.on { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.a-chips .cnt { margin-left: auto; background: none; border: 0; padding: 0; color: rgba(255, 255, 255, .38); font-weight: 400; }
.a-posters { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 1.6cqw 1.4cqw; }
.a-poster { aspect-ratio: 2 / 3; border-radius: .5cqw; border: .25cqw solid transparent; transition: border-color .16s, transform .16s; }
.a-poster.on { border-color: var(--accent); transform: scale(1.04); }
.a-pt { font-size: 1.5cqw; font-weight: 700; margin-top: .6cqw; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.a-detail { background: radial-gradient(120% 70% at 50% -10%, #1a0a3e 0%, #06061a 45%, #000 80%); height: 100%; padding: 4cqw 3.6cqw; display: flex; flex-direction: column; gap: 1.6cqw; }
.a-detail .back { font-size: 1.8cqw; color: var(--muted); display: inline-flex; align-items: center; gap: .6cqw; }
.a-detail .back .ic { width: 2.2cqw; height: 2.2cqw; }
.a-detail strong { margin-top: 5cqw; font-size: 4.2cqw; letter-spacing: -.02em; }
.a-meta { display: flex; gap: 1cqw; flex-wrap: wrap; }
.a-meta span { display: inline-flex; align-items: center; gap: .4cqw; font-size: 1.5cqw; font-weight: 700; padding: .6cqw 1.3cqw; border-radius: 999px; background: rgba(255, 255, 255, .07); border: 1px solid var(--hair); }
.a-meta .ic { width: 1.9cqw; height: 1.9cqw; color: var(--accent-text); }
.a-detail p { font-size: 1.8cqw; color: var(--muted); }
.a-seasons { display: flex; gap: 1cqw; }
.a-seasons span { font-size: 1.7cqw; font-weight: 600; padding: .9cqw 1.9cqw; border-radius: 999px; background: rgba(255, 255, 255, .07); border: 1px solid var(--hair); }
.a-seasons span.on { background: var(--accent); border-color: var(--accent); }
.a-ep { display: grid; grid-template-columns: 11cqw minmax(0, 1fr) auto; align-items: center; gap: 1.6cqw; height: 7.6cqw; border-radius: .7cqw; border: .25cqw solid var(--accent); background: #07060e; overflow: hidden; }
.a-ep .th { height: 100%; background: #000; display: grid; place-items: center; }
.a-ep .th .ic { width: 3cqw; height: 3cqw; }
.a-ep b { display: block; font-size: 1.9cqw; }
.a-ep small { color: rgba(255, 255, 255, .38); font-size: 1.5cqw; }
.a-ep .chev { width: 2.6cqw; height: 2.6cqw; color: var(--muted); margin-right: 1.4cqw; }

/* ── Launcher-style cards (the app's home tiles) ──────────────────────── */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.tile {
    position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 18px;
    padding: 22px 20px 20px 26px; border-radius: var(--r-panel);
    background: var(--raised); border: 1px solid var(--hair); color: #fff; text-decoration: none;
    transition: transform .16s ease-out, box-shadow .16s ease-out, border-color .16s;
}
.tile::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--accent); }
.tile > .ic { width: 28px; height: 28px; color: var(--muted); }
.tile h3 { font-size: 16px; letter-spacing: 1.1px; text-transform: uppercase; }
.tile p { color: var(--muted); font-size: 15px; }
.tile .count { font-size: 11px; font-weight: 700; letter-spacing: 1.6px; text-transform: uppercase; color: var(--faint); margin-top: auto; }
a.tile:hover, a.tile:focus-visible { transform: scale(var(--focus-scale)); box-shadow: 0 0 0 2px #fff, 0 0 28px 4px color-mix(in srgb, var(--accent) 45%, transparent); color: #fff; outline: none; }

/* ── Settings-style list (the app's option rows) ──────────────────────── */
.rows { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 0 32px; list-style: none; margin: 0; padding: 0; }
.rows li { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 14px; padding: 18px 0; border-bottom: 1px solid var(--hair); }
.rows .ic { width: 24px; height: 24px; color: var(--accent-text); margin-top: 2px; }
.rows b { display: block; font-size: 16px; margin-bottom: 2px; }
.rows span { color: var(--muted); font-size: 15px; }

/* ── Steps (a real sequence) ──────────────────────────────────────────── */
.steps { counter-reset: step; list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.steps li { counter-increment: step; display: grid; gap: 10px; align-content: start; padding: 22px; border-radius: var(--r-panel); border: 1px solid var(--hair); background: var(--surface); }
.steps li::before { content: counter(step); display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--accent); color: var(--on-accent); font-weight: 700; }
.steps b { font-size: 17px; }
.steps span { color: var(--muted); font-size: 15px; }

/* ── Panels, notes, forms ─────────────────────────────────────────────── */
.panel { border-radius: var(--r-panel); border: 1px solid var(--hair); background: var(--surface); padding: clamp(20px, 3vw, 32px); }
.band { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px; align-items: center; }
@media (max-width: 760px) { .band { grid-template-columns: 1fr; } }
.note { display: flex; gap: 12px; align-items: flex-start; color: var(--muted); font-size: 15px; }
.note .ic { width: 22px; height: 22px; color: var(--faint); margin-top: 1px; }
.notice { display: flex; gap: 10px; align-items: center; padding: 14px 16px; border-radius: var(--r-panel); border: 1px solid var(--hair); background: var(--surface); margin-bottom: 20px; }
.notice--ok { border-color: color-mix(in srgb, var(--success) 45%, transparent); }
.notice--error { border-color: color-mix(in srgb, var(--danger) 55%, transparent); }
.notice--ok .ic { color: var(--success); }
.notice--error .ic { color: var(--danger); }

.form { display: grid; gap: 16px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.field { display: grid; gap: 6px; }
.field label { font-size: 14px; font-weight: 600; color: rgba(255, 255, 255, .85); }
.field label small { font-weight: 400; color: var(--faint); }
.input {
    width: 100%; min-height: 48px; padding: 12px 14px; border-radius: var(--r-panel);
    background: var(--field); border: 1px solid transparent; color: #fff; font: 400 16px/1.4 var(--font);
    transition: border-color .16s, box-shadow .16s;
}
textarea.input { min-height: 160px; resize: vertical; }
.input::placeholder { color: rgba(255, 255, 255, .38); }
.input:focus { outline: none; border-color: var(--accent-text); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 35%, transparent); }

/* ── Captcha (ALTCHA widget), themed to the app ─────────────────────── */
.captcha-field altcha-widget {
    --altcha-color-base: var(--field);
    --altcha-color-border: var(--hair-strong);
    --altcha-color-border-focus: var(--accent-text);
    --altcha-color-text: #fff;
    --altcha-color-active: var(--accent);
    --altcha-color-error-text: var(--danger);
    --altcha-border-radius: var(--r-panel);
    --altcha-max-width: 100%;
    display: block;
}

/* ── Footer ───────────────────────────────────────────────────────────── */
.site-foot { border-top: 1px solid var(--hair); background: color-mix(in srgb, var(--bar) 80%, transparent); backdrop-filter: blur(12px);padding-block: 56px 32px; font-size: 15px; }
.foot-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr)); gap: 32px; }
@media (max-width: 860px) { .foot-grid { grid-template-columns: 1fr 1fr; } .foot-news { grid-column: 1 / -1; } }
.site-foot h2 { font-size: 12px; font-weight: 700; letter-spacing: 1.6px; text-transform: uppercase; color: var(--faint); margin-bottom: 14px; }
.site-foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.site-foot ul a { color: var(--muted); text-decoration: none; }
.site-foot ul a:hover { color: #fff; }
.foot-news p { color: var(--muted); margin-bottom: 12px; }
.news-form { display: flex; gap: 8px; flex-wrap: wrap; }
.news-form .input { flex: 1 1 220px; }
.news-consent { margin-top: 10px; font-size: 13px; color: var(--faint); max-width: 44ch; }
.news-consent a { color: var(--muted); }
.news-status { margin-top: 10px; color: #fff; }
.foot-base { margin-top: 44px; padding-top: 20px; border-top: 1px solid var(--hair); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; color: var(--faint); font-size: 13.5px; }

/* ── Motion: one reveal on scroll, CSS only, never hides content at rest ── */
@media (prefers-reduced-motion: no-preference) {
    @supports (animation-timeline: view()) {
        .reveal { animation: reveal linear both; animation-timeline: view(); animation-range: entry 0% entry 60%; }
        @keyframes reveal { from { transform: translateY(28px); opacity: .35; } to { transform: none; opacity: 1; } }
    }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
    body::before { animation: none !important; } /* an infinite .01ms alternate would flicker */
}

/* Partner-link prompt: shown only to visitors who arrive with ?ref=CODE. */
.ref-prompt { background: var(--surface); border-bottom: 1px solid var(--hair); padding: 12px 0; font-size: 14px; }
.ref-prompt .container { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.ref-prompt p { margin: 0; flex: 1 1 280px; }
.ref-prompt form { display: flex; gap: 8px; margin: 0; }
.ref-prompt small { flex-basis: 100%; opacity: .75; }
