@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;600&family=Inter:wght@400;500;600;700&display=swap');

/*
  Font rule - two fonts, no exceptions:
    IBM Plex Mono  →  data, numbers, stats, domain content (WHAT the app is about)
    Inter          →  UI chrome, labels, nav, buttons, descriptions (HOW you navigate)
  Dense data desktop app: all sizes -1px from the base type scale.
*/

/* ── Base ─────────────────────────────────────────────────────────── */

* {
  box-sizing: border-box;
}

body {
  font-family: 'Inter', system-ui, sans-serif;
  background-color: #ffffff;
  color: #222;
  font-size: 13px;
  margin: 0;
}

a {
  text-decoration: none;
}

/* ── Page layout ──────────────────────────────────────────────────── */

.page-wrapper {
  max-width: 1280px;
  margin: 0 auto;
  padding: 20px 24px;
}

.card-row {
  margin-bottom: 16px;
}

/* ── Section label - Inter, UI chrome ────────────────────────────── */

.section-label {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #888;
  margin-bottom: 8px;
  display: block;
}

/* ── Navbar ───────────────────────────────────────────────────────── */

.ciq-navbar {
  background-color: #0f0f0f;
  height: 48px;
  display: flex;
  align-items: center;
  padding: 0 24px;
  position: relative;
}

/* Brand: Inter - it's the app name, UI chrome */
.ciq-navbar__brand {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #ffffff;
  text-decoration: none;
}

.ciq-navbar__brand:hover {
  color: #ffffff;
  text-decoration: none;
}

/* Condensed dataset stats - inline after the brand, muted so it doesn't compete with links */
.ciq-navbar__stats {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 9px;
  font-weight: 400;
  color: #888;
  margin-left: 16px;
  white-space: nowrap;
}

.ciq-navbar__nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Nav links: Inter - navigation chrome */
.ciq-navbar__nav-link,
.ciq-navbar__nav-link:visited,
.nav-link.ciq-navbar__nav-link {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 10px; /* labelSM at -1px */
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #666 !important;
  text-decoration: none !important;
  padding: 4px 10px;
  border-radius: 3px;
  transition: color 0.15s;
}

.ciq-navbar__nav-link:hover,
.nav-link.ciq-navbar__nav-link:hover,
.nav-link.ciq-navbar__nav-link.active {
  color: #ffffff !important;
  text-decoration: none !important;
  background-color: transparent;
}

/* ── Metric card ──────────────────────────────────────────────────── */

.metric-card {
  background: #ffffff;
  border: 1px solid #e5e5e5;
  border-radius: 6px;
  padding: 16px 18px;
  box-shadow: none;
  height: 100%;
}

/* Label: Inter - describes what the number means, UI chrome */
.metric-card__label {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #888;
  margin-bottom: 8px;
  display: block;
}

.metric-card__value-row {
  display: flex;
  align-items: baseline;
  gap: 2px;
}

/* Value: IBM Plex Mono - this IS the data */
.metric-card__value {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 28px;
  font-weight: 600;
  color: #111;
  line-height: 1;
}

/* Dual value: IBM Plex Mono - smaller variant for cards showing two stacked values */
.metric-card__dual-value {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 15px;
  font-weight: 600;
  color: #111;
  line-height: 1.6;
}

/* Secondary value: IBM Plex Mono - also data (e.g. " runs", "/7") */
.metric-card__secondary {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  font-weight: 400;
  color: #777;
  margin-left: 2px;
}

.metric-card__bar-track {
  height: 3px;
  background: #e5e5e5;
  border-radius: 2px;
  margin-top: 10px;
  overflow: hidden;
}

/* width and background-color set dynamically via inline style */
.metric-card__bar-fill {
  height: 100%;
  border-radius: 2px;
}

/* ── Chart card ───────────────────────────────────────────────────── */

.chart-card {
  background: #ffffff;
  border: 1px solid #e5e5e5;
  border-radius: 6px;
  padding: 16px 18px;
  box-shadow: none;
}

/* Chart label: Inter - UI chrome describing the chart */
.chart-card__label {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #888;
  margin-bottom: 8px;
  display: block;
}

/* ── Activity / match feed ────────────────────────────────────────── */

.feed-row {
  display: flex;
  align-items: center;
  padding: 12px 0 12px 12px;
  border-bottom: 1px solid #f0f0f0;
  position: relative;
}

.feed-row__accent {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  border-radius: 0 2px 2px 0;
}

.feed-row__left {
  flex: 1;
}

/* Tag: Inter - metadata label ("venue · date") */
.feed-row__tag {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 9px;
  color: #888;
  margin-bottom: 2px;
}

/* Title: Inter - result description ("MI won") */
.feed-row__title {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 12px;
  font-weight: 500;
  color: #111;
}

.feed-row__right {
  text-align: right;
}

/* Value: IBM Plex Mono - the actual result data ("24 runs", "5 wkts") */
.feed-row__value {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  font-weight: 600;
  color: #111;
}


/* ── Key Research Findings card ──────────────────────────────────── */

.findings-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.finding-row {
  display: flex;
  align-items: flex-start;
  margin-bottom: 14px;
}

.finding-row:last-child {
  margin-bottom: 0;
}

/* Finding text: Inter - it's descriptive prose, not data */
.finding-text {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 11px;
  color: #333;
  line-height: 1.5;
}

.finding-text strong {
  font-weight: 600;
  color: #111;
}

/* ── Toss impact block ────────────────────────────────────────────── */

.toss-team-block {
  padding: 8px 0;
}

/* Team name: Inter - it's a label, not data */
.toss-team-name {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #333;
  margin-bottom: 6px;
}

/* ── Toss impact grid blocks ─────────────────────────────────────── */

.toss-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-top: 6px;
}

.toss-block {
  background: #f8f8f8;
  border: 1px solid #efefef;
  border-radius: 4px;
  padding: 8px 10px;
}

/* ALL-CAPS label: Inter - UI descriptor */
.toss-block__label {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 9px;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 4px;
}

/* Big win count: IBM Plex Mono - it's the data */
.toss-block__wins {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 15px;
  font-weight: 600;
  color: #111;
}

/* "/ 12" denominator: Inter, muted */
.toss-block__denom {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 10px;
  color: #888;
}

.toss-block__bar-track {
  width: 100%;
  height: 3px;
  background-color: #e5e5e5;
  border-radius: 2px;
  margin-top: 5px;
  margin-bottom: 3px;
}

/* "X% win rate" footer: Inter, muted */
.toss-block__pct {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 9px;
  color: #777;
}

.toss-block__no-data {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 10px;
  color: #ccc;
  margin-top: 4px;
}

/* Context line above the decision blocks */
.toss-decision-header {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 9px;
  color: #bbb;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-top: 10px;
}

/* ── Cluster badge - Inter, UI chrome ────────────────────────────── */

.cluster-badge {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 3px;
  border: 1px solid;
  white-space: nowrap;
  margin-left: 4px;
}

/* ── Filter buttons - Inter, UI chrome ───────────────────────────── */

.filter-btn {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 1px solid #e5e5e5;
  border-radius: 4px;
  padding: 6px 12px;
  background: transparent;
  color: #888;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}

.filter-btn:hover,
.filter-btn.active {
  color: #111;
  border-color: #111;
}

/* ── Season toggle (navbar) - Inter, UI chrome ────────────────────── */

.ciq-navbar__season-toggle {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: 16px;
  padding-left: 16px;
  border-left: 1px solid #2a2a2a;
}

.season-btn {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: transparent;
  border: 1px solid #2a2a2a;
  border-radius: 3px;
  color: #555;
  padding: 3px 8px;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
  line-height: 1.4;
}

.season-btn:hover {
  color: #ccc;
  border-color: #555;
}

.season-btn--active {
  color: #fff;
  border-color: #666;
}

/* ── Section divider - separates batting and bowling on player page ── */

.section-divider {
  border: none;
  border-top: 1px solid #e5e5e5;
  margin: 8px 0 16px;
}

/* ── H2H match feed scroll container ─────────────────────────────── */

.h2h-feed-scroll {
  max-height: 252px; /* ~5 rows at ~50px each */
  overflow-y: auto;
  overflow-x: hidden;
}

.h2h-feed-scroll::-webkit-scrollbar {
  width: 4px;
}

.h2h-feed-scroll::-webkit-scrollbar-track {
  background: transparent;
}

.h2h-feed-scroll::-webkit-scrollbar-thumb {
  background: #e5e5e5;
  border-radius: 2px;
}

/* ── Historical base rate card (Simulator page) ─────────────────── */

/* Number values: IBM Plex Mono - they're data points */
.base-rate__value {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 13px;
  font-weight: 600;
  color: #111;
}

/* Connecting prose: Inter - it's descriptive text */
.base-rate__text {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 11px;
  color: #888;
}

/* ── What-if scenario cards (Simulator page) ─────────────────────── */

/* Big probability number: IBM Plex Mono - it's the data point */
.whatif-card__prob {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 28px;
  font-weight: 600;
  color: #111;
  line-height: 1;
  margin-top: 8px;
  margin-bottom: 4px;
}

/* Delta line: IBM Plex Mono - it's a computed data value, color set inline */
.whatif-card__delta {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  font-weight: 400;
}

/* ── Matchup metric toggle (Player page) ─────────────────────────── */

/* Container: flex row aligned to the right of the chart card label */
.matchup-toggle {
  display: flex;
  gap: 4px;
  margin-bottom: 6px;
}

/* Each radio option label: small pill button */
.matchup-toggle label {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 3px 8px;
  border: 1px solid #e5e5e5;
  border-radius: 3px;
  color: #aaa;
  cursor: pointer;
  transition: color 0.12s, border-color 0.12s;
  margin: 0;
}

.matchup-toggle label:hover {
  color: #555;
  border-color: #bbb;
}

/* Hide the actual radio circle - the label acts as the button */
.matchup-toggle input[type="radio"] {
  display: none;
}

/* Active state: style the label that follows a checked radio */
.matchup-toggle input[type="radio"]:checked + label {
  color: #3b82f6;
  border-color: #3b82f6;
}
