/* ==========================================================================
   Diwa Play - editorial catalogue
   Native CSS. No framework. Geist + Geist Mono, self-hosted.
   Dials: DESIGN_VARIANCE 7 / MOTION_INTENSITY 5 / VISUAL_DENSITY 5
   ========================================================================== */

/* ---------- fonts (self-hosted, latin subset) ---------- */
@font-face { font-family: Geist; src: url(/assets/fonts/geist-400.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: Geist; src: url(/assets/fonts/geist-500.woff2) format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: Geist; src: url(/assets/fonts/geist-600.woff2) format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: Geist; src: url(/assets/fonts/geist-700.woff2) format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: Geist; src: url(/assets/fonts/geist-800.woff2) format("woff2"); font-weight: 800; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url(/assets/fonts/geist-mono-400.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url(/assets/fonts/geist-mono-500.woff2) format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url(/assets/fonts/geist-mono-600.woff2) format("woff2"); font-weight: 600; font-display: swap; }

/* ==========================================================================
   tokens - ONE accent (cobalt), ONE radius (6px), page-level theme lock
   ========================================================================== */
:root {
    --paper:      #f4f5f7;
    --card:       #ffffff;
    --sunk:       #eceef1;
    --ink:        #14161a;
    --ink-2:      #4a5058;
    --ink-3:      #666c75;   /* darkest-but-lightest grey that clears 4.5:1 on --sunk */
    --rule:       #dde0e5;
    --rule-2:     #c8ccd3;

    --accent:     #1f43e0;
    --accent-ink: #ffffff;
    --accent-sunk:#eaeeff;
    --accent-line:#b9c5ff;

    --flag:       #b3200f;   /* semantic only: 18+ / risk notices */
    --flag-sunk:  #fdecea;
    --flag-line:  #f3c4bd;

    --r:    6px;
    --r-sm: 4px;

    --sans: Geist, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

    --shell: 1240px;
    --gap:   24px;
    --sec:   60px;              /* section rhythm */
    --nav-h: 68px;

    --ease: cubic-bezier(.2, .7, .3, 1);
    --t:    200ms var(--ease);
}

@media (prefers-color-scheme: dark) {
    :root {
        --paper:      #0e1013;
        --card:       #16191e;
        --sunk:       #1b1f25;
        --ink:        #f2f4f7;
        --ink-2:      #b0b7c1;
        --ink-3:      #858d99;
        --rule:       #262b33;
        --rule-2:     #343a44;

        --accent:     #7f9bff;
        --accent-ink: #0b1020;
        --accent-sunk:#161d33;
        --accent-line:#2c3d6e;

        --flag:       #ff9b8c;
        --flag-sunk:  #2a1512;
        --flag-line:  #4d221c;
    }
}

/* ==========================================================================
   base
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--sans);
    font-size: 16px;
    line-height: 1.6;
    font-feature-settings: "ss01", "cv01";
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, h4 { margin: 0; font-weight: 700; letter-spacing: -.025em; line-height: 1.12; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; }

.ico { flex: none; display: block; }

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

::selection { background: var(--accent); color: var(--accent-ink); }

.shell {
    width: 100%;
    max-width: var(--shell);
    margin-inline: auto;
    padding-inline: 20px;
}

.num { font-family: var(--mono); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }

.skip {
    position: absolute; left: -9999px; top: 0; z-index: 200;
    background: var(--accent); color: var(--accent-ink);
    padding: 12px 18px; font-weight: 600;
}
.skip:focus { left: 0; }

.vh {
    position: absolute !important; width: 1px; height: 1px;
    padding: 0; margin: -1px; overflow: hidden;
    clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ==========================================================================
   HEADER - single line, 68px, hairline rule, mono nav
   ========================================================================== */
.hd {
    position: sticky;
    top: 0;
    z-index: 60;
    height: var(--nav-h);
    background: color-mix(in srgb, var(--paper) 88%, transparent);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--rule);
}
.hd__in {
    height: 100%;
    display: flex;
    align-items: center;
    gap: 28px;
}

.mark { display: flex; align-items: center; gap: 10px; margin-right: auto; }
.mark img {
    width: 30px; height: 30px;
    border-radius: var(--r-sm);
}
.mark__word {
    font-size: 17px;
    font-weight: 700;
    letter-spacing: -.03em;
}
.mark__word b { color: var(--accent); font-weight: 700; }

.nav { display: flex; align-items: center; gap: 4px; }
.nav a {
    position: relative;
    padding: 8px 12px;
    font-size: 14px;
    font-weight: 500;
    color: var(--ink-2);
    border-radius: var(--r-sm);
    cursor: pointer;
    transition: color var(--t), background var(--t);
}
.nav a:hover { color: var(--ink); background: var(--sunk); }
.nav a.on { color: var(--ink); font-weight: 600; }
.nav a.on::after {
    content: "";
    position: absolute;
    left: 12px; right: 12px; bottom: -1px;
    height: 2px;
    background: var(--accent);
}

.hd__cta {
    display: inline-flex; align-items: center; gap: 8px;
    height: 38px; padding: 0 16px;
    background: var(--ink); color: var(--paper);
    border-radius: var(--r);
    font-size: 14px; font-weight: 600;
    cursor: pointer;
    transition: transform var(--t), opacity var(--t);
}
.hd__cta:hover { opacity: .88; }
.hd__cta:active { transform: translateY(1px); }

.burger {
    display: none;
    width: 40px; height: 40px;
    align-items: center; justify-content: center;
    border: 1px solid var(--rule-2);
    border-radius: var(--r);
    cursor: pointer;
    transition: border-color var(--t), background var(--t);
}
.burger:hover { border-color: var(--ink); background: var(--sunk); }
.burger .ico:last-child { display: none; }
.burger[aria-expanded="true"] .ico:first-child { display: none; }
.burger[aria-expanded="true"] .ico:last-child { display: block; }

/* ==========================================================================
   BUTTONS
   ========================================================================== */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 9px;
    height: 48px; padding: 0 22px;
    border-radius: var(--r);
    font-size: 15px; font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
    transition: transform var(--t), background var(--t), border-color var(--t), color var(--t);
}
.btn--fill { background: var(--accent); color: var(--accent-ink); }
.btn--fill:hover { background: color-mix(in srgb, var(--accent) 86%, #000); }
.btn--line { border: 1px solid var(--rule-2); color: var(--ink); background: var(--card); }
.btn--line:hover { border-color: var(--ink); }
.btn--ink { background: var(--ink); color: var(--paper); }
.btn--ink:hover { opacity: .88; }
.btn:active { transform: translateY(1px); }
.btn--wide { width: 100%; }
.btn--sm { height: 40px; padding: 0 16px; font-size: 14px; }

/* ==========================================================================
   HOME HERO - asymmetric split, left copy / right real app-art cluster
   ========================================================================== */
.hero {
    border-bottom: 1px solid var(--rule);
    padding-block: 56px var(--sec);
}
.hero__in {
    display: grid;
    grid-template-columns: 1.05fr .95fr;
    gap: 56px;
    align-items: center;
}

.tag {
    display: inline-flex; align-items: center; gap: 7px;
    font-family: var(--mono);
    font-size: 12px; font-weight: 500;
    letter-spacing: -.01em;
    color: var(--accent);
    background: var(--accent-sunk);
    border: 1px solid var(--accent-line);
    padding: 5px 11px;
    border-radius: var(--r-sm);
    margin-bottom: 20px;
}

.hero h1 {
    font-size: clamp(2.4rem, 5.4vw, 4.1rem);
    font-weight: 800;
    letter-spacing: -.045em;
    margin-bottom: 18px;
}
.hero h1 i { font-style: italic; color: var(--accent); }

.hero__sub {
    font-size: 1.05rem;
    color: var(--ink-2);
    max-width: 46ch;
    margin-bottom: 30px;
}

.hero__act { display: flex; flex-wrap: wrap; gap: 12px; }

/* app-art cluster: real APK artwork, staggered */
.stack {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}
.stack figure { margin: 0; }
.stack img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: var(--r);
    border: 1px solid var(--rule);
    background: var(--sunk);
}
.stack figure:nth-child(1) { transform: translateY(-18px); }
.stack figure:nth-child(3) { transform: translateY(-30px); }
.stack figure:nth-child(4) { transform: translateY(6px); }
.stack figure:nth-child(6) { transform: translateY(-12px); }

/* ==========================================================================
   COUNTER STRIP - below hero, mono figures
   ========================================================================== */
.strip {
    border-bottom: 1px solid var(--rule);
    background: var(--card);
}
.strip__in {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
}
.strip__cell {
    padding: 26px 22px;
    border-left: 1px solid var(--rule);
}
.strip__cell:first-child { border-left: 0; }
.strip__k {
    display: block;
    font-family: var(--mono);
    font-size: clamp(1.4rem, 2.6vw, 1.9rem);
    font-weight: 500;
    letter-spacing: -.04em;
    margin-bottom: 4px;
}
.strip__v { font-size: 13px; color: var(--ink-3); }

/* ==========================================================================
   SECTION HEADS - no eyebrows, headline carries it
   ========================================================================== */
.sec { padding-block: var(--sec); }
.sec--rule { border-top: 1px solid var(--rule); }

.head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 28px;
}
.head h2 {
    font-size: clamp(1.5rem, 3vw, 2.1rem);
    font-weight: 700;
    letter-spacing: -.035em;
}
.head p { color: var(--ink-3); font-size: 15px; margin-top: 6px; }
.head__side {
    font-family: var(--mono);
    font-size: 13px;
    color: var(--ink-3);
    white-space: nowrap;
}

/* ==========================================================================
   1. NEWEST - horizontal scroll-snap rail
   ========================================================================== */
.rail {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 230px;
    gap: 16px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 14px;
    margin-inline: -20px;
    padding-inline: 20px;
    scrollbar-width: thin;
    scrollbar-color: var(--rule-2) transparent;
}
.rail > * { scroll-snap-align: start; }
.rail::-webkit-scrollbar { height: 6px; }
.rail::-webkit-scrollbar-thumb { background: var(--rule-2); border-radius: 999px; }
.rail::-webkit-scrollbar-track { background: transparent; }

.tile {
    display: flex;
    flex-direction: column;
    background: var(--card);
    border: 1px solid var(--rule);
    border-radius: var(--r);
    overflow: hidden;
    cursor: pointer;
    transition: border-color var(--t), transform var(--t);
}
.tile:hover { border-color: var(--ink); transform: translateY(-3px); }
.tile__art { position: relative; background: var(--sunk); }
.tile__art img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.tile__body { padding: 13px 14px 15px; display: flex; flex-direction: column; gap: 8px; }
.tile__name { font-size: 15px; font-weight: 600; letter-spacing: -.02em; }
.tile:hover .tile__name { color: var(--accent); }
.tile__meta {
    display: flex; align-items: center; gap: 10px;
    font-family: var(--mono); font-size: 12px; color: var(--ink-3);
}
.tile__meta span { display: inline-flex; align-items: center; gap: 4px; }
.tile__meta .ico { color: var(--ink-3); }

.flag {
    position: absolute; top: 10px; left: 10px;
    font-family: var(--mono);
    font-size: 10px; font-weight: 600;
    letter-spacing: .04em; text-transform: uppercase;
    padding: 4px 8px;
    border-radius: var(--r-sm);
    background: var(--ink); color: var(--paper);
}

/* ==========================================================================
   2. HOT - asymmetric feature: 1 lead + 7 compact rows
   ========================================================================== */
.hot {
    display: grid;
    grid-template-columns: 1.15fr 1fr;
    gap: var(--gap);
    align-items: stretch;   /* lead card matches the ranked list height */
}
.lead {
    height: 100%;
    display: grid;
    grid-template-columns: 190px 1fr;
    gap: 22px;
    background: var(--card);
    border: 1px solid var(--rule);
    border-radius: var(--r);
    padding: 22px;
    cursor: pointer;
    transition: border-color var(--t);
}
.lead:hover { border-color: var(--ink); }
.lead img {
    width: 100%; aspect-ratio: 1; object-fit: cover;
    align-self: start;
    border-radius: var(--r); border: 1px solid var(--rule);
}
.lead__body { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.lead h3 { font-size: 1.5rem; letter-spacing: -.035em; }
.lead:hover h3 { color: var(--accent); }
.lead__desc {
    font-size: 14px; color: var(--ink-2);
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
    overflow: hidden;
}
.lead__spec { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; }

.pill {
    display: inline-flex; align-items: center; gap: 6px;
    font-family: var(--mono); font-size: 12px;
    color: var(--ink-2);
    background: var(--sunk);
    border-radius: var(--r-sm);
    padding: 5px 9px;
}
.pill--accent { color: var(--accent); background: var(--accent-sunk); }

.ranked { display: grid; }
.ranked a {
    display: grid;
    grid-template-columns: 26px 46px 1fr auto;
    align-items: center;
    gap: 14px;
    padding: 11px 12px;
    border-radius: var(--r);
    cursor: pointer;
    transition: background var(--t);
}
.ranked a + a { border-top: 1px solid var(--rule); }
.ranked a:hover { background: var(--card); }
.ranked__n { font-family: var(--mono); font-size: 13px; color: var(--ink-3); }
.ranked img {
    width: 46px; height: 46px; object-fit: cover;
    border-radius: var(--r-sm); border: 1px solid var(--rule);
}
.ranked__name { font-size: 15px; font-weight: 600; letter-spacing: -.02em; }
.ranked a:hover .ranked__name { color: var(--accent); }
.ranked__sub { font-family: var(--mono); font-size: 12px; color: var(--ink-3); }
.ranked__go { font-family: var(--mono); font-size: 12px; color: var(--accent); }

/* ==========================================================================
   3. ALL GAMES - dense catalogue index, mono data columns
   ========================================================================== */
.index {
    background: var(--card);
    border: 1px solid var(--rule);
    border-radius: var(--r);
    overflow: hidden;
}
.index__hd, .index__row {
    display: grid;
    grid-template-columns: 44px 40px minmax(0, 1.7fr) 1fr 1fr 1fr 92px;
    align-items: center;
    gap: 16px;
    padding: 12px 18px;
}
/* the data wrapper dissolves so its cells join the row grid on desktop */
.index__data { display: contents; }
.index__n { font-family: var(--mono); font-size: 13px; color: var(--ink-3); }
.index__hd {
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--ink-3);
    background: var(--sunk);
    border-bottom: 1px solid var(--rule);
}
.index__row { border-top: 1px solid var(--rule); transition: background var(--t); }
.index__row:first-child { border-top: 0; }
.index__row:hover { background: var(--sunk); }
.index__row img {
    width: 40px; height: 40px; object-fit: cover;
    border-radius: var(--r-sm); border: 1px solid var(--rule);
}
.index__nm { font-size: 15px; font-weight: 600; letter-spacing: -.02em; }
.index__row:hover .index__nm { color: var(--accent); }
.index__d { font-family: var(--mono); font-size: 13px; color: var(--ink-2); }
.index__act { justify-self: end; }

/* ==========================================================================
   APK DETAIL - split masthead, no blurred artwork
   ========================================================================== */
.crumb {
    padding-block: 20px 0;
    font-family: var(--mono);
    font-size: 12px;
    color: var(--ink-3);
}
.crumb ol { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; list-style: none; margin: 0; padding: 0; }
.crumb li { display: inline-flex; align-items: center; gap: 7px; }
.crumb a:hover { color: var(--accent); }
.crumb [aria-current] { color: var(--ink); }

.mast {
    padding-block: 30px var(--sec);
    border-bottom: 1px solid var(--rule);
}
.mast__in {
    display: grid;
    grid-template-columns: 232px minmax(0, 1fr);
    gap: 40px;
    align-items: start;
}
.mast__art {
    border: 1px solid var(--rule);
    border-radius: var(--r);
    overflow: hidden;
    background: var(--card);
}
.mast__art img { width: 100%; aspect-ratio: 1; object-fit: cover; }

.mast__flags { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 14px; }
.chip {
    font-family: var(--mono);
    font-size: 11px; font-weight: 500;
    letter-spacing: .03em; text-transform: uppercase;
    padding: 5px 10px;
    border-radius: var(--r-sm);
    border: 1px solid var(--rule-2);
    color: var(--ink-2);
}
.chip--on { background: var(--ink); color: var(--paper); border-color: var(--ink); }

.mast h1 {
    font-size: clamp(2rem, 4.6vw, 3.2rem);
    font-weight: 800;
    letter-spacing: -.045em;
    margin-bottom: 22px;
}

/* stats as a hairline data row, not chips-on-glass */
.facts {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    border: 1px solid var(--rule);
    border-radius: var(--r);
    background: var(--card);
    margin-bottom: 24px;
    overflow: hidden;
}
.facts div { padding: 14px 16px; border-left: 1px solid var(--rule); }
.facts div:first-child { border-left: 0; }
.facts dt { font-size: 12px; color: var(--ink-3); margin-bottom: 3px; }
.facts dd {
    margin: 0;
    font-family: var(--mono);
    font-size: 17px; font-weight: 500;
    letter-spacing: -.03em;
}

.mast__act { display: flex; flex-wrap: wrap; gap: 12px; }

/* body + rail */
.doc {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 56px;
    align-items: start;
    padding-block: var(--sec);
}

.prose { max-width: 70ch; }
.prose > * + * { margin-top: 1.05em; }
.prose h2 {
    font-size: clamp(1.3rem, 2.6vw, 1.65rem);
    font-weight: 700;
    letter-spacing: -.035em;
    margin-top: 2.1em;
    padding-top: .8em;
    border-top: 1px solid var(--rule);
}
.prose h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.prose h3 { font-size: 1.06rem; font-weight: 650; margin-top: 1.7em; }
.prose p { color: var(--ink-2); line-height: 1.72; }
.prose ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.prose li {
    position: relative;
    padding-left: 22px;
    color: var(--ink-2);
    line-height: 1.65;
}
.prose li::before {
    content: "";
    position: absolute;
    left: 4px; top: .68em;
    width: 6px; height: 1px;
    background: var(--accent);
}
.prose .kw-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.prose .kw-chips li { padding: 4px 9px; font-family: var(--mono); font-size: 12px; color: var(--ink-3); background: var(--sunk); border-radius: var(--r-sm); }
.prose .kw-chips li::before { display: none; }

/* sidebar: hairline rows, one action, one notice */
.rail-col { position: sticky; top: calc(var(--nav-h) + 20px); display: grid; gap: 18px; }

.panel {
    background: var(--card);
    border: 1px solid var(--rule);
    border-radius: var(--r);
    overflow: hidden;
}
.panel__t {
    font-family: var(--mono);
    font-size: 11px; font-weight: 500;
    letter-spacing: .07em; text-transform: uppercase;
    color: var(--ink-3);
    padding: 12px 16px;
    background: var(--sunk);
    border-bottom: 1px solid var(--rule);
}
.panel dl { margin: 0; padding: 4px 16px 10px; }
.panel .row {
    display: flex; align-items: center; justify-content: space-between; gap: 14px;
    padding: 9px 0;
    font-size: 14px;
    border-bottom: 1px solid var(--rule);
}
.panel .row:last-child { border-bottom: 0; }
.panel dt { color: var(--ink-3); }
.panel dd { margin: 0; font-family: var(--mono); font-weight: 500; text-align: right; overflow-wrap: anywhere; }
.panel dd.hi { color: var(--accent); }

.note {
    border: 1px solid var(--flag-line);
    background: var(--flag-sunk);
    border-radius: var(--r);
    padding: 16px;
}
.note__t {
    display: flex; align-items: center; gap: 8px;
    font-size: 13px; font-weight: 700;
    color: var(--flag);
    margin-bottom: 7px;
}
.note p { font-size: 13px; line-height: 1.6; color: var(--ink-2); }

/* related: scroll-snap rail, distinct from the 5-up grid it replaced */
.rel { display: grid; grid-auto-flow: column; grid-auto-columns: 160px; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 12px; margin-inline: -20px; padding-inline: 20px; }
.rel > * { scroll-snap-align: start; }
.rel a {
    display: grid; gap: 9px;
    cursor: pointer;
}
.rel img {
    width: 100%; aspect-ratio: 1; object-fit: cover;
    border-radius: var(--r); border: 1px solid var(--rule);
    transition: border-color var(--t);
}
.rel a:hover img { border-color: var(--ink); }
.rel span { font-size: 14px; font-weight: 600; letter-spacing: -.02em; }
.rel a:hover span { color: var(--accent); }
.rel small { font-family: var(--mono); font-size: 12px; color: var(--ink-3); }

/* ==========================================================================
   RISK NOTICE - full-bleed band
   ========================================================================== */
.risk {
    border-top: 1px solid var(--rule);
    background: var(--card);
    padding-block: var(--sec);
}
.risk__in { display: grid; grid-template-columns: 1fr 1.35fr; gap: 48px; align-items: start; }
.risk h2 {
    font-size: clamp(1.4rem, 2.8vw, 1.9rem);
    letter-spacing: -.035em;
    display: flex; align-items: center; gap: 11px;
    color: var(--flag);
}
.risk__age {
    display: inline-block;
    margin-top: 14px;
    font-family: var(--mono);
    font-size: 12px; font-weight: 600;
    color: var(--flag);
    border: 1px solid var(--flag-line);
    background: var(--flag-sunk);
    padding: 5px 11px;
    border-radius: var(--r-sm);
}
.risk p { color: var(--ink-2); font-size: 15px; }
.risk p + p { margin-top: 12px; }
.risk ul {
    list-style: none; margin: 20px 0 0; padding: 0;
    display: flex; flex-wrap: wrap; gap: 8px;
}
.risk li {
    display: inline-flex; align-items: center; gap: 7px;
    font-size: 13px; color: var(--ink-2);
    border: 1px solid var(--rule-2);
    border-radius: var(--r-sm);
    padding: 6px 11px;
}
.risk li .ico { color: var(--ink-3); }

/* ==========================================================================
   STATIC PAGES
   ========================================================================== */
.page-top {
    border-bottom: 1px solid var(--rule);
    padding-block: 44px var(--sec);
}
.page-top h1 {
    font-size: clamp(2rem, 4.6vw, 3.1rem);
    font-weight: 800;
    letter-spacing: -.045em;
    max-width: 20ch;
}
.page-top .tag { margin-bottom: 18px; }

.doc--solo { grid-template-columns: minmax(0, 1fr); max-width: 78ch; }
.doc--solo .prose { max-width: none; }
.prose h4 { font-size: .98rem; font-weight: 650; margin-top: 1.5em; }

/* ==========================================================================
   FOOTER - oversized wordmark, hairline columns, legal band
   ========================================================================== */
.ft {
    border-top: 1px solid var(--rule);
    background: var(--card);
    padding-block: var(--sec) 26px;
}
.ft__grid {
    display: grid;
    grid-template-columns: 1.6fr repeat(3, minmax(0, 1fr));
    gap: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid var(--rule);
}
.ft__about p { font-size: 14px; color: var(--ink-3); max-width: 34ch; margin-top: 14px; }
.ft__col h3 {
    font-family: var(--mono);
    font-size: 11px; font-weight: 500;
    letter-spacing: .07em; text-transform: uppercase;
    color: var(--ink-3);
    margin-bottom: 14px;
}
.ft__col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.ft__col a { font-size: 14.5px; color: var(--ink-2); cursor: pointer; transition: color var(--t); }
.ft__col a:hover { color: var(--accent); }

/* oversized wordmark band */
.ft__word {
    padding-block: 30px 24px;
    border-bottom: 1px solid var(--rule);
    overflow: hidden;
}
.ft__word span {
    display: block;
    font-size: clamp(3.4rem, 13vw, 11rem);
    font-weight: 800;
    letter-spacing: -.06em;
    /* clears the descender on "y"; the band clips horizontally, so it must not clip vertically */
    line-height: 1;
    padding-bottom: .07em;
    color: var(--rule);
    user-select: none;
}
.ft__word b { color: var(--rule-2); font-weight: 800; }

.ft__end {
    padding-top: 22px;
    display: flex; flex-wrap: wrap; gap: 12px;
    align-items: center; justify-content: space-between;
    font-family: var(--mono);
    font-size: 12px;
    color: var(--ink-3);
}
.ft__end .warn { color: var(--flag); }

/* ==========================================================================
   SCROLL TO TOP
   ========================================================================== */
.top {
    position: fixed; right: 20px; bottom: 20px; z-index: 55;
    width: 44px; height: 44px;
    display: grid; place-items: center;
    background: var(--ink); color: var(--paper);
    border-radius: var(--r);
    cursor: pointer;
    opacity: 0; visibility: hidden; transform: translateY(8px);
    transition: opacity var(--t), transform var(--t), visibility var(--t);
}
.top.on { opacity: 1; visibility: visible; transform: none; }
.top:hover { opacity: .85; }

/* ==========================================================================
   MOTION - scroll reveal (MOTION_INTENSITY 5)
   ========================================================================== */
.rv { opacity: 0; transform: translateY(14px); transition: opacity .5s var(--ease), transform .5s var(--ease); }
.rv.in { opacity: 1; transform: none; }

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 1080px) {
    .doc { grid-template-columns: minmax(0, 1fr); gap: 36px; }
    .rail-col { position: static; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .rail-col .btn--wide { grid-column: 1 / -1; }
    .hot { grid-template-columns: minmax(0, 1fr); }
    .index__hd, .index__row { grid-template-columns: 44px 40px minmax(0, 1.6fr) 1fr 1fr 92px; }
    .index__hd span:nth-child(5), .index__data .index__d:last-child { display: none; }
}

@media (max-width: 960px) {
    .nav, .hd__cta { display: none; }
    .burger { display: inline-flex; }
    .nav.open {
        display: grid;
        position: fixed;
        inset: var(--nav-h) 0 auto 0;
        gap: 2px;
        padding: 14px 20px 22px;
        background: var(--paper);
        border-bottom: 1px solid var(--rule);
        box-shadow: 0 18px 40px rgb(0 0 0 / .10);
    }
    .nav.open a { padding: 13px 10px; font-size: 16px; border-radius: var(--r); }
    .nav.open a.on::after { display: none; }
    .nav.open .hd__cta { display: inline-flex; margin-top: 12px; justify-content: center; height: 46px; }

    .hero__in { grid-template-columns: minmax(0, 1fr); gap: 40px; }
    .mast__in { grid-template-columns: 168px minmax(0, 1fr); gap: 28px; }
    .risk__in { grid-template-columns: minmax(0, 1fr); gap: 26px; }
    .ft__grid { grid-template-columns: 1fr 1fr; gap: 32px; }
    .ft__about { grid-column: 1 / -1; }
}

@media (max-width: 760px) {
    .strip__in { grid-template-columns: 1fr 1fr; }
    .strip__cell:nth-child(3) { border-left: 0; }
    .strip__cell:nth-child(n+3) { border-top: 1px solid var(--rule); }
    .facts { grid-template-columns: 1fr 1fr; }
    .facts div:nth-child(3) { border-left: 0; }
    .facts div:nth-child(n+3) { border-top: 1px solid var(--rule); }
    .lead { grid-template-columns: minmax(0, 1fr); }
    .lead img { max-width: 190px; }
    .head { flex-direction: column; align-items: flex-start; gap: 10px; }
    .head__side { display: none; }

    /* catalogue collapses from table to stacked rows */
    .index__hd { display: none; }
    .index__row {
        grid-template-columns: 44px minmax(0, 1fr) auto;
        grid-template-areas: "img name act" "img meta act";
        align-items: center;
        gap: 3px 13px;
        padding: 13px 14px;
    }
    .index__row .index__n { display: none; }
    .index__row img  { grid-area: img; width: 44px; height: 44px; }
    .index__row .index__nm { grid-area: name; }
    .index__row .index__data {
        grid-area: meta;
        display: flex;
        flex-wrap: wrap;
        gap: 4px 10px;
    }
    /* bonus is a primary decision factor here, so bring it back and let the row wrap */
    .index__row .index__data .index__d:last-child { display: inline; }
    .index__row .index__d { font-size: 12px; }
    .index__act { grid-area: act; }
}

@media (max-width: 560px) {
    .mast__in { grid-template-columns: minmax(0, 1fr); }
    .mast__art { max-width: 168px; }
    .hero__act .btn { width: 100%; }
    .stack { gap: 10px; }
    .stack figure { transform: none !important; }
}

/* ==========================================================================
   PREFERENCES
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: .001ms !important;
        transition-duration: .001ms !important;
    }
    .rv { opacity: 1; transform: none; }
}

@media (prefers-reduced-transparency: reduce) {
    .hd { background: var(--paper); backdrop-filter: none; -webkit-backdrop-filter: none; }
}

@media print {
    .hd, .ft, .top, .rail-col, .rel { display: none !important; }
    body { background: #fff; color: #000; }
}
