/* Tennis Gauge — site styles
   Palette from a hard court: court blue, lighter court, white lines, optic-yellow ball. */

:root {
    --court: #1E3A5F;
    --court-deep: #152B47;
    --court-light: #4F7BAA;
    --line: #FFFFFF;
    --ball: #E4F34A;
    --page: #F2F5F8;
    --surface: #FFFFFF;
    --ink: #17212B;
    --ink-soft: #55616D;
    --ink-faint: #8A949E;
    --rule: #DCE3EA;
    --win: #1F7A45;
    --win-bg: #E6F4EC;
    --loss: #B2392F;
    --loss-bg: #FBEAE8;

    --display: "Barlow Condensed", "Arial Narrow", sans-serif;
    --body: "Barlow", "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }

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

body {
    margin: 0;
    background: var(--page);
    color: var(--ink);
    font-family: var(--body);
    font-size: 16px;
    line-height: 1.5;
}

a { color: var(--court-light); }
a:hover { color: var(--court); }
:focus-visible { outline: 3px solid var(--ball); outline-offset: 2px; border-radius: 2px; }

h1, h2, h3 {
    font-family: var(--display);
    font-weight: 600;
    line-height: 1.1;
    color: var(--court);
    margin: 0 0 .5em;
}
h1 { font-size: 2.6rem; letter-spacing: -.01em; }
h2 { font-size: 1.7rem; margin-top: 1.4em; }
h3 { font-size: 1.3rem; }

/* ---------- Header ---------- */

.site-header {
    background: var(--court);
    border-bottom: 3px solid var(--line);
}
.site-header-inner {
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    gap: 32px;
    min-height: 60px;
    flex-wrap: wrap;
}
.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--line);
    text-decoration: none;
    font-family: var(--display);
    font-size: 1.65rem;
    font-weight: 700;
    letter-spacing: .01em;
}
.brand:hover { color: var(--line); }
.brand svg { flex: none; }
.site-nav { display: flex; gap: 4px; flex-wrap: wrap; }
.site-nav a {
    color: #C9D6E5;
    text-decoration: none;
    font-weight: 500;
    padding: 6px 12px;
    border-radius: 4px;
}
.site-nav a:hover { color: var(--line); background: var(--court-deep); }
.site-nav a[aria-current="page"] { color: var(--line); box-shadow: inset 0 -3px 0 var(--ball); border-radius: 0; }

/* ---------- Page layout ---------- */

.page-layout {
    max-width: 1320px;
    margin: 0 auto;
    padding: 28px 20px 40px;
    display: flex;
    align-items: flex-start;
    gap: 28px;
}
.page-layout > .content {
    flex: 1;
    min-width: 0;
    overflow-x: auto;
}

.site-footer {
    border-top: 1px solid var(--rule);
    color: var(--ink-faint);
    font-size: 14px;
}
.site-footer p { max-width: 1320px; margin: 0 auto; padding: 18px 20px 28px; }

/* ---------- Tables ---------- */

table {
    border-collapse: collapse;
    background: var(--surface);
    font-size: 15px;
    font-variant-numeric: tabular-nums;
    border: 1px solid var(--rule);
}
th {
    background: var(--court);
    color: var(--line);
    font-family: var(--display);
    font-weight: 600;
    font-size: 15px;
    letter-spacing: .02em;
    text-align: left;
    padding: 8px 10px;
    white-space: nowrap;
}
th[onclick] { cursor: pointer; text-decoration: underline dotted rgba(255,255,255,.5); text-underline-offset: 4px; }
td {
    padding: 7px 10px;
    border-top: 1px solid var(--rule);
    vertical-align: top;
}
tbody tr:hover td, table tr:hover td { background: #F5F8FB; }
td a { color: var(--court); font-weight: 500; text-decoration: none; }
td a:hover { text-decoration: underline; }

/* Match effect rows on player pages */
tr.effect-positive td { background: var(--win-bg); }
tr.effect-negative td { background: var(--loss-bg); }
tr.effect-suppressed td { color: var(--ink-faint); }

/* ---------- Value Plays panel (every page except home) ---------- */

.value-panel {
    flex: 0 0 290px;
    position: sticky;
    top: 16px;
    background: var(--surface);
    border: 1px solid var(--rule);
    border-top: 4px solid var(--court);
    border-radius: 6px;
    font-size: 14px;
}
.value-panel h2 { margin: 0; padding: 14px 16px 2px; font-size: 1.35rem; }
.vp-sub { padding: 0 16px 12px; color: var(--ink-soft); font-size: 13px; border-bottom: 1px solid var(--rule); }
.vp-list { list-style: none; margin: 0; padding: 0; }
.vp-item { padding: 11px 16px; border-bottom: 1px solid var(--rule); }
.vp-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.vp-rank { color: var(--ink-faint); font-size: 12px; margin-right: 4px; }
.vp-player { font-weight: 600; color: var(--court); text-decoration: none; }
.vp-player:hover { text-decoration: underline; }
.vp-odds {
    font-family: var(--display);
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--court);
    background: var(--ball);
    border-radius: 3px;
    padding: 0 7px;
    white-space: nowrap;
}
.vp-vs { color: var(--ink-soft); margin-top: 2px; }
.vp-vs a { color: inherit; }
.vp-stats { display: flex; gap: 12px; margin-top: 4px; font-size: 12.5px; color: var(--ink-soft); }
.vp-stats b { color: var(--ink); }
.vp-meta { margin-top: 3px; font-size: 12px; color: var(--ink-faint); }
.vp-empty { padding: 16px; color: var(--ink-soft); }
.vp-footer { display: block; padding: 11px 16px; font-size: 14px; font-weight: 500; }

/* ---------- Home ---------- */

.home-hero {
    position: relative;
    background: var(--court);
    color: var(--line);
    overflow: hidden;
}
/* Court markings: baseline, singles sideline, service line, centre service line */
.home-hero::before {
    content: "";
    position: absolute;
    inset: 28px -40px -40px 52%;
    border: 2px solid rgba(255,255,255,.14);
    border-bottom: none;
    pointer-events: none;
}
.home-hero::after {
    content: "";
    position: absolute;
    top: 46%;
    left: 52%;
    right: -40px;
    bottom: -40px;
    border-top: 2px solid rgba(255,255,255,.14);
    background: linear-gradient(rgba(255,255,255,.14), rgba(255,255,255,.14)) no-repeat 50% 0 / 2px 100%;
    pointer-events: none;
}
.home-hero-inner {
    position: relative;
    z-index: 1;
    max-width: 1320px;
    margin: 0 auto;
    padding: 44px 20px 48px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
    gap: 40px;
    align-items: center;
}
.home-hero h1 {
    color: var(--line);
    font-size: clamp(3rem, 7vw, 5.2rem);
    font-weight: 700;
    line-height: .95;
    margin: 0 0 14px;
}
.home-hero .lede { font-size: 1.15rem; color: #D3DEEA; max-width: 34em; margin: 0 0 26px; }
.slate { display: flex; flex-wrap: wrap; gap: 10px 28px; margin: 0; padding: 0; list-style: none; color: #D3DEEA; }
.slate b { display: block; font-family: var(--display); font-size: 2rem; font-weight: 600; color: var(--line); line-height: 1.1; }
.hero-links { margin-top: 26px; display: flex; flex-wrap: wrap; gap: 10px; }
.btn {
    display: inline-block;
    padding: 9px 18px;
    border-radius: 4px;
    font-weight: 600;
    text-decoration: none;
}
.btn-primary { background: var(--ball); color: var(--court-deep); }
.btn-primary:hover { background: #F0FA86; color: var(--court-deep); }
.btn-quiet { color: var(--line); border: 1px solid rgba(255,255,255,.45); }
.btn-quiet:hover { color: var(--line); background: var(--court-deep); }

.gauge-card {
    background: var(--court-deep);
    border: 1px solid rgba(255,255,255,.18);
    border-radius: 8px;
    padding: 22px 24px 20px;
}
.gauge-card h2 { color: var(--line); font-size: 1.25rem; margin: 0 0 2px; font-weight: 500; }
.gauge-card .gc-sub { color: #AFC1D5; font-size: 14px; margin: 0; }
.gauge-row { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.gauge-svg { width: 260px; max-width: 100%; height: auto; flex: none; }
.gauge-read { flex: 1; min-width: 180px; }
.gauge-player { font-family: var(--display); font-size: 2.1rem; font-weight: 700; line-height: 1; color: var(--line); text-decoration: none; }
.gauge-player:hover { color: var(--ball); }
.gauge-vs { color: #AFC1D5; margin: 4px 0 14px; }
.gauge-vs a { color: inherit; }
.gauge-legend { margin: 0; padding: 0; list-style: none; font-size: 15px; }
.gauge-legend li { display: flex; align-items: center; gap: 8px; margin: 3px 0; color: #D3DEEA; }
.gauge-legend b { color: var(--line); }
.swatch { width: 14px; height: 4px; border-radius: 2px; flex: none; }
.swatch-model { background: var(--ball); }
.swatch-book { background: #8FB0D3; }
.gauge-odds { font-family: var(--display); font-size: 1.1rem; font-weight: 700; background: var(--ball); color: var(--court-deep); padding: 0 8px; border-radius: 3px; }
.more-plays { list-style: none; margin: 18px 0 0; padding: 14px 0 0; border-top: 1px solid rgba(255,255,255,.16); }
.more-plays li { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; color: #D3DEEA; font-size: 15px; }
.more-plays a { color: var(--line); font-weight: 500; text-decoration: none; }
.more-plays a:hover { text-decoration: underline; }
.more-plays .mp-num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.more-plays .mp-num b { color: var(--ball); font-family: var(--display); font-size: 1.05rem; }

.home-body {
    max-width: 1320px;
    margin: 0 auto;
    padding: 36px 20px 20px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr)) minmax(240px, .8fr);
    gap: 28px;
}
.home-body h2 { margin-top: 0; }
.board table { width: 100%; }
.board td.num, .board th.num { text-align: right; }
.board .see-all { display: inline-block; margin-top: 10px; font-weight: 500; }
.streaks { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--rule); }
.streaks li { display: flex; align-items: baseline; gap: 12px; padding: 9px 14px; border-top: 1px solid var(--rule); }
.streaks li:first-child { border-top: none; }
.streaks .w { font-family: var(--display); font-size: 1.5rem; font-weight: 700; color: var(--win); min-width: 2ch; text-align: right; }
.streaks a { color: var(--court); font-weight: 500; text-decoration: none; }
.streaks a:hover { text-decoration: underline; }
.streaks small { color: var(--ink-faint); margin-left: auto; white-space: nowrap; }
.db-note { color: var(--ink-soft); font-size: 14px; margin-top: 14px; }

/* ---------- Small screens ---------- */

@media (max-width: 1100px) {
    .home-body { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .home-body .streak-col { grid-column: 1 / -1; }
}
@media (max-width: 900px) {
    .page-layout { flex-direction: column; align-items: stretch; }
    .page-layout > .content { width: 100%; }
    .value-panel { position: static; flex-basis: auto; width: 100%; }
    .home-hero-inner { grid-template-columns: 1fr; }
    .home-hero::before, .home-hero::after { left: 30%; }
    .home-body { grid-template-columns: 1fr; }
    h1 { font-size: 2.1rem; }
}
@media (max-width: 560px) {
    .site-header-inner { gap: 6px 16px; padding: 10px 16px; }
    .page-layout, .home-hero-inner, .home-body { padding-left: 16px; padding-right: 16px; }
    .gauge-card { padding: 18px 16px; }
}

/* ---------- Player page ---------- */
.player-stats {
    list-style: none;
    margin: 0 0 8px;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    background: var(--surface);
    border: 1px solid var(--rule);
    border-left: 4px solid var(--court);
    width: fit-content;
    max-width: 100%;
}
.player-stats li { padding: 10px 22px 10px 16px; border-left: 1px solid var(--rule); }
.player-stats li:first-child { border-left: none; }
.player-stats span { display: block; font-size: 13px; color: var(--ink-soft); }
.player-stats b { font-family: var(--display); font-size: 1.6rem; font-weight: 600; color: var(--court); line-height: 1.1; }
.match-table td { white-space: nowrap; }

/* ---------- Sortable tables (daily matches) ---------- */
.sort-hint { color: var(--ink-soft); margin-top: -4px; }
table.sortable th { padding: 0; }
.sort-btn {
    all: unset;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    gap: 6px;
    width: 100%;
    padding: 8px 10px;
    cursor: pointer;
    white-space: nowrap;
    font: inherit;
    color: inherit;
}
.sort-btn::after {
    content: "\2195";               /* up-down arrow: sortable */
    font-size: 12px;
    opacity: .45;
}
.sort-btn:hover { background: var(--court-deep); }
.sort-btn:focus-visible { outline: 3px solid var(--ball); outline-offset: -3px; }
th[aria-sort="ascending"] .sort-btn::after { content: "\25B2"; opacity: 1; color: var(--ball); }
th[aria-sort="descending"] .sort-btn::after { content: "\25BC"; opacity: 1; color: var(--ball); }
table.sortable td { white-space: nowrap; }
table.sortable td:first-child { white-space: normal; min-width: 220px; }
.table-scroll { overflow-x: auto; max-width: 100%; border: 1px solid var(--rule); }
.table-scroll table { border: none; }

/* ---------- Footer with responsible-gambling note ---------- */
.site-footer .footer-inner { max-width: 1320px; margin: 0 auto; padding: 18px 20px 28px; }
.site-footer .footer-inner p { margin: 0 0 8px; padding: 0; max-width: 80ch; }
.site-footer a { color: var(--ink-soft); }
.footer-rg { font-size: 13px; }
.vp-note { margin: 0; padding: 0 16px 12px; font-size: 12px; color: var(--ink-faint); }
.vp-note a { color: var(--ink-soft); }

/* ---------- How it works ---------- */
.prose { max-width: 72ch; font-size: 17px; line-height: 1.6; }
.prose h2 { margin-top: 1.8em; }
.prose ul { padding-left: 1.2em; }
.prose li { margin: .35em 0; }
.lede-dark { font-size: 1.2rem; color: var(--ink-soft); }
.formula {
    background: var(--surface);
    border: 1px solid var(--rule);
    border-left: 4px solid var(--ball);
    padding: 12px 18px;
    margin: 1em 0;
    font-variant-numeric: tabular-nums;
}
.formula p { margin: .25em 0; }
.odds-table { margin: 1em 0; }
.odds-table td, .odds-table th { padding-right: 24px; }
.glossary dt { font-family: var(--display); font-weight: 600; font-size: 1.15rem; color: var(--court); margin-top: .8em; }
.glossary dd { margin: .1em 0 0; }
.rg-box {
    margin-top: 2.4em;
    padding: 6px 22px 14px;
    background: var(--surface);
    border: 1px solid var(--rule);
    border-top: 4px solid var(--court);
}
.rg-box h2 { margin-top: .6em; }

/* ---------- Header player search ---------- */
.visually-hidden {
    position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.player-search {
    position: relative;
    margin-left: auto;
    width: 260px;
    max-width: 100%;
}
.player-search .ps-icon {
    position: absolute;
    left: 11px;
    top: 50%;
    transform: translateY(-50%);
    color: #9FB3C9;
    pointer-events: none;
}
.player-search input {
    width: 100%;
    height: 38px;
    padding: 0 12px 0 34px;
    border: 1px solid rgba(255,255,255,.28);
    border-radius: 6px;
    background: var(--court-deep);
    color: var(--line);
    font: inherit;
    font-size: 15px;
}
.player-search input::placeholder { color: #9FB3C9; }
.player-search input:focus { outline: none; border-color: var(--ball); box-shadow: 0 0 0 2px rgba(228,243,74,.35); }
.player-search input::-webkit-search-cancel-button { filter: invert(1); opacity: .6; }
.ps-list {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    width: max(100%, 320px);
    max-height: 360px;
    overflow-y: auto;
    margin: 0;
    padding: 4px 0;
    list-style: none;
    background: var(--surface);
    border: 1px solid var(--rule);
    border-radius: 6px;
    box-shadow: 0 10px 28px rgba(21,43,71,.22);
    z-index: 50;
}
.ps-list li {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    padding: 8px 14px;
    cursor: pointer;
    color: var(--ink);
}
.ps-list li[aria-selected="true"] { background: #E8EFF7; }
.ps-list mark { background: none; color: var(--court); font-weight: 700; }
.ps-meta { color: var(--ink-faint); font-size: 13px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ps-list .ps-empty { cursor: default; color: var(--ink-soft); }

@media (max-width: 1100px) {
    .player-search { width: 220px; }
}
@media (max-width: 900px) {
    .player-search { width: 100%; margin: 0 0 10px; order: 3; }
    .ps-list { width: 100%; }
}

/* ---------- Match preview pages ---------- */
.crumbs { font-size: 14px; color: var(--ink-soft); margin-bottom: 6px; }
.crumbs a { color: var(--ink-soft); }
.match-title { font-size: clamp(2rem, 4.5vw, 3rem); margin-bottom: .2em; }
.match-title a { color: var(--court); text-decoration: none; }
.match-title a:hover { text-decoration: underline; }
.match-title .vs { color: var(--ink-faint); font-weight: 500; font-size: .7em; margin: 0 .15em; }
.match-meta { color: var(--ink-soft); margin: 0 0 18px; }
.result-banner { background: var(--win-bg); border-left: 4px solid var(--win); padding: 12px 16px; margin: 0 0 20px; }
.result-banner.muted { background: var(--surface); border-left-color: var(--rule); color: var(--ink-soft); }
.pred { background: var(--court); color: var(--line); border-radius: 8px; padding: 18px 22px 14px; margin: 0 0 8px; }
.pred h2 { color: var(--line); margin-top: 0; }
.pred-summary { color: #D3DEEA; margin: 0 0 16px; max-width: 70ch; }
.pred-summary strong { color: var(--line); }
.pred-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.pred-player { background: var(--court-deep); border: 1px solid rgba(255,255,255,.14); border-radius: 6px; padding: 14px 16px 10px; }
.pred-player.is-value { border-color: var(--ball); }
.pred-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 10px; }
.pred-name { font-family: var(--display); font-size: 1.5rem; font-weight: 700; color: var(--line); text-decoration: none; line-height: 1.1; }
.pred-name:hover { color: var(--ball); }
.mbars { display: grid; gap: 8px; }
.mbar-row { display: grid; grid-template-columns: 48px 1fr 44px; align-items: center; gap: 10px; font-size: 14px; color: #AFC1D5; }
.mbar-row b { color: var(--line); text-align: right; font-family: var(--display); font-size: 1.15rem; }
.mbar { height: 10px; background: rgba(255,255,255,.14); border-radius: 5px; overflow: hidden; }
.mbar i { display: block; height: 100%; border-radius: 5px; }
.mbar-model { background: var(--ball); }
.mbar-book { background: #8FB0D3; }
.pred-gap { margin: 10px 0 0; font-size: 14px; color: #AFC1D5; }
.pred-gap b { color: var(--line); }
.pred-note { margin: 12px 0 0; font-size: 13px; color: #AFC1D5; }
.pred-note a { color: #D3DEEA; }
.compare-table td:first-child { color: var(--ink-soft); }
.compare-table td { min-width: 160px; }
.h2h-line { font-weight: 600; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.form-grid h3 { margin-top: 0; }
.form-grid h3 a { color: var(--court); text-decoration: none; }
.past-list { padding-left: 1.2em; }
.past-list li { margin: 4px 0; }
.match-links { margin-top: 2em; }
.preview-link { font-size: 13px; font-weight: 500; }
.gauge-preview { display: inline-block; margin-top: 12px; color: var(--ball); font-weight: 600; }
.today-match { background: var(--surface); border: 1px solid var(--rule); border-left: 4px solid var(--ball); padding: 10px 14px; }
@media (max-width: 700px) {
    .pred-grid, .form-grid { grid-template-columns: 1fr; }
}
.match-page .table-scroll table { width: 100%; }
.match-page td { white-space: nowrap; }
.match-page .compare-table td, .match-page td small { white-space: normal; }

/* ---------- Quick answers (for readers, search engines and AI assistants) ---------- */
.updated-line { color: var(--ink-faint); font-size: 13px; margin: -10px 0 12px; }
.quick-answer {
    font-size: 1.08rem;
    line-height: 1.55;
    background: var(--surface);
    border: 1px solid var(--rule);
    border-left: 4px solid var(--ball);
    padding: 12px 16px;
    margin: 0 0 20px;
    max-width: 80ch;
}
.faq { max-width: 80ch; }
.faq h3 { font-family: var(--body); font-size: 1.05rem; font-weight: 600; color: var(--ink); margin: 1.1em 0 .25em; }
.faq p { margin: 0; color: var(--ink-soft); }

/* ---------- Track record ---------- */
.kpis { list-style: none; margin: 0 0 14px; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
.kpis li { background: var(--surface); border: 1px solid var(--rule); border-top: 4px solid var(--court); padding: 10px 14px 12px; }
.kpis span { display: block; font-size: 13px; color: var(--ink-soft); }
.kpis b { display: block; font-family: var(--display); font-size: 2rem; font-weight: 700; color: var(--court); line-height: 1.1; font-variant-numeric: tabular-nums; }
.kpis small { color: var(--ink-faint); font-size: 13px; }
.kpis li.is-up { border-top-color: var(--win); }
.kpis li.is-up b { color: var(--win); }
.kpis li.is-down { border-top-color: var(--loss); }
.kpis li.is-down b { color: var(--loss); }
.record-note { background: #FFF9DB; border-left: 4px solid #D9C21C; padding: 10px 14px; color: var(--ink); max-width: 80ch; font-size: 15px; }
.record-chart { margin: 0; background: var(--surface); border: 1px solid var(--rule); padding: 12px 12px 8px; max-width: 760px; }
.record-chart svg { width: 100%; height: auto; display: block; }
.record-chart figcaption { font-size: 13px; color: var(--ink-faint); margin-top: 4px; }
.rc-grid { stroke: var(--rule); stroke-width: 1; }
.rc-zero { stroke: var(--ink-faint); stroke-dasharray: 4 3; }
.rc-tick { font-size: 11px; fill: var(--ink-faint); font-family: var(--body); }
.rc-line { fill: none; stroke-width: 2.5; stroke-linejoin: round; }
.rc-line.up, .rc-dot.up { stroke: var(--win); fill: none; }
.rc-line.down, .rc-dot.down { stroke: var(--loss); fill: none; }
.rc-dot { stroke-width: 2.5; fill: var(--surface) !important; }
.rc-area { stroke: none; }
.rc-area.up { fill: rgba(31,122,69,.10); }
.rc-area.down { fill: rgba(178,57,47,.10); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
td.pos { color: var(--win); font-weight: 600; }
td.neg { color: var(--loss); font-weight: 600; }
tr.row-split td { border-top: 2px solid var(--rule); }
.calib-bar-col { min-width: 180px; }
.calib-bar { position: relative; height: 12px; background: #EDF1F5; border-radius: 6px; }
.calib-bar i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--court-light); border-radius: 6px; }
.calib-bar s { position: absolute; top: -3px; bottom: -3px; width: 0; border-left: 2px dotted var(--ink); }
.pill { display: inline-block; font-size: 12px; font-weight: 600; padding: 1px 8px; border-radius: 10px; background: #EDF1F5; color: var(--ink-soft); }
.pill-w { background: var(--win-bg); color: var(--win); }
.pill-l { background: var(--loss-bg); color: var(--loss); }
.record-table td small { color: var(--ink-faint); margin: 0 6px; }
.record-rules { margin-top: 1em; }
.vp-footer-2 { padding-top: 0; font-size: 13px; }
.footer-tools { font-size: 13px; }

/* ---------- Power rankings ---------- */
.pr-boards { display: grid; grid-template-columns: 1fr; gap: 24px; margin-top: 10px; max-width: 900px; }
.pr-board table { width: 100%; }
.pr-board td { white-space: nowrap; }
.pr-note { display: block; color: var(--ink-faint); font-size: 12px; font-weight: 400; }
.streaks .pr-note { display: inline; margin-left: 4px; }
.mv { font-size: 12.5px; color: var(--ink-faint); font-variant-numeric: tabular-nums; white-space: nowrap; }
.mv-up { color: var(--win); font-weight: 600; }
.mv-down { color: var(--loss); font-weight: 600; }
.mv-new { color: var(--court-light); font-weight: 600; }
.movers-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.movers { background: var(--surface); border: 1px solid var(--rule); border-top: 4px solid var(--win); padding: 6px 16px 10px; }
.movers.is-down { border-top-color: var(--loss); }
.movers h3 { margin: 6px 0 4px; }
.movers ol { margin: 0; padding-left: 1.3em; }
.movers li { margin: 7px 0; }
.movers li a { color: var(--court); font-weight: 600; text-decoration: none; }
.movers li a:hover { text-decoration: underline; }
.movers small { display: block; color: var(--ink-faint); font-size: 13px; }
.mv-delta { font-family: var(--display); font-weight: 700; font-size: 1.1rem; margin-left: 6px; }
.movers.is-up .mv-delta { color: var(--win); }
.movers.is-down .mv-delta { color: var(--loss); }
.pr-foot { font-size: 13px; color: var(--ink-faint); }
.h2-sub { font-family: var(--body); font-size: 14px; font-weight: 400; color: var(--ink-faint); }
.pr-weeks ul { columns: 2; padding-left: 1.2em; }
@media (max-width: 1000px) { .movers-grid { grid-template-columns: 1fr; } }

/* ---------- Calculators ---------- */
.calc { background: var(--surface); border: 1px solid var(--rule); border-top: 4px solid var(--ball); padding: 18px 18px 8px; margin: 0 0 28px; max-width: 860px; }
.calc-grid { display: grid; gap: 14px; }
.calc-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.calc-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.calc-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.calc-field span { display: block; font-weight: 600; font-size: 14px; margin-bottom: 4px; }
.calc-field input { width: 100%; font: inherit; font-size: 1.35rem; font-family: var(--display); font-weight: 600; padding: 8px 10px; border: 1px solid var(--rule); border-radius: 4px; color: var(--court); background: #FAFCFD; }
.calc-field input:focus { outline: none; border-color: var(--court-light); box-shadow: 0 0 0 3px rgba(79,123,170,.2); }
.calc-field small { display: block; color: var(--ink-faint); font-size: 12px; margin-top: 3px; }
.calc-note { color: var(--ink-soft); margin: 12px 0 10px; }
.calc-note b { color: var(--ink); }
.calc-out { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--rule); }
.calc-out.is-up #ev-dollars, .calc-out.is-up #ev-roi { color: var(--win); }
.calc-out.is-down #ev-dollars, .calc-out.is-down #ev-roi { color: var(--loss); }
.calc-table { width: auto; min-width: 320px; }
.kpis-calc li { border-top-width: 1px; }
.kpis-calc b { font-size: 1.6rem; }
.tool-prose { margin-top: 10px; }
.tool-links li { margin: .4em 0; }
.tool-rg { font-size: 14px; color: var(--ink-faint); }
.tool-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; margin: 10px 0 22px; }
.tool-card { display: block; background: var(--surface); border: 1px solid var(--rule); border-top: 4px solid var(--ball); padding: 14px 16px; text-decoration: none; color: var(--ink-soft); }
.tool-card b { display: block; font-family: var(--display); font-size: 1.4rem; color: var(--court); margin-bottom: 4px; }
.tool-card:hover { border-color: var(--court-light); }
@media (max-width: 700px) { .calc-3, .calc-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 420px) { .calc-2, .calc-3, .calc-4 { grid-template-columns: 1fr; } }
.record-table td { white-space: nowrap; }

/* Header fits the longer menu on one line */
.site-header-inner { gap: 20px; }
.site-nav a { padding: 6px 10px; }
@media (max-width: 1360px) { .player-search { width: 200px; } }
@media (max-width: 900px) { .player-search { width: 100%; } }
