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

:root {
    --bg: #0a0a0f;
    --bg-2: #11111a;
    --panel: rgba(28, 28, 36, 0.85);
    --panel-2: rgba(40, 40, 50, 0.55);
    --border: rgba(255, 255, 255, 0.08);
    --border-2: rgba(255, 255, 255, 0.14);
    --text: #f1f1f4;
    --text-2: #b3b3bc;
    --muted: #7a7a85;
    --gold: #d4af37;
    --gold-dark: #b08d22;
    --gold-soft: oklch(76% 0.13 86 / 0.12);
    --error: #fda4af;
    --error-bg: rgba(220, 38, 38, 0.18);
    --success: #86efac;
    --success-bg: rgba(34, 197, 94, 0.18);
    --shadow-1: 0 24px 60px rgba(0, 0, 0, 0.55);
    --shadow-gold: 0 12px 32px oklch(76% 0.13 86 / 0.18);
}

html, body { height: 100%; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--text);
    background:
        radial-gradient(ellipse 70% 55% at 15% 0%, oklch(76% 0.13 86 / 0.16) 0%, transparent 60%),
        radial-gradient(ellipse 60% 45% at 90% 100%, oklch(76% 0.13 86 / 0.10) 0%, transparent 60%),
        linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 50%, var(--bg) 100%);
    background-attachment: fixed;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    line-height: 1.5;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }

/* ──────────────────────────────────────────────────────────────────────
   Layout shell — split screen on desktop, single column on mobile
   Desktop uses 1fr / 1fr (equal columns) per spec.
   ────────────────────────────────────────────────────────────────────── */
.shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: 1fr;
}

@media (min-width: 980px) {
    .shell {
        grid-template-columns: 1fr 1fr;
        align-items: stretch;
    }
}

/* Mobile-only view-switcher (segmented control at the very top).
   Anchors set body[data-view] via the URL; CSS hides the non-active panel. */
.view-switcher {
    display: none;
}

@media (max-width: 979px) {
    .view-switcher {
        display: flex;
        gap: 0.5rem;
        padding: 0.65rem 1rem;
        background: rgba(15, 15, 22, 0.85);
        border-bottom: 1px solid var(--border);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        position: sticky;
        top: 0;
        z-index: 50;
    }

    .view-switcher-tab {
        flex: 1;
        text-align: center;
        padding: 0.55rem 0.75rem;
        border: 1px solid var(--border);
        border-radius: 10px;
        font-size: 0.82rem;
        font-weight: 600;
        text-decoration: none;
        color: var(--text-2);
        background: rgba(255, 255, 255, 0.03);
        transition: background 0.15s, color 0.15s, border-color 0.15s;
        line-height: 1;
    }

    .view-switcher-tab:hover {
        color: var(--text);
        border-color: oklch(76% 0.13 86 / 0.25);
    }

    .view-switcher-tab.is-active {
        background: var(--gold);
        color: var(--bg);
        border-color: var(--gold);
        box-shadow: 0 4px 12px oklch(76% 0.13 86 / 0.35);
    }

    .view-switcher-tab--reset {
        flex: 0 0 auto;
        min-width: 44px;
    }

    /* Mobile panel visibility — toggled by URL ?view= → body[data-view].
       "login" (default) hides the brand panel; "news" hides the login. */
    body[data-view="login"] .brand,
    body[data-view=""] .brand { display: none; }

    body[data-view="news"] .form-panel { display: none; }
}

/* ──────────────────────────────────────────────────────────────────────
   Brand panel (left on desktop, top bar on mobile)
   On desktop the whole block is centered vertically + horizontally so
   the news sits in the middle of the panel, same height as the login.
   ────────────────────────────────────────────────────────────────────── */
.brand {
    position: relative;
    padding: 1.25rem 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    background:
        radial-gradient(ellipse 70% 50% at 30% 30%, oklch(76% 0.13 86 / 0.10) 0%, transparent 65%),
        linear-gradient(160deg, oklch(76% 0.13 86 / 0.06) 0%, transparent 60%);
    border-bottom: 1px solid var(--border);
}

@media (min-width: 980px) {
    .brand {
        padding: 3rem clamp(2rem, 5vw, 5rem);
        justify-content: center;
        border-bottom: none;
        border-right: 1px solid var(--border);
    }
}

.brand-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

@media (min-width: 980px) {
    .brand-top { justify-content: flex-start; }
}

.brand-logo {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
}

.brand-mark {
    width: 46px; height: 46px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 18px oklch(76% 0.13 86 / 0.35);
    overflow: hidden;
    padding: 4px;
}

.brand-mark img {
    width: 100%; height: 100%;
    object-fit: contain;
    display: block;
}

.brand-name {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--gold);
    letter-spacing: 0.01em;
}

.lang {
    display: inline-flex;
    gap: 0.25rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 3px;
}

.lang button {
    min-width: 36px; height: 32px;
    padding: 0 0.5rem;
    border: none;
    background: transparent;
    border-radius: 7px;
    color: var(--text-2);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    transition: background 0.15s ease, color 0.15s ease;
}

.lang button:hover { color: var(--text); }

.lang button.active {
    background: var(--gold);
    color: var(--bg);
}

.brand-hero {
    display: none;
}

@media (min-width: 980px) {
    .brand-hero {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 1.5rem;
        max-width: 480px;
        width: 100%;
    }
}

.brand-hero h1 {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: clamp(2rem, 3.6vw, 3.1rem);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.015em;
    color: var(--text);
}

.brand-hero h1 em {
    font-style: normal;
    background: linear-gradient(135deg, var(--gold) 0%, #ffe89a 50%, var(--gold-dark) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.brand-hero p {
    color: var(--text-2);
    font-size: 1.05rem;
    line-height: 1.55;
    max-width: 42ch;
    white-space: pre-line;
}

.brand-features {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    margin-top: 0.5rem;
}

.brand-feature {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.brand-feature-icon {
    flex: 0 0 auto;
    width: 36px; height: 36px;
    border-radius: 9px;
    background: var(--gold-soft);
    border: 1px solid oklch(76% 0.13 86 / 0.30);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--gold);
}

.brand-feature-icon svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.brand-feature-text {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    min-width: 0;
}

.brand-feature-text strong {
    color: var(--text);
    font-size: 0.92rem;
    font-weight: 600;
}

.brand-feature-text span {
    color: var(--text-2);
    font-size: 0.82rem;
    line-height: 1.4;
}

/* ──────────────────────────────────────────────────────────────────────
   Brand news section (latest article only, per spec).
   Layout:  eyebrow badge  →  title (outside box)  →  date  →
             [scrollable box with rendered markdown]  →  read-more link
   ────────────────────────────────────────────────────────────────────── */
.brand-news {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.6rem;
    margin-top: 0.5rem;
    width: 100%;
}

.brand-news-head {
    display: flex;
    align-items: center;
    justify-content: center;
}

.brand-news-eyebrow {
    color: var(--gold);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    padding: 4px 10px;
    border: 1px solid oklch(76% 0.13 86 / 0.35);
    background: var(--gold-soft);
    border-radius: 999px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
}

/* Title sits OUTSIDE the scroll box, above it. */
.brand-news-title {
    margin: 0.25rem 0 0;
    color: var(--gold);
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.3;
    max-width: 100%;
    word-wrap: break-word;
}

.brand-news-date {
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 0.04em;
}

/* Single bounded scrollable box — the markdown body lives here. */
.brand-news-box {
    width: 100%;
    max-height: 260px;
    overflow-y: auto;
    background: rgba(0, 0, 0, 0.28);
    border: 1px solid oklch(76% 0.13 86 / 0.22);
    border-radius: 12px;
    box-shadow: inset 0 1px 0 oklch(76% 0.13 86 / 0.04);
    padding: 0.85rem 1rem;
    scrollbar-width: thin;
    scrollbar-color: oklch(76% 0.13 86 / 0.45) transparent;
    text-align: left;
}

.brand-news-box::-webkit-scrollbar { width: 6px; }
.brand-news-box::-webkit-scrollbar-track { background: transparent; }
.brand-news-box::-webkit-scrollbar-thumb {
    background: oklch(76% 0.13 86 / 0.45);
    border-radius: 999px;
}
.brand-news-box::-webkit-scrollbar-thumb:hover {
    background: oklch(76% 0.13 86 / 0.65);
}

/* Markdown body inside the box — inherits styles from markdown.css
   but needs a smaller font size than the detail page. */
.brand-news-body {
    color: var(--text-2);
    font-size: 0.85rem;
    line-height: 1.55;
}
.brand-news-body > *:first-child { margin-top: 0; }
.brand-news-body > *:last-child { margin-bottom: 0; }
.brand-news-body p { margin: 0 0 0.7em; }
.brand-news-body h1,
.brand-news-body h2,
.brand-news-body h3 {
    color: var(--gold);
    font-size: 0.95em;
    margin: 1em 0 0.4em;
}
.brand-news-body ul,
.brand-news-body ol { margin: 0 0 0.7em; padding-left: 1.5em; }
.brand-news-body li { margin: 0.15em 0; }
.brand-news-body table {
    border-collapse: collapse;
    margin: 0 0 0.7em;
    width: auto;
    font-size: 0.82em;
    border: 1px solid var(--border);
    border-radius: 4px;
    overflow: hidden;
}
.brand-news-body th,
.brand-news-body td {
    border: 1px solid var(--border);
    padding: 0.35em 0.55em;
    text-align: left;
}
.brand-news-body th { background: rgba(212, 175, 55, 0.08); color: var(--gold); }
.brand-news-body blockquote {
    margin: 0 0 0.7em;
    padding: 0.4em 0.8em;
    border-left: 3px solid var(--border);
    background: rgba(0, 0, 0, 0.18);
    border-radius: 0 4px 4px 0;
    color: var(--text-2);
}
.brand-news-body code {
    background: rgba(0, 0, 0, 0.30);
    color: var(--gold-light);
    padding: 0.05em 0.3em;
    border-radius: 3px;
    font-size: 0.92em;
}
.brand-news-body pre {
    margin: 0 0 0.7em;
    padding: 0.7em;
    background: rgba(0, 0, 0, 0.30);
    border: 1px solid var(--border);
    border-radius: 6px;
    overflow-x: auto;
    line-height: 1.45;
}
.brand-news-body pre code {
    background: transparent;
    padding: 0;
    color: var(--text);
    font-size: 0.92em;
}
.brand-news-body .admonition {
    margin: 0 0 0.7em;
    padding: 0.5em 0.7em;
    border-left: 3px solid var(--border);
    background: rgba(0, 0, 0, 0.18);
    border-radius: 0 4px 4px 0;
}
.brand-news-body .admonition-title {
    font-weight: 700;
    margin: 0 0 0.3em;
    font-size: 0.95em;
}
.brand-news-body .admonition-note    { border-left-color: #3498db; }
.brand-news-body .admonition-info    { border-left-color: #17a2b8; }
.brand-news-body .admonition-warning { border-left-color: #f39c12; background: rgba(243,156,18,0.07); }
.brand-news-body .admonition-danger  { border-left-color: #e74c3c; background: rgba(231,76,60,0.07); }
.brand-news-body .admonition-success { border-left-color: #3ecf6e; background: rgba(62,207,110,0.07); }
.brand-news-body .admonition-gift    { border-left-color: #d4af37; background: rgba(212,175,55,0.07); }
.brand-news-body mark {
    background: rgba(212,175,55,0.25);
    color: var(--gold-light);
    padding: 0 0.15em;
    border-radius: 2px;
}
.brand-news-body a { color: var(--gold); text-decoration: underline; text-underline-offset: 2px; }
.brand-news-body a:hover { color: var(--gold-light); }
.brand-news-body img { max-width: 100%; height: auto; border-radius: 4px; }

/* CTA under the box. */
.brand-news-cta {
    display: inline-block;
    color: var(--gold);
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-decoration: none;
    padding: 0.45rem 1rem;
    border: 1px solid oklch(76% 0.13 86 / 0.35);
    border-radius: 999px;
    background: var(--gold-soft);
    transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}
.brand-news-cta:hover {
    color: var(--bg);
    background: var(--gold);
    border-color: var(--gold);
}

.brand-news-empty {
    color: var(--muted);
    font-size: 0.85rem;
    margin: 0;
    padding: 0.85rem 1rem;
    background: rgba(0, 0, 0, 0.18);
    border: 1px dashed var(--border);
    border-radius: 12px;
}

/* Mobile (≤979px): shrink the news box height so it doesn't push the
   login form below the fold. */
@media (max-width: 979px) {
    .brand-news-box { max-height: 200px; }
}

.brand-foot {
    display: none;
    color: var(--muted);
    font-size: 0.78rem;
}

@media (min-width: 980px) {
    .brand-foot { display: block; }
}

/* ──────────────────────────────────────────────────────────────────────
   Form panel (right on desktop, bottom on mobile)
   ────────────────────────────────────────────────────────────────────── */
.form-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem 1rem 2rem;
}

@media (min-width: 980px) {
    .form-panel {
        padding: 3rem clamp(2rem, 5vw, 5rem);
    }
}

.form-wrap {
    width: 100%;
    max-width: 440px;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.form-card {
    background: var(--panel);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid var(--border-2);
    border-radius: 20px;
    padding: 1.75rem 1.5rem;
    box-shadow: var(--shadow-1);
}

@media (min-width: 980px) {
    .form-card {
        padding: 2.25rem 2rem;
        border-radius: 24px;
    }
}

.form-head {
    margin-bottom: 1.25rem;
    text-align: center;
}

.form-head h2 {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gold);
    margin-bottom: 0.3rem;
    letter-spacing: -0.005em;
}

@media (min-width: 980px) {
    .form-head h2 { font-size: 1.75rem; }
}

.form-head p {
    color: var(--text-2);
    font-size: 0.9rem;
}

.alert {
    padding: 0.75rem 1rem;
    border-radius: 10px;
    font-size: 0.85rem;
    margin-bottom: 1rem;
    text-align: center;
}

.alert.error {
    background: var(--error-bg);
    border: 1px solid rgba(220, 38, 38, 0.35);
    color: var(--error);
}

.alert.success {
    background: var(--success-bg);
    border: 1px solid rgba(34, 197, 94, 0.35);
    color: var(--success);
}

.field { margin-bottom: 0.85rem; }

.field label {
    display: block;
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.4rem;
}

.input {
    width: 100%;
    height: 46px;
    padding: 0 0.9rem;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid var(--border-2);
    border-radius: 10px;
    color: var(--text);
    font-size: 0.95rem;
    font-family: inherit;
    transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.input::placeholder { color: var(--muted); }

.input:focus {
    outline: none;
    border-color: var(--gold);
    background: rgba(0, 0, 0, 0.55);
    box-shadow: 0 0 0 3px oklch(76% 0.13 86 / 0.18);
}

.input.input-pin {
    letter-spacing: 0.4em;
    font-size: 1.1rem;
    text-align: center;
    font-family: "SF Mono", "JetBrains Mono", Menlo, monospace;
}

.row { display: flex; gap: 0.75rem; }
.row .field { flex: 1; }

.submit {
    width: 100%;
    height: 48px;
    margin-top: 0.5rem;
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
    color: #0a0a0f;
    font-size: 0.85rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    border: none;
    border-radius: 12px;
    box-shadow: 0 6px 20px oklch(76% 0.13 86 / 0.30);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 28px oklch(76% 0.13 86 / 0.42);
}

.submit:active { transform: translateY(0); }

.form-foot {
    text-align: center;
    color: var(--muted);
    font-size: 0.85rem;
    margin-top: 1rem;
}

.form-foot a {
    color: var(--gold);
    font-weight: 600;
}

.form-foot a:hover { text-decoration: underline; }

/* ── Browse-outlets (logged-out, anonymous catalog preview) ─────── */
.browse {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
    text-align: center;
}

.browse-label {
    color: var(--muted);
    font-size: 0.78rem;
    margin-bottom: 0.6rem;
    font-style: italic;
}

.browse-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.5rem;
}

.browse-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    padding: 0.55rem 0.4rem;
    background: var(--panel-2);
    border: 1px solid var(--border-2);
    border-radius: 9px;
    color: var(--text-2);
    font-size: 0.78rem;
    font-weight: 600;
    transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.browse-link:hover {
    border-color: var(--gold);
    color: var(--gold);
    background: oklch(76% 0.13 86 / 0.06);
}

.browse-link .flag { font-size: 0.95rem; }

.browse-pill {
    display: inline-block;
    font-size: 0.55rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    padding: 1px 5px;
    border-radius: 6px;
    margin-left: 0.15rem;
    text-transform: uppercase;
}

.browse-pill.live {
    background: rgba(34, 197, 94, 0.18);
    color: #86efac;
    border: 1px solid rgba(34, 197, 94, 0.35);
}

.browse-pill.soon {
    background: rgba(245, 158, 11, 0.18);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.4);
}

.browse-pill.hidden {
    background: rgba(120, 120, 130, 0.18);
    color: #b3b3bc;
    border: 1px solid rgba(120, 120, 130, 0.35);
}

/* ──────────────────────────────────────────────────────────────────────
   Fade-card (login ↔ register) — pure CSS, SSR only
   ────────────────────────────────────────────────────────────────────── */
.fade-input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
    width: 0;
    height: 0;
}

.fade-stage {
    position: relative;
}

.fade-deck {
    position: relative;
    display: grid;
    grid-template-areas: "stack";
    grid-template-columns: 1fr;
}

/* Both faces occupy the same grid area. Default: login visible. */
.fade-face {
    grid-area: stack;
    grid-column: 1;
    grid-row: 1;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 280ms ease, transform 280ms ease;
    pointer-events: none;
    visibility: hidden;
}

.fade-face.front {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
    visibility: visible;
}

/* When #fade-register is checked: swap faces */
#fade-register:checked ~ .fade-stage .fade-face.front {
    opacity: 0;
    transform: translateY(-8px);
    visibility: hidden;
}

#fade-register:checked ~ .fade-stage .fade-face.back {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
    visibility: visible;
}

/* Hide browse from register face to keep things compact */
#fade-register:checked ~ .fade-stage .fade-face.front .browse { display: none; }

/* ──────────────────────────────────────────────────────────────────────
   Logged-in selector (SSR-only)
   ────────────────────────────────────────────────────────────────────── */
.logged-in-view {
    background: var(--panel);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid var(--border-2);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: var(--shadow-1);
    position: relative;
}

.li-topbar {
    display: flex; align-items: center; gap: 0.85rem;
    padding: 1rem 1.5rem;
    background: linear-gradient(180deg, oklch(76% 0.13 86 / 0.08) 0%, transparent 100%);
    border-bottom: 1px solid oklch(76% 0.13 86 / 0.20);
    flex-wrap: wrap;
}

.li-logo {
    width: 40px; height: 40px;
    border-radius: 10px;
    object-fit: contain;
    padding: 3px;
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
    box-shadow: 0 0 12px oklch(76% 0.13 86 / 0.30);
    flex-shrink: 0;
}

.li-info { display: flex; flex-direction: column; gap: 0.1rem; min-width: 0; flex: 1; }

.li-info-label {
    font-size: 0.65rem; color: var(--muted);
    text-transform: uppercase; letter-spacing: 0.1em;
}

.li-info-value {
    font-size: 0.9rem; color: var(--gold);
    font-weight: 700; letter-spacing: 0.02em;
    font-family: "JetBrains Mono", "SF Mono", Menlo, monospace;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.li-spacer { display: none; }

@media (min-width: 980px) {
    .li-spacer { flex: 1; display: block; }
}

.li-locale {
    display: inline-flex; gap: 0.25rem;
}

.li-locale button {
    width: 32px; height: 32px;
    border-radius: 8px;
    background: oklch(76% 0.13 86 / 0.06);
    border: 1px solid oklch(76% 0.13 86 / 0.20);
    color: var(--text-2);
    font-size: 0.95rem;
    display: inline-flex; align-items: center; justify-content: center;
    transition: background 0.15s ease, color 0.15s ease;
}

.li-locale button.active {
    background: var(--gold);
    color: var(--bg);
    border-color: var(--gold);
}

.li-logout {
    display: inline-flex; align-items: center; gap: 0.4rem;
    padding: 0.5rem 0.85rem;
    background: transparent;
    border: 1px solid rgba(244, 67, 54, 0.32);
    border-radius: 8px;
    color: #ff8a85;
    font-size: 0.8rem;
    font-weight: 600;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.li-logout:hover {
    background: rgba(244, 67, 54, 0.10);
    border-color: rgba(244, 67, 54, 0.55);
}

.li-logout svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 2.2; }

.li-body { padding: 2rem 1.5rem 1.5rem; }

@media (min-width: 980px) {
    .li-body { padding: 2.5rem 2rem 2rem; }
}

.li-headline {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.015em;
    margin: 0 0 0.5rem;
    color: var(--text);
    text-align: center;
}

.li-headline em {
    font-style: normal;
    background: linear-gradient(135deg, var(--gold) 0%, #ffe89a 60%, var(--gold-dark) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.li-sub {
    text-align: center;
    color: var(--text-2);
    font-size: 0.92rem;
    margin: 0 auto 1.75rem;
    max-width: 50ch;
    white-space: pre-line;
}

.li-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
}

@media (max-width: 520px) {
    .li-grid { grid-template-columns: 1fr; }
}

.li-card {
    display: flex; flex-direction: column; align-items: flex-start;
    padding: 1.25rem 1.1rem 1.1rem;
    background: rgba(255, 255, 255, 0.025);
    border: 1.5px solid var(--border-2);
    border-radius: 14px;
    text-decoration: none;
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
    position: relative;
    overflow: hidden;
}

.li-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, oklch(76% 0.13 86 / 0.05) 0%, transparent 60%);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.18s ease;
}

.li-card:hover {
    transform: translateY(-3px);
    background: rgba(255, 255, 255, 0.045);
    border-color: oklch(76% 0.13 86 / 0.55);
    box-shadow: var(--shadow-gold);
}

.li-card:hover::before { opacity: 1; }

.li-card.de:hover  { border-color: var(--gold); box-shadow: 0 12px 32px oklch(76% 0.13 86 / 0.28); }
.li-card.uk:hover  { border-color: #4169e1; box-shadow: 0 12px 32px rgba(65, 105, 225, 0.28); }
.li-card.fr:hover  { border-color: #0055a4; box-shadow: 0 12px 32px rgba(0, 85, 164, 0.28); }
.li-card.rus:hover { border-color: #c8102e; box-shadow: 0 12px 32px rgba(200, 16, 46, 0.28); }

.li-card-head {
    display: flex; align-items: center; gap: 0.7rem;
    margin-bottom: 0.85rem; width: 100%;
}

.li-flag {
    font-size: 1.5rem;
    line-height: 1;
}

.li-card-name {
    font-size: 1.05rem; font-weight: 700;
    color: var(--text); letter-spacing: 0.01em;
}

.li-card.de  .li-card-name { color: var(--gold); }
.li-card.uk  .li-card-name { color: #7c9aff; }
.li-card.fr  .li-card-name { color: #5aa0e8; }
.li-card.rus .li-card-name { color: #ff7a8e; }

.li-card-meta {
    display: flex; flex-direction: column; gap: 0.3rem;
    font-size: 0.78rem;
    color: var(--text-2);
    width: 100%;
}

.li-card-meta-row {
    display: flex; justify-content: space-between; align-items: baseline; gap: 0.5rem;
}

.li-card-meta-key {
    color: var(--muted); font-size: 0.7rem;
    text-transform: uppercase; letter-spacing: 0.06em;
}

.li-card-meta-val { color: var(--text); font-weight: 600; }

.li-card-currency { color: var(--gold); font-weight: 700; }

.li-card-pill {
    position: absolute;
    top: 0.85rem; right: 0.85rem;
    display: inline-flex; align-items: center; gap: 0.3rem;
    padding: 0.2rem 0.55rem;
    background: rgba(76, 175, 80, 0.15);
    border: 1px solid rgba(76, 175, 80, 0.35);
    border-radius: 999px;
    color: #8fcf90;
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.li-card-pill--live {
    background: rgba(76, 175, 80, 0.15);
    border-color: rgba(76, 175, 80, 0.4);
    color: #8fcf90;
}

.li-card-pill--soon {
    background: rgba(245, 158, 11, 0.15);
    border-color: rgba(245, 158, 11, 0.4);
    color: #fbbf24;
}

.li-card-pill--hidden {
    background: rgba(120, 120, 130, 0.15);
    border-color: rgba(120, 120, 130, 0.35);
    color: #b3b3bc;
}

.li-card-pill .dot {
    width: 6px; height: 6px; border-radius: 50%;
    background: #4CAF50; box-shadow: 0 0 6px #4CAF50;
}

.li-card-pill--soon .dot {
    background: #f59e0b; box-shadow: 0 0 6px #f59e0b;
}

.li-card-pill--hidden .dot {
    background: #787882; box-shadow: none;
}

.li-card-arrow {
    position: absolute;
    bottom: 0.85rem; right: 1rem;
    font-size: 1.25rem;
    color: var(--muted);
    transition: transform 0.18s ease, color 0.18s ease;
}

.li-card:hover .li-card-arrow {
    color: var(--gold); transform: translateX(4px);
}

.li-foot {
    display: flex; justify-content: space-between; align-items: center;
    flex-wrap: wrap; gap: 0.75rem;
    padding: 1rem 1.5rem;
    background: rgba(0, 0, 0, 0.25);
    border-top: 1px solid oklch(76% 0.13 86 / 0.12);
    font-size: 0.72rem;
    color: var(--muted);
}

.li-foot-pill {
    display: inline-flex; align-items: center; gap: 0.35rem;
    padding: 0.25rem 0.6rem;
    background: rgba(76, 175, 80, 0.10);
    border: 1px solid rgba(76, 175, 80, 0.30);
    border-radius: 999px;
    color: #8fcf90;
    font-weight: 600;
}

.li-foot-pill .dot {
    width: 6px; height: 6px; border-radius: 50%;
    background: #4CAF50; box-shadow: 0 0 6px #4CAF50;
}

/* ──────────────────────────────────────────────────────────────────────
   Responsive breakpoints
   ────────────────────────────────────────────────────────────────────── */
@media (max-width: 980px) {
    .li-topbar { padding: 0.85rem 1rem; }
    .li-foot { padding: 0.85rem 1rem; }
    .li-body { padding: 1.5rem 1rem 1rem; }
    .li-headline { font-size: 1.4rem; }
}

@media (max-width: 480px) {
    .brand { padding: 1rem; }
    .form-panel { padding: 1.25rem 1rem 2rem; }
    .form-card { padding: 1.5rem 1.25rem; border-radius: 18px; }
    .browse-grid { grid-template-columns: repeat(2, 1fr); }
    .li-grid { gap: 0.7rem; }
    .li-card { padding: 1rem 0.95rem 0.95rem; }
    .li-flag { font-size: 1.3rem; }
    .li-card-name { font-size: 0.95rem; }
    .li-logout span { display: none; }
    .li-locale button { width: 30px; height: 30px; }
}

@media (max-width: 380px) {
    .input { height: 44px; font-size: 0.9rem; }
    .submit { height: 46px; font-size: 0.78rem; }
    .browse-link { font-size: 0.72rem; padding: 0.5rem 0.3rem; }
    .browse-pill { font-size: 0.5rem; padding: 1px 3px; }
    .li-foot { font-size: 0.68rem; }
}

@media (max-height: 700px) and (min-width: 980px) {
    .brand { padding: 2rem clamp(2rem, 4vw, 4rem); }
    .brand-features { display: none; }
    .li-body { padding: 1.5rem 2rem 1.25rem; }
}

/* Large desktop / TV: keep form centered, give panel breathing room */
@media (min-width: 1400px) {
    .form-wrap { max-width: 480px; }
    .form-card { padding: 2.5rem 2.25rem; border-radius: 28px; }
    .li-grid { gap: 1rem; }
    .li-card { padding: 1.5rem 1.25rem 1.25rem; }
}

@media (min-width: 1920px) {
    .form-wrap { max-width: 520px; }
    .form-card { padding: 3rem 2.5rem; border-radius: 32px; }
    .brand-hero h1 { font-size: 3.6rem; }
    .brand-hero p { font-size: 1.15rem; }
    .li-body { padding: 3rem 2.5rem 2.5rem; }
    .li-headline { font-size: 2.4rem; }
}


/* Performance + modernization overlay */
:root { color-scheme: dark; }
body {
    font-feature-settings: 'kern' 1, 'liga' 1;
    text-rendering: optimizeLegibility;
}
* { scrollbar-width: thin; scrollbar-color: oklch(76% 0.13 86 / 0.3) transparent; }
*::-webkit-scrollbar { width: 6px; height: 6px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb { background: oklch(76% 0.13 86 / 0.3); border-radius: 3px; }
*::-webkit-scrollbar-thumb:hover { background: oklch(76% 0.13 86 / 0.5); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: 4px; }
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

/* ──────────────────────────────────────────────────────────────────────
   UI/UX refinements (Q3 2026)
   ────────────────────────────────────────────────────────────────────── */

/* Kill inline style="margin:0" on 8 different forms */
.lang form,
.li-locale form,
.li-topbar form,
.form-card form { margin: 0; }

/* Auth-switch-link: spans inside <label for="fade-register"> look like links */
.link {
    color: var(--gold);
    font-weight: 600;
    cursor: pointer;
}
.switch-link { cursor: pointer; }
.switch-link:hover .link { text-decoration: underline; }

/* Refined form alerts — icon-style prefix */
.alert {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    text-align: left;
}
.alert::before {
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 700;
    color: #0a0a0f;
    margin-top: 1px;
}
.alert.error::before { content: "!"; background: #fda4af; }
.alert.success::before { content: "✓"; background: #86efac; }
.alert span { flex: 1; }

/* PGP 2FA challenge face */
.pgp-challenge-meta {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    padding: 0.75rem 1rem;
    margin: 0.75rem 0 1rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--hairline, rgba(255, 255, 255, 0.08));
    border-radius: 10px;
    font-size: 0.85rem;
}
.pgp-challenge-meta code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.78rem;
    word-break: break-all;
}
.pgp-label {
    display: block;
    font-size: 0.8rem;
    color: var(--muted, #9ca3af);
    margin: 0.75rem 0 0.4rem;
    font-weight: 500;
}
.pgp-armor {
    display: block;
    width: 100%;
    box-sizing: border-box;
    padding: 0.7rem 0.9rem;
    background: #0a0a0f;
    color: #cbd5e1;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.72rem;
    line-height: 1.45;
    resize: vertical;
    min-height: 140px;
}
.pgp-help {
    margin: 0.75rem 0;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.02);
}
.pgp-help summary {
    cursor: pointer;
    padding: 0.6rem 0.9rem;
    font-size: 0.85rem;
    font-weight: 500;
    list-style: none;
    user-select: none;
}
.pgp-help summary::-webkit-details-marker { display: none; }
.pgp-help summary::before {
    content: "▸ ";
    color: var(--gold, #c4a253);
    display: inline-block;
    transition: transform 0.15s;
}
.pgp-help[open] summary::before { content: "▾ "; }
.pgp-help-body { padding: 0 0.9rem 0.9rem; font-size: 0.82rem; }
.pgp-help-body p { margin: 0.4rem 0; }
.pgp-help-body pre {
    margin: 0.5rem 0;
    padding: 0.6rem 0.8rem;
    background: #0a0a0f;
    border-radius: 8px;
    overflow-x: auto;
    font-size: 0.78rem;
}
.pgp-help-body code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.pgp-help-body a { color: var(--gold, #c4a253); }

@media (max-width: 600px) {
    .pgp-armor { font-size: 0.68rem; min-height: 120px; }
    .pgp-challenge-meta { font-size: 0.78rem; }
}
