:root {
  --bg: #0b0f17;
  --panel: #131a26;
  --panel-2: #1b2434;
  --line: #263349;
  --text: #e6edf6;
  --muted: #8ea0b8;
  --accent: #4da3ff;
  --green: #3ecf8e;
  --amber: #f5b544;
  --red: #ff6b6b;
  --home: #4da3ff;
  --away: #f5814d;
  --draw: #9aa6b6;
}

* { box-sizing: border-box; }
/* display:flex/grid in this file beats the browser's [hidden] rule. */
[hidden] { display: none !important; }
body {
  margin: 0;
  font: 15px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}
h1, h2, h3 { margin: 0; font-weight: 650; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.topbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 16px 22px; border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #101725, #0b0f17);
  flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand .logo { font-size: 30px; }
.brand h1 { font-size: 19px; letter-spacing: .2px; }
.sub { margin: 2px 0 0; color: var(--muted); font-size: 12.5px; }

.controls { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.controls label { color: var(--muted); font-size: 12px; display: flex; gap: 6px; align-items: center; }
/* display:flex on the label beats the HTML hidden attribute (same class of bug as .journal-view). */
.controls label[hidden], .controls select[hidden] { display: none !important; }
.controls input, .controls select, .controls button {
  background: var(--panel-2); color: var(--text);
  border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px; font-size: 13px;
}
.controls button { cursor: pointer; font-size: 15px; padding: 7px 12px; }
.controls button:hover { border-color: var(--accent); }
.account-link {
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px 12px;
  font-size: 13px;
  text-decoration: none;
  background: var(--panel-2);
}
.account-link:hover { border-color: var(--accent); text-decoration: none; }

.tabs { display: flex; gap: 4px; padding: 10px 22px 0; border-bottom: 1px solid var(--line); background: #0d1420; flex-wrap: wrap; }
.tabs button {
  background: transparent; border: none; color: var(--muted);
  padding: 10px 16px; font-size: 14px; cursor: pointer; border-bottom: 2px solid transparent;
}
.tabs button:hover { color: var(--text); }
.tabs button.active { color: var(--text); border-bottom-color: var(--accent); font-weight: 600; }

main {
  display: grid; grid-template-columns: 1fr 340px; gap: 20px;
  padding: 20px 22px; max-width: 1400px; margin: 0 auto; align-items: start;
}
body.journal-mode main { grid-template-columns: 1fr; max-width: 1100px; }
body.parlay-mode main { grid-template-columns: 1fr; max-width: 1280px; }
.summary-strip {
  grid-column: 1 / -1; display: flex; gap: 14px; flex-wrap: wrap;
  background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 12px 16px;
}
/* display:flex above beats the hidden attribute — same bug as .journal-view. */
.summary-strip[hidden] { display: none !important; }
.summary-strip .metric { font-size: 13px; color: var(--muted); }
.summary-strip .metric b { color: var(--text); font-size: 15px; }
.summary-strip .warn { flex-basis: 100%; background: rgba(245,181,68,.12); border: 1px solid var(--amber); color: #f5d9a6; padding: 8px 12px; border-radius: 8px; font-size: 13px; }

.status { grid-column: 1 / -1; color: var(--muted); font-size: 13px; min-height: 18px; }
.status.error { color: var(--red); }

.games { display: flex; flex-direction: column; gap: 14px; min-width: 0; }

.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
  overflow: hidden;
}
.card-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px; background: var(--panel-2); border-bottom: 1px solid var(--line);
  font-size: 12px; color: var(--muted); gap: 10px; flex-wrap: wrap;
}
.badge { padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 600; border: 1px solid var(--line); }
.badge.live { color: var(--green); border-color: var(--green); }
.badge.post { color: var(--muted); }
.badge.pre { color: var(--accent); border-color: var(--accent); }

.matchup { display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; align-items: center; padding: 14px; }
.team { display: flex; align-items: center; gap: 10px; min-width: 0; }
.team.away { justify-content: flex-end; text-align: right; flex-direction: row-reverse; }
.team img { width: 34px; height: 34px; object-fit: contain; }
.team .tname { font-weight: 600; font-size: 15px; }
.team .trec { color: var(--muted); font-size: 12px; }
.vs { color: var(--muted); font-size: 12px; text-align: center; }
.score { font-size: 20px; font-weight: 700; }

.probbar { height: 26px; border-radius: 6px; overflow: hidden; display: flex; margin: 0 14px; font-size: 11px; font-weight: 700; }
.probbar span { display: flex; align-items: center; justify-content: center; color: #06131f; white-space: nowrap; overflow: hidden; }
.probbar .ph { background: var(--home); }
.probbar .pd { background: var(--draw); color: #06131f; }
.probbar .pa { background: var(--away); }

.pickrow {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 12px 14px; border-top: 1px solid var(--line); background: #0f1622;
}
.pick-main { font-size: 14px; }
.pick-main b { font-size: 15px; }
.conf { padding: 3px 9px; border-radius: 6px; font-size: 12px; font-weight: 700; }
.conf.High { background: rgba(62,207,142,.16); color: var(--green); }
.conf.Medium { background: rgba(245,181,68,.16); color: var(--amber); }
.conf.Low { background: rgba(255,107,107,.14); color: var(--red); }
.value-flag { color: var(--green); font-size: 12.5px; font-weight: 600; }
.odds-mini { color: var(--muted); font-size: 12px; margin-left: auto; }
.dash-rank {
  font-weight: 800; font-size: 13px; color: var(--accent);
  min-width: 1.6em;
}
.dash-opp { color: var(--muted); font-weight: 500; font-size: 13px; margin-left: 4px; }
.dash-line {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px;
  padding: 12px 14px 14px; border-top: 1px solid var(--line);
}
.dash-line-item {
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px;
  padding: 8px 10px;
}
.dash-line-item .lbl { display: block; color: var(--muted); font-size: 11px; margin-bottom: 2px; }
.dash-line-item b { font-size: 16px; letter-spacing: .2px; }
@media (max-width: 640px) {
  .dash-line { grid-template-columns: 1fr 1fr; }
}
.dq { color: var(--muted); font-size: 11px; border: 1px solid var(--line); border-radius: 6px; padding: 2px 7px; }
.feat-badge { color: #9b7cf7; font-size: 11px; border: 1px solid rgba(155,124,247,.35); border-radius: 6px; padding: 2px 7px; }

details.more { border-top: 1px solid var(--line); }
details.more summary { padding: 10px 14px; cursor: pointer; color: var(--accent); font-size: 13px; list-style: none; }
details.more summary::-webkit-details-marker { display: none; }
details.more summary::before { content: "▸ "; }
details.more[open] summary::before { content: "▾ "; }
.more-body { padding: 4px 14px 16px; display: grid; gap: 14px; }
.strategy-more summary { color: #9b7cf7; }
.strat-meta {
  display: flex; flex-wrap: wrap; gap: 12px 20px; font-size: 12.5px;
  padding: 10px 12px; background: var(--panel-2); border-radius: 8px; border: 1px solid var(--line);
}
.strat-meta .lbl { color: var(--muted); margin-right: 6px; }
.strat-meta code { font-size: 11px; color: var(--amber); }
.strat-h { margin: 0 0 8px; font-size: 12.5px; color: var(--muted); font-weight: 600; }
.strat-callout {
  font-size: 12.5px; padding: 10px 12px; border-radius: 8px;
  background: rgba(77,163,255,.08); border: 1px solid rgba(77,163,255,.25); color: #cdd8e6;
}
.strat-callout.warn { background: rgba(245,181,68,.1); border-color: rgba(245,181,68,.35); color: #f5d9a6; }
.strat-callout.leak { background: rgba(255,107,107,.08); border-color: rgba(255,107,107,.25); color: #f0c4c4; }
.strat-purpose { font-size: 11px; color: var(--muted); font-weight: 400; margin-top: 2px; max-width: 220px; }
.strat-wt { display: block; font-size: 10.5px; color: var(--muted); margin-top: 3px; }
.strat-table .grade { font-size: 11px; font-weight: 700; }
.strat-table .grade.win { color: var(--green); }
.strat-table .grade.loss { color: var(--red); }
.feat-st { font-size: 11px; font-weight: 600; text-transform: uppercase; }
.feat-st.ok { color: var(--green); }
.feat-st.missing, .feat-st.thin { color: var(--amber); }
.feat-st.estimated { color: var(--muted); }
.factor-list.roadmap { color: var(--muted); font-size: 12.5px; }

.factor-list { margin: 0; padding-left: 18px; display: grid; gap: 5px; font-size: 13px; color: #cdd8e6; }
.inj-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.inj-col h4 { font-size: 12.5px; color: var(--muted); margin: 0 0 6px; }
.inj-item { font-size: 12.5px; padding: 5px 0; border-bottom: 1px dashed var(--line); }
.inj-item .st { font-weight: 600; }
.inj-item .st.out, .inj-item .st.suspended { color: var(--red); }
.inj-item .st.doubtful { color: var(--amber); }
.inj-item .st.questionable, .inj-item .st.day { color: var(--amber); }
.inj-w { color: var(--muted); float: right; }
.mini-news { display: grid; gap: 6px; }
.mini-news a { font-size: 12.5px; }
.mini-news .inj { border-left: 3px solid var(--amber); padding-left: 8px; }

.prob-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.prob-table th, .prob-table td { text-align: right; padding: 4px 8px; border-bottom: 1px solid var(--line); }
.prob-table th:first-child, .prob-table td:first-child { text-align: left; color: var(--muted); }

.news-panel {
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
  padding: 14px 16px; position: sticky; top: 16px; max-height: calc(100vh - 40px); overflow: auto;
}
.news-panel h2 { font-size: 15px; margin-bottom: 10px; }
.news-panel .hint { color: var(--muted); font-size: 11px; font-weight: 400; }
.news-item { padding: 9px 0; border-bottom: 1px solid var(--line); }
.news-item:last-child { border-bottom: none; }
.news-item .h { font-size: 13px; font-weight: 600; display: block; }
.news-item .d { color: var(--muted); font-size: 12px; margin-top: 3px; }
.news-item.injury .h::before { content: "🚑 "; }
.news-item time { color: var(--muted); font-size: 11px; }

footer { padding: 16px 22px 40px; color: var(--muted); font-size: 12px; text-align: center; }
footer strong { color: #c6d2e2; }

/* Journal tab */
.journal-view { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.journal-view[hidden], .games[hidden], #sideRail[hidden] { display: none !important; }
.journal-table .conf { padding: 2px 8px; border-radius: 6px; font-size: 11px; font-weight: 700; white-space: nowrap; }
.journal-table .conf.High { background: rgba(62,207,142,.16); color: var(--green); }
.journal-table .conf.Medium { background: rgba(245,181,68,.16); color: var(--amber); }
.journal-table .conf.Low { background: rgba(255,107,107,.14); color: var(--red); }
.journal-table .value-flag { color: var(--green); font-size: 11px; font-weight: 600; white-space: nowrap; }
.journal-table .muted { color: var(--muted); }
.journal-summary h2 { font-size: 18px; margin-bottom: 4px; }
.journal-sub { color: var(--muted); font-size: 13px; margin: 0 0 14px; }
.journal-metrics {
  display: flex; gap: 12px; flex-wrap: wrap;
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px;
}
.journal-metric {
  flex: 1 1 120px; display: flex; flex-direction: column; gap: 2px;
  padding: 8px 12px; background: var(--panel-2); border-radius: 8px; border: 1px solid var(--line);
}
.journal-metric b { font-size: 22px; }
.journal-metric span { color: var(--muted); font-size: 12px; }
.journal-metric.win b { color: var(--green); }
.journal-metric.loss b { color: var(--red); }
.journal-table-wrap {
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; overflow-x: auto;
}
.journal-table-wrap h3 { font-size: 14px; color: var(--muted); margin: 0 0 10px; font-weight: 600; }
.journal-detail-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 6px;
}
.journal-detail-head h3 { margin: 0; }
.journal-filter { color: var(--muted); font-size: 12px; display: flex; gap: 6px; align-items: center; }
.journal-filter select {
  background: var(--panel-2); color: var(--text);
  border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; font-size: 13px;
}
.journal-filter-count { color: var(--muted); font-size: 12px; margin: 0 0 8px; }
.journal-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.journal-table th, .journal-table td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.journal-table th { color: var(--muted); font-size: 12px; font-weight: 600; }
.journal-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.journal-table .win { color: var(--green); }
.journal-table .loss { color: var(--red); }
.journal-table .grade { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; }
.journal-table .grade.win { background: rgba(62,207,142,.16); color: var(--green); }
.journal-table .grade.loss { background: rgba(255,107,107,.14); color: var(--red); }
.journal-table .grade.push { background: rgba(245,181,68,.16); color: var(--amber); }
.journal-table tr.row-win { background: rgba(62,207,142,.04); }
.journal-table tr.row-loss { background: rgba(255,107,107,.04); }
.journal-table tr.journal-best { background: rgba(62,207,142,.08); }
.journal-table tr.journal-empty td { color: var(--muted); }
.journal-tag {
  display: inline-block; margin-left: 6px; font-size: 10px; font-weight: 700;
  letter-spacing: .03em; text-transform: uppercase; padding: 1px 6px; border-radius: 999px;
  background: rgba(62,207,142,.18); color: var(--green); vertical-align: middle;
}
.journal-tag.thin {
  background: rgba(142,160,184,.16); color: var(--muted);
}
.cal-sub { display: block; font-size: 11px; color: var(--muted); margin-top: 2px; }
.cal-bar { height: 8px; background: var(--panel-2); border-radius: 4px; overflow: hidden; min-width: 60px; }
.cal-bar span { display: block; height: 100%; background: var(--green); }

.skeleton { background: linear-gradient(90deg, #131a26, #1b2434, #131a26); background-size: 200% 100%; animation: sh 1.2s infinite; border-radius: 12px; height: 150px; }
@keyframes sh { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

@media (max-width: 980px) {
  main { grid-template-columns: 1fr; }
  .news-panel { position: static; max-height: none; order: 3; }
}

.side-rail { display: flex; flex-direction: column; gap: 16px; position: sticky; top: 16px; max-height: calc(100vh - 32px); overflow: auto; }
.side-rail .news-panel { position: static; max-height: none; }



.pl-empty { color: var(--muted); font-size: 12.5px; padding: 8px 0; }


@media (max-width: 980px) {
  .side-rail { position: static; max-height: none; order: 3; }
}

/* ---- Closing-line value: evidence on value flags, line movement, best book ---- */
.value-flag.ev-insufficient,
.value-flag.ev-unproven { color: var(--amber); }
.value-flag.ev-negative { color: var(--red); }
.value-flag.ev-positive { color: var(--green); }
.chip-move, .chip-book {
  font-size: 11px; color: var(--muted); border: 1px solid var(--line);
  border-radius: 6px; padding: 2px 7px; white-space: nowrap;
}
.chip-move.with { color: var(--green); border-color: rgba(62,207,142,.4); }
.chip-move.against { color: var(--red); border-color: rgba(255,107,107,.35); }
.chip-book { color: #9ec9ff; border-color: rgba(77,163,255,.35); }

/* ---- Edge tab ---- */
.verdict { font-size: 11.5px; font-weight: 700; padding: 2px 8px; border-radius: 6px; white-space: nowrap; }
.verdict.v-positive { background: rgba(62,207,142,.16); color: var(--green); }
.verdict.v-negative { background: rgba(255,107,107,.14); color: var(--red); }
.verdict.v-unproven { background: rgba(245,181,68,.14); color: var(--amber); }
.verdict.v-insufficient { background: var(--panel-2); color: var(--muted); }
.edge-view .hint { color: var(--muted); font-size: 11px; font-weight: 400; }

/* ---- Parlay tab: "Parlay Lab" ---- */
.parlay-view { gap: 18px; }
.parlay-view {
  --tone-amber: #f5b544; --tone-blue: #4da3ff; --tone-green: #3ecf8e;
  --tone-violet: #a78bfa; --tone-accent: #5ec8ff; --tone-slate: #9aa6b6;
}

.px-hero {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; flex-wrap: wrap;
  padding: 22px 24px; border: 1px solid var(--line); border-radius: 16px;
  background:
    radial-gradient(120% 140% at 0% 0%, rgba(77,163,255,.18), transparent 55%),
    radial-gradient(90% 120% at 100% 100%, rgba(62,207,142,.12), transparent 60%),
    var(--panel);
}
.px-hero-text { max-width: 760px; min-width: 0; }
.px-hero h2 { font-size: 26px; letter-spacing: -.01em; font-weight: 750; }
.px-hero p { margin: 6px 0 0; color: var(--muted); font-size: 12.5px; line-height: 1.55; }

.px-seg { display: inline-flex; padding: 4px; gap: 2px; background: #0d1420; border: 1px solid var(--line); border-radius: 12px; }
.px-seg button {
  border: 0; background: transparent; color: var(--muted); font: inherit; font-size: 13px; font-weight: 600;
  padding: 8px 16px; border-radius: 9px; cursor: pointer; transition: background .15s, color .15s;
}
.px-seg button:hover { color: var(--text); }
.px-seg button.active { background: var(--accent); color: #06101e; }

.px-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.px-kpi {
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px;
  display: flex; flex-direction: column; gap: 2px;
}
.px-kpi b { font-size: 24px; font-weight: 750; font-variant-numeric: tabular-nums; line-height: 1.1; }
.px-kpi span { color: var(--muted); font-size: 12px; }
.px-kpi.good b { color: var(--green); }

.px-views {
  display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: thin;
  border-bottom: 1px solid var(--line);
}
.px-views button {
  flex: 0 0 auto; display: inline-flex; align-items: center; gap: 8px;
  background: transparent; border: 0; border-bottom: 2px solid transparent; color: var(--muted);
  font: inherit; font-size: 13.5px; padding: 10px 12px; cursor: pointer; margin-bottom: -1px;
}
.px-views button:hover { color: var(--text); }
.px-views button.active { color: var(--text); border-bottom-color: var(--accent); font-weight: 650; }
.px-badge {
  font-size: 11px; font-weight: 700; min-width: 22px; padding: 1px 7px; border-radius: 99px; text-align: center;
  background: var(--panel-2); color: var(--muted); font-variant-numeric: tabular-nums;
}
.px-views button.active .px-badge { background: rgba(77,163,255,.18); color: var(--accent); }

.px-body { display: flex; flex-direction: column; gap: 22px; min-width: 0; }
.px-section h3 {
  display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 0 0 12px;
}
.px-count { font-size: 11px; padding: 1px 8px; border-radius: 99px; background: var(--panel-2); color: var(--text); letter-spacing: 0; }
.px-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.px-tickets { display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); gap: 16px; }

/* Ticket: a betting slip with a perforated footer. */
.px-ticket {
  position: relative; overflow: hidden; display: flex; flex-direction: column;
  background: linear-gradient(180deg, #162033, var(--panel)); border: 1px solid var(--line); border-radius: 14px;
  transition: border-color .15s, transform .15s, box-shadow .15s;
}
.px-ticket:hover { border-color: #35507a; transform: translateY(-2px); box-shadow: 0 10px 26px rgba(0,0,0,.35); }
.px-ticket-head { display: flex; align-items: center; gap: 12px; padding: 14px 16px 10px; }
.px-legs {
  flex: 0 0 auto; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center;
  font-weight: 800; font-size: 16px; color: #06101e; background: linear-gradient(135deg, var(--accent), #7cc4ff);
}
.px-title { min-width: 0; flex: 1; display: flex; flex-direction: column; }
.px-title b { font-size: 14px; }
.px-title small { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.px-ev, .px-tag { flex: 0 0 auto; font-size: 11.5px; font-weight: 700; padding: 4px 9px; border-radius: 99px; }
.px-ev.neg { background: rgba(255,107,107,.14); color: var(--red); }
.px-ev.pos { background: rgba(62,207,142,.16); color: var(--green); }
.px-tag { background: var(--panel-2); color: var(--muted); }

.px-ticket-body { display: flex; gap: 16px; padding: 4px 16px 16px; align-items: flex-start; }
.px-ring {
  --p: 0; --ring: var(--accent);
  flex: 0 0 auto; width: 86px; height: 86px; border-radius: 50%; position: relative;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: conic-gradient(var(--ring) calc(var(--p) * 1%), rgba(255,255,255,.07) 0);
}
.px-ring::before { content: ''; position: absolute; inset: 7px; border-radius: 50%; background: #121b2a; }
.px-ring.hi { --ring: var(--green); }
.px-ring.lo { --ring: var(--amber); }
.px-ring span { position: relative; font-size: 19px; font-weight: 800; font-variant-numeric: tabular-nums; }
.px-ring small { position: relative; font-size: 9.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }

.px-leglist { list-style: none; margin: 0; padding: 0; flex: 1; min-width: 0; counter-reset: leg; display: flex; flex-direction: column; }
.px-leglist li {
  counter-increment: leg; position: relative; padding: 9px 0 9px 30px;
  display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 12px; row-gap: 5px; align-items: center;
}
.px-leglist li + li { border-top: 1px dashed var(--line); }
.px-leglist li::before {
  content: counter(leg); position: absolute; left: 0; top: 9px; width: 20px; height: 20px; border-radius: 50%;
  display: grid; place-items: center; font-size: 11px; font-weight: 700; background: var(--panel-2); color: var(--muted);
  border: 1px solid var(--line);
}
.px-leg-main { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; min-width: 0; }
.px-leg-main .px-sel { flex: 1; }
.px-leg-main .px-odds { flex: 0 0 auto; }
.px-leg-meta { grid-column: 1; grid-row: 2; color: var(--muted); font-size: 11.5px; min-width: 0; overflow-wrap: anywhere; }
.px-leg-p { grid-column: 2; grid-row: 2; display: flex; align-items: center; gap: 8px; }
.px-leg-p .px-meter { width: 64px; }
.px-leg-p b { font-size: 13px; font-variant-numeric: tabular-nums; }
.px-sel { font-weight: 650; font-size: 13.5px; min-width: 0; overflow-wrap: anywhere; }
.px-odds { color: var(--muted); font-weight: 500; font-size: 12px; }

.px-ticket-foot {
  position: relative; margin-top: auto; display: flex; gap: 18px; flex-wrap: wrap;
  padding: 11px 16px; border-top: 1px dashed #33435e; background: rgba(0,0,0,.18);
  color: var(--muted); font-size: 12px;
}
.px-ticket-foot b { color: var(--text); font-variant-numeric: tabular-nums; }
.px-ticket-foot::before, .px-ticket-foot::after {
  content: ''; position: absolute; top: -9px; width: 16px; height: 16px; border-radius: 50%;
  background: var(--bg); border: 1px solid var(--line);
}
.px-ticket-foot::before { left: -9px; }
.px-ticket-foot::after { right: -9px; }

/* Market tags */
.px-chip {
  display: inline-block; flex: 0 0 auto; font-size: 10px; font-weight: 750; letter-spacing: .05em; text-transform: uppercase;
  padding: 2px 7px; border-radius: 6px; color: var(--c); background: color-mix(in srgb, var(--c) 15%, transparent);
  border: 1px solid color-mix(in srgb, var(--c) 35%, transparent);
}
.tone-amber { --c: var(--tone-amber); } .tone-blue { --c: var(--tone-blue); } .tone-green { --c: var(--tone-green); }
.tone-violet { --c: var(--tone-violet); } .tone-accent { --c: var(--tone-accent); } .tone-slate { --c: var(--tone-slate); }

.px-meter { height: 5px; border-radius: 99px; background: rgba(255,255,255,.07); overflow: hidden; }
.px-meter i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--accent), var(--green)); }

/* Prop tiles */
.px-prop {
  display: flex; flex-direction: column; gap: 7px; min-width: 0;
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 13px 14px;
  transition: border-color .15s;
}
.px-prop:hover { border-color: #35507a; }
.px-prop-top { display: flex; align-items: center; gap: 6px; }
.px-prop-pct { margin-left: auto; font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1; }
.px-conf { font-size: 10px; font-weight: 700; padding: 2px 6px; border-radius: 6px; background: var(--panel-2); color: var(--muted); }
.px-conf.c-high { color: var(--green); } .px-conf.c-medium { color: var(--amber); } .px-conf.c-low { color: var(--red); }
.px-desc { color: var(--muted); font-size: 11.5px; line-height: 1.45; }
.px-price { border-color: rgba(62,207,142,.35); background: linear-gradient(180deg, rgba(62,207,142,.07), var(--panel) 60%); }
.px-edge { margin-left: auto; font-size: 12px; font-weight: 750; color: var(--green); }

.px-note {
  display: flex; gap: 10px; align-items: flex-start; padding: 11px 14px; border-radius: 10px;
  background: rgba(245,181,68,.07); border: 1px solid rgba(245,181,68,.3); color: #e9d6ae; font-size: 12.5px; line-height: 1.5;
}
.px-note-i {
  flex: 0 0 auto; width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center;
  font: italic 700 11px Georgia, serif; background: rgba(245,181,68,.2); color: var(--amber);
}
.px-empty {
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px;
  padding: 34px 20px; border: 1px dashed var(--line); border-radius: 14px; color: var(--muted); font-size: 13px;
}
.px-empty p { margin: 0; max-width: 560px; }
.px-empty-icon { font-size: 26px; color: #3a4c6a; }

.px-data { border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
.px-data summary { cursor: pointer; padding: 10px 14px; color: var(--muted); font-size: 12.5px; }
.px-data summary:hover { color: var(--text); }
.px-data-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 14px 12px; }
.px-data-chips span { font-size: 11.5px; padding: 3px 9px; border-radius: 99px; background: var(--panel-2); color: var(--muted); }

@media (max-width: 640px) {
  .px-hero { padding: 18px 16px; }
  .px-hero h2 { font-size: 22px; }
  .px-seg { width: 100%; }
  .px-seg button { flex: 1; padding: 8px 6px; }
  .px-tickets { grid-template-columns: 1fr; }
  .px-grid { grid-template-columns: 1fr; }
  .px-ticket-body { flex-direction: column; align-items: stretch; }
  .px-ring { align-self: center; }
  .px-kpis { grid-template-columns: 1fr 1fr; }
  .px-kpi:last-child:nth-child(odd) { grid-column: 1 / -1; }
}
@media (prefers-reduced-motion: reduce) {
  .px-ticket, .px-ticket:hover { transition: none; transform: none; }
}

/* ---- $5 landing (pay.html) — process, not locks ---- */
.pay-body {
  min-height: 100vh;
  background:
    radial-gradient(900px 420px at 12% -8%, rgba(77,163,255,.2), transparent 60%),
    radial-gradient(640px 360px at 100% 0%, rgba(62,207,142,.1), transparent 55%),
    var(--bg);
}
/* Dashboard `main` is a 2-col grid (1fr + 340px). An explicit width is
   required or margin:auto leaves the account card in that right column. */
body.pay-body > main.pay-main,
body.pay-body > main.profile-main {
  display: block;
  grid-template-columns: none;
  width: min(1040px, calc(100% - 32px));
  max-width: 1040px;
  margin: 36px auto 64px;
  padding: 0;
}
body.pay-body > main.profile-main {
  width: min(480px, calc(100% - 32px));
  max-width: 480px;
}
.pay-hero {
  background:
    radial-gradient(80% 140% at 100% 0%, rgba(77,163,255,.14), transparent 52%),
    var(--panel);
  border: 1px solid var(--line); border-radius: 16px; padding: 28px 26px;
  box-shadow: 0 22px 50px rgba(0,0,0,.28);
}
.pay-kicker { color: var(--accent); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; margin: 0 0 8px; }
.pay-hero h2 { font-size: 30px; line-height: 1.2; margin-bottom: 12px; }
.pay-lead { color: var(--muted); font-size: 15.5px; margin: 0 0 22px; max-width: 62ch; }
/* Signed-in chip and Subscribe share one height so they read as a pair. */
.pay-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.pay-session, .pay-cta .pay-go {
  min-height: 48px; border-radius: 12px; font-size: 15px; font-weight: 750;
  display: inline-flex; align-items: center; box-sizing: border-box;
}
.pay-session {
  margin: 0; padding: 0 16px 0 8px; gap: 10px;
  background: #0e1624; border: 1px solid #3a4d6e; color: var(--text);
}
.pay-avatar {
  width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center;
  background: var(--accent); color: #06131f; font-weight: 800; font-size: 14px;
}
.pay-cta .pay-go {
  background: var(--accent); color: #06131f; border: none; padding: 0 18px;
  cursor: pointer; text-decoration: none; gap: 8px;
}
.pay-cta .pay-go:hover { filter: brightness(1.08); text-decoration: none; }
.pay-cta .pay-go:disabled { opacity: .6; cursor: wait; }
.pay-fine { flex-basis: 100%; color: var(--muted); font-size: 12.5px; margin: 0; }
.pay-err { color: var(--red); font-size: 13px; margin: 10px 0 0; }
.pay-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; margin-top: 18px; }
.pay-card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 16px; }
.pay-card h3 { font-size: 15px; margin-bottom: 6px; }
.pay-card p { color: var(--muted); font-size: 13.5px; margin: 0; }
.pay-legal { color: var(--muted); font-size: 12.5px; margin: 22px 4px 0; }
.pay-shots {
  display: grid; grid-template-columns: 1fr; gap: 18px; margin-top: 18px; align-items: start;
}
.pay-shot-wide { grid-column: auto; }
.pay-shots figure { margin: 0; }
.pay-shots img {
  width: 100%; height: auto; display: block; border-radius: 14px;
  border: 1px solid var(--line); box-shadow: 0 16px 40px rgba(0,0,0,.35);
  background: #0d1420;
}
.pay-shots figcaption { color: var(--muted); font-size: 12.5px; margin-top: 8px; }
@media (max-width: 720px) {
  .pay-hero h2 { font-size: 24px; }
  .pay-grid { grid-template-columns: 1fr; }
  .pay-shots { gap: 14px; }
}

/* ---- Account / Firebase sign-in (profile.html + pay.html) ---- */
.profile-main .auth-box { max-width: none; margin-bottom: 0; }
.auth-box { display: flex; flex-direction: column; gap: 12px; margin: 0 0 18px; max-width: 380px; }
.auth-box label { color: var(--muted); font-size: 12px; display: flex; flex-direction: column; gap: 4px; }
.auth-box input {
  background: var(--panel-2); color: var(--text);
  border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; font-size: 14px;
}
.auth-email { display: flex; flex-direction: column; gap: 10px; }
.auth-row { display: flex; gap: 8px; flex-wrap: wrap; }
.auth-box button, .profile-actions button {
  background: var(--accent); color: #06131f; border: none; border-radius: 10px;
  padding: 10px 16px; font-size: 14px; font-weight: 700; cursor: pointer;
}
.auth-box button.ghost, .profile-actions button.ghost {
  background: transparent; color: var(--text); border: 1px solid var(--line); font-weight: 600;
}
.auth-box button.auth-google {
  width: 100%;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  background: #fff; color: #1f1f1f; border: 1px solid #dadce0;
}
.auth-box button.auth-google:hover { filter: none; background: #f7f8f8; }
.auth-google-mark {
  width: 20px; height: 20px; border-radius: 4px;
  display: inline-flex; align-items: center; justify-content: center;
  font: 700 13px/1 Arial, sans-serif; color: #4285f4; background: #fff;
}
.auth-or {
  display: flex; align-items: center; gap: 10px;
  color: var(--muted); font-size: 12px; margin: 0;
}
.auth-or::before, .auth-or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.auth-link {
  background: none !important; color: var(--accent) !important; border: none !important;
  padding: 0 !important; font-size: 13px !important; font-weight: 600 !important;
  cursor: pointer; align-self: flex-start;
}
.pay-err.auth-ok { color: var(--green); }
.auth-who { color: var(--muted); font-size: 13px; margin: 0 0 12px; }
.auth-note { color: var(--muted); font-size: 13px; margin: 0 0 14px; }
.profile-card { display: flex; flex-direction: column; gap: 10px; }
.profile-who, .profile-plan { margin: 0; }
.profile-plan { color: var(--muted); font-size: 14px; }
.profile-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.comp-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; margin: 4px 0 8px; }
.comp-form[hidden] { display: none !important; }
.comp-form label { color: var(--muted); font-size: 12px; display: flex; flex-direction: column; gap: 4px; flex: 1; min-width: 160px; }
.comp-form input {
  background: var(--panel-2); color: var(--text);
  border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; font-size: 14px;
}
.comp-form button {
  background: var(--accent); color: #06131f; border: none; border-radius: 10px;
  padding: 10px 16px; font-size: 14px; font-weight: 700; cursor: pointer;
}
.comp-form button:disabled { opacity: .6; cursor: wait; }
