@import '/_content/Microsoft.FluentUI.AspNetCore.Components/css/reboot.css';

@font-face {
    font-family: "Barlow Semi Condensed";
    font-weight: 500;
    font-style: normal;
    font-display: swap;
    src: url("fonts/BarlowSemiCondensed-Medium.woff2") format("woff2");
}
@font-face {
    font-family: "Barlow Semi Condensed";
    font-weight: 600;
    font-style: normal;
    font-display: swap;
    src: url("fonts/BarlowSemiCondensed-SemiBold.woff2") format("woff2");
}
@font-face {
    font-family: "Barlow Semi Condensed";
    font-weight: 700;
    font-style: normal;
    font-display: swap;
    src: url("fonts/BarlowSemiCondensed-Bold.woff2") format("woff2");
}
@font-face {
    font-family: "Nunito Sans";
    font-weight: 400 700;
    font-style: normal;
    font-display: swap;
    src: url("fonts/NunitoSans.woff2") format("woff2");
}

:root {
    --cd-surface-0: #0d0d0d;
    --cd-surface-1: #161616;
    --cd-surface-2: #1e1e1e;
    --cd-accent: #539dc2;
    --cd-accent-subtle: #539dc220;
    --cd-success: #2ecc71;
    --cd-warning: #e67e22;
    --cd-text-primary: #e8e8e8;
    --cd-text-secondary: #8a8a8a;
    --cd-text-muted: #555;
    --cd-border: rgba(255, 255, 255, 0.06);
}

body {
    --body-font: "Nunito Sans", "Segoe UI Variable", "Segoe UI", sans-serif;
    --heading-font: "Barlow Semi Condensed", "Segoe UI Variable", "Segoe UI", sans-serif;
    font-family: var(--body-font);
    font-size: var(--type-ramp-base-font-size);
    line-height: var(--type-ramp-base-line-height);
    margin: 0;
}

fluent-header {
    border-bottom: 1px solid var(--cd-border);
    padding-top: env(safe-area-inset-top);
}

.navmenu-icon {
    display: none;
}

.main {
    min-height: calc(100dvh - 86px);
    color: var(--neutral-foreground-rest);
    align-items: stretch !important;
}

.body-content {
    align-self: stretch;
    height: calc(100dvh - 86px) !important;
    display: flex;
}

.content {
    padding: 0.75rem 1.5rem;
    align-self: stretch !important;
    width: 100%;
}

.status-border {
    padding: 3px;
    border: 2px solid var(--cd-accent);
    border-radius: 6px;
}

.status-border-win {
    padding: 3px;
    border: 2px solid var(--cd-success);
    border-radius: 6px;
}

.status-border-warn {
    padding: 3px;
    border: 2px solid var(--cd-warning);
    border-radius: 6px;
}

.inner-border {
    padding: 4px;
    margin: 8px;
    border: 1px solid var(--cd-text-secondary);
    border-radius: 10px;
}

.item-style-None {
    padding: 8px;
    margin-bottom: 4px !important;
    border: 2px solid var(--cd-accent) !important;
    border-radius: 6px;
}

.item-style-Parent {
    padding: 8px;
    margin-bottom: 4px !important;
    border: 2px solid var(--cd-accent) !important;
    border-radius: 6px;
}

.item-style-Child {
    padding: 8px;
    margin-bottom: 4px !important;
    border: 2px solid var(--cd-accent) !important;
    border-radius: 0 6px 6px 0;
}

.grid-border {
    border: 1px solid var(--cd-text-secondary) !important;
}

.grid-border-right {
    border: 1px solid var(--cd-text-secondary) !important;
    text-align: right;
}

fluent-anchor.detail-anchor::part(control) {
    color: var(--cd-text-secondary);
    min-height: 40px;
    display: inline-flex;
    align-items: center;
}

fluent-anchor.action-pill::part(control) {
    padding: 6px 14px;
    border-radius: 20px;
    border: 1px solid var(--cd-accent);
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    transition: background-color 0.2s ease, color 0.2s ease;
}

fluent-anchor.action-pill:hover::part(control) {
    background-color: var(--cd-accent-subtle);
}

.item-card {
    margin: 0.75em 0;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 12px;
    padding: 1em !important;
    background-color: var(--cd-surface-1);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.6), 0 2px 6px rgba(0, 0, 0, 0.3);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

@media (hover: hover) {
    .item-card:hover {
        transform: translateY(-1px);
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.6), 0 4px 10px rgba(0, 0, 0, 0.3);
    }
}

.item-links {
    margin-top: .5em;
}

.item-card a {
    transition: color 0.2s ease;
    color: var(--cd-accent);
}

.item-card a:hover {
    color: white
}

/* ── Score Panel ── */
.score-panel { width: 100%; }
.score-panel-label {
    font-family: 'Oswald', sans-serif;
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #96C5DA;
    opacity: 0.7;
    text-align: center;
}
.score-panel-primary .score-shape { width: 20px; height: 20px; }
.score-panel-secondary .score-shape { width: 18px; height: 18px; }
.score-panel-compact .score-shape { width: 16px; height: 16px; }
.score-player-section { padding: 6px 0; border-bottom: 1px solid rgba(83,157,194,0.08); }
.score-player-section:last-child { border-bottom: none; }

.score-shape {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.score-shape svg { width: 100%; height: 100%; }
.score-shape-won { color: #2ecc71; }
.score-shape-free { color: #556B2F; opacity: 0.6; }
.score-shape-needs svg { stroke: #808080; fill: none; }

.score-row-sm .score-shape { width: 14px; height: 14px; }
.score-row-sm { opacity: 0.6; }

/* Decade shapes — labeled aggregates (10, 20, 100, etc.) */
.score-decade-shape {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    width: 36px;
    height: 36px;
}
.score-decade-shape svg { width: 100%; height: 100%; }
.score-decade-won { color: #2ecc71; }
.score-decade-needs { color: rgba(128,128,128,0.25); }
.score-decade-needs svg { stroke: #808080; stroke-width: 1; fill: none; }
.score-decade-label {
    position: absolute;
    font-family: 'Oswald', sans-serif;
    font-weight: 700;
    font-size: 0.55rem;
    color: var(--cd-bg, #1a1a2e);
}
.score-decade-needs .score-decade-label { color: #808080; }

/* ── Score Panel — 4-Row Banded Layout ── */
.sp-header {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 4px;
    gap: 10px;
}
.sp-header-name {
    font-family: 'Oswald', sans-serif;
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--cd-text, #e0e0e0);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 35%;
    display: flex;
    flex-direction: column;
}
.sp-header-home { text-align: right; }
.sp-header-away { text-align: left; }
.sp-header-rating {
    font-weight: 400;
    font-size: 0.7rem;
    color: var(--cd-accent, #96C5DA);
}

/* Control bar — accent-tinted band between shape rows */
.sp-control-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--cd-accent-subtle, rgba(83,157,194,0.125));
    border-top: 1px solid rgba(150, 197, 218, 0.12);
    border-bottom: 1px solid rgba(150, 197, 218, 0.12);
    padding: 6px 12px;
    min-height: 48px;
}
.sp-control-label {
    font-family: 'Oswald', sans-serif;
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #96C5DA;
    opacity: 0.6;
}
.sp-control-buttons {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
}
.sp-control-spacer {
    flex: 1;
    min-width: 16px;
}

/* Action pill buttons in control bar */
.sp-action-pill {
    padding: 6px 14px;
    border-radius: 20px;
    border: 1px solid var(--cd-accent, #96C5DA);
    background: transparent;
    color: var(--cd-text, #e0e0e0);
    font-family: 'Oswald', sans-serif;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    min-height: 40px;
    min-width: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
}
.sp-action-pill:hover {
    background-color: rgba(150, 197, 218, 0.15);
}
.sp-action-pill:active {
    background-color: rgba(46, 204, 113, 0.2);
}

/* Signal row */
.sp-signal {
    display: flex;
    justify-content: center;
    padding: 8px 0 4px;
}
.sp-signal-pill {
    padding: 4px 16px;
    border-radius: 16px;
    border: 1px solid;
    background: transparent;
    font-family: 'Oswald', sans-serif;
    font-weight: 600;
    font-size: 0.8rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
}
.sp-signal-pill:disabled {
    cursor: default;
    opacity: 0.7;
}
.sp-signal-match {
    border-color: var(--cd-success, #2ecc71);
    color: var(--cd-success, #2ecc71);
}
.sp-signal-match:hover:not(:disabled) {
    background-color: rgba(46, 204, 113, 0.1);
}
.sp-signal-differ {
    border-color: var(--cd-warning, #f39c12);
    color: var(--cd-warning, #f39c12);
}
.sp-signal-differ:hover:not(:disabled) {
    background-color: rgba(243, 156, 18, 0.1);
}
.sp-signal-pending {
    border-color: #808080;
    color: #808080;
}
.sp-signal-readonly {
    border-color: #808080;
    color: #808080;
}

/* Opponent comparison (expanded view) */
.sp-compare {
    padding: 8px 12px;
    opacity: 0.6;
    text-align: center;
}
.sp-compare .score-row-sm {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
}
.sp-compare-label {
    font-family: 'Oswald', sans-serif;
    font-weight: 600;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #808080;
    text-align: center;
    margin-bottom: 4px;
}

/* Shape rows need padding between the colored bars */
.score-panel [data-testid$="-mine"] {
    padding: 10px 12px;
}

/* Smaller rating stars to fit 10 on phone width */
[data-testid="score-form"] fluent-rating {
    --rating-size: 28px;
}

/* Duel scoring — dimmed rating labels (venue/sponsor/app) */
.score-rating-dim {
    opacity: 0.7;
}

/* ScoreSheet Header */
.sh-card { padding: 12px 16px; }
.sh-collapsed { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.sh-team-row {
    display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%;
}
.sh-team-name {
    font-family: 'Oswald', sans-serif; font-weight: 700; font-size: 1.1rem;
    flex: 1;
}
.sh-team-name:first-child { text-align: right; }
.sh-team-name:last-child { text-align: left; }
.sh-glyph-row { display: flex; justify-content: center; }
.sh-match-score {
    font-family: 'Oswald', sans-serif; font-weight: 400; font-size: 0.9rem;
    color: var(--cd-accent); text-align: center;
}
.sh-context-row {
    display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap;
    font-size: 0.8rem; color: #999;
}
.sh-context-row span { white-space: nowrap; }
.sh-context-row span + span::before { content: '\00B7'; margin-right: 8px; }
.sh-context-row .sh-tally-btn { font-size: 0.75rem; padding: 3px 10px; min-height: 28px; min-width: auto; }
.sh-context-row .sh-tally-btn::before { content: none; }
.sh-expand-chevron {
    background: none; border: none; color: #aaa; cursor: pointer;
    font-size: 0.85rem; padding: 2px 12px; min-height: 40px;
    display: inline-flex; align-items: center; transition: color 0.2s;
}
.sh-expand-chevron:hover { color: var(--cd-accent); }
.sh-detail-grid {
    border-top: 1px solid rgba(255, 255, 255, 0.18);
    padding-top: 10px; margin-top: 6px; width: 100%;
}
.sh-detail-row {
    display: flex; justify-content: space-between; padding: 5px 0;
    font-size: 0.8rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.18);
}
.sh-detail-row:last-child { border-bottom: none; }
.sh-detail-label { color: #999; font-weight: 500; }
.sh-detail-value { color: var(--cd-text, #e0e0e0); text-align: right; }
.tally-counter {
    width: 100%; padding: 8px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}
.tally-row {
    display: flex; align-items: center; gap: 8px; padding: 4px 0;
}
.tally-name {
    flex: 1; font-family: 'Oswald', sans-serif; font-weight: 600;
    font-size: 0.85rem; color: #ccc;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tally-buttons { display: flex; gap: 4px; }
.tally-buttons .sp-action-pill { font-size: 0.75rem; padding: 3px 10px; min-height: 32px; min-width: 36px; }
.tally-buttons .tally-reset { font-size: 0.65rem; }
.tally-count {
    min-width: 28px; text-align: right;
    font-family: 'Oswald', sans-serif; font-weight: 700; font-size: 1rem;
    color: var(--cd-accent);
}

/* Duel scoring — tap target minimum for +/- buttons */
.score-btn {
    min-width: 44px;
    min-height: 44px;
}

/* Heading typography */
fluent-label[typo="subject"],
fluent-label[typo="header"],
fluent-label[typo="hero"] {
    font-family: var(--heading-font);
}

/* Accordion refinements */
fluent-accordion-item::part(heading) {
    background: linear-gradient(to right, var(--cd-accent-subtle), transparent);
    border-bottom: 1px solid rgba(83, 157, 194, 0.25);
    min-height: 36px;
}

fluent-accordion-item::part(button) {
    min-height: 36px;
    margin: 6px 0;
}

fluent-accordion-item[expanded]::part(heading) {
    background: linear-gradient(to right, var(--cd-accent-subtle), transparent);
    border-bottom: 2px solid var(--cd-accent);
}

fluent-number-field::part(control) {
    text-align: right;
}

.custom-upload-zone {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: lightblue;
    color: white;
    cursor: pointer;
    position: relative;
    width: 300px;
    height: 30px;
}

    .custom-upload-zone:hover {
        background-color: lightblue;
    }

    .custom-upload-zone input[type=file] {
        position: absolute;
        width: 100%;
        height: 100%;
        opacity: 0;
        cursor: pointer;
    }

.manage {
    width: 100dvw;
}

footer {
    background: var(--neutral-layer-4);
    color: var(--neutral-foreground-rest);
    align-items: center;
    padding: 10px 10px;
}

    footer a {
        color: var(--neutral-foreground-rest);
        text-decoration: none;
    }

        footer a:focus {
            outline: 1px dashed;
            outline-offset: 3px;
        }

        footer a:hover {
            text-decoration: underline;
        }

.alert {
    border: 1px dashed var(--accent-fill-rest);
    padding: 5px;
}

#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
    margin: 20px 0;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::before {
        content: "An error has occurred. "
    }

.loading-progress {
    position: relative;
    display: block;
    width: 8rem;
    height: 8rem;
    margin: 20vh auto 1rem auto;
}

    .loading-progress circle {
        fill: none;
        stroke: #e0e0e0;
        stroke-width: 0.6rem;
        transform-origin: 50% 50%;
        transform: rotate(-90deg);
    }

        .loading-progress circle:last-child {
            stroke: #1b6ec2;
            stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
            transition: stroke-dasharray 0.05s ease-in-out;
        }

.loading-progress-text {
    position: absolute;
    text-align: center;
    font-weight: bold;
    inset: calc(20vh + 3.25rem) 0 auto 0.2rem;
}

    .loading-progress-text:after {
        content: var(--blazor-load-percentage-text, "Loading");
    }

code {
    color: #c02d76;
}

/* Landing page hero */
.landing-hero {
    text-align: center;
    padding: 2.5em 1em 1.5em;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5em;
}

.landing-headline {
    font-family: var(--heading-font);
    font-size: 2.2rem;
    font-weight: 700;
    margin: 0;
    color: var(--cd-text-primary);
    letter-spacing: -0.02em;
    outline: none;
}

.landing-tagline {
    font-size: 1.05rem;
    color: var(--cd-text-secondary);
    margin: 0 0 0.75em;
}

.landing-cta-link {
    text-decoration: none;
}

/* Duel icon transition — split apart and crossfade */
.duel-icon-stage {
    position: relative;
    width: 64px;
    height: 64px;
    cursor: pointer;
}

.duel-split {
    position: absolute;
    inset: 0;
    overflow: hidden;
    transition: transform 0.6s ease-in-out, opacity 0.6s ease-in-out, filter 0.6s ease-in-out;
}

.duel-split-left {
    clip-path: inset(0 50% 0 0);
}

.duel-split-right {
    clip-path: inset(0 0 0 50%);
}

.duel-target {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: scale(0.85);
    transition: opacity 0.5s ease-in-out 0.15s, transform 0.5s ease-in-out 0.15s;
}

/* Triggered state — halves split, target fades in */
.duel-apart .duel-split-left {
    transform: translateX(-14px);
    opacity: 0;
    filter: blur(3px);
}

.duel-apart .duel-split-right {
    transform: translateX(14px);
    opacity: 0;
    filter: blur(3px);
}

.duel-apart .duel-target {
    opacity: 1;
    transform: scale(1);
}

/* Feature cards — match internal card design */
.feature-card {
    background: var(--cd-surface-1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1.25em 1em;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 6px;
    min-height: 120px;
    justify-content: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.6), 0 2px 6px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
}

@media (hover: hover) {
    .feature-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    }
}

.feature-card:active {
    transform: translateY(0);
}

.feature-detail {
    margin-top: 6px;
    padding-top: 8px;
    border-top: 1px solid var(--cd-border);
}

.feature-more {
    color: var(--cd-accent);
    cursor: pointer;
    font-size: 0.85rem;
    padding: 4px 8px;
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    transition: opacity 0.2s ease;
}

.feature-more:hover {
    opacity: 0.8;
    text-decoration: underline;
}

/* Bottom navigation bar — visible on mobile/tablet */
.bottom-nav {
    display: none;
}

@media (max-width: 1024px) {
    .header-gutters {
        margin: 0.5rem 3rem 0.5rem 1.5rem !important;
    }

    [dir="rtl"] .header-gutters {
        margin: 0.5rem 1.5rem 0.5rem 3rem !important;
    }

    .main {
        flex-direction: column !important;
        row-gap: 0 !important;
    }

    nav.sitenav {
        position: fixed;
        top: 0;
        left: 0;
        width: 280px;
        height: 100dvh;
        z-index: 200;
        background: var(--cd-surface-0);
        transform: translateX(-100%);
        transition: transform 0.25s ease;
        overflow-y: auto;
    }

    [dir="rtl"] nav.sitenav {
        left: unset;
        right: 0;
        transform: translateX(100%);
    }

    #main-menu {
        width: 100% !important;
    }

        #main-menu > div:first-child:is(.expander) {
            display: none;
        }

    .navmenu {
        width: 100%;
    }

    /* Nav overlay backdrop */
    .nav-backdrop {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 150;
    }

    #navmenu-toggle {
        appearance: none;
        position: absolute;
        opacity: 0;
        pointer-events: none;
    }

        #navmenu-toggle:checked ~ .nav-backdrop {
            display: block;
        }

        #navmenu-toggle:checked ~ nav {
            transform: translateX(0);
        }

    .navmenu-icon {
        cursor: pointer;
        z-index: 10;
        display: block;
        position: absolute;
        top: 15px;
        left: unset;
        right: 20px;
        width: 20px;
        height: 20px;
        border: none;
    }

    [dir="rtl"] .navmenu-icon {
        left: 20px;
        right: unset;
    }

    /* Bottom navigation bar */
    .bottom-nav {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        height: 60px;
        background: var(--cd-surface-0);
        border-top: 1px solid var(--cd-border);
        z-index: 100;
        justify-content: space-around;
        align-items: center;
        padding-bottom: env(safe-area-inset-bottom);
    }

    .bottom-nav a,
    .bottom-nav label {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 2px;
        color: var(--cd-text-secondary);
        text-decoration: none;
        font-size: 11px;
        padding: 6px 4px;
        min-width: 0;
        flex: 1;
        cursor: pointer;
        transition: color 0.2s ease;
    }

    .bottom-nav a:hover,
    .bottom-nav label:hover,
    .bottom-nav a.active {
        color: var(--cd-accent);
    }

    /* Offset body content for bottom nav (60px nav + safe-area) */
    .body-content {
        overflow-y: auto;
    }

    .content {
        padding-bottom: 70px;
    }
}

/* Visual Preferences — chip components */
.pref-chip {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 14px;
    font-size: 0.8rem;
    font-weight: 600;
    font-family: var(--body-font);
    cursor: pointer;
    border: 1.5px solid;
    transition: opacity 0.15s ease, background 0.15s ease;
    user-select: none;
    white-space: nowrap;
}

.pref-chip-active {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

.pref-chip-inactive {
    opacity: 0.45;
    background: transparent !important;
}

.pref-chip-inactive:hover {
    opacity: 0.7;
}

.pref-chip-sm {
    padding: 2px 8px;
    font-size: 0.75rem;
    cursor: default;
}

.pref-chip-glyph {
    display: inline-block;
    vertical-align: middle;
}

.pref-chip-glyph-sm {
    display: inline-block;
    vertical-align: middle;
}

.pref-group {
    margin-bottom: 0.6em;
}

.pref-group-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.pref-group-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--cd-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.fluent-input-label {
    display: block;
    font-size: var(--type-ramp-base-font-size);
    color: var(--neutral-foreground-rest);
    cursor: default;
    padding: 4px 0 2px;
}

.pref-group-actions {
    display: flex;
    gap: 8px;
}

.pref-action {
    font-size: 0.72rem;
    color: var(--cd-accent);
    cursor: pointer;
    text-decoration: none;
}

.pref-action:hover {
    text-decoration: underline;
}

.pref-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

/* Hiding footer card */
.hiding-card {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    margin: 0.75em 0;
    border: 1px dashed rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    cursor: pointer;
    transition: border-color 0.2s ease;
}

.hiding-card:hover {
    border-color: var(--cd-accent);
}

.hiding-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--cd-text-secondary);
    margin-right: 4px;
}

/* Hints signal card */
.hints-card {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    margin: 0.75em 0;
    border: 1px dashed rgba(255, 255, 255, 0.15);
    border-radius: 10px;
}

.hints-chip {
    padding: 2px 8px;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 999px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.hints-chip:hover {
    opacity: 0.85;
}

/* Preferences signal card — compact, dimmed chips showing active hiding preferences */
.prefs-signal-card {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    margin: 0.75em 0;
    border: 1px dashed rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    cursor: pointer;
    transition: border-color 0.2s ease;
    opacity: 0.65;
}

.prefs-signal-card:hover {
    border-color: var(--cd-accent);
    opacity: 0.85;
}

.prefs-signal-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--cd-text-secondary);
    margin-right: 4px;
}

/* Hint pill inside HintCard */
.hint-pill-wrapper {
    text-align: center;
    margin-top: 0.5em;
}

/* ═══════════════════════════════════════
   Identity Pages
   ═══════════════════════════════════════ */

.identity-card {
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 2em 1.5em;
    background-color: var(--cd-surface-1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.6), 0 4px 16px rgba(0, 0, 0, 0.3);
}

.identity-card h2,
.identity-card h3 {
    font-family: "Barlow Semi Condensed", "Segoe UI Variable", "Segoe UI", sans-serif;
    color: var(--cd-accent);
    margin: 0 0 0.5em 0;
    font-weight: 600;
}

.identity-card h2 {
    font-size: 1.5rem;
    text-align: center;
}

.identity-card h3 {
    font-size: 1.1rem;
}

.identity-card hr {
    border: none;
    border-top: 1px solid var(--cd-border);
    margin: 1em 0;
}

.identity-card .text-danger {
    color: #e74c3c;
    font-size: 0.85rem;
}

.identity-card a {
    color: var(--cd-accent);
    transition: color 0.2s ease;
}

.identity-card a:hover {
    color: white;
}

.identity-links {
    margin-top: 1.25em;
    padding-top: 1em;
    border-top: 1px solid var(--cd-border);
}

.identity-links p {
    margin: 0.4em 0;
}

.identity-manage-card {
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1.5em;
    background-color: var(--cd-surface-1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.6), 0 4px 16px rgba(0, 0, 0, 0.3);
}

.identity-manage-card h3 {
    font-family: "Barlow Semi Condensed", "Segoe UI Variable", "Segoe UI", sans-serif;
    color: var(--cd-accent);
    font-weight: 600;
    margin: 0 0 0.75em 0;
}

.identity-manage-card a {
    color: var(--cd-accent);
    transition: color 0.2s ease;
}

.identity-manage-card a:hover {
    color: white;
}

.identity-back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 1em;
    font-size: 0.9rem;
}

.identity-manage-card .fluent-nav-menu {
    width: 100%;
}

.identity-manage-card .fluent-nav-link {
    white-space: nowrap;
}

/* Responsive */
@media (max-width: 480px) {
    .identity-card {
        padding: 1.5em 1em;
    }
    .identity-manage-card {
        padding: 1em;
    }
}

/* === GLYPH SYSTEM v2 — LOCKED === */

@font-face {
    font-family: 'Oswald';
    src: url('fonts/Oswald-Bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: block;
}

.glyph {
    --g-unit: 40px;
    --g-accent: #96C5DA;
    --g-shadow: 0 1px 3px rgba(0,0,0,0.25);
    font-family: 'Oswald', sans-serif;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    line-height: 1;
}

.glyph-ball {
    width: var(--g-unit);
    height: var(--g-unit);
    border-radius: 50%;
    box-shadow: var(--g-shadow);
    font-size: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.glyph-ball.tc { font-size: 15px; letter-spacing: -0.5px; }

.glyph-bar {
    position: relative;
    width: 80px;
    height: var(--g-unit);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.glyph-bar-rect {
    position: absolute;
    inset: 10px 0;
    border-radius: 4px;
    background: #2c3e50;
    box-shadow: none;
}
.glyph-bar > .glyph-ball {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1;
}
.glyph-bar-badge {
    position: absolute;
    top: 50%; transform: translateY(-50%);
    width: 16px; height: 16px; z-index: 1;
    display: flex; align-items: center; justify-content: center;
    font-size: 8px; font-weight: 700; color: #fff;
    background: rgba(0,0,0,0.5); border-radius: 3px;
}
.glyph-bar-badge.left { left: 2px; }
.glyph-bar-badge.right { right: 2px; }
.glyph-bar-star {    position: absolute;    display: flex;    align-items: center;    justify-content: center;    width: 20px;    height: 20px;    top: 50%;    transform: translateY(-50%);    z-index: 1;}.glyph-bar-star.left { left: 0px; }.glyph-bar-star.right { right: 0px; }.glyph-bar-star svg { display: block; }
/* Hero bar: 2x scale for scoring page focal point */
.glyph-bar.glyph-bar-hero {
    width: 160px;
    height: 80px;
}
.glyph-bar-hero .glyph-bar-rect {
    inset: 20px 0;
}
.glyph-bar-hero > .glyph-ball {
    width: 80px;
    height: 80px;
    font-size: 2.4rem;
}
.glyph-bar-hero .glyph-ball.tc { font-size: 1.8rem; }
.glyph-bar-hero .glyph-bar-star {
    width: 40px;
    height: 40px;
}
.glyph-bar-hero .glyph-bar-badge {
    width: 32px;
    height: 32px;
    font-size: 16px;
    border-radius: 6px;
}
.glyph-bar-hero .glyph-bar-badge.left { left: 4px; }
.glyph-bar-hero .glyph-bar-badge.right { right: 4px; }
.glyph-bar-hero .glyph-bar-star.left { left: 0px; }
.glyph-bar-hero .glyph-bar-star.right { right: 0px; }
/* Won state pulse animation */
.glyph-bar-star-won svg {
    animation: star-pulse 1.2s ease-in-out infinite;
}
@keyframes star-pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.15); opacity: 0.85; }
}

.glyph-icon {
    width: var(--g-unit);
    height: var(--g-unit);
    border-radius: 6px;
    box-shadow: var(--g-shadow);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.glyph-icon svg { width: 24px; height: 24px; fill: currentColor; }

.accordion-chevron {
    width: 18px; height: 18px;
    margin-left: auto; opacity: 0.4;
    transition: transform 0.2s ease;
}
.accordion-chevron.expanded { transform: rotate(90deg); }
