
:root {
  --bg: #ffffff;
  --bg-soft: #f7f7f5;
  --panel: #ffffff;
  --text: #111216;
  --text-muted: #6d6f76;
  --line: rgba(17, 18, 22, 0.08);
  --positive: #3bb273;
  --warning: #e7a93b;
  --danger: #c94a4a;
  --shadow: 0 16px 48px rgba(10, 11, 14, 0.08);
  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 16px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "SF Pro Display", "Helvetica Neue", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
}
a { color: inherit; text-decoration: none; }

.page-shell { min-height: 100vh; }
.content-shell {
  padding: 28px;
  background: var(--bg);
}

.section-title {
  font-size: 13px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.featured-shell {
  margin-bottom: 22px;
}

.record-shell {
  margin-bottom: 22px;
}

.record-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 18px;
}

.record-breakdown,
.record-notes {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 18px 20px;
  box-shadow: var(--shadow);
}

.record-breakdown {
  margin-bottom: 18px;
  color: rgba(17,18,22,0.78);
  font-variant-numeric: tabular-nums;
}

.record-feed {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.record-chip,
.record-empty {
  display: grid;
  gap: 8px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 16px 18px;
  box-shadow: var(--shadow);
}

.record-chip span,
.record-empty {
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.record-chip strong {
  font-size: 18px;
  line-height: 1.35;
}

.record-chip em {
  font-style: normal;
  color: rgba(17,18,22,0.72);
}

.record-notes p {
  margin: 0;
  line-height: 1.7;
  color: rgba(17,18,22,0.78);
}

.filters-layout {
  display: grid;
  grid-template-columns: minmax(260px, 320px) minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.filters-sidebar,
.filters-results-shell {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.filters-sidebar {
  padding: 18px;
  position: sticky;
  top: 24px;
}

.filters-grid {
  display: grid;
  gap: 14px;
}

.filter-field {
  display: grid;
  gap: 8px;
  padding: 0;
}

.filter-field span {
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.filter-field select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--bg);
  color: var(--text);
  padding: 12px 14px;
  font: inherit;
}

.filters-results-shell {
  padding: 18px;
  background: var(--bg-soft);
}

.filters-results {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 18px;
}

.agent-shell {
  margin-bottom: 22px;
}

.agent-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.agent-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 20px;
  box-shadow: var(--shadow);
}

.agent-intro,
.agent-note,
.agent-response,
.agent-status,
.agent-version-item {
  line-height: 1.7;
  color: rgba(17,18,22,0.78);
}

.agent-intro {
  margin: 0 0 12px;
  font-size: 16px;
}

.agent-note {
  margin: 0 0 10px;
}

.agent-status,
.agent-response {
  border-radius: 16px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  padding: 14px 16px;
}

.agent-chat-form {
  display: grid;
  gap: 14px;
}

.agent-field {
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.agent-chat-form textarea {
  width: 100%;
  resize: vertical;
  min-height: 120px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--bg);
  color: var(--text);
  padding: 14px 16px;
  font: inherit;
}

.agent-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.agent-versions-title {
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.agent-version-list {
  display: grid;
  gap: 12px;
}

.agent-version-item {
  border-radius: 16px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  padding: 14px 16px;
}

.agent-version-item strong {
  display: block;
  margin-bottom: 6px;
  color: var(--text);
}

.topbar, .detail-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.brand {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.16em;
}

.topbar-copy {
  color: var(--text-muted);
  font-size: 13px;
}

.eyebrow {
  font-size: 12px;
  letter-spacing: 0.18em;
  color: var(--text-muted);
  text-transform: uppercase;
}

.primary-button, .ghost-button, .detail-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 14px 22px;
  font-weight: 600;
  transition: transform 180ms ease, background 180ms ease, color 180ms ease;
}

.primary-button {
  background: #101114;
  color: #f6f4ee;
}

.ghost-button {
  background: rgba(17,18,22,0.04);
  border: 1px solid var(--line);
}

.primary-button:hover, .ghost-button:hover, .detail-link:hover {
  transform: translateY(-2px);
}

.metric-card, .telemetry-card {
  border-radius: var(--radius-lg);
  padding: 24px;
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.metric-label, .telemetry-label, .pick-label {
  display: block;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.metric-card strong, .telemetry-card strong {
  font-size: 36px;
  line-height: 1;
}

.telemetry-meta {
  margin: 10px 0 0;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.prediction-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 18px;
}

.prediction-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  padding: 24px;
  box-shadow: var(--shadow);
}

.card-head, .teams, .pick-rail, .result-rail {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.card-head { align-items: center; }

.competition-tag, .market-chip, .signal {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.competition-tag {
  background: rgba(17,18,22,0.04);
  color: rgba(17,18,22,0.72);
}

.market-chip {
  background: rgba(59,178,115,0.12);
  color: #1f7d4d;
  border: 1px solid rgba(59,178,115,0.2);
}

.signal {
  background: rgba(17,18,22,0.04);
  color: rgba(17,18,22,0.72);
}

.teams {
  margin-top: 20px;
  flex-direction: column;
}

.team-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.team-line.away {
  color: rgba(17,18,22,0.78);
}

.team-name {
  font-size: 30px;
  line-height: 1.05;
  font-weight: 600;
}

.kickoff {
  color: rgba(17,18,22,0.54);
  font-variant-numeric: tabular-nums;
}

.result-rail {
  align-items: center;
  margin-top: 18px;
}

.result-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 58px;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.result-pill.is-red { background: rgba(59,178,115,0.14); color: #1f7d4d; }
.result-pill.is-black { background: rgba(201,74,74,0.10); color: var(--danger); }
.result-pill.is-push { background: rgba(231,169,59,0.16); color: #9c6a11; }
.result-pill.is-half-red { background: linear-gradient(90deg, rgba(59,178,115,0.14) 50%, rgba(231,169,59,0.16) 50%); color: var(--text); }
.result-pill.is-half-black { background: linear-gradient(90deg, rgba(201,74,74,0.10) 50%, rgba(231,169,59,0.16) 50%); color: var(--text); }
.result-pill.is-pending { background: rgba(17,18,22,0.06); color: rgba(17,18,22,0.68); }

.result-score {
  color: rgba(17,18,22,0.68);
  font-variant-numeric: tabular-nums;
}

.prediction-card h3 {
  margin: 22px 0 12px;
  font-size: 24px;
  line-height: 1.15;
}

.selling-point {
  color: rgba(17,18,22,0.72);
  line-height: 1.7;
  min-height: 108px;
}

.pick-rail {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.pick-rail strong {
  font-size: 18px;
}

.detail-link {
  margin-top: 22px;
  background: rgba(17,18,22,0.04);
  color: var(--text);
}

.detail-shell {
  min-height: 100vh;
  background: var(--bg);
  padding: 24px 28px 40px;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(280px, 0.7fr);
  gap: 22px;
  margin-top: 32px;
}

.article-panel, .telemetry-panel {
  min-width: 0;
}

.article-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 40px;
  padding: 34px;
  box-shadow: var(--shadow);
}

.article-panel h1 {
  margin: 10px 0 18px;
  font-size: clamp(38px, 5vw, 72px);
  line-height: 0.98;
  max-width: 12ch;
}

.match-headline {
  color: var(--text-muted);
  margin-bottom: 28px;
  font-size: 18px;
}

.match-headline span {
  opacity: 0.5;
  margin: 0 10px;
}

.article-section {
  padding: 22px 0;
  border-top: 1px solid var(--line);
}

.article-section:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.article-section h2 {
  margin: 0 0 10px;
  font-size: 20px;
}

.article-section p {
  margin: 0;
  line-height: 1.9;
  color: rgba(17,18,22,0.82);
  white-space: pre-wrap;
}

.telemetry-panel {
  display: grid;
  gap: 14px;
  align-self: start;
  position: sticky;
  top: 24px;
}

.telemetry-card.muted strong {
  font-size: 24px;
}

@media (max-width: 980px) {
  .record-grid,
  .filters-layout,
  .detail-layout,
  .agent-grid {
    grid-template-columns: 1fr;
  }
  .filters-sidebar { position: static; }
  .telemetry-panel {
    position: static;
  }
}

@media (max-width: 640px) {
  .content-shell, .detail-shell {
    padding-left: 18px;
    padding-right: 18px;
  }
  .article-panel {
    padding: 24px;
    border-radius: 28px;
  }
  .team-name {
    font-size: 24px;
  }
}
