:root {
  color-scheme: light;
  --bg: #f4f6f3;
  --ink: #17211c;
  --muted: #637067;
  --panel: #ffffff;
  --line: #d9e0d9;
  --green: #147a52;
  --green-deep: #0e4e38;
  --blue: #1d5a8f;
  --amber: #b56b16;
  --red: #b63c3c;
  --shadow: 0 18px 45px rgba(32, 45, 38, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 10% 0%, rgba(20, 122, 82, 0.12), transparent 34rem),
    linear-gradient(180deg, #edf2ee 0%, var(--bg) 28rem);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

button,
select,
input {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

.shell {
  width: min(1240px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 28px 0 34px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.eyebrow,
.section-kicker {
  margin: 0 0 4px;
  color: var(--green);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  font-size: clamp(2rem, 5vw, 4.4rem);
  line-height: 0.96;
}

h2 {
  font-size: 1.18rem;
}

.status-set {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid rgba(20, 122, 82, 0.25);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  color: var(--green-deep);
  font-size: 0.88rem;
  font-weight: 700;
}

.warning-pill {
  border-color: rgba(181, 107, 22, 0.3);
  color: #7c4a13;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22a46d;
  box-shadow: 0 0 0 4px rgba(34, 164, 109, 0.16);
}

.amber-dot {
  background: var(--amber);
  box-shadow: 0 0 0 4px rgba(181, 107, 22, 0.16);
}

.data-banner {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  margin: -8px 0 22px;
  border: 1px solid rgba(181, 107, 22, 0.22);
  border-radius: 8px;
  background: rgba(255, 248, 235, 0.8);
  color: #684114;
  padding: 10px 12px;
  font-size: 0.88rem;
  line-height: 1.45;
}

.data-banner strong {
  white-space: nowrap;
}

.hero-grid,
.dashboard-grid,
.analysis-grid,
.launch-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(310px, 0.9fr);
  gap: 18px;
  align-items: stretch;
}

.tool-panel {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.match-lab,
.model-panel,
.wide-panel,
.matrix-panel,
.insight-panel,
.compare-panel,
.data-panel,
.launch-panel,
.fixtures-panel {
  padding: 18px;
}

.launch-grid {
  margin-bottom: 18px;
}

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

.count-tile {
  min-height: 102px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfb;
  padding: 12px;
}

.count-tile strong,
.count-tile span {
  display: block;
}

.count-tile strong {
  font-size: clamp(1.6rem, 4vw, 2.7rem);
  line-height: 1;
}

.count-tile span {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.fixture-list {
  display: grid;
  gap: 8px;
  max-height: 332px;
  overflow: auto;
  padding-right: 2px;
}

.fixture-button {
  display: grid;
  width: 100%;
  min-height: 68px;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfb;
  color: var(--ink);
  padding: 10px;
  text-align: left;
}

.fixture-button:hover {
  border-color: rgba(20, 122, 82, 0.36);
  background: #f6fbf8;
}

.fixture-date {
  display: grid;
  place-items: center;
  min-height: 46px;
  border-radius: 8px;
  background: #e8f1eb;
  color: var(--green-deep);
  font-size: 0.8rem;
  font-weight: 900;
}

.fixture-main {
  min-width: 0;
}

.fixture-main strong,
.fixture-main span {
  display: block;
}

.fixture-main strong {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.fixture-main span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.fixture-group {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 900;
}

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

.icon-button,
.ghost-button,
.secondary-button,
.sim-actions button {
  min-height: 38px;
  border-radius: 8px;
  font-weight: 800;
}

.icon-button {
  width: 38px;
  background: #e6eee8;
  color: var(--green-deep);
  font-size: 1.05rem;
}

.ghost-button,
.secondary-button {
  padding: 0 14px;
  background: #edf2ee;
  color: var(--green-deep);
}

.mini-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.mini-actions .ghost-button {
  min-height: 34px;
  padding: 0 10px;
  font-size: 0.82rem;
}

.team-selectors {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

label span {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 0.83rem;
  font-weight: 800;
}

select {
  width: 100%;
  min-height: 44px;
  border: 1px solid #cbd5ce;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 0 12px;
  outline: none;
}

select:focus,
input:focus-visible,
button:focus-visible {
  outline: 3px solid rgba(29, 90, 143, 0.22);
  outline-offset: 2px;
}

.match-visual {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(210px, 0.68fr);
  gap: 16px;
  margin: 16px 0;
  align-items: stretch;
}

.pitch {
  position: relative;
  min-height: 220px;
  overflow: hidden;
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.12) 50%, transparent 50%) 0 0 / 96px 96px,
    linear-gradient(135deg, #147a52, #0d5b40);
}

.pitch::before,
.pitch::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 58px;
  height: 96px;
  border: 2px solid rgba(255, 255, 255, 0.72);
  transform: translateY(-50%);
}

.pitch::before {
  left: -2px;
  border-left: 0;
}

.pitch::after {
  right: -2px;
  border-right: 0;
}

.pitch-line {
  position: absolute;
  inset: 0 50% 0 auto;
  width: 2px;
  background: rgba(255, 255, 255, 0.72);
}

.center-circle {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 76px;
  height: 76px;
  border: 2px solid rgba(255, 255, 255, 0.72);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.team-marker {
  position: absolute;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #fff;
  color: var(--green-deep);
  font-weight: 900;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.16);
}

.team-marker-a {
  left: 22%;
  top: 48%;
}

.team-marker-b {
  right: 22%;
  top: 48%;
}

.score-call {
  display: flex;
  min-height: 220px;
  flex-direction: column;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfb;
  padding: 18px;
}

.score-call span,
.score-call small {
  color: var(--muted);
  font-weight: 800;
}

.score-call strong {
  margin: 10px 0;
  font-size: clamp(2rem, 7vw, 4.6rem);
  line-height: 1;
}

.probability-bars {
  display: grid;
  gap: 10px;
}

.prob-row {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) 58px;
  gap: 10px;
  align-items: center;
}

.prob-row span {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 800;
}

.bar-track {
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: #e7ece8;
}

.bar-fill {
  height: 100%;
  border-radius: inherit;
  background: var(--green);
  transition: width 220ms ease;
}

.bar-fill.draw {
  background: var(--amber);
}

.bar-fill.loss {
  background: var(--blue);
}

.score-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}

.score-cell {
  min-height: 62px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfb;
  padding: 9px;
}

.score-cell strong,
.score-cell span {
  display: block;
}

.score-cell strong {
  font-size: 1.05rem;
}

.score-cell span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.analysis-grid {
  margin-top: 18px;
}

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

.metric-tile {
  min-height: 96px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfb;
  padding: 12px;
}

.metric-tile span,
.metric-tile small {
  display: block;
  color: var(--muted);
  font-weight: 800;
}

.metric-tile strong {
  display: block;
  margin: 8px 0 4px;
  font-size: 1.35rem;
  line-height: 1.05;
}

.share-text {
  width: 100%;
  min-height: 142px;
  margin-top: 12px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfb;
  color: var(--ink);
  line-height: 1.55;
  padding: 12px;
  outline: none;
}

.team-compare {
  display: grid;
  gap: 12px;
}

.compare-head {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.compare-team {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfb;
  padding: 12px;
}

.compare-team strong,
.compare-team span {
  display: block;
}

.compare-team strong {
  font-size: 1.12rem;
}

.compare-team span {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 800;
  margin-top: 3px;
}

.compare-row {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr) 72px;
  gap: 10px;
  align-items: center;
}

.compare-row span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.compare-row b {
  text-align: right;
  font-size: 0.86rem;
}

.dual-track {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 4px;
  align-items: center;
}

.dual-side {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #e7ece8;
}

.dual-side:first-child .dual-fill {
  margin-left: auto;
  background: var(--green);
}

.dual-side:last-child .dual-fill {
  background: var(--blue);
}

.dual-fill {
  height: 100%;
  border-radius: inherit;
}

.slider-row {
  display: grid;
  grid-template-columns: 105px minmax(0, 1fr) 34px;
  gap: 10px;
  align-items: center;
  margin: 18px 0;
}

.slider-row span {
  margin: 0;
}

input[type="range"] {
  width: 100%;
  accent-color: var(--green);
}

.factor-list {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.factor-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.factor-item span {
  color: var(--muted);
  font-weight: 800;
}

.factor-item b {
  color: var(--ink);
}

.sim-actions {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin: 24px 0 14px;
}

.action-set {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.sim-depth {
  display: grid;
  grid-template-columns: auto 106px;
  gap: 8px;
  align-items: center;
  min-height: 38px;
}

.sim-depth span {
  margin: 0;
}

.sim-depth select {
  min-height: 38px;
}

.sim-actions button {
  padding: 0 16px;
  background: var(--green-deep);
  color: #fff;
}

.sim-actions .secondary-button {
  background: #dce7e0;
  color: var(--green-deep);
}

.mini-meta {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.champion-list {
  display: grid;
  gap: 10px;
}

.champion-row,
.group-row,
.team-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfb;
}

.champion-row {
  display: grid;
  grid-template-columns: 46px 1fr 64px;
  gap: 10px;
  align-items: center;
  padding: 10px;
}

.rank-badge {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #e4eee7;
  color: var(--green-deep);
  font-weight: 900;
}

.team-line {
  min-width: 0;
}

.team-line strong {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.team-line small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
}

.team-line .bar-track {
  margin-top: 7px;
}

.percent {
  text-align: right;
  font-weight: 900;
}

.compact-select {
  width: auto;
  min-width: 86px;
  min-height: 36px;
}

.group-table {
  display: grid;
  gap: 10px;
}

.group-header {
  display: grid;
  grid-template-columns: 1fr 74px 74px;
  gap: 10px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  padding: 0 12px;
}

.group-row {
  display: grid;
  grid-template-columns: 1fr 74px 74px;
  gap: 10px;
  align-items: center;
  padding: 12px;
}

.group-row .sub {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.group-row b {
  text-align: right;
}

.team-matrix {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}

.team-card {
  padding: 10px;
}

.team-card strong {
  display: block;
  min-height: 40px;
  line-height: 1.2;
}

.team-card span {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.team-card meter {
  width: 100%;
  height: 8px;
  margin-top: 8px;
}

.data-panel {
  margin-top: 18px;
}

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

.data-step {
  min-height: 104px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfb;
  padding: 12px;
}

.data-step b,
.data-step span {
  display: block;
}

.data-step b {
  margin-bottom: 8px;
}

.data-step span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1.45;
}

.active-step {
  border-color: rgba(20, 122, 82, 0.35);
  background: #f2faf5;
}

.ops-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.ops-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfb;
  padding: 12px;
}

.ops-item b,
.ops-item span {
  display: block;
}

.ops-item b {
  font-size: 1.25rem;
  line-height: 1.05;
}

.ops-item span {
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.ops-warn {
  border-color: rgba(181, 107, 22, 0.35);
  background: #fff8eb;
}

.ops-bad {
  border-color: rgba(182, 60, 60, 0.35);
  background: #fff3f3;
}

.footer-note {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px 18px;
  margin-top: 18px;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.6;
}

.footer-links {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 12px;
  font-weight: 800;
}

.text-link,
.footer-links a {
  color: var(--green-deep);
  text-decoration: none;
}

.text-link:hover,
.footer-links a:hover {
  text-decoration: underline;
}

.doc-shell {
  max-width: 920px;
}

.doc-panel {
  margin-bottom: 14px;
  padding: 18px;
}

.doc-panel h2 {
  margin-bottom: 10px;
}

.doc-panel p {
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
  font-weight: 650;
  line-height: 1.8;
}

@media (max-width: 980px) {
  .hero-grid,
  .dashboard-grid,
  .analysis-grid,
  .launch-grid {
    grid-template-columns: 1fr;
  }

  .team-matrix,
  .data-grid,
  .ops-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .shell {
    width: min(100% - 20px, 1240px);
    padding-top: 18px;
  }

  .topbar,
  .sim-actions,
  .footer-note {
    align-items: flex-start;
    flex-direction: column;
  }

  .data-banner {
    grid-template-columns: 1fr;
  }

  .action-set,
  .sim-actions button,
  .sim-depth {
    width: 100%;
  }

  .team-selectors,
  .match-visual {
    grid-template-columns: 1fr;
  }

  .score-grid,
  .team-matrix,
  .report-metrics,
  .data-grid,
  .ops-grid,
  .countdown {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .score-call,
  .pitch {
    min-height: 180px;
  }

  .slider-row {
    grid-template-columns: 1fr 34px;
  }

  .slider-row input {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .mini-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .mini-actions .ghost-button {
    flex: 1;
  }
}
