@font-face {
    font-family: 'Newsreader';
    src: url('../../assets/fonts/newsreader-latin.woff2') format('woff2');
    font-display: swap;
}

@font-face {
    font-family: 'Manrope';
    src: url('../../assets/fonts/manrope-latin.woff2') format('woff2');
    font-display: swap;
}

:root {
    --command-navy: #17324a;
    --command-rust: #9f4d31;
    --command-gold: #b8893f;
    --command-green: #236246;
    --command-red: #a43d36;
    --command-ink: #20201d;
    --command-muted: #68665f;
    --command-paper: #f5f2ea;
    --command-card: #fffdf8;
    --command-line: #d8d4ca;
    --command-soft: #ece9e1;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body.command-page {
    min-width: 320px;
    margin: 0;
    color: var(--command-ink);
    background:
        radial-gradient(circle at 5% 0, rgba(159, 77, 49, 0.08), transparent 28rem),
        radial-gradient(circle at 94% 14%, rgba(23, 50, 74, 0.08), transparent 34rem),
        var(--command-paper);
    font-family: 'Manrope', sans-serif;
}

body.command-page [hidden] {
    display: none !important;
}

.command-page button,
.command-page input,
.command-page select {
    font: inherit;
}

.command-page button,
.command-page label[for] {
    cursor: pointer;
}

.command-page button:disabled {
    cursor: not-allowed;
    opacity: 0.48;
}

.command-skip-link {
    position: fixed;
    top: 0.75rem;
    left: 0.75rem;
    z-index: 3000;
    padding: 0.7rem 0.9rem;
    color: #fff;
    border-radius: 8px;
    background: var(--command-navy);
    transform: translateY(-160%);
}

.command-skip-link:focus {
    transform: translateY(0);
}

.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.command-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(216, 212, 202, 0.9);
    background: rgba(245, 242, 234, 0.94);
    backdrop-filter: blur(18px);
}

.command-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: min(1240px, calc(100% - 2rem));
    min-height: 70px;
    margin: auto;
    gap: 1.5rem;
}

.command-brand {
    display: flex;
    align-items: center;
    flex: 0 0 auto;
    gap: 0.7rem;
    color: var(--command-ink);
    text-decoration: none;
}

.command-brand img {
    width: 44px;
    height: 44px;
    object-fit: contain;
    border: 1px solid var(--command-line);
    border-radius: 11px;
    background: var(--command-card);
}

.command-brand span {
    display: grid;
    gap: 0.08rem;
}

.command-brand strong {
    font-family: 'Newsreader', Georgia, serif;
    font-size: 1.08rem;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
}

.command-brand em {
    color: var(--command-rust);
    font-style: normal;
}

.command-brand small {
    color: var(--command-muted);
    font-size: 0.59rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.command-nav {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.15rem;
    overflow-x: auto;
    scrollbar-width: none;
}

.command-nav::-webkit-scrollbar {
    display: none;
}

.command-nav a {
    min-height: 38px;
    padding: 0.58rem 0.72rem;
    color: var(--command-muted);
    border-radius: 8px;
    font-size: 0.7rem;
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
}

.command-nav a:hover,
.command-nav a:focus-visible {
    color: var(--command-ink);
    background: rgba(32, 32, 29, 0.055);
}

.command-nav a[aria-current='page'] {
    color: #fff;
    background: var(--command-navy);
}

.command-shell {
    width: min(1240px, calc(100% - 2rem));
    margin: auto;
    padding: 2.5rem 0 4rem;
}

.command-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 2rem;
    padding: 0.5rem 0 2rem;
}

.command-eyebrow,
.panel-kicker {
    margin: 0 0 0.35rem;
    color: var(--command-rust);
    font-size: 0.64rem;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.command-hero h1 {
    max-width: 780px;
    margin: 0;
    font-family: 'Newsreader', Georgia, serif;
    font-size: clamp(2.7rem, 7vw, 5.7rem);
    font-weight: 500;
    letter-spacing: -0.06em;
    line-height: 0.87;
}

.command-hero > div > p:last-child {
    max-width: 660px;
    margin: 1rem 0 0;
    color: var(--command-muted);
    font-size: 0.9rem;
    line-height: 1.6;
}

.model-status {
    display: flex;
    align-items: center;
    min-width: 210px;
    gap: 0.75rem;
    padding: 1rem 1.1rem;
    border: 1px solid var(--command-line);
    border-radius: 13px;
    background: rgba(255, 253, 248, 0.9);
}

.model-status__dot {
    width: 9px;
    height: 9px;
    flex: 0 0 auto;
    border-radius: 50%;
    background: var(--command-gold);
    box-shadow: 0 0 0 5px rgba(184, 137, 63, 0.14);
}

.model-status[data-state='ready'] .model-status__dot {
    background: var(--command-green);
    box-shadow: 0 0 0 5px rgba(35, 98, 70, 0.14);
}

.model-status[data-state='error'] .model-status__dot {
    background: var(--command-red);
}

.model-status span:last-child {
    display: grid;
    gap: 0.15rem;
}

.model-status small {
    color: var(--command-muted);
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.model-status strong {
    font-size: 0.8rem;
}

.command-kpis {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-bottom: 1rem;
    overflow: hidden;
    border: 1px solid var(--command-line);
    border-radius: 14px;
    background: var(--command-card);
}

.movement-primer {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin: 0 0 1rem;
    overflow: hidden;
    border: 1px solid var(--command-line);
    border-radius: 12px;
    background: var(--command-card);
}

.movement-primer article {
    display: grid;
    gap: 0.18rem;
    min-height: 92px;
    padding: 0.95rem 1rem;
    border-right: 1px solid var(--command-line);
}

.movement-primer article:last-child {
    border-right: 0;
}

.movement-primer span {
    color: var(--command-rust);
    font-size: 0.58rem;
    font-weight: 900;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.movement-primer strong {
    font-size: 0.76rem;
}

.movement-primer small {
    color: var(--command-muted);
    font-size: 0.61rem;
    line-height: 1.45;
}

.movement-primer__accent {
    color: #fff;
    background: var(--command-navy);
}

.movement-primer__accent span,
.movement-primer__accent strong,
.movement-primer__accent small {
    color: inherit;
}

.rank-readout {
    display: grid;
    grid-template-columns: minmax(220px, 0.7fr) minmax(0, 2.3fr);
    gap: 1rem;
    margin-bottom: 1rem;
    padding: 1.2rem;
    color: #fff;
    border-radius: 14px;
    background: var(--command-navy);
}

.rank-readout__heading h2 {
    margin: 0;
    font-family: 'Newsreader', Georgia, serif;
    font-size: 1.55rem;
    font-weight: 600;
    letter-spacing: -0.035em;
}

.rank-readout__heading > p:last-child {
    margin: 0.55rem 0 0;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.61rem;
    line-height: 1.5;
}

.rank-readout .panel-kicker {
    color: #ddb96f;
}

.rank-readout__grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 10px;
}

.rank-readout__grid article {
    display: grid;
    align-content: center;
    gap: 0.22rem;
    min-height: 100px;
    padding: 0.8rem;
    border-right: 1px solid rgba(255, 255, 255, 0.14);
}

.rank-readout__grid article:last-child {
    border-right: 0;
}

.rank-readout__grid span {
    color: #ddb96f;
    font-size: 0.56rem;
    font-weight: 900;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.rank-readout__grid strong {
    font-family: 'Newsreader', Georgia, serif;
    font-size: 1.55rem;
    font-weight: 600;
}

.rank-readout__grid small {
    color: rgba(255, 255, 255, 0.68);
    font-size: 0.55rem;
    line-height: 1.45;
}

.command-kpis article {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: baseline;
    min-height: 96px;
    padding: 1.15rem;
    border-right: 1px solid var(--command-line);
}

.command-kpis article:last-child {
    border-right: 0;
}

.command-kpis span {
    color: var(--command-muted);
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.command-kpis strong {
    font-family: 'Newsreader', Georgia, serif;
    font-size: 2rem;
    font-weight: 600;
    letter-spacing: -0.04em;
}

.command-kpis small {
    grid-column: 1 / -1;
    color: var(--command-muted);
    font-size: 0.67rem;
}

.command-kpi--accent {
    color: #fff;
    background: var(--command-navy);
}

.command-kpi--accent span,
.command-kpi--accent small {
    color: rgba(255, 255, 255, 0.72);
}

.command-kpi--accent strong {
    font-family: 'Manrope', sans-serif;
    font-size: 1rem;
    letter-spacing: 0;
}

.command-grid {
    display: grid;
    gap: 1rem;
}

.command-grid--setup {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    margin-bottom: 1rem;
}

.command-grid--intelligence {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-bottom: 1rem;
}

.command-panel {
    margin-bottom: 1rem;
    padding: 1.35rem;
    border: 1px solid var(--command-line);
    border-radius: 14px;
    background: rgba(255, 253, 248, 0.94);
    box-shadow: 0 8px 24px rgba(32, 32, 29, 0.04);
}

.command-grid .command-panel {
    margin-bottom: 0;
}

.panel-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.panel-heading h2,
.game-dialog h2 {
    margin: 0;
    font-family: 'Newsreader', Georgia, serif;
    font-size: 1.65rem;
    font-weight: 600;
    letter-spacing: -0.035em;
    line-height: 1;
}

.panel-heading--results {
    align-items: center;
}

.text-button {
    padding: 0.2rem;
    color: var(--command-rust);
    border: 0;
    background: transparent;
    font-size: 0.7rem;
    font-weight: 850;
    text-decoration: underline;
    text-underline-offset: 0.2rem;
}

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

.settings-grid__wide {
    grid-column: 1 / -1;
}

.command-page label {
    display: grid;
    gap: 0.38rem;
}

.command-page label > span {
    color: var(--command-muted);
    font-size: 0.66rem;
    font-weight: 800;
}

.command-page input,
.command-page select {
    width: 100%;
    min-height: 44px;
    padding: 0.68rem 0.75rem;
    color: var(--command-ink);
    border: 1px solid #bbb5a9;
    border-radius: 8px;
    background: #fff;
    font-size: 0.78rem;
}

.command-page input:focus,
.command-page select:focus,
.command-page button:focus-visible,
.command-page a:focus-visible,
.command-page label[for]:focus-visible {
    outline: 3px solid rgba(184, 137, 63, 0.36);
    outline-offset: 2px;
}

.strategy-copy,
.data-note,
.panel-note {
    margin: 0.85rem 0 0;
    color: var(--command-muted);
    font-size: 0.69rem;
    line-height: 1.55;
}

.data-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
}

.result-actions {
    display: flex;
    gap: 0.5rem;
}

.command-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0.68rem 0.95rem;
    border: 1px solid transparent;
    border-radius: 8px;
    font-size: 0.7rem;
    font-weight: 850;
    line-height: 1;
}

.command-button--primary {
    color: #fff;
    background: var(--command-navy);
}

.command-button--secondary {
    color: var(--command-navy);
    border-color: #b7c0c7;
    background: #edf0f1;
}

.command-button--quiet {
    color: var(--command-ink);
    border-color: var(--command-line);
    background: var(--command-soft);
}

.command-button--danger {
    margin-right: auto;
    color: var(--command-red);
    border-color: rgba(164, 61, 54, 0.25);
    background: #f8ece8;
}

.source-badge,
.model-version {
    padding: 0.35rem 0.5rem;
    color: var(--command-muted);
    border: 1px solid var(--command-line);
    border-radius: 999px;
    background: var(--command-soft);
    font-size: 0.58rem;
    font-weight: 900;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    white-space: nowrap;
}

.simulation-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-bottom: 1rem;
    overflow: hidden;
    border: 1px solid var(--command-line);
    border-radius: 10px;
}

.simulation-strip article {
    display: grid;
    gap: 0.2rem;
    padding: 0.9rem;
    border-right: 1px solid var(--command-line);
}

.simulation-strip article:last-child {
    border: 0;
}

.simulation-strip span,
.simulation-strip small {
    color: var(--command-muted);
    font-size: 0.6rem;
    font-weight: 750;
}

.simulation-strip strong {
    color: var(--command-navy);
    font-family: 'Newsreader', Georgia, serif;
    font-size: 1.65rem;
    line-height: 1;
}

.empty-state {
    display: grid;
    place-items: center;
    min-height: 180px;
    gap: 0.25rem;
    color: var(--command-muted);
    border: 1px dashed #bbb5a9;
    border-radius: 10px;
    text-align: center;
}

.empty-state strong {
    color: var(--command-ink);
    font-family: 'Newsreader', Georgia, serif;
    font-size: 1.3rem;
}

.empty-state span {
    font-size: 0.72rem;
}

.recommendation-list {
    display: grid;
    gap: 0.45rem;
}

.recommendation-row {
    display: grid;
    grid-template-columns: 42px minmax(180px, 1.3fr) repeat(4, minmax(80px, 0.55fr)) minmax(160px, 1fr);
    align-items: center;
    gap: 0.7rem;
    min-height: 66px;
    padding: 0.65rem 0.75rem;
    border: 1px solid var(--command-line);
    border-radius: 9px;
    background: #fff;
}

.recommendation-row__rank {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    color: #fff;
    border-radius: 8px;
    background: var(--command-navy);
    font-size: 0.7rem;
    font-weight: 900;
}

.recommendation-row__team {
    min-width: 0;
}

.recommendation-row__team strong {
    display: block;
    overflow: hidden;
    font-size: 0.83rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.recommendation-row__team small,
.recommendation-metric span,
.recommendation-reason span {
    color: var(--command-muted);
    font-size: 0.57rem;
}

.recommendation-metric {
    display: grid;
    gap: 0.1rem;
}

.recommendation-metric strong {
    font-size: 0.75rem;
}

.recommendation-metric[data-movement='positive'] strong,
.slate-team[data-movement='positive'] .slate-team__movement strong {
    color: var(--command-green);
}

.recommendation-metric[data-movement='negative'] strong,
.slate-team[data-movement='negative'] .slate-team__movement strong {
    color: var(--command-red);
}

.recommendation-metric--probability strong {
    color: var(--command-navy);
    font-family: 'Newsreader', Georgia, serif;
    font-size: 1rem;
}

.recommendation-reason {
    min-width: 0;
    overflow: hidden;
    color: var(--command-muted);
    font-size: 0.61rem;
    line-height: 1.4;
    text-overflow: ellipsis;
}

.legend {
    display: flex;
    gap: 0.8rem;
    color: var(--command-muted);
    font-size: 0.61rem;
    font-weight: 800;
}

.legend span {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.legend i {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.legend__cover {
    background: var(--command-green);
}

.legend__ownership {
    background: var(--command-gold);
}

.slate-panel__note {
    margin: -0.45rem 0 1rem;
    color: var(--command-muted);
    font-size: 0.63rem;
    line-height: 1.5;
}

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

.slate-game {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--command-line);
    border-radius: 10px;
    background: #fff;
}

.slate-game__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 34px;
    padding: 0.4rem 0.65rem;
    color: var(--command-muted);
    border-bottom: 1px solid var(--command-line);
    background: #f6f4ee;
    font-size: 0.58rem;
    font-weight: 800;
}

.slate-game__top button {
    min-width: 44px;
    min-height: 32px;
    padding: 0.35rem 0.45rem;
    color: var(--command-rust);
    border: 0;
    background: transparent;
    font-size: 0.6rem;
    font-weight: 900;
}

.slate-game__picks-ats {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.7rem;
    padding: 0.55rem 0.65rem;
    color: #3c2d13;
    border-bottom: 1px solid #e7d8b9;
    background: #f8eed9;
}

.slate-game__picks-ats span {
    flex: 0 0 auto;
    color: #805b1f;
    font-size: 0.54rem;
    font-weight: 950;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.slate-game__picks-ats strong {
    font-size: 0.61rem;
    line-height: 1.4;
    text-align: right;
}

.slate-game__picks-ats i {
    padding: 0 0.15rem;
    color: #a98343;
    font-style: normal;
}

.slate-team {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 58px 58px 58px;
    align-items: center;
    gap: 0.6rem;
    min-height: 62px;
    padding: 0.55rem 0.65rem;
    border-bottom: 1px solid #eeeae1;
}

.slate-team:last-child {
    border: 0;
}

.slate-team[data-best='true'] {
    background: rgba(35, 98, 70, 0.045);
}

.slate-team[data-movement='positive'] {
    box-shadow: inset 3px 0 var(--command-green);
}

.slate-team__identity {
    min-width: 0;
}

.slate-team__identity strong {
    display: block;
    overflow: hidden;
    font-size: 0.75rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.slate-team__identity span {
    display: block;
    margin-top: 0.1rem;
    color: var(--command-muted);
    font-size: 0.56rem;
}

.probability-track {
    position: relative;
    width: min(150px, 100%);
    height: 4px;
    margin-top: 0.38rem !important;
    overflow: hidden;
    border-radius: 999px;
    background: #e5e1d7;
}

.probability-track i {
    display: block;
    width: var(--pool-probability);
    height: 100%;
    border-radius: inherit;
    background: var(--command-navy);
}

.slate-team__metric {
    display: grid;
    gap: 0.1rem;
    text-align: right;
}

.slate-team__metric strong {
    font-size: 0.7rem;
}

.slate-team__field strong {
    color: #805b1f;
}

.slate-team__metric span {
    color: var(--command-muted);
    font-size: 0.52rem;
    font-weight: 750;
    text-transform: uppercase;
}

.signal-list,
.profile-list,
.evidence-list {
    display: grid;
    gap: 0.42rem;
}

.signal-item,
.profile-item,
.evidence-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.7rem;
    min-height: 47px;
    padding: 0.55rem 0.65rem;
    border: 1px solid var(--command-line);
    border-radius: 8px;
    background: #fff;
}

.signal-item strong,
.profile-item strong,
.evidence-item strong {
    display: block;
    font-size: 0.67rem;
}

.signal-item span,
.profile-item span,
.evidence-item span,
.evidence-item small {
    color: var(--command-muted);
    font-size: 0.56rem;
}

.signal-item__effect {
    color: var(--command-rust) !important;
    font-size: 0.72rem !important;
    font-weight: 900;
}

.profile-metrics {
    display: flex;
    gap: 0.65rem;
    text-align: right;
}

.profile-metrics span {
    display: grid;
}

.profile-metrics b {
    color: var(--command-ink);
    font-size: 0.65rem;
}

.empty-inline {
    padding: 1.2rem;
    color: var(--command-muted);
    border: 1px dashed var(--command-line);
    border-radius: 8px;
    font-size: 0.66rem;
    text-align: center;
}

.evidence-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.8rem;
}

.evidence-grid h3 {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    margin: 0 0 0.6rem;
    font-size: 0.7rem;
    text-transform: uppercase;
}

.evidence-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.evidence-dot--green {
    background: var(--command-green);
}

.evidence-dot--gold {
    background: var(--command-gold);
}

.evidence-dot--red {
    background: var(--command-red);
}

.evidence-item {
    align-items: start;
}

.evidence-item__value {
    color: var(--command-navy) !important;
    font-size: 0.66rem !important;
    font-weight: 900;
    white-space: nowrap;
}

.game-dialog {
    width: min(900px, calc(100% - 2rem));
    max-height: calc(100vh - 2rem);
    padding: 0;
    overflow: auto;
    color: var(--command-ink);
    border: 1px solid var(--command-line);
    border-radius: 14px;
    background: var(--command-card);
    box-shadow: 0 24px 80px rgba(20, 28, 34, 0.28);
}

.game-dialog::backdrop {
    background: rgba(20, 28, 34, 0.56);
    backdrop-filter: blur(4px);
}

.game-dialog form {
    padding: 1.35rem;
}

.dialog-heading,
.dialog-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.dialog-close {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    color: var(--command-muted);
    border: 1px solid var(--command-line);
    border-radius: 50%;
    background: var(--command-soft);
    font-weight: 900;
}

.dialog-game-settings {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.7rem;
    margin: 1rem 0;
}

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

.dialog-teams fieldset {
    min-width: 0;
    margin: 0;
    padding: 0.9rem;
    border: 1px solid var(--command-line);
    border-radius: 10px;
}

.dialog-teams legend {
    padding: 0 0.35rem;
    font-family: 'Newsreader', Georgia, serif;
    font-size: 1.05rem;
    font-weight: 600;
}

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

.team-form-grid .field-wide {
    grid-column: 1 / -1;
}

.checkbox-field {
    display: flex !important;
    align-items: center;
    gap: 0.5rem;
    min-height: 38px;
}

.checkbox-field input {
    width: 18px;
    min-height: 18px;
}

.dialog-actions {
    margin-top: 1rem;
}

.command-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 82px;
    color: var(--command-muted);
    border-top: 1px solid var(--command-line);
    font-size: 0.65rem;
    font-weight: 800;
}

.command-footer img {
    width: 30px;
    height: 30px;
}

@media (max-width: 980px) {
    .rank-readout {
        grid-template-columns: 1fr;
    }

    .rank-readout__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .rank-readout__grid article:nth-child(2) {
        border-right: 0;
    }

    .rank-readout__grid article:nth-child(-n+2) {
        border-bottom: 1px solid rgba(255, 255, 255, 0.14);
    }

    .movement-primer {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .movement-primer article:nth-child(2) {
        border-right: 0;
    }

    .movement-primer article:nth-child(-n+2) {
        border-bottom: 1px solid var(--command-line);
    }
    .command-kpis {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .command-kpis article:nth-child(2) {
        border-right: 0;
    }

    .command-kpis article:nth-child(-n+2) {
        border-bottom: 1px solid var(--command-line);
    }

    .command-grid--setup,
    .command-grid--intelligence,
    .evidence-grid {
        grid-template-columns: 1fr;
    }

    .recommendation-row {
        grid-template-columns: 36px minmax(160px, 1fr) repeat(4, minmax(68px, 0.45fr));
    }

    .recommendation-reason {
        grid-column: 2 / -1;
    }
}

@media (max-width: 720px) {
    .command-header__inner {
        display: block;
        width: 100%;
        padding: 0.65rem 1rem 0;
    }

    .command-brand {
        justify-content: center;
    }

    .command-nav {
        justify-content: flex-start;
        margin-top: 0.55rem;
        padding-bottom: 0.55rem;
    }

    .command-shell {
        width: min(100% - 1rem, 1240px);
        padding-top: 1.25rem;
    }

    .command-hero {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .command-hero h1 {
        font-size: clamp(2.65rem, 15vw, 4.6rem);
    }

    .model-status {
        min-width: 0;
    }

    .simulation-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .simulation-strip article:nth-child(2) {
        border-right: 0;
    }

    .simulation-strip article:nth-child(-n+2) {
        border-bottom: 1px solid var(--command-line);
    }

    .slate-board,
    .dialog-teams {
        grid-template-columns: 1fr;
    }

    .recommendation-row {
        grid-template-columns: 34px minmax(0, 1fr) 68px 68px;
        gap: 0.5rem;
    }

    .recommendation-row .recommendation-metric:nth-of-type(3),
    .recommendation-row .recommendation-metric:nth-of-type(4) {
        grid-row: 2;
    }

    .recommendation-reason {
        grid-column: 2 / -1;
    }
}

@media (max-width: 480px) {
    .command-shell {
        width: calc(100% - 0.75rem);
    }

    .command-panel {
        padding: 1rem;
        border-radius: 11px;
    }

    .command-kpis article {
        min-height: 82px;
        padding: 0.85rem;
    }

    .command-kpis strong {
        font-size: 1.55rem;
    }

    .movement-primer {
        grid-template-columns: 1fr;
    }

    .movement-primer article,
    .movement-primer article:nth-child(2) {
        min-height: 0;
        border-right: 0;
        border-bottom: 1px solid var(--command-line);
    }

    .movement-primer article:last-child {
        border-bottom: 0;
    }

    .rank-readout {
        padding: 1rem;
    }

    .rank-readout__grid {
        grid-template-columns: 1fr;
    }

    .rank-readout__grid article,
    .rank-readout__grid article:nth-child(2) {
        min-height: 0;
        border-right: 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.14);
    }

    .rank-readout__grid article:last-child {
        border-bottom: 0;
    }

    .slate-game__picks-ats {
        display: grid;
    }

    .slate-game__picks-ats strong {
        text-align: left;
    }

    .data-actions .command-button {
        flex: 1 1 calc(50% - 0.4rem);
    }

    .slate-team {
        grid-template-columns: minmax(0, 1fr) 50px 50px 50px;
        gap: 0.35rem;
        padding-inline: 0.5rem;
    }

    .recommendation-row {
        grid-template-columns: 32px minmax(0, 1fr) 62px;
    }

    .recommendation-row .recommendation-metric:nth-of-type(2),
    .recommendation-row .recommendation-metric:nth-of-type(3),
    .recommendation-row .recommendation-metric:nth-of-type(4) {
        grid-row: auto;
        grid-column: 2 / -1;
        display: flex;
        justify-content: space-between;
    }

    .dialog-game-settings,
    .team-form-grid {
        grid-template-columns: 1fr;
    }

    .team-form-grid .field-wide {
        grid-column: auto;
    }
}

.sportsbook-game {
    margin: 0.7rem;
    padding: 0.8rem;
    border: 1px solid var(--command-line);
    border-radius: 8px;
    background: #f4f7fa;
    color: #172b3a;
    font-size: 0.8rem;
}
.sportsbook-game__heading, .sportsbook-game__footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.4rem 1rem;
}
.sportsbook-game__heading span, .sportsbook-game__footer { color: #4b6070; }
.sportsbook-game table { width: 100%; margin: 0.65rem 0; border-collapse: collapse; table-layout: fixed; }
.sportsbook-game th, .sportsbook-game td { text-align: right; padding: 0.4rem 0.25rem; overflow-wrap: anywhere; }
.sportsbook-game th:first-child { text-align: left; width: 29%; }
.sportsbook-game thead th { font-size: 0.68rem; color: #4b6070; }
.sportsbook-game tbody tr + tr { border-top: 1px solid #dbe3e9; }
.sportsbook-game small { display: inline-block; }
.sportsbook-game--missing, #sportsbookStatus[data-state='unavailable'], #sportsbookStatus[data-state='fallback'] { color: #89591b; }
.historical-lookup__inputs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin: 1rem 0; }
.historical-lookup__inputs label { display: grid; gap: 0.4rem; color: #4b6070; font-size: 0.8rem; }
.historical-lookup__inputs input { width: 100%; min-width: 0; padding: 0.7rem; border: 1px solid #ccd6dd; border-radius: 6px; background: white; color: #172b3a; }
.historical-cover { margin: 0.7rem; padding: 0.8rem; border: 1px solid #d8e1dc; border-radius: 8px; background: #f3f7f4; color: #172b3a; font-size: 0.78rem; }
.historical-cover--lookup { margin: 0; }
.historical-cover__heading { display: grid; gap: 0.25rem; margin-bottom: 0.65rem; }
.historical-cover__heading span, .historical-cover__identity span, .historical-cover__detail, .historical-cover__note { color: #52655b; font-size: 0.72rem; }
.historical-cover__row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.45rem 0.8rem; padding: 0.7rem 0; }
.historical-cover__row + .historical-cover__row { border-top: 1px solid #d8e1dc; }
.historical-cover__identity, .historical-cover__result, .historical-cover__detail { display: grid; gap: 0.2rem; }
.historical-cover__result { text-align: right; }
.historical-cover__result strong { color: #245c43; font-size: 1.2rem; }
.historical-cover__result span { font-size: 0.7rem; }
.historical-cover__row p, .historical-cover__detail { grid-column: 1 / -1; margin: 0; }
.historical-cover__note { margin: 0.6rem 0 0; line-height: 1.5; }
.historical-cover__empty { color: #89591b; }

/* One matchup per row; every source and the selection stay beneath its team. */
.slate-board { grid-template-columns: minmax(0, 1fr); gap: 1.25rem; }
.ats-matchup-teams { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; padding: 1rem; }
.ats-team { min-width: 0; border: 2px solid #e4e1d8; border-radius: 10px; padding: 1rem; }
.ats-team[data-selected='true'] { border-color: #236246; box-shadow: 0 0 0 2px #2362461a; background: #fafffb; }
.ats-team__heading { display: grid; gap: 0.25rem; margin-bottom: 0.8rem; }
.ats-team__heading h3 { margin: 0; font-size: 1.15rem; color: #17324a; }
.ats-team__heading > span, .ats-team__context, .ats-team__recommendation { font-size: 0.76rem; color: #526157; line-height: 1.5; }
.ats-team .ats-pick-button { width: 100%; min-height: 46px; white-space: normal; border: 1px solid #17324a; color: #17324a; background: #fff; font-size: 0.86rem; }
.ats-team .ats-pick-button[aria-pressed='true'] { background: #236246; color: white; border-color: #236246; }
.ats-pick-button:focus-visible { outline: 3px solid #bb8424; outline-offset: 3px; }
.ats-pick-button { scroll-margin-top: 245px; scroll-margin-bottom: 30px; }
.ats-team .slate-team { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.9rem; border-radius: 6px; padding: 0.8rem; }
.ats-team .slate-team__metric { text-align: left; }
.ats-team .slate-team__metric strong, .ats-team .slate-team__identity strong { font-size: 1.05rem; }
.ats-team .slate-team__metric span, .ats-team .slate-team__identity span { font-size: 0.65rem; }
.ats-team .historical-cover { margin: 0.9rem 0 0; }
.sportsbook-team { border-top: 1px solid #dbe3e9; padding-top: 0.8rem; margin-top: 0.8rem; font-size: 0.76rem; color: #17324a; }
.ats-team__metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.6rem; margin: 0.9rem 0; }
.ats-team__metrics dt { font-size: 0.66rem; color: #4b6070; }
.ats-team__metrics dd { margin: 0.3rem 0 0; font-weight: 800; font-size: 0.96rem; }
.my-picks-panel { margin-bottom: 1.25rem; }
#myPickCount { color: #236246; white-space: nowrap; }
.my-picks-summary { font-size: 0.9rem; line-height: 1.8; }
.ats-filter { display: flex; align-items: center; gap: 0.55rem; font-size: 0.85rem; min-height: 44px; }
.ats-filter input { width: 18px; height: 18px; accent-color: #236246; }
#myPicksCopyFallback { width: 100%; margin: 1rem 0; padding: 0.75rem; }
.ats-source-notes { margin: 1rem 0; font-size: 0.78rem; line-height: 1.6; color: #526157; }
.ats-source-notes summary, .ats-model-tools > summary { cursor: pointer; padding-block: 0.65rem; }
.ats-model-tools > summary { font-size: 1rem; font-weight: 800; color: #17324a; margin-bottom: 1rem; }
#myPicksTitle, #modelTools { scroll-margin-top: 130px; }
.ats-team-name-button { display: block; width: 100%; min-height: 44px; padding: 0; border: 0; background: transparent; color: inherit; font: inherit; letter-spacing: inherit; text-align: left; cursor: pointer; overflow-wrap: anywhere; }
.ats-team-name-button:hover { text-decoration: underline; text-underline-offset: 0.15em; }
.ats-team-name-button[aria-pressed='true'] { color: #236246; }
.ats-team-name-button:focus-visible, .pick-cart-item button:focus-visible { outline: 3px solid #bb8424; outline-offset: 3px; border-radius: 4px; }
.pick-cart-total { display: flex; align-items: center; flex-wrap: wrap; gap: 1rem 2rem; padding: 1rem; margin: 1rem 0; border: 1px solid #c5dacd; border-radius: 10px; background: #edf5ef; }
.pick-cart-total > div { flex: 1 1 230px; display: grid; gap: 0.3rem; }
.pick-cart-total > div > span { font-size: 1rem; color: #17324a; }
.pick-cart-total strong { font-size: 2rem; line-height: 1.25; color: #236246; font-variant-numeric: tabular-nums; }
.pick-cart-total small, .pick-cart-note { font-size: 0.875rem; line-height: 1.5; color: #526157; }
.pick-cart-total > p { flex: 2 1 280px; margin: 0; font-size: 0.875rem; line-height: 1.5; color: #40564c; }
.pick-cart-items { list-style: none; padding: 0; margin: 0.8rem 0; display: grid; gap: 0.5rem; }
.pick-cart-item { display: grid; grid-template-columns: minmax(0, 1fr) minmax(140px, auto) auto; align-items: center; gap: 0.75rem; padding: 0.8rem; border: 1px solid #d6ded8; border-radius: 8px; background: #fff; }
.pick-cart-item > div { min-width: 0; display: grid; gap: 0.3rem; overflow-wrap: anywhere; }
.pick-cart-item strong { color: #17324a; font-size: 1rem; }
.pick-cart-item small { font-size: 0.875rem; color: #526157; line-height: 1.4; }
.pick-cart-rate { text-align: right; font-variant-numeric: tabular-nums; }
.pick-cart-item .command-button { min-height: 44px; font-size: 0.875rem; }
.command-page .ats-draft-progress { white-space: normal; overflow-wrap: anywhere; }
@media (max-width: 700px) {
    .pick-cart-item { grid-template-columns: minmax(0, 1fr) auto; }
    .pick-cart-rate { grid-column: 1; text-align: left; }
    .pick-cart-item button { grid-column: 2; grid-row: 1 / 3; }
}
@media (max-width: 700px) {
    .ats-matchup-teams { padding: 0.6rem; gap: 0.6rem; }
    .ats-team { padding: 0.8rem; }
    .ats-team__metrics { gap: 0.35rem; }
    .ats-team__metrics dd { font-size: 0.85rem; }
}

/* Sportsbook board: strong contrast, aligned sides, and restrained live-data accents. */
.command-hero { position: relative; overflow: hidden; padding: 2rem; margin-bottom: 1.5rem; border-radius: 18px; background: linear-gradient(115deg, #102635 0%, #173e48 100%); box-shadow: 0 12px 32px #10263516; }
.command-hero::after { content: ''; pointer-events: none; position: absolute; width: 360px; height: 360px; right: 20%; top: -250px; border: 1px solid #ffffff1a; border-radius: 50%; box-shadow: 0 0 0 60px #ffffff05, 0 0 0 120px #ffffff04; }
.command-hero .command-eyebrow { color: #a8d2bd; margin-bottom: 0.8rem; }
.command-hero h1 { font-family: 'Manrope', sans-serif; font-size: clamp(2.3rem, 4.3vw, 3.5rem); line-height: 1.05; letter-spacing: -0.055em; color: #fff; font-weight: 800; }
.ats-hero-accent { display: block; font-size: 0.54em; color: #afd7c3; letter-spacing: -0.035em; margin-top: 0.35rem; }
.command-hero > div > p:last-child { color: #cedddf; font-size: 0.85rem; margin-top: 0.85rem; }
.command-hero .model-status { color: #fff; background: #ffffff0c; border-color: #ffffff24; backdrop-filter: blur(8px); max-width: 290px; }
.command-hero .model-status small { color: #bdd1d3; }
.command-hero .model-status strong { color: #fff; font-size: 0.72rem; }
.slate-panel { background: transparent; border: 0; box-shadow: none; padding-inline: 0; }
.slate-panel > .panel-heading h2 { font-family: 'Manrope', sans-serif; font-size: 1.65rem; letter-spacing: -0.045em; font-weight: 800; }
.slate-panel__note { font-size: 0.75rem; max-width: 1050px; }
.slate-game { border-radius: 14px; border-color: #d3dcd9; box-shadow: 0 6px 20px #1b354608; }
.slate-game__top { background: #142e3c; color: #e4eded; min-height: 44px; font-size: 0.74rem; padding: 0.4rem 1.1rem; letter-spacing: 0.02em; }
.slate-game__top button { color: #c0dad0; font-size: 0.7rem; }
.ats-matchup-label { font-size: 0.58rem; letter-spacing: 0.2em; color: #9fb8c0; }
.ats-timezone { opacity: 0.6; font-size: 0.65rem; }
.ats-matchup-teams { gap: 0; padding: 0; background: #dbe2de; }
.ats-team { border: 0; border-radius: 0; padding: 1.25rem; background: #fffefa; box-shadow: inset 0 4px #a4bab7; }
.ats-team + .ats-team { border-left: 1px solid #dbe2de; }
.ats-team[data-selected='true'] { background: #f4fcf6; box-shadow: inset 0 4px #236246; }
.ats-team__heading { min-height: 90px; align-content: start; gap: 0.3rem; }
.ats-team__heading h3 { font-size: clamp(1.15rem, 2.2vw, 1.8rem); letter-spacing: -0.045em; line-height: 1.2; }
.ats-team__heading .ats-location { font-size: 0.61rem; font-weight: 900; letter-spacing: 0.18em; color: #627b79; text-transform: uppercase; }
.ats-rank { display: inline-block; color: #926329; font-size: 0.65em; vertical-align: middle; letter-spacing: 0; }
.ats-team .ats-pick-button { display: flex; justify-content: space-between; gap: 0.4rem; padding: 0.85rem 1rem; border: 1px solid #c6d7d1; background: #eef4f0; border-radius: 9px; text-align: left; transition: background 150ms, box-shadow 150ms; }
.ats-pick-button small { display: block; font-size: 0.62rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.09em; opacity: 0.8; }
.ats-pick-button strong { display: block; font-size: 2rem; font-weight: 850; letter-spacing: -0.055em; font-variant-numeric: tabular-nums; line-height: 1.25; }
.ats-pick-action { align-self: center; font-size: 0.78rem; white-space: nowrap; }
.ats-team .ats-pick-button:hover { box-shadow: 0 0 0 3px #23624616; }
.sportsbook-team { border-top: 0; margin-top: 0.8rem; min-height: 139px; }
.sportsbook-game__heading { display: grid; gap: 0.2rem; font-size: 0.67rem; }
.sportsbook-game__heading span { font-size: 0.61rem; }
.ats-team__metrics { gap: 0.5rem; margin: 0.65rem 0; }
.ats-team__metrics > div { background: #f0f3f3; border: 1px solid #e2e7e5; padding: 0.6rem; border-radius: 6px; }
.ats-team__metrics dd { font-size: 1.18rem; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.ats-team__metrics dd small { display: block; font-size: 0.65rem; font-weight: 500; color: #576a70; letter-spacing: 0; }
.ats-team__metrics dt { font-size: 0.62rem; }
.sportsbook-game__footer { font-size: 0.65rem; margin: 0; }
.ats-team__recommendation { display: flex; justify-content: space-between; align-items: center; min-height: 28px; margin: 1rem 0 0.3rem; color: #40564c; font-size: 0.65rem; font-weight: 800; }
.ats-team__recommendation[data-recommended='true'] { color: #236246; }
.ats-team__recommendation span { color: #7d8983; font-weight: 500; }
.ats-team .slate-team { background: transparent; border: 1px solid #e4e8e4; }
.ats-share-track { display: block; height: 4px; border-radius: 4px; background: linear-gradient(to right, #b28b47 var(--ats-share), #e9e5dc var(--ats-share)); }
.ats-team__context { margin: 0.6rem 0; font-size: 0.68rem; }
.ats-team .historical-cover { border-color: #d5e5d9; background: #edf5ef; }
.ats-board-toolbar { position: sticky; top: 112px; z-index: 20; display: flex; align-items: center; flex-wrap: wrap; gap: 1rem; margin: 1rem 0; padding: 0.65rem 1rem; border: 1px solid #d6ded8; border-radius: 10px; background: #f9fbf8f2; backdrop-filter: blur(12px); box-shadow: 0 3px 12px #12263508; }
.ats-search { display: flex; align-items: center; gap: 0.7rem; font-size: 0.7rem; font-weight: 750; }
.ats-search input { width: 200px; min-height: 40px; border: 1px solid #d8dfd9; border-radius: 6px; padding: 0.5rem 0.7rem; background: white; }
.command-page .slate-panel label.ats-search, .command-page .slate-panel label.ats-filter { display: flex; }
.command-page .slate-panel label.ats-filter { grid-template-columns: none; }
.ats-draft-progress { margin-left: auto; color: #236246; font-size: 0.8rem; font-weight: 850; text-decoration: none; white-space: nowrap; }
.my-picks-panel .panel-heading { margin-bottom: 0.5rem; }
.my-picks-summary { margin-block: 0.4rem; }
.my-picks-panel .panel-note { margin-bottom: 0; }
/* The sticky draft link already returns to the top; avoid covering a home-side quote. */
.command-page .back-to-top { display: none; }
@media (max-width: 700px) {
    .command-shell { width: calc(100% - 1rem); padding-top: 1rem; }
    .my-picks-panel > .panel-heading { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0.8rem; }
    .my-picks-panel .result-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); width: 100%; }
    .my-picks-panel .result-actions .command-button { min-height: 44px; padding: 0.6rem 0.4rem; font-size: 0.72rem; }
    .my-picks-panel h2 { font-size: 1.4rem; }
    .command-hero { grid-template-columns: 1fr; gap: 1rem; padding: 1.35rem; }
    .command-hero .model-status { min-width: 0; max-width: none; padding: 0.65rem; }
    .ats-team { padding: 0.65rem; }
    .ats-team__heading { min-height: 94px; }
    .ats-team__heading h3 { font-size: 1.03rem; overflow-wrap: anywhere; }
    .ats-team__heading > span { font-size: 0.63rem; }
    .ats-team .ats-pick-button { flex-direction: column; align-items: flex-start; min-height: 94px; padding: 0.6rem; }
    .ats-pick-button strong { font-size: 1.8rem; }
    .ats-pick-action { align-self: flex-start; font-size: 0.69rem; }
    .ats-team__metrics { grid-template-columns: minmax(0, 1fr); }
    .ats-team__metrics > div { min-height: 62px; padding: 0.45rem; }
    .ats-team__metrics > div:first-child { min-height: 77px; }
    .ats-team__metrics dd small { display: inline; }
    .sportsbook-game__heading { min-height: 59px; align-content: start; }
    .sportsbook-game__footer { min-height: 42px; }
    .ats-team__recommendation { display: grid; align-content: start; min-height: 40px; gap: 0.2rem; }
    .ats-team .slate-team { grid-template-columns: minmax(0, 1fr); padding: 0.6rem; gap: 0.65rem; }
    .ats-team .slate-team > div { min-height: 43px; }
    .ats-team .historical-cover { padding: 0.55rem; }
    .ats-team .historical-cover__row { grid-template-columns: minmax(0, 1fr); }
    .ats-team .historical-cover__result { text-align: left; }
    .ats-team .historical-cover__heading { min-height: 60px; }
    .ats-matchup-label { display: none; }
    .ats-board-toolbar { top: 111px; gap: 0.2rem 0.75rem; padding: 0.5rem; }
    .ats-search { width: 100%; justify-content: space-between; }
    .ats-search input { width: 65%; }
    .ats-filter, .ats-draft-progress { font-size: 0.69rem; }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .ats-team .ats-pick-button { transition: none; }
}
@media (max-width: 480px) {
    .sportsbook-game { margin: 0.4rem; padding: 0.6rem; font-size: 0.7rem; }
    .sportsbook-game th, .sportsbook-game td { padding-inline: 0.1rem; }
    .historical-cover { margin: 0.4rem; padding: 0.6rem; }
    .historical-cover--lookup { margin: 0; }
    .historical-lookup__inputs { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
}
