/* ScoreProb methodology page (methodology-v3). Everything is scoped to .mt. Tokens match sp-league-detail.css. */
body:has(.mt) { background: #f5f7fa; }
html[data-theme="dark"] body:has(.mt) { background: #0b1220; }

.mt {
  --bg: #f5f7fa; --card: #ffffff; --ink: #18212f; --ink-2: #334055; --muted: #5a6680; --line: #e3e8ef; --soft: #f1f4f9;
  --accent: #2857d9; --accent-deep: #173da8; --accent-soft: #e6edfc; --on-accent: #ffffff;
  --home: #2857d9; --draw: #7e89a6; --away: #bf8216; --won: #159a70; --track: #dbe2f0; --dash: #a9b4c8;
  --hit: #0f7a5a; --miss: #b3342b; --live-bg: #e2f4ec; --warn: #8a5d00; --warn-bg: #fbf0d4; --limit-bg: #fff8e8; --limit-line: #ecd9a8;
  --hdr: var(--mt-hdr, 57px);
  background: var(--bg); color: var(--ink);
  font-size: 15px; line-height: 1.5; min-width: 0;
}
html[data-theme="dark"] .mt {
  --bg: #0b1220; --card: #111a29; --ink: #ecf2ff; --ink-2: #c3cee0; --muted: #aab7ca; --line: #2a3850; --soft: #182235;
  --accent: #7397ff; --accent-deep: #9fb7ff; --accent-soft: #1b2a4d; --on-accent: #0b1220;
  --home: #4f7df5; --draw: #8b95ad; --away: #c47f0a; --won: #16a37a; --track: #2a3850; --dash: #4a5a78;
  --hit: #3ddc9f; --miss: #ff8a80; --live-bg: #12392d; --warn: #e2b33c; --warn-bg: #2b2a12; --limit-bg: #1d1b12; --limit-line: #4d4421;
}
@media (max-width: 760px) { .mt { --hdr: var(--mt-hdr, 49px); } }
.mt *, .mt *::before, .mt *::after { box-sizing: border-box; }
.mt h1, .mt h2, .mt h3, .mt p, .mt ol, .mt ul, .mt dl, .mt dd { margin: 0; padding: 0; }
.mt ol, .mt ul { list-style: none; }
.mt a { color: var(--accent); }
.mt a:hover { text-decoration: underline; }
.mt i, .mt u { font-style: normal; text-decoration: none; }
.mt code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .92em; color: var(--ink); overflow-wrap: anywhere; }
.mt :focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.mt [id] { scroll-margin-top: calc(var(--hdr) + 60px); }
.mt [hidden] { display: none !important; }
.mt .num { font-variant-numeric: tabular-nums; }
.mt-sr { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---- in-page bar, sticky under the site header ---- */
.mt-bar { position: sticky; top: var(--hdr); z-index: 40; background: var(--card); border-bottom: 1px solid var(--line); }
.mt-bar-in { max-width: 1200px; margin: 0 auto; padding-inline: max(24px, env(safe-area-inset-left, 0px)) max(24px, env(safe-area-inset-right, 0px)); display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.mt-bar-in::-webkit-scrollbar { display: none; }
.mt-bar a { display: block; padding: 12px 12px 10px; font-size: 13.5px; font-weight: 600; color: var(--muted); white-space: nowrap; border-bottom: 2px solid transparent; text-decoration: none; }
.mt-bar a:hover { color: var(--ink); text-decoration: none; }
.mt-bar a[aria-current="true"] { color: var(--ink); border-bottom-color: var(--accent); }

.mt-wrap { max-width: 1200px; margin: 0 auto; padding-block: 32px 64px; padding-inline: max(24px, env(safe-area-inset-left, 0px)) max(24px, env(safe-area-inset-right, 0px)); display: flex; flex-direction: column; gap: 28px; }

/* ---- type ---- */
.mt-kick, .mt-step-k { font-size: 11.5px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--accent-deep); }
.mt-h1 { font-size: clamp(30px, 4.2vw, 44px); line-height: 1.08; font-weight: 800; letter-spacing: -.02em; text-wrap: balance; }
.mt-h2 { font-size: clamp(21px, 2.4vw, 26px); line-height: 1.2; font-weight: 800; letter-spacing: -.01em; text-wrap: balance; }
.mt-h2.sm { font-size: 22px; }
.mt-h3 { font-size: 15.5px; line-height: 1.3; font-weight: 700; }
.mt-h3.lg { font-size: 18px; }
.mt-lead { max-width: 640px; font-size: 17px; line-height: 1.6; color: var(--ink-2); }
.mt-text { color: var(--ink-2); max-width: 68ch; }
.mt-text.sm { font-size: 13.5px; }
.mt-sub { color: var(--muted); max-width: 640px; }
.mt-small { font-size: 12.5px; line-height: 1.5; color: var(--muted); }
.mt-muted { color: var(--muted); }
.mt-note { font-size: 13.5px; color: var(--muted); max-width: 80ch; }
.mt-sel { user-select: all; }

/* ---- shared blocks ---- */
.mt-card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 24px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.mt-col { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.mt-row-sb { display: flex; justify-content: space-between; align-items: baseline; gap: 10px 16px; flex-wrap: wrap; }
.mt-row-end { align-items: flex-end; }
.mt-head { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.mt-btns { display: flex; gap: 10px; flex-wrap: wrap; }
.mt-btn { display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border-radius: 10px; border: 1px solid var(--line); background: var(--card); color: var(--ink) !important; font-weight: 700; text-decoration: none !important; }
.mt-btn:hover { border-color: var(--accent); }
.mt-btn.pri { background: var(--accent); border-color: var(--accent); color: var(--on-accent) !important; }
.mt-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.mt-chip { font-size: 12.5px; padding: 5px 10px; border-radius: 999px; background: var(--soft); border: 1px solid var(--line); color: var(--ink); }
.mt-chip.dash { background: transparent; border-style: dashed; border-color: var(--dash); color: var(--ink-2); }
.mt-more { font-size: 13.5px; font-weight: 700; }

/* ---- hero ---- */
.mt-hero { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 28px; align-items: start; }
.mt-hero-t { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.mt-record { padding: 20px; }
.mt-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.mt-stat { background: var(--soft); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.mt-stat b { font-size: 24px; font-weight: 800; line-height: 1.2; font-variant-numeric: tabular-nums; }
.mt-stat span { font-size: 12.5px; line-height: 1.35; color: var(--muted); }

/* ---- follow one prediction ---- */
.mt-tabs { display: none; gap: 6px; flex-wrap: wrap; }
.mt.js .mt-tabs { display: flex; }
.mt-tab { font: inherit; font-size: 13px; font-weight: 700; min-height: 44px; padding: 0 14px; border-radius: 10px; cursor: pointer; color: var(--ink); border: 1px solid var(--line); background: transparent; text-align: left; }
.mt-tab:hover { border-color: var(--accent); }
.mt-tab[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--accent); }
.mt-ex { display: flex; flex-direction: column; gap: 12px; }
.mt-ex + .mt-ex { padding-top: 18px; border-top: 1px solid var(--line); }
.mt.js .mt-ex + .mt-ex { padding-top: 0; border-top: 0; }
.mt-ex-t { font-size: 15px; font-weight: 700; }
.mt-ex-t span { font-weight: 500; color: var(--muted); font-size: 13.5px; }
.mt-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.mt-step { background: var(--soft); border-radius: 12px; padding: 14px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.mt-step-v { font-size: 16px; font-weight: 700; line-height: 1.3; }
.mt-step-v.sm { font-size: 14px; }
.mt-pbar { display: flex; gap: 2px; height: 10px; border-radius: 5px; overflow: hidden; }
.mt-pbar i { display: block; height: 10px; }
.mt-pbar .h { background: var(--home); } .mt-pbar .d { background: var(--draw); } .mt-pbar .a { background: var(--away); }
.mt-p { font-size: 13px; }
.mt-score { font-size: 30px; font-weight: 800; line-height: 1.1; }
.mt-mark { display: flex; gap: 8px; align-items: baseline; font-size: 13px; }
.mt-mark b { min-width: 48px; flex: none; }
.mt-mark b.ok { color: var(--hit); } .mt-mark b.no { color: var(--miss); }
.mt-mark span { color: var(--ink-2); }

/* ---- what goes in ---- */
.mt-inputs { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(360px, 100%), 1fr)); gap: 24px; align-items: start; }
.mt-fams { display: flex; flex-direction: column; gap: 4px; }
.mt-fam { display: grid; grid-template-columns: minmax(120px, 210px) minmax(0, 1fr) 40px; gap: 12px; align-items: center; min-height: 40px; padding: 4px 10px; border-radius: 8px; border: 1px solid transparent; color: var(--ink) !important; text-decoration: none !important; }
.mt-fam:hover { border-color: var(--line); }
.mt-fam[aria-current="true"] { background: var(--accent-soft); border-color: var(--accent); }
.mt-fam-n { font-size: 14px; font-weight: 600; }
.mt-fam-bar { height: 10px; border-radius: 5px; background: var(--track); }
.mt-fam-bar i { display: block; height: 10px; border-radius: 5px; background: var(--accent); }
.mt-fam b { text-align: right; }
.mt-famds { display: flex; flex-direction: column; gap: 14px; }
.mt-famd { padding: 20px; gap: 10px; }
.mt-models { display: flex; flex-direction: column; }
.mt-models div { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); font-size: 13.5px; }
.mt-models dd code { color: var(--muted); }

/* ---- timing ---- */
.mt-track { position: relative; height: 8px; border-radius: 4px; background: var(--track); margin: 20px 0 4px; }
.mt-track i { position: absolute; left: 0; top: 0; height: 8px; border-radius: 4px; background: var(--accent); }
.mt-track u { position: absolute; top: -6px; width: 3px; height: 20px; margin-left: -1px; border-radius: 2px; background: var(--ink); }
.mt-track u:first-of-type { margin-left: 0; }
.mt-track u:last-of-type { margin-left: -3px; }
.mt-ticks { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.mt-ticks li { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.mt-ticks b { font-size: 18px; }
.mt-tick-l { font-size: 13px; font-weight: 600; }

/* ---- rules ---- */
.mt-rules-s { display: flex; flex-direction: column; gap: 14px; }
.mt-rules { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); gap: 12px; }
.mt-rule { padding: 16px; gap: 8px; border-radius: 14px; }
.mt-rule-n { width: 28px; height: 28px; border-radius: 8px; background: var(--accent-soft); color: var(--accent-deep); display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 13px; }
.mt-check { margin-top: auto; font-size: 12.5px; font-weight: 600; color: var(--hit); }
.mt-eg { display: inline-block; margin-right: 6px; color: var(--ink-2); font-variant-numeric: tabular-nums; }

/* ---- reading a probability ---- */
.mt-read { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(380px, 100%), 1fr)); gap: 24px; align-items: start; }
.mt-bands { display: flex; flex-direction: column; gap: 8px; font-size: 13px; }
.mt-bands-h, .mt-band { display: grid; grid-template-columns: 64px minmax(0, 1fr) 172px; gap: 12px; align-items: center; }
.mt-bands-h span { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.mt-bands-h span:nth-child(2) { grid-column: 2 / 4; }
.mt-band-bar { position: relative; height: 14px; border-radius: 4px; background: var(--track); }
.mt-band-bar i { position: absolute; left: 0; top: 0; height: 14px; border-radius: 4px; background: var(--won); }
.mt-band-bar u { position: absolute; top: -3px; width: 2px; height: 20px; margin-left: -1px; background: var(--ink); }
.mt-band > span:last-child { line-height: 1.35; }
.mt-key { display: inline-block; vertical-align: -1px; margin-right: 6px; }
.mt-key.k1 { width: 12px; height: 10px; border-radius: 3px; background: var(--won); }
.mt-key.k2 { width: 2px; height: 12px; margin-left: 8px; background: var(--ink); }
.mt-base { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 10px; align-items: center; font-size: 13px; }
.mt-base-m { font-weight: 600; }
.mt-base-r { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.mt-base-l { display: flex; align-items: center; gap: 8px; min-width: 0; }
.mt-base-l i { display: block; flex: none; height: 9px; border-radius: 4px; }
.mt-base-l i.k1 { background: var(--accent); } .mt-base-l i.k2 { background: var(--dash); }

/* ---- versions ---- */
.mt-vers { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); gap: 14px; }
.mt-ver { background: var(--soft); border-radius: 12px; padding: 16px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.mt-ver-h { display: flex; gap: 8px; align-items: center; font-size: 16px; }
.mt-badge { font-size: 11px; font-weight: 800; letter-spacing: .04em; padding: 2px 8px; border-radius: 6px; }
.mt-badge.live { background: var(--live-bg); color: var(--hit); }
.mt-badge.test { background: var(--warn-bg); color: var(--warn); }
.mt-limit { display: flex; flex-direction: column; gap: 8px; padding: 12px 14px; border-radius: 10px; background: var(--limit-bg); border: 1px solid var(--limit-line); font-size: 13.5px; color: var(--ink-2); }
.mt-limit b { color: var(--ink); }
.mt-rule { display: flex; flex-direction: column; gap: 8px; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--line, rgba(127,127,127,.25)); min-width: 0; }
.mt-rule b { color: var(--ink); }
.mt-rule-list { margin: 0; padding: 0; list-style: none; counter-reset: mtr; font-size: 13.5px; color: var(--ink-2); }
.mt-rule-list li { counter-increment: mtr; display: grid; grid-template-columns: 22px minmax(0, 1fr); margin: 0 0 4px; }
.mt-rule-list li::before { content: counter(mtr) "."; color: var(--muted); font-weight: 700; }
.mt-rule a { overflow-wrap: anywhere; }
.mt-log li { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 12px; padding: 9px 0; border-top: 1px solid var(--line); font-size: 13.5px; }
.mt-log span { color: var(--ink-2); }

/* ---- who and questions ---- */
.mt-end { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr)); gap: 24px; align-items: start; }
.mt-who { padding: 20px; gap: 10px; }
.mt-faq { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.mt-q { padding: 0; gap: 0; border-radius: 12px; }
.mt-q summary { cursor: pointer; font-weight: 700; font-size: 14.5px; padding: 12px 14px; list-style-position: inside; }
.mt-q p { padding: 0 14px 14px; font-size: 13.5px; color: var(--ink-2); }

/* ---- responsive ---- */
@media (max-width: 1000px) {
  .mt-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .mt-hero { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .mt-wrap { padding-block: 20px 44px; padding-inline: max(16px, env(safe-area-inset-left, 0px)) max(16px, env(safe-area-inset-right, 0px)); gap: 20px; }
  .mt-bar-in { padding-inline: max(10px, env(safe-area-inset-left, 0px)) max(10px, env(safe-area-inset-right, 0px)); }
  .mt-card { padding: 18px; }
  .mt-lead { font-size: 16px; }
  .mt-ticks { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mt-fam { grid-template-columns: minmax(0, 1fr) 36px; grid-template-areas: "n c" "b b"; gap: 4px 10px; padding: 6px 10px; }
  .mt-fam-n { grid-area: n; } .mt-fam b { grid-area: c; } .mt-fam-bar { grid-area: b; height: 6px; } .mt-fam-bar i { height: 6px; }
  .mt-base { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .mt-log li { grid-template-columns: minmax(0, 1fr); gap: 2px; }
}
@media (max-width: 560px) {
  .mt-steps { grid-template-columns: minmax(0, 1fr); }
  .mt-stat b { font-size: 21px; }
  .mt-tab { flex: 1 1 100%; }
  .mt-bands-h, .mt-band { grid-template-columns: 56px minmax(0, 1fr) 96px; gap: 8px; }
  .mt-bands-h { display: flex; flex-wrap: wrap; gap: 2px 14px; }
  .mt-band .mt-muted { display: block; font-size: 11.5px; }
  .mt-band > span:last-child { white-space: normal; text-align: right; }
}
.mt-base-l > b, .mt-base-l > span { min-width: 0; }
