/* ==========================================================================
   Litera Premier — FPL league insight

   Visual language: a football broadcast. Stadium-night background, floodlit
   whites, pitch green for anything positive, and condensed uppercase type for
   headings and labels the way score bugs and team sheets are set. Barlow
   Condensed carries the display type, Barlow the body; both self-hosted.

   Dark is the default. The light theme mirrors every token.
   ========================================================================== */

/* --- design tokens --------------------------------------------------------- */

:root {
  /* Stadium at night */
  --bg: #070b14;
  --bg-raised: #0e1523;
  --bg-elevated: #141d2f;
  --bg-sunken: #04070e;
  --line: #22304a;
  --line-soft: #172033;

  --ink: #eef3fb;
  --ink-dim: #93a4bf;
  --ink-faint: #5f7089;

  /* Floodlit pitch green reads as "good" everywhere */
  --accent: #00e87b;
  --accent-ink: #04241a;
  --accent-glow: rgba(0, 232, 123, 0.16);

  --violet: #a279ff;
  --amber: #ffb43d;
  --rose: #ff5c78;
  --sky: #38b6ff;

  --pos: #00e87b;
  --neg: #ff5c78;

  --gold: #ffd166;
  --silver: #c8d3e0;
  --bronze: #d0895c;

  /* Turf */
  --turf-a: #0d3a22;
  --turf-b: #0f4227;
  --turf-line: rgba(255, 255, 255, 0.16);

  --radius: 16px;
  --radius-sm: 10px;
  --radius-xs: 6px;

  --shadow: 0 18px 40px -20px rgba(0, 0, 0, 0.9), 0 2px 8px rgba(0, 0, 0, 0.4);
  --shadow-lift: 0 24px 50px -22px rgba(0, 0, 0, 0.95);

  --font-display: 'Barlow Condensed', 'Arial Narrow', system-ui, sans-serif;
  --font-body: 'Barlow', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-mono: ui-monospace, 'Cascadia Mono', Menlo, Consolas, monospace;
}

html[data-theme='light'] {
  --bg: #eef2f8;
  --bg-raised: #ffffff;
  --bg-elevated: #f7f9fc;
  --bg-sunken: #e2e8f2;
  --line: #ccd7e6;
  --line-soft: #e3eaf3;

  --ink: #0b1220;
  --ink-dim: #52657f;
  --ink-faint: #8496ad;

  --accent: #009a56;
  --accent-ink: #ffffff;
  --accent-glow: rgba(0, 154, 86, 0.12);

  --violet: #6f4bd8;
  --amber: #b8770a;
  --rose: #d63a55;
  --sky: #1183c9;

  --pos: #0f8f5b;
  --neg: #d13a53;

  --gold: #b98900;
  --silver: #8a97a7;
  --bronze: #a2653c;

  --turf-a: #1f6b3d;
  --turf-b: #237445;
  --turf-line: rgba(255, 255, 255, 0.5);

  --shadow: 0 12px 28px -18px rgba(14, 26, 48, 0.4), 0 1px 3px rgba(14, 26, 48, 0.08);
  --shadow-lift: 0 18px 36px -20px rgba(14, 26, 48, 0.45);
}

* { box-sizing: border-box; }

html { color-scheme: dark; }
html[data-theme='light'] { color-scheme: light; }

body {
  margin: 0;
  background: var(--bg);
  /* Two distant floodlights over the stands. */
  background-image:
    radial-gradient(1100px 520px at 12% -12%, rgba(0, 232, 123, 0.09), transparent 62%),
    radial-gradient(900px 460px at 92% -6%, rgba(162, 121, 255, 0.10), transparent 60%);
  background-attachment: fixed;
  color: var(--ink);
  font: 400 15px/1.55 var(--font-body);
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--sky); text-decoration-thickness: 1px; text-underline-offset: 2px; }

.wrap {
  width: 100%;
  max-width: 1220px;
  margin: 0 auto;
  padding: 0 18px;
}

/* Condensed uppercase is the house style for anything label-like. */
h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.015em;
  margin: 0;
}

/* --- top bar --------------------------------------------------------------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(14px) saturate(1.3);
  border-bottom: 1px solid var(--line-soft);
}
/* A pitch-green hairline under the masthead, like a broadcast rule. */
.topbar::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), var(--violet), transparent);
  opacity: 0.55;
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 66px;
}

.brand { display: flex; align-items: center; gap: 13px; min-width: 0; }

.brand-mark {
  width: 38px; height: 38px;
  flex: none;
  display: grid;
  place-items: center;
  font-size: 19px;
  border-radius: 11px;
  background: linear-gradient(145deg, var(--accent), color-mix(in srgb, var(--accent) 55%, var(--sky)));
  color: var(--accent-ink);
  box-shadow: 0 6px 18px -8px var(--accent);
}

.brand-text { display: flex; flex-direction: column; min-width: 0; gap: 1px; }
.brand-text strong {
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  line-height: 1.05;
}
.brand-text small {
  color: var(--ink-dim);
  font-size: 11.5px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  display: flex;
  align-items: center;
  gap: 7px;
}

/* Pulsing dot for a gameweek in progress. */
.live-dot {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--accent);
  font-weight: 700;
}
.live-dot::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 var(--accent-glow);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(0, 232, 123, 0.55); }
  70% { box-shadow: 0 0 0 7px rgba(0, 232, 123, 0); }
  100% { box-shadow: 0 0 0 0 rgba(0, 232, 123, 0); }
}

.topbar-actions { display: flex; gap: 8px; flex: none; }

.icon-btn {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border: 1px solid var(--line);
  background: var(--bg-raised);
  color: var(--ink-dim);
  border-radius: 11px;
  font-size: 16px;
  cursor: pointer;
  transition: color .18s, border-color .18s, transform .18s, background .18s;
}
.icon-btn:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--bg-elevated);
  transform: translateY(-1px);
}
.icon-btn:active { transform: translateY(0); }
.icon-btn.is-busy { animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* --- tabs ------------------------------------------------------------------ */

.tabs {
  position: sticky;
  top: 66px;
  z-index: 35;
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line-soft);
}
.tabs-inner {
  display: flex;
  gap: 2px;
  overflow-x: auto;
  scrollbar-width: none;
}
.tabs-inner::-webkit-scrollbar { display: none; }

.tab {
  flex: none;
  position: relative;
  padding: 14px 16px 12px;
  border: 0;
  background: none;
  color: var(--ink-faint);
  font: 700 15px/1 var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  cursor: pointer;
  white-space: nowrap;
  transition: color .18s;
}
.tab::after {
  content: '';
  position: absolute;
  left: 12px; right: 12px; bottom: 0;
  height: 3px;
  border-radius: 3px 3px 0 0;
  background: var(--accent);
  transform: scaleX(0);
  transition: transform .2s ease;
}
.tab:hover { color: var(--ink); }
.tab.is-active { color: var(--accent); }
.tab.is-active::after { transform: scaleX(1); }

/* --- loader ---------------------------------------------------------------- */

.loader { padding: 16px 0 0; }
.loader.is-done { display: none; }
.loader-bar {
  height: 4px;
  background: var(--bg-sunken);
  border-radius: 99px;
  overflow: hidden;
  border: 1px solid var(--line-soft);
}
.loader-fill {
  height: 100%;
  width: 0;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--accent), var(--sky), var(--violet));
  transition: width .3s ease;
}
.loader-text {
  margin: 8px 0 0;
  color: var(--ink-dim);
  font-size: 11.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.09em;
}

/* --- views and sections ---------------------------------------------------- */

main { padding: 20px 18px 8px; }
.view { display: none; }
.view.is-active { display: block; animation: rise .3s cubic-bezier(.2,.7,.3,1); }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin: 32px 0 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line-soft);
}
.section-head:first-child { margin-top: 2px; }
.section-head h2 {
  font-size: 22px;
  text-transform: uppercase;
  line-height: 1.1;
  /* A short green flash before section titles, like a lower-third graphic. */
  display: flex;
  align-items: center;
  gap: 10px;
}
.section-head h2::before {
  content: '';
  width: 4px;
  height: 19px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--accent), color-mix(in srgb, var(--accent) 40%, var(--sky)));
  flex: none;
}
.section-head p {
  margin: 0;
  color: var(--ink-dim);
  font-size: 13px;
  max-width: 64ch;
  line-height: 1.5;
}

/* --- cards ----------------------------------------------------------------- */

.card {
  position: relative;
  background: linear-gradient(180deg, var(--bg-elevated), var(--bg-raised));
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
}
/* Hairline highlight along the top edge. */
.card::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  border-radius: var(--radius) var(--radius) 0 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.10), transparent);
  pointer-events: none;
}
html[data-theme='light'] .card::before { background: none; }
.card + .card { margin-top: 16px; }
.card-scroll { overflow-x: auto; }

.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(330px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }

/* --- stat tiles ------------------------------------------------------------ */

.tile {
  position: relative;
  background: linear-gradient(180deg, var(--bg-elevated), var(--bg-raised));
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  padding: 14px 15px;
  overflow: hidden;
  transition: border-color .2s, transform .2s;
}
.tile:hover { border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); transform: translateY(-2px); }
.tile::after {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--accent), transparent);
  opacity: .7;
}
.tile-label {
  color: var(--ink-dim);
  font: 600 11px/1 var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.11em;
}
.tile-value {
  font: 700 34px/1.05 var(--font-display);
  margin-top: 7px;
  letter-spacing: -0.005em;
  font-variant-numeric: tabular-nums;
}
.tile-value.sm { font-size: 21px; line-height: 1.2; }
.tile-note {
  color: var(--ink-faint);
  font-size: 12px;
  margin-top: 4px;
  line-height: 1.4;
}

/* --- tables ---------------------------------------------------------------- */

table.t {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}
table.t th, table.t td {
  padding: 9px 10px;
  text-align: left;
  border-bottom: 1px solid var(--line-soft);
  white-space: nowrap;
}
table.t th {
  color: var(--ink-faint);
  font: 700 11px/1 var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--bg-raised);
  border-bottom: 1px solid var(--line);
  padding-top: 11px;
  padding-bottom: 11px;
}
table.t tbody tr { transition: background .14s; }
table.t tbody tr:nth-child(even) { background: color-mix(in srgb, var(--ink) 2.5%, transparent); }
table.t tbody tr:hover { background: var(--accent-glow); }
table.t tbody tr:last-child td { border-bottom: 0; }
table.t td.num, table.t th.num { text-align: right; font-variant-numeric: tabular-nums; }
table.t td.wide { white-space: normal; min-width: 160px; }
table.t td strong { font-weight: 600; }
table.t .sub {
  color: var(--ink-faint);
  font-size: 11.5px;
  display: block;
  line-height: 1.3;
  margin-top: 1px;
}

/* Your own team, highlighted down the whole row. */
tr.is-me { background: color-mix(in srgb, var(--violet) 15%, transparent) !important; }
tr.is-me:hover { background: color-mix(in srgb, var(--violet) 24%, transparent) !important; }
tr.is-me td:first-child { box-shadow: inset 3px 0 0 var(--violet); }

.rank {
  font: 700 15px/1 var(--font-display);
  font-variant-numeric: tabular-nums;
  width: 38px;
  color: var(--ink-dim);
}
/* Podium colours in tables whose row order is the standing. */
table.t.ranked tbody tr:nth-child(1) .rank { color: var(--gold); }
table.t.ranked tbody tr:nth-child(2) .rank { color: var(--silver); }
table.t.ranked tbody tr:nth-child(3) .rank { color: var(--bronze); }
table.t.ranked tbody tr:nth-child(-n + 3) .rank { font-size: 17px; }

.mv { font: 700 11px/1 var(--font-display); font-variant-numeric: tabular-nums; letter-spacing: .04em; }
.mv.up { color: var(--pos); }
.mv.down { color: var(--neg); }
.mv.same { color: var(--ink-faint); }

.pos { color: var(--pos); }
.neg { color: var(--neg); }
.mono { font-family: var(--font-mono); }
.muted { color: var(--ink-dim); }
.faint { color: var(--ink-faint); }
.nowrap { white-space: nowrap; }

/* --- pills ----------------------------------------------------------------- */

.pill {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 99px;
  font: 700 10.5px/1.4 var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.09em;
  border: 1px solid transparent;
  white-space: nowrap;
}
.pill-wc { background: color-mix(in srgb, var(--violet) 20%, transparent); color: var(--violet); border-color: color-mix(in srgb, var(--violet) 45%, transparent); }
.pill-fh { background: color-mix(in srgb, var(--sky) 20%, transparent); color: var(--sky); border-color: color-mix(in srgb, var(--sky) 45%, transparent); }
.pill-bb { background: color-mix(in srgb, var(--accent) 18%, transparent); color: var(--accent); border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.pill-tc { background: color-mix(in srgb, var(--amber) 20%, transparent); color: var(--amber); border-color: color-mix(in srgb, var(--amber) 45%, transparent); }
.pill-ghost { background: var(--bg-sunken); color: var(--ink-dim); border-color: var(--line); }

.badge-gk { color: var(--amber); }
.badge-def { color: var(--sky); }
.badge-mid { color: var(--accent); }
.badge-fwd { color: var(--rose); }

.tag-pos {
  display: inline-block;
  min-width: 34px;
  text-align: center;
  font: 700 10px/1.6 var(--font-display);
  letter-spacing: 0.07em;
  padding: 1px 5px;
  border-radius: var(--radius-xs);
  background: var(--bg-sunken);
  border: 1px solid var(--line-soft);
}

/* --- controls -------------------------------------------------------------- */

.controls { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.controls label {
  color: var(--ink-faint);
  font: 600 11px/1 var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

select, .btn {
  background: var(--bg-raised);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 8px 11px;
  font: 600 13px var(--font-body);
  cursor: pointer;
  transition: border-color .18s, background .18s;
}
select:hover, .btn:hover { border-color: var(--accent); background: var(--bg-elevated); }
select:focus-visible, .btn:focus-visible, .tab:focus-visible, .icon-btn:focus-visible, .legend-item:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.btn.is-active { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 700; }

.seg { display: flex; gap: 6px; flex-wrap: wrap; }
.seg .btn { padding: 7px 12px; font-size: 12.5px; }

/* --- charts ---------------------------------------------------------------- */

.chart { width: 100%; display: block; overflow: visible; }
.chart text {
  fill: var(--ink-faint);
  font: 600 10.5px var(--font-display);
  letter-spacing: 0.04em;
}
.chart .axis-line { stroke: var(--line); stroke-width: 1; }
.chart .grid-line { stroke: var(--line-soft); stroke-width: 1; }
.chart .series { fill: none; stroke-width: 2.2; stroke-linejoin: round; stroke-linecap: round; }
.chart .series.is-dim { opacity: .14; stroke-width: 1.4; }
.chart .series.is-hot { stroke-width: 3.6; filter: drop-shadow(0 0 6px currentColor); }
.chart .dot { stroke: var(--bg-raised); stroke-width: 1.6; }
.chart .dot.is-dim { opacity: .14; }
.chart .bar { rx: 3; }
.chart .label-hot { fill: var(--ink); font-weight: 700; }

.legend { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 11px 4px 7px;
  border: 1px solid var(--line-soft);
  border-radius: 99px;
  background: var(--bg-sunken);
  font: 600 11.5px var(--font-body);
  cursor: pointer;
  color: var(--ink-dim);
  transition: color .16s, border-color .16s, opacity .16s, background .16s;
}
.legend-item:hover { color: var(--ink); background: var(--bg-elevated); }
.legend-item.is-off { opacity: .35; }
.legend-item.is-on { color: var(--ink); border-color: currentColor; background: var(--bg-elevated); }
.legend-swatch { width: 10px; height: 10px; border-radius: 3px; flex: none; }

/* --- head-to-head heatmap -------------------------------------------------- */

table.hm { border-collapse: separate; border-spacing: 3px; font-size: 11.5px; }
table.hm th {
  color: var(--ink-faint);
  font: 700 10px/1 var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  padding: 4px 5px;
  text-align: center;
  white-space: nowrap;
}
table.hm th.row-head {
  text-align: right;
  padding-right: 10px;
  max-width: 170px;
  overflow: hidden;
  text-overflow: ellipsis;
  font-family: var(--font-body);
  font-size: 11.5px;
  text-transform: none;
  letter-spacing: 0;
  color: var(--ink-dim);
}
table.hm td {
  width: 32px; height: 29px;
  text-align: center;
  border-radius: var(--radius-xs);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: var(--ink);
  transition: transform .12s;
}
table.hm td:hover { transform: scale(1.12); }
table.hm td.self { background: var(--bg-sunken); color: var(--ink-faint); }

/* --- the pitch ------------------------------------------------------------- */

.pitch {
  position: relative;
  isolation: isolate;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  padding: 20px 10px 14px;
  display: grid;
  gap: 14px;
  overflow: hidden;
  /* Mown stripes, the way a groundsman leaves them. */
  background-image: repeating-linear-gradient(
    180deg,
    var(--turf-a) 0 42px,
    var(--turf-b) 42px 84px
  );
}
/* Touchline and centre circle. */
.pitch::before {
  content: '';
  position: absolute;
  inset: 8px;
  border: 2px solid var(--turf-line);
  border-radius: 4px;
  pointer-events: none;
  z-index: 0;
}
.pitch::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 122px;
  height: 122px;
  margin: -61px 0 0 -61px;
  border: 2px solid var(--turf-line);
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
}
.pitch-row {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}
.pitch-bench {
  margin-top: 4px;
  padding-top: 14px;
  border-top: 2px dashed var(--turf-line);
}

/* Player as a shirt-ish tile with a position flash along the top. */
.player {
  position: relative;
  width: 82px;
  background: linear-gradient(180deg, var(--bg-elevated), var(--bg-raised));
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 8px 5px 6px;
  text-align: center;
  box-shadow: 0 6px 14px -8px rgba(0, 0, 0, 0.85);
  transition: transform .16s, border-color .16s;
  overflow: hidden;
}
.player:hover { transform: translateY(-3px); border-color: var(--ink-faint); }
.player::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: var(--ink-faint);
}
/* :has() lets the tile take its colour from the position badge inside it. */
.player:has(.badge-gk)::before { background: var(--amber); }
.player:has(.badge-def)::before { background: var(--sky); }
.player:has(.badge-mid)::before { background: var(--accent); }
.player:has(.badge-fwd)::before { background: var(--rose); }

.player-name {
  font: 600 11.5px/1.25 var(--font-body);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.player-meta {
  font: 600 9.5px/1.5 var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-faint);
}
.player-pts {
  font: 700 17px/1.1 var(--font-display);
  font-variant-numeric: tabular-nums;
  margin-top: 2px;
}
.player.is-blank { opacity: .42; }
.player.is-sub-in { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent-glow), 0 6px 14px -8px var(--accent); }
.player.is-sub-out { border-color: var(--rose); opacity: .5; }

.player-arm {
  position: absolute;
  top: 5px; right: 5px;
  width: 18px; height: 18px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--amber);
  color: #1a1206;
  font: 700 10px/1 var(--font-display);
  border: 1.5px solid var(--bg-raised);
  z-index: 2;
}
.player-arm.v { background: var(--ink-faint); color: var(--bg); }

/* --- notes, awards, bars --------------------------------------------------- */

.note {
  background: linear-gradient(180deg, var(--bg-elevated), var(--bg-raised));
  border: 1px solid var(--line-soft);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  color: var(--ink-dim);
  font-size: 13.5px;
  line-height: 1.6;
}
.note strong { color: var(--ink); font-weight: 600; }
.note.warn { border-left-color: var(--amber); }

.award {
  display: flex;
  gap: 13px;
  align-items: flex-start;
  padding: 13px 0;
  border-bottom: 1px solid var(--line-soft);
}
.award:last-child { border-bottom: 0; }
.award-icon {
  font-size: 21px;
  line-height: 1.1;
  flex: none;
  width: 34px; height: 34px;
  display: grid; place-items: center;
  border-radius: 10px;
  background: var(--bg-sunken);
  border: 1px solid var(--line-soft);
}
.award-body { min-width: 0; }
.award-title {
  font: 700 10.5px/1 var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.11em;
  color: var(--ink-faint);
}
.award-who { font-weight: 600; margin-top: 3px; font-size: 15px; }
.award-detail { color: var(--ink-faint); font-size: 12.5px; line-height: 1.4; }

.bar-row { display: flex; align-items: center; gap: 11px; padding: 5px 0; }
.bar-row-name {
  width: 165px;
  flex: none;
  font-size: 12.5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.bar-track {
  flex: 1;
  height: 16px;
  background: var(--bg-sunken);
  border-radius: var(--radius-xs);
  overflow: hidden;
  border: 1px solid var(--line-soft);
}
.bar-fill {
  height: 100%;
  border-radius: var(--radius-xs) 0 0 var(--radius-xs);
  transition: width .4s cubic-bezier(.2,.7,.3,1);
}
.bar-row-val {
  width: 58px;
  flex: none;
  text-align: right;
  font: 700 13px/1 var(--font-display);
  font-variant-numeric: tabular-nums;
}

.empty {
  text-align: center;
  padding: 44px 20px;
  color: var(--ink-dim);
  line-height: 1.6;
}
.empty-mark { font-size: 38px; display: block; margin-bottom: 12px; }

/* --- footer ---------------------------------------------------------------- */

.foot {
  padding: 30px 18px 40px;
  color: var(--ink-faint);
  font-size: 12px;
  border-top: 1px solid var(--line-soft);
  margin-top: 36px;
}
.foot p { margin: 0 0 5px; }

/* --- responsive ------------------------------------------------------------ */

@media (max-width: 720px) {
  .topbar-inner { min-height: 58px; }
  .tabs { top: 58px; }
  .brand-mark { width: 33px; height: 33px; font-size: 17px; }
  .brand-text strong { font-size: 18px; }
  main { padding: 16px 14px 8px; }
  .wrap { padding: 0 14px; }
  .section-head { margin: 26px 0 12px; }
  .section-head h2 { font-size: 19px; }
  table.t th, table.t td { padding: 8px 7px; font-size: 12.5px; }
  .bar-row-name { width: 108px; }
  .player { width: 70px; }
  .player-name { font-size: 10.5px; }
  .tile-value { font-size: 27px; }
  .pitch { padding: 14px 6px 12px; gap: 10px; }
  .pitch::after { width: 88px; height: 88px; margin: -44px 0 0 -44px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001s !important;
    transition-duration: 0.001s !important;
  }
}

@media print {
  .topbar, .tabs, .loader, .icon-btn { display: none !important; }
  body { background: #fff; color: #000; }
  .view { display: block !important; }
}
