/* ----- THEME ----- */
:root {
    --navy: #0c2340;
    --navy-deep: #06152a;
    --navy-soft: #1b3557;
    --gold: #C99700;
    --gold-soft: #f6edd2;
    --white: #ffffff;
    --page: #f4f6f9;
    --line: #dde3eb;
    --text: #14213a;
    --muted: #5d6b80;
    --danger: #a4262c;
    --shadow: 0 1px 2px rgba(12, 35, 64, 0.06), 0 6px 18px rgba(12, 35, 64, 0.08);
    --radius: 10px;
    --display: 'Oswald', 'Arial Narrow', sans-serif;
    --body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}
* {
    box-sizing: border-box;
}
html, body {
    margin: 0;
    /* clip (not hidden) stops sideways scrolling without breaking the pinned bar and header */
    overflow-x: clip;
}
body {
    font-family: var(--body);
    color: var(--text);
    background-color: var(--page);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
main {
    flex: 1;
}

/* ----- HEADER ----- */
/* The countdown and the header stay pinned to the top together */
.site-top {
    position: sticky;
    top: 0;
    z-index: 20;
}
/* On a phone the menu stacks tall, so only the countdown stays pinned */
@media (max-width: 600px) {
    .site-top {
        display: contents;
    }
    .countdown {
        position: sticky;
        top: 0;
        z-index: 20;
    }
}
/* Countdown to the next AP and Coaches poll, above the header on every page */
.countdown {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px 14px;
    padding: 7px 16px;
    background: var(--navy-deep);
    color: var(--white);
    font-size: 0.8rem;
    font-weight: 600;
}
.countdown-label {
    font: 600 0.85rem var(--display);
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--gold);
}
.countdown-date {
    color: rgba(255, 255, 255, 0.8);
}
.countdown-clock {
    display: inline-flex;
    gap: 6px;
    font-variant-numeric: tabular-nums;
}
.countdown-clock b {
    display: inline-block;
    min-width: 2ch;
    padding: 1px 5px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.12);
    font: 600 0.9rem var(--display);
    text-align: center;
}
.countdown-clock small {
    margin-left: 2px;
    font-size: 0.7rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.8);
}
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 5%;
    height: 68px;
    background-color: var(--navy);
    border-bottom: 4px solid var(--gold);
}
.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--white);
}
.brand svg {
    width: 50px;
    height: 55px;
    flex-shrink: 0;
}
.brand-name {
    font-family: var(--display);
    font-size: 1.45rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
}
.brand-name span {
    color: var(--gold);
}
.nav-menu {
    list-style: none;
    display: flex;
    gap: 6px;
    margin: 0;
    padding: 0;
}
.nav-menu a {
    display: block;
    padding: 8px 14px;
    font-family: var(--display);
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    text-decoration: none;
    color: rgba(255, 255, 255, 0.82);
    border-bottom: 2px solid transparent;
    transition: color 0.25s ease, border-color 0.25s ease;
}
.nav-menu a:hover {
    color: var(--white);
    border-color: rgba(201, 151, 0, 0.5);
}
.nav-menu a.active {
    color: var(--gold);
    border-color: var(--gold);
}

/* ----- HERO ----- */
.hero {
    background:
        radial-gradient(ellipse at 85% -20%, rgba(201, 151, 0, 0.18), transparent 55%),
        linear-gradient(160deg, var(--navy) 0%, var(--navy-deep) 100%);
    color: var(--white);
    padding: 40px 5% 44px;
}
.hero-inner {
    max-width: 1240px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 32px;
    flex-wrap: wrap;
}
.eyebrow {
    margin: 0 0 8px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: var(--gold);
}
.hero h1 {
    margin: 0;
    font-family: var(--display);
    font-weight: 600;
    font-size: clamp(2.2rem, 5vw, 3.4rem);
    line-height: 1.05;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.hero-sub {
    margin: 12px 0 0;
    max-width: 560px;
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.95rem;
    line-height: 1.55;
}
.hero.compact {
    padding: 30px 5% 32px;
}

/* Countdown */
/* ----- LAYOUT ----- */
.container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 5%;
}
.panel {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

/* ----- STATUS BANNER ----- */
#statusBanner {
    display: none;
    align-items: flex-start;
    gap: 14px;
    margin: 24px auto 0;
    padding: 14px 18px;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    border-left: 5px solid var(--gold);
    background: var(--white);
    box-shadow: var(--shadow);
    animation: slideDown 0.4s ease-out;
}
#statusBanner.show {
    display: flex;
}
#statusBanner.error {
    border-left-color: var(--danger);
}
#statusBanner .icon {
    flex-shrink: 0;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-weight: 800;
    color: var(--white);
    background: var(--gold);
}
#statusBanner.error .icon {
    background: var(--danger);
}
#statusBanner h3 {
    margin: 2px 0 4px;
    font-size: 0.95rem;
}
#statusBanner p {
    margin: 0;
    font-size: 0.88rem;
    color: var(--muted);
    line-height: 1.5;
}
#statusBanner code {
    background: var(--page);
    border: 1px solid var(--line);
    border-radius: 4px;
    padding: 1px 6px;
    color: var(--navy);
}

/* ----- TOOLBAR ----- */
.toolbar {
    display: flex;
    gap: 12px;
    align-items: flex-end;
    margin: -26px auto 0;
    padding: 16px;
    position: relative;
    z-index: 2;
    max-width: 760px;
}
.field {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.field.wide {
    flex: 2;
}
.field label {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--muted);
}
.field select {
    height: 44px;
    padding: 0 36px 0 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    font: 600 0.95rem var(--body);
    color: var(--text);
    background: var(--white) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%230c2340' stroke-width='2' fill='none'/%3E%3C/svg%3E") no-repeat right 12px center;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.field select:hover {
    border-color: var(--navy-soft);
}
.field select:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(201, 151, 0, 0.25);
}
.btn {
    height: 44px;
    padding: 0 22px;
    border: none;
    border-radius: 8px;
    font: 700 0.85rem var(--body);
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--white);
    background: var(--navy);
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.15s ease;
}
.btn:hover {
    background: var(--navy-soft);
}
.btn:active {
    transform: translateY(1px);
}
.btn:focus-visible {
    outline: 3px solid var(--gold);
    outline-offset: 2px;
}

/* ----- TEAM CARD ----- */
#teamCard {
    display: none;
    max-width: 760px;
    margin: 20px auto 0;
    overflow: hidden;
}
#teamCard.show {
    display: block;
    animation: cardDrop 0.55s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.card-top {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    color: var(--white);
    background: linear-gradient(120deg, var(--navy), var(--navy-soft));
    border-bottom: 3px solid var(--gold);
}
.card-top img {
    width: 58px;
    height: 58px;
    object-fit: contain;
    background: var(--white);
    border-radius: 50%;
    padding: 5px;
    animation: logoSpin 0.7s ease-out;
}
.card-top h2 {
    margin: 0;
    font-family: var(--display);
    font-weight: 600;
    font-size: 1.6rem;
    letter-spacing: 1px;
    text-transform: uppercase;
}
.card-top p {
    margin: 2px 0 0;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.75);
}
.card-ranks {
    display: grid;
    grid-template-columns: repeat(var(--cols, 4), 1fr);
}
.card-rank {
    text-align: center;
    padding: 14px 6px;
    border-right: 1px solid var(--line);
    opacity: 0;
    animation: rowBounceIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}
.card-rank:last-child {
    border-right: none;
}
.card-rank .label {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--muted);
}
.card-rank .value {
    font-family: var(--display);
    font-size: 2.2rem;
    font-weight: 600;
    color: var(--navy);
}
.card-rank:first-child .value {
    color: var(--gold);
}
.card-rank .value.nr {
    font-family: var(--body);
    font-size: 1rem;
    font-weight: 600;
    line-height: 2.9rem;
    color: #98a3b3;
}

/* ----- POLL COLUMNS ----- */
/* Three rankings at a time; the fourth only when expanded */
.poll-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 28px;
}
.poll-bar p {
    margin: 0;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--muted);
}
.show-all-row {
    text-align: center;
    padding: 14px 0 4px;
}
.show-all-row:empty {
    display: none;
}
.btn-outline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 36px;
    padding: 0 16px;
    border: 1px solid var(--navy);
    border-radius: 999px;
    font: 700 0.75rem var(--body);
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--navy);
    background: var(--white);
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
}
.btn-outline:hover {
    color: var(--white);
    background: var(--navy);
}
.btn-outline:focus-visible {
    outline: 3px solid var(--gold);
    outline-offset: 2px;
}
.btn-outline .chev {
    transition: transform 0.25s ease;
}
.btn-outline[aria-expanded="true"] .chev {
    transform: rotate(180deg);
}
.poll-bar + .poll-grid {
    margin-top: 12px;
}
.poll-card.extra-poll {
    display: none;
}
.poll-grid.expanded {
    --cols: 4;
}
.poll-grid.expanded .poll-card.extra-poll {
    display: block;
}
.poll-grid {
    --cols: 3;
    display: grid;
    grid-template-columns: repeat(var(--cols), minmax(0, 1fr));
    gap: 20px;
    margin: 28px auto 40px;
}
.poll-card {
    overflow: hidden;
}
/* Fixed layout so long team names shorten with "..." instead of widening the column */
.poll-card table {
    table-layout: fixed;
}
.poll-card th:first-child {
    width: 40px;
}
.poll-card th.num {
    width: 66px;
}
.poll-card.featured {
    border-color: var(--gold);
    box-shadow: 0 0 0 1px var(--gold), var(--shadow);
}
.poll-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 12px 14px;
    background: var(--navy);
    color: var(--white);
    border-bottom: 3px solid var(--gold);
}
.poll-card.featured .poll-head {
    background: linear-gradient(120deg, var(--navy-deep), var(--navy));
}
.poll-head h2 {
    margin: 0;
    font-family: var(--display);
    font-size: 1.05rem;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}
.poll-head span {
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.6);
}
table {
    width: 100%;
    border-collapse: collapse;
}
th {
    padding: 8px 10px;
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: var(--muted);
    text-align: left;
    border-bottom: 1px solid var(--line);
    background: #fafbfc;
}
td {
    padding: 7px 10px;
    font-size: 0.88rem;
    border-bottom: 1px solid #edf0f4;
}
tbody tr:last-child td {
    border-bottom: none;
}
td.rank {
    width: 40px;
    text-align: center;
    font-family: var(--display);
    font-size: 1rem;
    font-weight: 500;
    color: var(--navy);
}
th.num, td.num {
    text-align: right;
    font-variant-numeric: tabular-nums;
}
.top-rank td.rank span {
    display: inline-grid;
    place-items: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--gold);
    color: var(--white);
    font-size: 0.85rem;
}
/* Playoff picture lines: faded dotted under #4 (byes), solid under #12 (the field) */
tr.cutline-bye td {
    border-bottom: 2px dashed rgba(201, 151, 0, 0.35);
}
tr.cutline-field td {
    border-bottom: 2px solid var(--gold);
}
tr.extra-in td {
    border-top: 2px dashed var(--line);
}
.field-tag {
    display: inline-block;
    margin-left: auto;
    padding: 2px 6px;
    border-radius: 999px;
    font-size: 0.58rem;
    font-weight: 800;
    font-style: normal;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    white-space: nowrap;
    line-height: 1.4;
}
.field-tag.in {
    color: var(--navy);
    background: var(--gold);
}
.field-tag.out {
    color: var(--muted);
    background: #e6eaef;
}
.field-legend,
.legend {
    display: flex;
    gap: 6px 18px;
    flex-wrap: wrap;
    align-items: center;
    font-size: 0.75rem;
    color: var(--muted);
}
.field-legend {
    margin-top: 10px;
}
.field-legend span,
.legend span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.field-legend .field-tag,
.legend .field-tag {
    margin-left: 0;
}
.key-bye,
.key-field {
    display: inline-block;
    width: 22px;
    border-top: 2px dashed rgba(201, 151, 0, 0.45);
}
.key-field {
    border-top: 2px solid var(--gold);
}
.team-cell {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
    font-weight: 600;
}
/* Long names wrap to a second line instead of being cut off */
.team-name {
    min-width: 0;
    line-height: 1.25;
    overflow-wrap: break-word;
}
.team-cell img {
    width: 22px;
    height: 22px;
    object-fit: contain;
}
.empty-poll td {
    text-align: center;
    color: var(--muted);
    font-size: 0.85rem;
    line-height: 1.5;
    padding: 40px 18px;
}
.empty-poll strong {
    display: block;
    font-family: var(--display);
    font-size: 1.1rem;
    font-weight: 500;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--navy);
    margin-bottom: 4px;
}
tbody tr[data-school] {
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease;
}
tbody tr[data-school]:hover {
    background-color: var(--gold-soft);
}

/* Picked team: highlighted in every poll */
.has-pick tbody tr[data-school]:not(.picked) td {
    opacity: 0.45;
    transition: opacity 0.3s ease;
}
tr.picked {
    background-color: var(--navy) !important;
    color: var(--white);
    opacity: 1;
    animation: pickPulse 1.2s ease-out;
}
tr.picked td {
    border-bottom-color: var(--navy);
}
tr.picked td:first-child {
    box-shadow: inset 4px 0 0 var(--gold);
}
tr.picked td.rank {
    color: var(--gold);
}
tr.picked img {
    background: var(--white);
    border-radius: 50%;
}
tr.ghost td {
    border-top: 2px dashed var(--line);
}

/* ----- STANDINGS PAGE ----- */
.standings-card {
    margin: 28px auto 40px;
    overflow-x: auto;
}
.standings-table th {
    text-align: center;
    white-space: nowrap;
}
.standings-table th.group {
    background: var(--navy);
    color: var(--white);
    border-bottom: 3px solid var(--gold);
    border-left: 1px solid rgba(255, 255, 255, 0.12);
    font-family: var(--display);
    font-size: 0.8rem;
}
.standings-table td {
    white-space: nowrap;
}
.standings-table td.avg {
    font-weight: 700;
    min-width: 110px;
}
.standings-table .sep {
    border-left: 1px solid var(--line);
}
.bar {
    height: 5px;
    background: #e9edf2;
    border-radius: 3px;
    margin-top: 5px;
    overflow: hidden;
}
.bar span {
    display: block;
    height: 100%;
    width: 0;
    background: var(--gold);
    transition: width 1s ease-out;
}
.legend {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    padding: 12px 16px;
    border-top: 1px solid var(--line);
    font-size: 0.78rem;
    color: var(--muted);
}

/* ----- FORMULA PAGE ----- */
.formula-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin: 28px auto 0;
}
.component {
    padding: 22px 22px 20px;
    border-top: 4px solid var(--gold);
    opacity: 0;
    animation: rowBounceIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}
.component .weight {
    font-family: var(--display);
    font-size: 2.4rem;
    font-weight: 600;
    color: var(--gold);
    line-height: 1;
}
.component h3 {
    margin: 8px 0 6px;
    font-family: var(--display);
    font-size: 1.15rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--navy);
}
.component p {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.55;
    color: var(--muted);
}
.component .was {
    margin-top: 12px;
    font-size: 0.78rem;
    color: var(--navy-soft);
}
.equation {
    margin: 20px auto 0;
    padding: 20px;
    text-align: center;
    font-family: var(--display);
    font-size: clamp(1.05rem, 2.6vw, 1.5rem);
    letter-spacing: 1px;
    color: var(--white);
    background: var(--navy);
    border-radius: var(--radius);
    border-bottom: 4px solid var(--gold);
}
.equation b {
    color: var(--gold);
    font-weight: 500;
}
.prose {
    margin: 28px auto 40px;
    padding: 26px 30px;
    line-height: 1.65;
    font-size: 0.95rem;
}
.prose h2 {
    margin: 0 0 8px;
    font-family: var(--display);
    font-weight: 600;
    font-size: 1.2rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--navy);
}
.prose h2:not(:first-child) {
    margin-top: 26px;
}
.prose p,
.prose li {
    color: #344257;
}
.example {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1px;
    background: var(--line);
    border: 1px solid var(--line);
    border-radius: 8px;
    overflow: hidden;
    margin-top: 12px;
}
.example div {
    background: var(--white);
    padding: 12px;
    text-align: center;
}
.example small {
    display: block;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: var(--muted);
}
.example b {
    font-family: var(--display);
    font-size: 1.4rem;
    font-weight: 500;
    color: var(--navy);
}
.example div:last-child b {
    color: var(--gold);
}

/* ----- BRACKET PAGE ----- */
.source-bar {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
    margin: 28px 0 16px;
}
.source-toggle {
    display: inline-flex;
    padding: 4px;
    gap: 4px;
    background: var(--navy);
    border-radius: 999px;
    box-shadow: var(--shadow);
}
.source-toggle button {
    border: none;
    border-radius: 999px;
    padding: 9px 20px;
    font: 600 0.95rem var(--display);
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.78);
    background: transparent;
    cursor: pointer;
    transition: background-color 0.25s ease, color 0.25s ease, transform 0.15s ease;
}
.source-toggle button:hover {
    color: var(--white);
    background: rgba(255, 255, 255, 0.08);
}
.source-toggle button.active {
    color: var(--navy);
    background: var(--gold);
    transform: scale(1.04);
}
.source-toggle button:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 2px;
}
.source-toggle small {
    font-family: var(--body);
    font-size: 0.6rem;
    letter-spacing: 0.5px;
    opacity: 0.7;
}
.source-note {
    flex: 1;
    min-width: 260px;
    margin: 0;
    font-size: 0.85rem;
    color: var(--muted);
    line-height: 1.5;
}
.source-note b {
    color: var(--navy);
}
.bracket-card {
    overflow-x: auto;
}
.bracket {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 22px;
    padding: 20px;
}
.round {
    display: flex;
    flex-direction: column;
}
.round-title {
    margin: 0 0 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--gold);
    font-family: var(--display);
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--navy);
}
.round-games {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    gap: 14px;
}
.game {
    position: relative;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--white);
    box-shadow: 0 1px 3px rgba(12, 35, 64, 0.06);
}
.round-0 .game::after,
.round-1 .game::after,
.round-2 .game::after,
.round-3 .game::after {
    content: "";
    position: absolute;
    top: 50%;
    right: -23px;
    width: 22px;
    border-top: 2px solid var(--line);
}
.game-note {
    display: block;
    padding: 4px 10px;
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: var(--muted);
    background: #fafbfc;
    border-bottom: 1px solid var(--line);
    border-radius: 8px 8px 0 0;
}
.slot {
    width: 100%;
    display: grid;
    grid-template-columns: 22px 14px minmax(0, 1fr) auto;
    align-items: center;
    gap: 7px;
    padding: 8px 10px;
    border: none;
    border-bottom: 1px solid #edf0f4;
    background: transparent;
    font: 600 0.85rem var(--body);
    color: var(--text);
    text-align: left;
    cursor: pointer;
    transition: background-color 0.25s ease, opacity 0.25s ease, color 0.25s ease;
}
.slot:last-child {
    border-bottom: none;
    border-radius: 0 0 8px 8px;
}
.slot:first-child {
    border-radius: 8px 8px 0 0;
}
.slot:hover:not(:disabled) {
    background: var(--gold-soft);
}
.slot:disabled {
    cursor: default;
}
.slot .seed {
    font-family: var(--display);
    font-size: 0.95rem;
    color: var(--gold);
    text-align: center;
}
.slot img {
    width: 22px;
    height: 22px;
    object-fit: contain;
}
/* Names wrap between words only; the bid tag sits on its own line underneath */
.slot .name {
    line-height: 1.2;
    overflow-wrap: normal;
    word-break: normal;
}
.slot .name .bid {
    display: table;
    margin-top: 3px;
}
.slot .bid {
    font-size: 0.58rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    padding: 2px 6px;
    border-radius: 999px;
    color: var(--navy);
    background: var(--gold-soft);
    border: 1px solid rgba(201, 151, 0, 0.5);
    white-space: nowrap;
}
.slot .rec {
    white-space: nowrap;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--muted);
}
.slot.tbd {
    display: block;
    cursor: default;
    font-weight: 500;
    font-style: italic;
    color: #98a3b3;
}
.slot.won {
    background: var(--gold-soft);
    box-shadow: inset 4px 0 0 var(--gold);
    font-weight: 800;
}
.slot.lost {
    opacity: 0.45;
}
.slot.lost .name {
    text-decoration: line-through;
}
.slot.picked {
    background: var(--navy);
    color: var(--white);
    animation: pickPulse 1.2s ease-out;
}
.slot.picked .rec {
    color: rgba(255, 255, 255, 0.7);
}
.slot.picked img {
    background: var(--white);
    border-radius: 50%;
}
.slot.picked.won {
    box-shadow: inset 4px 0 0 var(--gold);
}
.champion {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 22px 14px;
    text-align: center;
    color: var(--white);
    background: linear-gradient(160deg, var(--navy), var(--navy-deep));
    border-radius: var(--radius);
    border: 2px solid var(--navy-soft);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.champion svg {
    width: 38px;
    height: 38px;
    color: var(--gold);
}
.champion img {
    width: 52px;
    height: 52px;
    object-fit: contain;
    background: var(--white);
    border-radius: 50%;
    padding: 4px;
}
.champion b {
    font-family: var(--display);
    font-size: 1.3rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
}
.champion small {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.65);
}
.champion.crowned {
    border-color: var(--gold);
    box-shadow: 0 0 0 4px rgba(201, 151, 0, 0.2), 0 10px 30px rgba(201, 151, 0, 0.25);
}
.bracket-empty {
    grid-column: 1 / -1;
    padding: 60px 20px;
    text-align: center;
    color: var(--muted);
    line-height: 1.6;
}
.bracket-empty strong {
    display: block;
    font-family: var(--display);
    font-size: 1.3rem;
    font-weight: 500;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--navy);
}
.bracket-extras {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin: 20px 0 40px;
    align-items: start;
}
.extras-card {
    overflow: hidden;
}
.status {
    display: inline-block;
    min-width: 40px;
    text-align: center;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.status.in {
    color: var(--navy);
    background: var(--gold-soft);
}
.status.out {
    color: var(--muted);
    background: #edf0f4;
}
tr.bubble-line td {
    padding: 4px;
    text-align: center;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--gold);
    border-top: 2px dashed var(--gold);
    border-bottom: 2px dashed var(--gold);
    background: #fffdf5;
}
.compare-table th.active-col,
.compare-table td.active-col {
    background: var(--gold-soft);
    font-weight: 800;
}
tr.picked td.active-col {
    background: var(--navy-soft);
}
.muted {
    color: #98a3b3;
    font-size: 0.78rem;
}

/* ----- TEAM COLORS (used instead of logos) ----- */
.team-dot {
    display: inline-block;
    flex-shrink: 0;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--team);
    box-shadow: 0 0 0 2px var(--white), 0 0 0 3px rgba(12, 35, 64, 0.15);
}
.slot .team-dot {
    justify-self: center;
}
.team-badge {
    display: inline-grid;
    place-items: center;
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    font-family: var(--display);
    font-size: 1.3rem;
    font-weight: 600;
    letter-spacing: 1px;
    color: var(--white);
    background: var(--team);
    border: 3px solid var(--white);
    animation: logoSpin 0.7s ease-out;
}
.disclaimer {
    max-width: 1240px;
    margin: 14px auto 0;
    font-size: 0.7rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.5);
}

/* ----- LOADING ----- */
.skeleton td {
    height: 36px;
    background: linear-gradient(90deg, #f1f3f6 25%, #e6eaef 50%, #f1f3f6 75%);
    background-size: 200% 100%;
    animation: shimmer 1.2s infinite linear;
    border-bottom: 2px solid var(--white);
}

/* ----- FOOTER ----- */
.footer {
    background: var(--navy);
    border-top: 4px solid var(--gold);
    color: rgba(255, 255, 255, 0.7);
    padding: 22px 5%;
    font-size: 0.8rem;
}
.footer-inner {
    max-width: 1240px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.footer a {
    color: var(--gold);
    text-decoration: none;
}
.footer a:hover {
    text-decoration: underline;
}
#piersonLuscyProduction {
    font-family: var(--display);
    font-size: 0.95rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--gold);
}

/* ----- ANIMATION ----- */
/* Top teams bounce in; the rest of the field fades in */
@keyframes rowBounceIn {
    0% { opacity: 0; transform: translateY(26px); }
    100% { opacity: 1; transform: translateY(0); }
}
@keyframes rowFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes cardDrop {
    0% { opacity: 0; transform: translateY(-16px) scale(0.97); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes logoSpin {
    0% { transform: rotate(-180deg) scale(0.3); }
    100% { transform: rotate(0) scale(1); }
}
@keyframes pickPulse {
    0% { box-shadow: 0 0 0 0 rgba(201, 151, 0, 0.75); transform: scale(1); }
    30% { transform: scale(1.03); }
    100% { box-shadow: 0 0 0 14px rgba(201, 151, 0, 0); transform: scale(1); }
}
@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes shimmer {
    from { background-position: 200% 0; }
    to { background-position: -200% 0; }
}
.bounce-in {
    opacity: 0;
    animation: rowBounceIn 0.65s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}
.fade-in {
    opacity: 0;
    animation: rowFadeIn 0.5s ease-out forwards;
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

/* ----- RESPONSIVE ----- */
@media (max-width: 1100px) {
    /* Keep all four polls side by side, just tighter */
    .poll-grid {
        gap: 12px;
    }
    .poll-grid td,
    .poll-grid th {
        padding-left: 6px;
        padding-right: 6px;
    }
    .poll-grid td {
        font-size: 0.8rem;
    }
    .poll-grid td.rank {
        width: 30px;
    }
    .poll-head span {
        display: none;
    }
}
/* No sideways scrolling anywhere: things rearrange to fit instead */
@media (max-width: 1100px) {
    .bracket-card {
        overflow: visible;
    }
    .bracket {
        grid-template-columns: 1fr;
        min-width: 0;
        gap: 18px;
    }
    .round-games {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
        gap: 12px;
    }
    .game::after {
        display: none;
    }
    .standings-table .group-row,
    .standings-table .col-comp {
        display: none;
    }
}
@media (max-width: 860px) {
    /* Four columns don't fit: show them two by two */
    .poll-grid.expanded {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .standings-table .col-pct {
        display: none;
    }
}
@media (max-width: 640px) {
    .poll-grid,
    .poll-grid.expanded {
        grid-template-columns: minmax(0, 1fr);
    }
    .standings-table .col-cfp,
    .standings-table .long {
        display: none;
    }
    .standings-table td,
    .standings-table th,
    .compare-table td,
    .compare-table th {
        padding-left: 4px;
        padding-right: 4px;
    }
    .standings-table .team-cell {
        max-width: 110px;
    }
    .standings-table td.rank {
        width: 30px;
    }
    .compare-table .team-cell {
        max-width: 120px;
    }
    .field-tag {
        padding: 1px 4px;
        font-size: 0.52rem;
    }
    .standings-table td.avg {
        min-width: 0;
    }
}
@media (max-width: 900px) {
    .bracket-extras {
        grid-template-columns: 1fr;
    }
    /* Stack the logo over the menu and let the links wrap, so none get cut off */
    .header {
        height: auto;
        flex-direction: column;
        gap: 8px;
        padding: 12px 16px 6px;
    }
    .nav-menu {
        flex-wrap: wrap;
        justify-content: center;
    }
}
@media (max-width: 760px) {
    .formula-grid {
        grid-template-columns: 1fr;
    }
    .example {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 600px) {
    .nav-menu a {
        padding: 6px 8px;
        font-size: 0.85rem;
        letter-spacing: 1px;
    }
    .hero,
    .hero.compact {
        padding: 28px 16px 44px;
    }
    .container {
        padding: 0 16px;
    }
    .toolbar {
        flex-direction: column;
        align-items: stretch;
    }
    .card-rank .value {
        font-size: 1.7rem;
    }
    .prose {
        padding: 20px;
    }
    .prose ul {
        padding-left: 18px;
    }
    .source-toggle {
        width: 100%;
    }
    .source-toggle button {
        flex: 1;
        padding: 9px 4px;
        font-size: 0.8rem;
        letter-spacing: 0.5px;
        white-space: nowrap;
    }
}
/* Narrow phones: tighten the menu so all four links stay on one line */
@media (max-width: 380px) {
    .nav-menu {
        gap: 0;
    }
    .nav-menu a {
        padding: 6px 6px;
        letter-spacing: 0.5px;
    }
}
@media (max-width: 360px) {
    .standings-table .team-cell {
        max-width: 84px;
    }
    .standings-table td,
    .standings-table th {
        font-size: 0.78rem;
    }
}

/* Small phones: tighten the Breakdown table so every column fits */
@media (max-width: 480px) {
    .standings-table td,
    .standings-table th {
        padding-left: 3px;
        padding-right: 3px;
        font-size: 0.74rem;
        letter-spacing: 0;
    }
    .standings-table .lead0 {
        display: none;
    }
    .standings-table .team-cell {
        gap: 5px;
    }
}

/* Breakdown cells don't wrap, but team names may (so they're never cut off) */
.standings-table .team-name {
    white-space: normal;
}
