@font-face {
    font-family: equity_ot_a;
    font-style: normal;
    font-weight: normal;
    font-stretch: normal;
    font-display: auto;
    src: url('../fonts/equity_ot_a_regular.woff2') format('woff2');
}

@font-face {
    font-family: equity_ot_a;
    font-style: italic;
    font-weight: normal;
    font-stretch: normal;
    font-display: auto;
    src: url('../fonts/equity_ot_a_italic.woff2') format('woff2');
}

@font-face {
    font-family: equity_ot_a;
    font-style: normal;
    font-weight: bold;
    font-stretch: normal;
    font-display: auto;
    src: url('../fonts/equity_ot_a_bold.woff2') format('woff2');
}

@font-face {
    font-family: equity_ot_a;
    font-style: italic;
    font-weight: bold;
    font-stretch: normal;
    font-display: auto;
    src: url('../fonts/equity_ot_a_bold_italic.woff2') format('woff2');
}

@font-face {
    font-family: triplicate_a;
    font-style: normal;
    font-weight: normal;
    font-stretch: normal;
    font-display: auto;
    src: url('../fonts/triplicate_a_regular.woff2') format('woff2');
}

@font-face {
    font-family: triplicate_a;
    font-style: normal;
    font-weight: bold;
    font-stretch: normal;
    font-display: auto;
    src: url('../fonts/triplicate_a_bold.woff2') format('woff2');
}

/* =========================================================
   THEME VARIABLES — modify these to retheme the whole app
   ========================================================= */
:root {
    /* Color palette */
    --color-bg:            #fff;
    --color-surface:       #ffffff;
    --color-surface-alt:   #f1f1ee;
    --color-border:        #e3e3df;
    --color-border-strong: #c9c9c2;

    --color-text:          #0B0A0A;
    --color-text-muted:    #615e5e;
    --color-text-subtle:   #a38080;

    --color-primary:       #F6AE2D;   /* honey */
    --color-primary-hover: #e09710;
    --color-primary-text:  #0B0A0A;

    --color-accent:        #4A8FE7;   /* blue energy */

    /* Semantic / data colors */
    --color-positive:      #1f6f43;
    --color-negative:      #b91c1c;
    --color-neutral:       #dfdf15;
    --color-warning:       #b45309;
    --color-info:          #1e5fa8;

    /* Tier colors (for rankings, matchups, etc.) */
    --color-tier-elite:    #1f6f43;
    --color-tier-good:     #4d8b5f;
    --color-tier-avg:      #6b6b66;
    --color-tier-poor:     #b45309;
    --color-tier-bad:      #b91c1c;

    /* Typography */
    --font-sans:  equity_ot_a, Georgia, serif; /*Roboto, "Helvetica Neue", Arial, sans-serif;*/
    --font-mono:  triplicate_a, ui-monospace, "SF Mono", monospace;

    --fs-xs:   0.75rem;
    --fs-sm:   0.875rem;
    --fs-base: 1.1rem;
    --fs-md:   1.15rem;
    --fs-lg:   1.375rem;
    --fs-xl:   1.75rem;
    --fs-2xl:  2.25rem;

    --lh-tight:  1.2;
    --lh-normal: 1.5;

    /* Spacing scale */
    --sp-1: 0.25rem;
    --sp-2: 0.5rem;
    --sp-3: 0.75rem;
    --sp-4: 1rem;
    --sp-5: 1.5rem;
    --sp-6: 2rem;
    --sp-7: 3rem;

    /* Layout */
    --container-max: 1200px;
    --radius-sm: 3px;
    --radius:    6px;
    --radius-lg: 10px;

    --border:    1px solid var(--color-border);

    --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
    --shadow:    0 2px 6px rgba(0,0,0,0.06);
}

/* Optional dark theme — add class="dark" to <html> */
.dark {
    --color-bg:            #121413;
    --color-surface:       #1b1e1c;
    --color-surface-alt:   #232725;
    --color-border:        #2e3331;
    --color-border-strong: #3f4541;

    --color-text:          #ececea;
    --color-text-muted:    #a8a8a3;
    --color-text-subtle:   #75756f;

    --color-primary:       #4ea374;
    --color-primary-hover: #5fb285;
    --color-primary-text:  #0d100e;
}

/* =========================================================
   RESET / BASE
   ========================================================= */

:focus
{
    /* remove the stupid blue border on fresh load */
    outline: 0;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    font-family: var(--font-sans);
    font-size: var(--fs-base);
    line-height: var(--lh-normal);
    color: var(--color-text);
    background: var(--color-bg);
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
    margin: 0 0 var(--sp-3);
    line-height: var(--lh-tight);
    font-weight: 600;
    letter-spacing: -0.01em;
}
h1 { font-size: var(--fs-2xl); }
h2 { font-size: var(--fs-xl); }
h3 { font-size: var(--fs-lg); }
h4 { font-size: var(--fs-md); }

p { margin: 0 0 var(--sp-4); }

a {
    color: var(--color-text);
    text-decoration: none;
}
a:hover { 
    text-decoration: underline;
    color:black;
}

small, .text-sm { font-size: var(--fs-sm); }
.text-xs       { font-size: var(--fs-xs); }
.text-muted    { color: var(--color-text-muted); }
.text-subtle   { color: var(--color-text-subtle); }
.text-mono     { font-family: var(--font-mono); }
.text-right    { text-align: right; }
.text-center   { text-align: center; }

hr {
    border: 0;
    border-top: var(--border);
    margin: var(--sp-5) 0;
}

.blink-it {
    animation: blinker 1.5s linear infinite;
}

@keyframes blinker {
    50% {
        opacity: 0;
    }
}

/* =========================================================
   LAYOUT
   ========================================================= */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--sp-4);
}

.site-header {
    background: var(--color-surface);
    border-bottom: var(--border);
    top: 0;
    z-index: 50;
}

.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: var(--sp-5);
    padding: var(--sp-3) var(--sp-4);
    max-width: var(--container-max);
    margin: 0 auto;
    flex-wrap: wrap;
}

.site-header__inner div:last-child {
    margin-left: auto;
}

.brand {
    font-size: var(--fs-md);
    font-weight: 700;
    color: var(--color-text);
    letter-spacing: -0.02em;
    margin-right: auto; /* pushes hamburger to the right on mobile */
}
.brand span { color: var(--color-primary); }

/*------------------ Blazor Type Crap -----------------------------*/
#blazor-error-ui {
    background: var(--color-negative);
    color:var(--color-tier-bad);
    font-weight: bolder;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    width: 100%;
    z-index: 1000;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

.loading-progress {
    position: relative;
    display: block;
    width: 8rem;
    height: 8rem;
    margin: 20vh auto 1rem auto;
}

.loading-progress circle {
    fill: none;
    stroke: #4A8FE7;
    stroke-width: 0.6rem;
    transform-origin: 50% 50%;
    transform: rotate(-90deg);
}

.loading-progress circle:last-child {
    stroke: #F6AE2D;
    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: "Charging";
}
/***************/

/* ---------- Header menu wrapper ---------- */
.site-header__menu {
    display: flex;
    align-items: center;
    gap: var(--sp-5);
    flex: 1 1 auto;
    justify-content: space-between;
}

.site-header__actions {
    display: flex;
    gap: var(--sp-3);
    align-items: center;
}

.main-nav ul {
    list-style: none;
    display: flex;
    gap: var(--sp-5);
    margin: 0;
    padding: 0;
}
.main-nav a {
    color: var(--color-text-muted);
    font-size: var(--fs-sm);
    font-weight: 500;
}
.main-nav a:hover,
.main-nav a[aria-current="page"] {
    color: var(--color-text);
    text-decoration: none;
}

/* ---------- Hamburger button (CSS-only toggle) ---------- */
/* Hide the checkbox itself — but keep it focusable */
.nav-toggle {
    position: absolute;
    opacity: 0;
    pointer-events: none;
    width: 1px;
    height: 1px;
}

.nav-toggle-btn {
    display: none; /* shown only at mobile breakpoint */
    width: 40px;
    height: 40px;
    border-radius: var(--radius);
    cursor: pointer;
    position: relative;
    border: 1px solid transparent;
}
.nav-toggle-btn:hover { background: var(--color-surface-alt); }

.nav-toggle-btn__bar {
    position: absolute;
    left: 9px;
    right: 9px;
    height: 2px;
    background: var(--color-text);
    border-radius: 2px;
    transition: transform 0.2s ease, opacity 0.2s ease, top 0.2s ease;
}
.nav-toggle-btn__bar:nth-child(1) { top: 13px; }
.nav-toggle-btn__bar:nth-child(2) { top: 19px; }
.nav-toggle-btn__bar:nth-child(3) { top: 25px; }

/* Keyboard focus ring on the label when the checkbox is focused */
.nav-toggle:focus-visible + .nav-toggle-btn {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

/* Animate to an "X" when open */
.nav-toggle:checked + .nav-toggle-btn .nav-toggle-btn__bar:nth-child(1) {
    top: 19px;
    transform: rotate(45deg);
}
.nav-toggle:checked + .nav-toggle-btn .nav-toggle-btn__bar:nth-child(2) {
    opacity: 0;
}
.nav-toggle:checked + .nav-toggle-btn .nav-toggle-btn__bar:nth-child(3) {
    top: 19px;
    transform: rotate(-45deg);
}

main { padding: var(--sp-6) 0; }

section { margin-bottom: var(--sp-5); }

.section-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: var(--sp-4);
    margin-bottom: var(--sp-4);
    padding-bottom: var(--sp-3);
    border-bottom: var(--border);
}
.section-header h2 { margin: 0; }

.site-footer {
    border-top: var(--border);
    padding: var(--sp-5) 0;
    color: var(--color-text-subtle);
    font-size: var(--fs-sm);
    text-align: center;
}

/* Grid helpers */
.grid {
    display: grid;
    gap: var(--sp-4);
}
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 800px) {
    .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 500px) {
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

/* =========================================================
   CARD
   ========================================================= */
.card {
    background: var(--color-surface);
    border: var(--border);
    border-radius: var(--radius);
    padding: var(--sp-4);
    box-shadow: var(--shadow-sm);
}
.card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--sp-3);
    margin-bottom: var(--sp-3);
}
.card__title {
    font-size: var(--fs-sm);
    font-weight: 600;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0;
}

/* =========================================================
   STAT / METRIC TILES
   ========================================================= */
.stat {
    background: var(--color-surface);
    border: var(--border);
    border-radius: var(--radius);
    padding: var(--sp-4);
}
.stat__label {
    font-size: var(--fs-xs);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-text-subtle);
    margin-bottom: var(--sp-2);
}
.stat__value {
    font-size: var(--fs-2xl);
    font-weight: 700;
    font-family: var(--font-mono);
    line-height: 1;
    color: var(--color-text);
}
.stat__meta {
    margin-top: var(--sp-2);
    font-size: var(--fs-sm);
    color: var(--color-text-muted);
}
.stat__delta {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: var(--fs-sm);
    font-weight: 600;
    margin-left: var(--sp-2);
}
.stat__delta.up   { color: var(--color-positive); }
.stat__delta.down { color: var(--color-negative); }

/* =========================================================
   BADGES / PILLS
   ========================================================= */
.badge {
    display: inline-block;
    padding: 2px 8px;
    font-size: var(--fs-xs);
    font-weight: 600;
    border-radius: 999px;
    background: var(--color-surface-alt);
    color: var(--color-text-muted);
    border: 1px solid var(--color-border);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    line-height: 1.5;
}
.badge--pos  { background: rgba(31,111,67,0.1);  color: var(--color-positive); border-color: transparent; }
.badge--neg  { background: rgba(185,28,28,0.1);  color: var(--color-negative); border-color: transparent; }
.badge--warn { background: rgba(180,83,9,0.1);   color: var(--color-warning);  border-color: transparent; }
.badge--info { background: rgba(30,95,168,0.1);  color: var(--color-info);     border-color: transparent; }

/* Position badges */
.pos {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: var(--fs-xs);
    font-weight: 700;
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    color: #fff;
    letter-spacing: 0.05em;
}
.pos-qb { background: #b91c1c; }
.pos-rb { background: #1f6f43; }
.pos-wr { background: #1e5fa8; }
.pos-te { background: #b45309; }
.pos-k  { background: #6b6b66; }
.pos-dst{ background: #4b3b8f; }

/* Tier indicator dots */
.tier {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    vertical-align: middle;
}
.tier-1 { background: var(--color-tier-elite); }
.tier-2 { background: var(--color-tier-good); }
.tier-3 { background: var(--color-tier-avg); }
.tier-4 { background: var(--color-tier-poor); }
.tier-5 { background: var(--color-tier-bad); }

/* =========================================================
   BUTTONS
   ========================================================= */
.btn {
    display: inline-block;
    font: inherit;
    font-size: var(--fs-sm);
    font-weight: 500;
    padding: var(--sp-2) var(--sp-4);
    border-radius: var(--radius);
    border: 1px solid var(--color-border-strong);
    background: var(--color-surface);
    color: var(--color-text);
    cursor: pointer;
    text-decoration: none;
    line-height: 1.4;
    transition: background 0.15s, border-color 0.15s;
}
.btn:hover { background: var(--color-surface-alt); text-decoration: none; }

.filters a.btn { 
    font-size: var(--fs-sm); 
    padding: var(--sp-1) var(--sp-3); 
}

.btn--primary {
    background: var(--color-primary);
    color: var(--color-primary-text);
    border-color: var(--color-primary);
}
.btn--primary:hover {
    background: var(--color-primary-hover);
    border-color: var(--color-primary-hover);
}

.btn--ghost {
    background: transparent;
    border-color: transparent;
    color: var(--color-text-muted);
}
.btn--ghost:hover { background: var(--color-surface-alt); color: var(--color-text); }

.btn--sm { padding: 4px 10px; font-size: var(--fs-xs); }

.btn-group {
    display: inline-flex;
    border: 1px solid var(--color-border-strong);
    border-radius: var(--radius);
    overflow: hidden;
}
.btn-group .btn {
    border: 0;
    border-radius: 0;
    border-right: 1px solid var(--color-border-strong);
}
.btn-group .btn:last-child { border-right: 0; }
.btn-group .btn[aria-pressed="true"] {
    background: var(--color-primary);
    color: var(--color-primary-text);
}

/* =========================================================
   FORMS
   ========================================================= */
.form-row {
    display: flex;
    flex-wrap: wrap;
    gap: var(--sp-3);
    align-items: end;
}
.form-field {
    display: flex;
    flex-direction: column;
    gap: var(--sp-1);
    min-width: 160px;
    flex: 1 1 160px;
}
label {
    font-size: var(--fs-xs);
    font-weight: 600;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
input[type="text"],
input[type="search"],
input[type="number"],
select,
textarea {
    font: inherit;
    font-size: var(--fs-sm);
    padding: var(--sp-2) var(--sp-3);
    border: 1px solid var(--color-border-strong);
    border-radius: var(--radius);
    background: var(--color-surface);
    color: var(--color-text);
    width: 100%;
}
input:focus, select:focus, textarea:focus {
    outline: 2px solid var(--color-primary);
    outline-offset: -1px;
    border-color: var(--color-primary);
}

/* =========================================================
   TABLES
   ========================================================= */
.table-wrap {
    overflow-x: auto;
    border: var(--border);
    border-radius: var(--radius);
    background: var(--color-surface);
}
table.data {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--fs-sm);
}
table.data th,
table.data td {
    padding: var(--sp-3) var(--sp-3);
    text-align: left;
    border-bottom: 1px solid var(--color-border);
    white-space: nowrap;
}
table.data thead th {
    font-size: var(--fs-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--color-text-muted);
    background: var(--color-surface-alt);
    border-bottom: 1px solid var(--color-border-strong);
    position: sticky;
    top: 0;
}
table.data tbody tr:hover {
    background: var(--color-surface-alt);
}
table.data tbody tr:last-child td { border-bottom: 0; }

table.data .num {
    font-family: var(--font-mono);
    text-align: right;
}
table.data .player {
    display: flex;
    align-items: center;
    gap: var(--sp-2);
    font-weight: 500;
}
table.data .player small {
    color: var(--color-text-subtle);
    font-weight: 400;
}

/* =========================================================
   GAME / MATCHUP CARDS (Vegas odds)
   ========================================================= */
.game {
    background: var(--color-surface);
    border: var(--border);
    border-radius: var(--radius);
    padding: var(--sp-4);
}
.game__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: var(--fs-xs);
    color: var(--color-text-subtle);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: var(--sp-3);
}
.game__teams {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: var(--sp-3);
    margin-bottom: var(--sp-4);
}
.team {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.team--away { text-align: right; }
.team__abbr {
    font-size: var(--fs-lg);
    font-weight: 700;
    font-family: var(--font-mono);
    letter-spacing: 0.04em;
}
.team__record {
    font-size: var(--fs-xs);
    color: var(--color-text-subtle);
}
.game__vs {
    font-size: var(--fs-xs);
    color: var(--color-text-subtle);
    text-transform: uppercase;
}

.odds-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--sp-2);
    border-top: var(--border);
    padding-top: var(--sp-3);
}
.odds {
    text-align: center;
}
.odds__label {
    font-size: var(--fs-xs);
    text-transform: uppercase;
    color: var(--color-text-subtle);
    letter-spacing: 0.05em;
}
.odds__value {
    font-family: var(--font-mono);
    font-size: var(--fs-md);
    font-weight: 600;
    margin-top: 2px;
}

/* =========================================================
   ALERTS
   ========================================================= */
.alert {
    padding: var(--sp-3) var(--sp-4);
    border-radius: var(--radius);
    border-left: 3px solid var(--color-info);
    background: var(--color-surface-alt);
    font-size: var(--fs-sm);
    margin-bottom: var(--sp-4);
}
.alert--warn { border-color: var(--color-warning); }
.alert--neg  { border-color: var(--color-negative); }
.alert--pos  { border-color: var(--color-positive); }
.alert strong { display: block; margin-bottom: 2px; }

/* =========================================================
   PROGRESS / BAR CHART
   ========================================================= */
.bar {
    position: relative;
    background: var(--color-surface-alt);
    border-radius: var(--radius-sm);
    height: 6px;
    overflow: hidden;
}
.bar__fill {
    height: 100%;
    background: var(--color-primary);
    border-radius: var(--radius-sm);
}

/* =========================================================
   TABS
   ========================================================= */
.tabs {
    display: flex;
    gap: var(--sp-1);
    border-bottom: var(--border);
    margin-bottom: var(--sp-4);
}
.tabs button {
    background: none;
    border: 0;
    font: inherit;
    font-size: var(--fs-sm);
    font-weight: 500;
    color: var(--color-text-muted);
    padding: var(--sp-3) var(--sp-4);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
}
.tabs button:hover { color: var(--color-text); }
.tabs button[aria-selected="true"] {
    color: var(--color-text);
    border-bottom-color: var(--color-primary);
}

/* =========================================================
   UTILITY
   ========================================================= */
.row { display: flex; gap: var(--sp-3); align-items: center; flex-wrap: wrap; }
.between { justify-content: space-between; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.mb-2 { margin-bottom: var(--sp-2); }
.mb-4 { margin-bottom: var(--sp-4); }

/* ---------- Mobile breakpoint ---------- */
@media (max-width: 760px) {
    .nav-toggle-btn { display: block; }

    body { font-size: var(--fs-sm); }
    h1 { font-size: var(--fs-xl); }
    h2 { font-size: var(--fs-lg); }
    h3 { font-size: var(--fs-md); }
    h4 { font-size: var(--fs-sm); }
    .filters a.btn {
        font-size: var(--fs-xs);
        padding: var(--sp-1) var(--sp-2);
    }

    /* Collapse the menu by default */
    .site-header__menu {
        flex-basis: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: var(--sp-3);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.25s ease, padding 0.25s ease;
        padding: 0;
    }

    /* Expand when checkbox is checked */
    .nav-toggle:checked ~ .site-header__menu {
        max-height: 600px; /* large enough for content */
        padding: var(--sp-3) 0 var(--sp-2);
        border-top: var(--border);
        margin-top: var(--sp-2);
    }

    .main-nav ul {
        flex-direction: column;
        gap: 0;
    }
    .main-nav li { border-bottom: 1px solid var(--color-border); }
    .main-nav li:last-child { border-bottom: 0; }
    .main-nav a {
        display: block;
        padding: var(--sp-3) var(--sp-2);
        font-size: var(--fs-base);
    }

    .site-header__actions {
        padding: var(--sp-2) 0 0;
        border-top: var(--border);
        justify-content: stretch;
    }
    .site-header__actions .btn { flex: 1; text-align: center; }
}