/* =========================================================================
 * Ruby Red — LaunchRivals product theme (live game search 2026-10-24)
 * -------------------------------------------------------------------------
 * Ink and paper neutrals, one ruby accent (three steps), 1px borders, soft
 * radii. Instrument Sans for reading, Geist Mono for counting. No gradients,
 * no illustrations. Light + dark via <html data-mode="light|dark|auto">.
 * Brand rules: docs/brand.md.
 *
 * Component vocabulary (docs/theming.md lists every hook with notes):
 *   layout     .container .section .stack .cluster .grid(--2|--3|--4) .bento
 *   shell      .site-header .site-footer .app-shell .sidebar .topbar .app-main
 *   type       .page .page__header .page__title .page__lead .eyebrow .muted
 *              .small .mono .num .prose
 *   surfaces   .card(__header|__title|__body|__footer) .card--flush .panel
 *   controls   .btn(--primary|--ghost|--danger|--sm|--lg|--block|--link)
 *              .icon-btn .form .field(__label|__input|__hint|__error) .checkbox
 *              .input-group .segmented
 *   feedback   .alert(--success|--info|--warning|--danger) .banner .badge(--*)
 *              .empty .notice
 *   data       .table-wrap .table(--dense) .stats .stat(__label|__value|__delta)
 *              .delta--up .delta--down .sparkline .chart
 *   domain     .game .radar .radar__week .heat-0…heat-10 .feed .diff .plan
 * ========================================================================= */

/* -- Fonts (self-hosted, SIL OFL: fonts/OFL.txt) -------------------------- */

@font-face { font-family: "Instrument Sans"; font-style: normal; font-weight: 400 700; font-display: swap; src: url("fonts/InstrumentSans-normal-latin.woff2") format("woff2"); 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: "Instrument Sans"; font-style: normal; font-weight: 400 700; font-display: swap; src: url("fonts/InstrumentSans-normal-latin-ext.woff2") format("woff2"); 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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Instrument Sans"; font-style: italic; font-weight: 400 700; font-display: swap; src: url("fonts/InstrumentSans-italic-latin.woff2") format("woff2"); 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: "Instrument Sans"; font-style: italic; font-weight: 400 700; font-display: swap; src: url("fonts/InstrumentSans-italic-latin-ext.woff2") format("woff2"); 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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Geist Mono"; font-style: normal; font-weight: 400 600; font-display: swap; src: url("fonts/GeistMono-normal-latin.woff2") format("woff2"); 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: "Geist Mono"; font-style: normal; font-weight: 400 600; font-display: swap; src: url("fonts/GeistMono-normal-latin-ext.woff2") format("woff2"); 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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }

/* -- Tokens --------------------------------------------------------------- */

:root {
    /* Brand palette (docs/brand.md): mostly ink and paper; ruby for the
       mark, actions and the thing that just changed. */
    --ink-950: #09090B;
    --ink-900: #0E0E11;
    --ink-800: #1B1B1F;
    --ink-700: #27272C;
    --ink-500: #6F6F78;
    --ink-300: #A7A7AE;
    --paper: #F5F4F1;
    --paper-2: #E9E8E4;
    --ruby-bright: #FF5D7C;
    --ruby: #E4294F;
    --ruby-deep: #A3122F;

    --font-sans: "Instrument Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-mono: "Geist Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

    --radius-sm: 6px;
    --radius: 10px;
    --radius-lg: 14px;
    --shadow-sm: 0 1px 2px rgb(9 9 11 / .05);
    --shadow: 0 1px 3px rgb(9 9 11 / .08), 0 1px 2px rgb(9 9 11 / .04);
    --shadow-lg: 0 30px 80px -20px rgb(9 9 11 / .28);
    --container: 1180px;
    --sidebar: 252px;
    --ease: cubic-bezier(.2, .8, .2, 1);

    /* light: paper ground, ink text, ruby deep for accent text */
    --bg: #F5F4F1;
    --bg-subtle: #EFEEEA;
    --surface: #FCFBF9;
    --surface-2: #E9E8E4;
    --border: #DEDCD6;
    --border-strong: #CBC9C2;
    --text: #09090B;
    --text-2: #27272C;
    --muted: #6F6F78;
    --primary: #E4294F;
    --primary-hover: #C91E43;
    --primary-fg: #F5F4F1;
    --primary-soft: #FBE3E8;
    --primary-soft-fg: #A3122F;
    --accent: #A3122F;
    --ring: rgb(228 41 79 / .32);
    --success: #15803d;
    --success-soft: #EAF5EC;
    --warning: #a16207;
    --warning-soft: #FBF6E4;
    --danger: #A3122F;
    --danger-soft: #FBE3E8;
    --info: #1d4ed8;
    --info-soft: #E9EFFB;
    --up: #15803d;
    --down: #A3122F;

    /* the mark: lead bar + rival bar */
    --mark-lead: #E4294F;
    --mark-rival: #09090B;

    /* week heat, functional scale: Quiet → Mild → Busy → Packed */
    --heat-0: #E9E8E4;
    --heat-1: #2F6F7A;
    --heat-2: #49796F;
    --heat-3: #648265;
    --heat-4: #7E8C5A;
    --heat-5: #9C8550;
    --heat-6: #BA7F47;
    --heat-7: #D8783D;
    --heat-8: #DC5E43;
    --heat-9: #E04349;
    --heat-10: #E4294F;

    color-scheme: light;
}

:root[data-mode="dark"] {
    --bg: #09090B;
    --bg-subtle: #0B0B0D;
    --surface: #0E0E11;
    --surface-2: #1B1B1F;
    --border: #27272C;
    --border-strong: #3A3A41;
    --text: #F5F4F1;
    --text-2: #D6D5D0;
    --muted: #A7A7AE;
    --primary: #E4294F;
    --primary-hover: #EE4065;
    --primary-fg: #F5F4F1;
    --primary-soft: rgb(255 93 124 / .12);
    --primary-soft-fg: #FF5D7C;
    --accent: #FF5D7C;
    --ring: rgb(255 93 124 / .4);
    --success: #4ade80;
    --success-soft: rgb(74 222 128 / .1);
    --warning: #facc15;
    --warning-soft: rgb(250 204 21 / .1);
    --danger: #FF5D7C;
    --danger-soft: rgb(255 93 124 / .1);
    --info: #60a5fa;
    --info-soft: rgb(96 165 250 / .1);
    --up: #4ade80;
    --down: #FF5D7C;
    --heat-0: #1B1B1F;
    --mark-lead: #FF5D7C;
    --mark-rival: #F5F4F1;
    --shadow-lg: 0 30px 80px -20px rgb(0 0 0 / .7);
    color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
    :root[data-mode="auto"] {
        --bg: #09090B;
        --bg-subtle: #0B0B0D;
        --surface: #0E0E11;
        --surface-2: #1B1B1F;
        --border: #27272C;
        --border-strong: #3A3A41;
        --text: #F5F4F1;
        --text-2: #D6D5D0;
        --muted: #A7A7AE;
        --primary: #E4294F;
        --primary-hover: #EE4065;
        --primary-fg: #F5F4F1;
        --primary-soft: rgb(255 93 124 / .12);
        --primary-soft-fg: #FF5D7C;
        --accent: #FF5D7C;
        --ring: rgb(255 93 124 / .4);
        --success: #4ade80;
        --success-soft: rgb(74 222 128 / .1);
        --warning: #facc15;
        --warning-soft: rgb(250 204 21 / .1);
        --danger: #FF5D7C;
        --danger-soft: rgb(255 93 124 / .1);
        --info: #60a5fa;
        --info-soft: rgb(96 165 250 / .1);
        --up: #4ade80;
        --down: #FF5D7C;
        --heat-0: #1B1B1F;
        --mark-lead: #FF5D7C;
        --mark-rival: #F5F4F1;
        --shadow-lg: 0 30px 80px -20px rgb(0 0 0 / .7);
        color-scheme: dark;
    }
}

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

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

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

body {
    margin: 0;
    min-height: 100vh;
    background: var(--bg);
    color: var(--text);
    font: 15px/1.55 var(--font-sans);
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { margin: 0 0 .5em; line-height: 1.2; letter-spacing: -.02em; font-weight: 600; }
h1 { letter-spacing: -.03em; }
h1 { font-size: clamp(1.6rem, 2.6vw, 2.1rem); }
h2 { font-size: 1.35rem; }
h3 { font-size: 1.05rem; }
p { margin: 0 0 1em; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
img { max-width: 100%; height: auto; }
hr { border: 0; border-top: 1px solid var(--border); margin: 1.5rem 0; }
code, kbd, .mono { font-family: var(--font-mono); font-size: .88em; }
code { background: var(--surface-2); padding: .1em .35em; border-radius: 4px; }
svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
::selection { background: var(--ruby-bright); color: var(--ink-950); }

:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 4px; }

.skip-link { position: absolute; left: -999px; top: .5rem; background: var(--surface); padding: .5rem .75rem; z-index: 100; border-radius: var(--radius-sm); }
.skip-link:focus { left: .5rem; }

.muted { color: var(--muted); }
.small { font-size: .85rem; }
.tiny { font-size: .75rem; }
.num { font-variant-numeric: tabular-nums; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.center { text-align: center; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.eyebrow { display: inline-block; font-family: var(--font-mono); font-size: .72rem; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); margin-bottom: .5rem; }
.text-up { color: var(--up); }
.text-down { color: var(--down); }

/* -- Layout primitives ---------------------------------------------------- */

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 1.25rem; }
.container--narrow { max-width: 760px; }
.section { padding: 3.5rem 0; }
.section--tight { padding: 2rem 0; }
.section--subtle { background: var(--bg-subtle); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section__title { font-size: 1.6rem; margin-bottom: .35rem; }
.section__lead { color: var(--muted); max-width: 640px; margin-bottom: 2rem; }

.stack > * + * { margin-top: 1rem; }
.stack--sm > * + * { margin-top: .5rem; }
.stack--lg > * + * { margin-top: 1.75rem; }
.cluster { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.cluster--between { justify-content: space-between; }
.cluster--end { justify-content: flex-end; }

.grid { display: grid; gap: 1rem; }
.grid > * { min-width: 0; }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid--sidebar { grid-template-columns: minmax(0, 1fr) 320px; }

.bento { display: grid; gap: 1rem; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.bento__item { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.4rem; transition: border-color .2s var(--ease), transform .2s var(--ease); }
.bento__item:hover { border-color: var(--border-strong); transform: translateY(-1px); }
.bento__item--wide { grid-column: span 2; }
.bento__item h3 { margin-bottom: .35rem; }
.bento__item p { color: var(--muted); margin: 0; }
.bento__icon { width: 36px; height: 36px; border-radius: 9px; display: grid; place-items: center; background: var(--primary-soft); color: var(--accent); margin-bottom: .9rem; }

@media (max-width: 900px) {
    .grid--3, .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .grid--sidebar { grid-template-columns: minmax(0, 1fr); }
    .bento { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 620px) {
    .grid--2, .grid--3, .grid--4, .bento { grid-template-columns: 1fr; }
    .bento__item--wide { grid-column: auto; }
    .section { padding: 2.25rem 0; }
}

/* -- Logo ----------------------------------------------------------------- */

.logo { display: inline-flex; align-items: center; gap: .5rem; color: var(--text); }
.logo:hover { text-decoration: none; }
.logo__mark { flex: none; display: block; transition: transform .25s var(--ease); }
.logo__lead { fill: var(--mark-lead); }
.logo__rival { fill: var(--mark-rival); }
.logo:hover .logo__mark { transform: translateX(2px); }
.logo__text { flex: none; display: block; }
.logo__mark, .logo__text { stroke: none; }  /* the global icon rule strokes every svg */
@media (prefers-reduced-motion: reduce) { .logo:hover .logo__mark { transform: none; } }

/* -- Public header / footer ------------------------------------------------ */

.site-header { position: sticky; top: 0; z-index: 40; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--border); }
.site-header__inner { display: flex; align-items: center; gap: 1.5rem; height: 60px; }
.site-header__actions { margin-left: auto; display: flex; align-items: center; gap: .5rem; }
.nav__list { list-style: none; display: flex; gap: .25rem; margin: 0; padding: 0; }
.nav__link { display: block; padding: .4rem .7rem; border-radius: var(--radius-sm); color: var(--text-2); font-size: .92rem; }
.nav__link:hover, .nav__link--active { color: var(--text); background: var(--surface-2); text-decoration: none; }
.menu--mobile { display: none; }

/* -- Header menus: mega panels (desktop), full-screen sheet (phones) -------- */
/* Both hang off .site-header (sticky = their containing block), not the <details>. */
.site-header .nav__menu.mega, .site-header .menu--mobile { position: static; }
.nav__desk { display: contents; }
.nav__menu > summary svg { transition: transform .2s var(--ease), opacity .2s; }
.nav__menu[open] > summary { color: var(--text); background: var(--surface-2); }
.nav__menu[open] > summary svg { transform: rotate(180deg); opacity: 1; }
.mega__panel { position: absolute; top: calc(100% + 8px); left: 50%; z-index: 50; width: min(820px, calc(100vw - 2rem)); padding: .55rem;
    border-radius: 18px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-lg);
    transform: translateX(-50%); animation: mega-in .22s var(--ease); }
.mega__panel::before { content: ""; position: absolute; left: 12%; right: 12%; top: -1px; height: 1px; background: linear-gradient(90deg, transparent, var(--primary), transparent); opacity: .7; }
@keyframes mega-in { from { opacity: 0; transform: translate(-50%, -6px) scale(.985); } to { opacity: 1; transform: translate(-50%, 0); } }
.mega__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .15rem; }
.mega-item { display: flex; gap: .75rem; align-items: flex-start; padding: .7rem .75rem; border-radius: 12px; color: var(--text); transition: background .15s; }
.mega-item:hover, .mega-item.is-active { background: var(--surface-2); text-decoration: none; }
.mega-item__icon, .navtile__icon { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; color: var(--accent);
    background: var(--primary-soft); border: 1px solid color-mix(in srgb, var(--primary) 22%, transparent); transition: transform .2s var(--ease), background .2s, color .2s, box-shadow .2s; }
.mega-item:hover .mega-item__icon, .mega-item.is-active .mega-item__icon { background: var(--primary); color: #fff; border-color: transparent; transform: translateY(-1px) rotate(-5deg); box-shadow: 0 8px 18px -8px var(--primary); }
.mega-item__text { display: flex; flex-direction: column; gap: .15rem; min-width: 0; }
.mega-item__text strong, .navrow__text strong { font-size: .92rem; font-weight: 600; letter-spacing: -.01em; }
.mega-item__text small, .navrow__text small { font-size: .8rem; color: var(--muted); line-height: 1.35; }
.mega__foot { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-top: .35rem; padding: .75rem .9rem; border-radius: 12px; background: var(--bg-subtle); font-size: .84rem; color: var(--muted); }
.mega__foot a { display: inline-flex; align-items: center; gap: .35rem; color: var(--accent); font-weight: 600; }
.mega__foot a svg { transition: transform .2s var(--ease); }
.mega__foot a:hover { text-decoration: none; }
.mega__foot a:hover svg { transform: translateX(3px); }
.mega__dot { display: inline-block; width: 7px; height: 7px; margin-right: .55rem; border-radius: 50%; background: #34c38a; box-shadow: 0 0 0 3px rgb(52 195 138 / .2); vertical-align: 1px; }
.mega__panel--resources { width: min(1040px, calc(100vw - 2rem)); display: grid; grid-template-columns: minmax(0, 1fr) 240px; gap: .55rem; }
.mega__cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .15rem; }
.mega__col { display: flex; flex-direction: column; }
.mega__label, .navsheet__label { font-family: var(--font-mono); font-size: .68rem; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.mega__label { padding: .65rem .75rem .25rem; }

/* the dark Release Radar card: same in both modes */
.mega-promo, .navsheet__hello { position: relative; overflow: hidden; display: flex; flex-direction: column; gap: .9rem; padding: 1.2rem; border-radius: 14px; color: #F5F4F1;
    background: radial-gradient(120% 90% at 100% 0%, rgb(228 41 79 / .55), transparent 60%), radial-gradient(90% 80% at 0% 100%, rgb(47 111 122 / .5), transparent 65%), #0E0E11;
    border: 1px solid rgb(255 255 255 / .08); }
.mega-promo::after, .navsheet__hello::after { content: ""; position: absolute; right: -30px; top: -40px; width: 70px; height: 170px; transform: skewX(-22deg); border: 1px solid rgb(255 93 124 / .35); border-radius: 4px; pointer-events: none; }
.mega-promo:hover { text-decoration: none; color: #F5F4F1; }
.mega-promo__eyebrow { font-family: var(--font-mono); font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; color: #A7A7AE; }
.mega-promo__title, .navsheet__hello > strong { font-size: 1.4rem; line-height: 1.02; letter-spacing: -.035em; font-weight: 600; }
.mega-promo__title em, .navsheet__hello em { font-style: italic; color: #FF5D7C; }
.mega-promo__cta { margin-top: auto; display: inline-flex; align-items: center; gap: .4rem; font-weight: 600; font-size: .88rem; }
.mega-promo__cta svg { transition: transform .2s var(--ease); }
.mega-promo:hover .mega-promo__cta svg { transform: translateX(3px); }
.heatbar { display: flex; align-items: flex-end; gap: 4px; height: 46px; position: relative; z-index: 1; }
.mega-promo .heatbar { height: 96px; margin-top: auto; }
.mega-promo .mega-promo__cta { margin-top: 0; }
.heatbar i { flex: 1; border-radius: 4px 4px 2px 2px; box-shadow: inset 0 1px 0 rgb(255 255 255 / .25); }
.heatbar i:nth-child(1) { height: 72%; background: #D8783D; }
.heatbar i:nth-child(2) { height: 96%; background: #E4294F; }
.heatbar i:nth-child(3) { height: 50%; background: #7E8C5A; }
.heatbar i:nth-child(4) { height: 22%; background: #2F6F7A; }
.heatbar i:nth-child(5) { height: 42%; background: #7E8C5A; }
.heatbar i:nth-child(6) { height: 66%; background: #D8783D; }
.heatbar i:nth-child(7) { height: 90%; background: #E4294F; }
.heatbar i:nth-child(8) { height: 58%; background: #D8783D; }
.heatbar i.heatbar__pick { box-shadow: 0 0 0 2px #9fe6ee, 0 0 16px rgb(79 179 191 / .9); }

/* phones: animated menu button + sheet */
.burger { position: relative; }
.burger span { position: absolute; left: 10px; right: 10px; height: 2px; border-radius: 2px; background: currentColor; transition: transform .25s var(--ease), opacity .2s; }
.burger span:nth-child(1) { top: 12px; } .burger span:nth-child(2) { top: 17px; } .burger span:nth-child(3) { top: 22px; }
.menu--mobile[open] > .burger { background: var(--surface-2); color: var(--text); }
.menu--mobile[open] > .burger span:nth-child(1) { transform: translateY(5px) rotate(45deg); }
.menu--mobile[open] > .burger span:nth-child(2) { opacity: 0; transform: scaleX(.2); }
.menu--mobile[open] > .burger span:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }
html:has(.menu--mobile[open]) { overflow: hidden; }
.navsheet { position: absolute; left: 0; right: 0; top: 100%; height: calc(100vh - 60px); height: calc(100dvh - 60px); overflow-y: auto; overscroll-behavior: contain; z-index: 45;
    background: var(--bg); border-top: 1px solid var(--border); animation: sheet-in .22s var(--ease); }
@keyframes sheet-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.navsheet__inner { max-width: 560px; margin: 0 auto; padding: 1rem 1rem 3rem; display: flex; flex-direction: column; gap: 1.4rem; }
.navsheet__inner > * { animation: sheet-rise .4s var(--ease) both; }
.navsheet__inner > :nth-child(2) { animation-delay: .04s; } .navsheet__inner > :nth-child(3) { animation-delay: .08s; }
.navsheet__inner > :nth-child(4) { animation-delay: .12s; } .navsheet__inner > :nth-child(n+5) { animation-delay: .16s; }
@keyframes sheet-rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.navsheet__account { display: flex; align-items: center; gap: .8rem; padding: .9rem; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); }
.navsheet__who { display: flex; flex-direction: column; align-items: flex-start; gap: .3rem; min-width: 0; }
.navsheet__who strong { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.navsheet__account .btn { margin-left: auto; flex: none; }
.navsheet__buttons { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; position: relative; z-index: 1; }
.navsheet__buttons .btn:not(.btn--primary) { background: rgb(255 255 255 / .08); color: #F5F4F1; border-color: rgb(255 255 255 / .16); }
.navsheet__section { display: flex; flex-direction: column; gap: .6rem; }
.navsheet__label { display: flex; justify-content: space-between; align-items: baseline; padding: 0 .2rem; }
.navsheet__label small { font-family: var(--font-sans); font-size: .78rem; letter-spacing: 0; text-transform: none; }
.navsheet__tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem; }
.navtile { display: flex; flex-direction: column; align-items: flex-start; gap: .6rem; padding: .8rem .75rem; border-radius: 14px; background: var(--surface); border: 1px solid var(--border);
    color: var(--text); font-size: .84rem; font-weight: 600; line-height: 1.2; letter-spacing: -.01em; transition: border-color .15s, transform .15s; }
.navtile:hover, .navtile:active { text-decoration: none; border-color: var(--primary); }
.navtile:active { transform: scale(.98); }
.navtile.is-active { border-color: var(--primary); }
.navtile.is-active .navtile__icon { background: var(--primary); color: #fff; }
.navtile__icon { width: 34px; height: 34px; }
.navsheet__rows { display: flex; flex-direction: column; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); overflow: hidden; }
.navrow { display: flex; align-items: center; gap: .8rem; padding: .75rem .9rem; color: var(--text); }
.navrow + .navrow { border-top: 1px solid var(--border); }
.navrow:hover, .navrow:active { background: var(--surface-2); text-decoration: none; }
.navrow__icon { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--surface-2); color: var(--text-2); }
.navrow.is-active .navrow__icon { background: var(--primary-soft); color: var(--accent); }
.navrow__text { display: flex; flex-direction: column; gap: .1rem; min-width: 0; }
.navrow > svg { margin-left: auto; flex: none; color: var(--muted); }
.navsheet__links { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem 1.2rem; padding: 0 .2rem; font-size: .9rem; }
.navsheet__links a { color: var(--text-2); }
.navsheet__links form { margin: 0 0 0 auto; }
.navsheet__links button { background: none; border: 0; padding: 0; font: inherit; color: var(--muted); cursor: pointer; }
@media (max-width: 360px) { .navsheet__tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 1080px) { .mega__panel--resources { grid-template-columns: minmax(0, 1fr); } .mega-promo { display: none; } }
@media (prefers-reduced-motion: reduce) { .mega__panel, .navsheet, .navsheet__inner > * { animation: none; } }

@media (max-width: 420px) {
    .site-header__inner { gap: .75rem; }
    .site-header .logo__text { display: none; }
    .site-header__actions { gap: .25rem; }
}

@media (max-width: 900px) {
    .nav { display: none; }
    .menu--mobile { display: block; }
    .site-header .nav__signin, .site-header .nav__desk { display: none; }
}

.site-footer { border-top: 1px solid var(--border); margin-top: 4rem; padding-top: 2.5rem; background: var(--bg-subtle); }
.site-footer__inner { display: flex; justify-content: space-between; gap: 2rem; flex-wrap: wrap; padding-bottom: 2rem; }
.site-footer__brand { max-width: 300px; }
.site-footer__brand p { margin-top: .6rem; }
.site-footer__nav { display: flex; gap: 3rem; flex-wrap: wrap; }
.site-footer__col { display: flex; flex-direction: column; gap: .45rem; font-size: .9rem; }
.site-footer__col a { color: var(--text-2); }
.site-footer__heading { font-size: .75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: .2rem; }
.site-footer__legal { border-top: 1px solid var(--border); padding-top: 1.1rem; padding-bottom: 1.6rem; font-size: .8rem; color: var(--muted); }
.site-footer__legal p { margin: 0; }

/* -- App shell ------------------------------------------------------------ */
/* Desktop: sidebar + content. Phones (≤900px): app bar on top, tab bar at the
   bottom (partials/app-mobile.php). The admin area keeps its own top bar. */

.app-shell { display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr); min-height: 100vh; background: var(--bg-subtle); }
.app-shell__main { display: flex; flex-direction: column; min-width: 0; background: var(--bg); border-left: 1px solid var(--border); }
.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: .9rem; padding: 1rem .75rem; background: var(--bg-subtle); overflow-y: auto; }
.sidebar__top { display: flex; align-items: center; justify-content: space-between; padding: .25rem .5rem .25rem; }
.sidebar__nav { display: flex; flex-direction: column; gap: 2px; }
.sidebar__label { padding: .9rem .65rem .35rem; font-family: var(--font-mono); font-size: .7rem; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.sidebar__label:first-child { padding-top: .25rem; }
.sidebar__link { display: flex; align-items: center; gap: .65rem; padding: .5rem .65rem; border-radius: var(--radius-sm); color: var(--text-2); font-size: .92rem; font-weight: 500; }
.sidebar__link svg { color: var(--muted); flex: none; }
.sidebar__link:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.sidebar__link--active { background: var(--surface); color: var(--text); font-weight: 600; box-shadow: var(--shadow-sm); border: 1px solid var(--border); padding: calc(.5rem - 1px) calc(.65rem - 1px); }
.sidebar__link--active svg { color: var(--accent); }
.sidebar__divider { height: 1px; background: var(--border); margin: .5rem .25rem; }
.sidebar__foot { margin-top: auto; display: flex; flex-direction: column; gap: .6rem; }

/* Game switcher (sidebar + phone app bar) */
.game-pick { position: relative; }
.game-pick__trigger { display: flex; align-items: center; gap: .6rem; padding: .5rem .55rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-sm); cursor: pointer; }
.game-pick__trigger:hover { border-color: var(--border-strong); }
.game-pick__trigger > svg { margin-left: auto; color: var(--muted); flex: none; }
.game-pick__capsule { width: 46px; height: 22px; border-radius: 4px; object-fit: cover; background: var(--surface-2); flex: none; }
.game-pick__body { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.game-pick__label { font-family: var(--font-mono); font-size: .68rem; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.game-pick__name { font-size: .9rem; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.game-pick__panel { left: 0; right: auto; width: 100%; min-width: 260px; }
.game-pick__item { display: flex; align-items: center; gap: .6rem; }
.game-pick__item-name { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.game-pick__item.is-current { font-weight: 600; }
.game-pick__item.is-current svg { color: var(--accent); }
.game-pick__new { display: flex; align-items: center; gap: .5rem; color: var(--accent); border-top: 1px solid var(--border); margin-top: .3rem; padding-top: .55rem; border-radius: 0 0 5px 5px; }
.menu__label { display: block; padding: .45rem .6rem .3rem; font-family: var(--font-mono); font-size: .7rem; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }

/* Plan nudge + account row at the bottom of the sidebar */
.plan-card { display: flex; flex-direction: column; gap: .45rem; padding: .85rem; border-radius: var(--radius); border: 1px solid color-mix(in srgb, var(--primary) 25%, var(--border)); background: linear-gradient(160deg, var(--primary-soft), var(--surface) 70%); }
.plan-card__name { font-size: .78rem; font-weight: 650; color: var(--primary-soft-fg); }
.plan-card__text { margin: 0; font-size: .82rem; color: var(--text-2); line-height: 1.45; }
.account-row { display: flex; align-items: center; gap: .5rem; padding: .5rem .35rem .25rem; border-top: 1px solid var(--border); }
.account-row__body { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.25; }
.account-row__name { font-size: .84rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.account-row__plan { font-size: .74rem; color: var(--muted); }
.account-row form { margin: 0; }
.account-row .icon-btn { width: 32px; height: 32px; }

.topbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; justify-content: space-between; gap: 1rem; height: 56px; padding: 0 1.5rem; border-bottom: 1px solid var(--border); background: color-mix(in srgb, var(--bg) 90%, transparent); backdrop-filter: blur(10px); }
.topbar__title { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar__actions { display: flex; align-items: center; gap: .5rem; }
.app-main { padding: 1.75rem 2rem; flex: 1; width: 100%; max-width: 1320px; }
.app-footer { padding: 1rem 2rem 1.5rem; }

/* Phone navigation: hidden on desktop */
.appbar, .tabbar { display: none; }

@media (max-width: 900px) {
    .app-shell { grid-template-columns: 1fr; }
    .app-shell__main { border-left: 0; }
    .layout--app .sidebar { display: none; }
    .app-main { padding: 1rem; }
    .app-footer { padding: .5rem 1rem calc(88px + env(safe-area-inset-bottom)); }

    .appbar { position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: .6rem; height: 56px; padding: 0 .75rem; border-bottom: 1px solid var(--border); background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: saturate(1.4) blur(10px); }
    .appbar__home { display: flex; flex: none; }
    .appbar .game-pick { flex: 1; min-width: 0; }
    .appbar .game-pick__trigger { box-shadow: none; padding: .35rem .5rem; border-radius: 999px; }
    .appbar .game-pick__capsule { width: 36px; height: 17px; }
    .appbar .game-pick__panel { position: fixed; left: .75rem; right: .75rem; top: 60px; width: auto; min-width: 0; }
    .appbar .menu--account .menu__trigger { padding: .2rem; }
    .appbar .menu--account { margin-left: auto; }

    .tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 45; display: grid; grid-template-columns: repeat(5, 1fr); padding: .35rem .25rem calc(.35rem + env(safe-area-inset-bottom)); border-top: 1px solid var(--border); background: color-mix(in srgb, var(--surface) 94%, transparent); backdrop-filter: saturate(1.4) blur(12px); }
    .tabbar__item { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .2rem; min-height: 52px; border-radius: var(--radius-sm); color: var(--muted); font-size: .7rem; font-weight: 600; list-style: none; cursor: pointer; }
    .tabbar__item:hover { text-decoration: none; color: var(--text); }
    .tabbar__item.is-active { color: var(--accent); }
    .tabbar__item.is-active svg { stroke-width: 2.2; }
    .tabbar__more { position: static; }
    .tabbar__more > summary { list-style: none; }
    .tabbar__more > summary::-webkit-details-marker { display: none; }
    .tabbar__more[open] > summary { color: var(--text); }
    .sheet { position: fixed; left: .5rem; right: .5rem; bottom: calc(72px + env(safe-area-inset-bottom)); z-index: 46; display: flex; flex-direction: column; padding: .4rem; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); box-shadow: 0 -10px 40px -10px rgb(0 0 0 / .35); }
    .sheet__item { display: flex; align-items: center; gap: .75rem; padding: .8rem .75rem; border-radius: var(--radius-sm); color: var(--text); font-weight: 550; }
    .sheet__item svg { color: var(--muted); }
    .sheet__item:hover { background: var(--surface-2); text-decoration: none; }
    .sheet__item.is-active { color: var(--accent); }
    .sheet__item.is-active svg { color: var(--accent); }
    .sheet__divider { height: 1px; background: var(--border); margin: .3rem .5rem; }
    .sheet__item--button { width: 100%; border: 0; background: none; font: inherit; font-weight: 550; text-align: left; cursor: pointer; }
    .sheet__form { margin: 0; }

    /* Admin: the sidebar becomes the drawer in the top bar (admin.css). */
    .sidebar--admin { display: none; }
    .topbar { padding: 0 1rem; position: static; }
}

/* -- Auth layout ---------------------------------------------------------- */

.layout--auth { background: var(--bg-subtle); }
.layout__main--centered { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 2rem 1rem; }
.auth-top { width: 100%; max-width: 420px; display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.card--auth { width: 100%; max-width: 420px; padding: 1.75rem; }
.auth-foot { margin-top: 1rem; }
.divider { display: flex; align-items: center; gap: .75rem; color: var(--muted); font-size: .8rem; margin: 1.1rem 0; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }

/* -- Page ----------------------------------------------------------------- */

.page__header { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.page__title { margin: 0; }
.page__lead { color: var(--muted); margin: .35rem 0 0; max-width: 680px; }
.page__actions { display: flex; gap: .5rem; flex-wrap: wrap; }

.prose { max-width: 720px; }
.prose h2 { margin-top: 2rem; }
.prose h3 { margin-top: 1.5rem; }
.prose ul, .prose ol { padding-left: 1.25rem; }
.prose li + li { margin-top: .3rem; }

/* -- Cards ---------------------------------------------------------------- */

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); }
.card__header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 1.25rem; border-bottom: 1px solid var(--border); }
.card__title { margin: 0; font-size: 1rem; font-weight: 600; }
.card__body { padding: 1.25rem; }
.card__footer { padding: .9rem 1.25rem; border-top: 1px solid var(--border); background: var(--bg-subtle); border-radius: 0 0 var(--radius-lg) var(--radius-lg); }
.card--flush .card__body { padding: 0; }
.card--accent { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary); }
.card--auth .card__title, .card--auth h1 { font-size: 1.35rem; }
.panel { background: var(--bg-subtle); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem; }

/* -- Buttons -------------------------------------------------------------- */

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
    height: 38px; padding: 0 .95rem; border-radius: var(--radius-sm);
    border: 1px solid var(--border); background: var(--surface); color: var(--text);
    font: inherit; font-size: .9rem; font-weight: 550; line-height: 1; cursor: pointer;
    box-shadow: var(--shadow-sm); transition: background .15s var(--ease), border-color .15s var(--ease), transform .1s var(--ease);
    white-space: nowrap; text-decoration: none;
}
.btn:hover { background: var(--surface-2); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; }
.btn--primary { background: var(--primary); border-color: var(--primary); color: var(--primary-fg); }
.btn--primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
.btn--ghost { background: transparent; border-color: transparent; box-shadow: none; }
.btn--ghost:hover { background: var(--surface-2); }
.btn--danger { background: var(--danger-soft); border-color: transparent; color: var(--danger); box-shadow: none; }
.btn--danger:hover { background: var(--danger); color: #fff; }
.btn--link { background: none; border: 0; box-shadow: none; color: var(--accent); padding: 0; height: auto; font-weight: 500; }
.btn--link:hover { background: none; text-decoration: underline; }
.btn--sm { height: 32px; padding: 0 .7rem; font-size: .84rem; }
@media (pointer: coarse) { .btn--sm { height: 38px; padding: 0 .8rem; } }
.btn--lg { height: 46px; padding: 0 1.3rem; font-size: 1rem; }
.btn--block { width: 100%; }
.btn--google { background: #fff; border-color: #dadce0; color: #1f1f1f; font-weight: 500; }
.btn--google:hover { background: #f8f9fa; border-color: #c6c9cd; color: #1f1f1f; }
.btn--google__g { width: 18px; height: 18px; flex: none; stroke: none; }
:root[data-mode="dark"] .btn--google { background: #131314; border-color: #8e918f; color: #e3e3e3; }
:root[data-mode="dark"] .btn--google:hover { background: #1f1f20; }
@media (prefers-color-scheme: dark) { :root[data-mode="auto"] .btn--google { background: #131314; border-color: #8e918f; color: #e3e3e3; } :root[data-mode="auto"] .btn--google:hover { background: #1f1f20; } }
.auth-providers { display: grid; gap: .6rem; }
.btn--steam { background: #171a21; border-color: #171a21; color: #fff; }
.btn--steam:hover { background: #2a2f3a; border-color: #2a2f3a; }
:root[data-mode="dark"] .btn--steam { border-color: var(--border-strong); }
@media (prefers-color-scheme: dark) { :root[data-mode="auto"] .btn--steam { border-color: var(--border-strong); } }
.btn svg { width: 16px; height: 16px; }

.icon-btn { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: var(--radius-sm); border: 1px solid transparent; background: transparent; color: var(--text-2); cursor: pointer; list-style: none; }
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
summary.icon-btn::-webkit-details-marker { display: none; }

.mode-toggle__icon { display: none; }
:root[data-mode="light"] .mode-toggle__icon--light,
:root[data-mode="dark"] .mode-toggle__icon--dark,
:root[data-mode="auto"] .mode-toggle__icon--auto { display: block; }

/* -- Forms ---------------------------------------------------------------- */

.form { display: flex; flex-direction: column; gap: 1rem; }
.form--inline { flex-direction: row; flex-wrap: wrap; align-items: flex-end; gap: .75rem; }
.field { display: flex; flex-direction: column; gap: .35rem; min-width: 0; }
.field__label { font-size: .86rem; font-weight: 550; color: var(--text-2); }
.field__input {
    width: 100%; height: 38px; padding: 0 .75rem; border-radius: var(--radius-sm);
    border: 1px solid var(--border-strong); background: var(--surface); color: var(--text);
    font: inherit; font-size: .93rem; transition: border-color .15s, box-shadow .15s;
}
textarea.field__input { height: auto; min-height: 120px; padding: .6rem .75rem; resize: vertical; }
select.field__input { padding-right: 2rem; appearance: none; background-image: none; }
.field__select { position: relative; }
.field__select::after { content: ""; position: absolute; right: .8rem; top: 50%; width: 7px; height: 7px; border-right: 1.6px solid var(--muted); border-bottom: 1.6px solid var(--muted); transform: translateY(-70%) rotate(45deg); pointer-events: none; }
.field__input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--ring); }
.field__input[aria-invalid="true"] { border-color: var(--danger); }
.field__input--lg { height: 46px; font-size: 1rem; }
.field__input--code { font-family: var(--font-mono); letter-spacing: .3em; text-align: center; font-size: 1.15rem; }
.field__hint { font-size: .8rem; color: var(--muted); margin: 0; }
.field__error { font-size: .8rem; color: var(--danger); margin: 0; }
.field--row { flex-direction: row; align-items: center; gap: .6rem; }
.checkbox { display: flex; align-items: flex-start; gap: .55rem; font-size: .9rem; cursor: pointer; }
.checkbox input { margin-top: .2rem; accent-color: var(--primary); width: 16px; height: 16px; }
.input-group { display: flex; gap: .5rem; }
.input-group .field__input { flex: 1; }
@media (max-width: 520px) {
    .input-group { flex-direction: column; }
    .input-group > .field__input, .input-group > .btn, .input-group > .game-search { flex: none; width: 100%; }
}

/* "Search your game" box (tools/_form.php, app.js [data-game-search]): matches drop down under the field. */
.game-search { position: relative; flex: 1; min-width: 0; }
.game-search::after { content: ""; position: absolute; right: .8rem; top: 50%; width: 14px; height: 14px; margin-top: -7px; border: 2px solid var(--border-strong); border-top-color: var(--primary); border-radius: 50%; opacity: 0; pointer-events: none; transition: opacity .15s; }
.game-search.is-loading::after { opacity: 1; animation: game-search-spin .7s linear infinite; }
@keyframes game-search-spin { to { transform: rotate(360deg); } }
.game-search .field__input { padding-right: 2.2rem; }
.game-search__list {
    position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 40; margin: 0; padding: .3rem; list-style: none;
    max-height: min(60vh, 380px); overflow-y: auto; overscroll-behavior: contain;
    background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius); box-shadow: var(--shadow-lg);
    text-align: left;
}
.game-search__list[hidden] { display: none; }
.game-search__item { display: flex; align-items: center; gap: .7rem; padding: .4rem .5rem; border-radius: var(--radius-sm); cursor: pointer; }
.game-search__item[aria-selected="true"] { background: var(--surface-2); }
.game-search__img { flex: none; width: 64px; height: 30px; object-fit: cover; border-radius: 4px; background: var(--surface-2); }
.game-search__img.is-missing { visibility: hidden; }
.game-search__text { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.game-search__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .93rem; font-weight: 550; color: var(--text); }
.game-search__name mark { background: none; color: inherit; font-weight: 700; text-decoration: underline; text-decoration-color: var(--primary); text-decoration-thickness: 2px; text-underline-offset: 2px; }
.game-search__when { font-family: var(--font-mono); font-size: .72rem; letter-spacing: .02em; color: var(--muted); }
.game-search__when.is-upcoming { color: var(--accent); }
.game-search__empty { padding: .6rem .6rem; font-size: .88rem; color: var(--muted); }
@media (max-width: 640px) {
    .game-search__img { width: 72px; height: 34px; }
    .game-search__item { padding: .5rem; }
}
@media (prefers-reduced-motion: reduce) { .game-search.is-loading::after { animation-duration: 2s; } }
/* Phones: 16px stops iOS from zooming into a field; 44px is a comfortable tap target. */
@media (max-width: 640px) {
    .field__input { font-size: 16px; height: 44px; }
    .field__input--lg { height: 50px; }
    textarea.field__input { height: auto; }
}

.segmented { display: inline-flex; padding: 3px; border-radius: var(--radius-sm); background: var(--surface-2); border: 1px solid var(--border); }
.segmented__item { padding: .3rem .8rem; border-radius: 5px; font-size: .85rem; color: var(--text-2); border: 0; background: none; cursor: pointer; font: inherit; }
.segmented__item--active, .segmented__item[aria-pressed="true"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }

.captcha:empty { display: none; }
.captcha iframe { max-width: 100%; }

/* -- Feedback ------------------------------------------------------------- */

.alerts { display: flex; flex-direction: column; gap: .5rem; margin: 1rem 0; }
.alerts:empty { display: none; }
.alert { padding: .7rem .9rem; border-radius: var(--radius-sm); border: 1px solid transparent; font-size: .9rem; }
.alert--success { background: var(--success-soft); color: var(--success); border-color: color-mix(in srgb, var(--success) 25%, transparent); }
.alert--info { background: var(--info-soft); color: var(--info); border-color: color-mix(in srgb, var(--info) 25%, transparent); }
.alert--warning { background: var(--warning-soft); color: var(--warning); border-color: color-mix(in srgb, var(--warning) 25%, transparent); }
.alert--danger { background: var(--danger-soft); color: var(--danger); border-color: color-mix(in srgb, var(--danger) 25%, transparent); }

.banner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .75rem; padding: .6rem 1.5rem; font-size: .9rem; border-bottom: 1px solid var(--border); }
.banner--warning { background: var(--warning-soft); color: var(--text); }
.banner__form { margin: 0; }
.banner--impersonating { background: var(--ruby); color: #fff; border-bottom-color: var(--ruby-deep); }
.banner--impersonating .btn { background: #fff; color: var(--ink-950, #09090B); border-color: #fff; }

.badge { display: inline-flex; align-items: center; gap: .3rem; height: 22px; padding: 0 .5rem; border-radius: 999px; font-size: .74rem; font-weight: 600; background: var(--surface-2); color: var(--text-2); border: 1px solid var(--border); white-space: nowrap; }
.badge--ruby { background: var(--primary-soft); color: var(--primary-soft-fg); border-color: transparent; }
.badge--success { background: var(--success-soft); color: var(--success); border-color: transparent; }
.badge--warning { background: var(--warning-soft); color: var(--warning); border-color: transparent; }
.badge--danger { background: var(--danger-soft); color: var(--danger); border-color: transparent; }
.badge--info { background: var(--info-soft); color: var(--info); border-color: transparent; }

.empty { text-align: center; padding: 2.5rem 1rem; color: var(--muted); }
.empty__title { color: var(--text); font-weight: 600; margin-bottom: .35rem; }
.notice { padding: .8rem 1rem; border-left: 3px solid var(--primary); background: var(--primary-soft); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; font-size: .9rem; }
.lock { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding: 1rem 1.25rem; border: 1px dashed var(--border-strong); border-radius: var(--radius); color: var(--text-2); }

/* -- Menus (details) ------------------------------------------------------ */

.menu { position: relative; }
.menu > summary { list-style: none; cursor: pointer; }
.menu > summary::-webkit-details-marker { display: none; }
.menu__trigger { display: flex; align-items: center; gap: .5rem; padding: .25rem .5rem .25rem .25rem; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); }
.menu__trigger:hover { background: var(--surface-2); }
.menu__name { font-size: .88rem; font-weight: 550; max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu__panel { position: absolute; right: 0; top: calc(100% + 6px); min-width: 230px; z-index: 50; padding: .35rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-lg); display: flex; flex-direction: column; }
.menu__header { display: flex; flex-direction: column; gap: .2rem; padding: .55rem .6rem .7rem; border-bottom: 1px solid var(--border); margin-bottom: .3rem; align-items: flex-start; }
.menu__item { display: block; width: 100%; text-align: left; padding: .45rem .6rem; border-radius: 5px; color: var(--text); font-size: .9rem; background: none; border: 0; font: inherit; cursor: pointer; }
.menu__item:hover { background: var(--surface-2); text-decoration: none; }
.menu__form { margin: 0; }
@media (max-width: 620px) { .menu__name { display: none; } }

.avatar { display: inline-grid; place-items: center; border-radius: 999px; object-fit: cover; background: var(--primary-soft); color: var(--primary-soft-fg); font-weight: 650; flex: none; }
.avatar--sm { width: 28px; height: 28px; font-size: .8rem; }
.avatar--md { width: 40px; height: 40px; font-size: 1rem; }
.avatar--lg { width: 64px; height: 64px; font-size: 1.5rem; }

/* -- Tables --------------------------------------------------------------- */

.table-wrap { position: relative; width: 100%; overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); }
.card .table-wrap { border: 0; border-radius: 0; }
.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th, .table td { padding: .65rem .85rem; text-align: left; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table th { font-family: var(--font-mono); font-size: .7rem; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); background: var(--bg-subtle); white-space: nowrap; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: var(--bg-subtle); }
.table--dense th, .table--dense td { padding: .45rem .7rem; }
.table__num, .table td.num, .table th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table th[data-sort] { cursor: pointer; user-select: none; }
.table th[data-sort]:hover { color: var(--text); }
.table th[aria-sort="ascending"]::after { content: " ↑"; color: var(--accent); }
.table th[aria-sort="descending"]::after { content: " ↓"; color: var(--accent); }
.table tr.is-own td { background: var(--primary-soft); }
.table tr.is-inactive td { opacity: .55; }

.datalist { display: grid; grid-template-columns: max-content 1fr; gap: .5rem 1.5rem; margin: 0; }
.datalist__row { display: contents; }
.datalist__key { color: var(--muted); font-size: .88rem; }
.datalist__value { margin: 0; font-weight: 500; overflow-wrap: anywhere; }

/* -- Stats ---------------------------------------------------------------- */

.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1rem 1.15rem; display: flex; flex-direction: column; gap: .25rem; }
.stat__label { font-family: var(--font-mono); font-size: .7rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); font-weight: 400; }
.stat__value { font-size: 1.55rem; font-weight: 650; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stat__delta { font-size: .82rem; font-variant-numeric: tabular-nums; }
.delta--up { color: var(--up); }
.delta--down { color: var(--down); }
@media (max-width: 900px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.sparkline { display: block; color: var(--muted); overflow: visible; }
.sparkline polyline, .sparkline line { fill: none; stroke: currentColor; stroke-width: 1.6; vector-effect: non-scaling-stroke; }
.sparkline--up { color: var(--up); }
.sparkline--down { color: var(--down); }
.sparkline--empty { color: var(--border-strong); }
.sparkline--empty line { stroke-dasharray: 2 3; }

.chart { position: relative; width: 100%; height: 260px; }
.chart canvas { max-width: 100%; }

/* -- Games ---------------------------------------------------------------- */

.game { display: flex; align-items: center; gap: .75rem; min-width: 0; }
.game__capsule { width: 92px; height: 43px; object-fit: cover; border-radius: 5px; border: 1px solid var(--border); background: var(--surface-2); flex: none; }
.game__capsule--sm { width: 64px; height: 30px; }
.game__capsule--lg { width: 230px; height: 108px; border-radius: var(--radius); }
.game__body { min-width: 0; display: flex; flex-direction: column; }
.game__name { font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
a.game__name:hover { color: var(--accent); }
.game__meta { font-size: .8rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.game-card { display: flex; flex-direction: column; gap: .6rem; padding: .8rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.game-card img { width: 100%; aspect-ratio: 460 / 215; object-fit: cover; border-radius: 6px; background: var(--surface-2); }
.tags { display: flex; flex-wrap: wrap; gap: .3rem; }
.tag { font-size: .74rem; padding: .12rem .5rem; border-radius: 999px; background: var(--surface-2); color: var(--text-2); border: 1px solid var(--border); }
.tag--shared { background: var(--primary-soft); color: var(--primary-soft-fg); border-color: transparent; }
.score { font-variant-numeric: tabular-nums; font-weight: 600; }
.bar { height: 6px; border-radius: 999px; background: var(--surface-2); overflow: hidden; min-width: 60px; }
.bar__fill { display: block; height: 100%; background: var(--primary); border-radius: 999px; }
.bar__fill--5 { width: 5%; } .bar__fill--10 { width: 10%; } .bar__fill--15 { width: 15%; } .bar__fill--20 { width: 20%; }
.bar__fill--25 { width: 25%; } .bar__fill--30 { width: 30%; } .bar__fill--35 { width: 35%; } .bar__fill--40 { width: 40%; }
.bar__fill--45 { width: 45%; } .bar__fill--50 { width: 50%; } .bar__fill--55 { width: 55%; } .bar__fill--60 { width: 60%; }
.bar__fill--65 { width: 65%; } .bar__fill--70 { width: 70%; } .bar__fill--75 { width: 75%; } .bar__fill--80 { width: 80%; }
.bar__fill--85 { width: 85%; } .bar__fill--90 { width: 90%; } .bar__fill--95 { width: 95%; } .bar__fill--100 { width: 100%; }

/* -- Release Radar -------------------------------------------------------- */

.heat-0 { --heat: var(--heat-0); --heat-fg: var(--text-2); }
.heat-1 { --heat: var(--heat-1); --heat-fg: #F5F4F1; }
.heat-2 { --heat: var(--heat-2); --heat-fg: #F5F4F1; }
.heat-3 { --heat: var(--heat-3); --heat-fg: #09090B; }
.heat-4 { --heat: var(--heat-4); --heat-fg: #09090B; }
.heat-5 { --heat: var(--heat-5); --heat-fg: #09090B; }
.heat-6 { --heat: var(--heat-6); --heat-fg: #09090B; }
.heat-7 { --heat: var(--heat-7); --heat-fg: #09090B; }
.heat-8 { --heat: var(--heat-8); --heat-fg: #09090B; }
.heat-9 { --heat: var(--heat-9); --heat-fg: #09090B; }
.heat-10 { --heat: var(--heat-10); --heat-fg: #F5F4F1; }

.radar-wrap { display: flex; flex-direction: column; gap: 1.25rem; }
.radar { display: grid; grid-template-columns: repeat(auto-fill, minmax(176px, 1fr)); gap: .6rem; }
/* A week: calm surface, heat shown by a tint, the label pill and a meter. */
.radar__week { position: relative; display: flex; flex-direction: column; gap: .55rem; padding: .8rem .85rem .75rem; border-radius: var(--radius); background: color-mix(in srgb, var(--heat) 7%, var(--surface)); color: var(--text); border: 1px solid var(--border); text-align: left; font: inherit; cursor: pointer; transition: border-color .15s var(--ease), box-shadow .15s var(--ease), transform .15s var(--ease); }
.radar__week:hover { border-color: color-mix(in srgb, var(--heat) 55%, var(--border)); box-shadow: var(--shadow); transform: translateY(-1px); text-decoration: none; }
.radar__week[aria-expanded="true"], .radar__week--selected { border-color: var(--text); box-shadow: 0 0 0 1px var(--text); }
.radar__week--best { border-color: color-mix(in srgb, var(--success) 55%, var(--border)); }
.radar__week--own { border-color: var(--text); }
.radar__top { display: flex; align-items: center; justify-content: space-between; gap: .4rem; min-height: 20px; }
.radar__date { font-family: var(--font-mono); font-size: .74rem; font-weight: 500; letter-spacing: .02em; color: var(--text-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.radar__badge { padding: .1rem .45rem; border-radius: 999px; font-size: .66rem; font-weight: 650; letter-spacing: .02em; white-space: nowrap; }
.radar__badge--best { background: var(--success-soft); color: var(--success); }
.radar__badge--own { background: var(--text); color: var(--bg); }
.radar__score { display: flex; align-items: center; gap: .55rem; }
.radar__heat { font-size: 1.65rem; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1; letter-spacing: -.03em; color: var(--text); }
.radar__label { padding: .14rem .5rem; border-radius: 999px; background: var(--heat); color: var(--heat-fg); font-family: var(--font-mono); font-size: .66rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.radar__meter { display: block; height: 4px; border-radius: 999px; background: color-mix(in srgb, var(--text) 9%, transparent); overflow: hidden; }
.radar__meter-fill { display: block; height: 100%; border-radius: 999px; background: var(--heat); }
.radar__foot { display: flex; align-items: center; justify-content: space-between; gap: .4rem; min-height: 22px; }
.radar__faces { display: flex; }
.radar__faces img { width: 40px; height: 19px; border-radius: 4px; object-fit: cover; box-shadow: 0 0 0 2px var(--surface); background: var(--surface-2); }
.radar__faces img + img { margin-left: -9px; }
.radar__count { font-size: .74rem; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.radar__event { align-self: flex-start; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: .12rem .5rem; border-radius: 6px; background: var(--surface-2); color: var(--text-2); font-size: .7rem; font-weight: 550; }
.radar__event--fits { background: var(--success-soft); color: var(--success); }
.radar__week--locked { cursor: default; background: repeating-linear-gradient(135deg, var(--surface-2), var(--surface-2) 6px, var(--bg-subtle) 6px, var(--bg-subtle) 12px); color: var(--muted); border-color: var(--border); }
.radar__week--locked:hover { transform: none; box-shadow: none; }
.radar__lock { display: flex; align-items: center; gap: .35rem; font-size: .78rem; font-weight: 600; }

.radar-legend { display: flex; flex-wrap: wrap; gap: .85rem; align-items: center; font-size: .8rem; color: var(--muted); }
.radar-legend__swatch { display: inline-block; width: 10px; height: 10px; border-radius: 999px; background: var(--heat, var(--surface)); vertical-align: 0; margin-right: .35rem; }

.radar-detail { margin: .15rem 0 .35rem; grid-column: 1 / -1; }
.radar-detail[hidden] { display: none; }
.radar-detail__badge { padding: .15rem .55rem; border-radius: 999px; font-size: .78rem; font-weight: 650; background: var(--heat); color: var(--heat-fg); white-space: nowrap; }
.radar-detail__event { margin: 1rem 1.25rem 0; }
.radar-detail__more { margin: 0; padding: 0 1.25rem 1rem; }
.clashes { list-style: none; margin: 0; padding: .25rem 0; }
.clash { display: grid; grid-template-columns: 92px minmax(0, 1fr) 110px; align-items: center; gap: 1rem; padding: .75rem 1.25rem; }
.clash + .clash { border-top: 1px solid var(--border); }
.clash__capsule { width: 92px; height: 43px; border-radius: 5px; object-fit: cover; background: var(--surface-2); }
.clash__body { display: flex; flex-direction: column; gap: .2rem; min-width: 0; }
.clash__name { font-weight: 600; color: var(--text); }
.clash__meta { font-size: .8rem; color: var(--muted); }
.clash__tags { margin-top: .15rem; }
.clash__match { display: flex; flex-direction: column; align-items: flex-end; gap: .25rem; font-variant-numeric: tabular-nums; }
.clash__match .bar { width: 100%; }

.best-weeks { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem; }
.best-weeks__item { border: 1px solid var(--border); border-radius: var(--radius); padding: .9rem 1rem; background: var(--surface); display: flex; flex-direction: column; gap: .2rem; }
.best-weeks__rank { font-size: .74rem; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.best-weeks__date { font-weight: 650; font-size: 1.05rem; }

/* Phones: two tiles per row, launch list stacks. */
@media (max-width: 620px) {
    .radar { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .45rem; }
    .radar__heat { font-size: 1.4rem; }
    .radar__faces img:nth-child(3) { display: none; }
    .clash { grid-template-columns: 72px minmax(0, 1fr); gap: .75rem; padding: .75rem 1rem; }
    .clash__capsule { width: 72px; height: 34px; }
    .clash__match { grid-column: 2; flex-direction: row; align-items: center; justify-content: flex-start; }
    .clash__match .bar { width: 90px; }
    .best-weeks { grid-template-columns: 1fr; }
}

/* -- Change feed ---------------------------------------------------------- */

.feed { list-style: none; margin: 0; padding: 0; }
.feed__item { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 1rem; padding: 1rem 1.25rem; border-bottom: 1px solid var(--border); }
.feed__item:last-child { border-bottom: 0; }
.feed__time { font-size: .8rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.feed__title { font-weight: 600; margin-bottom: .35rem; }
.feed__body { min-width: 0; }
.diff { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: .75rem; margin-top: .5rem; }
.diff__side { min-width: 0; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: .55rem .7rem; font-size: .88rem; overflow-wrap: anywhere; }
.diff__label { display: block; font-size: .7rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: .25rem; }
.diff__old { background: var(--danger-soft); }
.diff__new { background: var(--success-soft); }
.diff__side img { width: 100%; border-radius: 4px; display: block; }
@media (max-width: 620px) {
    .feed__item { grid-template-columns: 1fr; gap: .35rem; }
    .diff { grid-template-columns: 1fr; }
}

/* -- Tabs ----------------------------------------------------------------- */

.tabs { position: relative; display: flex; gap: .25rem; border-bottom: 1px solid var(--border); margin-bottom: 1.25rem; overflow-x: auto; }
.tabs__link { padding: .55rem .85rem; color: var(--muted); font-size: .9rem; font-weight: 550; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs__link:hover { color: var(--text); text-decoration: none; }
.tabs__link--active { color: var(--text); border-bottom-color: var(--primary); }

/* -- Steps (onboarding) --------------------------------------------------- */

.steps { display: flex; gap: .5rem; list-style: none; padding: 0; margin: 0 0 1.5rem; counter-reset: step; flex-wrap: wrap; }
.steps__item { display: flex; align-items: center; gap: .5rem; font-size: .88rem; color: var(--muted); counter-increment: step; }
.steps__item::before { content: counter(step); display: grid; place-items: center; width: 24px; height: 24px; border-radius: 999px; border: 1px solid var(--border-strong); font-size: .78rem; font-weight: 600; }
.steps__item + .steps__item::after { order: -1; content: ""; width: 24px; height: 1px; background: var(--border-strong); }
.steps__item--active { color: var(--text); font-weight: 600; }
.steps__item--active::before { background: var(--primary); border-color: var(--primary); color: #fff; }
.steps__item--done::before { content: "✓"; background: var(--primary-soft); border-color: transparent; color: var(--accent); }

/* -- Marketing ------------------------------------------------------------ */

.hero { padding: 4.5rem 0 3rem; }
.hero__title { font-size: clamp(2.2rem, 5.2vw, 3.6rem); letter-spacing: -.04em; line-height: 1.05; max-width: 820px; margin-bottom: 1rem; }
.hero__title em { font-style: italic; color: var(--accent); }
.hero__lead { font-size: 1.15rem; color: var(--muted); max-width: 640px; margin-bottom: 1.75rem; }
.hero__actions { display: flex; gap: .65rem; flex-wrap: wrap; align-items: center; }
.hero__form { max-width: 620px; }
.hero__note { margin-top: .9rem; font-size: .85rem; color: var(--muted); }
@media (max-width: 620px) {
    .hero { padding: 2.25rem 0 1rem; }
    .hero__lead { font-size: 1.05rem; margin-bottom: 1.25rem; }
}
.pill { display: inline-flex; align-items: center; gap: .5rem; padding: .3rem .75rem .3rem .35rem; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); font-size: .82rem; color: var(--text-2); margin-bottom: 1.25rem; }
.pill__dot { width: 18px; height: 18px; border-radius: 999px; background: var(--primary-soft); display: grid; place-items: center; }
.pill__dot::after { content: ""; width: 6px; height: 6px; border-radius: 999px; background: var(--primary); }

.demo { border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-lg); overflow: hidden; }
.demo__bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .85rem 1.1rem; border-bottom: 1px solid var(--border); background: var(--bg-subtle); flex-wrap: wrap; }
.demo__body { padding: 1.1rem; }

.pricing { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; align-items: stretch; }
.plan { display: flex; flex-direction: column; gap: 1rem; padding: 1.5rem; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); }
.plan--featured { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary), var(--shadow-lg); }
.plan__name { font-weight: 650; font-size: 1.05rem; display: flex; align-items: center; justify-content: space-between; }
.plan__price { font-size: 2.2rem; font-weight: 700; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.plan__price small { font-size: .9rem; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.plan__features { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .5rem; font-size: .9rem; flex: 1; }
.plan__features li { display: flex; gap: .5rem; }
.plan__features li::before { content: ""; flex: none; width: 16px; height: 16px; margin-top: .15rem; border-radius: 999px; background: var(--primary-soft); box-shadow: inset 0 0 0 4px var(--primary-soft), inset 0 0 0 8px var(--primary); }
.plan__features li.is-off { color: var(--muted); }
.plan__features li.is-off::before { background: var(--surface-2); box-shadow: none; }
[data-interval="month"] .price--year, [data-interval="year"] .price--month { display: none; }
@media (max-width: 900px) { .pricing { grid-template-columns: 1fr; } }

.compare th:first-child, .compare td:first-child { width: 34%; }

.faq { display: flex; flex-direction: column; gap: .6rem; min-width: 0; }
.faq details { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); transition: border-color .2s var(--ease), box-shadow .2s var(--ease); }
.faq details:hover { border-color: var(--border-strong); }
.faq details[open] { border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); box-shadow: inset 3px 0 0 var(--accent); }
.faq summary { cursor: pointer; font-weight: 600; font-size: 1.02rem; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1.05rem 1.25rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; flex: none; width: 8px; height: 8px; border-right: 1.75px solid var(--muted); border-bottom: 1.75px solid var(--muted); transform: rotate(45deg) translate(-2px, -2px); transition: transform .2s var(--ease); }
.faq details[open] summary::after { transform: rotate(-135deg) translate(-2px, -2px); border-color: var(--accent); }
.faq summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: var(--radius-lg); }
.faq details p { margin: 0; padding: 0 1.25rem 1.15rem; color: var(--text-2); max-width: 64ch; }

.steps-row { counter-reset: how; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.steps-row__item { counter-increment: how; padding: 1.25rem; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); }
.steps-row__item::before { content: counter(how, decimal-leading-zero); display: block; font-family: var(--font-mono); color: var(--accent); font-size: .85rem; margin-bottom: .6rem; }
@media (max-width: 900px) { .steps-row { grid-template-columns: 1fr; } }

.report-card { display: flex; flex-direction: column; gap: .4rem; padding: 1.25rem; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); color: var(--text); }
.report-card:hover { border-color: var(--border-strong); text-decoration: none; }
.report-card__title { font-weight: 650; font-size: 1.05rem; }

/* -- Misc ----------------------------------------------------------------- */

.kbd { display: inline-block; padding: .05rem .35rem; border-radius: 4px; border: 1px solid var(--border-strong); font-size: .78rem; font-family: var(--font-mono); background: var(--surface-2); }
.code-block { font-family: var(--font-mono); font-size: .85rem; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: .75rem .9rem; overflow-x: auto; white-space: pre; }
.secret { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.secret code { font-size: .95rem; padding: .45rem .6rem; word-break: normal; overflow-wrap: break-word; }
.qr { width: 196px; height: 196px; padding: 8px; background: #fff; border-radius: var(--radius); border: 1px solid var(--border); }
.qr svg, .qr img { width: 100%; height: 100%; }
.recovery-codes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .35rem .9rem; font-family: var(--font-mono); font-size: .95rem; padding: 1rem; background: var(--surface-2); border-radius: var(--radius-sm); max-width: 360px; }
.danger-zone { border-color: color-mix(in srgb, var(--danger) 40%, var(--border)); }
.danger-zone .card__title { color: var(--danger); }
.health-dot { display: inline-block; width: 8px; height: 8px; border-radius: 999px; background: var(--muted); margin-right: .4rem; }
.health-dot--ok { background: var(--success); }
.health-dot--warn { background: var(--warning); }
.health-dot--fail { background: var(--danger); }
.meter { height: 8px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.pagination { display: flex; gap: .35rem; justify-content: center; margin-top: 1.25rem; flex-wrap: wrap; }

.js [data-reveal] { opacity: 0; transform: translateY(8px); transition: opacity .5s var(--ease), transform .5s var(--ease); }
.js [data-reveal].is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition: none !important; animation: none !important; }
    .js [data-reveal] { opacity: 1; transform: none; }
}

@media print {
    .site-header, .sidebar, .topbar, .appbar, .tabbar, .site-footer, .app-footer, .btn { display: none !important; }
    .app-shell { display: block; }
}

/* Launch badge embed (components/badge-embed.php) */
.badge-embed { display: grid; gap: 1.25rem; }
.badge-embed__item { display: flex; flex-direction: column; gap: .6rem; min-width: 0; }
.badge-embed__preview { display: block; max-width: 100%; height: auto; }
.badge-embed .badge-embed__code { font-size: .75rem; line-height: 1.45; resize: none; min-height: 0; word-break: break-all; }
.claim-card .game { margin: .25rem 0 .5rem; }
.claim-box__summary { display: block; padding: .8rem 1.25rem; border-top: 1px solid var(--border); cursor: pointer; list-style: none; font-size: .875rem; color: var(--accent); }
.claim-box__summary::-webkit-details-marker { display: none; }
.claim-box__summary:hover { text-decoration: underline; }

/* Analytics consent banner (partials/consent.php, assets/analytics.js) */
.consent { position: fixed; left: 1rem; right: 1rem; bottom: 1rem; z-index: 60; max-width: 720px; margin: 0 auto; display: flex; align-items: center; gap: 1rem; padding: .9rem 1rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); }
.consent[hidden] { display: none; }
.consent__text { margin: 0; font-size: .88rem; color: var(--text-2); }
.consent__text strong { color: var(--text); }
.consent__actions { display: flex; gap: .5rem; flex: none; }
.consent-link[hidden] { display: none; }
.consent-link { background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; text-align: left; }
.consent-link:hover { color: var(--text); text-decoration: underline; }
@media (max-width: 620px) {
    .consent { flex-direction: column; align-items: stretch; }
    .consent__actions .btn { flex: 1; }
}
@media (max-width: 900px) {
    .layout--app .consent { bottom: calc(80px + env(safe-area-inset-bottom)); }
}

/* -- AI-written blocks (components/store-review.php, ai-slot.php, launch-plan.php) -- */
.ai-slot__card { display: flex; align-items: center; gap: 1rem; padding: 1.1rem 1.25rem; }
.ai-slot__title { margin: 0; font-weight: 600; }
.ai-slot__card p { margin: 0; }
.ai-slot__spark { flex: none; width: 26px; height: 26px; border-radius: 50%; border: 2.5px solid var(--border-strong); border-top-color: var(--primary); animation: game-search-spin .8s linear infinite; }
@media (prefers-reduced-motion: reduce) { .ai-slot__spark { animation-duration: 2.4s; } }

.ai-review { padding: 1.4rem 1.5rem; display: flex; flex-direction: column; gap: 1.25rem; border-color: color-mix(in srgb, var(--primary) 22%, var(--border)); }
.ai-review__head { display: flex; align-items: center; gap: 1.1rem; }
.ai-review__score { flex: none; display: grid; place-items: center; align-content: center; width: 78px; height: 78px; border-radius: 50%; border: 4px solid var(--border); font-family: var(--font-mono); line-height: 1; }
.ai-review__score strong { font-size: 1.6rem; font-weight: 600; }
.ai-review__score span { font-size: .7rem; color: var(--muted); }
.ai-review__score--good { border-color: var(--success); }
.ai-review__score--ok { border-color: var(--warning); }
.ai-review__score--low { border-color: var(--danger); }
.ai-review__intro { min-width: 0; }
.ai-review__intro .eyebrow { margin-bottom: .25rem; }
.ai-review__verdict { margin: 0; font-size: 1.15rem; line-height: 1.35; letter-spacing: -.01em; }
.ai-review__block { display: flex; flex-direction: column; gap: .5rem; min-width: 0; }
.ai-review__block p { margin: 0; color: var(--text-2); }
.ai-review__label { margin: 0; font-family: var(--font-mono); font-size: .72rem; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.ai-review__row { display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
.ai-review__strengths { margin: 0; padding: 0; list-style: none; display: grid; gap: .35rem; }
.ai-review__strengths li { position: relative; padding-left: 1.4rem; color: var(--text-2); }
.ai-review__strengths li::before { content: "✓"; position: absolute; left: 0; color: var(--success); font-weight: 700; }
.ai-review__fixes { margin: 0; padding: 0; list-style: none; display: grid; gap: .6rem; counter-reset: fix; }
.ai-review__fix { position: relative; padding: .8rem 1rem .8rem 2.6rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-subtle); counter-increment: fix; }
.ai-review__fix::before { content: counter(fix); position: absolute; left: .85rem; top: .8rem; width: 1.25rem; height: 1.25rem; display: grid; place-items: center; border-radius: 50%; background: var(--primary); color: #fff; font-family: var(--font-mono); font-size: .72rem; }
.ai-review__fix-head { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .5rem; margin-bottom: .25rem; }
.ai-review__fix-head strong { margin-right: .25rem; }
.ai-review__fix p { margin: 0; color: var(--text-2); font-size: .93rem; }
.ai-review__quote { margin: 0; padding: .9rem 1rem; border-left: 3px solid var(--primary); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; background: var(--bg-subtle); color: var(--text); }
.ai-review__grid { gap: 1.25rem; }
.ai-review__tags { flex-direction: row; flex-wrap: wrap; gap: 1.5rem; }
.ai-review__tags .tag-list { display: flex; flex-wrap: wrap; gap: .35rem; margin: 0; }
.ai-review__note { margin: 0; }
@media (max-width: 640px) {
    .ai-review { padding: 1.1rem; }
    .ai-review__head { align-items: flex-start; }
    .ai-review__score { width: 62px; height: 62px; }
    .ai-review__score strong { font-size: 1.3rem; }
    .ai-review__verdict { font-size: 1.02rem; }
}
.ai-plan { padding: 1.3rem 1.5rem; display: flex; flex-direction: column; gap: 1rem; border-color: color-mix(in srgb, var(--primary) 22%, var(--border)); background: linear-gradient(180deg, color-mix(in srgb, var(--primary) 5%, var(--surface)), var(--surface) 55%); }
.ai-plan__head .eyebrow { margin-bottom: .3rem; }
.ai-plan__headline { margin: 0; font-size: 1.12rem; line-height: 1.35; letter-spacing: -.01em; }
.ai-plan__actions { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem; counter-reset: plan; }
.ai-plan__action { position: relative; padding: .85rem 1rem .9rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); counter-increment: plan; }
.ai-plan__action::before { content: counter(plan); display: inline-grid; place-items: center; width: 1.4rem; height: 1.4rem; margin-bottom: .45rem; border-radius: 50%; background: var(--primary); color: #fff; font-family: var(--font-mono); font-size: .75rem; }
.ai-plan__action-head { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .5rem; margin-bottom: .3rem; }
.ai-plan__action p { margin: 0; color: var(--text-2); font-size: .9rem; }
.ai-plan__watch { margin: 0; color: var(--text-2); }
.ai-plan__watch span { font-family: var(--font-mono); font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); margin-right: .35rem; }
.ai-plan--locked .lock { margin: 0; }
@media (max-width: 900px) { .ai-plan__actions { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 640px) { .ai-plan { padding: 1.1rem; } }
