:root {
  color-scheme: dark;
  --bg: #0b1211;
  --surface: #111b18;
  --surface-raised: #16211e;
  --surface-soft: #1c2925;
  --line: #2a3933;
  --line-bright: #40534a;
  --text: #edf3ed;
  --muted: #9aa9a0;
  --quiet: #68776e;
  --green: #b8f36b;
  --green-deep: #263b1f;
  --blue: #90b6f2;
  --orange: #f3ad78;
  --red: #f17b72;
  --radius: 18px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  font-variant-numeric: tabular-nums;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; background: var(--bg); color: var(--text); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
.app-shell { width: min(1320px, 100% - 64px); margin: 0 auto; }
.topbar { height: 82px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid rgba(177, 205, 188, .11); }
.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--text); text-decoration: none; }
.brand img { width: 38px; height: 38px; }
.brand-word { font-size: 13px; font-weight: 850; letter-spacing: .16em; }
.brand-word span { color: var(--green); }
.topbar-actions { display: flex; align-items: center; gap: 18px; }
.privacy-pill { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 999px; padding: 8px 12px; color: #b6c4ba; font-size: 11px; letter-spacing: .02em; }
.privacy-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 12px rgba(184, 243, 107, .6); }
.install-button { border: 1px solid var(--green); color: var(--green); background: transparent; border-radius: 999px; padding: 9px 15px; font-size: 12px; font-weight: 700; }
.install-button:hover { background: var(--green); color: #142014; }
.hero { min-height: 255px; display: flex; justify-content: space-between; align-items: center; padding: 34px 4px 35px; position: relative; overflow: hidden; }
.hero::after { content: ""; position: absolute; width: 530px; height: 300px; right: 5%; top: -43px; opacity: .23; pointer-events: none; background: repeating-linear-gradient(90deg, transparent 0 65px, rgba(169, 203, 176, .13) 65px 66px), repeating-linear-gradient(0deg, transparent 0 65px, rgba(169, 203, 176, .13) 65px 66px); mask-image: radial-gradient(ellipse at center, black, transparent 72%); }
.hero-copy { z-index: 1; max-width: 680px; }
.eyebrow { margin: 0 0 14px; color: var(--green); font-size: 10px; font-weight: 800; letter-spacing: .18em; }
.eyebrow-line { display: inline-block; width: 22px; height: 1px; background: currentColor; vertical-align: middle; margin-right: 7px; }
h1 { margin: 0; font-size: clamp(36px, 5.2vw, 62px); line-height: .98; letter-spacing: -.055em; font-weight: 780; }
h1 em { color: var(--green); font-style: normal; }
.hero-description { max-width: 560px; margin: 18px 0 0; color: var(--muted); font-size: 14px; line-height: 1.7; }
.hero-stamp { position: relative; z-index: 1; width: 138px; height: 138px; display: flex; flex-direction: column; align-items: center; justify-content: center; border: 1px solid rgba(184, 243, 107, .34); border-radius: 50%; margin-right: 7%; flex: 0 0 138px; }
.stamp-number { color: var(--green); font-size: 32px; font-weight: 760; letter-spacing: -.05em; }
.stamp-label { text-align: center; color: var(--muted); font-size: 9px; line-height: 1.45; letter-spacing: .05em; text-transform: uppercase; }
.stamp-ring { position: absolute; inset: -8px; border: 1px dashed rgba(184, 243, 107, .18); border-radius: 50%; }
.workspace { display: grid; grid-template-columns: minmax(0, 1.04fr) minmax(380px, .96fr); gap: 22px; align-items: start; }
.panel { border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(145deg, rgba(20, 31, 27, .98), rgba(15, 24, 21, .98)); box-shadow: 0 20px 60px rgba(0, 0, 0, .12); }
.input-panel { padding: 25px 27px 24px; }
.section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 23px; }
.section-heading .eyebrow { margin-bottom: 8px; }
h2 { margin: 0; font-size: 21px; letter-spacing: -.035em; }
.optional-note { color: var(--quiet); font-size: 10px; padding-top: 25px; text-align: right; }
.teams-block { display: grid; grid-template-columns: minmax(0, 1fr) 42px minmax(0, 1fr); align-items: end; gap: 10px; }
.team-field label, .control-field label, .advantage-copy label { display: block; color: #dce6dd; font-size: 12px; font-weight: 700; margin-bottom: 8px; }
.team-field input { width: 100%; height: 48px; }
input[type="text"], input[type="number"], select, textarea { border: 1px solid var(--line); border-radius: 10px; color: var(--text); background: #0d1513; outline: none; transition: border-color .18s ease, box-shadow .18s ease; }
input[type="text"], input[type="number"], select { padding: 0 13px; }
input[type="text"]:focus, input[type="number"]:focus, select:focus, textarea:focus { border-color: #8bc350; box-shadow: 0 0 0 3px rgba(184, 243, 107, .1); }
input::placeholder, textarea::placeholder { color: #5d6b63; }
.versus-mark { height: 48px; display: grid; place-items: center; color: var(--quiet); font-size: 9px; font-weight: 800; letter-spacing: .12em; }
.field-error { color: #ff9c92; font-size: 11px; line-height: 1.5; margin: 8px 0 0; }
.core-controls { margin: 18px 0 16px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.control-field select { display: block; width: 100%; height: 43px; font-size: 11px; }
.advanced-section { border-top: 1px solid rgba(180, 205, 189, .12); }
.advanced-section:last-of-type { border-bottom: 1px solid rgba(180, 205, 189, .12); }
.advanced-section summary { min-height: 53px; list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 10px; user-select: none; color: var(--text); font-size: 12px; font-weight: 700; }
.advanced-section summary::-webkit-details-marker { display: none; }
.advanced-section summary::after { content: "+"; color: var(--green); font-size: 18px; font-weight: 400; margin-left: auto; }
.advanced-section[open] summary::after { content: "−"; }
.summary-index { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 6px; margin-right: 7px; color: var(--green); background: rgba(184, 243, 107, .1); font-size: 10px; }
.summary-caption { color: var(--quiet); font-size: 10px; font-weight: 500; }
.details-content { padding: 0 0 17px; }
.section-help { color: var(--muted); font-size: 10px; line-height: 1.6; margin: 0 0 12px; }
.metrics-table { display: grid; gap: 6px; }
.metrics-header, .metric-row { display: grid; grid-template-columns: minmax(92px, 1fr) minmax(65px, .72fr) minmax(65px, .72fr); gap: 8px; align-items: center; }
.metrics-header { color: var(--quiet); font-size: 9px; padding: 0 4px 2px; }
.metric-team { color: #c7d3ca; font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.metric-row input { width: 100%; min-width: 0; height: 37px; padding: 0 9px; font-size: 11px; }
.recent-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.text-field label { display: flex; align-items: center; gap: 7px; margin: 0 0 7px; color: #c9d6cc; font-size: 10px; font-weight: 700; }
.text-field textarea { display: block; resize: vertical; width: 100%; min-height: 93px; padding: 10px 11px; line-height: 1.55; font-family: inherit; font-size: 11px; }
.team-dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
.team-dot-a { background: var(--green); }.team-dot-b { background: var(--blue); }
.advantage-control { display: flex; align-items: center; justify-content: space-between; gap: 14px; border: 1px solid var(--line); border-radius: 12px; background: rgba(8, 15, 12, .45); padding: 13px 14px; margin: 17px 0; }
.advantage-copy label { margin: 0 0 4px; font-size: 11px; }
.advantage-copy span { display: block; color: var(--quiet); font-size: 9px; }
.range-wrap { display: flex; align-items: center; gap: 9px; min-width: 155px; }
input[type="range"] { width: 112px; accent-color: var(--green); }
.range-wrap output { min-width: 38px; color: var(--green); text-align: right; font-size: 11px; font-weight: 700; }
.form-actions { display: flex; align-items: center; gap: 14px; margin-top: 18px; }
.primary-button { min-height: 47px; border: 0; border-radius: 10px; background: var(--green); color: #11200f; display: inline-flex; align-items: center; justify-content: space-between; gap: 26px; padding: 0 15px 0 18px; font-size: 12px; font-weight: 800; transition: transform .18s ease, filter .18s ease; }
.primary-button:hover { transform: translateY(-1px); filter: brightness(1.06); }
.primary-button:active { transform: translateY(0); }
.button-arrow { font-size: 16px; }
.text-button { border: 0; background: transparent; color: var(--muted); font-size: 10px; padding: 10px 4px; }
.text-button:hover { color: var(--text); }
.results-column { min-width: 0; }
.results-placeholder { min-height: 420px; padding: 36px 32px; position: relative; overflow: hidden; }
.placeholder-pitch { width: 140px; height: 90px; border: 1px solid rgba(184, 243, 107, .27); border-radius: 7px; position: relative; margin: 9px 0 25px auto; transform: rotate(-5deg); opacity: .8; }
.placeholder-pitch::before { content: ""; position: absolute; top: 0; bottom: 0; left: 50%; border-left: 1px solid rgba(184, 243, 107, .27); }
.placeholder-pitch::after { content: ""; position: absolute; width: 25px; height: 25px; border: 1px solid rgba(184, 243, 107, .27); border-radius: 50%; left: calc(50% - 13px); top: calc(50% - 13px); }
.placeholder-pitch span { position: absolute; width: 19px; height: 38px; border: 1px solid rgba(184, 243, 107, .23); top: 25px; left: -1px; }
.placeholder-pitch i { position: absolute; width: 19px; height: 38px; border: 1px solid rgba(184, 243, 107, .23); top: 25px; right: -1px; }
.results-placeholder .eyebrow { margin-bottom: 10px; }
.results-placeholder h2 { font-size: 27px; line-height: 1.12; }
.results-placeholder > p:not(.eyebrow) { max-width: 350px; color: var(--muted); font-size: 12px; line-height: 1.7; }
.placeholder-rule { position: absolute; bottom: 23px; display: flex; align-items: center; gap: 8px; color: var(--quiet); font-size: 10px; }
.placeholder-rule span { width: 7px; height: 7px; border-radius: 50%; background: var(--green); }
.results-content { display: grid; gap: 14px; animation: result-in .3s ease both; }
@keyframes result-in { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: translateY(0); } }
.result-head { padding: 19px 22px; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.result-head .eyebrow { margin-bottom: 6px; }
.result-match { font-size: 15px; font-weight: 750; letter-spacing: -.02em; }
.result-venue { color: var(--muted); font-size: 10px; margin-top: 5px; }
.data-coverage { border: 1px solid rgba(184, 243, 107, .2); border-radius: 999px; padding: 7px 10px; color: var(--green); white-space: nowrap; font-size: 9px; }
.score-section { padding: 19px 20px 18px; }
.result-section-title { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 15px; }
.result-section-title h3 { margin: 0; color: var(--text); font-size: 12px; }
.result-section-title span { color: var(--quiet); font-size: 9px; }
.score-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.score-card { border: 1px solid var(--line); border-radius: 12px; padding: 12px 9px 13px; background: rgba(8, 15, 12, .46); min-width: 0; }
.score-card.best { border-color: rgba(184, 243, 107, .5); background: linear-gradient(150deg, rgba(184, 243, 107, .13), rgba(8, 15, 12, .64)); }
.score-rank { display: block; color: var(--quiet); font-size: 8px; text-transform: uppercase; letter-spacing: .12em; margin-bottom: 7px; }
.score-card.best .score-rank { color: var(--green); }
.exact-score { display: block; color: var(--text); font-size: clamp(22px, 2.8vw, 30px); font-weight: 760; letter-spacing: -.06em; line-height: 1; }
.score-prob { display: block; color: #becbc1; margin-top: 7px; font-size: 11px; font-weight: 650; }
.score-name { display: block; color: var(--quiet); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 7px; font-size: 8px; }
.lambda-note { border-top: 1px solid rgba(180, 205, 189, .1); margin-top: 14px; padding-top: 10px; color: var(--muted); display: flex; justify-content: space-between; gap: 8px; font-size: 9px; }
.lambda-note strong { color: var(--text); font-weight: 700; }
.market-section { padding: 19px 20px; }
.market-row + .market-row { margin-top: 18px; }
.market-label { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 8px; font-size: 10px; }
.market-label strong { color: var(--text); }
.market-label span { color: var(--muted); }
.prob-bar { width: 100%; display: flex; height: 8px; border-radius: 20px; overflow: hidden; background: #26332d; }
.prob-segment { min-width: 0; transition: width .25s ease; }
.prob-home { background: var(--green); }.prob-draw { background: #929f96; }.prob-away { background: var(--blue); }
.market-legend { display: flex; justify-content: space-between; gap: 8px; margin-top: 7px; color: var(--quiet); font-size: 8px; }
.legend-dot { display: inline-flex; align-items: center; gap: 5px; }
.legend-dot::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.legend-home { color: var(--green); }.legend-draw { color: #abb5ac; }.legend-away { color: var(--blue); }
.prob-over { background: var(--green); }.prob-under { background: #708179; }
.score-matrix { padding: 17px 17px 18px; overflow: hidden; }
.score-matrix summary { cursor: pointer; display: flex; justify-content: space-between; gap: 8px; list-style: none; font-size: 11px; font-weight: 750; }
.score-matrix summary::-webkit-details-marker { display: none; }
.score-matrix summary::after { content: "+"; color: var(--green); font-size: 17px; font-weight: 400; }
.score-matrix[open] summary::after { content: "−"; }
.matrix-caption { color: var(--quiet); font-size: 9px; font-weight: 500; }
.matrix-scroll { overflow: auto; margin-top: 15px; padding-bottom: 5px; scrollbar-color: var(--line-bright) transparent; }
.matrix-grid { display: grid; grid-template-columns: 76px repeat(13, minmax(31px, 1fr)); min-width: 510px; gap: 3px; }
.matrix-corner, .matrix-axis, .matrix-cell { min-height: 32px; display: grid; place-items: center; border-radius: 5px; font-size: 8px; }
.matrix-corner, .matrix-axis { color: var(--quiet); background: rgba(255,255,255,.025); }
.matrix-axis { font-weight: 700; }
.matrix-corner { text-align: center; font-size: 7px; line-height: 1.2; }
.matrix-cell { border: 1px solid rgba(230, 242, 231, .06); color: #d4dfd5; background: rgba(184, 243, 107, var(--heat, 0)); font-size: 7px; }
.matrix-cell.top-score { border-color: var(--green); color: white; font-weight: 800; }
.matrix-footnote { color: var(--quiet); font-size: 9px; line-height: 1.6; margin: 10px 0 0; }
.warning-card { display: flex; gap: 10px; align-items: flex-start; border: 1px solid rgba(243, 173, 120, .22); border-radius: 12px; background: rgba(243, 173, 120, .055); padding: 13px 15px; color: #c9b09e; font-size: 9px; line-height: 1.6; }
.warning-icon { flex: 0 0 17px; width: 17px; height: 17px; display: grid; place-items: center; border-radius: 50%; color: var(--orange); border: 1px solid rgba(243,173,120,.45); font-size: 10px; font-weight: 800; }
.warning-card strong { color: #f0c29f; }
.method-note { display: flex; gap: 12px; align-items: flex-start; max-width: 850px; margin: 25px auto 28px; padding: 0 20px; color: var(--quiet); font-size: 10px; line-height: 1.65; }
.method-note strong { color: #bdc9bf; }
.method-mark { flex: 0 0 18px; width: 18px; height: 18px; display: grid; place-items: center; border: 1px solid var(--line-bright); border-radius: 50%; color: var(--muted); font-size: 10px; font-weight: 700; }
.footer { min-height: 60px; display: flex; justify-content: space-between; align-items: center; gap: 12px; border-top: 1px solid rgba(177, 205, 188, .1); color: var(--quiet); font-size: 9px; }
.footer-dot { color: var(--green); margin: 0 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

@media (max-width: 960px) {
  .app-shell { width: min(780px, 100% - 40px); }
  .workspace { grid-template-columns: 1fr; }
  .results-column { order: -1; }
  .results-placeholder { min-height: 310px; }
  .placeholder-pitch { width: 112px; height: 72px; margin: 0 3% 15px auto; }
  .placeholder-pitch span, .placeholder-pitch i { height: 30px; top: 20px; }
  .results-placeholder h2 { font-size: 23px; }
  .result-content { grid-template-columns: 1fr; }
  .hero { min-height: 230px; }
}
@media (max-width: 600px) {
  .app-shell { width: calc(100% - 28px); }
  .topbar { height: 68px; }
  .brand img { width: 32px; height: 32px; }
  .brand-word { font-size: 11px; }
  .privacy-pill { padding: 7px 9px; font-size: 9px; }
  .topbar-actions { gap: 8px; }
  .install-button { padding: 8px 10px; font-size: 10px; }
  .hero { min-height: 200px; padding: 29px 2px; }
  .hero-stamp { width: 92px; height: 92px; flex-basis: 92px; margin-right: 5px; }
  .stamp-number { font-size: 24px; }
  .stamp-label { font-size: 7px; }
  .stamp-ring { inset: -5px; }
  .hero-description { max-width: 430px; font-size: 12px; line-height: 1.55; margin-top: 13px; }
  .eyebrow { font-size: 9px; margin-bottom: 11px; }
  h1 { font-size: clamp(34px, 9vw, 46px); }
  .workspace { gap: 14px; }
  .input-panel { padding: 20px 17px; }
  .section-heading { display: block; margin-bottom: 18px; }
  .optional-note { padding: 0; text-align: left; display: block; margin-top: 6px; font-size: 9px; }
  .section-heading h2 { font-size: 19px; }
  .teams-block { gap: 6px; grid-template-columns: minmax(0, 1fr) 26px minmax(0, 1fr); }
  .team-field input { height: 44px; padding: 0 9px; font-size: 12px; }
  .versus-mark { height: 44px; font-size: 8px; }
  .core-controls { gap: 8px; margin-top: 15px; }
  .control-field label { font-size: 10px; }
  .control-field select { height: 42px; font-size: 10px; padding: 0 8px; }
  .advanced-section summary { min-height: 49px; font-size: 11px; }
  .summary-caption { font-size: 8px; }
  .summary-index { width: 18px; height: 18px; margin-right: 5px; }
  .section-help { font-size: 9px; }
  .metric-team { font-size: 9px; }
  .metrics-header { font-size: 8px; }
  .metrics-header, .metric-row { grid-template-columns: minmax(72px, 1fr) minmax(55px, .72fr) minmax(55px, .72fr); gap: 5px; }
  .metric-row input { height: 35px; font-size: 10px; }
  .recent-grid { grid-template-columns: 1fr; gap: 10px; }
  .text-field textarea { min-height: 75px; }
  .advantage-control { padding: 11px 10px; align-items: flex-start; }
  .advantage-copy span { max-width: 160px; line-height: 1.5; }
  .range-wrap { min-width: auto; padding-top: 4px; gap: 5px; }
  input[type="range"] { width: 80px; }
  .range-wrap output { min-width: 33px; font-size: 10px; }
  .form-actions { gap: 9px; }
  .primary-button { min-height: 45px; gap: 12px; padding: 0 12px; font-size: 10px; }
  .text-button { font-size: 9px; }
  .results-placeholder { padding: 25px 22px; min-height: 270px; }
  .placeholder-pitch { width: 95px; height: 62px; margin-bottom: 14px; }
  .placeholder-pitch span, .placeholder-pitch i { width: 13px; height: 27px; top: 17px; }
  .placeholder-pitch::after { width: 19px; height: 19px; left: calc(50% - 10px); top: calc(50% - 10px); }
  .results-placeholder h2 { font-size: 22px; }
  .results-placeholder > p:not(.eyebrow) { font-size: 10px; }
  .placeholder-rule { bottom: 16px; font-size: 9px; }
  .results-content { gap: 10px; }
  .result-head { padding: 15px 15px; align-items: flex-start; }
  .result-match { font-size: 13px; }
  .data-coverage { font-size: 8px; padding: 6px 8px; }
  .score-section, .market-section { padding: 15px 13px; }
  .score-cards { gap: 6px; }
  .score-card { padding: 10px 7px; border-radius: 10px; }
  .score-rank { font-size: 7px; }
  .exact-score { font-size: 25px; }
  .score-prob { font-size: 10px; }
  .score-name { font-size: 7px; }
  .lambda-note { font-size: 8px; }
  .market-label { font-size: 9px; }
  .market-legend { font-size: 7px; }
  .score-matrix { padding: 14px 12px; }
  .score-matrix summary { font-size: 10px; }
  .matrix-caption { font-size: 8px; }
  .matrix-grid { grid-template-columns: 62px repeat(13, minmax(29px, 1fr)); min-width: 440px; gap: 2px; }
  .matrix-corner, .matrix-axis, .matrix-cell { min-height: 29px; font-size: 7px; }
  .matrix-corner { font-size: 6px; }
  .warning-card { padding: 11px 12px; font-size: 8px; }
  .method-note { padding: 0 2px; margin: 20px auto; font-size: 9px; }
  .footer { padding: 13px 0; align-items: flex-start; flex-direction: column; justify-content: center; font-size: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
