:root {
  color-scheme: dark;
  --ink: #f8f2df;
  --muted: #a9b4a9;
  --subtle: #768273;
  --pitch: #06100b;
  --pitch-2: #0d1d14;
  --panel: rgba(13, 25, 18, 0.94);
  --panel-2: rgba(255, 255, 255, 0.055);
  --line: rgba(248, 242, 223, 0.15);
  --gold: #d7b45f;
  --gold-2: #f0d884;
  --green: #34c77a;
  --blue: #79b8ff;
  --red: #ed6a5e;
  --white: #fff9e8;
  --shadow: 0 22px 70px rgba(0, 0, 0, 0.34);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-width: 320px;
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.028) 0 1px, transparent 1px 72px),
    linear-gradient(135deg, #07110c 0%, #10281b 46%, #1d1506 100%);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "Microsoft YaHei", sans-serif;
  letter-spacing: 0;
}

a {
  color: inherit;
}

button,
input {
  font: inherit;
}

button {
  letter-spacing: 0;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  max-width: 780px;
  margin-top: 8px;
  font-size: clamp(38px, 5.2vw, 68px);
  line-height: 1.03;
  letter-spacing: 0;
}

h2 {
  font-size: 21px;
  letter-spacing: 0;
}

.app-shell {
  display: grid;
  grid-template-columns: 286px minmax(0, 1fr);
  min-height: 100vh;
}

.side-rail {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 24px;
  border-right: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(215, 180, 95, 0.14), transparent 34%),
    #040705;
}

.brand-mark {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 24px;
}

.brand-mark strong,
.brand-mark span {
  display: block;
}

.brand-mark strong {
  font-size: 16px;
}

.brand-mark span:last-child {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.mark-dot {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background:
    linear-gradient(135deg, #f3db87 0 18%, #ffffff 18% 24%, #36c778 24% 58%, #174b32 58% 100%);
  box-shadow: 0 0 0 5px rgba(215, 180, 95, 0.13);
}

.view-nav {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
}

.view-button,
.filter-button,
.text-button,
.date-pill,
.team-node,
.inline-team {
  cursor: pointer;
}

.view-button {
  min-height: 44px;
  width: 100%;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.035);
  text-align: left;
}

.view-button.active {
  color: #141509;
  border-color: var(--gold);
  background: linear-gradient(135deg, var(--gold-2), var(--gold));
  font-weight: 900;
}

.source-card,
.rail-section,
.path-stage,
.team-drawer,
.surface-section,
.match-card,
.news-item,
.date-details,
.selected-date-panel,
.standings-table {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.source-card,
.rail-section {
  padding: 15px;
}

.source-card strong {
  display: block;
  margin: 8px 0 4px;
  color: var(--gold-2);
  font-size: 25px;
}

.source-card small,
.rail-section p {
  color: var(--muted);
  line-height: 1.6;
}

.source-manual-status {
  display: block;
  margin-top: 10px;
}

.source-manual-status[data-status="loading"] {
  color: var(--blue);
}

.source-manual-status[data-status="success"] {
  color: var(--green);
}

.source-manual-status[data-status="error"] {
  color: var(--red);
}

.source-refresh-button {
  width: 100%;
  min-height: 40px;
  margin-top: 12px;
  padding: 0 14px;
  border: 1px solid var(--gold);
  border-radius: 8px;
  color: #151507;
  background: linear-gradient(135deg, var(--gold-2), var(--gold));
  cursor: pointer;
  font-weight: 900;
}

.source-refresh-button:disabled {
  color: rgba(248, 242, 223, 0.68);
  border-color: rgba(255, 255, 255, 0.13);
  background: rgba(255, 255, 255, 0.08);
  cursor: progress;
}

.rail-section {
  margin-top: 12px;
}

.rail-links {
  display: grid;
  gap: 9px;
  margin-top: 15px;
}

.rail-links a {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  text-decoration: none;
}

.rail-links a:hover {
  color: var(--gold-2);
  border-color: rgba(215, 180, 95, 0.48);
}

.label,
.eyebrow {
  display: block;
  color: var(--gold);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.main-content {
  padding: 28px;
}

.hero-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: end;
  min-height: 276px;
  padding: 31px;
  border: 1px solid rgba(215, 180, 95, 0.28);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.48), rgba(6, 16, 11, 0.12)),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 56px),
    linear-gradient(135deg, #143a24 0%, #08150f 54%, #211704 100%);
  box-shadow: var(--shadow);
}

.hero-copy {
  max-width: 820px;
  margin-top: 16px;
  color: #d8d5c5;
  font-size: 16px;
  line-height: 1.75;
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(4, 104px);
  gap: 10px;
}

.hero-metrics div {
  min-height: 94px;
  padding: 17px;
  border: 1px solid rgba(215, 180, 95, 0.24);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.25);
}

.hero-metrics span {
  display: block;
  color: var(--gold-2);
  font-size: 34px;
  font-weight: 950;
}

.hero-metrics small {
  color: var(--muted);
}

.view {
  display: none;
  margin-top: 22px;
}

.active-view {
  display: block;
}

.path-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.34fr);
  gap: 18px;
  align-items: start;
}

.path-stage,
.surface-section,
.team-drawer {
  padding: 18px;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.section-heading.compact {
  margin-top: 22px;
}

.count-pill,
.status-pill,
.confidence-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  color: #15160b;
  background: var(--gold-2);
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}

.text-button {
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid rgba(215, 180, 95, 0.35);
  border-radius: 8px;
  color: var(--gold-2);
  background: rgba(215, 180, 95, 0.08);
  font-weight: 850;
}

.path-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}

.path-summary div {
  min-height: 92px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
}

.path-summary span,
.path-summary small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.path-summary strong {
  display: block;
  margin: 7px 0;
  color: var(--white);
  font-size: 20px;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.path-map {
  position: relative;
  display: grid;
  gap: 22px;
  padding: 18px 0 12px;
}

.path-trunk {
  position: absolute;
  top: 56px;
  bottom: 58px;
  left: 135px;
  width: 2px;
  border-radius: 999px;
  background: repeating-linear-gradient(
    0deg,
    rgba(235, 216, 142, 0.34) 0,
    rgba(235, 216, 142, 0.34) 12px,
    transparent 12px,
    transparent 58px
  );
  box-shadow: 0 0 18px rgba(66, 214, 128, 0.12);
  opacity: 0.58;
}

.path-trunk::before,
.path-trunk::after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%) rotate(45deg);
  width: 8px;
  height: 8px;
  border-left: 1px solid rgba(235, 216, 142, 0.56);
  border-top: 1px solid rgba(235, 216, 142, 0.56);
}

.path-trunk::before {
  top: -2px;
}

.path-trunk::after {
  top: 26px;
  opacity: 0.55;
}

.path-layer {
  --tier-accent: rgba(226, 210, 138, 0.82);
  --tier-bg: rgba(255, 255, 255, 0.034);
  --tier-line: rgba(255, 255, 255, 0.11);
  --tier-route: rgba(226, 210, 138, 0.36);
  position: relative;
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  min-height: 166px;
  padding: 18px 0;
  isolation: isolate;
}

.path-layer::before {
  content: "";
  position: absolute;
  inset: 4px 0 4px 118px;
  z-index: 0;
  border: 1px solid var(--tier-line);
  border-radius: 8px;
  background:
    radial-gradient(circle at 12% 50%, color-mix(in srgb, var(--tier-accent) 12%, transparent), transparent 30%),
    linear-gradient(90deg, var(--tier-bg), rgba(255, 255, 255, 0.012) 48%, transparent 88%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 18px 42px rgba(0, 0, 0, 0.14);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.path-layer.core {
  --tier-accent: rgba(238, 218, 133, 0.9);
  --tier-bg: rgba(238, 218, 133, 0.045);
  --tier-line: rgba(238, 218, 133, 0.24);
  --tier-route: rgba(238, 218, 133, 0.48);
}

.path-layer.elite {
  --tier-accent: rgba(210, 194, 129, 0.82);
  --tier-bg: rgba(255, 255, 255, 0.032);
  --tier-line: rgba(210, 194, 129, 0.2);
  --tier-route: rgba(210, 194, 129, 0.38);
}

.path-layer.contenders {
  --tier-accent: rgba(102, 209, 151, 0.78);
  --tier-bg: rgba(66, 214, 128, 0.032);
  --tier-line: rgba(102, 209, 151, 0.2);
  --tier-route: rgba(102, 209, 151, 0.34);
}

.path-layer.darkhorses {
  --tier-accent: rgba(148, 184, 166, 0.66);
  --tier-bg: rgba(159, 202, 178, 0.026);
  --tier-line: rgba(159, 202, 178, 0.16);
  --tier-route: rgba(148, 184, 166, 0.28);
}

.path-layer::after {
  content: "";
  position: absolute;
  left: 136px;
  width: 74px;
  top: calc(50% - 14px);
  height: 28px;
  z-index: 1;
  border-top: 1px solid var(--tier-route);
  border-right: 1px solid var(--tier-route);
  border-radius: 0 8px 0 0;
  transform: skewX(-18deg);
  opacity: 0.88;
}

.layer-copy {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 6px;
  padding: 34px 15px 14px;
  border: 1px solid var(--tier-line);
  border-left: 2px solid color-mix(in srgb, var(--tier-accent) 68%, transparent);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.024)),
    rgba(8, 20, 14, 0.7);
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.075);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.layer-copy::before {
  position: absolute;
  left: 14px;
  top: 12px;
  color: var(--tier-accent);
  content: "TOP 1";
  font-size: 10px;
  font-weight: 950;
  letter-spacing: 0;
  text-transform: uppercase;
}

.path-layer.elite .layer-copy::before {
  content: "TOP 2-4";
}

.path-layer.contenders .layer-copy::before {
  content: "TOP 5-8";
}

.path-layer.darkhorses .layer-copy::before {
  content: "TOP 9-12";
}

.layer-copy::after {
  content: "";
  position: absolute;
  right: -25px;
  top: 50%;
  width: 10px;
  height: 10px;
  transform: translateY(-50%) rotate(45deg);
  border-radius: 50%;
  background: var(--tier-accent);
  box-shadow: 0 0 0 6px color-mix(in srgb, var(--tier-accent) 12%, transparent), 0 0 18px color-mix(in srgb, var(--tier-accent) 18%, transparent);
}

.layer-copy span {
  color: var(--tier-accent);
  font-size: 18px;
  font-weight: 950;
}

.layer-copy small {
  color: var(--muted);
  line-height: 1.45;
}

.node-rail {
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(198px, 1fr));
  gap: 18px;
}

.path-layer.core .node-rail {
  grid-template-columns: minmax(260px, 420px);
  justify-content: center;
  transform: translateX(34px);
}

.path-layer.elite .node-rail {
  transform: translateX(24px);
}

.path-layer.contenders .node-rail {
  transform: translateX(12px);
}

.path-layer.darkhorses .node-rail {
  transform: translateX(0);
}

.team-node {
  --node-glow: rgba(255, 255, 255, 0.035);
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  gap: 9px 11px;
  min-height: 156px;
  padding: 14px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--tier-accent) 26%, rgba(255, 255, 255, 0.12));
  border-radius: 8px;
  color: var(--ink);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.02)),
    rgba(9, 24, 17, 0.68);
  text-align: left;
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.075), 0 0 22px var(--node-glow);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.team-node > :not(.champion-trophy):not(.champion-ribbon):not(.node-stage) {
  position: relative;
  z-index: 2;
}

.team-node::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 2px;
  background: var(--tier-accent);
  opacity: 0.52;
  z-index: 1;
}

.team-node::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: var(--prob);
  height: 3px;
  background: linear-gradient(90deg, rgba(66, 214, 128, 0.9), color-mix(in srgb, var(--tier-accent) 82%, rgba(255, 255, 255, 0.15)));
  z-index: 3;
  opacity: 0.88;
}

.team-node:hover,
.team-node.active {
  border-color: color-mix(in srgb, var(--tier-accent) 62%, rgba(255, 255, 255, 0.18));
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.11), rgba(255, 255, 255, 0.025)),
    rgba(12, 30, 21, 0.76);
}

.path-layer.core .team-node {
  --node-glow: rgba(238, 218, 133, 0.13);
  min-height: 178px;
  padding-right: 126px;
  border-color: rgba(238, 218, 133, 0.42);
  background:
    radial-gradient(circle at 84% 24%, rgba(238, 218, 133, 0.08), transparent 32%),
    radial-gradient(circle at 16% 18%, rgba(255, 255, 255, 0.08), transparent 30%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.11), rgba(66, 214, 128, 0.028)),
    rgba(11, 27, 18, 0.76);
  box-shadow: 0 24px 52px rgba(0, 0, 0, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.085), 0 0 0 1px rgba(238, 218, 133, 0.08);
}

.path-layer.elite .team-node {
  --node-glow: rgba(210, 194, 129, 0.08);
  border-color: rgba(210, 194, 129, 0.25);
  background:
    radial-gradient(circle at 88% 16%, rgba(210, 194, 129, 0.05), transparent 30%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.085), rgba(255, 255, 255, 0.018)),
    rgba(9, 24, 17, 0.7);
}

.path-layer.contenders .team-node {
  --node-glow: rgba(66, 214, 128, 0.07);
  border-color: rgba(102, 209, 151, 0.22);
  background:
    radial-gradient(circle at 88% 16%, rgba(66, 214, 128, 0.045), transparent 30%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.016)),
    rgba(8, 22, 16, 0.68);
}

.path-layer.darkhorses .team-node {
  --node-glow: rgba(159, 202, 178, 0.045);
  border-color: rgba(159, 202, 178, 0.16);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.012)),
    rgba(7, 19, 14, 0.66);
}

.champion-trophy {
  position: absolute;
  right: 4px;
  bottom: -24px;
  z-index: 1;
  width: 132px;
  max-width: 34%;
  pointer-events: none;
  opacity: 0.46;
  filter: drop-shadow(0 18px 24px rgba(0, 0, 0, 0.32)) saturate(0.92);
}

.champion-ribbon,
.node-stage {
  position: absolute;
  right: 12px;
  top: 12px;
  z-index: 4;
  width: max-content;
  min-width: 64px;
  max-width: calc(100% - 24px);
  padding: 5px 9px;
  border: 1px solid color-mix(in srgb, var(--tier-accent) 44%, transparent);
  border-radius: 999px;
  color: var(--tier-accent);
  background: rgba(3, 10, 7, 0.42);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  font-size: 10px;
  font-weight: 950;
  letter-spacing: 0;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
}

.champion-ribbon {
  color: rgba(255, 245, 188, 0.96);
  border-color: rgba(238, 218, 133, 0.48);
  background: rgba(15, 24, 14, 0.58);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 8px 20px rgba(0, 0, 0, 0.16);
}

.node-index {
  grid-column: 1 / -1;
  width: max-content;
  padding: 4px 8px;
  border: 1px solid color-mix(in srgb, var(--tier-accent) 38%, transparent);
  border-radius: 999px;
  color: var(--tier-accent);
  background: rgba(0, 0, 0, 0.14);
  font-size: 11px;
  font-weight: 950;
}

.node-crest {
  width: 48px;
  height: 48px;
}

.node-name {
  min-width: 0;
}

.node-name strong,
.node-name small,
.node-meta,
.node-market,
.node-players {
  display: block;
}

.node-name strong {
  overflow-wrap: anywhere;
  font-size: 16px;
}

.node-name small,
.node-meta,
.node-market,
.node-players {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.node-market {
  color: var(--tier-accent);
}

.node-prob {
  color: var(--tier-accent);
  font-size: 18px;
  font-weight: 950;
}

.score-breakdown,
.match-breakdown {
  display: grid;
  gap: 8px;
}

.score-part {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 42px;
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
}

.score-part strong {
  color: var(--gold-2);
  text-align: right;
}

.score-track {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
}

.score-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green), var(--gold-2));
}

.node-meta,
.node-market,
.node-players {
  grid-column: 1 / -1;
}

.team-drawer {
  position: sticky;
  top: 28px;
  max-height: calc(100vh - 56px);
  overflow: auto;
}

.drawer-hero {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) auto;
  gap: 13px;
  align-items: center;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.drawer-hero h2 {
  margin-top: 5px;
  font-size: 28px;
}

.drawer-hero p:last-child {
  margin-top: 4px;
  color: var(--muted);
}

.drawer-crest {
  width: 72px;
  height: 72px;
}

.drawer-prob {
  color: var(--gold-2);
  font-size: 28px;
  font-weight: 950;
}

.drawer-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin: 14px 0;
}

.drawer-grid div {
  min-height: 72px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
}

.drawer-grid span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.drawer-grid strong {
  display: block;
  margin-top: 6px;
  color: var(--white);
  line-height: 1.35;
}

.drawer-block {
  padding-top: 14px;
  margin-top: 14px;
  border-top: 1px solid var(--line);
}

.drawer-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.drawer-title span {
  color: var(--gold-2);
  font-weight: 950;
}

.drawer-title small {
  color: var(--muted);
}

.clean-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.clean-list li {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: #dbdacb;
  background: rgba(255, 255, 255, 0.04);
  line-height: 1.5;
}

.clean-list.risk li {
  color: #f1d5ad;
  border-color: rgba(237, 106, 94, 0.24);
}

.market-note {
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px solid rgba(215, 180, 95, 0.24);
  border-radius: 8px;
  background: rgba(215, 180, 95, 0.07);
}

.market-note strong {
  color: var(--gold-2);
}

.market-note span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.player-list,
.mini-match-list,
.drawer-news {
  display: grid;
  gap: 8px;
}

.player-row,
.drawer-news a,
.mini-match {
  display: grid;
  gap: 4px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  text-decoration: none;
}

.player-row span {
  font-weight: 900;
}

.player-row .player-source {
  display: inline-flex;
  width: max-content;
  min-height: 22px;
  align-items: center;
  padding: 0 8px;
  border-radius: 999px;
  color: #06120b;
  background: #8df0ae;
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
}

.player-row .player-source.pending {
  color: #1d1708;
  background: var(--gold-2);
}

.player-row small,
.mini-match span,
.mini-match small,
.drawer-news a,
.empty-line {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.mini-match.finished,
.schedule-row.finished,
.date-details.finished,
.pulse-day.finished {
  border-color: rgba(52, 199, 122, 0.34);
  background: rgba(52, 199, 122, 0.06);
}

.mini-match.upcoming,
.schedule-row.upcoming,
.date-details.upcoming,
.pulse-day.upcoming {
  border-color: rgba(215, 180, 95, 0.22);
}

.date-details.mixed,
.pulse-day.mixed {
  border-color: rgba(121, 184, 255, 0.34);
  background: rgba(121, 184, 255, 0.05);
}

.mini-match strong {
  color: var(--white);
}

.mini-match.finished strong {
  color: var(--gold-2);
}

.surface-section {
  margin-top: 18px;
}

.home-schedule {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.pulse-day {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
}

.pulse-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px;
  border-bottom: 1px solid var(--line);
  background: rgba(215, 180, 95, 0.08);
}

.pulse-heading span,
.pulse-heading small {
  color: var(--muted);
  font-size: 12px;
}

.pulse-heading strong {
  display: block;
  margin-top: 3px;
}

.pulse-list {
  display: grid;
}

.controls-panel {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
}

.standings-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0;
}

.standings-summary div {
  min-height: 88px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
}

.standings-summary span,
.standings-summary small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.standings-summary strong {
  display: block;
  margin: 7px 0;
  overflow-wrap: anywhere;
  color: var(--white);
  font-size: 20px;
}

.standings-preview {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.standings-table {
  padding: 10px;
  overflow-x: auto;
}

.standing-header,
.standing-row {
  display: grid;
  grid-template-columns: 42px minmax(210px, 1.4fr) 58px 58px 86px 78px 64px 84px minmax(138px, 0.8fr);
  gap: 8px;
  align-items: center;
  min-width: 920px;
}

.standing-header {
  padding: 9px 12px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.standing-row {
  width: 100%;
  min-height: 60px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.035);
  text-align: left;
}

.standing-row + .standing-row {
  margin-top: 7px;
}

.standing-row:hover {
  border-color: rgba(240, 216, 132, 0.65);
  background: rgba(215, 180, 95, 0.08);
}

.standing-row.compact {
  grid-template-columns: 32px 36px minmax(0, 1fr) 46px 58px;
  min-width: 0;
  min-height: 56px;
  margin: 0;
}

.standing-rank {
  color: var(--gold-2);
  font-weight: 950;
}

.standing-team {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  min-width: 0;
}

.standing-row.compact .standing-team {
  display: grid;
  grid-template-columns: 1fr;
}

.standing-team strong,
.standing-team small {
  display: block;
  overflow-wrap: anywhere;
}

.standing-team small,
.next-match {
  color: var(--muted);
  font-size: 12px;
}

.standing-points,
.standing-score {
  color: var(--gold-2);
  font-size: 18px;
  font-weight: 950;
}

.segmented-control {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-button {
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.04);
}

.filter-button.active {
  color: #10170d;
  border-color: var(--gold);
  background: var(--gold-2);
  font-weight: 900;
}

.search-box {
  display: grid;
  gap: 6px;
  min-width: min(390px, 100%);
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.search-box input {
  width: 100%;
  height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.07);
  outline: none;
}

.search-box input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(215, 180, 95, 0.14);
}

.date-strip {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 148px;
  gap: 8px;
  margin: 14px 0;
  padding-bottom: 8px;
  overflow-x: auto;
}

.date-pill {
  min-height: 84px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.045);
  text-align: left;
}

.date-pill strong,
.date-pill span,
.date-pill small {
  display: block;
}

.date-pill strong {
  margin: 4px 0;
  color: var(--white);
  font-size: 18px;
}

.date-pill small {
  font-size: 12px;
}

.date-pill.finished {
  border-color: rgba(52, 199, 122, 0.36);
  background: rgba(52, 199, 122, 0.08);
}

.date-pill.upcoming {
  border-color: rgba(215, 180, 95, 0.22);
}

.date-pill.mixed {
  border-color: rgba(121, 184, 255, 0.45);
  background: rgba(121, 184, 255, 0.08);
}

.date-pill.active {
  color: #111409;
  border-color: var(--gold);
  background: var(--gold-2);
}

.date-pill.active strong,
.date-pill.active small {
  color: #111409;
}

.selected-date-panel {
  padding: 16px;
}

.selected-date-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.selected-date-matches,
.details-match-list,
.match-list,
.news-list {
  display: grid;
  gap: 10px;
}

.schedule-row {
  display: grid;
  grid-template-columns: 88px minmax(0, 1.55fr) minmax(200px, 0.75fr);
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

.schedule-row.compact {
  grid-template-columns: 1fr;
  gap: 8px;
  padding: 10px;
  border-width: 0 0 1px 0;
  border-radius: 0;
  background: transparent;
}

.schedule-time {
  display: grid;
  gap: 4px;
}

.schedule-time strong {
  color: var(--gold-2);
  font-size: 19px;
}

.schedule-time span,
.schedule-venue,
.match-time,
.team-rank,
.news-meta,
.prediction-meta {
  color: var(--muted);
  font-size: 12px;
}

.schedule-teams {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 64px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
}

.schedule-row.compact .schedule-teams {
  grid-template-columns: 1fr;
}

.schedule-teams b,
.score-box {
  display: grid;
  place-items: center;
  min-height: 36px;
  border-radius: 8px;
  color: #0c1108;
  background: var(--gold-2);
  font-weight: 950;
}

.match-state-pill {
  display: inline-flex;
  align-items: center;
  width: max-content;
  min-height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  color: #0a150d;
  background: var(--gold-2);
  font-size: 11px;
  font-style: normal;
  font-weight: 950;
}

.match-state-pill.finished,
.status-pill.finished,
.count-pill.finished,
.result-badge.finished,
.score-box.finished {
  color: #06120b;
  background: #8df0ae;
}

.match-state-pill.upcoming,
.status-pill.upcoming,
.count-pill.upcoming,
.result-badge.upcoming,
.score-box.upcoming {
  color: #15160b;
  background: var(--gold-2);
}

.inline-team {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  min-width: 0;
  padding: 0;
  border: 0;
  color: var(--ink);
  background: transparent;
  text-align: left;
}

.inline-team.away {
  grid-template-columns: minmax(0, 1fr) 36px;
  text-align: right;
}

.inline-team.away .team-logo-wrap {
  order: 2;
}

.inline-team strong,
.inline-team small {
  display: block;
  overflow-wrap: anywhere;
}

.inline-team small {
  color: var(--muted);
  font-size: 12px;
}

.inline-team:disabled {
  cursor: default;
  opacity: 0.82;
}

.date-details {
  margin-top: 10px;
  overflow: hidden;
  box-shadow: none;
}

.date-details summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 15px;
  color: var(--gold-2);
  cursor: pointer;
  list-style: none;
}

.date-details summary::-webkit-details-marker {
  display: none;
}

.date-details summary small {
  color: var(--muted);
}

.date-details .details-match-list {
  padding: 0 12px 12px;
}

.match-card {
  overflow: hidden;
}

.match-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  padding: 16px;
  border-bottom: 1px solid var(--line);
}

.teams {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 68px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 16px;
}

.team {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-width: 0;
}

.team.away {
  grid-template-columns: minmax(0, 1fr) 46px;
  text-align: right;
}

.team-name {
  display: block;
  overflow-wrap: anywhere;
  font-weight: 900;
}

.team-logo-wrap {
  position: relative;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  overflow: hidden;
  border: 1px solid rgba(215, 180, 95, 0.26);
  border-radius: 50%;
  color: var(--gold-2);
  background: rgba(255, 255, 255, 0.08);
  font-size: 12px;
  font-weight: 950;
}

.inline-crest {
  width: 36px;
  height: 36px;
  font-size: 10px;
}

.team-logo-wrap::before {
  content: attr(data-fallback);
}

.team-logo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 50%;
  background: #101710;
}

.prediction-band {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 0.3fr);
  gap: 14px;
  padding: 16px;
  background: rgba(0, 0, 0, 0.16);
}

.match-score-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 72px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
}

.match-score-panel.limited {
  display: block;
  color: var(--muted);
  line-height: 1.5;
}

.match-score-side {
  display: grid;
  gap: 6px;
}

.match-score-side span {
  color: var(--muted);
  font-size: 12px;
}

.match-score-side strong {
  color: var(--gold-2);
  font-size: 24px;
  line-height: 1;
}

.score-vs {
  display: grid;
  place-items: center;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.match-breakdown {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: 0 16px 14px;
  border-bottom: 1px solid var(--line);
}

.risk-list {
  margin: 10px 0 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.6;
}

.prediction-main strong {
  display: block;
  margin-bottom: 8px;
  font-size: 18px;
}

.prediction-main p {
  color: var(--muted);
  line-height: 1.6;
}

.prediction-meta {
  display: grid;
  gap: 8px;
  align-content: start;
}

.confidence-pill.high {
  color: #05110a;
  background: #8df0ae;
}

.confidence-pill.medium {
  color: #1e1909;
  background: #f0d88b;
}

.confidence-pill.low,
.confidence-pill.review {
  color: #210704;
  background: #ffaaa1;
}

.prediction-meta a,
.news-item a {
  color: var(--blue);
  text-decoration: none;
}

.news-list.wide {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.source-panel {
  display: grid;
  gap: 12px;
  margin-bottom: 16px;
}

.source-overview,
.refresh-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.source-overview div,
.refresh-grid article,
.coverage-list article,
.source-health-list,
.manual-refresh-panel {
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
}

.source-overview span,
.source-overview small,
.refresh-grid span,
.coverage-list span,
.coverage-list small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.source-overview strong {
  display: block;
  margin: 6px 0;
  color: var(--gold-2);
  font-size: 20px;
}

.refresh-grid strong,
.coverage-list strong {
  display: block;
  margin-bottom: 5px;
  color: var(--white);
}

.manual-refresh-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  border-color: rgba(215, 180, 95, 0.25);
}

.manual-refresh-panel strong,
.manual-refresh-panel span {
  display: block;
}

.manual-refresh-panel strong {
  margin-bottom: 4px;
  color: var(--white);
}

.manual-refresh-panel span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.manual-refresh-panel.loading {
  border-color: rgba(121, 184, 255, 0.38);
}

.manual-refresh-panel.success {
  border-color: rgba(64, 192, 87, 0.34);
}

.manual-refresh-panel.error {
  border-color: rgba(255, 107, 107, 0.42);
}

.refresh-action-button {
  min-width: 104px;
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid var(--gold);
  border-radius: 8px;
  color: #151507;
  background: linear-gradient(135deg, var(--gold-2), var(--gold));
  cursor: pointer;
  font-weight: 900;
}

.refresh-action-button:disabled {
  color: rgba(248, 242, 223, 0.68);
  border-color: rgba(255, 255, 255, 0.13);
  background: rgba(255, 255, 255, 0.08);
  cursor: progress;
}

.source-health-list header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.source-health-list header strong {
  color: var(--white);
}

.source-health-list header span {
  color: var(--muted);
  font-size: 12px;
}

.source-health-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.source-health-card {
  position: relative;
  display: grid;
  gap: 4px;
  min-height: 78px;
  padding: 11px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  color: inherit;
  text-decoration: none;
  background: rgba(0, 0, 0, 0.18);
}

.source-health-card.ok {
  border-color: rgba(64, 192, 87, 0.28);
}

.source-health-card.stale {
  border-color: rgba(255, 212, 59, 0.32);
}

.source-health-card.error {
  border-color: rgba(255, 107, 107, 0.36);
}

.source-health-card .source-state {
  width: fit-content;
  padding: 2px 7px;
  border-radius: 999px;
  color: var(--gold-2);
  font-size: 11px;
  line-height: 1.4;
  background: rgba(231, 197, 113, 0.1);
}

.source-health-card.error .source-state {
  color: #ff8787;
  background: rgba(255, 107, 107, 0.12);
}

.source-health-card.stale .source-state {
  color: #ffd43b;
  background: rgba(255, 212, 59, 0.12);
}

.source-health-card strong {
  color: var(--white);
  font-size: 13px;
  line-height: 1.35;
}

.source-health-card small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.coverage-list {
  display: grid;
  gap: 8px;
}

.coverage-list article {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.7fr);
  gap: 12px;
  align-items: center;
}

.news-item {
  padding: 14px;
  box-shadow: none;
}

.news-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 7px 0;
}

.news-item p {
  color: var(--muted);
  line-height: 1.6;
}

.empty-state {
  padding: 24px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.04);
}

@media (max-width: 1240px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .side-rail {
    position: static;
    height: auto;
  }

  .view-nav {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .path-layout {
    grid-template-columns: 1fr;
  }

  .path-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .team-drawer {
    position: static;
    max-height: none;
  }

  .home-schedule {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .main-content,
  .side-rail {
    padding: 16px;
  }

  .hero-panel,
  .controls-panel,
  .prediction-band,
  .match-top {
    grid-template-columns: 1fr;
  }

  .hero-metrics,
  .path-summary,
  .standings-summary,
  .source-overview,
  .source-health-grid,
  .refresh-grid,
  .home-schedule,
  .news-list.wide,
  .view-nav {
    grid-template-columns: 1fr;
  }

  .path-trunk,
  .path-layer::after,
  .layer-copy::after {
    display: none;
  }

  .path-layer {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 14px;
  }

  .path-layer::before {
    inset: 0;
    border: 1px solid var(--tier-line);
    border-radius: 8px;
  }

  .node-rail,
  .path-layer.core .node-rail {
    grid-template-columns: 1fr;
  }

  .path-layer.core .node-rail,
  .path-layer.elite .node-rail,
  .path-layer.contenders .node-rail,
  .path-layer.darkhorses .node-rail {
    transform: none;
  }

  .path-layer.core .team-node {
    padding-right: 112px;
  }

  .champion-trophy {
    width: 110px;
    right: 0;
    bottom: -18px;
  }

  .drawer-hero,
  .drawer-grid,
  .schedule-row,
  .schedule-teams,
  .teams,
  .match-score-panel,
  .match-breakdown,
  .standings-preview,
  .coverage-list article {
    grid-template-columns: 1fr;
  }

  .inline-team.away,
  .team.away {
    grid-template-columns: 36px minmax(0, 1fr);
    text-align: left;
  }

  .team.away {
    grid-template-columns: 46px minmax(0, 1fr);
  }

  .source-health-list header {
    align-items: flex-start;
    flex-direction: column;
  }

  .manual-refresh-panel {
    grid-template-columns: 1fr;
  }

  .refresh-action-button {
    width: 100%;
  }

  .inline-team.away .team-logo-wrap,
  .team.away .team-logo-wrap {
    order: -1;
  }
}
