/* EdgeVisor public card styles
 *
 * Shared between landing.html (hero shelf + medium feed), dashboard.html
 * (extended/medium swap) and card.html (partner iframe). Source of truth:
 * app/static/public-hero-market-prototype.html and
 * app/static/public-market-card-prototype.html. Do NOT inline equivalents
 * in the host pages — keep this file as the only owner.
 */

:root {
  --pc-bg: #1b1b24;
  --pc-surface: #24242f;
  --pc-surface2: #2d2d3a;
  --pc-line: rgba(255, 255, 255, .095);
  --pc-text: #f1f3f9;
  --pc-muted: #a2a7b6;
  --pc-faint: #727889;
  --pc-green: #22c55e;
  --pc-red: #ef4444;
  --pc-yes: #22c55e;
  --pc-no: #fb7185;
  --pc-orange: #fb923c;
  --pc-violet: #818cf8;
  --pc-violet2: #6366f1;
  --pc-font: "Inter", system-ui, sans-serif;
  --pc-mono: "JetBrains Mono", ui-monospace, monospace;
}

/* ── Hero shelf layout (landing only) ────────────────────────────── */
.hero-shell { width: min(1500px, 100%); margin: 0 auto; }
.hero-layout {
  display: grid;
  grid-template-columns: minmax(360px, .92fr) minmax(360px, 1.08fr);
  gap: 14px;
  align-items: start;
}
.hero-panel {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--pc-line);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .035), transparent 28%), var(--pc-surface);
  box-shadow: 0 22px 64px rgba(0, 0, 0, .35), inset 0 1px 0 rgba(255, 255, 255, .05);
}
.hero-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at 20% 0%, rgba(129, 140, 248, .13), transparent 20rem);
}
.featured-wrap { position: relative; z-index: 2; padding: 8px 0 0; }
.section-head {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  padding: 15px 16px 0;
}
.section-kicker {
  margin: 0 0 4px;
  color: var(--pc-violet);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .07em;
  text-transform: uppercase;
}
.section-title {
  margin: 0;
  color: #fff;
  font-size: 17px;
  font-weight: 900;
  letter-spacing: -.04em;
  line-height: 1.18;
}
.section-hint {
  margin: 0;
  color: var(--pc-faint);
  font-size: 11px;
  line-height: 1.45;
  text-align: right;
  max-width: 22ch;
}
.side-rail {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}
.runner-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: auto;
  gap: 10px;
  padding: 10px 12px 12px;
  min-height: 0;
  flex: 0 0 auto;
}

/* ── Card shell ───────────────────────────────────────────────────── */
.market-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 720px;
  overflow: hidden;
  container-type: inline-size;
  container-name: market-card;
  border: 1px solid var(--pc-line);
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .035), transparent 22%), var(--pc-surface);
  box-shadow: 0 18px 52px rgba(0, 0, 0, .34), inset 0 1px 0 rgba(255, 255, 255, .045);
  isolation: isolate;
  color: var(--pc-text);
  font-family: var(--pc-font);
}
.market-card * { box-sizing: border-box; }
.market-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at 20% 0%, rgba(129, 140, 248, .11), transparent 18rem);
}
.market-card--extended { min-height: 720px; }
.market-card--pm { min-height: 720px; }
.market-card--pm .pm-shell { flex: 0 0 auto; padding-bottom: 0; }
.market-card--pm > .ev-band,
.market-card--pm > .payout,
.market-card--pm > .risk-note,
.market-card--pm > .actions { position: relative; z-index: 2; }
.market-card--pm .pm-stats { margin-top: 16px; }

.market-card:hover, .market-card:focus-within { z-index: 12; }

/* ── Watch button (one adaptive size on all card surfaces) ─────────── */
.watch-btn {
  --ev-watch-size: clamp(32px, 2.35rem, 38px);
  --ev-watch-icon: clamp(14px, 1rem, 17px);
  --ev-watch-radius-tr: calc(var(--ev-watch-size) * 0.38);
  --ev-watch-radius-bl: calc(var(--ev-watch-size) * 0.28);
  position: absolute;
  top: 0;
  right: 0;
  z-index: 4;
  display: grid;
  place-items: center;
  width: var(--ev-watch-size);
  height: var(--ev-watch-size);
  padding: 0;
  border: 0;
  border-left: 1px solid var(--pc-line);
  border-bottom: 1px solid var(--pc-line);
  border-radius: 0 var(--ev-watch-radius-tr) 0 var(--ev-watch-radius-bl);
  color: #bfc5d8;
  background: rgba(255, 255, 255, .045);
  cursor: pointer;
  flex-shrink: 0;
  transition: color .15s, background .15s, border-color .15s;
}
.watch-btn:hover,
.watch-btn.is-on,
.watch-btn[aria-pressed="true"] {
  color: #eab308;
  background: rgba(234, 179, 8, .14);
  border-color: rgba(234, 179, 8, .35);
}
.watch-btn svg {
  width: var(--ev-watch-icon);
  height: var(--ev-watch-icon);
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linejoin: round;
}
.watch-btn--inline {
  position: relative;
  top: auto;
  right: auto;
  border: 1px solid var(--pc-line, rgba(255, 255, 255, .12));
  border-radius: 10px;
  background: rgba(255, 255, 255, .05);
  box-shadow: 0 1px 4px rgba(0, 0, 0, .12);
}
.watch-btn .wi {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--ev-watch-icon);
  height: var(--ev-watch-icon);
  line-height: 0;
}
.watch-btn .wi-in { display: none; }
.watch-btn[aria-pressed="true"] .wi-out { display: none; }
.watch-btn[aria-pressed="true"] .wi-in { display: inline-flex; }

/* ── Body / head ──────────────────────────────────────────────────── */
.body-pad { position: relative; z-index: 2; padding: 0 18px; }
.market-head {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 14px;
  padding-top: 18px;
  padding-right: calc(var(--ev-watch-size, 36px) + 8px);
  align-items: start;
}
.market-main { min-width: 0; }
.market-thumb {
  width: 54px;
  height: 54px;
  overflow: hidden;
  border: 1px solid rgba(129, 140, 248, .34);
  border-radius: 15px;
  background: radial-gradient(circle at 70% 15%, rgba(255, 255, 255, .30), transparent 34%), linear-gradient(135deg, #31314a, #1d1d29);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, .10);
}
.market-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.market-thumb-fallback {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  color: #dfe3ff;
  font-family: var(--pc-mono);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: -.06em;
}
.market-title {
  margin: 0;
  display: grid;
  gap: 4px;
  min-height: 42px;
  padding: 8px 10px;
  border: 1px solid rgba(255, 255, 255, .075);
  border-radius: 12px;
  background: rgba(255, 255, 255, .045);
  overflow: hidden;
}
.market-title-k {
  color: var(--pc-faint);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.market-title-v {
  color: #eef1ff;
  font-size: 14px;
  font-weight: 900;
  line-height: 1.22;
  letter-spacing: -.025em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: anywhere;
}
.event-kicker {
  margin: 0 0 7px;
  min-height: 38px;
  color: #fff;
  font-size: 16px;
  font-weight: 900;
  line-height: 1.18;
  letter-spacing: -.04em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: anywhere;
}
.market-desc {
  grid-column: 1 / -1;
  min-height: 58px;
  margin: 10px 0 0;
  color: var(--pc-muted);
  font-size: 12px;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.tags {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  min-height: 33px;
  margin-top: 12px;
}
.tag {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 5px 8px;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 8px;
  color: #bfc5d8;
  background: rgba(255, 255, 255, .045);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}

/* ── Stats / outcomes ─────────────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}
.stat-tile {
  min-height: 78px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, .075);
  border-radius: 13px;
  background: rgba(255, 255, 255, .045);
}
.stat-tile span {
  display: block;
  margin-bottom: 8px;
  color: var(--pc-faint);
  font-size: 10px;
  font-weight: 900;
}
.stat-tile strong { color: #fff; font-family: var(--pc-mono); font-size: 14px; line-height: 1.35; }
.block-title {
  margin: 18px 0 10px;
  color: #fff;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: -.02em;
}
.source-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  padding: 0;
  margin-bottom: 10px;
}
.source-strip span {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 5px 8px;
  border: 1px solid rgba(255, 255, 255, .07);
  border-radius: 999px;
  color: rgba(232, 236, 255, .68);
  background: rgba(255, 255, 255, .04);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.outcomes { display: grid; gap: 8px; }
.outcome {
  display: grid;
  grid-template-columns: 44px 1fr 46px 42px;
  gap: 9px;
  align-items: center;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid rgba(255, 255, 255, .07);
  border-radius: 12px;
  background: rgba(255, 255, 255, .04);
}
.outcome-name {
  display: inline-flex;
  justify-content: center;
  min-height: 28px;
  padding: 7px 8px;
  border-radius: 9px;
  font-family: var(--pc-mono);
  font-size: 11px;
  font-weight: 900;
}
.outcome--yes .outcome-name { color: #062b17; background: rgba(34, 197, 94, .82); border: 1px solid rgba(34, 197, 94, .16); }
.outcome--no .outcome-name { color: #fff1f2; background: rgba(251, 113, 133, .42); border: 1px solid rgba(251, 113, 133, .20); }
.outcome-track { height: 8px; overflow: hidden; border-radius: 999px; background: rgba(255, 255, 255, .10); }
.outcome-track span { display: block; width: var(--w); height: 100%; border-radius: inherit; }
.outcome--yes .outcome-track span { background: linear-gradient(90deg, var(--pc-yes), #86efac); box-shadow: 0 0 16px rgba(34, 197, 94, .24); }
.outcome--no .outcome-track span { background: linear-gradient(90deg, var(--pc-no), #fecdd3); box-shadow: 0 0 16px rgba(251, 113, 133, .20); }
.outcome-prob, .outcome-price { font-family: var(--pc-mono); font-size: 11px; text-align: right; }
.outcome-prob { font-weight: 800; }
.outcome--yes .outcome-prob { color: var(--pc-yes); }
.outcome--no .outcome-prob { color: var(--pc-no); }
.outcome-price { color: var(--pc-faint); }

/* ── AI panel ─────────────────────────────────────────────────────── */
.ai-panel {
  margin-top: 14px;
  padding: 12px;
  overflow: hidden;
  border: 1px solid rgba(129, 140, 248, .26);
  border-radius: 18px;
  background:
    radial-gradient(circle at 8% 0%, rgba(129, 140, 248, .26), transparent 11rem),
    linear-gradient(180deg, rgba(37, 37, 53, .94), rgba(28, 28, 40, .98));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), 0 14px 34px rgba(0, 0, 0, .18);
}
.ai-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(96px, .45fr);
  gap: 9px;
  align-items: stretch;
  margin-bottom: 9px;
}
.ai-head > div {
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid rgba(255, 255, 255, .075);
  border-radius: 14px;
  background: rgba(255, 255, 255, .045);
}
.ai-label {
  margin: 0 0 3px;
  color: rgba(232, 236, 255, .62);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.ai-pick {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 5px 12px;
  border-radius: 999px;
  color: #fff;
  background: rgba(34, 197, 94, .16);
  box-shadow: inset 0 0 0 1px rgba(34, 197, 94, .26);
  font-family: var(--pc-mono);
  font-size: 18px;
  font-weight: 900;
}
.ai-pick.side-no { color: #ffe4e9; background: rgba(251, 113, 133, .16); box-shadow: inset 0 0 0 1px rgba(251, 113, 133, .28); }
.ai-conf { text-align: right; }
.ai-conf strong { display: block; color: #d9dcff; font-family: var(--pc-mono); font-size: 20px; line-height: 1.15; }
.ai-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.ai-metric {
  min-height: 62px;
  padding: 11px 10px;
  border: 1px solid rgba(255, 255, 255, .07);
  border-radius: 13px;
  background: rgba(16, 18, 27, .42);
}
.ai-metric span {
  display: block;
  margin-bottom: 5px;
  color: rgba(232, 236, 255, .58);
  font-size: 9px;
  font-weight: 900;
}
.ai-metric strong { color: #fff; font-family: var(--pc-mono); font-size: 13px; line-height: 1.25; overflow-wrap: anywhere; }
.ai-metric .edge-down { color: #fb7185 !important; }
.ai-metric .edge-up { color: var(--pc-green) !important; }
.ai-analysis {
  margin: 10px 0 0;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, .06);
  border-radius: 13px;
  color: rgba(242, 244, 255, .82);
  background: rgba(255, 255, 255, .035);
  font-size: 12px;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ── PM trade row (medium card) ───────────────────────────────────── */
.pm-trade-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 6px;
  margin: 12px 0 8px;
  padding-top: 10px;
}
.pm-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 42px;
  padding: 0 14px;
  border-radius: 8px;
  border: none;
  cursor: default;
}
.pm-btn-label { font-size: 14px; font-weight: 600; }
.pm-btn-price { font-family: var(--pc-font); font-size: 14px; font-weight: 600; line-height: 1; }
.pm-btn--yes { color: #fff; background: #2d9f6f; }
.pm-btn--yes:hover { background: #34b37d; }
.pm-btn--no { color: #f4f6fb; background: rgba(255, 255, 255, .10); border: 1px solid rgba(255, 255, 255, .12); }
.pm-btn--no:hover { background: rgba(255, 255, 255, .14); }
.pm-btn.is-alt { opacity: .55; filter: saturate(.78); }
.pm-btn.is-recommended { opacity: 1; filter: none; z-index: 1; }
.pm-btn--yes.is-recommended { box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .65); }
.pm-btn--no.is-recommended {
  color: #fff1f2;
  background: linear-gradient(135deg, #e11d48, #fb7185);
  border: 1px solid rgba(255, 255, 255, .18);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .55);
}
.pm-pick-badge {
  position: absolute;
  top: 0;
  left: 50%;
  z-index: 2;
  transform: translate(-50%, -50%);
  padding: 2px 7px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .35);
  color: #fff;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: .05em;
  text-transform: uppercase;
  background: linear-gradient(135deg, #6966f7, #6366f1);
  box-shadow: 0 2px 10px rgba(99, 102, 241, .4);
  white-space: nowrap;
  pointer-events: none;
}

/* Catalog (All Markets): both YES/NO show Polymarket-active colors — no is-alt dimming */
.pm-trade-row--catalog .pm-btn--yes {
  color: #fff;
  background: #2d9f6f;
  opacity: 1;
  filter: none;
}
.pm-trade-row--catalog .pm-btn--no {
  color: #fff1f2;
  background: linear-gradient(135deg, #e11d48 0%, #fb7185 100%);
  border: 1px solid rgba(255, 255, 255, .18);
  opacity: 1;
  filter: none;
}
.runner-prices--catalog .runner-price--yes {
  background: rgba(45, 159, 111, .22);
  border-color: rgba(34, 197, 94, .38);
}
.runner-prices--catalog .runner-price--yes strong { color: #4ade80; }
.runner-prices--catalog .runner-price--no {
  background: rgba(225, 29, 72, .18);
  border-color: rgba(251, 113, 133, .38);
}
.runner-prices--catalog .runner-price--no strong { color: #fda4af; }
.runner-prices--catalog .runner-price {
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, .1);
  text-align: center;
}
.runner-prices--catalog .runner-price span {
  display: block;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--pc-faint, rgba(255, 255, 255, .55));
}
.runner-prices--catalog .runner-price strong {
  display: block;
  margin-top: 4px;
  font-family: var(--pc-font);
  font-size: 15px;
  font-weight: 800;
}

.pm-venue-note { margin: 0 0 10px; color: var(--pc-faint); font-size: 9px; font-weight: 600; text-align: center; }

/* ── EV band (medium analysis section) ────────────────────────────── */
.ev-band {
  margin: 0 14px 12px;
  padding: 12px 13px;
  border: 1px solid rgba(99, 102, 241, .28);
  border-left: 3px solid var(--pc-violet2);
  border-radius: 12px;
  background: linear-gradient(90deg, rgba(99, 102, 241, .14), rgba(99, 102, 241, .06));
}
.ev-band-kicker {
  margin: 0 0 8px;
  color: #c7d2fe;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.ev-band-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}
.ev-band-pick-col { min-width: 0; flex: 1 1 auto; }
.ev-band-pick-line { margin: 0; color: #eef1ff; font-size: 13px; font-weight: 800; line-height: 1.35; }
.ev-band-pick { display: inline-flex; align-items: center; gap: 8px; }
.ev-band-pick .rec-side { min-height: 26px; padding: 4px 10px; font-size: 14px; }
.ev-band-leg {
  display: block;
  margin-top: 6px;
  color: #f4f6ff;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.35;
  letter-spacing: -.02em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ev-band-leg > span { color: var(--pc-muted); font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; }
.market-card--pm .ev-band-head { align-items: flex-start; }
.ev-band-conf { flex-shrink: 0; color: #d9dcff; font-family: var(--pc-mono); font-size: 12px; font-weight: 700; white-space: nowrap; }
.ev-band-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 8px;
}
.ev-band-metrics div {
  min-width: 0;
  padding: 6px 7px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, .075);
  background: rgba(255, 255, 255, .045);
}
.ev-band-metrics span {
  display: block;
  margin-bottom: 2px;
  color: var(--pc-faint);
  font-size: 8px;
  font-weight: 900;
  text-transform: uppercase;
}
.ev-band-metrics strong { font-family: var(--pc-mono); font-size: 11px; color: #fff; }
.ev-band-thesis {
  margin: 0;
  color: rgba(242, 244, 255, .78);
  font-size: 11px;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.market-card--pm .ev-band { flex: 0 0 auto; margin: 14px 20px 0; padding: 12px 13px; }
.market-card--pm .ev-band-thesis { font-size: 12px; line-height: 1.55; -webkit-line-clamp: 3; line-clamp: 3; }
.market-card--pm .risk-note { flex: 0 0 auto; margin: 10px 20px 0; }
.market-card--pm .actions {
  flex-shrink: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 16px 20px 20px;
  border-top: 1px solid var(--pc-line);
  background: rgba(255, 255, 255, .025);
}
.market-card--pm .small-btn.accent { grid-column: 1 / -1; min-height: 38px; }
.market-card--pm .venue-btn.small-btn,
.market-card--pm a.small-btn[data-external-exit] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  text-decoration: none;
}
.market-card--pm .venue-btn {
  order: 2;
  background: transparent;
  color: #d5daf0;
  border: 1px solid rgba(255, 255, 255, .14);
  box-shadow: none;
}
.market-card--pm .small-btn.accent {
  order: 1;
  grid-column: 1 / -1;
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, #6966f7, #6366f1);
  box-shadow: 0 8px 22px rgba(99, 102, 241, .28);
}

/* ── Recommendation banner (extended cards) ───────────────────────── */
.rec {
  position: relative;
  z-index: 2;
  min-height: 110px;
  margin: 16px 20px 0;
  padding: 16px;
  border: 1px solid rgba(129, 140, 248, .32);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(99, 102, 241, .22), rgba(99, 102, 241, .13));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .055);
}
.rec-title { margin: 0; color: #e6e8ff; font-size: 13px; font-weight: 800; line-height: 1.45; }
.rec-view { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; color: #e6e8ff; font-size: 13px; font-weight: 900; }
.rec-side {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 6px 12px;
  border-radius: 999px;
  font-family: var(--pc-mono);
  font-size: 19px;
  font-weight: 900;
  line-height: 1;
}
.rec-side.side-yes { color: #062b17; background: linear-gradient(135deg, #22c55e, #86efac); box-shadow: 0 8px 22px rgba(34, 197, 94, .18); }
.rec-side.side-no { color: #fff1f2; background: linear-gradient(135deg, #e11d48, #fb7185); box-shadow: 0 8px 22px rgba(251, 113, 133, .18); }
.rec-option { display: block; margin-top: 9px; color: #f4f6ff; font-size: 15px; font-weight: 900; line-height: 1.35; letter-spacing: -.02em; }
.rec-option span { color: var(--pc-muted); font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; }
.price-risk { display: inline-flex; margin-top: 10px; color: #c4c8ff; border-bottom: 1px dotted rgba(196, 200, 255, .75); font-size: 12px; font-weight: 800; }
.risk-note {
  position: relative;
  z-index: 2;
  margin: 10px 20px 0;
  color: var(--pc-faint);
  font-size: 10px;
  font-weight: 600;
  line-height: 1.45;
}
.exit { position: relative; z-index: 2; min-height: 116px; padding: 18px 20px 0; color: var(--pc-muted); font-size: 13px; line-height: 1.62; }
.exit strong { display: block; margin-bottom: 6px; color: #d8dcff; }
.exit ul { margin: 0; padding-left: 16px; }

/* ── Payout footer ────────────────────────────────────────────────── */
.payout {
  position: relative;
  z-index: 2;
  margin-top: auto;
  padding: 14px 20px 16px;
  color: var(--pc-muted);
  font-size: 11px;
  border-top: 1px solid var(--pc-line);
}
.payout-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
  color: #e8ebff;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.payout-head strong {
  flex: 1 1 auto;
  min-width: 0;
  max-width: 55%;
  color: #ebfef2;
  font-family: var(--pc-mono);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.payout-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  width: 100%;
}
@container market-card (min-width: 380px) {
  .payout-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.payout-grid div {
  min-width: 0;
  min-height: 36px;
  padding: 6px 8px;
  border: 1px solid rgba(255, 255, 255, .06);
  border-radius: 8px;
  background: rgba(16, 18, 27, .3);
}
.payout-grid span {
  display: block;
  margin-bottom: 3px;
  color: var(--pc-faint);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: .05em;
  text-transform: uppercase;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.payout-grid strong {
  display: block;
  color: #eef1ff;
  font-family: var(--pc-mono);
  font-size: 11px;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.payout-grid strong.payout-up { color: var(--pc-yes); }

/* ── Actions / buttons ────────────────────────────────────────────── */
.actions {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 16px 20px 20px;
  border-top: 1px solid var(--pc-line);
  background: rgba(255, 255, 255, .025);
}
.venue-btn {
  grid-column: 1 / -1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  border: 0;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(135deg, #6966f7, #6366f1);
  box-shadow: 0 12px 28px rgba(99, 102, 241, .34);
  font-size: 16px;
  font-weight: 900;
  cursor: pointer;
  text-decoration: none;
}
.small-btn {
  min-height: 48px;
  border: 1px solid var(--pc-line);
  border-radius: 13px;
  color: #dfe2ef;
  background: rgba(22, 22, 31, .58);
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}
.small-btn:hover { color: #fff; border-color: rgba(129, 140, 248, .36); background: rgba(99, 102, 241, .11); }
.small-btn.accent { color: var(--pc-violet); }

/* ── Featured card (hero left panel, denser) ──────────────────────── */
.featured-card {
  flex: 0 0 auto;
  height: auto;
  min-height: 0;
  margin: 8px 10px 10px;
  padding-bottom: 0;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .035), transparent 22%), var(--pc-surface);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .045);
}
.featured-card .market-desc { display: none; }
.featured-card .tags { display: flex; gap: 5px; min-height: 0; margin-top: 8px; }
.featured-card .tag { min-height: 19px; padding: 2px 7px; border-radius: 999px; font-size: 8px; font-weight: 800; }
.featured-card .stats-grid { margin-top: 8px; gap: 6px; }
.featured-card .stat-tile { min-height: 40px; padding: 6px 7px; border-radius: 10px; }
.featured-card .stat-tile span { margin-bottom: 3px; font-size: 8px; }
.featured-card .stat-tile strong { font-size: 10px; }
.featured-card .block-title { margin: 8px 0 5px; font-size: 10px; }
.featured-card .outcomes { gap: 5px; }
.featured-card .outcome { min-height: 28px; padding: 4px 6px; }
.featured-card .outcome-name { min-height: 20px; padding: 4px 5px; font-size: 8px; }
.featured-card .outcome-prob { font-size: 9px; }
.featured-card .ai-panel { margin-top: 7px; padding: 7px; border-radius: 10px; }
.featured-card .source-strip { gap: 5px; margin-bottom: 6px; }
.featured-card .source-strip span { min-height: 17px; padding: 2px 6px; font-size: 7px; }
.featured-card .ai-head { grid-template-columns: minmax(0, 1fr) 78px; gap: 6px; margin-bottom: 6px; }
.featured-card .ai-head > div { padding: 6px 7px; border-radius: 9px; }
.featured-card .ai-label { font-size: 7px; margin-bottom: 2px; }
.featured-card .ai-pick { min-height: 22px; padding: 3px 7px; font-size: 12px; }
.featured-card .ai-conf strong { font-size: 13px; }
.featured-card .ai-metrics { gap: 5px; }
.featured-card .ai-metric { min-height: 36px; padding: 6px; border-radius: 9px; }
.featured-card .ai-metric span { margin-bottom: 2px; font-size: 7px; }
.featured-card .ai-metric strong { font-size: 9px; }
.featured-card .ai-analysis { margin: 6px 0 0; padding: 6px 8px; font-size: 10px; line-height: 1.4; border-radius: 9px; -webkit-line-clamp: 2; line-clamp: 2; }
.featured-card .rec { margin: 7px 12px 0; padding: 7px 8px; border-radius: 10px; }
.featured-card .rec-title { font-size: 10px; line-height: 1.25; }
.featured-card .rec-view { gap: 5px; font-size: 10px; }
.featured-card .rec-side { min-height: 20px; padding: 3px 7px; font-size: 11px; }
.featured-card .rec-option { margin-top: 4px; font-size: 11px; }
.featured-card .price-risk { display: none; }
.featured-card .risk-note { display: none; }
.featured-card .payout { padding: 7px 12px; font-size: 10px; }
.featured-card .payout-head { margin-bottom: 5px; font-size: 9px; }
.featured-card .payout-head strong { font-size: 10px; }
.featured-card .payout-grid { gap: 5px; }
.featured-card .payout-grid div { min-height: 28px; padding: 4px 5px; border-radius: 7px; }
.featured-card .payout-grid span { margin-bottom: 1px; font-size: 6px; }
.featured-card .payout-grid strong { font-size: 9px; }
.featured-card .actions { gap: 5px; padding: 7px 12px 9px; }
.featured-card .venue-btn { min-height: 32px; border-radius: 9px; font-size: 11px; }
.featured-card .small-btn { min-height: 28px; border-radius: 8px; font-size: 9px; }

/* ── Runner card (hero side rail) ─────────────────────────────────── */
.runner-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 236px;
  height: auto;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--pc-line);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .035), transparent 22%), var(--pc-surface2);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04);
  color: var(--pc-text);
  font-family: var(--pc-font);
}
.runner-card-shell { display: flex; flex-direction: column; min-height: 0; height: auto; }
.runner-card.is-locked .runner-card-shell {
  filter: blur(2px);
  opacity: .52;
  pointer-events: none;
}
.runner-card--locked-teaser .runner-card-shell,
.market-card--locked-teaser .body-pad {
  filter: none;
  opacity: 1;
  pointer-events: none;
}
.market-card.is-locked {
  position: relative;
  overflow: hidden;
}
.market-card.is-locked .body-pad {
  filter: blur(2px);
  opacity: .52;
  pointer-events: none;
}
.market-card.is-locked .runner-lock {
  display: flex;
}
.market-card--locked-teaser,
.runner-card--locked-teaser {
  position: relative;
  min-height: 236px;
}
.market-card--locked-teaser.market-card--pm {
  min-height: 420px;
}
.market-thumb-jdenticon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}
.market-thumb-jdenticon svg {
  width: 100%;
  height: 100%;
  border-radius: inherit;
}
.locked-teaser-ph {
  margin-top: 12px;
  display: grid;
  gap: 10px;
  opacity: .35;
  pointer-events: none;
}
.locked-teaser-ph span,
.locked-teaser-ph__block {
  display: block;
  border-radius: 8px;
  background: rgba(255, 255, 255, .08);
}
.locked-teaser-ph__stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.locked-teaser-ph__stats span { min-height: 38px; }
.locked-teaser-ph__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.locked-teaser-ph__row span { min-height: 44px; }
.locked-teaser-ph__band {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.locked-teaser-ph__band span { min-height: 52px; }
.locked-teaser-ph__block { min-height: 72px; }
.locked-teaser-ph__block--tall { min-height: 96px; }
.locked-teaser-ph--runner .locked-teaser-ph__meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.locked-teaser-ph--runner .locked-teaser-ph__meta span {
  min-height: 10px;
  min-width: 42px;
}
.locked-teaser-ph--runner .locked-teaser-ph__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.locked-teaser-ph--runner .locked-teaser-ph__grid span { min-height: 34px; }
.runner-lock {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 6px;
  padding: 10px;
  text-align: center;
  background: rgba(12, 12, 20, .38);
  z-index: 4;
}
.runner-card.is-locked .runner-lock { display: flex; }
.runner-lock strong { color: #fff; font-size: 11px; font-weight: 900; }
.runner-lock span { color: var(--pc-muted); font-size: 9px; line-height: 1.35; max-width: 22ch; }
.runner-lock .small-btn {
  min-height: 24px;
  padding: 0 9px;
  font-size: 9px;
  border-radius: 7px;
  color: var(--pc-violet);
  background: rgba(99, 102, 241, .14);
}
.runner-body { padding: 9px 9px 8px; }
.runner-head {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  padding-right: calc(var(--ev-watch-size, 34px) + 4px);
}
.runner-card .market-thumb { width: 32px; height: 32px; border-radius: 9px; }
.runner-event {
  min-height: 26px;
  margin: 0 0 4px;
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  line-height: 1.28;
  letter-spacing: -.03em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: anywhere;
}
.runner-leg {
  margin: 0;
  color: var(--pc-muted);
  font-size: 9px;
  font-weight: 800;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.runner-meta { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 7px; }
.runner-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 18px;
  padding: 0 6px;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 999px;
  color: #d5daf0;
  background: rgba(16, 18, 27, .34);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .02em;
}
.runner-signal {
  margin-top: 7px;
  padding: 6px 7px;
  border: 1px solid rgba(129, 140, 248, .22);
  border-radius: 8px;
  background: rgba(99, 102, 241, .10);
}
.runner-signal-top { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-bottom: 4px; }
.runner-view-kicker { color: var(--pc-faint); font-size: 7px; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; }
.runner-signal .rec-side { min-height: 18px; padding: 2px 6px; font-size: 10px; }
.runner-signal-option {
  margin: 0;
  color: #f0f3ff;
  font-size: 9px;
  font-weight: 800;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.runner-signal-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; margin-top: 5px; }
.runner-signal-grid div {
  min-height: 32px;
  padding: 5px 6px;
  border: 1px solid rgba(255, 255, 255, .065);
  border-radius: 8px;
  background: rgba(16, 18, 27, .34);
}
.runner-signal-grid span {
  display: block;
  margin-bottom: 2px;
  color: var(--pc-faint);
  font-size: 7px;
  font-weight: 900;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.runner-signal-grid strong { color: #fff; font-family: var(--pc-mono); font-size: 9px; overflow-wrap: anywhere; }
.runner-payout { margin-top: 5px; padding: 5px 6px; border: 1px solid rgba(255, 255, 255, .065); border-radius: 8px; background: rgba(16, 18, 27, .32); }
.runner-payout-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 4px;
  color: var(--pc-faint);
  font-size: 7px;
  font-weight: 900;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.runner-payout-head strong { color: #ebfef2; font-family: var(--pc-mono); font-size: 9px; letter-spacing: 0; text-transform: none; }
.runner-payout-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; }
.runner-payout-grid div { min-height: 28px; padding: 4px 5px; border: 1px solid rgba(255, 255, 255, .055); border-radius: 7px; background: rgba(255, 255, 255, .02); }
.runner-payout-grid span { display: block; margin-bottom: 1px; color: var(--pc-faint); font-size: 6px; font-weight: 900; letter-spacing: .04em; text-transform: uppercase; }
.runner-payout-grid strong { color: #e9ecff; font-family: var(--pc-mono); font-size: 8px; line-height: 1.1; }
.runner-payout-grid strong.payout-up { color: var(--pc-yes); }
.runner-foot {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-top: auto;
  padding: 8px;
  border-top: 1px solid rgba(255, 255, 255, .06);
}
.runner-foot .venue-btn { grid-column: auto; min-height: 28px; border-radius: 8px; font-size: 9px; box-shadow: none; }
.runner-foot .small-btn { min-height: 28px; border-radius: 8px; font-size: 9px; }

/* ── Partner teaser: lock direction on PublicCard without markup swap ─ */
html[data-mode="teaser"] .market-card--pm .ev-band-pick strong,
html[data-mode="teaser"] .market-card--extended .rec-side {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 4.5rem;
  color: transparent !important;
  background: none !important;
  -webkit-text-fill-color: transparent;
  filter: blur(5px);
  user-select: none;
  pointer-events: none;
}
html[data-mode="teaser"] .market-card--pm .ev-band-pick strong::after,
html[data-mode="teaser"] .market-card--extended .rec-side::after {
  content: "LOCKED";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #e8e8ed;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  filter: none;
  -webkit-text-fill-color: #e8e8ed;
  background: rgba(99, 102, 241, 0.2);
  border: 1px solid rgba(129, 140, 248, 0.35);
  border-radius: 999px;
}
html[data-mode="teaser"] .market-card--pm .ev-band-thesis,
html[data-mode="teaser"] .market-card--extended .ai-analysis,
html[data-mode="teaser"] .market-card--extended > .payout {
  display: none;
}
html[data-mode="teaser"] .market-card--pm .pm-venue-note {
  font-size: 9px;
}

/* ── Density variants for partner embed presets ───────────────────── */
.market-card[data-density="micro"] { min-height: 0; }
.market-card[data-density="micro"] .body-pad { padding: 0 12px; }
.market-card[data-density="micro"] .market-head { padding-top: 12px; padding-right: 28px; gap: 10px; grid-template-columns: 38px minmax(0, 1fr); }
.market-card[data-density="micro"] .market-thumb { width: 38px; height: 38px; border-radius: 11px; }
.market-card[data-density="micro"] .event-kicker { font-size: 12px; min-height: 0; }
.market-card[data-density="micro"] .market-title { padding: 6px 8px; min-height: 0; }
.market-card[data-density="micro"] .market-title-v { font-size: 12px; }
.market-card[data-density="micro"] .stats-grid { gap: 6px; margin-top: 8px; }
.market-card[data-density="micro"] .stat-tile { min-height: 48px; padding: 8px; }
.market-card[data-density="micro"] .actions { padding: 10px 12px; }

.market-card[data-density="short"] { min-height: 0; }
.market-card[data-density="tall"] { min-height: 800px; }
.market-card[data-density="feed"] { min-height: 0; height: auto; }
.market-card--pm[data-density="feed"] { min-height: 0; height: auto; }
.market-title--single { min-height: 0; }
.market-title--single .market-title-v { -webkit-line-clamp: 3; line-clamp: 3; }

/* ── Mobile breakpoints (mirrored from prototype) ─────────────────── */
@media (max-width: 1320px) {
  .hero-layout { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
  .market-card, .market-card--pm, .market-card--extended { min-height: 0; }
  .market-card--pm .pm-shell { padding-bottom: 2px; }
  .market-card--pm .pm-trade-row { margin: 10px 0 6px; }
  .market-card--pm .ev-band { margin: 12px 14px 0; padding: 10px 11px; }
  .market-card--pm .risk-note { margin: 8px 14px 0; }
  .market-card--pm > .payout { margin-top: 10px; padding: 12px 14px 14px; }
  .market-card--pm .payout-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .market-card--pm .ev-band-head { flex-direction: column; align-items: stretch; gap: 6px; }
  .market-card--pm .ev-band-conf { align-self: flex-start; font-size: 11px; }
  .market-card--pm .actions { grid-template-columns: 1fr; gap: 8px; padding: 12px 14px 16px; }
  .market-card--pm .small-btn.accent { grid-column: 1; }
  .market-head { grid-template-columns: 46px 1fr; gap: 12px; padding-top: 16px; padding-right: 34px; }
  .market-thumb { width: 46px; height: 46px; border-radius: 13px; }
  .stats-grid { grid-template-columns: 1fr; }
  .outcome { grid-template-columns: 44px 1fr 42px; }
  .outcome-price { display: none; }
}
@media (max-width: 480px) {
  .body-pad { padding: 0 14px; }
  .market-card { border-radius: 18px; }
  .stats-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; margin-top: 13px; }
  .stat-tile { min-height: 62px; padding: 9px 7px; border-radius: 11px; }
  .ai-panel { margin-top: 12px; padding: 10px; border-radius: 16px; }
  .ai-metric { min-height: 58px; padding: 9px; border-radius: 12px; }
  .market-card--pm .ev-band { margin-left: 12px; margin-right: 12px; }
  .market-card--pm > .payout { padding-left: 12px; padding-right: 12px; }
  .market-card--pm .actions { padding-left: 12px; padding-right: 12px; }
  .market-card--pm .ev-band-metrics { grid-template-columns: 1fr; }
}
