/* ═════════════════════════════════════════════════════════════
   /featured-results/ — The Open File
   ─────────────────────────────────────────────────────────────
   Visual language inherits from The Fox's Record (/track-record/)
   so the two transparency surfaces feel like a matched pair:
     • Cream paper background with gold accents
     • Display-font headlines on body-font copy
     • Medal palette for bucket tones (gold/silver/bronze/red/grey)
     • Tabular-num pricing chips for column alignment
═════════════════════════════════════════════════════════════ */

.page-fox-results {
  background: #FBF7E8;
  color: #1A1A1A;
}

/* ── Reusable tokens local to this page ───────────────────── */
.page-fox-results {
  --fr-ink:        #1A1A1A;
  --fr-ink-70:     rgba(26,26,26,0.72);
  --fr-ink-40:     rgba(26,26,26,0.40);
  --fr-paper:      #FBF7E8;
  --fr-card:       #FFFDF6;
  --fr-rule:       rgba(26,26,26,0.10);
  --fr-rule-strong:rgba(26,26,26,0.18);
  --fr-gold:       #D4AF37;
  --fr-gold-ink:   #6B4F0C;
  --fr-gold-wash:  #FBF6E3;
  --fr-emerald:    #166534;
  --fr-emerald-soft:#E8F5EC;
  --fr-rust:       #B91C1C;
  --fr-rust-soft:  #FCE9E9;
  --fr-silver:     #6B7280;
  --fr-bronze:     #92541D;
  --fr-font-display: 'Iowan Old Style', 'Charter', Georgia, serif;
}

/* ── Hero ─────────────────────────────────────────────────── */
.fr-hero {
  background: linear-gradient(160deg, #1A2233 0%, #0F1623 100%);
  color: #FCFAF2;
  padding: 64px 0 56px;
  position: relative;
  overflow: hidden;
}
.fr-hero::after {
  content: '';
  position: absolute;
  inset: auto 0 0 0;
  height: 64px;
  background: linear-gradient(180deg, transparent, var(--fr-paper));
  pointer-events: none;
}
.fr-hero__inner {
  max-width: 1100px;
  padding: 0 24px;
  margin: 0 auto;
}
.fr-hero__kicker {
  display: inline-block;
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.30em;
  color: var(--fr-gold);
  margin-bottom: 16px;
}
.fr-hero__title {
  font-family: var(--fr-font-display);
  font-size: clamp(36px, 5vw, 56px);
  line-height: 1.08;
  margin: 0 0 18px;
  letter-spacing: -0.015em;
}
.fr-hero__sub {
  font-size: 17px;
  line-height: 1.6;
  color: rgba(252, 250, 242, 0.78);
  max-width: 60ch;
  margin: 0 0 36px;
}

/* Headline stats grid */
.fr-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  position: relative;
  z-index: 1;
}
.fr-stat {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 10px;
  padding: 18px 18px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.fr-stat__num {
  font-family: var(--fr-font-display);
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.1;
  color: #FCFAF2;
  font-variant-numeric: tabular-nums;
}
.fr-stat__lbl {
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(252, 250, 242, 0.55);
}
.fr-stat__detail {
  font-size: 12px;
  color: rgba(252, 250, 242, 0.50);
  margin-top: 4px;
}
.fr-stat--pl-profit .fr-stat__num { color: #4ADE80; }
.fr-stat--pl-loss   .fr-stat__num { color: #F87171; }

/* ── Sections — shared shell ──────────────────────────────── */
.fr-roll,
.fr-ledger,
.fr-conviction {
  background: var(--fr-paper);
  padding: 48px 0;
}
.fr-roll__inner,
.fr-ledger__inner,
.fr-conviction__inner {
  max-width: 1100px;
  padding: 0 24px;
  margin: 0 auto;
}
.fr-section-head { margin-bottom: 26px; }
.fr-section-heading {
  font-family: var(--fr-font-display);
  font-size: clamp(26px, 3vw, 32px);
  margin: 0 0 8px;
  letter-spacing: -0.015em;
  display: inline-flex;
  align-items: baseline;
  gap: 12px;
  position: relative;
}
.fr-section-heading__num {
  display: inline-block;
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.10em;
  color: var(--fr-gold-ink);
  background: var(--fr-gold-wash);
  padding: 4px 8px;
  border: 1px solid var(--fr-gold);
  border-radius: 4px;
  position: relative; top: -6px;
}
.fr-section-sub {
  color: var(--fr-ink-70);
  font-size: 14.5px;
  line-height: 1.6;
  max-width: 64ch;
  margin: 6px 0 0;
}

/* ── Section 01 — Roll of honour ──────────────────────────── */
.fr-roll__cards {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}
.fr-roll-card {
  background: linear-gradient(160deg, #FFFAE8 0%, #FFF4D2 100%);
  border: 2px solid var(--fr-gold);
  border-radius: 12px;
  padding: 18px 18px 16px;
  display: flex;
  gap: 14px;
  box-shadow: 0 4px 14px rgba(212, 175, 55, 0.15);
  transition: transform 0.15s, box-shadow 0.18s;
}
.fr-roll-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(212, 175, 55, 0.22);
}
.fr-roll-card__medal {
  font-size: 28px;
  line-height: 1;
  flex-shrink: 0;
}
.fr-roll-card__body { flex: 1 1 auto; min-width: 0; }
.fr-roll-card__horse {
  font-family: var(--fr-font-display);
  font-size: 19px;
  font-weight: 700;
  margin: 0 0 4px;
  letter-spacing: -0.01em;
  color: var(--fr-ink);
}
.fr-roll-card__horse a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.15s;
}
.fr-roll-card__horse a:hover { border-bottom-color: var(--fr-gold-ink); }
.fr-roll-card__race {
  font-size: 12.5px;
  color: var(--fr-ink-70);
  margin: 0 0 10px;
  line-height: 1.5;
}
.fr-roll-card__dot { color: var(--fr-ink-40); margin: 0 3px; }
.fr-roll-card__chips { display: flex; flex-wrap: wrap; gap: 6px; }

/* ── Shared chip styling ──────────────────────────────────── */
.fr-chip {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 700;
  border-radius: 4px;
  border: 1px solid var(--fr-rule-strong);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.fr-chip--odds {
  background: var(--fr-gold-wash);
  border-color: var(--fr-gold);
  color: var(--fr-gold-ink);
  font-weight: 800;
  letter-spacing: 0.01em;
}
.fr-chip--conv {
  background: rgba(26,26,26,0.04);
  color: var(--fr-ink-70);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 9.5px;
  font-weight: 800;
}
.fr-chip--pl { font-weight: 800; }
.fr-chip--pl-profit { background: var(--fr-emerald-soft); color: var(--fr-emerald); border-color: var(--fr-emerald); }
.fr-chip--pl-loss   { background: var(--fr-rust-soft);    color: var(--fr-rust);    border-color: var(--fr-rust);    }
.fr-chip--pl-flat   { background: rgba(26,26,26,0.04);    color: var(--fr-ink-70);                                    }

/* ── Section 02 — Ledger ──────────────────────────────────── */
/* One card per race, sorted latest first. Each card leads with a
   prominent status pill (WIN / 2ND / 3RD / UNPLACED / PENDING /
   VOID) so a punter can scan the whole ledger and see the result
   at a glance. Below the head sits the four-cell selection grid. */
.fr-races {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.fr-race {
  background: var(--fr-card);
  border: 1px solid var(--fr-rule);
  border-radius: 12px;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
}
.fr-race:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px -22px rgba(26, 26, 26, 0.22);
  border-color: var(--fr-rule-strong);
}
.fr-race--win     { border-left: 4px solid var(--fr-gold); }
.fr-race--silver  { border-left: 4px solid var(--fr-silver); }
.fr-race--bronze  { border-left: 4px solid var(--fr-bronze); }
.fr-race--loss    { border-left: 4px solid var(--fr-rust); }
.fr-race--pending { border-left: 4px solid var(--fr-rule-strong); }
.fr-race--void    { border-left: 4px solid var(--fr-rule); opacity: 0.72; }

.fr-race__head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
}

/* Prominent status pill — the "WIN / 2ND / 3RD" label. */
.fr-race__chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  border-radius: 999px;
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  line-height: 1;
  white-space: nowrap;
}
.fr-race__chip-glyph { font-size: 14px; line-height: 1; }
.fr-race__chip--win     { background: var(--fr-gold);     color: var(--fr-ink); }
.fr-race__chip--silver  { background: var(--fr-silver);   color: var(--fr-paper); }
.fr-race__chip--bronze  { background: var(--fr-bronze);   color: var(--fr-paper); }
.fr-race__chip--loss    { background: var(--fr-rust-soft); color: var(--fr-rust);
                          border: 1px solid var(--fr-rust); }
.fr-race__chip--pending { background: transparent; color: var(--fr-ink-70);
                          border: 1px dashed var(--fr-rule-strong); }
.fr-race__chip--void    { background: transparent; color: var(--fr-ink-40);
                          border: 1px solid var(--fr-rule); }

/* Race meta stack — date + course/name — clickable to the racecard. */
.fr-race__meta { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.fr-race__meta-link { text-decoration: none; color: inherit; display: block;
                      transition: color 0.15s; }
.fr-race__meta-link:hover .fr-race__meta-name { color: var(--fr-gold-ink); }
.fr-race__meta-when {
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fr-ink-40);
}
.fr-race__meta-name {
  display: block;
  font-family: var(--fr-font-display);
  font-size: 16px;
  font-weight: 700;
  color: var(--fr-ink);
  line-height: 1.25;
  letter-spacing: -0.005em;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.15s;
}

.fr-race__pill-row {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.fr-race__winner-note {
  font-family: var(--fr-font-display);
  font-style: italic;
  color: var(--fr-ink-70);
  font-size: 13px;
  margin: 0;
}
.fr-race__winner-note strong { color: var(--fr-ink); font-style: normal; }

/* Four-cell selection grid inside each race card. */
.fr-race__cells {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

/* Per-cell visual — tinted by that runner's own finish bucket. */
.fr-cell {
  border-left: 3px solid transparent;
  background: rgba(0,0,0,0.02);
  padding: 10px 12px;
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.fr-cell--win {
  border-left: 4px solid var(--fr-gold);
  background: linear-gradient(180deg, rgba(212,175,55,0.20) 0%, rgba(212,175,55,0.10) 100%);
  box-shadow: inset 0 0 0 1px rgba(212,175,55,0.35);
}
.fr-cell--silver { border-left-color: var(--fr-silver); background: rgba(107,114,128,0.06); }
.fr-cell--bronze { border-left-color: var(--fr-bronze); background: rgba(146,84,29,0.06); }
.fr-cell--loss   { border-left-color: var(--fr-rust);   background: rgba(185,28,28,0.04); }
.fr-cell--pending{ border-left-color: var(--fr-rule-strong); }
.fr-cell--void   { border-left-color: var(--fr-rule);   opacity: 0.6; }

.fr-cell__slot {
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fr-ink-40);
}
.fr-cell__inner { display: flex; flex-direction: column; gap: 4px; }
.fr-cell__horse {
  font-family: var(--fr-font-display);
  font-size: 14px;
  font-weight: 700;
  color: var(--fr-ink);
  letter-spacing: -0.005em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.fr-cell__odds {
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 12px;
  font-weight: 800;
  color: var(--fr-gold-ink);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
}
.fr-cell__finish {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fr-ink-70);
}
.fr-cell--win    .fr-cell__finish { color: var(--fr-gold-ink); }
.fr-cell--silver .fr-cell__finish { color: var(--fr-silver); }
.fr-cell--bronze .fr-cell__finish { color: var(--fr-bronze); }
.fr-cell--loss   .fr-cell__finish { color: var(--fr-rust); }
.fr-cell__glyph { font-size: 13px; line-height: 1; }

/* Bold "🏆 WON" emblem — replaces the small "🥇 1ST" finish text on
   any selection cell whose horse won. Loud on purpose: even when
   the headline (Sel 1) came 3rd, a punter should see at a glance
   that one of the four picks DID come home. */
.fr-cell__won {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: linear-gradient(180deg, #e6c76a 0%, #b8912f 100%);
  color: var(--fr-ink);
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  line-height: 1;
  align-self: flex-start;
  box-shadow: 0 3px 8px -2px rgba(184,145,47,0.45);
  margin-top: 2px;
}
.fr-cell__won-glyph { font-size: 13px; line-height: 1; }
.fr-cell__won-lbl   { letter-spacing: 0.20em; }

.fr-cell__empty {
  color: var(--fr-ink-40);
  font-style: italic;
  font-size: 13px;
}

/* Mobile — collapse the head to a stack + 2-up cell grid. */
@media (max-width: 700px) {
  .fr-race { padding: 16px 16px; }
  .fr-race__head { grid-template-columns: auto 1fr; }
  .fr-race__pill-row { grid-column: 1 / -1; justify-content: flex-start; }
  .fr-race__cells { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.fr-ledger__empty {
  background: var(--fr-card);
  border: 1px dashed var(--fr-rule-strong);
  border-radius: 8px;
  padding: 24px;
  text-align: center;
  color: var(--fr-ink-70);
  font-size: 14.5px;
}

/* ── Section 03 — Conviction table ────────────────────────── */
.fr-conviction { padding-bottom: 64px; }
.fr-conviction__scroll { overflow-x: auto; }
.fr-conviction__table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-variant-numeric: tabular-nums;
  background: var(--fr-card);
  border: 1px solid var(--fr-rule);
  border-radius: 8px;
}
.fr-conviction__table th,
.fr-conviction__table td {
  padding: 12px 14px;
  text-align: right;
  font-size: 13.5px;
  color: var(--fr-ink);
  border-bottom: 1px solid var(--fr-rule);
}
.fr-conviction__table th {
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--fr-ink-40);
  background: var(--fr-gold-wash);
}
.fr-conviction__table tr:last-child td { border-bottom: 0; }
.fr-conviction__col-name,
.fr-conviction__name { text-align: left; font-weight: 700; }
.fr-conviction__num  { font-weight: 700; }
.fr-conviction__pl   { font-weight: 800; }
.fr-conviction__pl--profit { color: var(--fr-emerald); }
.fr-conviction__pl--loss   { color: var(--fr-rust); }
.fr-conviction__pl--flat   { color: var(--fr-ink-70); }

.fr-closing {
  margin: 28px 0 0;
  color: var(--fr-ink-70);
  font-size: 14px;
  line-height: 1.7;
  font-style: italic;
  max-width: 70ch;
}
.fr-closing a {
  color: var(--fr-gold-ink);
  font-weight: 700;
  text-decoration: none;
  border-bottom: 1px solid var(--fr-gold);
  font-style: normal;
}
.fr-closing a:hover { background: var(--fr-gold-wash); }

/* ── Mobile ───────────────────────────────────────────────── */
@media (max-width: 640px) {
  .fr-hero { padding: 48px 0 40px; }
  /* The ledger table is wider than a phone — the wrapper's
     overflow-x: auto already handles horizontal scroll; here
     we just tighten cell padding so more content fits before
     the user has to swipe. */
  .fr-row > td { padding: 12px 10px; }
  .fr-table thead th { padding: 10px 10px; }
  .fr-cell { width: auto; padding-left: 10px; }
  .fr-table__col-race { min-width: 180px; }
  .fr-table__col-sel  { min-width: 150px; }
}
