/* Pick Winner — Honest Record
 *
 * Layers on top of horses_to_watch_honest_record.css (shared chip
 * vocab: won-flag / placed-flag / pos / pending) and race_paper_
 * honest_record.css (row layout: meta / pick / result / verify).
 *
 * Only page-specific tweaks live here.
 */

/* Primary pick sub-highlight — a subtle outline on rank 1 so the
 * "load-bearing" selection is spotable at a glance. The row tint
 * already conveys the overall result; this adds a second layer of
 * scannability for the reader who wants to know how the PRIMARY
 * (not just any-of-4) did on the day. */
.rp-hr__slot.pw-hr__slot--primary {
  outline: 2px solid rgba(139, 90, 43, 0.35);
  outline-offset: -1px;
}

/* Conviction line — the middle column doesn't carry a horse
 * (that's now in the top-4 strip), so we just show confidence +
 * advised price + SP. Keep the label + line the same visual weight
 * as papers' pick line for consistency. */
.pw-hr__conviction-line {
  padding-top: 8px;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  margin-top: 6px;
}

/* Slot layout override — add a silk column between rank and body
 * so the four picks read like a runner card: rank · silk · name +
 * price · result chip. Shared .rp-hr__slot ships as 3-col; we
 * re-declare grid-template-columns here to insert the silk. */
.rp-hr__slot {
  grid-template-columns: 22px 26px minmax(0, 1fr) auto;
  padding: 8px 12px;
}

/* Silk glyph — matches the racecard silk shape but sized for the
 * slot rail. Stroke gives a hairline outline that reads on cream. */
.pw-hr__slot-silk {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 26px;
}

.pw-hr__silk {
  width: 26px;
  height: 30px;
  display: block;
  filter: drop-shadow(0 1px 0 rgba(0, 0, 0, 0.05));
}

.pw-hr__silk--img {
  object-fit: contain;
  border-radius: 2px;
  background: #fff;
}

/* Slot body — stacks the horse name on top of the price line so a
 * long horse name doesn't compete with the price for horizontal
 * space. */
.pw-hr__slot-body {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

/* Horse name — bumped one weight class + tighter tracking so the
 * name is unambiguously the primary asset on the slot. Colour
 * stays site-editorial ink. */
.rp-hr__slot .rp-hr__slot-horse {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.005em;
  line-height: 1.2;
  color: #17171a;
}

/* Price line — advised (tipped) on the left, SP (settled) on the
 * right, separated by a small arrow when both exist. Tabular
 * numerals so 5/1 and 11/10 line up cleanly on stacked slots. */
.pw-hr__slot-prices {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: 'JetBrains Mono', 'SF Mono', ui-monospace, Consolas, monospace;
  font-variant-numeric: tabular-nums;
  font-size: 12px;
  letter-spacing: 0;
}

.pw-hr__price {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: 4px;
  font-weight: 700;
  line-height: 1.4;
}

.pw-hr__price--advised {
  color: #4a2f1a;
  background: #f0e9d8;
  border: 1px solid #e0d4b5;
}

.pw-hr__price--sp {
  color: #6a4510;
  background: linear-gradient(180deg, #f8e9b8, #e8cf87);
  border: 1px solid #d8b860;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.pw-hr__price-arrow {
  color: #a8967a;
  font-size: 11px;
  font-family: system-ui, -apple-system, sans-serif;
}

@media (max-width: 640px) {
  .rp-hr__slot {
    grid-template-columns: 20px 24px minmax(0, 1fr) auto;
    gap: 8px;
    padding: 7px 10px;
  }
  .pw-hr__silk {
    width: 24px;
    height: 28px;
  }
  .rp-hr__slot .rp-hr__slot-horse {
    font-size: 14px;
  }
  .pw-hr__slot-prices {
    font-size: 11px;
    gap: 5px;
  }
  .pw-hr__price {
    padding: 2px 6px;
  }
}

/* ── Date filter bar ──────────────────────────────────────────
 *
 * Pills + native <input type="date"> on the same row. Wraps to
 * multiple lines on narrow viewports. Active pill uses the site's
 * navy for maximum contrast; hover subtle. Native date picker
 * inherits the browser's UI which is a WIN on mobile (system
 * picker beats any bespoke one for touch).
 */

.pw-hr__filters {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 20px 0 28px;
  padding: 12px 14px;
  background: #fbf8f0;
  border: 1px solid #e3ddd0;
  border-radius: 6px;
}

.pw-hr__filter-label {
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #8b5a2b;
  margin-right: 4px;
}

.pw-hr__pill {
  display: inline-flex;
  align-items: center;
  padding: 7px 14px;
  background: #fff;
  border: 1px solid #e3ddd0;
  border-radius: 999px;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 12.5px;
  font-weight: 600;
  color: #4a4a52;
  letter-spacing: 0.01em;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease,
              border-color 0.15s ease;
  white-space: nowrap;
}

.pw-hr__pill:hover {
  background: #f5efdf;
  border-color: #c8bfa8;
  color: #17171a;
}

.pw-hr__pill.is-active {
  background: #0b1e39;    /* honest-record navy */
  color: #f5e9c5;
  border-color: #0b1e39;
  cursor: default;
  pointer-events: none;
}

/* Date-picker form — sits on the right on desktop, wraps below
 * the pills on mobile. Native input for zero JS + first-class
 * mobile date wheel. */
.pw-hr__date-form {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}

.pw-hr__date-lbl {
  font-family: system-ui, sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #6a6a72;
}

.pw-hr__date-input {
  padding: 6px 10px;
  border: 1px solid #c8bfa8;
  border-radius: 5px;
  font-family: system-ui, sans-serif;
  font-size: 13px;
  color: #17171a;
  background: #fff;
  min-width: 130px;
}

.pw-hr__date-input:focus-visible {
  outline: 2px solid #8b5a2b;
  outline-offset: 1px;
  border-color: #8b5a2b;
}

.pw-hr__date-btn {
  padding: 6px 14px;
  background: #8b5a2b;
  color: #fff;
  border: 1px solid #8b5a2b;
  border-radius: 5px;
  font-family: system-ui, sans-serif;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.15s;
}

.pw-hr__date-btn:hover { background: #6a4520; border-color: #6a4520; }

@media (max-width: 640px) {
  .pw-hr__filters {
    padding: 12px;
    gap: 6px;
  }
  .pw-hr__pill {
    padding: 6px 11px;
    font-size: 12px;
  }
  .pw-hr__date-form {
    margin-left: 0;
    flex-basis: 100%;
    padding-top: 8px;
    border-top: 1px solid #e3ddd0;
    justify-content: flex-start;
    flex-wrap: wrap;
  }
  .pw-hr__date-input { min-width: 0; flex: 1 1 auto; }
}

/* ────────────────────────────────────────────────────────────────
   Honest Record split view — tab nav, meeting chip strip, scope
   PR-B established the shape; PR-C is the polish pass — tighter
   typography, calmer active states, mobile edge-fade + scroll-snap
   ──────────────────────────────────────────────────────────────── */

.pw-hr__tabs {
  display: flex;
  gap: 0;
  margin: 22px 0 0;
  border-bottom: 1px solid #e3ddd0;
}

.pw-hr__tab {
  padding: 11px 20px 13px;
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 15px;
  font-weight: 600;
  color: #8a7960;
  letter-spacing: 0.005em;
  text-decoration: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color 0.18s ease, border-color 0.18s ease;
}

.pw-hr__tab:hover { color: #4a2f1a; }

.pw-hr__tab.is-active {
  color: #4a2f1a;
  border-bottom-color: #7a4a25;
}

/* Meetings strip — quieter surface so the race rows below stay
   the visual centre of gravity. */
.pw-hr__meetings {
  margin: 18px 0 6px;
  padding: 12px 14px;
  background: #fbf7ed;
  border: 1px solid #ebe4d3;
  border-radius: 10px;
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
}

.pw-hr__meetings-lbl {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 12px;
  font-weight: 700;
  color: #5a4a35;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  flex: 0 0 auto;
}

.pw-hr__meetings-strip {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  flex: 1 1 auto;
  min-width: 0;
}

.pw-hr__chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: #4a2f1a;
  background: #fff;
  border: 1px solid #d8cfbc;
  border-radius: 999px;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease,
              box-shadow 0.15s ease, transform 0.12s ease;
}

.pw-hr__chip:hover {
  background: #fff;
  border-color: #b89268;
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(74, 47, 26, 0.10);
}

.pw-hr__chip.is-active {
  background: #4a2f1a;
  border-color: #4a2f1a;
  color: #fff;
  box-shadow: 0 2px 8px rgba(74, 47, 26, 0.22);
}

.pw-hr__chip-count {
  display: inline-block;
  min-width: 18px;
  padding: 1px 6px;
  font-size: 11px;
  font-weight: 700;
  text-align: center;
  background: #efe8d8;
  color: #7a6a55;
  border-radius: 999px;
  line-height: 1.35;
}

.pw-hr__chip.is-active .pw-hr__chip-count {
  background: rgba(255, 255, 255, 0.20);
  color: #fff;
}

/* Scope note — quieter breadcrumb tone; no left bar. */
.pw-hr__scope-note {
  margin: 10px 2px 4px;
  padding: 0;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 13px;
  color: #6a5940;
  background: none;
  border: none;
}

.pw-hr__scope-note strong {
  color: #4a2f1a;
  font-weight: 700;
}

.pw-hr__scope-clear {
  margin-left: 10px;
  color: #7a4a25;
  text-decoration: none;
  border-bottom: 1px dotted #b89268;
  padding-bottom: 1px;
}

.pw-hr__scope-clear:hover {
  color: #4a2f1a;
  border-bottom-color: #4a2f1a;
}

.pw-hr__tab-panel { margin-top: 4px; }

/* Race-name link — routes the reader to the full racecard. Kept
   inheriting the .rp-hr__race-name typography so the visual weight
   doesn't change; only the affordance does. */
.pw-hr__race-name-link {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.pw-hr__race-name-link:hover {
  color: #7a4a25;
  border-bottom-color: #b89268;
}

.pw-hr__race-name-link:focus-visible {
  outline: 2px solid #7a4a25;
  outline-offset: 2px;
  border-radius: 2px;
}

/* Mobile — nowrap scroll strip with a right-edge fade to signal
   more meetings are hidden off-screen, and CSS scroll-snap so
   flick-to-next feels less soupy. */
@media (max-width: 640px) {
  .pw-hr__tabs {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    scroll-snap-type: x proximity;
  }
  .pw-hr__tabs::-webkit-scrollbar { display: none; }
  .pw-hr__tab {
    padding: 10px 16px 12px;
    font-size: 14px;
    white-space: nowrap;
    flex: 0 0 auto;
    scroll-snap-align: start;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }

  .pw-hr__meetings {
    padding: 10px 12px;
    gap: 10px;
    /* Right-edge fade — mask lets scrolled-past chips fade under
       the label side and unseen chips fade at the right edge. */
    -webkit-mask-image: linear-gradient(to right,
      #000 0, #000 calc(100% - 24px), transparent 100%);
            mask-image: linear-gradient(to right,
      #000 0, #000 calc(100% - 24px), transparent 100%);
  }
  .pw-hr__meetings-strip {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    scroll-snap-type: x proximity;
    padding-bottom: 4px;
  }
  .pw-hr__meetings-strip::-webkit-scrollbar { display: none; }
  .pw-hr__chip {
    flex: 0 0 auto;
    padding: 8px 13px;
    font-size: 13px;
    min-height: 36px;
    scroll-snap-align: start;
  }
  .pw-hr__chip-count { min-width: 20px; }
}

/* Respect motion preferences — kill the hover-lift + shadow
   transitions for readers who asked for reduced motion. */
@media (prefers-reduced-motion: reduce) {
  .pw-hr__chip,
  .pw-hr__tab {
    transition: none;
  }
  .pw-hr__chip:hover {
    transform: none;
  }
}

/* ────────────────────────────────────────────────────────────────
   Full Result pill — gold-outlined chip stacked below Verify
   (only appears on the Honest Record row when race.is_settled)
   ──────────────────────────────────────────────────────────────── */

.rp-hr__verify:has(.pw-hr__full-result-btn) {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.pw-hr__full-result-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 12px;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 11px;
  font-weight: 600;
  color: #4a2f1a;
  background: #fdf7e5;
  border: 1px solid #d8b860;
  border-radius: 999px;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease,
              transform 0.12s ease, box-shadow 0.15s ease;
  letter-spacing: 0.02em;
  white-space: nowrap;
  line-height: 1.5;
}

.pw-hr__full-result-btn:hover {
  background: #f8e9b8;
  border-color: #7a4a25;
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(74, 47, 26, 0.15);
}

.pw-hr__full-result-btn:focus-visible {
  outline: 2px solid #7a4a25;
  outline-offset: 2px;
}

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

/* ────────────────────────────────────────────────────────────────
   PW-POSTMORTEM-3 — post-race reflection card
   Sits below the top-4 selection strip on settled rows.  A muted
   sage-cream palette matches the reflective, retrospective tone
   (different from devil's amber-navy warning look — this is
   clarity-after-the-fact, not caution-before-the-fact).
   ──────────────────────────────────────────────────────────────── */

.pw-hr__postmortem {
  /* Direct child of the .rp-hr__row grid — span every column so
     the reflection reads as a full-width band beneath the top-4
     selection strip, not squashed into one meta column. */
  grid-column: 1 / -1;
  margin-top: 10px;
  padding: 0;
  background: linear-gradient(180deg, #f5f2e8 0%, #efece1 100%);
  border: 1px solid rgba(90, 105, 78, 0.22);
  border-radius: 8px;
  font-family: 'Inter', system-ui, sans-serif;
  color: #2d3a25;
  overflow: hidden;
}

.pw-hr__postmortem-summary {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  cursor: pointer;
  list-style: none;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #3a4a30;
  user-select: none;
  transition: background 0.15s ease;
}

.pw-hr__postmortem-summary::-webkit-details-marker { display: none; }

.pw-hr__postmortem-summary:hover {
  background: rgba(90, 105, 78, 0.06);
}

.pw-hr__postmortem-summary:focus-visible {
  outline: 2px solid #5a694e;
  outline-offset: -2px;
}

.pw-hr__postmortem-icon {
  color: #5a694e;
  font-size: 13px;
}

.pw-hr__postmortem-label {
  text-transform: uppercase;
  font-size: 10.5px;
  letter-spacing: 0.08em;
  color: #3a4a30;
}

.pw-hr__postmortem-verdict {
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1.4;
}

.pw-hr__postmortem-verdict--won {
  background: #d8e6c6;
  color: #2d4a1a;
  border: 1px solid #a8c084;
}

.pw-hr__postmortem-verdict--placed {
  background: #e5e2d0;
  color: #4a4020;
  border: 1px solid #c4bd8a;
}

.pw-hr__postmortem-verdict--lost {
  background: #e8dcd4;
  color: #5a3a2a;
  border: 1px solid #b89a86;
}

.pw-hr__postmortem-verdict--void,
.pw-hr__postmortem-verdict--unknown {
  background: #ddd8ca;
  color: #4a4638;
  border: 1px solid #a8a08a;
}

.pw-hr__postmortem-toggle {
  margin-left: auto;
  font-size: 11px;
  color: #5a694e;
  transition: transform 0.18s ease;
}

.pw-hr__postmortem[open] .pw-hr__postmortem-toggle {
  transform: rotate(180deg);
}

.pw-hr__postmortem-body {
  padding: 4px 14px 14px;
  border-top: 1px solid rgba(90, 105, 78, 0.18);
  background: rgba(255, 253, 246, 0.55);
}

.pw-hr__postmortem-headline {
  margin: 10px 0 8px;
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 15px;
  line-height: 1.4;
  color: #2d3a25;
  text-wrap: balance;
}

.pw-hr__postmortem-list {
  margin: 0 0 8px;
  padding-left: 20px;
  font-size: 13px;
  line-height: 1.55;
  color: #3d4a33;
}

.pw-hr__postmortem-list li {
  margin: 4px 0;
}

.pw-hr__postmortem-list li::marker {
  color: #5a694e;
}

.pw-hr__postmortem-feedback {
  margin: 10px 0 0;
  padding: 8px 10px;
  background: rgba(90, 105, 78, 0.08);
  border-left: 3px solid #5a694e;
  border-radius: 0 4px 4px 0;
  font-size: 12px;
  line-height: 1.5;
  color: #3a4a30;
}

.pw-hr__postmortem-feedback-label {
  font-weight: 700;
  text-transform: uppercase;
  font-size: 10px;
  letter-spacing: 0.08em;
  color: #5a694e;
  margin-right: 4px;
}

@media (prefers-reduced-motion: reduce) {
  .pw-hr__postmortem-summary { transition: none; }
  .pw-hr__postmortem-toggle  { transition: none; }
}

/* ── PR-3b: BET/WATCH/PASS shadow classifier chip ────────────────
   Editorial pricing verdict. Colours are intentionally quieter than
   the WON/PLACED chips so a BET on a losing pick doesn't shout past
   the actual result. */

.pw-hr__action {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  margin-left: 8px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 3px;
  border: 1px solid transparent;
  cursor: help;
  vertical-align: middle;
}
.pw-hr__action--bet {
  background: #eef7ea;
  color: #2f5c1e;
  border-color: #b7d8a6;
}
.pw-hr__action--watch {
  background: #eef1f6;
  color: #3a4560;
  border-color: #c2c9d8;
}
.pw-hr__action--pass {
  background: #f5eeee;
  color: #6b3a35;
  border-color: #d9c3c0;
}

/* ── Per-band summary strip. Sits above the race list on both tabs. */
.pw-hr__action-summary {
  margin: 16px 0 20px;
  padding: 14px 16px 12px;
  background: #fbf8f1;
  border: 1px solid #e6e0cf;
  border-radius: 6px;
}
.pw-hr__action-summary-head {
  margin-bottom: 10px;
}
.pw-hr__action-summary-title {
  font-family: 'Playfair Display', 'Georgia', serif;
  font-size: 16px;
  font-weight: 700;
  color: #3a2f20;
  margin: 0 0 2px;
}
.pw-hr__action-summary-caption {
  font-size: 12px;
  line-height: 1.45;
  color: #5f5540;
  margin: 0;
}
.pw-hr__action-summary-caption strong {
  color: #3a2f20;
}
.pw-hr__action-summary-grid {
  list-style: none;
  padding: 0;
  margin: 8px 0 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.pw-hr__action-summary-cell {
  padding: 10px 12px;
  background: #ffffff;
  border: 1px solid #e6e0cf;
  border-left-width: 4px;
  border-radius: 4px;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 10px;
}
.pw-hr__action-summary-cell--bet   { border-left-color: #6ea053; }
.pw-hr__action-summary-cell--watch { border-left-color: #7a86a5; }
.pw-hr__action-summary-cell--pass  { border-left-color: #b48480; }
.pw-hr__action-summary-band {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #3a2f20;
  flex-basis: 100%;
}
.pw-hr__action-summary-stats {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
}
.pw-hr__action-summary-strike,
.pw-hr__action-summary-roi {
  font-family: 'Playfair Display', 'Georgia', serif;
  font-size: 18px;
  font-weight: 700;
  color: #3a2f20;
  font-variant-numeric: tabular-nums;
}
.pw-hr__action-summary-roi--pos { color: #2f5c1e; }
.pw-hr__action-summary-roi--neg { color: #8a3a34; }
.pw-hr__action-summary-strike-lbl,
.pw-hr__action-summary-roi-lbl,
.pw-hr__action-summary-n {
  font-size: 11px;
  color: #5f5540;
}
.pw-hr__action-summary-empty {
  font-size: 12px;
  color: #8a7f66;
  font-style: italic;
}

@media (max-width: 640px) {
  .pw-hr__action-summary-grid { grid-template-columns: 1fr; }
  .pw-hr__action { margin-left: 4px; }
}
