/* Shared app language from the Bettar landing redesign. Data and risk states stay explicit. */
@font-face {
  font-family: "Instrument Sans";
  src: url("/fonts/InstrumentSans-Regular.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Sans";
  src: url("/fonts/InstrumentSans-Bold.ttf") format("truetype");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

:root {
  color-scheme: light dark;
  --bg: #0d1110;
  --surface: #181f1b;
  --surface-2: #202923;
  --border: #303d34;
  --text: #f1f3ee;
  --muted: #a7b1a8;
  --accent: #c1ddaf;
  --accent-2: #dcebd2;
  --accent-ink: #152019;
  --level-1: #62d88a;
  --level-1-bg: #173624;
  --level-2: #f0b85c;
  --level-2-bg: #392913;
  --level-3: #ff8178;
  --level-3-bg: #3d1d1d;
  --gold-chip-text: #e4c980;
  --gold-chip-border: #655738;
  --fresh-text: #8ce2a3;
  --fresh-surface: #173624;
  --fresh-border: #477457;
  --ghost-surface: #171d19;
  --quiet-rule: #7e9c80;
  --step-text: #dcebd2;
  --step-surface: #314836;
  --control-border: #536154;
  --tab-text: #a8b7aa;
  --tab-active-bg: #253428;
  --market-notice-bg: #22291e;
  --market-notice-text: #d9e2d6;
  --tabbar-bg: rgba(16, 23, 18, .97);
  /* G6 type scale — the app's type steps. --fs-caption is the hard floor
     (test-enforced): no text renders below 12px. Ghana = small phones,
     sunlight, outdoor use; micro-type cost more than it saved. */
  --fs-caption: 12px;
  --fs-label: 13px;
  --fs-body: 14px;
  --fs-body-lg: 15px;
  --fs-title: 16px;
  --fs-head: 17px;
  --fs-h: 20px;
  --fs-display: 23px;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 16px 34px rgba(0, 0, 0, .18);
  font-family: "Instrument Sans", Arial, sans-serif;
}
@media (prefers-color-scheme: light) {
  :root {
    --bg: #f4f6f2;
    --surface: #ffffff;
    --surface-2: #edf2eb;
    --border: #d8e1d7;
    --text: #1d2920;
    --muted: #58685c;
    --accent: #456f49;
    --accent-2: #345b39;
    --accent-ink: #ffffff;
    --amber: #865a13;
    --red: #a6332d;
    --gold: #806018;
    --blue: #2b5dab;
    --level-1: #247348;
    --level-1-bg: #e7f4ea;
    --level-2: #865a13;
    --level-2-bg: #fff3dc;
    --level-3: #a6332d;
    --level-3-bg: #ffebe8;
    --gold-chip-text: #765310;
    --gold-chip-border: #ddca91;
    --fresh-text: #28643d;
    --fresh-surface: #e7f4ea;
    --fresh-border: #bbd8c0;
    --ghost-surface: #f8faf7;
    --quiet-rule: #829784;
    --step-text: #315a37;
    --step-surface: #e4eee2;
    --control-border: #b4c3b5;
    --tab-text: #5d6c60;
    --tab-active-bg: #e6f0e4;
    --market-notice-bg: #edf4e9;
    --market-notice-text: #29382c;
    --tabbar-bg: rgba(248, 250, 247, .97);
    --shadow: 0 12px 28px rgba(30, 54, 36, .08);
  }
}
body { letter-spacing: -.012em; }
button, input, select, textarea { font: inherit; }
button:focus-visible, a:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.topbar { padding-inline: clamp(16px, 4vw, 36px); background: color-mix(in srgb, var(--bg) 94%, transparent); border-bottom-color: var(--border); }
.brand { font-size: 20px; letter-spacing: -.045em; }
.mark { width: 32px; height: 32px; border-radius: 9px; border-color: var(--border); }
.iconbtn { border-radius: 50%; background: transparent; border-color: var(--control-border); font-size: 17px; }
.topbar-right { gap: 8px; }
.topbar .chip { background: transparent; border: 1px solid var(--border); color: var(--muted); box-shadow: none; animation: none; }
.topbar .chip-gold { color: var(--gold-chip-text); border-color: var(--gold-chip-border); }

.view { max-width: 800px; padding: clamp(20px, 3vw, 34px) clamp(16px, 3vw, 30px) calc(var(--tabbar-h) + 38px); }
.screen-hero { margin: 0 0 24px; padding: 8px 0 22px; background: none; border: 0; border-bottom: 1px solid var(--border); border-radius: 0; overflow: visible; }
.screen-hero::after { display: none; }
.screen-hero .screen-title { font-size: clamp(31px, 5vw, 43px); font-weight: 700; line-height: 1.08; letter-spacing: -.052em; margin: 0 0 12px; }
.screen-hero .sub { color: var(--muted); font-size: 16px; max-width: 49ch; margin: 0; line-height: 1.48; }
.screen-hero .sub b { color: var(--text); }
.screen-hero .engine-pills { margin-top: 17px; }
.live-badge { vertical-align: middle; margin-left: 8px; border-color: var(--fresh-border); color: var(--fresh-text); background: var(--fresh-surface); }

.card, .opportunity, .feed-guide, .source-leg { border-color: var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: none; animation: none; }
.card { padding: clamp(17px, 2.6vw, 24px); margin-bottom: 16px; }
.card.recent, .opportunity.recent { opacity: .82; }
.card.ghost { opacity: 1; border-style: solid; background: var(--ghost-surface); }
.card.locked { background: var(--surface); }
.match { font-size: 17px; letter-spacing: -.03em; }
.meta { line-height: 1.48; }
.section-h, .section-label { display: block; margin: 27px 0 12px; font-size: 17px; font-weight: 700; letter-spacing: -.035em; color: var(--text); }
.stat .v { animation: none; font-variant-numeric: tabular-nums; letter-spacing: -.035em; }
.stat .k { letter-spacing: .065em; }
.v.pos { color: var(--level-1); }
.visual-result::before { width: 2px; background: var(--quiet-rule); opacity: .7; }
.record-kicker { margin-bottom: 14px; color: var(--muted); font-size: 14px; font-weight: 700; letter-spacing: .11em; text-transform: uppercase; }
.metric-rail { gap: 0; margin: 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.metric-rail > .stat, .metric-rail > .metric { padding: 17px 12px; border: 0; border-radius: 0; background: none; }
.metric-rail > .stat + .stat, .metric-rail > .metric + .metric { border-left: 1px solid var(--border); }
.metric-rail .stat .v, .metric-rail .metric .v { font-size: 23px; }
.metric-rail .stat .k, .metric-rail .metric .k { max-width: 15ch; line-height: 1.25; }
.metric-rail + .meta { margin-top: 13px; }
.action-rail { margin-bottom: 18px; }
.promo-card { background: var(--surface) !important; border-left-width: 2px; }
.promo-card .pc-title { color: var(--text) !important; }
.nextstep { background: var(--surface); border-color: var(--border); border-radius: var(--radius); padding: 20px; }
.feedwarn { border-radius: var(--radius-sm); }
.empty-mark { display: block; width: 46px; height: 46px; margin: 0 auto 14px; fill: none; stroke: var(--accent); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.while-waiting { margin: 13px 0 10px; }
.hunt-strip.is-paused .live-pulse { color: var(--muted); }

.dashboard-how { margin: 0 0 20px; padding: 0; }
.dashboard-how figcaption { padding: 19px 20px 15px; }
.dashboard-how figcaption b { font-size: 18px; letter-spacing: -.035em; }
.dashboard-how > img { aspect-ratio: 3 / 1; object-fit: cover; }
.dashboard-how-steps > div { padding: 14px 16px 16px; }
.dashboard-how-steps span { width: 23px; height: 23px; margin-bottom: 8px; background: var(--step-surface); color: var(--step-text); font-weight: 700; }
.dashboard-how-steps b { font-size: 16px; }
.dashboard-how-steps small { font-size: 14px; line-height: 1.4; }

.btn { border-radius: 999px; box-shadow: none; font-weight: 700; font-size: 16px; padding: 12px 18px; }
.btn.btn-sm { padding: 9px 17px; font-size: 15px; }
.btn.secondary, .btn.launch, .btn.launch2 { background: transparent; border-color: var(--control-border); }
.chip { font-weight: 700; }
.chip-fresh { background: var(--fresh-surface); color: var(--fresh-text); box-shadow: none; }
.chip-info, .chip-gold { animation: none; }
.risk-dot { animation: none !important; }
.live-badge:not(.is-connecting) .live-pulse {
  animation: liveBreath 2.4s ease-in-out infinite;
}
@keyframes liveBreath {
  0%, 100% { opacity: .68; transform: scale(.92); }
  50% { opacity: 1; transform: scale(1.08); }
}
.risk-band { border-radius: var(--radius-sm); }
.opportunity { border-left-width: 3px; margin-bottom: 16px; }
.opportunity.is-surfaced { animation: opportunityArrival 950ms ease-out 1; }
@keyframes opportunityArrival {
  0% { box-shadow: var(--shadow); }
  24% { box-shadow: 0 0 0 4px var(--fresh-border), var(--shadow); }
  100% { box-shadow: var(--shadow); }
}
.opportunity-body { padding: 18px; }
.opportunity .card-head > div { min-width: 0; }
.card-status { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-top: 11px; }
.snapshot-chip { max-width: 100%; white-space: normal; line-height: 1.3; }
.quick-leg { grid-template-columns: minmax(0, 1fr) 68px 99px; min-height: 66px; gap: 8px; }
.quick-pick b { font-size: 15px; }
.quick-odd { padding: 6px 7px; text-align: right; border-radius: 8px; background: var(--surface-2); }
.quick-odd b { color: var(--text); font-size: 16px; line-height: 1.25; }
.quick-odd small, .quick-stake small { font-size: 14px; line-height: 1.2; }
.quick-stake { text-align: right; }
.quick-stake b { font-size: 14px; }
.quick-odd b, .quick-stake b, .num, .placegrid .pv, .bet-summary b, .countdown { font-variant-numeric: lining-nums tabular-nums; }
.quick-sources { margin-top: 14px; gap: 8px; }
.quick-sources-label { flex-basis: 100%; color: var(--muted); font-size: 14px; font-weight: 700; letter-spacing: .02em; }
.quick-source { min-height: 44px; padding: 9px 13px; border-radius: 999px; background: var(--surface-2); font-size: 14px; }
.opportunity .share-mini { display: grid; place-items: center; flex: none; min-width: 44px; min-height: 44px; border-radius: 50%; font-size: 16px; }
.opportunity .scan-cta { width: 100%; min-height: 48px; padding: 11px 0 0; background: transparent; border: 0; border-top: 1px solid var(--border); color: var(--accent); font-size: 15px; text-align: left; cursor: pointer; }
.opportunity .scan-cta:hover { color: var(--accent-2); }
.detail-card .btn, .source-leg .btn { min-height: 44px; }
.feed-guide > summary { padding: 14px 16px; font-size: 15px; }
.price-fixture-list { display: grid; gap: 8px; }
.price-fixture { width: 100%; min-height: 54px; padding: 10px 12px; text-align: left; color: var(--text); background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; cursor: pointer; }
.price-fixture b, .price-fixture small { display: block; }
.price-fixture small { margin-top: 4px; color: var(--muted); }
.price-fixture.selected, .price-fixture:focus-visible { border-color: var(--accent); }
.price-pick-grid { display: grid; gap: 7px; }
.price-pick-grid .field:not(:first-child) { margin-top: 5px; }
.price-best { font-size: 30px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--level-1); }
.price-quote { margin-top: 8px; }
.price-quote-odds { font-size: 21px; font-variant-numeric: tabular-nums; }
.price-quote-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 11px; }
.price-quote-actions .btn { min-height: 44px; display: inline-flex; align-items: center; }
.value-pick-card { margin-top: 12px; }
.value-pick-ev { color: var(--level-2); font-size: 24px; font-variant-numeric: tabular-nums; }
.value-pick-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.value-pick-metrics > div { padding: 10px; background: var(--surface-2); border-radius: 9px; }
.value-pick-metrics small, .value-pick-metrics b { display: block; }
.value-pick-metrics small { color: var(--muted); font-size: 14px; }
.value-pick-metrics b { margin-top: 5px; font-size: 16px; font-variant-numeric: tabular-nums; }
@media (max-width: 420px) { .value-pick-metrics { grid-template-columns: 1fr 1fr; } }

.tabbar { max-width: 900px; margin-inline: auto; left: 50%; right: auto; width: 100%; transform: translateX(-50%); padding-inline: 12px; background: var(--tabbar-bg); border: 1px solid var(--border); border-bottom: 0; border-radius: 18px 18px 0 0; gap: 2px; }
.tab { font-size: 14px; font-weight: 700; letter-spacing: .01em; color: var(--tab-text); border-radius: 9px; }
.tab svg { width: 19px; height: 19px; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; fill: none; }
.tab.active { color: var(--accent); background: var(--tab-active-bg); box-shadow: none; }
.tab .badge { left: calc(50% + 6px); }
.menu-drawer { background: var(--surface); }
.menu-item { background: transparent; border-radius: 10px; }
.menu-item:hover, .menu-item.active { background: var(--surface-2); }
.market-notice { background: var(--market-notice-bg); color: var(--market-notice-text); }
.install-banner { border-color: var(--border); border-radius: 12px; background: var(--surface); box-shadow: none; }
.agebox { border-radius: 18px; }

@media (max-width: 520px) {
  .view { padding-inline: 17px; }
  .screen-hero { margin-bottom: 19px; padding-bottom: 18px; }
  .metric-rail { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metric-rail > .stat:nth-child(3) { border-left: 0; border-top: 1px solid var(--border); }
  .metric-rail > .stat:nth-child(4) { border-top: 1px solid var(--border); }
  .dashboard-how figcaption { flex-direction: column; align-items: flex-start; gap: 2px; }
  .dashboard-how-steps > div { padding: 10px 8px 13px; }
  .dashboard-how-steps small { font-size: 14px; }
  .tabbar { border-radius: 0; border-inline: 0; }
}
@media (max-width: 370px) {
  .quick-leg { grid-template-columns: minmax(0, 1fr) 60px 90px; gap: 6px; }
  .quick-stake b { font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .card, .opportunity, .chip, .tab, .btn { animation: none !important; transition: none !important; }
  .live-badge:not(.is-connecting) .live-pulse { animation: none !important; }
}

/* ── Member voices rail (2026-10-08): consented WhatsApp quotes, horizontal
      snap strip served by /api/testimonials. Empty payload → not rendered. ── */
.member-rail {
  display: flex; gap: 10px; overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch;
  padding: 2px 2px 12px; scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}
.member-card {
  scroll-snap-align: start; flex: 0 0 min(78vw, 300px); margin: 0;
  display: flex; flex-direction: column; gap: 12px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; padding: 16px 16px 13px;
}
.member-card blockquote { margin: 0; font-size: 15px; line-height: 1.5; color: var(--text); }
.member-card figcaption { margin-top: auto; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.member-card .mname { font-size: 14px; font-weight: 700; color: var(--text); }
.member-card .mname::before { content: "— "; color: var(--muted); font-weight: 400; }
.member-card .mplan {
  font-size: 14px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--accent-ink); background: var(--accent); border-radius: 999px; padding: 2px 9px;
}

/* ── G1 (2026-10-08) — scan badge: the app-side twin of the landing badge.
      Engine truth from /api/health (SCANNING / STALE / PAUSED) with a pulsing
      blip while scans run. Reduced-motion users get the states without the
      pulse. Token pairs reuse the risk levels' language: green = active,
      amber = degraded, ghost = paused. ── */
.scan-badge {
  display: inline-flex; align-items: center; gap: 7px; vertical-align: middle;
  margin-left: 10px; padding: 4px 11px; border-radius: 999px;
  font-size: 14px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase;
}
.scan-badge .blip { width: 6px; height: 6px; border-radius: 50%; flex: 0 0 auto; }
.scan-badge .scan-age { font-weight: 500; letter-spacing: .02em; text-transform: none; opacity: .85; }
.scan-badge.scan-scanning { color: var(--level-1); background: var(--level-1-bg); border: 1px solid var(--fresh-border); }
.scan-badge.scan-scanning .blip { background: var(--level-1); animation: blipPulse 1.6s ease-out infinite; }
.scan-badge.scan-stale { color: var(--level-2); background: var(--level-2-bg); border: 1px solid rgba(240, 184, 92, .45); }
.scan-badge.scan-stale .blip { background: var(--level-2); animation: blipPulseAmber 1.6s ease-out infinite; }
.scan-badge.scan-paused { color: var(--muted); background: var(--ghost-surface); border: 1px solid var(--border); }
.scan-badge.scan-paused .blip { background: var(--muted); }
@keyframes blipPulse {
  0% { box-shadow: 0 0 0 0 rgba(98, 216, 138, .55); }
  70% { box-shadow: 0 0 0 7px rgba(98, 216, 138, 0); }
  100% { box-shadow: 0 0 0 0 rgba(98, 216, 138, 0); }
}
@keyframes blipPulseAmber {
  0% { box-shadow: 0 0 0 0 rgba(240, 184, 92, .55); }
  70% { box-shadow: 0 0 0 7px rgba(240, 184, 92, 0); }
  100% { box-shadow: 0 0 0 0 rgba(240, 184, 92, 0); }
}
@media (prefers-reduced-motion: reduce) {
  .scan-badge .blip { animation: none; }
}

/* ── G1 (2026-10-09) — the I4 re-check pulse: while a live re-check is in
      flight, the detail chip carries a pulsing dot, so the gate reads as
      a price actively being re-measured — not a frozen "checking" label.
      Reuses the scan badge's green blip rhythm; reduced-motion users get
      the static label. ── */
.chip.checking::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  display: inline-block; margin-right: 7px; vertical-align: 1px;
  background: var(--level-1); animation: blipPulse 1.6s ease-out infinite;
}
@media (prefers-reduced-motion: reduce) {
  .chip.checking::before { animation: none; }
}

/* ── G2 (2026-10-08) — the paused board: night panel + promoted record. ──
   Overnight the Live board becomes the "last measured board" instead of a
   pause wall: an as-of clock chip, the honest snapshot caveat, and the
   published record promoted ahead of promos. */
.night-panel {
  border: 1px solid var(--border);
  background: var(--ghost-surface);
}
.night-clock {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px 10px;
  white-space: nowrap;
}
.night-record .v { font-variant-numeric: tabular-nums; }

/* ── G3 (2026-10-08) — the money, drawn: modeled total in vs what every
   result pays back. The visible difference between the bars is the modeled
   minimum. Bars are inline SVG (CSP-safe geometry attributes); colors come
   from these stylesheet classes. Engine numbers only. */
.pays-bars { margin-top: 10px; }
.pay-bar-head {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
/* One shared grid for both bars so the tracks align — the comparison only
   works if both bars start at the same x and run the same length. The row
   wrappers participate as grid contents. */
.pays-grid {
  display: grid;
  grid-template-columns: minmax(96px, auto) 1fr auto;
  gap: 6px 8px;
  align-items: center;
  margin-top: 6px;
}
.pay-bar-row,
.pay-bar-out { display: contents; }
.pay-bar-bk {
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
}
.pay-bar-svg {
  display: block;
  width: 100%;
  height: 10px;
}
.pay-trk { fill: var(--border); }
.pay-fill { fill: var(--accent-2); }
.pay-bar-out .pay-fill { fill: var(--accent); }
.pay-bar-out .pay-bar-amt { color: var(--accent-ink); }
.pay-bar-amt {
  font-size: 14px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* ── G5 (2026-10-08) — inline SVG icon set (matches the tab bar's stroke
   icons) replacing emoji-as-iconography: platform-dependent emoji rendering
   and informal tone gone. .ic tracks the surrounding text size/color. */
.ic {
  width: 1em;
  height: 1em;
  vertical-align: -0.13em;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}
@media (prefers-reduced-motion: no-preference) {
  .ic { transition: none; }
}
