:root {
  --bg: #081019;
  --bg2: #0c1622;
  --panel: #101d2a;
  --panel-2: #142536;
  --line: #25384b;
  --text: #edf5fb;
  --muted: #91a5b8;
  --soft: #c8d6e2;
  --accent: #63e6be;
  --accent-2: #74c0fc;
  --warning: #ffd43b;
  --radius: 18px;
  --shadow: 0 18px 45px rgba(0,0,0,.22);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 80% -10%, rgba(99,230,190,.10), transparent 32rem),
    radial-gradient(circle at -5% 20%, rgba(116,192,252,.08), transparent 28rem),
    var(--bg);
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }
button { cursor: pointer; }
.container { width: min(1180px, calc(100% - 32px)); margin: 0 auto; }
.site-header {
  position: sticky; top: 0; z-index: 20;
  border-bottom: 1px solid rgba(145,165,184,.12);
  background: rgba(8,16,25,.83); backdrop-filter: blur(18px);
}
.nav { height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: flex; align-items: center; gap: 11px; font-weight: 800; letter-spacing: -.03em; font-size: 20px; }
.brand-mark { width: 32px; height: 32px; border: 1px solid rgba(99,230,190,.45); border-radius: 10px; display: grid; place-items: center; color: var(--accent); background: rgba(99,230,190,.08); font-size: 13px; letter-spacing: -.05em; }
.nav-links { display: flex; gap: 8px; align-items: center; }
.nav-links a { color: var(--muted); padding: 9px 12px; border-radius: 10px; font-size: 14px; }
.nav-links a:hover, .nav-links a.active { color: var(--text); background: rgba(255,255,255,.05); }
.nav-badge { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--accent); border: 1px solid rgba(99,230,190,.25); padding: 5px 8px; border-radius: 999px; }
main { padding-bottom: 72px; }
.hero { padding: 92px 0 58px; }
.eyebrow { color: var(--accent); font-weight: 700; text-transform: uppercase; letter-spacing: .13em; font-size: 12px; }
h1 { font-size: clamp(42px, 7vw, 76px); line-height: .98; letter-spacing: -.055em; margin: 16px 0 22px; max-width: 920px; }
h2 { font-size: clamp(28px, 4vw, 42px); letter-spacing: -.04em; margin: 0 0 14px; }
h3 { font-size: 18px; margin: 0 0 8px; letter-spacing: -.02em; }
.hero-copy { color: var(--muted); max-width: 680px; font-size: 18px; line-height: 1.65; }
.search-shell { margin-top: 34px; width: min(720px,100%); position: relative; }
.search-box { width: 100%; border: 1px solid var(--line); background: var(--panel); color: var(--text); border-radius: 16px; padding: 18px 20px 18px 50px; outline: none; box-shadow: var(--shadow); }
.search-box:focus { border-color: rgba(99,230,190,.55); box-shadow: 0 0 0 4px rgba(99,230,190,.07), var(--shadow); }
.search-icon { position: absolute; left: 19px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.search-results { position: absolute; left: 0; right: 0; top: calc(100% + 8px); background: #0e1a26; border: 1px solid var(--line); border-radius: 15px; overflow: hidden; box-shadow: var(--shadow); display: none; z-index: 10; }
.search-results.open { display: block; }
.search-result { display: flex; justify-content: space-between; gap: 16px; padding: 13px 16px; border-bottom: 1px solid rgba(145,165,184,.1); }
.search-result:last-child { border-bottom: 0; }
.search-result:hover { background: rgba(99,230,190,.06); }
.result-sub { color: var(--muted); font-size: 12px; margin-top: 3px; }
.section { padding: 44px 0; }
.section-head { display: flex; justify-content: space-between; gap: 24px; align-items: end; margin-bottom: 22px; }
.section-copy { color: var(--muted); max-width: 590px; line-height: 1.55; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.card { background: linear-gradient(180deg, rgba(20,37,54,.96), rgba(14,27,40,.96)); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 12px 28px rgba(0,0,0,.13); }
.feature-card { padding: 22px; min-height: 190px; }
.feature-icon { font-size: 13px; color: var(--accent); display: inline-flex; padding: 6px 9px; border-radius: 8px; background: rgba(99,230,190,.08); margin-bottom: 26px; }
.feature-card p { color: var(--muted); line-height: 1.55; margin: 8px 0 0; }
.player-card { padding: 18px; transition: transform .15s ease, border-color .15s ease; }
.player-card:hover { transform: translateY(-2px); border-color: rgba(99,230,190,.35); }
.player-card-top { display: flex; justify-content: space-between; align-items: start; gap: 12px; }
.player-name { font-size: 17px; font-weight: 750; }
.player-sub { margin-top: 4px; color: var(--muted); font-size: 12px; }
.position-pill { color: var(--accent-2); border: 1px solid rgba(116,192,252,.22); background: rgba(116,192,252,.06); border-radius: 999px; padding: 5px 8px; font-size: 11px; white-space: nowrap; }
.metrics-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 20px; }
.metric-mini { background: rgba(8,16,25,.38); border: 1px solid rgba(145,165,184,.1); border-radius: 12px; padding: 10px; }
.metric-mini b { display: block; font-size: 18px; letter-spacing: -.03em; }
.metric-mini span { color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .05em; }
.text-link { color: var(--accent); font-size: 14px; font-weight: 650; }
.stats-strip { display: grid; grid-template-columns: repeat(3,1fr); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: rgba(16,29,42,.72); }
.stat-strip-item { padding: 22px; border-right: 1px solid var(--line); }
.stat-strip-item:last-child { border-right: 0; }
.stat-strip-value { font-size: 28px; font-weight: 800; letter-spacing: -.045em; }
.stat-strip-label { color: var(--muted); font-size: 12px; margin-top: 5px; }
.page-head { padding: 54px 0 22px; }
.page-head h1 { font-size: clamp(38px,5vw,58px); margin-bottom: 12px; }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; margin: 22px 0; }
.control { min-height: 44px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); color: var(--text); padding: 0 13px; outline: none; }
.control.search { min-width: 300px; flex: 1; }
.player-list { display: grid; grid-template-columns: repeat(3,1fr); gap: 14px; }
.empty { color: var(--muted); padding: 44px 0; text-align: center; }
.player-header { padding: 46px 0 24px; }
.breadcrumb { color: var(--muted); font-size: 13px; margin-bottom: 20px; }
.player-title-row { display: flex; align-items: end; justify-content: space-between; gap: 20px; }
.player-title-row h1 { font-size: clamp(38px,5vw,58px); margin: 0; }
.player-meta { color: var(--muted); margin-top: 10px; }
.confidence-card { min-width: 220px; padding: 16px 18px; }
.confidence-label { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .07em; }
.confidence-value { font-size: 26px; font-weight: 800; margin-top: 4px; }
.progress { height: 6px; border-radius: 999px; background: rgba(255,255,255,.08); overflow: hidden; margin-top: 10px; }
.progress > span { display: block; height: 100%; background: var(--accent); border-radius: inherit; }
.tabs { display: flex; gap: 7px; margin: 20px 0; border-bottom: 1px solid var(--line); }
.tab { color: var(--muted); background: transparent; border: 0; padding: 12px 14px; border-bottom: 2px solid transparent; }
.tab.active { color: var(--text); border-color: var(--accent); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }
.hero-metrics { display: grid; grid-template-columns: repeat(4,1fr); gap: 12px; }
.big-metric { padding: 20px; }
.big-metric .label { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .07em; }
.big-metric .value { margin-top: 8px; font-size: clamp(27px,4vw,38px); font-weight: 800; letter-spacing: -.05em; }
.big-metric .sub { color: var(--muted); font-size: 12px; margin-top: 4px; }
.detail-grid { display: grid; grid-template-columns: 1.35fr .85fr; gap: 16px; margin-top: 16px; }
.panel { padding: 20px; }
.panel-title { font-size: 15px; font-weight: 750; margin-bottom: 17px; }
.chart-wrap { height: 260px; position: relative; }
.chart-svg { width: 100%; height: 100%; overflow: visible; }
.chart-grid { stroke: rgba(145,165,184,.13); stroke-width: 1; }
.chart-area { fill: rgba(99,230,190,.10); }
.chart-line { fill: none; stroke: var(--accent); stroke-width: 2.5; }
.chart-axis { fill: var(--muted); font-size: 10px; }
.prob-list { display: grid; gap: 12px; }
.prob-row { display: grid; grid-template-columns: 70px 1fr 54px; gap: 10px; align-items: center; }
.prob-label { color: var(--soft); font-size: 13px; }
.prob-track { height: 7px; background: rgba(255,255,255,.07); border-radius: 99px; overflow: hidden; }
.prob-track span { display: block; height: 100%; border-radius: inherit; background: var(--accent-2); }
.prob-value { text-align: right; font-weight: 700; font-size: 13px; }
.history-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 16px; }
.positions { display: flex; flex-wrap: wrap; gap: 7px; }
.pos-chip { min-width: 32px; text-align: center; background: rgba(116,192,252,.07); border: 1px solid rgba(116,192,252,.15); color: var(--soft); padding: 7px; border-radius: 8px; font-size: 12px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { color: var(--muted); text-align: left; font-size: 10px; text-transform: uppercase; letter-spacing: .06em; font-weight: 650; padding: 10px 12px; border-bottom: 1px solid var(--line); }
td { padding: 12px; border-bottom: 1px solid rgba(145,165,184,.09); font-size: 13px; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
.method-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.method-card { padding: 24px; }
.method-card p, .prose p, .prose li { color: var(--muted); line-height: 1.7; }
.code-pill { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; color: var(--accent); background: rgba(99,230,190,.07); border: 1px solid rgba(99,230,190,.13); border-radius: 8px; padding: 3px 7px; }
.notice { border: 1px solid rgba(255,212,59,.19); background: rgba(255,212,59,.05); border-radius: 14px; padding: 16px 18px; color: #eadf9b; line-height: 1.55; font-size: 13px; }
.site-footer { border-top: 1px solid rgba(145,165,184,.12); padding: 28px 0 42px; color: var(--muted); font-size: 12px; }
.footer-row { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.mono { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.skeleton { border-radius: 12px; background: linear-gradient(90deg, rgba(255,255,255,.04), rgba(255,255,255,.08), rgba(255,255,255,.04)); background-size: 220% 100%; animation: shimmer 1.5s infinite; min-height: 90px; }
@keyframes shimmer { to { background-position: -220% 0; } }
@media (max-width: 900px) {
  .grid-3, .player-list { grid-template-columns: 1fr 1fr; }
  .hero-metrics { grid-template-columns: 1fr 1fr; }
  .detail-grid, .history-grid, .method-grid { grid-template-columns: 1fr; }
  .player-title-row { align-items: start; flex-direction: column; }
  .confidence-card { width: 100%; }
}
@media (max-width: 640px) {
  .nav-links a:not(.keep-mobile) { display: none; }
  .hero { padding-top: 62px; }
  .grid-3, .player-list, .stats-strip { grid-template-columns: 1fr; }
  .stat-strip-item { border-right: 0; border-bottom: 1px solid var(--line); }
  .stat-strip-item:last-child { border-bottom: 0; }
  .hero-metrics { grid-template-columns: 1fr 1fr; }
  .metrics-row { grid-template-columns: 1fr 1fr 1fr; }
  .section-head { align-items: start; flex-direction: column; }
  .control.search { min-width: 100%; }
  .prob-row { grid-template-columns: 62px 1fr 48px; }
}

/* v0.2 Match Center */
.button { display:inline-flex; align-items:center; justify-content:center; min-height:40px; padding:0 14px; border-radius:10px; border:1px solid rgba(99,230,190,.28); background:var(--accent); color:#071311; font-weight:750; text-decoration:none; cursor:pointer; }
.button:hover { filter:brightness(1.05); }
.button.secondary { color:var(--text); background:rgba(99,230,190,.08); border-color:rgba(99,230,190,.20); }
.button.ghost { color:var(--soft); background:transparent; border-color:var(--line); }
.button.danger { color:#ffb4b4; background:rgba(255,107,107,.06); border-color:rgba(255,107,107,.20); }
.button:disabled { opacity:.45; cursor:not-allowed; filter:none; }
.import-panel { padding:20px; margin:22px 0; }
.import-head { display:flex; justify-content:space-between; gap:18px; align-items:flex-start; }
.import-head p { margin:5px 0 0; max-width:760px; line-height:1.55; }
.import-grid { display:grid; grid-template-columns:.75fr 1.25fr; gap:16px; margin-top:18px; }
.field-label { display:block; font-size:11px; text-transform:uppercase; letter-spacing:.07em; color:var(--muted); margin-bottom:8px; }
.file-control { width:100%; padding:9px; }
.csv-box { width:100%; min-height:120px; padding:12px; resize:vertical; font-family:ui-monospace,SFMono-Regular,Menlo,monospace; font-size:12px; line-height:1.5; }
.helper { color:var(--muted); font-size:12px; margin-top:7px; }
.import-actions { display:flex; flex-wrap:wrap; gap:9px; margin-top:14px; }
.import-summary { margin-top:13px; min-height:22px; }
.preview-wrap { max-height:310px; overflow:auto; margin-top:10px; border:1px solid var(--line); border-radius:12px; }
.preview-wrap:empty { display:none; }
.good { color:#7af1bd; }
.bad { color:#ff9c9c; }
.warn { color:#f3d782; font-size:11px; margin-top:4px; }
.team-reference { margin-top:20px; padding-top:18px; border-top:1px solid var(--line); }
.team-reference > .panel-title { margin-bottom:10px; }
.team-chips { display:grid; grid-template-columns:1fr 1fr; gap:14px; }
.team-chips > div { display:flex; flex-wrap:wrap; align-items:center; gap:7px; }
.team-chips b { width:100%; font-size:12px; color:var(--soft); margin-bottom:2px; }
.team-chip { display:inline-flex; border:1px solid rgba(145,165,184,.15); background:rgba(145,165,184,.05); color:var(--muted); padding:5px 8px; border-radius:7px; font-size:11px; }
.status-count { display:flex; align-items:center; color:var(--muted); }
.compact-notice { margin:14px 0 18px; padding:11px 14px; }
.match-list { display:grid; grid-template-columns:1fr 1fr; gap:14px; }
.match-card { padding:20px; color:inherit; text-decoration:none; transition:transform .15s ease,border-color .15s ease; }
.match-card:hover { transform:translateY(-2px); border-color:rgba(99,230,190,.28); }
.match-card-top { display:flex; justify-content:space-between; gap:16px; align-items:flex-start; }
.match-date { font-size:13px; color:var(--soft); margin-top:6px; }
.status-badge { display:inline-flex; border-radius:999px; padding:5px 8px; text-transform:uppercase; letter-spacing:.06em; font-size:9px; font-weight:800; border:1px solid rgba(116,192,252,.18); color:#acd8ff; background:rgba(116,192,252,.06); }
.status-demo { color:#f0d88d; border-color:rgba(255,212,59,.18); background:rgba(255,212,59,.06); }
.status-cancelled,.status-canceled { color:#ffaaaa; border-color:rgba(255,107,107,.18); background:rgba(255,107,107,.05); }
.status-postponed { color:#f3d782; border-color:rgba(255,212,59,.18); background:rgba(255,212,59,.05); }
.match-teams { display:grid; grid-template-columns:1fr auto 1fr; align-items:center; gap:12px; padding:24px 0 20px; }
.match-teams b { display:block; font-size:18px; }
.match-teams span { display:block; color:var(--muted); font-size:11px; margin-top:5px; }
.match-teams .away { text-align:right; }
.versus { color:var(--muted); font-size:10px; font-weight:800; letter-spacing:.1em; }
.match-venue { border-top:1px solid var(--line); padding-top:13px; display:flex; justify-content:space-between; gap:12px; color:var(--muted); font-size:11px; }
.match-venue span { color:var(--accent); }
.empty-state { grid-column:1/-1; padding:52px 24px; text-align:center; }
.empty-state h3,.empty-state h2 { margin:10px 0 8px; }
.empty-state p { max-width:560px; margin:0 auto; color:var(--muted); line-height:1.6; }
.empty-icon { width:54px; height:54px; display:grid; place-items:center; border-radius:14px; margin:auto; background:rgba(99,230,190,.08); border:1px solid rgba(99,230,190,.15); color:var(--accent); font-weight:850; font-size:11px; letter-spacing:.08em; }
.empty-actions { display:flex; justify-content:center; gap:9px; margin-top:18px; flex-wrap:wrap; }
.match-hero { margin-top:18px; padding:24px; border:1px solid var(--line); border-radius:18px; background:radial-gradient(circle at 50% -10%,rgba(99,230,190,.09),transparent 45%),var(--card); }
.match-hero-meta { display:flex; justify-content:space-between; gap:18px; align-items:flex-start; }
.match-big-date { font-size:14px; font-weight:700; margin:6px 0; }
.match-title-grid { display:grid; grid-template-columns:1fr auto 1fr; align-items:center; gap:24px; margin-top:32px; }
.match-title-grid span { display:block; color:var(--muted); text-transform:uppercase; font-size:9px; letter-spacing:.09em; }
.match-title-grid h1 { font-size:clamp(27px,4vw,48px); margin:5px 0 4px; letter-spacing:-.04em; }
.match-title-grid small { color:var(--muted); }
.match-title-grid .away { text-align:right; }
.match-vs-big { color:var(--accent); font-size:12px; font-weight:900; letter-spacing:.16em; padding:10px; border:1px solid rgba(99,230,190,.16); border-radius:50%; }
.compact-section { padding-top:30px; }
.match-team-grid { display:grid; grid-template-columns:1fr 1fr; gap:16px; }
.team-panel { min-width:0; }
.team-panel-head { display:flex; justify-content:space-between; align-items:flex-start; gap:12px; margin-bottom:12px; }
.team-panel-head h2 { margin:5px 0 0; font-size:21px; }
.coverage-pill { color:var(--muted); border:1px solid var(--line); border-radius:999px; padding:5px 8px; font-size:10px; }
.match-player-table td,.match-player-table th { padding-left:9px; padding-right:9px; }
.player-table-link { color:var(--text); text-decoration:none; }
.player-table-link:hover { color:var(--accent); }
.tiny { font-size:10px; margin-top:3px; }
.empty.compact { padding:28px 6px; }
.match-explainer { display:grid; grid-template-columns:.8fr 1.2fr; gap:22px; align-items:center; margin:6px 0 34px; padding:22px; }
.match-explainer h3 { margin:5px 0 0; }
.match-explainer p { color:var(--muted); line-height:1.6; margin:0; }
code { color:var(--accent); font-family:ui-monospace,SFMono-Regular,Menlo,monospace; font-size:.92em; }
@media (max-width:900px){
  .match-list,.match-team-grid,.import-grid,.team-chips { grid-template-columns:1fr; }
  .match-team-grid { gap:14px; }
  .match-explainer { grid-template-columns:1fr; }
}
@media (max-width:640px){
  .import-head { flex-direction:column; }
  .match-list { grid-template-columns:1fr; }
  .match-title-grid { gap:10px; grid-template-columns:1fr auto 1fr; }
  .match-title-grid h1 { font-size:24px; }
  .match-player-table th:nth-child(4),.match-player-table td:nth-child(4),.match-player-table th:nth-child(7),.match-player-table td:nth-child(7){ display:none; }
  .match-venue { flex-direction:column; }
}
.hero-actions { display:flex; gap:9px; margin-top:14px; flex-wrap:wrap; }
.narrow-admin{max-width:980px}
