/* Layout: the Ecomm Cowboy run of show look. Navy masthead, off white page,
   white cards, wide Archivo caps for labels, Yellowtail script as a sparing accent,
   red starbursts for ranks and standout scores. */
/* One look in every theme: the show cover. Navy ground, white type, red accent. */
:root {
  --bg: #1b344a;
  --surface: #223f59;
  --ink: #ffffff;
  --ink-2: #d3dde7;
  --ink-3: #a9bccd;
  --line: #36536e;
  --soft: #2c4b67;
  --navy: #142a3d;
  --on-navy: #ffffff;
  --sky: #86aed6;
  --red: #ea2d00;
  --on-red: #ffffff;
  --chart: #ffffff;
  --display: "Archivo", "Arial Black", sans-serif;
  --script: "Yellowtail", "Brush Script MT", cursive;
  --body: "Inter", "Segoe UI", system-ui, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font: 15px/1.5 var(--body); }
[hidden] { display: none !important; }
button { font: inherit; cursor: pointer; }
button:focus-visible, select:focus-visible, input:focus-visible, a:focus-visible { outline: 3px solid var(--red); outline-offset: 2px; }
a { color: inherit; }

/* Shared type */
.caps { font-family: var(--display); font-stretch: 125%; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; }
.star { color: var(--red); font-size: 0.9em; margin: 0 0.45em; }
.script { font-family: var(--script); font-weight: 400; text-transform: none; letter-spacing: 0; }
.wordmark { margin: 0; font-family: var(--display); font-stretch: 125%; font-weight: 900; text-transform: uppercase; line-height: 0.88; letter-spacing: 0.01em; }

/* Login: the show cover */
.login { min-height: 100vh; background: var(--bg); color: var(--on-navy); display: grid; place-items: center; padding-block: 32px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.login-card { width: 100%; max-width: 380px; display: grid; gap: 8px; }
.cover { text-align: center; margin-bottom: 18px; }
.cover .script { font-size: 44px; line-height: 1; display: block; }
.cover .wordmark { font-size: 46px; }
.cover .kicker { font-size: 11px; color: var(--sky); margin-top: 14px; }
.login-card label { font-family: var(--display); font-stretch: 125%; font-weight: 700; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--sky); }
.login-card input { font: inherit; padding: 11px 12px; border: 1px solid #3e5d7b; border-radius: 8px; background: #23405a; color: #ffffff; margin-bottom: 6px; }
.login-card button { margin-top: 10px; padding: 12px; border: 0; border-radius: 8px; background: var(--red); color: var(--on-red); font-family: var(--display); font-stretch: 125%; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; }
.error { color: #ffb4a3; margin: 4px 0 0; font-size: 14px; }

/* Masthead */
.topbar { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5; background: var(--navy); border-bottom: 1px solid var(--line); color: var(--on-navy); padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--navy); }
.topbar-inner { max-width: 1180px; margin: 0 auto; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; padding-block: 14px; }
.brand-lockup { display: flex; align-items: center; gap: 12px; }
.brand-lockup .wordmark { font-size: 19px; }
.brand-lockup .script { font-size: 26px; color: var(--sky); line-height: 1; }
.tabs { display: flex; gap: 4px; }
.tab { border: 0; background: transparent; color: #c9d5e0; padding: 8px 14px; border-radius: 6px; font-family: var(--display); font-stretch: 125%; font-weight: 700; font-size: 12px; letter-spacing: 0.07em; text-transform: uppercase; }
.tab:hover { color: #ffffff; }
.tab[aria-current="true"] { background: var(--red); color: var(--on-red); }
.link { margin-left: auto; border: 0; background: none; color: #c9d5e0; text-decoration: underline; font-size: 13px; }

.page { max-width: 1180px; margin: 0 auto; display: grid; gap: 18px; padding-block: 22px 40px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.dateline { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; align-items: center; border-bottom: 1px solid var(--ink-3); padding-bottom: 10px; font-size: 12px; color: var(--ink); }
.status { margin: 0; color: var(--ink-3); font-size: 14px; }

/* Tiles */
.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 16px 18px; min-width: 0; }
.tile-label { margin: 0; font-size: 11px; color: var(--sky); }
.tile-value { margin: 6px 0 0; font-family: var(--display); font-stretch: 125%; font-weight: 800; font-size: 34px; line-height: 1.05; color: var(--ink); font-variant-numeric: tabular-nums; }
.tile-sub { margin: 6px 0 0; font-size: 13px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Panels */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 20px; min-width: 0; }
.panel-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 8px 16px; margin-bottom: 14px; }
.panel h2 { margin: 0; font-family: var(--display); font-stretch: 125%; font-weight: 800; font-size: 24px; line-height: 1.05; text-transform: uppercase; letter-spacing: 0.01em; color: var(--ink); }
.panel h2 .script { font-size: 26px; color: var(--sky); margin-left: 10px; vertical-align: -2px; }
.eyebrow { margin: 0 0 4px; font-size: 11px; color: var(--sky); }
.note { margin: 6px 0 0; font-size: 13px; color: var(--ink-3); max-width: 72ch; }
.seg { display: flex; gap: 4px; }
.seg-btn { border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); border-radius: 6px; padding: 5px 11px; font-family: var(--display); font-stretch: 125%; font-weight: 700; font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; }
.seg-btn[aria-pressed="true"] { background: #ffffff; border-color: #ffffff; color: #1b344a; }
.pick { font-size: 11px; color: var(--ink-2); display: flex; gap: 8px; align-items: center; }
.pick select { font: 14px var(--body); padding: 6px 8px; border-radius: 6px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); text-transform: none; letter-spacing: 0; }

/* Tables */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-family: var(--display); font-stretch: 125%; font-weight: 700; font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-3); padding: 6px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
td.date { white-space: nowrap; color: var(--ink-2); font-variant-numeric: tabular-nums; }
td.text { min-width: 260px; max-width: 520px; font-weight: 600; color: var(--ink); }
td.text a { text-decoration: none; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
td.text a:hover { text-decoration: underline; }
td.rank { width: 46px; padding-right: 0; }
.plat { display: inline-block; font-family: var(--display); font-stretch: 125%; font-weight: 700; font-size: 10px; letter-spacing: 0.06em; text-transform: uppercase; padding: 3px 7px; border-radius: 4px; border: 1px solid var(--ink-3); color: var(--ink); white-space: nowrap; }
.score { display: inline-block; min-width: 58px; text-align: center; font-family: var(--display); font-stretch: 125%; font-weight: 800; font-size: 13px; padding: 5px 8px; border-radius: 5px; background: var(--soft); color: var(--ink-2); font-variant-numeric: tabular-nums; }
.score.hit { background: var(--red); color: var(--on-red); }
.score.big { background: var(--red); color: var(--on-red); box-shadow: 0 0 0 2px #ffffff; }
.score.pending { background: transparent; color: var(--ink-3); font-family: var(--body); font-stretch: 100%; font-weight: 500; font-size: 12px; }
.empty { color: var(--ink-3); font-size: 14px; padding: 10px; }

/* Red starburst rank badge, like the run of show numbers */
.burst { display: grid; place-items: center; width: 36px; height: 36px; background: #ffffff; color: #1b344a; font-family: var(--display); font-stretch: 125%; font-weight: 800; font-size: 14px;
  clip-path: polygon(50% 0%, 59% 13%, 75% 7%, 75% 24%, 93% 25%, 86% 41%, 100% 50%, 86% 59%, 93% 75%, 75% 76%, 75% 93%, 59% 87%, 50% 100%, 41% 87%, 25% 93%, 25% 76%, 7% 75%, 14% 59%, 0% 50%, 14% 41%, 7% 25%, 25% 24%, 25% 7%, 41% 13%); }

/* Charts */
.multiples { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 18px; }
.chart-box { min-width: 0; position: relative; border-left: 3px solid var(--sky); padding-left: 12px; }
.chart-box canvas { width: 100% !important; height: 220px !important; }
.chart-title { margin: 0 0 8px; font-size: 10.5px; color: var(--ink-2); }
#live-panel .chart-box + .chart-box { margin-top: 20px; }
#live-sum { margin-bottom: 14px; }

/* Footer */
.foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 20px; border-top: 1px solid var(--line); padding-top: 12px; font-size: 12px; color: var(--ink-3); }
.foot .caps { font-size: 11px; color: var(--ink); }

@media (max-width: 720px) {
  .tiles { grid-template-columns: minmax(0, 1fr); }
  .link { margin-left: 0; }
  .multiples { grid-template-columns: minmax(0, 1fr); }
  .panel h2 { font-size: 20px; }
}
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
