/* Pick Winner — race detail (drill-down) page
 *
 * The site is dark-themed by default (body bg = --c-midnight).
 * Content that lives DIRECTLY on the page dark background — hero
 * title, meta line, section eyebrows, metadata rail — uses light
 * text via the base tokens (--c-text-*). Content INSIDE editorial
 * cream cards — the call, reasoning callout, slot rail, full-
 * result rows — keeps dark ink so the cream surfaces read as they
 * do everywhere else on the site.
 */

.pw-detail {
  max-width: 880px;
  margin: 0 auto;
  padding: 24px 20px 60px;
  font-family: var(--font-body, -apple-system, BlinkMacSystemFont,
                                'Segoe UI', Roboto, sans-serif);
  color: var(--c-text-75);
}

/* ── Hero (dark-page) ────────────────────────────────────────── */

.pw-detail__hero {
  border-bottom: 1px solid var(--c-border, rgba(255, 255, 255, 0.09));
  padding-bottom: 20px;
  margin-bottom: 28px;
}

.pw-detail__eyebrow {
  font-family: var(--font-display, 'Playfair Display', Georgia, serif);
  font-size: 12px;
  font-weight: 700;
  color: var(--c-text-55);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0 0 12px;
}

.pw-detail__back {
  color: var(--c-gold, #D4AF37);
  text-decoration: none;
  border-bottom: 1px dotted var(--c-border-gold, rgba(212, 175, 55, 0.28));
  padding-bottom: 1px;
}

.pw-detail__back:hover {
  color: var(--c-gold-lt, #F5D76E);
  border-bottom-color: var(--c-gold-lt, #F5D76E);
}

.pw-detail__title {
  font-family: var(--font-display, 'Playfair Display', Georgia, serif);
  font-size: 32px;
  font-weight: 700;
  line-height: 1.15;
  color: var(--c-text-100, #ECEEF5);
  margin: 0 0 12px;
  letter-spacing: -0.01em;
}

.pw-detail__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  font-size: 14px;
  color: var(--c-text-55);
  margin: 0 0 10px;
}

.pw-detail__meta-item {
  display: inline-flex;
  align-items: center;
}

.pw-detail__meta-item + .pw-detail__meta-item::before {
  content: "\00b7";
  margin-right: 14px;
  color: var(--c-text-35);
}

.pw-detail__racecard-link {
  margin: 0;
  font-size: 13px;
}
.pw-detail__racecard-link a {
  color: var(--c-gold, #D4AF37);
  text-decoration: none;
  border-bottom: 1px dotted var(--c-border-gold, rgba(212, 175, 55, 0.28));
}
.pw-detail__racecard-link a:hover { color: var(--c-gold-lt, #F5D76E); }

/* ── Section eyebrow (shared, dark-page label) ──────────────── */

.pw-detail__section-eyebrow {
  font-family: var(--font-display, 'Playfair Display', Georgia, serif);
  font-size: 11px;
  font-weight: 700;
  color: var(--c-text-55);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin: 0 0 12px;
}

/* ── Mr Fox's Call — cream card on the dark page ─────────────
 *
 * The card itself is cream (editorial), so text INSIDE reverts to
 * ink. The medal-tinted variants (won / silver / bronze) shift
 * the cream toward the medal colour without breaking legibility.
 */

.pw-detail__call {
  background: #fbf8f0;
  border: 1px solid #ebe4d3;
  border-radius: 10px;
  padding: 22px 24px;
  margin: 0 0 32px;
  color: #17171a;
}

.pw-detail__call--gold   { background: #fef7dc; border-color: #d8b860; }
.pw-detail__call--silver { background: #f4f4f0; border-color: #c8cad0; }
.pw-detail__call--bronze { background: #fbf1e4; border-color: #d4a878; }

.pw-detail__call-header {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
}

.pw-detail__call-silk .pw-hr__silk {
  width: 44px;
  height: 50px;
}

.pw-detail__horse {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 26px;
  font-weight: 700;
  line-height: 1.15;
  margin: 0 0 6px;
  color: #17171a;
  letter-spacing: -0.01em;
}

.pw-detail__call-chips {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  align-items: center;
}

.pw-detail__conf {
  padding: 3px 9px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  border-radius: 3px;
  background: #efe8d8;
  color: #4a2f1a;
}

.pw-detail__conf--high   { background: #d3ecd7; color: #1e5a2b; }
.pw-detail__conf--medium { background: #f8e9b8; color: #6a4510; }
.pw-detail__conf--low    { background: #e8e2d2; color: #6a5940; }

.pw-detail__price {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 4px;
  font-family: 'JetBrains Mono', 'SF Mono', ui-monospace, Consolas, monospace;
  font-variant-numeric: tabular-nums;
  font-size: 12px;
  font-weight: 700;
}

.pw-detail__price--advised {
  background: #f0e9d8;
  border: 1px solid #e0d4b5;
  color: #4a2f1a;
}
.pw-detail__price--sp {
  background: linear-gradient(180deg, #f8e9b8, #e8cf87);
  border: 1px solid #d8b860;
  color: #6a4510;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4);
}
.pw-detail__price--prob {
  background: #eaf1fb;
  border: 1px solid #b8cae0;
  color: #234a80;
}

.pw-detail__call-result {
  justify-self: end;
}

/* ── Reasoning callout — cream card, ink text ───────────────── */

.pw-detail__reasoning {
  margin: 20px 0 8px;
  padding: 16px 20px;
  background: #fff;
  border-left: 3px solid #7a4a25;
  border-radius: 3px;
  font-family: 'Source Serif Pro', Georgia, 'Times New Roman', serif;
}

.pw-detail__reasoning-lede {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 11px;
  font-weight: 700;
  color: #7a4a25;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0 0 6px;
}

.pw-detail__reasoning-body {
  font-size: 16px;
  line-height: 1.6;
  color: #232323;
  margin: 0;
  white-space: pre-wrap;
}

.pw-detail__verify {
  margin-top: 16px;
}

/* ── Slot list — Top 4 review ──────────────────────────────────
 *
 * The shared rp-hr__slot--{medal} classes ship with translucent
 * medal-tint backgrounds designed to overlay a cream section bg.
 * The detail page sits on the site's dark bg, so those translucent
 * tints render as dark cards with unreadable dark text.
 *
 * The scoped overrides below re-establish an opaque cream base for
 * every medal state within the detail page's slot list only —
 * other pages that use rp-hr__slot--{medal} inside their own
 * cream containers stay untouched.
 */

.pw-detail__slots {
  margin: 32px 0 0;
}

.pw-detail__slots-list .rp-hr__slot {
  padding: 10px 14px;
  color: #17171a;
  background: #fbf8f0;
  border-color: #e3ddd0;
}

.pw-detail__slots-list .rp-hr__slot--gold {
  background: #fef3d0;
  border-color: #d8b860;
}
.pw-detail__slots-list .rp-hr__slot--silver {
  background: #eff0f2;
  border-color: #c8cad0;
}
.pw-detail__slots-list .rp-hr__slot--bronze {
  background: #f8e4d1;
  border-color: #d4a878;
}
.pw-detail__slots-list .rp-hr__slot--fourth {
  background: #f3ecd8;
  border-color: #d4c48c;
}
.pw-detail__slots-list .rp-hr__slot--placed,
.pw-detail__slots-list .rp-hr__slot--pending {
  background: #fbf8f0;
  border-color: #e3ddd0;
}

.pw-detail__slots-list .rp-hr__slot-horse {
  font-size: 16px;
  color: #17171a;
}

.pw-detail__slots-list .rp-hr__slot-rank {
  color: #4a2f1a;
}

/* ── Full result — cream-card list on dark page ─────────────── */

.pw-detail__result {
  margin: 0 0 32px;
}

.pw-detail__result-note {
  font-size: 13px;
  color: var(--c-text-55);
  margin: 0 0 12px;
}

.pw-detail__result-note strong {
  color: var(--c-text-100);
  font-weight: 700;
}

.pw-detail__runners {
  list-style: none;
  padding: 0;
  margin: 0;
  border: 1px solid #ebe4d3;
  border-radius: 8px;
  overflow: hidden;
  background: #fbf8f0;
}

.pw-detail__runner {
  display: grid;
  grid-template-columns: 36px 32px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 10px 14px;
  border-bottom: 1px solid #ebe4d3;
  background: #fbf8f0;
  transition: background 0.15s;
  color: #17171a;
}

.pw-detail__runner:last-child { border-bottom: 0; }
.pw-detail__runner:hover { background: #f5eedb; }

.pw-detail__runner--fox {
  background: linear-gradient(90deg,
    rgba(216, 184, 96, 0.28) 0%,
    rgba(216, 184, 96, 0.10) 30%,
    #fbf8f0 100%);
}
.pw-detail__runner--fox:hover {
  background: linear-gradient(90deg,
    rgba(216, 184, 96, 0.36) 0%,
    rgba(216, 184, 96, 0.16) 30%,
    #f5eedb 100%);
}

.pw-detail__runner--winner {
  border-left: 3px solid #d4af37;
  padding-left: 11px;
}

.pw-detail__runner-pos {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 18px;
  font-weight: 700;
  color: #4a2f1a;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.pw-detail__runner-silk .pw-hr__silk {
  width: 30px;
  height: 34px;
}

.pw-detail__runner-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.pw-detail__runner-name {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 15px;
  font-weight: 600;
  color: #17171a;
  line-height: 1.2;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.pw-detail__fox-tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #6a4510;
  background: #f8e9b8;
  border: 1px solid #d8b860;
  border-radius: 999px;
}

.pw-detail__runner-meta {
  font-size: 11px;
  color: #7a6a55;
  letter-spacing: 0.01em;
}

.pw-detail__runner-price {
  justify-self: end;
}

/* ── Metadata rail — dark-page, light text ──────────────────── */

.pw-detail__meta-rail {
  margin: 40px 0 0;
  padding: 20px 0 0;
  border-top: 1px solid var(--c-border, rgba(255, 255, 255, 0.09));
}

.pw-detail__meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 14px 24px;
  margin: 0;
}

.pw-detail__meta-grid > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.pw-detail__meta-grid dt {
  font-family: var(--font-display, 'Playfair Display', Georgia, serif);
  font-size: 10px;
  font-weight: 700;
  color: var(--c-text-55);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.pw-detail__meta-grid dd {
  margin: 0;
  font-family: 'JetBrains Mono', 'SF Mono', ui-monospace, Consolas, monospace;
  font-size: 12px;
  color: var(--c-text-100, #ECEEF5);
  word-break: break-all;
}

/* Full Result pill styles live in pick_winner_honest_record.css so
 * they're loaded on the Honest Record page where the pill actually
 * appears. Kept nothing here to avoid drift. */

/* ── Mobile ─────────────────────────────────────────────────── */

@media (max-width: 640px) {
  .pw-detail {
    padding: 18px 14px 40px;
  }
  .pw-detail__title {
    font-size: 24px;
  }
  .pw-detail__call {
    padding: 16px;
  }
  .pw-detail__call-header {
    grid-template-columns: 40px minmax(0, 1fr);
    gap: 12px;
  }
  .pw-detail__call-silk .pw-hr__silk {
    width: 36px;
    height: 42px;
  }
  .pw-detail__call-result {
    grid-column: 1 / -1;
    justify-self: start;
  }
  .pw-detail__horse {
    font-size: 20px;
  }
  .pw-detail__reasoning-body {
    font-size: 15px;
  }
  .pw-detail__runner {
    grid-template-columns: 28px 26px minmax(0, 1fr) auto;
    gap: 10px;
    padding: 10px;
  }
  .pw-detail__runner-silk .pw-hr__silk {
    width: 24px;
    height: 28px;
  }
  .pw-detail__runner-name {
    font-size: 14px;
  }
  .pw-hr__full-result-btn {
    padding: 6px 12px;
    font-size: 11px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pw-hr__full-result-btn { transition: none; }
  .pw-hr__full-result-btn:hover { transform: none; }
  .pw-detail__runner { transition: none; }
}
