/* ============================================================
   Decerner — pro.css
   App navigation (top bar + mobile tab bar), page transitions,
   plan chips, paywall, Pro report, pricing, history and the
   other Pro surfaces. Shares the tokens from style.css.
   ============================================================ */

:root {
    --pro-grad: linear-gradient(135deg, #00f5ff 0%, #8a7dff 52%, #b026ff 100%);
    --glass: rgba(7, 10, 20, 0.72);
    --hair: rgba(255, 255, 255, 0.07);
    --ease-out: cubic-bezier(.2, .8, .2, 1);
    --appbar-h: 62px;
    --tabbar-h: 66px;
}

/* ---------------------------------------------------------------
   Cross-page transitions (Chrome/Edge 126+, Safari 18.2+). Other
   browsers simply navigate; the fallback fade is further below.
   --------------------------------------------------------------- */
@view-transition {
    navigation: auto;
}

.app-bar { view-transition-name: app-bar; }
.ab-ind { view-transition-name: nav-ind; }
.tab-bar { view-transition-name: tab-bar; }
.cyber-bg { view-transition-name: cyber-bg; }

::view-transition-old(root) {
    animation: vt-out .2s ease both;
}

::view-transition-new(root) {
    animation: vt-in .38s var(--ease-out) both;
}

::view-transition-group(nav-ind) {
    animation-duration: .42s;
    animation-timing-function: var(--ease-out);
}

@keyframes vt-out {
    to { opacity: 0; transform: translateY(-6px); }
}

@keyframes vt-in {
    from { opacity: 0; transform: translateY(14px); }
}

@supports not (view-transition-name: none) {
    body.has-appbar main,
    body.has-appbar .lb-wrap,
    body.has-appbar .pf-wrap,
    body.has-appbar .page-header {
        animation: vt-in .45s var(--ease-out) both;
    }
}

@media (prefers-reduced-motion: reduce) {
    ::view-transition-group(*),
    ::view-transition-old(*),
    ::view-transition-new(*) {
        animation: none !important;
    }
}

/* ---------------------------------------------------------------
   App bar
   --------------------------------------------------------------- */
body.has-appbar {
    padding-top: var(--appbar-h);
}

/* The old corner links are replaced by the app bar. */
body.has-appbar .page-header .corner-link {
    display: none;
}

body.has-appbar .page-header {
    padding-top: 30px;
}

.app-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 70;
    height: var(--appbar-h);
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 16px;
    padding: 0 clamp(14px, 3vw, 28px);
    background: var(--glass);
    -webkit-backdrop-filter: blur(16px) saturate(140%);
    backdrop-filter: blur(16px) saturate(140%);
    border-bottom: 1px solid var(--hair);
    font-family: 'Space Grotesk', system-ui, sans-serif;
    transition: background .25s, box-shadow .25s;
}

.app-bar::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0, 245, 255, .45), rgba(176, 38, 255, .45), transparent);
    opacity: .55;
}

.app-bar.scrolled {
    background: rgba(5, 7, 15, 0.88);
    box-shadow: 0 10px 30px rgba(0, 0, 0, .35);
}

.ab-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    justify-self: start;
}

.ab-logo {
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    border-radius: 9px;
    font-weight: 700;
    color: #e9f1ff;
    background:
        linear-gradient(#0a0f1f, #0a0f1f) padding-box,
        var(--pro-grad) border-box;
    border: 1.5px solid transparent;
    box-shadow: 0 0 18px rgba(0, 245, 255, .18);
}

.ab-name {
    font-weight: 600;
    font-size: 1.05rem;
    letter-spacing: .02em;
    background: linear-gradient(90deg, #a5b4fc, #22d3ee, #c084fc);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.ab-nav {
    position: relative;
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 4px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .035);
    border: 1px solid var(--hair);
}

.ab-nav a {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 999px;
    color: #93a3c4;
    text-decoration: none;
    font-size: .9rem;
    font-weight: 500;
    white-space: nowrap;
    transition: color .2s;
}

.ab-nav a svg {
    width: 17px;
    height: 17px;
    flex: none;
}

.ab-nav a:hover,
.ab-nav a:focus-visible,
.ab-nav a.active {
    color: #e9f1ff;
    outline: none;
}

.ab-nav a.active svg {
    color: var(--cyan);
}

.ab-ind {
    position: absolute;
    top: 4px;
    bottom: 4px;
    left: 0;
    width: 0;
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(0, 245, 255, .15), rgba(176, 38, 255, .17));
    border: 1px solid rgba(0, 245, 255, .32);
    box-shadow: 0 0 22px rgba(0, 245, 255, .14), inset 0 0 12px rgba(176, 38, 255, .12);
    opacity: 0;
    transition: transform .38s var(--ease-out), width .38s var(--ease-out), opacity .25s;
    pointer-events: none;
}

.ab-right {
    justify-self: end;
    display: flex;
    align-items: center;
    gap: 10px;
}

.ab-quota {
    font: 600 .72rem/1 ui-monospace, SFMono-Regular, Menlo, monospace;
    letter-spacing: .04em;
    color: #9fe9f5;
    padding: 7px 10px;
    border-radius: 999px;
    border: 1px solid rgba(0, 245, 255, .28);
    background: rgba(0, 245, 255, .06);
    cursor: pointer;
    transition: border-color .2s, background .2s;
}

.ab-quota:hover { border-color: var(--cyan); }
.ab-quota.warn { color: #ffd27a; border-color: rgba(255, 196, 80, .5); background: rgba(255, 196, 80, .08); }
.ab-quota.empty { color: #ff9fb2; border-color: rgba(255, 47, 92, .5); background: rgba(255, 47, 92, .08); }

.ab-pro {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border: none;
    border-radius: 999px;
    font: 700 .82rem/1 'Space Grotesk', system-ui, sans-serif;
    letter-spacing: .02em;
    color: #04121a;
    background: var(--pro-grad);
    background-size: 160% 160%;
    cursor: pointer;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, .08), 0 6px 22px rgba(0, 245, 255, .22);
    transition: transform .2s var(--ease-out), box-shadow .2s, background-position .6s;
    white-space: nowrap;
}

.ab-pro svg { width: 15px; height: 15px; }

.ab-pro:hover {
    transform: translateY(-1px);
    background-position: 100% 0;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, .14), 0 10px 28px rgba(176, 38, 255, .32);
}

.ab-pro.is-pro {
    color: #e9f1ff;
    background:
        linear-gradient(#0b1020, #0b1020) padding-box,
        var(--pro-grad) border-box;
    border: 1.5px solid transparent;
    box-shadow: 0 0 18px rgba(176, 38, 255, .25);
    letter-spacing: .14em;
}

.ab-pro.is-pro svg { color: var(--cyan); }

.ab-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    overflow: hidden;
    display: grid;
    place-items: center;
    text-decoration: none;
    font-weight: 700;
    color: #e9f1ff;
    background: linear-gradient(135deg, #1b2240, #2a1840);
    border: 1.5px solid rgba(0, 245, 255, .3);
    transition: border-color .2s, box-shadow .2s;
}

.ab-avatar img { width: 100%; height: 100%; object-fit: cover; }

.ab-avatar:hover,
.ab-avatar.active {
    border-color: var(--cyan);
    box-shadow: 0 0 16px rgba(0, 245, 255, .3);
}

/* Home navbar keeps its own layout; the pill sits after "Profile". */
.home-pro { margin-left: 12px; }

/* ---------------------------------------------------------------
   Mobile tab bar
   --------------------------------------------------------------- */
.tab-bar {
    display: none;
}

@media (max-width: 760px) {
    .app-bar {
        grid-template-columns: auto 1fr;
    }

    .ab-nav { display: none; }
    .ab-name { display: none; }
    .ab-quota { padding: 6px 8px; font-size: .68rem; }
    .ab-pro { padding: 7px 11px; font-size: .78rem; }

    body.has-appbar {
        padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom, 0px));
    }

    .tab-bar {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 70;
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        height: calc(var(--tabbar-h) + env(safe-area-inset-bottom, 0px));
        padding-bottom: env(safe-area-inset-bottom, 0px);
        background: rgba(6, 9, 18, .9);
        -webkit-backdrop-filter: blur(16px) saturate(140%);
        backdrop-filter: blur(16px) saturate(140%);
        border-top: 1px solid var(--hair);
    }

    .tab-bar a {
        position: relative;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 4px;
        color: #7d8bab;
        text-decoration: none;
        font: 500 .68rem/1 'Space Grotesk', system-ui, sans-serif;
        letter-spacing: .02em;
        -webkit-tap-highlight-color: transparent;
    }

    .tab-bar a svg {
        width: 22px;
        height: 22px;
        transition: transform .25s var(--ease-out);
    }

    .tab-bar a.active {
        color: #e9f1ff;
    }

    .tab-bar a.active svg {
        color: var(--cyan);
        transform: translateY(-2px);
        filter: drop-shadow(0 0 8px rgba(0, 245, 255, .55));
    }

    .tab-bar a.active::before {
        content: '';
        position: absolute;
        top: 0;
        width: 28px;
        height: 3px;
        border-radius: 0 0 4px 4px;
        background: var(--pro-grad);
        box-shadow: 0 0 12px rgba(0, 245, 255, .6);
    }

    .tab-bar a:active svg { transform: scale(.9); }

    /* Keep the language switcher above the tab bar. */
    body.has-appbar #i18n-switch {
        bottom: calc(var(--tabbar-h) + 12px + env(safe-area-inset-bottom, 0px)) !important;
    }

    .home-pro { display: none; }
}

/* ---------------------------------------------------------------
   Badges, chips, quota meter
   --------------------------------------------------------------- */
.pro-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 7px;
    border-radius: 6px;
    font: 800 .6rem/1.4 'Space Grotesk', system-ui, sans-serif;
    letter-spacing: .14em;
    color: #04121a;
    background: var(--pro-grad);
    box-shadow: 0 0 12px rgba(0, 245, 255, .28);
    vertical-align: middle;
}

.quota-meter {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 16px auto 0;
    max-width: 420px;
    padding: 9px 14px;
    border-radius: 12px;
    border: 1px solid rgba(0, 245, 255, .18);
    background: rgba(0, 245, 255, .04);
    font-size: .85rem;
    color: #b9c6e0;
}

.quota-meter[hidden] { display: none; }

.quota-dots {
    display: inline-flex;
    gap: 5px;
}

.quota-dots i {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--cyan);
    box-shadow: 0 0 8px rgba(0, 245, 255, .7);
}

.quota-dots i.used {
    background: rgba(255, 255, 255, .12);
    box-shadow: none;
}

.quota-meter.warn { border-color: rgba(255, 196, 80, .45); background: rgba(255, 196, 80, .06); color: #ffe2a8; }
.quota-meter.warn .quota-dots i:not(.used) { background: #ffc450; box-shadow: 0 0 8px rgba(255, 196, 80, .7); }
.quota-meter.pro { border-color: rgba(176, 38, 255, .35); background: rgba(176, 38, 255, .06); }

.quota-meter .qm-link {
    border: none;
    background: none;
    color: var(--cyan);
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
}

/* The "out of free analyses" state that replaces the Prove button. */
.limit-card {
    margin: 18px auto 0;
    max-width: 440px;
    padding: 20px;
    border-radius: 16px;
    text-align: center;
    background:
        linear-gradient(rgba(9, 12, 24, .92), rgba(9, 12, 24, .92)) padding-box,
        var(--pro-grad) border-box;
    border: 1px solid transparent;
    box-shadow: 0 0 40px rgba(176, 38, 255, .15);
}

.limit-card[hidden] { display: none; }
.limit-card h4 { margin: 0 0 6px; font-size: 1.05rem; color: #e9f1ff; }
.limit-card p { margin: 0 0 14px; color: var(--muted); font-size: .88rem; line-height: 1.5; }

/* ---------------------------------------------------------------
   Paywall
   --------------------------------------------------------------- */
html.pw-open { overflow: hidden; }

.pw-backdrop {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: grid;
    place-items: center;
    padding: 18px;
    background: rgba(2, 4, 10, .66);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    opacity: 0;
    transition: opacity .18s ease;
}

.pw-backdrop[hidden] { display: none; }
.pw-backdrop.show { opacity: 1; }

.pw-card {
    position: relative;
    width: min(440px, 100%);
    max-height: calc(100vh - 36px);
    overflow: auto;
    padding: 30px 26px 22px;
    border-radius: 22px;
    text-align: center;
    font-family: 'Space Grotesk', system-ui, sans-serif;
    color: #e9f1ff;
    background:
        linear-gradient(160deg, rgba(14, 18, 36, .98), rgba(8, 10, 22, .98)) padding-box,
        var(--pro-grad) border-box;
    border: 1px solid transparent;
    box-shadow: 0 30px 80px rgba(0, 0, 0, .6), 0 0 60px rgba(0, 245, 255, .12);
    transform: translateY(14px) scale(.98);
    transition: transform .3s var(--ease-out);
}

.pw-backdrop.show .pw-card { transform: none; }

.pw-glow {
    position: absolute;
    inset: -40% -20% auto;
    height: 220px;
    background: radial-gradient(closest-side, rgba(0, 245, 255, .22), transparent);
    pointer-events: none;
}

.pw-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, .05);
    color: #93a3c4;
    cursor: pointer;
}

.pw-close svg { width: 16px; height: 16px; }
.pw-close:hover { color: #e9f1ff; background: rgba(255, 255, 255, .1); }

.pw-icon {
    position: relative;
    width: 58px;
    height: 58px;
    margin: 0 auto 14px;
    display: grid;
    place-items: center;
    border-radius: 18px;
    color: #04121a;
    background: var(--pro-grad);
    box-shadow: 0 10px 30px rgba(0, 245, 255, .3);
}

.pw-icon svg { width: 28px; height: 28px; }

.pw-title {
    position: relative;
    margin: 0 0 8px;
    font-size: 1.35rem;
    line-height: 1.25;
}

.pw-sub {
    position: relative;
    margin: 0 auto 18px;
    max-width: 340px;
    color: #a9b6d3;
    font-size: .92rem;
    line-height: 1.55;
}

.pw-benefits {
    list-style: none;
    margin: 0 0 18px;
    padding: 14px;
    display: grid;
    gap: 10px;
    text-align: left;
    border-radius: 14px;
    background: rgba(255, 255, 255, .03);
    border: 1px solid var(--hair);
}

.pw-benefits li {
    display: flex;
    align-items: center;
    gap: 11px;
    font-size: .9rem;
    color: #d6def0;
}

.pw-benefits svg {
    width: 18px;
    height: 18px;
    flex: none;
    color: var(--cyan);
}

.pw-price {
    margin: 0 0 4px;
    color: #93a3c4;
}

.pw-amount {
    font-size: 2.1rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: -.01em;
}

.pw-unlock {
    margin: 6px auto 12px;
    max-width: 330px;
    padding: 8px 12px;
    border-radius: 10px;
    font-size: .8rem;
    color: #9fe9f5;
    background: rgba(0, 245, 255, .07);
}

.pw-unlock[hidden] { display: none; }

.pw-cta {
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    margin-top: 8px;
    padding: 14px 18px;
    border: none;
    border-radius: 14px;
    font: 700 1rem/1 'Space Grotesk', system-ui, sans-serif;
    color: #04121a;
    background: var(--pro-grad);
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(0, 245, 255, .25);
    transition: transform .2s var(--ease-out), box-shadow .2s, opacity .2s;
}

.pw-cta svg { width: 18px; height: 18px; }

.pw-cta::after {
    content: '';
    position: absolute;
    top: 0;
    left: -60%;
    width: 40%;
    height: 100%;
    background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .45), transparent);
    transform: skewX(-18deg);
    animation: pw-shine 3.2s ease-in-out infinite;
}

@keyframes pw-shine {
    0%, 60% { left: -60%; }
    100% { left: 130%; }
}

.pw-cta:hover { transform: translateY(-1px); box-shadow: 0 14px 36px rgba(176, 38, 255, .35); }
.pw-cta:disabled { opacity: .6; cursor: progress; }

.pw-note {
    margin-top: 12px;
    padding: 10px 12px;
    border-radius: 10px;
    font-size: .85rem;
    line-height: 1.5;
    color: #ffe2a8;
    background: rgba(255, 196, 80, .08);
    border: 1px solid rgba(255, 196, 80, .25);
}

.pw-note[hidden] { display: none; }

.pw-later {
    margin-top: 10px;
    padding: 8px;
    border: none;
    background: none;
    color: #7d8bab;
    font: 500 .88rem 'Space Grotesk', system-ui, sans-serif;
    cursor: pointer;
}

.pw-later:hover { color: #c8d2e8; }

.pw-cancel {
    margin: 2px 0 0;
    font-size: .74rem;
    color: #5f6b86;
}

/* ---------------------------------------------------------------
   Toast
   --------------------------------------------------------------- */
.pro-toast {
    position: fixed;
    left: 50%;
    bottom: 24px;
    z-index: 210;
    display: flex;
    align-items: center;
    gap: 14px;
    max-width: min(520px, calc(100vw - 32px));
    padding: 12px 16px;
    border-radius: 14px;
    font: 500 .9rem/1.4 'Space Grotesk', system-ui, sans-serif;
    color: #e9f1ff;
    background: rgba(12, 16, 32, .96);
    border: 1px solid rgba(0, 245, 255, .3);
    box-shadow: 0 16px 40px rgba(0, 0, 0, .5);
    transform: translate(-50%, 30px);
    opacity: 0;
    pointer-events: none;
    transition: transform .3s var(--ease-out), opacity .3s;
}

.pro-toast.show { transform: translate(-50%, 0); opacity: 1; pointer-events: auto; }

.pro-toast button {
    flex: none;
    padding: 7px 12px;
    border: none;
    border-radius: 9px;
    font: 700 .8rem 'Space Grotesk', system-ui, sans-serif;
    color: #04121a;
    background: var(--pro-grad);
    cursor: pointer;
}

@media (max-width: 760px) {
    body.has-appbar .pro-toast { bottom: calc(var(--tabbar-h) + 14px); }
}

/* ---------------------------------------------------------------
   Pro report
   --------------------------------------------------------------- */
.pro-report {
    margin: 28px 0 0;
    animation: fadeUp .5s ease;
}

.pro-report[hidden] { display: none; }

.rp-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}

.rp-head h3 {
    margin: 0;
    font-size: 1.15rem;
    letter-spacing: .03em;
    color: #e9f1ff;
}

.rp-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 14px;
}

.rp-card {
    padding: 18px;
    border-radius: 16px;
    background: rgba(9, 13, 26, .78);
    border: 1px solid rgba(0, 245, 255, .14);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .03);
}

.rp-label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    font: 600 .72rem/1 ui-monospace, SFMono-Regular, Menlo, monospace;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: #93a3c4;
}

.rp-label svg { width: 16px; height: 16px; color: var(--cyan); }
.rp-label em { font-style: normal; text-transform: none; letter-spacing: 0; color: #5f6b86; }

.rp-shape-main {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 10px;
}

.rp-shape-svg {
    width: 64px;
    height: 68px;
    flex: none;
}

.rp-shape-svg path {
    fill: rgba(0, 245, 255, .08);
    stroke: var(--cyan);
    stroke-width: 2.5;
    filter: drop-shadow(0 0 6px rgba(0, 245, 255, .5));
}

.rp-big {
    font-size: 1.7rem;
    font-weight: 700;
    background: var(--pro-grad);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.rp-dim { color: #93a3c4; font-size: .85rem; }

.rp-desc {
    margin: 0 0 12px;
    color: #b9c6e0;
    font-size: .88rem;
    line-height: 1.5;
}

.rp-rank {
    display: grid;
    grid-template-columns: 90px 1fr 40px;
    align-items: center;
    gap: 10px;
    margin-top: 6px;
    font-size: .8rem;
    color: #93a3c4;
}

.rp-rank i {
    height: 6px;
    border-radius: 6px;
    background: rgba(255, 255, 255, .07);
    overflow: hidden;
}

.rp-rank b {
    display: block;
    height: 100%;
    border-radius: 6px;
    background: var(--pro-grad);
}

.rp-rank em { font-style: normal; text-align: right; }

.rp-rec { margin-bottom: 12px; }
.rp-rec:last-child { margin-bottom: 0; }
.rp-rec b { display: block; margin-bottom: 3px; color: #e9f1ff; font-size: .9rem; }
.rp-rec p { margin: 0; color: #b9c6e0; font-size: .86rem; line-height: 1.5; }

.rp-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    padding: 7px 0;
    border-bottom: 1px dashed rgba(255, 255, 255, .06);
    font-size: .88rem;
    color: #b9c6e0;
}

.rp-row b { color: #e9f1ff; font-variant-numeric: tabular-nums; white-space: nowrap; }
.rp-row small { color: #7d8bab; font-weight: 500; }

.rp-foot {
    margin: 10px 0 0;
    font-size: .76rem;
    color: #6f7c98;
    line-height: 1.45;
}

.rp-status {
    margin: 12px 0 4px;
    padding: 9px 11px;
    border-radius: 10px;
    font-size: .84rem;
    line-height: 1.45;
}

.rp-pose.ok .rp-status { color: #a9ffd0; background: rgba(99, 255, 162, .07); border: 1px solid rgba(99, 255, 162, .2); }
.rp-pose.warn .rp-status { color: #ffe2a8; background: rgba(255, 196, 80, .08); border: 1px solid rgba(255, 196, 80, .25); }
.rp-levelled b { color: var(--cyan); }

.rp-metric p { margin: 4px 0 8px; font-size: .76rem; color: #6f7c98; line-height: 1.4; }

.rp-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-top: 16px;
}

.rp-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 12px;
    border: 1px solid rgba(0, 245, 255, .35);
    background: rgba(0, 245, 255, .06);
    color: #e9f1ff;
    text-decoration: none;
    font: 600 .88rem 'Space Grotesk', system-ui, sans-serif;
    cursor: pointer;
    transition: border-color .2s, background .2s, transform .2s;
}

.rp-btn svg { width: 17px; height: 17px; color: var(--cyan); }
.rp-btn:hover { border-color: var(--cyan); background: rgba(0, 245, 255, .1); transform: translateY(-1px); }
.rp-btn.locked svg { color: #c084fc; }

/* Locked (free) report */
.rp-lock-sub { margin: -4px 0 14px; color: #93a3c4; font-size: .9rem; line-height: 1.5; }

.rp-lock-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
    margin-bottom: 16px;
}

.rp-lock-tile {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    min-height: 118px;
    padding: 14px;
    border-radius: 14px;
    border: 1px solid rgba(176, 38, 255, .22);
    background: rgba(12, 10, 28, .7);
    color: #d6def0;
    font: 600 .86rem 'Space Grotesk', system-ui, sans-serif;
    text-align: left;
    cursor: pointer;
    transition: border-color .2s, transform .2s var(--ease-out);
}

.rp-lock-tile:hover { border-color: rgba(176, 38, 255, .6); transform: translateY(-2px); }
.rp-lock-ico svg { width: 20px; height: 20px; color: #c084fc; }

.rp-lock-fake {
    display: grid;
    gap: 6px;
    width: 100%;
    filter: blur(3px);
    opacity: .7;
}

.rp-lock-fake i {
    display: block;
    height: 7px;
    border-radius: 6px;
    background: linear-gradient(90deg, rgba(0, 245, 255, .45), rgba(176, 38, 255, .45));
}

.rp-lock-fake i:nth-child(2) { width: 70%; }
.rp-lock-fake i:nth-child(3) { width: 45%; }

.rp-lock-pad {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 26px;
    height: 26px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: rgba(176, 38, 255, .18);
}

.rp-lock-pad svg { width: 14px; height: 14px; color: #e3c6ff; }
.rp-unlock { max-width: 420px; display: flex; margin: 0 auto; }

/* Locked coefficient card (when FREE_OPEN_CRITERIA < 15) */
.coeff-card.locked { cursor: pointer; border-color: rgba(176, 38, 255, .3); }
.coeff-card.locked .coeff-score svg { width: 15px; height: 15px; color: #c084fc; }
.coeff-card.locked .coeff-bar-fill { width: 60% !important; filter: blur(3px); opacity: .5; }

/* ---------------------------------------------------------------
   Result actions (analyze)
   --------------------------------------------------------------- */
.result-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-top: 14px;
}

.lb-add-btn.is-locked::after,
.btn-locked::after {
    content: 'PRO';
    margin-left: 8px;
    padding: 2px 6px;
    border-radius: 5px;
    font: 800 .58rem/1.4 'Space Grotesk', system-ui, sans-serif;
    letter-spacing: .12em;
    color: #04121a;
    background: var(--pro-grad);
    vertical-align: middle;
}

/* ---------------------------------------------------------------
   Versus: modes + opponent picker
   --------------------------------------------------------------- */
.vs-modes {
    position: relative;
    display: inline-flex;
    gap: 4px;
    margin: 6px auto 18px;
    padding: 4px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .035);
    border: 1px solid var(--hair);
}

.vs-modes button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 16px;
    border: none;
    border-radius: 999px;
    background: transparent;
    color: #93a3c4;
    font: 600 .88rem 'Space Grotesk', system-ui, sans-serif;
    cursor: pointer;
    transition: color .2s, background .25s;
}

.vs-modes button.active {
    color: #e9f1ff;
    background: linear-gradient(135deg, rgba(0, 245, 255, .16), rgba(176, 38, 255, .18));
    box-shadow: inset 0 0 0 1px rgba(0, 245, 255, .3);
}

.vs-modes-wrap { text-align: center; }

.vs-free-note {
    margin: -6px 0 14px;
    text-align: center;
    font-size: .82rem;
    color: #93a3c4;
}

.vs-free-note.used { color: #ff9fb2; }

.opp-picker {
    margin: 0 auto 8px;
    max-width: 760px;
}

.opp-picker[hidden] { display: none; }

.opp-search {
    width: 100%;
    margin-bottom: 12px;
    padding: 10px 14px;
    border-radius: 12px;
    border: 1px solid rgba(120, 140, 170, .28);
    background: rgba(3, 6, 14, .6);
    color: #e9f1ff;
    font: inherit;
    outline: none;
}

.opp-search:focus { border-color: var(--cyan); }

.opp-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
    max-height: 340px;
    overflow: auto;
    padding: 2px;
}

.opp-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 14px 10px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, .08);
    background: rgba(9, 13, 26, .78);
    color: #e9f1ff;
    font: inherit;
    cursor: pointer;
    transition: border-color .2s, transform .2s var(--ease-out), box-shadow .2s;
}

.opp-card:hover { transform: translateY(-2px); border-color: rgba(255, 47, 92, .45); }

.opp-card.selected {
    border-color: var(--pink);
    box-shadow: 0 0 0 1px var(--pink), 0 0 24px rgba(255, 47, 92, .25);
}

.opp-card img {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 47, 92, .5);
}

.opp-card .opp-name { font-weight: 600; font-size: .9rem; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.opp-card .opp-meta { font-size: .76rem; color: #93a3c4; }

.opp-empty {
    grid-column: 1 / -1;
    padding: 24px;
    text-align: center;
    color: #93a3c4;
    font-size: .9rem;
}

.versus-slot .upload-area.opponent {
    background-size: cover;
    background-position: center;
    cursor: default;
}

/* ---------------------------------------------------------------
   Leaderboard additions
   --------------------------------------------------------------- */
.lb-pro { margin-left: 6px; }

.lb-vs-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-left: 10px;
    padding: 5px 9px;
    border-radius: 9px;
    border: 1px solid rgba(255, 47, 92, .4);
    background: rgba(255, 47, 92, .08);
    color: #ffb3c2;
    font: 600 .72rem 'Space Grotesk', system-ui, sans-serif;
    cursor: pointer;
    white-space: nowrap;
    transition: border-color .2s, background .2s;
}

.lb-vs-btn svg { width: 13px; height: 13px; }
.lb-vs-btn:hover { border-color: var(--pink); background: rgba(255, 47, 92, .16); color: #fff; }

.lb-pro-cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 14px;
    padding: 18px 20px;
    margin-bottom: 18px;
    border-radius: 16px;
    background:
        linear-gradient(rgba(9, 12, 24, .92), rgba(9, 12, 24, .92)) padding-box,
        var(--pro-grad) border-box;
    border: 1px solid transparent;
}

.lb-pro-cta h4 { margin: 0 0 4px; color: #e9f1ff; font-size: 1rem; }
.lb-pro-cta p { margin: 0; color: #93a3c4; font-size: .86rem; }
.lb-pro-cta .pw-cta { width: auto; margin: 0; padding: 11px 18px; font-size: .9rem; }

.lb-hint {
    margin: 10px 0 0;
    font-size: .82rem;
    color: #93a3c4;
}

.lb-hint button {
    border: none;
    background: none;
    padding: 0;
    color: var(--cyan);
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

/* ---------------------------------------------------------------
   Profile: plan, history, versus card
   --------------------------------------------------------------- */
.plan-card {
    position: relative;
    overflow: hidden;
}

.plan-card.is-pro {
    background:
        linear-gradient(rgba(10, 13, 26, .9), rgba(10, 13, 26, .9)) padding-box,
        var(--pro-grad) border-box !important;
    border: 1px solid transparent !important;
}

.plan-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.plan-name {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.25rem;
    font-weight: 700;
    color: #e9f1ff;
}

.plan-sub { margin: 6px 0 0; color: #93a3c4; font-size: .88rem; }

.plan-usage {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 10px;
    margin-top: 14px;
}

.plan-use {
    padding: 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, .03);
    border: 1px solid var(--hair);
}

.plan-use span { display: block; font-size: .76rem; color: #93a3c4; margin-bottom: 6px; }
.plan-use b { font-size: 1.1rem; color: #e9f1ff; }

.plan-bar {
    height: 6px;
    margin-top: 8px;
    border-radius: 6px;
    background: rgba(255, 255, 255, .07);
    overflow: hidden;
}

.plan-bar i { display: block; height: 100%; border-radius: 6px; background: var(--pro-grad); }

.plan-warn {
    margin-top: 12px;
    padding: 9px 12px;
    border-radius: 10px;
    color: #ffe2a8;
    background: rgba(255, 196, 80, .08);
    border: 1px solid rgba(255, 196, 80, .25);
    font-size: .85rem;
}

.plan-warn[hidden] { display: none; }
.plan-card .pw-cta { width: auto; margin: 0; padding: 11px 18px; font-size: .9rem; }

.hist-wrap { position: relative; }

.hist-chart {
    width: 100%;
    height: 180px;
    display: block;
}

.hist-chart .grid { stroke: rgba(255, 255, 255, .06); stroke-width: 1; }
.hist-chart .line { fill: none; stroke: url(#histGrad); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.hist-chart .area { fill: url(#histFill); }
.hist-chart .dot { fill: #05060d; stroke: var(--cyan); stroke-width: 2; }
.hist-chart text { fill: #6f7c98; font: 10px ui-monospace, monospace; }

.hist-list {
    margin-top: 10px;
    display: grid;
    gap: 6px;
    max-height: 220px;
    overflow: auto;
}

.hist-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 10px;
    background: rgba(255, 255, 255, .025);
    font-size: .85rem;
    color: #b9c6e0;
    text-decoration: none;
}

.hist-item:hover { background: rgba(0, 245, 255, .06); }
.hist-item b { color: #e9f1ff; font-variant-numeric: tabular-nums; }
.hist-item em { font-style: normal; color: #7d8bab; font-size: .78rem; }

.hist-locked {
    position: relative;
}

.hist-locked .hist-chart { filter: blur(4px); opacity: .55; }

.hist-locked .hist-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-align: center;
    color: #d6def0;
    font-size: .9rem;
}

.hist-overlay .pw-cta { width: auto; margin: 0; padding: 10px 16px; font-size: .88rem; }
.hist-empty { padding: 16px 0 4px; color: #93a3c4; font-size: .9rem; }

.vc-row {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.vc-photo {
    width: 76px;
    height: 76px;
    border-radius: 16px;
    object-fit: cover;
    border: 2px solid rgba(255, 47, 92, .5);
    flex: none;
}

.vc-info { flex: 1; min-width: 180px; }
.vc-info b { color: #e9f1ff; }
.vc-info p { margin: 4px 0 0; color: #93a3c4; font-size: .85rem; line-height: 1.5; }

.vc-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }

.switch {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: .88rem;
    color: #d6def0;
}

.switch input { position: absolute; opacity: 0; width: 0; height: 0; }

.switch .track {
    width: 42px;
    height: 24px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .12);
    position: relative;
    transition: background .2s;
}

.switch .track::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #e9f1ff;
    transition: transform .25s var(--ease-out);
}

.switch input:checked + .track { background: var(--pro-grad); }
.switch input:checked + .track::after { transform: translateX(18px); }
.switch input:focus-visible + .track { box-shadow: 0 0 0 2px var(--cyan); }

/* ---------------------------------------------------------------
   Home: pricing section (home uses a prebuilt Tailwind file, so
   everything here is plain CSS)
   --------------------------------------------------------------- */
.pricing {
    position: relative;
    padding: 100px 24px;
}

.pricing-head { text-align: center; margin-bottom: 44px; }

.pricing-eyebrow {
    font-size: .75rem;
    letter-spacing: .3em;
    text-transform: uppercase;
    color: #22d3ee;
}

.pricing-title {
    margin: 8px 0 0;
    font-size: clamp(2.2rem, 5vw, 3rem);
    font-weight: 700;
    background: linear-gradient(90deg, #818cf8, #c084fc);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.pricing-sub { margin: 12px auto 0; max-width: 560px; color: #9ca3af; }

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 22px;
    max-width: 860px;
    margin: 0 auto;
}

.price-card {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 28px 26px;
    border-radius: 20px;
    background: linear-gradient(160deg, rgba(17, 24, 39, .9), rgba(3, 7, 18, .9));
    border: 1px solid rgba(99, 102, 241, .2);
    transition: transform .3s var(--ease-out), border-color .3s;
}

.price-card:hover { transform: translateY(-4px); }

.price-card.featured {
    background:
        linear-gradient(160deg, rgba(14, 18, 36, .97), rgba(8, 10, 22, .97)) padding-box,
        var(--pro-grad) border-box;
    border: 1px solid transparent;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .45), 0 0 50px rgba(0, 245, 255, .12);
}

.price-ribbon {
    position: absolute;
    top: -12px;
    right: 22px;
    padding: 5px 10px;
    border-radius: 8px;
    font: 800 .66rem/1 'Space Grotesk', system-ui, sans-serif;
    letter-spacing: .14em;
    color: #04121a;
    background: var(--pro-grad);
}

.price-name { font-size: 1.1rem; font-weight: 600; color: #e9f1ff; }
.price-amount { margin: 12px 0 2px; font-size: 2.6rem; font-weight: 700; color: #fff; }
.price-amount small { font-size: 1rem; font-weight: 500; color: #9ca3af; }
.price-desc { margin: 0 0 18px; color: #9ca3af; font-size: .9rem; }

.price-list {
    list-style: none;
    margin: 0 0 24px;
    padding: 0;
    display: grid;
    gap: 11px;
    flex: 1;
}

.price-list li {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    color: #d1d5db;
    font-size: .92rem;
    line-height: 1.4;
}

.price-list li::before {
    content: '';
    flex: none;
    width: 18px;
    height: 18px;
    margin-top: 1px;
    border-radius: 50%;
    background: rgba(34, 211, 238, .14) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2322d3ee' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12 4.5 4.5L19 7'/%3E%3C/svg%3E") center / 11px no-repeat;
}

.price-list li.off { color: #6b7280; }

.price-list li.off::before {
    background: rgba(255, 255, 255, .05) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='M7 12h10'/%3E%3C/svg%3E") center / 11px no-repeat;
}

.price-btn {
    display: block;
    width: 100%;
    padding: 13px;
    border-radius: 12px;
    text-align: center;
    text-decoration: none;
    font: 600 .95rem 'Space Grotesk', system-ui, sans-serif;
    color: #67e8f9;
    border: 1px solid rgba(34, 211, 238, .35);
    background: transparent;
    cursor: pointer;
    transition: background .2s, border-color .2s;
}

.price-btn:hover { background: rgba(34, 211, 238, .08); border-color: rgba(34, 211, 238, .6); }
.price-card.featured .pw-cta { margin-top: 0; }

.hero-note {
    margin-top: 18px;
    font-size: .85rem;
    color: #9ca3af;
    letter-spacing: .02em;
}

.hero-note b { color: #67e8f9; font-weight: 600; }

/* ---------------------------------------------------------------
   PDF report page
   --------------------------------------------------------------- */
.report-page {
    background: #05060d;
}

.report-sheet {
    width: min(900px, 94vw);
    margin: 0 auto;
    padding: 34px 0 80px;
    font-family: 'Space Grotesk', system-ui, sans-serif;
    color: #e9f1ff;
}

.report-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    flex-wrap: wrap;
    padding-bottom: 20px;
    margin-bottom: 22px;
    border-bottom: 1px solid var(--hair);
}

.report-brand { display: flex; align-items: center; gap: 12px; }
.report-brand h1 { margin: 0; font-size: 1.5rem; }
.report-meta { color: #93a3c4; font-size: .85rem; line-height: 1.6; text-align: right; }

.report-score {
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

.report-score .big {
    font-size: 4rem;
    font-weight: 700;
    line-height: 1;
    background: var(--pro-grad);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.report-score .cap { color: #b9c6e0; font-size: 1rem; }

.report-cats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 8px 22px;
    margin: 6px 0 26px;
}

.report-cat {
    display: grid;
    grid-template-columns: 1fr 120px 42px;
    align-items: center;
    gap: 10px;
    font-size: .86rem;
    color: #b9c6e0;
}

.report-cat i { height: 6px; border-radius: 6px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.report-cat b { display: block; height: 100%; background: var(--pro-grad); border-radius: 6px; }
.report-cat em { font-style: normal; text-align: right; color: #e9f1ff; font-variant-numeric: tabular-nums; }

.report-h { margin: 0 0 12px; font-size: 1.05rem; letter-spacing: .04em; }

.report-toolbar {
    position: sticky;
    top: 0;
    z-index: 5;
    display: flex;
    justify-content: center;
    gap: 10px;
    padding: 12px;
    background: rgba(5, 6, 13, .9);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--hair);
}

.report-toolbar .pw-cta { width: auto; margin: 0; padding: 11px 20px; font-size: .92rem; }

.report-disclaimer { margin-top: 26px; color: #6f7c98; font-size: .76rem; line-height: 1.5; }

@media print {
    @page { margin: 14mm; }
    html, body, .report-page { background: #fff !important; }
    .report-toolbar, #i18n-switch, .pro-toast { display: none !important; }
    .report-sheet { width: auto; padding: 0; color: #111; }
    .report-meta, .report-score .cap, .rp-desc, .rp-rec p, .rp-row, .rp-dim, .report-cat, .rp-label { color: #333 !important; }
    .rp-card { background: #fff !important; border: 1px solid #ddd !important; box-shadow: none !important; break-inside: avoid; }
    .rp-row b, .rp-rec b, .report-cat em, .rp-head h3, .report-h, .report-brand h1 { color: #111 !important; }
    .report-score .big, .rp-big { color: #4338ca !important; -webkit-text-fill-color: #4338ca; background: none; }
    .rp-shape-svg path { filter: none; stroke: #4338ca; fill: #eef2ff; }
    .rp-actions { display: none !important; }
    * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* ---------------------------------------------------------------
   Backdrops ("Atmosphere", bg-fx.js)
   --------------------------------------------------------------- */
.cyber-bg.bd-on > :not(.bd-canvas) { display: none !important; }

.bd-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
}

/* Home has no .cyber-bg of its own: the injected one sits behind everything. */
.cyber-bg.backdrop-host { z-index: -1; }

.bd-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
    margin-top: 12px;
}

.bd-tile {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 0;
    overflow: hidden;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, .08);
    background: rgba(9, 13, 26, .8);
    color: #e9f1ff;
    font: inherit;
    text-align: left;
    cursor: pointer;
    transition: border-color .2s, transform .2s var(--ease-out), box-shadow .2s;
}

.bd-tile:hover { transform: translateY(-2px); border-color: rgba(0, 245, 255, .35); }
.bd-tile:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
.bd-tile.active { border-color: var(--cyan); box-shadow: 0 0 0 1px var(--cyan), 0 0 22px rgba(0, 245, 255, .18); }

.bd-thumb {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    background: #05060d;
}

.bd-thumb canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

.bd-meta { display: flex; flex-direction: column; gap: 2px; padding: 9px 10px 10px; }
.bd-name { display: flex; align-items: baseline; gap: 6px; font-weight: 600; font-size: .86rem; }
.bd-name em { font: 500 .66rem/1 ui-monospace, monospace; font-style: normal; color: var(--cyan); letter-spacing: .08em; }
.bd-line { font-size: .74rem; color: #8b97b3; line-height: 1.35; }

.bd-flag {
    position: absolute;
    top: 8px;
    right: 8px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 7px;
    border-radius: 7px;
    font: 700 .6rem/1.3 'Space Grotesk', system-ui, sans-serif;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #e9f1ff;
    background: rgba(5, 6, 13, .72);
    border: 1px solid rgba(255, 255, 255, .12);
}

.bd-flag svg { width: 12px; height: 12px; }
.bd-tile.active .bd-flag { color: #04121a; background: var(--cyan); border-color: transparent; }
.bd-tile.locked .bd-flag svg { color: #c084fc; }

/* ---------------------------------------------------------------
   Responsive polish (phones & tablets)
   --------------------------------------------------------------- */
/* Compact language picker in the app bar / home navbar (phones). On phones it
   replaces the floating corner switcher, which used to cover page text. */
.ab-lang {
    display: none;
    appearance: none;
    -webkit-appearance: none;
    padding: 7px 10px;
    border-radius: 999px;
    border: 1px solid rgba(0, 245, 255, .28);
    background: rgba(0, 245, 255, .06);
    color: #9fe9f5;
    font: 700 .72rem/1 'Space Grotesk', system-ui, sans-serif;
    letter-spacing: .08em;
    cursor: pointer;
}

.ab-lang option { background: #0b1020; color: #e9f1ff; }
.ab-lang:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }

@media (max-width: 760px) {
    .ab-lang { display: inline-block; }
    html.has-lang-select #i18n-switch { display: none !important; }
    /* Calmer backdrop behind text on small screens. */
    .bd-canvas { opacity: .55; }
}

/* Home navbar: the full link row only fits from 1024px; below that use the
   hamburger menu (the Tailwind build only has the md breakpoint). */
@media (max-width: 1023px) {
    #navbar .hidden.md\:flex { display: none !important; }
    #navbar .flex.md\:hidden { display: flex !important; align-items: center; gap: 10px; }
    #navbar #mobile-menu { display: block !important; }
}

/* The warm caption under the score is a sentence or two: keep it readable. */
.score-caption {
    max-width: 34ch;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.55;
    text-wrap: balance;
    font-weight: 500;
}
