/*
 * Design tokens: the one place for colours, radii, spacing and type sizes. Loaded on every page
 * (site entry); the web app and the tools use the same variables.
 */
:root {
    color-scheme: dark;
    --bg: #0f1215;
    --bg-deep: #0b0d10;
    --panel: rgba(20, 24, 28, 0.8);
    --panel-strong: rgba(16, 19, 23, 0.9);
    --panel-solid: #15181c;
    --hover: rgba(255, 255, 255, 0.08);
    --input: rgba(255, 255, 255, 0.06);
    --border: rgba(218, 197, 164, 0.16);
    --border-strong: rgba(218, 197, 164, 0.3);
    --accent: #e3a33b;
    --accent-dim: #8a6524;
    --accent-soft: rgba(227, 163, 59, 0.18);
    --info: #8db4cf;
    --info-dim: #4d6a80;
    --text: #f3ede2;
    --text-2: #cfc6b6;
    --muted: #a39a8a;
    --danger: #e26a55;
    --success: #9cc48c;

    /*
     * What the colours mean. Amber (--accent) is the brand, the one primary action of a view and
     * Official events: nothing else. Status colours:
     *   success: you, a match, the best value     info: in-game, information, selection and focus
     *   danger: destructive actions and errors    warning: needs attention (a cancelled event)
     *   neutral (text/border tokens): everything else
     * Charts keep their own scales (the mining quality histogram runs muted to amber, as in the launcher).
     * Categories (star systems, mission kinds, blueprint types) have their own hues below, shown as
     * outlined badges (AppBadge `hue`) so they never read as a status: they say what, not how it is.
     */
    --hue-stanton: #79c3d6;
    --hue-pyro: #ef9a6a;
    --hue-nyx: #b9a3f0;
    --hue-combat: #ea8a9a;
    --hue-hauling: #8fd0a8;
    --hue-industry: #d9c27a;
    --hue-search: #a9b8f5;
    --hue-racing: #f0a3d6;
    --hue-trade: #c3d98a;
    --hue-event: #e6a0e6;
    --success-soft: rgba(156, 196, 140, 0.16);
    --info-soft: rgba(141, 180, 207, 0.14);
    --danger-soft: rgba(226, 106, 85, 0.14);
    --warning: #e0954f;
    --warning-soft: rgba(224, 149, 79, 0.14);
    --neutral-soft: rgba(255, 255, 255, 0.06);
    --selected: var(--info);
    --selected-soft: var(--info-soft);
    --selected-border: var(--info-dim);
    --focus: var(--info);
    --border-hover: rgba(218, 197, 164, 0.45);
    /* Radii */
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius: 10px;
    --radius-lg: 12px;
    --radius-xl: 14px;
    --radius-pill: 999px;

    /* Spacing scale: padding, margins and gaps come from here. */
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 24px;
    --space-6: 32px;

    /* Type sizes (UI text; page headings use clamp() where they are) */
    --fs-2xs: 11px;
    --fs-xs: 12px;
    --fs-sm: 13px;
    --fs-md: 14px;
    --fs-lg: 15px;
    --fs-xl: 16px;
    --fs-2xl: 18px;
    --fs-3xl: 20px;
    --fs-4xl: 24px;

    --gutter: 24px;
    --max: 1200px;
    --font: 'Inter', 'Segoe UI', system-ui, sans-serif;
    /* Countdowns and other ticking numbers (system monospace: no font download). */
    --font-mono: ui-monospace, 'Cascadia Mono', 'SFMono-Regular', Menlo, Consolas, monospace;
}

/*
 * Base components shared by the public site, the public tools and the web app: boxes, tags and the
 * small button. Loaded once, on every page, through the site entry.
 */
.box {
    padding: var(--space-5);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    background: var(--panel-strong);
}

.box > h2 {
    font-size: var(--fs-sm);
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--muted);
    margin: 0 0 var(--space-4);
}

.box p {
    color: var(--text-2);
}

.box .actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-top: var(--space-4);
}

.box-danger {
    border-color: rgba(226, 106, 85, 0.35);
}

/* Badges (<AppBadge>): short labels on things. One size, sentence case. */
.badge {
    display: inline-block;
    padding: 1px var(--space-2);
    border-radius: var(--radius-sm);
    font-size: var(--fs-xs);
    font-weight: 700;
    line-height: 1.6;
    white-space: nowrap;
    vertical-align: middle;
    background: var(--neutral-soft);
    color: var(--text-2);
}
.badge-info {
    background: var(--info-soft);
    color: var(--info);
}
.badge-success {
    background: var(--success-soft);
    color: var(--success);
}
.badge-warning {
    background: var(--warning-soft);
    color: var(--warning);
}
.badge + .badge {
    margin-left: var(--space-1);
}
/* A category (tokens.css --hue-*): outlined in its hue, never filled like a status. */
.badge-hue {
    border: 1px solid color-mix(in srgb, var(--hue) 55%, transparent);
    background: color-mix(in srgb, var(--hue) 10%, transparent);
    color: var(--hue);
    line-height: 1.45;
}
/* Amber: Official events only. */
.badge-accent {
    background: var(--accent-soft);
    color: var(--accent);
}

/*
 * Buttons. Variants: secondary (plain .btn), .btn-primary (amber: one per view), .btn-danger,
 * .btn-ghost. Sizes: .btn-sm, .btn-md, .btn-lg (plain .btn is the site's large size). Sentence
 * case: letter-spaced capitals are for labels, not buttons. In Vue, use <AppButton>.
 */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: var(--space-3) 20px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    background: var(--input);
    color: var(--text);
    font: 600 15px/1.2 var(--font);
    text-decoration: none;
    cursor: pointer;
    transition:
        background 0.15s,
        border-color 0.15s,
        transform 0.15s,
        box-shadow 0.15s;
}
.btn:hover {
    background: var(--hover);
    border-color: var(--border-hover);
    text-decoration: none;
}
.btn svg {
    width: 20px;
    height: 20px;
    flex: none;
}
.btn small {
    display: block;
    font-size: var(--fs-2xs);
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: none;
    opacity: 0.75;
}
.btn .btn-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
}
.btn-sm {
    padding: 6px 11px;
    font-size: var(--fs-sm);
}
.btn-md {
    padding: 9px 14px;
    font-size: var(--fs-md);
}
.btn-lg {
    padding: var(--space-4) 26px;
    font-size: var(--fs-xl);
}
.btn-primary {
    background: linear-gradient(135deg, var(--accent), var(--accent-dim));
    border-color: var(--accent);
    color: #1b1712;
    font-weight: 700;
}
.btn-primary:hover {
    background: linear-gradient(135deg, #f0b450, var(--accent-dim));
    border-color: #f0b450;
    transform: translateY(-1px);
    box-shadow: 0 10px 30px rgba(227, 163, 59, 0.25);
}
/* Download buttons: a secondary download still stands out (bright border and text), and the
   visitor's platform is .btn-primary on top of it. */
.btn-download {
    border-width: 2px;
    border-color: var(--text-2);
    background: var(--panel-strong);
    color: var(--text);
    font-weight: 700;
}
.btn-download:hover {
    border-color: var(--text);
    background: var(--hover);
}
.btn-download.btn-primary {
    border-color: var(--accent);
    background: linear-gradient(135deg, var(--accent), var(--accent-dim));
    color: #1b1712;
    box-shadow: 0 8px 28px rgba(227, 163, 59, 0.3);
}
.btn-download.btn-primary:hover {
    border-color: #f0b450;
    background: linear-gradient(135deg, #f0b450, var(--accent-dim));
}
.btn-danger {
    border-color: rgba(226, 106, 85, 0.6);
    color: var(--danger);
}
.btn-danger:hover {
    background: var(--danger-soft);
    border-color: var(--danger);
}
.btn-ghost {
    border-color: transparent;
    background: transparent;
}
.btn-ghost:hover {
    border-color: transparent;
}
.btn:disabled,
.btn[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Read out by screen readers, not shown. */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

/* Links inside running text are underlined: colour alone doesn't tell them apart (WCAG 1.4.1). */
:is(p, li, small, dd, label) a:not(.btn) {
    text-decoration: underline;
    text-decoration-color: color-mix(in srgb, currentColor 45%, transparent);
    text-underline-offset: 2px;
}

/* A field the last submit rejected (aria-invalid set from formErrors.ts). Two parts: beats `.input` and `.field input`. */
[aria-invalid='true'],
.input[aria-invalid='true'],
.field [aria-invalid='true'] {
    border-color: var(--danger);
}

/* Shared by the web app and the public tool pages (the Ship Database's details dialog). */
.icon-btn {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 9px;
    background: var(--input);
    color: var(--text);
    cursor: pointer;
}
.icon-btn:hover {
    border-color: var(--border-hover);
}
.dialog {
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--text);
    max-width: min(620px, calc(100vw - 24px));
    width: 100%;
    max-height: calc(100dvh - 24px);
    overflow-y: auto;
}
.dialog::backdrop {
    background: rgba(0, 0, 0, 0.6);
}

/*
 * SC-Toolbox site theme. Same palette as the launcher (sc-launcher-app/app/theme.py):
 * dark umber/steel glass panels over the Corsair wallpaper, gold accent, sky-steel info.
 */
@font-face {
    font-family: 'Inter';
    src: url('/site/fonts/inter-latin-wght-normal.woff2') format('woff2-variations');
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

* {
    box-sizing: border-box;
}
html {
    scroll-behavior: smooth;
}
body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font: 16px/1.6 var(--font);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}
img {
    max-width: 100%;
    display: block;
}
a {
    color: var(--info);
    text-decoration: none;
}
a:hover {
    text-decoration: underline;
}
h1,
h2,
h3 {
    line-height: 1.15;
    margin: 0;
    letter-spacing: -0.01em;
}
p {
    margin: 0 0 1em;
}
:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
    border-radius: 4px;
}

.container {
    width: 100%;
    max-width: var(--max);
    margin: 0 auto;
    padding: 0 var(--gutter);
}
/* The public tools' lists and grids use wide screens. */
.container-wide {
    max-width: 2200px;
}

/* Small uppercase labels, like the launcher's section headers. */
.label {
    display: inline-block;
    font-size: var(--fs-xs);
    font-weight: 700;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: var(--muted);
}
.label-pill {
    padding: 6px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--panel-strong);
    color: var(--text);
}
.muted {
    color: var(--muted);
}

/* ---------- nav ---------- */
.nav {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 50;
    transition:
        background 0.2s,
        border-color 0.2s,
        backdrop-filter 0.2s;
    border-bottom: 1px solid transparent;
}
.nav.is-scrolled,
.nav-solid {
    background: rgba(13, 16, 19, 0.82);
    backdrop-filter: blur(12px);
    border-bottom-color: var(--border);
}
/* The home page's tool deck is wider than the other pages; its nav lines up with it. */
.nav-wide .nav-inner {
    max-width: 1360px;
}
.nav-inner {
    display: flex;
    align-items: center;
    gap: var(--space-5);
    height: 68px;
}
.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
    font-weight: 800;
    letter-spacing: 2px;
    font-size: var(--fs-md);
    white-space: nowrap;
}
.brand:hover {
    text-decoration: none;
}
.brand img {
    width: 32px;
    height: 32px;
}
/* Tools first: the public tools are the nav's own links; "All tools" opens every tool, the account
   ones and the launcher (a <details>, so it works without JavaScript). */
.nav-tools {
    display: flex;
    gap: 4px;
    align-items: center;
}
.nav-tools a,
.nav-link {
    padding: 6px 10px;
    border-radius: var(--radius-pill);
    color: var(--text-2);
    font-size: var(--fs-md);
    font-weight: 500;
    white-space: nowrap;
}
.nav-tools a:hover,
.nav-link:hover {
    color: var(--text);
    background: var(--hover);
    text-decoration: none;
}
.nav-tools a[aria-current='page'],
.nav-link[aria-current='page'] {
    color: var(--text);
    background: var(--selected-soft);
    box-shadow: inset 0 0 0 1px var(--selected-border);
}
.nav-launcher {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 40px;
    padding: 6px 16px;
    border: 1px solid rgba(227, 163, 59, 0.45);
    border-radius: var(--radius-pill);
    color: #f6c77a;
    font-size: var(--fs-md);
    font-weight: 600;
    white-space: nowrap;
}
.nav-launcher:hover,
.nav-launcher[aria-current='page'] {
    border-color: var(--accent);
    background: var(--accent-soft);
    color: var(--text);
    text-decoration: none;
}
.nav-launcher svg {
    width: 16px;
    height: 16px;
}
.nav-signin {
    white-space: nowrap;
}
.nav-right {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
}
.nav-menu {
    position: relative;
}
.nav-menu summary {
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 40px;
    padding: 6px 12px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-pill);
    color: var(--text-2);
    font-size: var(--fs-md);
    font-weight: 500;
    cursor: pointer;
    list-style: none;
}
.nav-menu summary::-webkit-details-marker {
    display: none;
}
.nav-menu summary:hover,
.nav-menu[open] summary {
    color: var(--text);
    border-color: var(--border-hover);
}
.nav-menu summary svg {
    width: 18px;
    height: 18px;
}
.nav-panel {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    z-index: 60;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-4);
    width: min(760px, calc(100vw - 2 * var(--gutter)));
    padding: var(--space-4);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-lg);
    background: var(--panel-solid);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
}
.nav-panel-group {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.nav-panel-group .label {
    margin: 0 0 6px 8px;
}
.nav-panel-label {
    margin-top: 12px !important;
}
.nav-panel-link {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 8px;
    border-radius: var(--radius);
    color: var(--text);
}
.nav-panel-link:hover,
.nav-panel-link[aria-current='page'] {
    background: var(--hover);
    text-decoration: none;
}
.nav-panel-link img {
    flex: none;
    width: 36px;
    height: 36px;
}
.nav-panel-link strong {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: var(--fs-md);
}
.nav-panel-link strong svg {
    width: 13px;
    height: 13px;
    color: var(--muted);
}
.nav-panel-link small {
    display: block;
    margin-top: 2px;
    color: var(--muted);
    font-size: var(--fs-xs);
    line-height: 1.4;
}
@media (max-width: 1280px) {
    .nav-tools {
        display: none;
    }
}
@media (max-width: 760px) {
    .nav-hide-sm {
        display: none;
    }
    .nav-right {
        gap: 8px;
    }
    .nav-menu summary span {
        display: none;
    }
    .nav-menu summary {
        padding: 8px 10px;
    }
    /* A sheet under the bar on phones. */
    .nav-panel {
        position: fixed;
        top: 68px;
        right: 0;
        left: 0;
        width: auto;
        max-height: calc(100vh - 68px);
        overflow-y: auto;
        grid-template-columns: 1fr;
        border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    }
    .nav-panel-link {
        min-height: 48px;
    }
}
@media (max-width: 440px) {
    :root {
        --gutter: 16px;
    }
    .brand {
        letter-spacing: 1.5px;
    }
}

/* ---------- hero ---------- */
.hero {
    position: relative;
    min-height: min(100vh, 980px);
    display: flex;
    align-items: center;
    padding: 120px 0 80px;
    /* Anchored bottom-right: the wallpaper's STAR CITIZEN watermark must stay visible (Fankit). */
    background: var(--bg-deep) url('/site/img/hero-bg.webp') right bottom / cover no-repeat;
    isolation: isolate;
}
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        linear-gradient(
            90deg,
            rgba(11, 13, 16, 0.94) 0%,
            rgba(11, 13, 16, 0.78) 42%,
            rgba(11, 13, 16, 0.25) 75%,
            rgba(11, 13, 16, 0.05) 100%
        ),
        linear-gradient(0deg, var(--bg) 0%, rgba(15, 18, 21, 0) 22%);
}
.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    gap: 56px;
    align-items: center;
}
.hero h1 {
    font-size: clamp(36px, 3.9vw, 54px);
    font-weight: 800;
    margin: 18px 0 20px;
}
.hero h1 em {
    font-style: normal;
    color: var(--accent);
}
.hero .lead {
    font-size: clamp(17px, 1.6vw, 19px);
    color: var(--text-2);
    max-width: 34em;
}
.cta-row {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-3);
    margin: 30px 0 14px;
}
.cta-note {
    font-size: var(--fs-sm);
    color: var(--muted);
}
.cta-note a {
    color: var(--text-2);
}
.hero-shot {
    position: relative;
}
.hero-shot .frame {
    transform: perspective(1600px) rotateY(-7deg) rotateX(2deg);
    transform-origin: left center;
    box-shadow:
        0 40px 100px rgba(0, 0, 0, 0.75),
        0 0 0 1px rgba(227, 163, 59, 0.25);
}
.hero-shot::after {
    content: '';
    position: absolute;
    inset: 10% 5% -6% 10%;
    z-index: -1;
    background: radial-gradient(closest-side, rgba(227, 163, 59, 0.28), transparent);
    filter: blur(30px);
}
@media (max-width: 980px) {
    .hero {
        min-height: auto;
        padding-top: 110px;
    }
    .hero-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    .hero-shot .frame {
        transform: none;
    }
}

/* ---------- toolbox home ---------- */
.hero-toolbox {
    min-height: min(92vh, 860px);
}
.hero-welcome {
    margin: 0 0 14px;
    color: var(--text-2);
    font-size: var(--fs-md);
}
.hero-welcome a {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-weight: 600;
}
.hero-welcome svg,
.cta-note svg {
    width: 14px;
    height: 14px;
    vertical-align: -2px;
}
.btn img {
    width: 24px;
    height: 24px;
    flex: none;
}

/* ---------- home: the tool deck (every tool, the account tools and the launcher on the first screen) ---------- */
.hero-deck {
    min-height: 0;
    padding: 108px 0 96px; /* the bottom keeps the wallpaper's STAR CITIZEN watermark clear (Fankit) */
}
.hero-deck::before {
    background:
        linear-gradient(
            90deg,
            rgba(11, 13, 16, 0.94) 0%,
            rgba(11, 13, 16, 0.8) 34%,
            rgba(11, 13, 16, 0.45) 70%,
            rgba(11, 13, 16, 0.2) 100%
        ),
        linear-gradient(180deg, rgba(11, 13, 16, 0.5) 0%, rgba(11, 13, 16, 0) 30%),
        linear-gradient(0deg, var(--bg) 0%, rgba(15, 18, 21, 0) 12%);
}
.deck,
.container-deck {
    max-width: 1360px;
}
.deck {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.45fr);
    gap: 28px 40px;
    max-width: 1360px;
}
.deck-copy {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    min-width: 0;
}
.deck-new {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 5px 14px 5px 5px;
    border: 1px solid rgba(227, 163, 59, 0.4);
    border-radius: var(--radius-pill);
    background: rgba(227, 163, 59, 0.1);
    color: var(--text);
    font-size: var(--fs-sm);
    font-weight: 500;
}
.deck-new:hover {
    border-color: var(--accent);
    text-decoration: none;
}
.deck-new svg {
    width: 14px;
    height: 14px;
}
.chip {
    padding: 2px 9px;
    border-radius: var(--radius-pill);
    font-size: var(--fs-2xs);
    font-weight: 800;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    white-space: nowrap;
}
.chip-new {
    background: var(--accent);
    color: #1b1712;
}
.chip-account {
    border: 1px solid rgba(141, 180, 207, 0.45);
    color: var(--info);
}
.hero-deck h1 {
    font-size: clamp(34px, 3.7vw, 54px);
    line-height: 1.05;
    letter-spacing: -0.02em;
    margin: 22px 0 16px;
}
.hero-deck .lead {
    margin: 0 0 24px;
}
.hero-deck .hero-search {
    width: 100%;
    min-height: 54px;
    margin: 0;
    border-radius: var(--radius-xl);
    background: rgba(11, 13, 16, 0.7);
    font-size: var(--fs-lg);
}
.deck-data {
    margin: 16px 0 0;
    color: var(--muted);
    font-size: var(--fs-sm);
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

.deck-tiles {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-auto-rows: 150px;
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}
.tile {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 16px;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: rgba(20, 24, 28, 0.88);
    isolation: isolate;
    transition: border-color 0.15s;
}
.tile:hover {
    border-color: var(--border-hover);
}
.tile:has(a:focus-visible) {
    outline: 2px solid var(--focus);
    outline-offset: 3px;
}
.tile img:not(.tile-bg) {
    flex: none;
    border-radius: 9px;
}
.tile h2 {
    margin-top: auto;
    font-size: var(--fs-xl);
    font-weight: 700;
}
/* The whole tile is the link. */
.tile h2 a {
    position: static;
    color: var(--text);
}
.tile h2 a::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    border-radius: inherit;
}
.deck-tiles h2 a,
.tile h2 a:hover,
.tile h2 a:focus-visible {
    text-decoration: none;
    outline: none;
}
.tile p {
    margin: 0;
    color: var(--text-2);
    font-size: var(--fs-sm);
    line-height: 1.45;
}
.tile-foot {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
}
.tile-figure {
    font:
        700 22px/1.2 'Rajdhani',
        var(--font);
    white-space: nowrap;
}
.tile-figure small {
    color: var(--muted);
    font: 500 var(--fs-xs) var(--font);
}
.tile-go {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--muted);
    font-size: var(--fs-sm);
    font-weight: 700;
}
.tile-go svg {
    width: 15px;
    height: 15px;
}
.tile:hover .tile-go {
    color: var(--accent);
}
.tile-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
}
.tile-lock svg {
    width: 16px;
    height: 16px;
    color: var(--info);
}

/* Tiles with a screenshot behind them, faded into the panel. */
.tile-shot {
    background: #12161a;
}
.tile-bg {
    position: absolute;
    z-index: -1;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top left;
    opacity: 0.4;
}
.tile-shot::after {
    content: '';
    position: absolute;
    z-index: -1;
    inset: 0;
    background: linear-gradient(180deg, rgba(11, 13, 16, 0) 20%, rgba(11, 13, 16, 0.95) 78%);
}
.tile-side::after {
    background: linear-gradient(90deg, rgba(11, 13, 16, 0.95) 30%, rgba(11, 13, 16, 0.2));
}
.tile-big {
    grid-column: span 2;
    grid-row: span 2;
    justify-content: flex-end;
    padding: 18px;
}
.tile-big h2 {
    font-size: var(--fs-3xl);
    font-weight: 800;
}
.tile-big .tile-figure {
    font-size: 30px;
}
.tile-big .tile-foot {
    margin-top: 12px;
}
.tile-wide {
    grid-column: span 2;
}
.tile-row {
    display: flex;
    align-items: center;
    gap: 12px;
}
.tile-row > div {
    flex: 1;
    min-width: 0;
}
.tile-row h2 {
    margin: 0;
}
.tile-side {
    justify-content: flex-end;
}
.tile-side .tile-row {
    align-items: flex-end;
}
.tile-loadouts {
    justify-content: space-between;
    border-color: rgba(227, 163, 59, 0.45);
}
.tile-loadouts:hover {
    border-color: var(--accent);
}
.tile-loadouts .tile-bg {
    inset: -14px -40px auto auto;
    width: 78%;
    height: auto;
    opacity: 0.6;
}
.tile-loadouts::after {
    background: linear-gradient(90deg, rgba(11, 13, 16, 0.97) 38%, rgba(11, 13, 16, 0.25));
}
.tile-loadouts h2 {
    font-size: var(--fs-2xl);
    font-weight: 800;
}
.tile-loadouts p {
    max-width: 240px;
}
.tile-chips {
    display: flex;
    gap: 8px;
}

.deck-launcher {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px 20px;
    padding: 16px 20px;
    border: 1px solid rgba(227, 163, 59, 0.35);
    border-radius: 18px;
    background: linear-gradient(100deg, rgba(227, 163, 59, 0.16), rgba(20, 24, 28, 0.92) 45%);
}
.deck-launcher > img {
    flex: none;
    width: 52px;
    height: 52px;
}
.deck-launcher-copy {
    flex: 1 1 380px;
    min-width: 0;
}
.deck-launcher-copy .label {
    color: var(--accent);
}
.deck-launcher-copy p {
    margin: 2px 0 0;
    font-size: var(--fs-2xl);
    font-weight: 700;
    line-height: 1.35;
}
.deck-launcher-downloads {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.deck-launcher-more {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    white-space: nowrap;
}
.deck-launcher-more svg {
    width: 15px;
    height: 15px;
}

.section.section-tight {
    padding: var(--space-6) 0 48px;
}
.value-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: var(--space-4);
    margin: 0;
    padding: 0;
    list-style: none;
}
.value-grid li {
    padding: 18px 20px;
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    background: var(--panel);
}
.value-grid strong {
    display: block;
    color: var(--accent);
    font:
        700 28px/1.2 'Rajdhani',
        var(--font);
}
.value-grid span {
    color: var(--text-2);
    font-size: var(--fs-md);
}

@media (max-width: 1180px) {
    .deck {
        grid-template-columns: 1fr;
    }
    .deck-copy {
        max-width: 720px;
    }
}
/* Phones: tiles two across; Blueprints, Mining and Loadouts take the full width. The launcher card
   offers its page and a link to send to the gaming PC instead of downloads. */
@media (max-width: 640px) {
    .hero-deck {
        padding: 88px 0 72px;
    }
    .deck-new {
        font-size: var(--fs-xs);
    }
    .deck-tiles {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-auto-rows: auto;
        gap: 10px;
    }
    .tile {
        min-height: 104px;
        padding: 12px;
        border-radius: var(--radius-xl);
    }
    .tile img:not(.tile-bg) {
        width: 32px;
        height: 32px;
    }
    .tile h2 {
        font-size: var(--fs-lg);
    }
    .tile p,
    .tile-go {
        display: none;
    }
    .tile-figure {
        font-size: 17px;
    }
    .tile-big {
        grid-row: auto;
        min-height: 132px;
    }
    .tile-big h2 {
        font-size: 17px;
    }
    .tile-big p,
    .tile-side p,
    .tile-loadouts p {
        display: block;
        font-size: var(--fs-xs);
    }
    .tile-big .tile-figure {
        font-size: 22px;
    }
    .tile-big .tile-row {
        align-items: flex-end;
    }
    .tile-big .tile-foot {
        position: absolute;
        right: 14px;
        bottom: 14px;
        margin: 0;
    }
    .tile-big .tile-row > div {
        padding-right: 64px;
    }
    .tile-big .tile-figure small {
        display: none;
    }
    .tile-loadouts {
        min-height: 116px;
        gap: 10px;
    }
    .tile-loadouts .tile-bg {
        inset: -6px -60px auto auto;
        width: 85%;
        opacity: 0.5;
    }
    .tile-loadouts h2 {
        font-size: var(--fs-xl);
    }
    .deck-launcher {
        padding: 14px;
        gap: 12px;
    }
    .deck-launcher > img {
        width: 44px;
        height: 44px;
    }
    .deck-launcher-copy {
        flex-basis: calc(100% - 56px);
    }
    .deck-launcher-copy p {
        font-size: var(--fs-md);
    }
    .deck-launcher-downloads {
        display: none;
    }
    .deck-launcher-more,
    .deck-launcher-copylink {
        flex: 1;
        justify-content: center;
        min-height: 44px;
    }
    .deck-launcher-more {
        border-radius: var(--radius);
        background: linear-gradient(135deg, #efb453, var(--accent));
        color: #1b1712;
        font-weight: 800;
    }
    .deck-launcher-more:hover {
        text-decoration: none;
    }
    .deck-launcher-copylink[hidden] {
        display: none;
    }
    .section.section-tight {
        padding-top: var(--space-5);
    }
    .value-grid strong {
        font-size: 24px;
    }
}
@media (min-width: 641px) {
    .deck-launcher-copylink {
        display: none;
    }
}

.account-grid {
    display: grid;
    gap: var(--space-4);
    margin: 0;
    padding: 0;
    list-style: none;
}
.account-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: var(--space-5);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--panel);
    backdrop-filter: blur(8px);
}
.account-card h3 {
    margin: 0;
    font-size: var(--fs-xl);
}
.account-card p {
    margin: 0;
    color: var(--text-2);
}
.tool-sources {
    margin: var(--space-4) 0 0;
    color: var(--muted);
    font-size: var(--fs-sm);
}

.section-head.section-head-row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: var(--space-4);
    max-width: none;
    margin-left: 0;
    margin-right: 0;
    text-align: left;
}
.section-head.section-head-row p {
    margin-left: 0;
}
.section-head.section-head-row > div {
    max-width: 680px;
}
.account-cta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
    font-size: var(--fs-sm);
}
.account-grid {
    grid-template-columns: repeat(4, 1fr);
}
/* Account tools: outlined, so they don't read as tools to open right away. */
.account-card {
    background: transparent;
    border-style: dashed;
    border-color: var(--border-strong);
}
.account-card.is-open {
    border-style: solid;
    background: var(--panel);
}
.account-card.is-open h3 a {
    color: var(--text);
}
.account-card.is-open h3 a::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
}
.account-card.is-open:hover {
    border-color: rgba(227, 163, 59, 0.45);
}
.requires {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: auto;
    padding-top: 6px;
    color: var(--muted);
    font-size: var(--fs-xs);
    font-weight: 600;
}
.requires svg {
    width: 13px;
    height: 13px;
}
@media (max-width: 980px) {
    .account-grid {
        grid-template-columns: 1fr 1fr;
    }
    .account-cta {
        align-items: flex-start;
    }
}
@media (max-width: 560px) {
    .account-grid {
        grid-template-columns: 1fr;
    }
}

/* Screenshot frame: a launcher window floating over the scene. */
.frame {
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border-strong);
    background: var(--panel-solid);
    box-shadow:
        0 30px 80px rgba(0, 0, 0, 0.6),
        0 0 0 1px rgba(0, 0, 0, 0.4);
}
.frame img {
    width: 100%;
    height: auto;
}

/* ---------- trust strip ---------- */
.trust {
    border-block: 1px solid var(--border);
    background: var(--panel-strong);
}
.trust ul {
    list-style: none;
    margin: 0;
    padding: 18px 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-3) 34px;
}
.trust li {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-2);
    font-size: var(--fs-md);
    font-weight: 500;
}
.trust svg {
    width: 18px;
    height: 18px;
    color: var(--accent);
    flex: none;
}

/* ---------- sections ---------- */
.section {
    padding: 110px 0;
}
.section-head {
    max-width: 760px;
    margin: 0 auto 64px;
    text-align: center;
}
.section-head h2 {
    font-size: clamp(30px, 3.6vw, 44px);
    font-weight: 800;
    margin: 14px 0 var(--space-4);
}
.section-head p {
    color: var(--text-2);
    font-size: var(--fs-2xl);
}
.section-alt {
    background: radial-gradient(1200px 500px at 50% 0%, rgba(141, 180, 207, 0.07), transparent 70%), var(--bg-deep);
    border-block: 1px solid var(--border);
}

/* Feature rows: screenshot + copy, alternating sides. */
.feature {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
    gap: 64px;
    align-items: center;
}
.feature + .feature {
    margin-top: 120px;
}
.feature.flip .feature-media {
    order: 2;
}
.feature-copy h3 {
    font-size: clamp(26px, 2.6vw, 34px);
    font-weight: 800;
    margin: 14px 0 14px;
}
.feature-copy > p {
    color: var(--text-2);
    font-size: 17px;
}
.feature-title {
    display: flex;
    align-items: center;
    gap: 14px;
}
.feature-title img {
    width: 52px;
    height: 52px;
}
.checks {
    list-style: none;
    padding: 0;
    margin: 20px 0 0;
    display: grid;
    gap: 10px;
}
.checks li {
    position: relative;
    padding-left: 28px;
    color: var(--text-2);
}
.checks li::before {
    content: '';
    position: absolute;
    left: 2px;
    top: 0.5em;
    width: 12px;
    height: 7px;
    border-left: 2px solid var(--accent);
    border-bottom: 2px solid var(--accent);
    transform: rotate(-45deg);
}
.credit {
    margin-top: 18px;
    font-size: var(--fs-sm);
    color: var(--muted);
}
.credit a {
    color: var(--text-2);
    text-decoration: underline;
    text-decoration-color: var(--border-strong);
}
.soon {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 2px 9px;
    border-radius: 5px;
    border: 1px solid var(--info-dim);
    background: rgba(141, 180, 207, 0.1);
    color: var(--info);
    font-size: var(--fs-2xs);
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    white-space: nowrap;
}
.live {
    border-color: rgba(156, 196, 140, 0.45);
    background: rgba(156, 196, 140, 0.1);
    color: var(--success);
}
.note {
    margin-top: 22px;
    padding: 14px var(--space-4);
    border: 1px solid var(--border);
    border-left: 3px solid var(--info);
    border-radius: var(--radius-md);
    background: var(--panel);
    color: var(--text-2);
    font-size: var(--fs-lg);
}
.note strong {
    color: var(--text);
}
@media (max-width: 900px) {
    .feature {
        grid-template-columns: 1fr;
        gap: var(--space-6);
    }
    .feature.flip .feature-media {
        order: 0;
    }
    .feature + .feature {
        margin-top: 80px;
    }
    .section {
        padding: 80px 0;
    }
}

/* Glass cards (the launcher's tool tiles). */
.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-4);
}
.card {
    position: relative;
    padding: 22px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--panel);
    backdrop-filter: blur(6px);
    transition:
        border-color 0.2s,
        transform 0.2s,
        background 0.2s;
}
.card:hover {
    border-color: var(--border-strong);
    transform: translateY(-2px);
}
.card h3 {
    font-size: 19px;
    font-weight: 700;
    margin: 0 0 var(--space-2);
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.card p {
    color: var(--text-2);
    font-size: var(--fs-lg);
    margin: 0;
}
.card .card-icon {
    width: 46px;
    height: 46px;
    margin-bottom: 14px;
}
.card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--space-3);
    margin-bottom: 14px;
}
.card-top .glyph,
.card-top .card-icon {
    margin-bottom: 0;
}
.card .glyph {
    width: 46px;
    height: 46px;
    margin-bottom: 14px;
    display: grid;
    place-items: center;
    border-radius: var(--radius);
    border: 1px solid var(--accent-dim);
    background: linear-gradient(160deg, #2a2620, #15181c);
    color: var(--accent);
}
.card .glyph svg {
    width: 24px;
    height: 24px;
}

/* ---------- overlay highlight ---------- */
.overlay-band {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--border-strong);
    border-radius: 16px;
    padding: 48px;
    background:
        linear-gradient(110deg, rgba(11, 13, 16, 0.96) 30%, rgba(11, 13, 16, 0.7)),
        url('/site/img/hero-bg.webp') center 70% / cover;
}
.overlay-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    gap: 48px;
    align-items: center;
}
.overlay-band h2 {
    font-size: clamp(28px, 3.2vw, 40px);
    font-weight: 800;
    margin: 14px 0 var(--space-4);
}
.overlay-band > .overlay-grid > div > p {
    color: var(--text-2);
    font-size: 17px;
}
.keys {
    display: flex;
    gap: var(--space-3);
    flex-wrap: wrap;
    margin-top: 22px;
}
.key {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-2);
    font-size: var(--fs-md);
}
kbd {
    display: inline-block;
    min-width: 40px;
    padding: 6px 10px;
    border: 1px solid var(--border-strong);
    border-bottom-width: 3px;
    border-radius: 7px;
    background: var(--panel-solid);
    color: var(--accent);
    font: 700 14px/1 var(--font);
    text-align: center;
}
.overlay-tabs {
    display: grid;
    gap: var(--space-3);
}
.overlay-tab {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    padding: 14px var(--space-4);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--panel);
}
.overlay-tab img {
    width: 40px;
    height: 40px;
    flex: none;
}
.overlay-tab strong {
    display: block;
}
.overlay-tab span {
    color: var(--text-2);
    font-size: var(--fs-md);
}
@media (max-width: 900px) {
    .overlay-band {
        padding: 28px 20px;
    }
    .overlay-grid {
        grid-template-columns: 1fr;
    }
}

/* ---------- download ---------- */
.download-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    max-width: 980px;
    margin: 0 auto;
}
.platform {
    padding: 30px;
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    background: var(--panel);
    display: flex;
    flex-direction: column;
}
.platform.is-detected {
    border-color: var(--accent-dim);
    box-shadow:
        0 0 0 1px var(--accent-dim),
        0 20px 50px rgba(227, 163, 59, 0.08);
}
.platform-head {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: var(--space-4);
}
.platform-head svg {
    width: 34px;
    height: 34px;
    color: var(--text);
}
.platform h3 {
    font-size: 22px;
    font-weight: 800;
}
.platform ol {
    color: var(--text-2);
    padding-left: 20px;
    margin: 0 0 var(--space-5);
    display: grid;
    gap: 6px;
    font-size: var(--fs-lg);
}
.platform .btn {
    margin-top: auto;
}
.platform code {
    font-size: var(--fs-sm);
    padding: 1px 6px;
    border-radius: 4px;
    background: var(--input);
    color: var(--text);
}
.release-line {
    text-align: center;
    margin-top: 26px;
    color: var(--muted);
    font-size: var(--fs-md);
}
@media (max-width: 760px) {
    .download-grid {
        grid-template-columns: 1fr;
    }
}

/* ---------- FAQ ---------- */
.faq {
    max-width: 820px;
    margin: 0 auto;
    display: grid;
    gap: var(--space-3);
}
.faq details {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--panel);
    padding: 0 20px;
}
.faq summary {
    cursor: pointer;
    list-style: none;
    padding: 18px 28px 18px 0;
    font-weight: 600;
    position: relative;
}
.faq summary::-webkit-details-marker {
    display: none;
}
.faq summary::after {
    content: '';
    position: absolute;
    right: 4px;
    top: 50%;
    width: 9px;
    height: 9px;
    border-right: 2px solid var(--accent);
    border-bottom: 2px solid var(--accent);
    transform: translateY(-70%) rotate(45deg);
    transition: transform 0.2s;
}
.faq details[open] summary::after {
    transform: translateY(-30%) rotate(-135deg);
}
.faq details p {
    color: var(--text-2);
    padding-bottom: 6px;
}

/* ---------- credits & footer ---------- */
.credits {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: var(--space-3);
}
.credits a {
    display: block;
    padding: 14px var(--space-4);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--panel);
    color: var(--text);
}
.credits a:hover {
    border-color: var(--border-strong);
    text-decoration: none;
}
.credits strong {
    display: block;
}
.credits span {
    color: var(--muted);
    font-size: var(--fs-sm);
}

.final-cta {
    margin-top: 110px;
    text-align: center;
}
.final-cta h2 {
    font-size: clamp(30px, 3.6vw, 44px);
    font-weight: 800;
    margin: 0 0 14px;
}
.final-cta .cta-row {
    justify-content: center;
}

.footer {
    border-top: 1px solid var(--border);
    background: var(--bg-deep);
    padding: 40px 0 34px;
    font-size: var(--fs-sm);
    color: var(--muted);
}
.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr repeat(4, 1fr);
    gap: var(--space-5);
    margin-bottom: 28px;
}
.footer-grid nav,
.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.footer-grid nav a {
    color: var(--text-2);
}
.footer-grid .label {
    margin-bottom: 4px;
}
.footer-brand span {
    max-width: 220px;
}
@media (max-width: 900px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
    .footer-brand {
        grid-column: 1 / -1;
    }
}
.footer p {
    max-width: 980px;
}

/* Reveal on scroll; only when JS runs, and never with reduced motion. */
.js .reveal {
    opacity: 0;
    transform: translateY(18px);
    transition:
        opacity 0.7s ease,
        transform 0.7s ease;
}
.js .reveal.is-visible {
    opacity: 1;
    transform: none;
}
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    .js .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
    .btn,
    .card {
        transition: none;
    }
}

/* ---------- account & sign-in pages ---------- */
.page-auth {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 96px var(--space-4) 40px;
    background:
        linear-gradient(rgba(11, 13, 16, 0.82), rgba(11, 13, 16, 0.92)),
        var(--bg-deep) url('/site/img/hero-bg.webp') right bottom / cover no-repeat fixed;
}
.panel {
    width: 100%;
    max-width: 460px;
    padding: 30px;
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    background: var(--panel-strong);
    backdrop-filter: blur(10px);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
}
.panel h1 {
    font-size: var(--fs-4xl);
    font-weight: 800;
    margin-bottom: 6px;
}
.panel h2 {
    font-size: var(--fs-sm);
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--muted);
    margin: 0 0 10px;
}
.panel-note {
    margin-top: 16px;
}
.noscript-note {
    padding: 40px;
}
.panel p {
    margin-bottom: 14px;
}
.panel .btn {
    width: 100%;
    margin-top: 10px;
}
.panel .muted {
    font-size: var(--fs-md);
}
.panel hr {
    border: 0;
    border-top: 1px solid var(--border);
    margin: 22px 0;
}
.panel ol,
.panel ul {
    padding-left: 20px;
    margin: 0 0 14px;
}
.panel input[type='text'] {
    width: 100%;
    padding: 11px 13px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-md);
    background: var(--input);
    color: var(--text);
    font: inherit;
}
.panel input[type='text']:focus {
    outline: none;
    border-color: var(--accent);
}
.panel .row {
    display: flex;
    gap: 10px;
}
.panel .row > * {
    flex: 1;
}
.panel .code {
    font:
        700 1.25rem ui-monospace,
        monospace;
    letter-spacing: 0.06em;
    padding: var(--space-3);
    text-align: center;
    border: 1px dashed var(--accent);
    border-radius: var(--radius-md);
    color: var(--accent);
    user-select: all;
}
.flash {
    padding: 10px 14px;
    border-radius: var(--radius-md);
    border: 1px solid var(--danger);
    color: var(--danger);
    margin-bottom: var(--space-4);
    font-size: var(--fs-md);
}
.flash-success {
    border-color: var(--success);
    color: var(--success);
}
ul.orgs {
    list-style: none;
    padding: 0;
    margin: 0 0 6px;
}
ul.orgs li {
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}
ul.orgs li:last-child {
    border-bottom: 0;
}
.stars {
    color: var(--accent);
    letter-spacing: 1px;
}

/* ---------- web app (Vue) ---------- */
.app-page {
    min-height: calc(100vh - 160px);
    padding: 100px 0 60px;
}

/* ---------- account call-outs (hero panel, online band) ---------- */
.hero-account {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
    margin-top: 26px;
    padding: var(--space-4) 18px;
    max-width: 640px;
    border: 1px solid var(--border-strong);
    border-left: 3px solid var(--accent);
    border-radius: var(--radius-lg);
    background: rgba(11, 13, 16, 0.72);
    backdrop-filter: blur(6px);
}
.hero-account > div {
    flex: 1 1 260px;
    display: grid;
    gap: 2px;
}
.hero-account strong {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--fs-lg);
    letter-spacing: 0.5px;
}
.hero-account strong svg {
    width: 18px;
    height: 18px;
    color: var(--accent);
}
.hero-account span {
    color: var(--text-2);
    font-size: var(--fs-md);
}
.hero-account .btn {
    flex: none;
}
.signup-band {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-5);
    flex-wrap: wrap;
    margin-top: 40px;
    padding: 28px var(--space-6);
    border: 1px solid var(--accent-dim);
    border-radius: 16px;
    background: linear-gradient(120deg, rgba(227, 163, 59, 0.14), rgba(227, 163, 59, 0.03) 60%), var(--panel-strong);
}
.signup-band h3 {
    font-size: var(--fs-4xl);
    font-weight: 800;
    margin: 0 0 6px;
}
.signup-band p {
    color: var(--text-2);
    margin: 0;
    max-width: 38em;
}
.signup-band .btn {
    flex: none;
}

/* ---------- public tool pages ---------- */
.tool-page {
    padding: 92px 0 60px;
}
/* A shared loadout (/l/{token}): the page is the Vue view (assets/app/loadouts/SharedLoadoutPage.vue). */
.share-page {
    padding: 72px 0 40px;
}
/* The five tools as pills where the header doesn't list them (narrower screens). Scrolls sideways. */
.tool-switcher {
    display: none;
    gap: 6px;
    margin: 0 0 22px;
    padding-bottom: 4px;
    overflow-x: auto;
    scrollbar-width: thin;
}
.tool-switcher a {
    display: inline-flex;
    flex: none;
    align-items: center;
    gap: 8px;
    min-height: 40px;
    padding: 6px 14px 6px 8px;
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    background: var(--panel);
    color: var(--text-2);
    font-weight: 600;
    font-size: var(--fs-sm);
}
.tool-switcher a:hover {
    color: var(--text);
    border-color: var(--border-hover);
    text-decoration: none;
}
.tool-switcher a[aria-current='page'] {
    color: var(--text);
    border-color: var(--selected-border);
    background: var(--selected-soft);
}
.tool-switcher img {
    width: 22px;
    height: 22px;
}
@media (max-width: 1120px) {
    .tool-switcher {
        display: flex;
    }
}
.tool-hint {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 18px;
    padding: 10px 14px;
    border: 1px solid var(--info-dim);
    border-radius: var(--radius);
    background: var(--info-soft);
    color: var(--text-2);
    font-size: var(--fs-sm);
}
.tool-hint > svg {
    flex: none;
    width: 16px;
    height: 16px;
    color: var(--info);
}
.tool-hint span {
    flex: 1;
}
.tool-hint-close {
    display: inline-flex;
    padding: 4px;
    border: 0;
    border-radius: var(--radius-sm);
    background: none;
    color: var(--muted);
    cursor: pointer;
}
.tool-hint-close:hover,
.tool-hint-close:focus-visible {
    color: var(--text);
}
.tool-hint-close svg {
    width: 16px;
    height: 16px;
}
.tool-page-head {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 22px;
}
.tool-page-head img {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-lg);
    flex: none;
}
.tool-page-head h1 {
    font-size: clamp(28px, 3vw, 38px);
    font-weight: 800;
    margin: 6px 0 var(--space-1);
}
.tool-page-head p {
    margin: 0;
    max-width: 46em;
}
.prose {
    max-width: 820px;
}
.prose h2 {
    font-size: var(--fs-3xl);
    font-weight: 700;
    margin: var(--space-6) 0 10px;
}
.prose p,
.prose li {
    color: var(--text-2);
}
.prose p {
    margin-bottom: var(--space-3);
}
.prose ul {
    padding-left: 22px;
    margin: 0 0 var(--space-3);
}
.prose li {
    margin-bottom: 6px;
}
.prose li strong,
.prose p strong {
    color: var(--text);
}
.tool-nudge {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    flex-wrap: wrap;
    margin-top: 28px;
    padding: 18px 22px;
    border: 1px solid var(--accent-dim);
    border-radius: var(--radius-xl);
    background: var(--panel-strong);
}
.tool-nudge p {
    margin: 0;
    color: var(--text-2);
    max-width: 46em;
}
.loading,
.empty {
    color: var(--muted);
}

/* ---------- quick search (assets/site/search.ts, templates/site/_search.html.twig) ---------- */
.nav-search,
.hero-search {
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--border-strong);
    color: var(--text-2);
    background: var(--input);
    font: inherit;
    cursor: pointer;
}
.nav-search[hidden],
.hero-search[hidden] {
    display: none;
}
.nav-search {
    min-height: 40px;
    padding: 6px 10px 6px 12px;
    border-radius: var(--radius-pill);
    font-size: var(--fs-md);
    font-weight: 500;
}
.nav-search:hover,
.hero-search:hover {
    color: var(--text);
    border-color: var(--border-hover);
}
.nav-search svg,
.hero-search svg {
    width: 18px;
    height: 18px;
    flex: none;
}
.nav-search kbd,
.hero-search kbd,
.qs-close kbd {
    padding: 1px 7px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    color: var(--muted);
    font-family: inherit;
    font-size: var(--fs-sm);
    font-weight: 500;
    line-height: 1.4;
}
.hero-search {
    width: min(520px, 100%);
    min-height: 52px;
    margin: 0 0 var(--space-5);
    padding: 10px 12px 10px 16px;
    border-radius: var(--radius-lg);
    font-size: var(--fs-md);
    text-align: left;
}
.hero-search span {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    color: var(--muted);
    text-overflow: ellipsis;
    white-space: nowrap;
}
.qs {
    width: min(640px, calc(100vw - 2 * var(--gutter)));
    max-height: min(640px, calc(100vh - 96px));
    margin: 72px auto auto;
    padding: 0;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-lg);
    color: var(--text);
    background: var(--panel-solid);
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5);
}
.qs[open] {
    display: flex;
    flex-direction: column;
}
.qs::backdrop {
    background: rgba(5, 7, 9, 0.66);
}
.qs-box {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px 10px 16px;
    border-bottom: 1px solid var(--border);
}
.qs-box > svg {
    width: 20px;
    height: 20px;
    flex: none;
    color: var(--muted);
}
.qs-input {
    flex: 1;
    min-width: 0;
    min-height: 40px;
    border: 0;
    outline: 0;
    color: var(--text);
    background: transparent;
    font: inherit;
    font-size: var(--fs-lg);
}
.qs-box:focus-within {
    box-shadow: inset 0 -2px 0 var(--focus);
}
.qs-close {
    padding: 6px;
    border: 0;
    background: none;
    cursor: pointer;
}
.qs-list {
    overflow-y: auto;
    padding: 0 var(--space-2);
}
.qs-list:empty {
    display: none;
}
.qs-group {
    padding: var(--space-2) 0;
}
.qs-group + .qs-group {
    border-top: 1px solid var(--border);
}
.qs-group-label {
    padding: 4px 10px;
    color: var(--muted);
    font-size: var(--fs-sm);
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}
.qs-option {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: var(--space-3);
    min-height: 40px;
    padding: 8px 10px;
    border-radius: var(--radius-md);
    color: var(--text);
    text-decoration: none;
}
.qs-option small {
    flex: none;
    max-width: 45%;
    overflow: hidden;
    color: var(--muted);
    text-overflow: ellipsis;
    white-space: nowrap;
}
.qs-option.is-active {
    background: var(--selected-soft);
    box-shadow: inset 0 0 0 1px var(--selected-border);
}
.qs-status {
    margin: 0;
    padding: 10px 16px;
    border-top: 1px solid var(--border);
    color: var(--muted);
    font-size: var(--fs-sm);
}
@media (max-width: 760px) {
    .nav-search span,
    .nav-search kbd,
    .hero-search kbd {
        display: none;
    }
    .nav-search {
        padding: 8px 10px;
    }
    .qs {
        width: 100vw;
        max-width: none;
        max-height: 100dvh;
        height: 100dvh;
        margin: 0;
        border: 0;
        border-radius: 0;
    }
}
.qs-all .qs-name {
    color: var(--info);
}

/*
 * Error pages (templates/bundles/TwigBundle/Exception): "4 ◉ 4" with a black hole for the 0. The accretion
 * disk is a spinning conic gradient squashed flat; its back half passes behind the hole (and is lensed into
 * the ring around it), its front half in front. Motion stops for prefers-reduced-motion.
 */
@font-face {
    font-family: 'Rajdhani';
    src: url('/site/fonts/rajdhani-latin-700.woff2') format('woff2');
    font-weight: 700;
    font-display: swap;
}
.lost {
    position: relative;
    min-height: 100vh;
    padding: 110px 0 72px;
    overflow: hidden;
    background:
        radial-gradient(ellipse 60% 45% at 50% 30%, rgba(227, 163, 59, 0.1), transparent 70%),
        radial-gradient(1px 1px at 12% 18%, #fff8, transparent),
        radial-gradient(1px 1px at 82% 12%, #fff9, transparent),
        radial-gradient(1.5px 1.5px at 68% 40%, #fff6, transparent),
        radial-gradient(1px 1px at 24% 62%, #fff7, transparent),
        radial-gradient(1px 1px at 90% 70%, #fff5, transparent),
        radial-gradient(1.5px 1.5px at 40% 8%, #fffa, transparent),
        radial-gradient(1px 1px at 6% 84%, #fff6, transparent), radial-gradient(1px 1px at 56% 88%, #fff5, transparent),
        var(--bg-deep);
}
.lost-stage {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(4px, 2vw, 28px);
    height: clamp(200px, 34vw, 380px);
}
.lost-digit {
    font:
        700 clamp(120px, 22vw, 280px) / 1 'Rajdhani',
        var(--font);
    color: var(--text);
    letter-spacing: -0.02em;
    text-shadow: 0 0 40px rgba(227, 163, 59, 0.25);
    animation: lost-pull 7s ease-in-out infinite;
}
/* Leaning in toward the hole, as if pulled. */
.lost-digit-l {
    transform-origin: right center;
    --lean: skewX(-6deg) scaleX(0.94);
    background: linear-gradient(90deg, var(--text) 55%, #f6c77a);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.lost-digit-r {
    transform-origin: left center;
    --lean: skewX(6deg) scaleX(0.94);
    background: linear-gradient(270deg, var(--text) 55%, #f6c77a);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
@keyframes lost-pull {
    0%,
    100% {
        transform: var(--lean);
    }
    50% {
        transform: var(--lean) scaleX(0.9) translateX(var(--drift, 0));
    }
}
.lost-digit-l {
    --drift: 6px;
}
.lost-digit-r {
    --drift: -6px;
}

.bh {
    --size: clamp(150px, 24vw, 290px);
    position: relative;
    width: var(--size);
    height: var(--size);
    flex: none;
}
/* Every layer centred on the hole; `translate` leaves `transform` free for the tilt and the animations. */
.bh > * {
    position: absolute;
    left: 50%;
    top: 50%;
    translate: -50% -50%;
}
.bh-halo {
    width: 190%;
    height: 190%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(246, 170, 80, 0.32) 0 26%, rgba(227, 120, 40, 0.12) 40%, transparent 62%);
    filter: blur(6px);
    animation: bh-breathe 6s ease-in-out infinite;
}
/* The far side of the disk, bent up and over the hole by its gravity. */
.bh-lens {
    width: 96%;
    height: 96%;
    border-radius: 50%;
    background: radial-gradient(
        circle,
        transparent 52%,
        #fff3d6 55%,
        #f6b45a 58%,
        rgba(227, 120, 40, 0.5) 64%,
        transparent 72%
    );
    filter: blur(1.5px);
    animation: bh-breathe 4s ease-in-out infinite reverse;
}
.bh-core {
    width: 58%;
    height: 58%;
    border-radius: 50%;
    background: #000;
    box-shadow:
        0 0 0 1.5px rgba(255, 236, 200, 0.95),
        0 0 18px 4px rgba(255, 190, 110, 0.55),
        inset 0 0 30px #000;
}
.bh-disk {
    width: 230%;
    height: 230%;
    transform: rotate(-12deg) scaleY(0.16);
}
.bh-disk i {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background:
        radial-gradient(circle, transparent 0 25%, rgba(0, 0, 0, 0) 25%, transparent 70%),
        conic-gradient(
            from 0deg,
            #fff1cf,
            #f2a24a 12%,
            rgba(160, 70, 20, 0.45) 30%,
            #f6c77a 45%,
            #ffe9c2 52%,
            #e78a35 66%,
            rgba(140, 60, 20, 0.35) 82%,
            #fff1cf
        );
    -webkit-mask: radial-gradient(
        circle,
        transparent 0 26%,
        #000 28%,
        #000 46%,
        rgba(0, 0, 0, 0.5) 58%,
        transparent 70%
    );
    mask: radial-gradient(circle, transparent 0 26%, #000 28%, #000 46%, rgba(0, 0, 0, 0.5) 58%, transparent 70%);
    animation: bh-spin 9s linear infinite;
}
/* The near side crosses in front of the hole: only its lower half shows over the core. */
.bh-disk-front {
    clip-path: inset(50% 0 0 0);
}
.bh-disk-back i {
    filter: brightness(0.75);
}
/* Debris spiralling in. */
.bh-mote {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #ffe3b0;
    box-shadow: 0 0 6px #f6b45a;
    opacity: 0;
    animation: bh-fall 7s cubic-bezier(0.5, 0, 0.9, 0.6) infinite;
    animation-delay: calc(var(--n) * -0.78s);
    --turn: calc(var(--n) * 40deg);
}
@keyframes bh-spin {
    to {
        transform: rotate(360deg);
    }
}
@keyframes bh-breathe {
    0%,
    100% {
        opacity: 0.85;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.04);
    }
}
@keyframes bh-fall {
    0% {
        opacity: 0;
        transform: rotate(var(--turn)) translateX(calc(var(--size) * 1.2)) scale(1);
    }
    15% {
        opacity: 1;
    }
    85% {
        opacity: 0.9;
    }
    100% {
        opacity: 0;
        transform: rotate(calc(var(--turn) + 540deg)) translateX(calc(var(--size) * 0.3)) scale(0.3);
    }
}

.lost-copy {
    position: relative;
    max-width: 920px;
    margin-top: var(--space-5);
    text-align: center;
}
.lost-code {
    color: var(--accent);
}
.lost-copy h1 {
    margin: var(--space-2) 0 var(--space-3);
    font-size: clamp(32px, 5vw, 52px);
    font-weight: 800;
}
.lost-lead {
    max-width: 620px;
    margin: 0 auto var(--space-5);
    color: var(--text-2);
}
.lost-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-3);
    margin-bottom: 40px;
}
.lost-tools {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: var(--space-3);
    text-align: left;
}
.lost-tool {
    display: flex;
    gap: var(--space-3);
    align-items: flex-start;
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--panel);
    color: var(--text);
    transition:
        border-color 0.15s ease,
        background 0.15s ease;
}
.lost-tool:hover {
    border-color: var(--border-hover);
    background: var(--panel-strong);
    text-decoration: none;
}
.lost-tool img {
    flex: none;
    border-radius: var(--radius-md);
}
.lost-tool strong {
    display: block;
    font-size: var(--fs-lg);
}
.lost-tool small {
    display: block;
    color: var(--muted);
    font-size: var(--fs-sm);
    line-height: 1.45;
}
@media (prefers-reduced-motion: reduce) {
    .lost-digit,
    .bh-halo,
    .bh-lens,
    .bh-disk i {
        animation: none;
    }
    .bh-mote {
        display: none;
    }
}

