/* ===========================================================================
   automated.css — machine-authored includes, loaded once on initial pageload
   (referenced from the template). Namespace per feature.
   =========================================================================== */

/* ---------------------------------------------------------------------------
   Nav icon guard (NOT feature-specific).
   The sidebar/header inline <svg> carry no width/height attributes and rely on
   scoped rules in ehr_sidebar.css / ehr_header.css. If one of those is stale or
   unapplied after a deploy, the SVGs fall back to a huge default size and the
   menu buttons balloon ("hilariously large"). This file loads LAST, so pin the
   sizes here as a hard safety net.
   --------------------------------------------------------------------------- */
.ehr-sidebar-link > svg          { width: 18px;  height: 18px; flex: 0 0 auto; }
.ehr-sidebar-link .ehr-arrow     { width: 16px;  height: 16px; flex: 0 0 auto; }
.ehr-sidebar-link .ehr-arrow svg { width: 100%;  height: 100%; }
.ehr-quick-btn svg               { width: 18px;  height: 18px; }
.ehr-sidebar-toggle svg          { width: 25px;  height: 25px; }

/* ---- Hotlist: the old pager, the cost-tier gradient, the 2/3/DS/DDS chips (.sireage / .sirestat_*), the price markers
   (.sirecred_*) and .sireavail_col -> MOVED KITLOOK_20261018: css/ehr_page_breeding_sires.css (section 2, hues unchanged). */

/* ---------------------------------------------------------------------------
   Zebra striping. Each logical row is TWO <tr> (visible row + hidden detail row),
   so main rows are the odd children and every other one is 4n+3. The detail row is
   left alone — it carries its own #f9f9f9 from the legacy sheet.
   The legacy `.sirehotlist_table tr:hover` is (0,2,1) and would LOSE to the stripe
   below at (0,2,2), so hover is restated here at matching specificity, after it.
   --------------------------------------------------------------------------- */
.sirehotlist_table tbody tr:nth-child(4n+3) { background: #f8f6f1; }
.sirehotlist_table tbody tr:hover           { background: #eee9de; }


/* =============================================================================
   SD_20260805 — sire detail / buy shares
   =============================================================================
   Companion to its endpoint. Same palette as the
   Hotlist above it (#E8E8D0 heads, #c8c8a0 rules, #1e293b text,
   #94a3b8 labels) so a sire opened from the hotlist reads as the same screen.
   ========================================================================== */

.sd_wrap  { width: 100%; max-width: 100%; box-sizing: border-box; }
.sd_empty { padding: 18px; color: #6b7280; font-size: 13px; }

/* ── header ── */
.sd_head {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 12px; background: #f8f9fa; border: 1px solid #c8c8a0; border-radius: 6px;
  padding: 12px 16px; margin-bottom: 10px;
}
.sd_name { font-size: 18px; font-weight: 700; color: #1e293b; }
.sd_sub  { font-size: 11px; color: #6b7280; margin-top: 3px; }
.sd_id   { color: #94a3b8; }
.sd_head_side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex-shrink: 0; }

/* Availability chips — on = acquirable (status >= 0), off = refused */
.sd_chips { display: flex; gap: 3px; }
.sd_chip {
  display: inline-block; min-width: 18px; padding: 2px 5px; border-radius: 3px;
  font-size: 10px; font-weight: 700; text-align: center; border: 1px solid #c8c8a0;
  cursor: default;
}
.sd_chip_on  { background: #ecfdf5; border-color: #a7f3d0; color: #065f46; }
.sd_chip_off { background: #f1f5f9; border-color: #e2e8f0; color: #cbd5e1; }

.sd_bal { display: flex; gap: 10px; font-size: 11px; color: #6b7280; }
.sd_bal_item b { color: #1e293b; font-size: 13px; }

.sd_limit {
  font-size: 12px; color: #065f46; background: #ecfdf5; border: 1px solid #a7f3d0;
  border-radius: 4px; padding: 6px 10px; margin-bottom: 10px;
}
.sd_limit_hit { color: #991b1b; background: #fee2e2; border-color: #fca5a5; }

/* ── sections ── */
.sd_sect    { margin-bottom: 16px; }
.sd_sect_hd {
  font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px;
  color: #94a3b8; padding: 4px 2px; border-bottom: 1px solid #e5e7eb; margin-bottom: 6px;
}
.sd_sect_sub { text-transform: none; letter-spacing: 0; font-weight: 500; color: #cbd5e1; margin-left: 6px; }
.sd_note { font-size: 11px; color: #92400e; background: #fef3c7; border-radius: 3px; padding: 5px 8px; margin-top: 6px; }
.sd_scroll { overflow-x: auto; }

/* ── tables ── */
.sd_table { width: 100%; border-collapse: collapse; background: var(--ehr-surface-bg); }
.sd_table thead tr { background: #E8E8D0; }
.sd_table th {
  padding: 7px 6px; text-align: left; font-weight: 700;
  color: #374151; border-bottom: 2px solid #c8c8a0; white-space: nowrap;
}
.sd_table td { padding: 6px; font-size: 12px; border-bottom: 1px solid #e5e7eb; vertical-align: middle; }
.sd_table tbody tr:hover { background: #f0f4f8; }
.sd_num { text-align: right; }
.hsr_th_badges { text-align: right; }

/* A number column's HEADER right-aligns with its data. The bare .sd_num rule
   above is (0,1,0) and loses to `.sd_table th`'s text-align:left at (0,1,1),
   so every numeric header sat flush LEFT over flush-right figures -- ragged
   columns, hard to read (review 2026-08-05). This restatement at (0,2,1)
   wins. Covers the crop record, best horses, and holdings in one rule. */
.sd_table th.sd_num { text-align: right; }

/* ── buy grid ── */
.sd_role  { font-weight: 700; color: #1e293b; }
.sd_price { font-weight: 700; color: #1e293b; }
.sd_act   { width: 62px; text-align: center; }

/* A refused cell is greyed rather than hidden: knowing the price exists but is
   out of reach is different information from the role not existing at all. */
.sd_price_norole,
.sd_price_expired { color: #cbd5e1; font-weight: 500; }
.sd_price_funds   { color: #b45309; }
.sd_price_nomaster,
.sd_price_limit   { color: #94a3b8; }
.sd_x { color: #cbd5e1; }

.sd_btn {
  display: inline-block; padding: 2px 8px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.3px; cursor: pointer;
  border: 1px solid #c7d2e5; border-radius: 3px; color: #20355e; background: #eef2fa;
  user-select: none; white-space: nowrap;
}
.sd_btn:hover { background: #dbeafe; }
/* WATCHADD_20260913: watch / unwatch this sire, under the name. */
.sd_watch_row      { display: flex; align-items: center; gap: 8px; margin: 4px 0 6px; flex-wrap: wrap; }
/* WATCHCOLOR_20260914: gold, same pair as the horse page (.hp_watch_*) --
   amber outline to add, solid gold once watching. */
.sd_watch_btn                   { font-size: 12px; padding: 3px 10px; background: #fffbeb; color: #92400e; border: 2px solid #d97706; }
.sd_watch_btn:hover             { background: #fde68a; }
.sd_watch_btn.sd_watch_on       { background: #f59e0b; border-color: #d97706; color: #3b2300; }
.sd_watch_btn.sd_watch_on:hover { background: #d97706; }
.sd_watch_msg      { font-size: 12px; }
.sd_watch_msg_ok   { color: #2a6a2a; }
.sd_watch_msg_fail { color: #b91c1c; }
.sd_btn_off {
  cursor: not-allowed; color: #cbd5e1; background: #f8fafc; border-color: #e2e8f0;
  text-transform: none; letter-spacing: 0;
}

/* ── holdings ── */
.sd_state_ok  { color: #065f46; font-weight: 700; }
.sd_state_bad { color: #991b1b; font-weight: 700; }

/* ── crop record ── */
.sd_stats .sd_rollup td { background: #fbfdf9; font-weight: 700; }
.sd_stats .sd_rollup:hover td { background: #f0f4f8; }
.sd_year  { font-weight: 700; color: #1e293b; }
.sd_split { color: #6b7280; white-space: nowrap; }

/* ── best horses ── */
.sd_hname a {
  text-decoration: underline; text-decoration-color: #94a3b8; text-underline-offset: 2px;
  cursor: pointer; color: #166534; font-weight: 700;
}
.sd_hname a:hover { text-decoration: none; background: #dbeafe; border-radius: 3px; padding: 0 2px; }
.sd_money { color: #15803d; font-weight: 700; }

/* ── responsive ── */
@media (max-width: 900px) { .sd_c_awards { display: none; } }
@media (max-width: 760px) { .sd_c_yr     { display: none; } }
@media (max-width: 640px) {
  .sd_c_itm { display: none; }
  .sd_head  { flex-direction: column; }
  .sd_head_side { align-items: flex-start; flex-direction: row; justify-content: space-between; width: 100%; }
}

/* The route from a hotlist row into the sire screen. Deliberately quiet — it
   sits beside the sire's name, which is the primary link, and should read as a
   secondary action rather than compete with it. */
.hl_sharebtn {
  margin-left: 6px; padding: 1px 5px; font-size: 9px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.3px; cursor: pointer;
  border: 1px solid #c7d2e5; border-radius: 3px; color: #20355e; background: #eef2fa;
  user-select: none; vertical-align: middle;
}
.hl_sharebtn:hover { background: #dbeafe; }


/* =============================================================================
   SD_20260805 v2 — horse picture, counters, pedigree, bids, crop see-more
   ========================================================================== */

/* ── header picture — the game's FullBody art, colour-matched to the sire ── */
.sd_pic {
  flex-shrink: 0; width: 92px; height: 74px; display: flex;
  align-items: center; justify-content: center;
  background: #fff; border: 1px solid #e5e7eb; border-radius: 6px; overflow: hidden;
}
.sd_pic img { max-width: 100%; max-height: 100%; object-fit: contain; }

/* colour chip next to the name — swatch tinted like the art it points at */
.sd_colorchip {
  display: inline-block; padding: 1px 6px; margin-right: 6px; border-radius: 3px;
  font-size: 10px; font-weight: 700; color: #fff; vertical-align: middle;
}
.sd_color_bay        { background: #907060; }
.sd_color_brown      { background: #6d4c35; }
.sd_color_dark_brown { background: #4f372c; }
.sd_color_chestnut   { background: #d57f53; }
.sd_color_gray_roan  { background: #8a8f98; }
.sd_color_light_grey { background: #b9b9b9; color: #333; }

/* ── the counters row ── */
.sd_counters { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 7px; }
.sd_counter {
  font-weight: 600; color: var(--ehr-theme-on-brand); background: var(--ehr-theme-base);
  border: 1px solid var(--ehr-theme-strong); border-radius: 9999em;
  padding: 2px 8px; white-space: nowrap; cursor: default;
}
.sd_counter b { color: #1e293b; font-size: 12px; }

/* ── yearly pair in the buy grid ── */
.sd_yrly     { font-size: 11px; color: #6b7280; white-space: nowrap; }
.sd_yrly_hit { color: #991b1b; font-weight: 700; }

/* ── bid controls ── */
.sd_btn_bid  { border-color: #d9c47a; background: #fdf6e3; color: #7a5c14; }
.sd_btn_bid:hover { background: #faedc4; }
.sd_btn_off2 { border-color: #e2c4c4; background: #fdf0f0; color: #7a2222; }
.sd_btn_off2:hover { background: #f8dede; }
.sd_bid_dead td { opacity: 0.55; }

/* ── pedigree chart — blue/pink convention, same as the horse page ── */
.sd_gen_btns { margin-left: 10px; text-transform: none; letter-spacing: 0; }
.sd_genbtn {
  display: inline-block; padding: 1px 8px; margin-right: 3px; cursor: pointer;
  font-size: 11px; font-weight: 700; border: 1px solid #b9c4b9; border-radius: 3px;
  background: #fff; color: #333; user-select: none;
}
.sd_genbtn_on { background: #20355e; color: #fff; border-color: #20355e; }

.sd_ped_table { border-collapse: collapse; font-size: 12px; width: 100%; background: #fff; table-layout: fixed; }
.sd_ped_cell {
  padding: 5px 8px; border: 1px solid #c9d2c9; vertical-align: middle;
  overflow-wrap: break-word;   /* names WRAP; the chart never grows a slidy bar */
}
/* the deeper the chart, the tighter the cells -- it compresses, not scrolls */
.sd_ped_wrap4 { font-size: 11px; }
.sd_ped_wrap4 .sd_ped_cell { padding: 4px 5px; }
.sd_ped_wrap5 { font-size: 10px; }
.sd_ped_wrap5 .sd_ped_cell { padding: 3px 4px; }
.sd_ped_wrap5 .sd_ped_yr   { display: none; }   /* years go before names do at 5x */
.sd_ped_m    { background: #e6ecf8; color: #20355e; }
.sd_ped_f    { background: #fbe9ef; color: #8a2b4d; }
.sd_ped_near { font-weight: 600; }
.sd_ped_yr   { color: #888; font-weight: 400; }
.sd_ped_dupe {
  margin-left: 6px; padding: 1px 5px; border-radius: 3px;
  font-size: 10px; font-weight: 700; color: #fff; background: #b3373b;
  /* SPILL FIX 2026-08-24 -- owner: "only the badges spill over a bit" on the
     WikiPedigree page on a phone.

     .sd_ped_table is `table-layout: fixed`, so a column's width is decided
     before its contents are looked at, and .sd_ped_cell wraps NAMES fine
     (overflow-wrap: break-word). This badge is an inline-block, and an
     inline-block whose own box is wider than the cell does not wrap -- it
     hangs out the side. At five generations the cells are ~60px and a label
     like "5Sx5D" plus its padding is most of that, so it hung out.

     max-width + border-box caps the badge at the cell, and overflow-wrap lets
     the label itself break rather than push. Not `overflow: hidden` on the
     cell: that would have CLIPPED the badge, hiding an inbreeding marker,
     which is one of the things people come to this chart to read. */
  display: inline-block;
  max-width: 100%;
  box-sizing: border-box;
  overflow-wrap: anywhere;
}
.sd_ped_dupe_hot { background: #7b2d8e; }

/* On a phone the 5x chart has no room for the 6px gutter or the full padding.
   Shrinking the badge rather than dropping it keeps the marker readable --
   the 5x view already trades away the YEARS (.sd_ped_wrap5 .sd_ped_yr) to buy
   this space, and the dupe badge is worth more than the year. */
@media (max-width: 480px) {
  .sd_ped_dupe { margin-left: 3px; padding: 1px 3px; font-size: 9px; }
  .sd_ped_wrap5 .sd_ped_dupe { margin-left: 2px; padding: 0 2px; }
}

/* ── crop see-more: rows past the fifth crop hide until the table is open ──
   v3.1: each crop is now TWO rows -- the visible row (sd_crop_more) and its
   hidden-detail row (sd_crop_more_x). Closing see-more hides both, with
   !important so it also wins over an expanded detail row's _show state --
   otherwise expanding crop #7's detail and then collapsing see-more would
   leave the detail floating with no parent row. Opening see-more shows ONLY
   the main rows; the detail rows stay governed by the expand toggle. */
.sd_stats:not(.sd_crops_open) tr.sd_crop_more,
.sd_stats:not(.sd_crops_open) tr.sd_crop_more_x { display: none !important; }
.sd_stats.sd_crops_open tr.sd_crop_more { display: table-row; }
.sd_more {
  font-size: 11px; font-weight: 700; color: #20355e; cursor: pointer;
  padding: 6px 2px; user-select: none;
}
.sd_more:hover { text-decoration: underline; }
.sd_more_arrow { font-size: 9px; }

/* ── best offspring: the game's blue/pink by sex, on name and chip ── */
.sd_hname a.sd_hn_m { color: #20355e; }
.sd_hname a.sd_hn_f { color: #8a2b4d; }
.sd_sexchip {
  display: inline-block; padding: 1px 6px; border-radius: 3px;
  font-size: 10px; font-weight: 700; white-space: nowrap;
}
.sd_sex_m { background: #e6ecf8; color: #20355e; }
.sd_sex_f { background: #fbe9ef; color: #8a2b4d; }

.sd_footnote { font-size: 11px; color: #94a3b8; padding: 6px 2px 0 2px; }

/* v2 responsive additions */
@media (max-width: 760px) {
  .sd_pic { width: 64px; height: 52px; }
  .sd_c_yrly { display: none; }
  .sd_c_bred { display: none; }
}


/* =============================================================================
   SD_20260805 v3 — identity band, purchase matrix, inline panels, queue line
   =============================================================================
   The band borrows the horse page's gradient identity language; the matrix is
   the old findsires grid (Points / Auto Point / Credits / Auto Credit rows ×
   role columns) in the new palette. v2's sd_buy table classes are superseded
   by sd3_matrix but left defined above — the holdings/stats/best tables still
   use the shared sd_ classes.
   ========================================================================== */

/* ── identity band ── */
.sd3_band {
  display: flex; align-items: center; gap: 16px;
  background: linear-gradient(90deg, rgba(13,66,13,1) 0%, rgba(49,107,49,1) 45%, rgba(85,90,85,1) 100%);
  color: #fff; padding: 14px 18px; margin-bottom: 8px;
}
.sd3_pic {
  flex-shrink: 0; width: 110px; height: 88px; display: flex;
  align-items: center; justify-content: center;
  background: rgba(255,255,255,.92); border-radius: 6px; overflow: hidden;
}
.sd3_pic img { max-width: 100%; max-height: 100%; object-fit: contain; }

.sd3_id   { flex: 1 1 auto; min-width: 0; }
.sd3_name { font-size: 26px; font-weight: 700; line-height: 1.1; letter-spacing: .3px; }
.sd3_tagline {
  display: flex; align-items: center; gap: 7px; flex-wrap: wrap;
  font-size: 12px; color: #d8e4d8; margin-top: 5px;
}
.sd3_sep    { color: rgba(255,255,255,.35); }
.sd3_id_num { color: rgba(255,255,255,.55); }

/* counters keep their pill look but sit on the dark band */
.sd3_counters .sd_counter { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.25); color: #d8e4d8; }
.sd3_counters .sd_counter b { color: #fff; }
/* SIRESOFT_20261015 (paste 301): the soft limit counter is a details element; its explanation wraps (the pill is nowrap) */
.sd_counter > summary { cursor: pointer; }
.sd_counter > div { white-space: normal; max-width: 22em; margin-top: 4px; line-height: 1.35; }

.sd3_side { flex-shrink: 0; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.sd3_side .sd_chip_on  { background: rgba(255,255,255,.92); }
.sd3_side .sd_chip_off { background: rgba(255,255,255,.10); border-color: rgba(255,255,255,.2); color: rgba(255,255,255,.35); }
.sd3_bal { display: flex; gap: 12px; font-size: 11px; color: #d8e4d8; }
.sd3_bal b { color: #fff; font-size: 14px; }

/* ── the queue line ── */
.sd3_queue {
  font-size: 12px; color: #6b7280; background: #fff;
  border: 1px solid #e5e7eb; border-radius: 4px;
  padding: 6px 10px; margin-bottom: 8px;
}
.sd3_queue b { color: #1e293b; }
.sd3_myslot  { color: #065f46; font-weight: 700; }

/* ── the two-column info grid, old-panel arrangement ── */
.sd3_grid {
  display: grid; grid-template-columns: minmax(360px, 1fr) minmax(380px, 460px);
  gap: 16px; align-items: start; margin-bottom: 14px;
}
.sd3_grid_lower { grid-template-columns: minmax(420px, 1fr) minmax(340px, 420px); }
.sd3_cell { min-width: 0; }
@media (max-width: 980px) {
  .sd3_grid, .sd3_grid_lower { grid-template-columns: 1fr; }
}

/* ── the purchase matrix ── */
.sd3_matrix { width: 100%; border-collapse: collapse; background: #fff; }
.sd3_matrix th {
  background: #E8E8D0; padding: 7px 6px; font-size: 12px; font-weight: 700;
  color: #374151; border-bottom: 2px solid #c8c8a0; text-align: center;
}
.sd3_m_short { color: #94a3b8; font-weight: 600; font-size: 10px; margin-left: 3px; }
.sd3_matrix td { border-bottom: 1px solid #e5e7eb; }

.sd3_m_pay {
  width: 86px; padding: 8px; font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .3px; color: #6b7280;
  background: #f8f9fa; border-right: 2px solid #e5e7eb; white-space: nowrap;
}
.sd3_m_auto { color: #a58a2d; }

/* the cell IS the control — one big hit target, like the old Grab cells */
.sd3_m_cell {
  text-align: center; padding: 8px 6px; min-width: 92px; vertical-align: middle;
}
.sd3_m_ok { cursor: pointer; }
.sd3_m_ok:hover { background: #eef6ee; box-shadow: inset 0 0 0 1px #9fc59f; }
.sd3_m_price { display: block; font-size: 16px; font-weight: 700; color: #1e293b; line-height: 1.1; }
.sd3_m_price_dim { color: #b9c2cc; }
.sd3_m_yr { display: block; font-size: 10px; color: #94a3b8; }
.sd3_m_go {
  display: inline-block; margin-top: 3px; padding: 1px 8px;
  font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .3px;
  color: #0d420d; background: #e3efe3; border: 1px solid #a9cba9; border-radius: 3px;
}
.sd3_m_ok:hover .sd3_m_go { background: #0d420d; color: #fff; }

.sd3_m_no { color: #cbd5e1; }
.sd3_m_state { display: block; font-size: 11px; font-style: italic; color: #b0b8c2; margin-top: 2px; }
.sd3_m_funds .sd3_m_state, .sd3_m_yearly .sd3_m_state { color: #b45309; }

/* auto/bid cells */
.sd3_m_bidcell { cursor: pointer; }
.sd3_m_bidcell:hover { background: #fdf6e3; box-shadow: inset 0 0 0 1px #d9c47a; }
.sd3_m_mybid { font-size: 15px; font-weight: 700; color: #7a5c14; }
.sd3_m_mybid em { font-size: 10px; font-weight: 400; color: #b0a26d; font-style: italic; }
.sd3_m_bid_off { color: #b0a26d; }
.sd3_m_keeps { margin-left: 4px; color: #a58a2d; font-weight: 700; }
.sd3_m_bidnow {
  display: inline-block; padding: 2px 8px; font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .3px;
  color: #7a5c14; background: #fdf6e3; border: 1px solid #d9c47a; border-radius: 3px;
}
.sd3_m_bidcell:hover .sd3_m_bidnow { background: #7a5c14; color: #fff; }

/* ── the inline confirm panels ── */
.sd3_panel {
  margin-top: 10px; background: #fff; border: 1px solid #c8c8a0;
  border-radius: 6px; padding: 12px 14px;
  box-shadow: 0 2px 8px rgba(0,0,0,.08);
}
.sd3_panel_hd {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px;
  color: #94a3b8; border-bottom: 1px solid #e5e7eb; padding-bottom: 5px; margin-bottom: 8px;
}
.sd3_panel_x { cursor: pointer; font-size: 16px; color: #94a3b8; padding: 0 4px; }
.sd3_panel_x:hover { color: #1e293b; }
.sd3_panel_intro { font-size: 12px; color: #374151; margin-bottom: 8px; }
.sd3_red { color: #b3373b; }

.sd3_panel_tbl { border-collapse: collapse; margin-bottom: 8px; }
.sd3_panel_tbl td { padding: 4px 10px 4px 0; font-size: 12px; color: #374151; }
.sd3_panel_tbl td:first-child {
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .3px;
  color: #94a3b8; width: 90px;
}
.sd3_bid_input {
  width: 70px; padding: 3px 6px; text-align: right;
  font-size: 13px; font-weight: 700; color: #1e293b;
  border: 1px solid #c8c8a0; border-radius: 3px;
}

.sd3_ack { display: flex; align-items: center; gap: 7px; font-size: 12px; color: #374151; padding: 3px 0; cursor: pointer; }

.sd3_panel_btns { display: flex; gap: 8px; margin: 10px 0; }
.sd3_confirm { font-size: 11px; padding: 4px 14px; background: #0d420d; border-color: #0d420d; color: #fff; }
.sd3_confirm:hover { background: #1b5e1b; }
.sd3_confirm_off { opacity: .4; cursor: not-allowed; pointer-events: auto; }
.sd3_confirm_off:hover { background: #0d420d; }

/* ── management toggles ── */
.sd3_col_toggle { font-size: 12px; font-weight: 700; color: #374151; padding: 8px 2px; }

/* ── band responsive ── */
@media (max-width: 760px) {
  .sd3_band { flex-wrap: wrap; padding: 10px 12px; }
  .sd3_pic { width: 76px; height: 62px; }
  .sd3_name { font-size: 20px; }
  .sd3_side { width: 100%; flex-direction: row; justify-content: space-between; align-items: center; }
}

.sd3_body {
  padding: 1em;
  max-width: 1300px;
  margin: auto;
}


/* =============================================================================
   SD_20260805 v3.4 — expand rows visible at EVERY width + progressive columns
   ========================================================================== */

/* THE FIX for "expand for more closes too early / only works as it collapses":
   ehr_legacy_08_stablepage_ratings.css hides .stable_horse_list_expanded_row at
   min-width:650px -- correct on the STABLE page, where wide screens show every
   column and the expand content is redundant. On the sire screen the crop and
   best-horses detail lives ONLY in that row, so the suppression made it
   unreachable exactly when there was the most room. Scoped re-enable at
   (0,2,0), which outranks the legacy (0,1,0) rule at any width; the legacy
   sheet itself is untouched because the stable page depends on it. */
.sd_stats .stable_horse_list_expanded_row,
.sd_best  .stable_horse_list_expanded_row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

/* Progressive crop columns. Core (Year Rnr Wnr Wnr% D/T% S/R%) always shows --
   the splits a breeder shops on stay put; counting stats join as room appears.
   Tiers hide in a RANGE because the layout is two-column above 980px and
   single-column below it: the cell is ~half the viewport when the grid is
   side-by-side, then gets the full width back when it stacks -- so a column
   hidden at 1200px can honestly return at 900px.
       t3  SWnr% GWnr%   needs the most room
       t2  SW GW
       t1  Rank $/Rnr    last to go
   Below 980 (stacked, full width) everything fits again until true-narrow. */
@media (max-width: 1500px) and (min-width: 981px) { .sdc_t3 { display: none; } }
@media (max-width: 1300px) and (min-width: 981px) { .sdc_t2 { display: none; } }
@media (max-width: 1150px) and (min-width: 981px) { .sdc_t1 { display: none; } }
@media (max-width: 760px) { .sdc_t3 { display: none; } }
@media (max-width: 640px) { .sdc_t2 { display: none; } }
@media (max-width: 520px) { .sdc_t1 { display: none; } }

/* CROPLIST_20261026 (run 452 / paste 452, owner 10-26): Record by crop -- a crop year opens onto its horses, the top 50 by
   earnings (sire_crop.py + sire_crop.j2, loaded into .sd_crop_slot by sd_cropOpen in js/automated.js). The slot wraps and
   never widens the crop table (the inline-load rule: white-space normal + contain inline-size). Its columns join as the
   cell widens, in the same ranges as the crop columns above: t1 Damsire + Best, t2 Brd, t3 Owner. */
.sd_stats td.sd_year_open { cursor: pointer; text-decoration: underline dotted; text-underline-offset: 3px; }
.sd_crop_slot { white-space: normal; contain: inline-size; }
.sd_crop_list { margin: 6px 0 8px; }
.sd_crop_hd { font-size: 12px; font-weight: 700; color: #374151; padding: 2px 6px 4px; }
.sd_crop_msg { font-size: 12px; color: #6b7280; padding: 6px; }
.sd_crop_tbl th, .sd_crop_tbl td { padding: 4px 5px; }
.sd_crop_tbl th { white-space: normal; }
@media (max-width: 1250px) and (min-width: 981px) { .sdl_t1 { display: none; } }
@media (max-width: 1100px) and (min-width: 981px) { .sdl_t2 { display: none; } }
@media (max-width: 760px) { .sdl_t1 { display: none; } }
@media (max-width: 560px) { .sdl_t2 { display: none; } }
@media (max-width: 440px) { .sdl_t3 { display: none; } }

/* v3.5 — the hotlist's X vocabulary in the matrix (credit ceiling / expired),
   and the point-sire dash. Bold black-on-yellow like the list's sirecred_x so
   the two screens read identically. */
.sd3_m_ceiling, .sd3_m_expired { background:#111; }
.sd3_m_x    { display:block; font-size:15px; font-weight:700; color:#ffd21f; line-height:1.2; }  /* exact sirecred_x yellow */
.sd3_m_ceiling .sd3_m_state { color:#c9b246; font-style:normal; }
.sd3_m_dash { display:block; font-size:15px; font-weight:700; color:#b9c2cc; }


/* ===========================================================================
   MARE_LIST_20260805  +  MARE_DETAIL_20260805        prefix: ml_ / md_
   Companions: its endpoint + mare_detail.py

   Reuses the shared sd_ vocabulary wholesale (sd_table, sd_btn, sd_sect_hd,
   sd_footnote, sd_note, sd_sexchip, sd_hname, sd_ped_*, sd_counters) rather
   than re-inventing it. Only what is genuinely new to these two screens is
   defined here.
   =========================================================================== */

/* ---- KITLOOK_20261018: the Find Mares / Lease Market rules of this block (.ml_wrap .ml_head .ml_title .ml_sub .ml_filters
   .ml_go .ml_note .ml_via* .ml_free .ml_pager .ml_pageno .ml_num, the ml_table / ml_t* / ml_act / ml_actbar rules below)
   -> MOVED KITLOOK_20261018: css/ehr_page_breeding_mares.css. The md_ (mare detail) rules and the shared .ml_f stay here. */
.md_wrap { padding: 6px 8px 18px 8px; padding: 2em; max-width: 1300px; margin: auto; }

.ml_f        { display: flex; flex-direction: column; gap: 3px; font-size: 12px; }
.ml_f span   { opacity: 0.75; }
.ml_f select, .ml_f input { height: 28px; padding: 2px 6px; }

.md_note {
  padding: 14px 16px; margin: 10px 0; border-radius: 8px;
  background: rgba(0,0,0,0.05); line-height: 1.5;
}

/* A number column's HEADER right-aligns with its data. The bare .md_num rule
   is (0,1,0) and loses to `.sd_table th`'s text-align:left at (0,1,1) -- the
   same trap that left the sire screen's crop headers flush left over
   flush-right figures. This restatement at (0,2,1) wins. */
.md_num                   { text-align: right; }
.sd_table th.md_num       { text-align: right; }

/* ── mare detail: identity band ───────────────────────────────────────────
   Same language as the sire band and the horse page: gradient, art left,
   identity centre. */
.md_band {
  display: flex; align-items: center; gap: 16px;
  background: linear-gradient(90deg, rgba(13,66,13,1) 0%, rgba(49,107,49,1) 45%, rgba(85,90,85,1) 100%);
  color: #fff; border-radius: 8px; padding: 14px 18px; margin-bottom: 10px;
}
.md_pic img   { max-height: 92px; max-width: 100%; }
.md_id        { flex: 1 1 auto; min-width: 0; }
.md_name      { font-size: 22px; font-weight: 700; line-height: 1.2; }
.md_tagline   { display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
                font-size: 13px; opacity: 0.95; margin-top: 4px; }
.md_sep       { opacity: 0.5; }
.md_counters  { margin-top: 8px; }
.md_badges    { margin-top: 6px; }

/* ── the verdict panel. The one thing the screen exists to answer, so it
      reads before anything else and is colour-coded. ─────────────────────── */
.md_verdict   { border-radius: 8px; padding: 12px 16px; margin-bottom: 12px;
                border-left: 5px solid transparent; }
.md_v_ok      { background: rgba(46,125,50,0.10);  border-left-color: #2e7d32; }
.md_v_no      { background: rgba(140,20,20,0.08);  border-left-color: #8c1414; }
.md_v_hd      { font-weight: 700; margin-bottom: 3px; }
.md_v_body    { line-height: 1.5; }

.md_grid      { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.md_col       { min-width: 0; }
.md_genbtns   { display: flex; gap: 6px; margin-bottom: 6px; }
.md_foot      { margin-top: 14px; }

/* THE FIX, again, scoped for these screens: ehr_legacy_08_stablepage_ratings.css
   hides .stable_horse_list_expanded_row at min-width:650px. That is correct on
   the stable page, where a wide screen already shows every column and the
   expand content is redundant. Here the dropped tier columns live ONLY in that
   row, so the legacy suppression makes them unreachable exactly when there is
   the most room -- the "expand for more closes too early" bug from the sire
   screen review. Scoped re-enable at (0,2,0), which outranks the legacy (0,1,0)
   rule at any width; the legacy sheet is untouched because the stable page
   depends on it. */
.md_prod  .stable_horse_list_expanded_row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

/* ── progressive columns. Nothing is ever more than one tap away: every tier
      a width hides also lives in the expand row above. Tiers drop in the order
      t1 (widest content) -> t2 -> t3.
      The detail screen stacks its two columns at 980px, so md_t1 returns
      below that -- a column hidden at 1200px can honestly come back at 900px
      once it has the full width instead of half. ─────────────────────────── */
@media (max-width: 1500px) and (min-width: 981px) { .md_t1 { display: none; } }
@media (max-width: 980px)  { .md_grid { grid-template-columns: 1fr; } }
@media (max-width: 620px)  { .md_t1 { display: none; } }

@media (max-width: 700px) {
  .md_band   { flex-wrap: wrap; }
  .md_pic img { max-height: 64px; }
}

/* --- MARE_DETAIL_20260805 : breed panel ---------------------------------- */
.md_v_btns      { margin-top: 10px; }
.md_panel       { max-width: 560px; }
.md_panel_tbl td            { padding: 5px 8px; vertical-align: middle; }
.md_panel_tbl td:first-child { opacity: 0.75; white-space: nowrap; }
.md_panel_tbl select,
.md_panel_tbl input[type=text] { width: 100%; max-width: 320px; height: 28px; }
.md_radio       { margin-right: 14px; white-space: nowrap; }
.md_total_row td { border-top: 1px solid rgba(128,128,128,0.35); padding-top: 9px; }
.md_surcharge   { display: block; font-size: 11px; opacity: 0.75; margin-top: 2px; }
@media (max-width: 620px) {
  .md_panel_tbl td:first-child { white-space: normal; }
  .md_panel_tbl select, .md_panel_tbl input[type=text] { max-width: 100%; }
}
.ml_breed  { padding: 2px 10px; font-size: 12px; }   /* shared: also the horse page's Breed button */
/* ---- MAREDISA3_20261006 / MLFOLD_20261006 / MLCOLS_20261007 (.ml_act, .ml_table cells, .ml_actbar) -> MOVED KITLOOK_20261018: css/ehr_page_breeding_mares.css */

/* ═════════════════════════════════════════════════════════════════════════
   LEASE_20260805                                              prefix: lz_
   Companions: its endpoint (statuses L / B)
               lease_bid_save.py, lease_accept.py
               the template

   The lease market lives INSIDE Find Mares rather than on a screen of its
   own, so this block adds only what the market needs on top of the ml_ / sd_
   vocabulary already defined above: the order book, the two inline
   confirmation panels, and the small state chips in the bid columns.

   Everything that can be hidden by a responsive tier (ml_t1 / ml_t2 / ml_t3)
   also appears in the expand row, so nothing here needs a horizontal
   scrollbar and none is introduced.
   ═════════════════════════════════════════════════════════════════════════ */

/* ---- the bid-column state chips (.lz_none .lz_mine .lz_out .lz_bidn .lz_net .lz_when), the row buttons (.lz_review
   .lz_accept .lz_withdraw), the order book (.lz_book*) and the accept confirmation (.lz_confirm*) -> MOVED KITLOOK_20261018:
   css/ehr_page_breeding_mares.css. The panels below are shared with mare_detail.j2 and stay. */

/* ── inline confirmation panels (shared with mare_detail.j2) ─────────────
   House style: an inline panel, never confirm(). */
.lz_bidbox      { margin-top: 12px; padding-top: 10px;
                  border-top: 1px solid rgba(0,0,0,0.12); }
.lz_bidbox_txt  { font-size: 12px; line-height: 1.5; margin-bottom: 8px; }
/* MAREDISA3_20261006 (render check): the expand row is forced white in every theme, but the dark theme's text is
   #E0E0E0 (1.3:1); dark text on these panel sentences there. */
[data-theme="dark"] .lz_bidbox_txt { color: #1f2937; }
.lz_bidbox_act  { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.lz_bidinput    { width: 110px; }

/* Withdrawal is irreversible for the season, so it gets its own step and its
   own colour rather than sharing the ordinary bid button's affordance. */
.lz_wd    { display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
            margin-top: 8px; padding: 8px 10px; border-radius: 8px;
            background: #f9ecec; }
.lz_warn  { display: block; font-size: 11px; color: #7a2020; line-height: 1.45; }

.lz_go     { font-weight: 700; }
.lz_cancel { opacity: 0.8; }

/* ── inline result line ───────────────────────────────────────────────────
   Empty until something is said, so it takes no vertical space on a panel
   that has not been used yet. */
.lz_msg        { font-size: 12px; line-height: 1.45; margin-top: 6px; }
.lz_msg:empty  { display: none; }
.lz_msg_ok     { color: #1c5b1c; }
.lz_msg_no     { color: #7a2020; }

/* ---- the expand rows inside the lease tables (.lz_table, phone re-enable) -> MOVED KITLOOK_20261018: css/ehr_page_breeding_mares.css */


/* =============================================================================
   WIKI_20260806 — WikiPedigree. Prefix wk_.
   The pedigree CHART itself reuses .sd_ped_* (lines ~343-371) unchanged: those
   rules are already generic and already shared by the sire and mare screens,
   so renaming them for WikiPedigree would break two working pages for cosmetics.
   Only wiki chrome is defined here.
   ========================================================================== */

.wk_wrap { max-width: 1100px; margin: 0 auto; padding: 8px 12px 28px; }

.wk_head { margin: 4px 0 14px; }
.wk_title { margin: 0 0 4px; font-size: 22px; font-weight: 700; color: #20355e; }
.wk_sub { font-size: 13px; color: #5b6472; }
.wk_chip {
  display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 9px;
  background: #e6ecf8; color: #20355e; font-size: 11px; font-weight: 700;
  vertical-align: middle;
}

/* WIKITOOLTABS_20261110 (run list 643, owner 11-10: "show all options the person CAN use ... like the BTB admin header
   bar"; was the 642 Show list .wk_toolbar): the WikiPedigree page tabs, built as Wiki Admin (.wka_tabs) and BTB Admin:
   a hidden radio per tab, the FIRST children of .wk_tabs (the ~ selectors), a kit <label class="pg_tab"> per tab; the
   checked radio underlines its tab. wk_toolShow (automated.js) shows the part of the page. The kit bar wraps on a phone. */
.wk_tabs           { position: relative; margin: 10px 0 0; }
.wk_tab_radio      { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.wk_tab            { user-select: none; cursor: pointer; }
#wk_tool_s:checked     ~ .wk_tabbar .wk_tab_s,
#wk_tool_lg:checked    ~ .wk_tabbar .wk_tab_lg,
#wk_tool_ch:checked    ~ .wk_tabbar .wk_tab_ch,
#wk_tool_add:checked   ~ .wk_tabbar .wk_tab_add,
#wk_tool_ac:checked    ~ .wk_tabbar .wk_tab_ac,
#wk_tool_rc:checked    ~ .wk_tabbar .wk_tab_rc,
#wk_tool_admin:checked ~ .wk_tabbar .wk_tab_admin { font-weight: 700; }
#wk_tool_s:checked     ~ .wk_tabbar .wk_tab_s::after,
#wk_tool_lg:checked    ~ .wk_tabbar .wk_tab_lg::after,
#wk_tool_ch:checked    ~ .wk_tabbar .wk_tab_ch::after,
#wk_tool_add:checked   ~ .wk_tabbar .wk_tab_add::after,
#wk_tool_ac:checked    ~ .wk_tabbar .wk_tab_ac::after,
#wk_tool_rc:checked    ~ .wk_tabbar .wk_tab_rc::after,
#wk_tool_admin:checked ~ .wk_tabbar .wk_tab_admin::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0;
                                                          height: .25rem; background: var(--ehr-theme-accent); }
#wk_tool_s:focus-visible     ~ .wk_tabbar .wk_tab_s,
#wk_tool_lg:focus-visible    ~ .wk_tabbar .wk_tab_lg,
#wk_tool_ch:focus-visible    ~ .wk_tabbar .wk_tab_ch,
#wk_tool_add:focus-visible   ~ .wk_tabbar .wk_tab_add,
#wk_tool_ac:focus-visible    ~ .wk_tabbar .wk_tab_ac,
#wk_tool_rc:focus-visible    ~ .wk_tabbar .wk_tab_rc,
#wk_tool_admin:focus-visible ~ .wk_tabbar .wk_tab_admin { outline: 2px solid var(--ehr-action); outline-offset: -2px; }

/* CHEFLIST_20261127 (run list 804, owner 11-27: "a chef-de-race list of the sires ... clicking on each attribute and
   displaying the list"): the Chefs-de-race tab (wiki_chefs.j2). A hidden radio per category (the FIRST children of .wk_cl,
   for the ~ selectors), a kit label per category; the checked radio lights its tab, shows its line and hides every row
   without that category (a row carries wk_cl_<letter> for each of its one or two). No script. */
.wk_cl             { position: relative; margin: 6px 0 0; }
.wk_cl_radio       { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.wk_cl_tab         { user-select: none; cursor: pointer; }
.wk_cl_n           { margin-left: .35em; font-size: .85em; font-weight: 400; opacity: .75; }
#wk_cl_f_all:checked ~ .wk_cl_bar .wk_cl_tab_all,
#wk_cl_f_B:checked ~ .wk_cl_bar .wk_cl_tab_B,
#wk_cl_f_I:checked ~ .wk_cl_bar .wk_cl_tab_I,
#wk_cl_f_C:checked ~ .wk_cl_bar .wk_cl_tab_C,
#wk_cl_f_S:checked ~ .wk_cl_bar .wk_cl_tab_S,
#wk_cl_f_P:checked ~ .wk_cl_bar .wk_cl_tab_P { font-weight: 700; }
#wk_cl_f_all:checked ~ .wk_cl_bar .wk_cl_tab_all::after,
#wk_cl_f_B:checked ~ .wk_cl_bar .wk_cl_tab_B::after,
#wk_cl_f_I:checked ~ .wk_cl_bar .wk_cl_tab_I::after,
#wk_cl_f_C:checked ~ .wk_cl_bar .wk_cl_tab_C::after,
#wk_cl_f_S:checked ~ .wk_cl_bar .wk_cl_tab_S::after,
#wk_cl_f_P:checked ~ .wk_cl_bar .wk_cl_tab_P::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: .25rem; background: var(--ehr-theme-accent); }
#wk_cl_f_all:focus-visible ~ .wk_cl_bar .wk_cl_tab_all,
#wk_cl_f_B:focus-visible ~ .wk_cl_bar .wk_cl_tab_B,
#wk_cl_f_I:focus-visible ~ .wk_cl_bar .wk_cl_tab_I,
#wk_cl_f_C:focus-visible ~ .wk_cl_bar .wk_cl_tab_C,
#wk_cl_f_S:focus-visible ~ .wk_cl_bar .wk_cl_tab_S,
#wk_cl_f_P:focus-visible ~ .wk_cl_bar .wk_cl_tab_P { outline: 2px solid var(--ehr-action); outline-offset: -2px; }
.wk_cl_says        { margin: 8px 0 6px; }
.wk_cl_say         { display: none; }
#wk_cl_f_all:checked ~ .wk_cl_says .wk_cl_say_all,
#wk_cl_f_B:checked ~ .wk_cl_says .wk_cl_say_B,
#wk_cl_f_I:checked ~ .wk_cl_says .wk_cl_say_I,
#wk_cl_f_C:checked ~ .wk_cl_says .wk_cl_say_C,
#wk_cl_f_S:checked ~ .wk_cl_says .wk_cl_say_S,
#wk_cl_f_P:checked ~ .wk_cl_says .wk_cl_say_P { display: inline; }
#wk_cl_f_B:checked ~ .wk_cl_tw .wk_cl_r:not(.wk_cl_B),
#wk_cl_f_I:checked ~ .wk_cl_tw .wk_cl_r:not(.wk_cl_I),
#wk_cl_f_C:checked ~ .wk_cl_tw .wk_cl_r:not(.wk_cl_C),
#wk_cl_f_S:checked ~ .wk_cl_tw .wk_cl_r:not(.wk_cl_S),
#wk_cl_f_P:checked ~ .wk_cl_tw .wk_cl_r:not(.wk_cl_P) { display: none; }
.wk_cl_tw          { max-width: 640px; }
.wk_cl_c_nm        { overflow-wrap: anywhere; }
.wk_cl_c_yr        { width: 4.5em; white-space: nowrap; }
.wk_cl_c_cat       { width: 12em; }
.wk_cl_foot        { margin-top: 8px; }
/* DOSAGELISTS_20261127 (run list 811, owner 11-27): the list bar of the Chefs-de-race tab, drawn only when more than one
   chef-de-race list is switched on. A second hidden radio group (wk_cl_l, also FIRST children of .wk_cl): All lists = the
   Expanded pick, one row per sire (wk_cl_pick); a list = its own rows (wk_cl_lst_<code>). Both groups hide with
   display:none, so a list and a category stack. A new list code needs its own lines here (L and AZ today). */
.wk_cl_lbar        { margin-bottom: 4px; }
#wk_cl_l_all:checked ~ .wk_cl_lbar .wk_cl_ltab_all,
#wk_cl_l_L:checked ~ .wk_cl_lbar .wk_cl_ltab_L,
#wk_cl_l_AZ:checked ~ .wk_cl_lbar .wk_cl_ltab_AZ { font-weight: 700; }
#wk_cl_l_all:checked ~ .wk_cl_lbar .wk_cl_ltab_all::after,
#wk_cl_l_L:checked ~ .wk_cl_lbar .wk_cl_ltab_L::after,
#wk_cl_l_AZ:checked ~ .wk_cl_lbar .wk_cl_ltab_AZ::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: .25rem; background: var(--ehr-theme-accent); }
#wk_cl_l_all:focus-visible ~ .wk_cl_lbar .wk_cl_ltab_all,
#wk_cl_l_L:focus-visible ~ .wk_cl_lbar .wk_cl_ltab_L,
#wk_cl_l_AZ:focus-visible ~ .wk_cl_lbar .wk_cl_ltab_AZ { outline: 2px solid var(--ehr-action); outline-offset: -2px; }
#wk_cl_l_all:checked ~ .wk_cl_tw .wk_cl_r:not(.wk_cl_pick),
#wk_cl_l_L:checked ~ .wk_cl_tw .wk_cl_r:not(.wk_cl_lst_L),
#wk_cl_l_AZ:checked ~ .wk_cl_tw .wk_cl_r:not(.wk_cl_lst_AZ) { display: none; }
.wk_cl_lp          { display: inline-block; margin-left: .4em; padding: 0 4px; border: 1px solid currentColor; border-radius: 3px; font-size: .8em; opacity: .8; white-space: nowrap; }

/* ── search bar ── */
.wk_searchbar {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  margin: 10px 0 6px;
}
.wk_input {
  padding: 6px 9px; border: 1px solid #c3ccda; border-radius: 4px;
  font-size: 14px; min-width: 220px; flex: 1 1 220px; background: #fff; color: #1c2333;
}
.wk_input_yr { min-width: 78px; max-width: 90px; flex: 0 0 auto; }
.wk_select {
  padding: 6px 8px; border: 1px solid #c3ccda; border-radius: 4px;
  font-size: 14px; background: #fff; color: #1c2333;
}
.wk_check { font-size: 13px; color: #3c4655; display: flex; align-items: center; gap: 4px; }
.wk_note { font-size: 12px; color: #6b7480; margin: 0 0 14px; }

/* ── buttons: same shape language as sd_genbtn so the two screens agree ── */
.wk_btn {
  display: inline-block; padding: 5px 12px; border-radius: 4px; cursor: pointer;
  background: #e9edf4; color: #20355e; font-size: 13px; font-weight: 600;
  border: 1px solid #c3ccda; user-select: none;
}
.wk_btn:hover { background: #dbe3f0; }
.wk_btn_go { background: #20355e; color: #fff; border-color: #20355e; }
.wk_btn_go:hover { background: #2b447a; }
.wk_btn_sm { padding: 3px 9px; font-size: 12px; margin-left: 8px; }

/* ── results ── */
.wk_resultmeta { font-size: 13px; color: #3c4655; margin: 10px 0 8px; }
.wk_hint { color: #6b7480; font-size: 12px; }
.wk_table { width: 100%; border-collapse: collapse; font-size: 13px; }
.wk_table th {
  text-align: left; padding: 6px 8px; border-bottom: 2px solid #c3ccda;
  color: #20355e; font-weight: 700; white-space: nowrap;
}
.wk_table td { padding: 5px 8px; border-bottom: 1px solid #e6e9ee; }
.wk_c { text-align: center; }
.wk_row_m td { background: #f7f9fd; }
.wk_row_f td { background: #fdf6f8; }

/* Clickable ancestor / horse name. Used inside the shared pedigree chart too,
   which is why it lives here rather than under a table-specific selector. */
.wk_ped_link { cursor: pointer; color: #20355e; font-weight: 600; }
.wk_ped_link:hover { text-decoration: underline; }
.wk_row_f .wk_ped_link { color: #8a2b4d; }

.wk_pager { margin: 14px 0 4px; display: flex; gap: 10px; align-items: center; }
.wk_pageno { font-size: 12px; color: #6b7480; }

/* ── facts strip on the horse page ── */
.wk_facts { display: flex; flex-wrap: wrap; gap: 18px; margin: 12px 0 18px; }
.wk_fact { min-width: 150px; }
.wk_fact_lbl {
  font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: #6b7480;
}
.wk_fact_val { font-size: 15px; color: #1c2333; }

/* ── staff-only edit panel ── */
.wk_admin { margin: 20px 0 8px; padding: 12px; border: 1px solid #d8c9a8; border-radius: 5px; background: #fdfaf2; }
.wk_admin_hd { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: #8a6d2b; }
.wk_edit { margin-top: 12px; }
.wk_edit_row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 8px; }
.wk_edit_lbl { min-width: 60px; font-size: 13px; color: #3c4655; }
.wk_msg { font-size: 13px; margin-top: 6px; min-height: 18px; }
.wk_ok  { color: #1d6b3a; }
.wk_err { color: #b3373b; }

/* KITREVIEW_20261018: dark follows data-theme (the theme the player picked), not the device setting; was @media (prefers-color-scheme: dark) */
:root[data-theme="dark"] .wk_title, :root[data-theme="dark"] .wk_ped_link { color: #b8c7e8; }
:root[data-theme="dark"] .wk_input, :root[data-theme="dark"] .wk_select { background: #1c2333; color: #e6e9ee; border-color: #3a4459; }
:root[data-theme="dark"] .wk_row_m td { background: #1a2030; }
:root[data-theme="dark"] .wk_row_f td { background: #2a1c24; }
:root[data-theme="dark"] .wk_table td { border-bottom-color: #2f3747; }
:root[data-theme="dark"] .wk_btn { background: #232c3f; color: #b8c7e8; border-color: #3a4459; }
:root[data-theme="dark"] .wk_admin { background: #2a2418; border-color: #574a2b; }

@media (max-width: 650px) {
  .wk_searchbar { flex-direction: column; align-items: stretch; }
  .wk_input, .wk_input_yr { min-width: 0; max-width: none; width: 100%; }
  /* WIKIADMIN_20261109 (620): in a column the flex-basis of .wk_input (220px) became its HEIGHT (a 220px tall search box on a phone) */
  .wk_searchbar > .wk_input { flex: 0 0 auto; }
  .wk_facts { gap: 10px; }
}

/* pending / review-queue markers (WIKI_20260806) */
.wk_pending {
  display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 9px;
  background: #fdf0d5; color: #8a6d2b; border: 1px solid #e6d3a3;
  font-size: 11px; font-weight: 700; vertical-align: middle; white-space: nowrap;
}
.wk_suggestbox { border-color: #c3ccda; background: #f7f9fd; }
.wk_suglist { margin: 6px 0 10px; padding-left: 18px; font-size: 13px; }
.wk_suglist li { margin-bottom: 5px; }
.wk_btn_bad { background: #f7e2e3; color: #b3373b; border-color: #e3bfc1; }
.wk_btn_bad:hover { background: #f0d0d2; }

/* KITREVIEW_20261018: dark follows data-theme (the theme the player picked), not the device setting; was @media (prefers-color-scheme: dark) */
:root[data-theme="dark"] .wk_pending { background: #3a2f18; color: #e0c98a; border-color: #574a2b; }
:root[data-theme="dark"] .wk_suggestbox { background: #1a2030; border-color: #3a4459; }
:root[data-theme="dark"] .wk_btn_bad { background: #3a2124; color: #e8a7aa; border-color: #5c3236; }
.wk_studbox {
  margin: 4px 0 18px; padding: 10px 12px; border: 1px solid #c3ccda;
  border-radius: 5px; background: #f7f9fd;
}
.wk_studbox .wk_facts { margin: 8px 0 0; }
/* KITREVIEW_20261018: dark follows data-theme (the theme the player picked), not the device setting; was @media (prefers-color-scheme: dark) */
:root[data-theme="dark"] .wk_studbox { background: #1a2030; border-color: #3a4459; }

/* WIKISTUD_20261101 (paste 522): the At stud form of a stallion (wiki_horse.j2) */
.wk_input_fee { min-width: 110px; max-width: 160px; flex: 0 0 auto; }
.wk_sd_inline { display: inline-flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-left: 10px; }
.wk_studform .wk_select { max-width: 240px; }
/* wk_post resets the class of the message spot, so the list rule keeps it inline too */
.wk_msg_inline, .wk_suglist .wk_msg { display: inline-block; min-height: 0; margin: 0 0 0 6px; }
@media (max-width: 650px) {
  .wk_sd_inline { margin-left: 0; }
  .wk_studform .wk_select { max-width: none; width: 100%; }
  .wk_input_fee, .wk_studform .wk_input_yr { max-width: none; flex: 1 1 auto; }
}

/* ── WIKI add panel, rebuilt 2026-08-22 ────────────────────────────────
   Parent PICKERS (search + click, no typed ids), repeatable reference
   links, and the scope notice. Appended rather than woven in, so the
   existing wiki rules keep their source order and specificity. */

/* Scope notice: what belongs in WikiPedigree. Deliberately quieter than a
   warning -- it is guidance before the form, not an error after it. */
.wk_scope {
  margin: 10px 0 2px; padding: 8px 10px; font-size: 12.5px; line-height: 1.5;
  color: #3c4655; background: #f2f6fd; border: 1px solid #ccd8ea;
  border-left: 3px solid #20355e; border-radius: 4px;
}

/* Picker. The row grows to its own line because the results list needs the
   full width -- a name plus year plus badge does not fit beside a label. */
.wk_pick_row { align-items: flex-start; }
.wk_pick { flex: 1 1 320px; min-width: 260px; }
.wk_pick_find { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.wk_pick_q { flex: 1 1 200px; }

/* Chosen chip. Reads as settled -- green-ish and bordered, clearly not an
   input any more, with Change the only thing left to click. */
.wk_pick_chosen {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
  padding: 5px 8px; border: 1px solid #b9d5c2; border-radius: 4px;
  background: #f1f8f3;
}
.wk_pick_name { font-weight: 600; color: #1d4b30; font-size: 13px; }

/* Results. Capped height with its own scroll: 12 hits must never push the
   Submit button off the screen. */
.wk_pick_res { margin-top: 6px; max-height: 230px; overflow-y: auto; }
.wk_pick_res:empty { margin-top: 0; }
.wk_pick_hit {
  padding: 5px 8px; font-size: 13px; cursor: pointer; border-radius: 3px;
  border: 1px solid transparent; color: #1c2333;
}
.wk_pick_hit:hover { background: #e8eefa; border-color: #ccd8ea; }
.wk_pick_yr { color: #6b7480; font-size: 12px; }
.wk_pick_sx { color: #6b7480; font-size: 12px; font-style: italic; }
.wk_pick_msg { font-size: 12px; color: #6b7480; padding: 4px 2px; }

/* Reference links. LINKS ONLY -- there is no upload control anywhere here
   by design, and the hint under the button says so. */
.wk_links { margin: 12px 0 10px; padding-top: 10px; border-top: 1px dashed #ddd3ba; }
.wk_links_hd { min-width: 0; margin-bottom: 6px; font-weight: 600; }
.wk_link_row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 6px; }
.wk_link_url { flex: 2 1 260px; }
.wk_link_lbl { flex: 1 1 150px; }
.wk_btn_x { background: #f7e2e3; color: #b3373b; border-color: #e3bfc1; margin-left: 0; }
.wk_btn_x:hover { background: #f0d0d2; }

/* The rendered list on a horse page. rel=nofollow noopener is set in the
   template; the visual break marks them as leaving the site. */
.wk_linklist { margin: 6px 0 0; padding-left: 18px; font-size: 13px; }
.wk_linklist li { margin-bottom: 4px; }
.wk_linklist a { color: #20355e; }
.wk_linkhost { color: #6b7480; font-size: 12px; }

/* KITREVIEW_20261018: dark follows data-theme (the theme the player picked), not the device setting; was @media (prefers-color-scheme: dark) */
:root[data-theme="dark"] .wk_scope { background: #1a2030; border-color: #3a4459; border-left-color: #6c8ac4; color: #c7cedb; }
:root[data-theme="dark"] .wk_pick_chosen { background: #16281d; border-color: #2f5138; }
:root[data-theme="dark"] .wk_pick_name { color: #9fd8b3; }
:root[data-theme="dark"] .wk_pick_hit { color: #d7dce5; }
:root[data-theme="dark"] .wk_pick_hit:hover { background: #212a3d; border-color: #3a4459; }
:root[data-theme="dark"] .wk_links { border-top-color: #574a2b; }
:root[data-theme="dark"] .wk_btn_x { background: #3a2124; color: #e8a7aa; border-color: #5c3236; }
:root[data-theme="dark"] .wk_linklist a { color: #9db8e8; }

/* Phones: the label-beside-field layout stops working under ~560px, and the
   picker results need the full width more than the label does. */
@media (max-width: 560px) {
  .wk_pick_row { flex-direction: column; align-items: stretch; }
  .wk_pick { min-width: 0; flex: 0 0 auto; }  /* WIKIADMIN_20261109 (620): was flex-basis 320px = a 320px gap under Sire and Dam in a column */
  .wk_link_url, .wk_link_lbl { flex: 1 1 100%; }
}

/* WIKIROLES_20261108 (paste 601, owner 11-08): WikiPedigree roles, the sire status markers and form, Recent sire info
   (wiki_search.j2, wiki_horse.j2, automated.js wk_rolesDraw / wk_recentDraw). The two lists are rows, not tables: a
   50-character stable name, the chips and the meta line wrap, so a phone never scrolls sideways. Later in the file than
   the phone rule above, so .wk_input_date keeps its width there too. */
.wk_st {
  display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 9px;
  background: #e6ecf8; color: #20355e; border: 1px solid #c9d5ea;
  font-size: 11px; font-weight: 700; vertical-align: middle; white-space: nowrap;
}
.wk_st_ok    { background: #e3f3e8; color: #1d6b3a; border-color: #b9d5c2; }
.wk_st_no    { background: #fdf0d5; color: #8a6d2b; border-color: #e6d3a3; }
.wk_st_dead  { background: #ececec; color: #444b55; border-color: #cfd3d9; }
.wk_st_pen   { background: #efe8f6; color: #5b3c7d; border-color: #d6c8e6; }
.wk_st_super { background: #20355e; color: #fff; border-color: #20355e; }
.wk_st_off   { background: transparent; color: #6b7480; border-color: #c3ccda; font-weight: 600; }
.wk_input_date { min-width: 0; width: 120px; max-width: 120px; flex: 0 0 120px; }
.wk_pair { display: inline-flex; align-items: center; gap: 8px; }   /* a label and its box wrap as one */
.wk_list { margin-top: 8px; }
.wk_lrow { padding: 7px 2px; border-bottom: 1px solid #e6e9ee; font-size: 13px; overflow-wrap: anywhere; }
.wk_lrow:last-child { border-bottom: 0; }
.wk_lrow_main { display: flex; flex-wrap: wrap; align-items: center; row-gap: 4px; min-width: 0; }
.wk_lrow_main .wk_btn_sm { margin-left: auto; }
.wk_lname { min-width: 0; overflow-wrap: anywhere; }
.wk_lrow_meta { margin-top: 2px; }
.wk_lrow_off .wk_lname { color: #6b7480; }
.wk_ssby { overflow-wrap: anywhere; }   /* who confirmed it, beside the horse name: a 50-character stable name wraps */
/* the 601 answers name a stable (Granted / Revoked: the group of <name> ...): a 50-character name wraps there too */
#wk_rl_msg, #wk_rc_msg, [id^="wk_ss_msg_"] { overflow-wrap: anywhere; }

/* KITREVIEW_20261018 convention: dark follows data-theme (the theme the player picked) */
:root[data-theme="dark"] .wk_st       { background: #232c3f; color: #b8c7e8; border-color: #3a4459; }
:root[data-theme="dark"] .wk_st_ok    { background: #16281d; color: #9fd8b3; border-color: #2f5138; }
:root[data-theme="dark"] .wk_st_no    { background: #3a2f18; color: #e0c98a; border-color: #574a2b; }
:root[data-theme="dark"] .wk_st_dead  { background: #2a2d33; color: #c9ced6; border-color: #454b55; }
:root[data-theme="dark"] .wk_st_pen   { background: #2b2238; color: #cdb8e6; border-color: #4a3a60; }
:root[data-theme="dark"] .wk_st_super { background: #b8c7e8; color: #1c2333; border-color: #b8c7e8; }
:root[data-theme="dark"] .wk_st_off   { background: transparent; color: #9aa3b2; border-color: #3a4459; }
:root[data-theme="dark"] .wk_lrow     { border-bottom-color: #2f3747; }
:root[data-theme="dark"] .wk_lrow_off .wk_lname { color: #9aa3b2; }

/* WIKILEGACY_20261109 (run list 617) / WIKIADDSTUD_20261109 (618) / WIKIRATE_20261109 (619): Search legacy wiki
   (wiki_legacy_rows.j2, wiki_legacy_one.j2), the marks of its pedigree chart (_ped_chart.j2 adds wk_mk_<mark> to a
   cell: where that ancestor lives), Add a Horse and the Player opinions card. A mark is a thick left edge, so a
   4-generation chart stays as narrow as before; the legend under the chart names the colours in words. */
.wk_lg_one { margin: 6px 0 4px; }
.wk_lg_box { padding: 8px; border: 1px solid #d8c9a8; border-radius: 5px; background: #fff; }
.sd_ped_cell.wk_mk_new     { box-shadow: inset 4px 0 0 #2f8a4e; }
.sd_ped_cell.wk_mk_copy    { box-shadow: inset 4px 0 0 #d39b22; }
.sd_ped_cell.wk_mk_missing { box-shadow: inset 4px 0 0 #9aa3b2; }
.sd_ped_cell.wk_mk_hidden  { box-shadow: inset 4px 0 0 #b03a3a; }
.wk_lg_legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 6px 0 8px; font-size: 12px; }
.wk_mk_key { padding-left: 10px; box-shadow: inset 4px 0 0 #9aa3b2; }
.wk_mk_key.wk_mk_new    { box-shadow: inset 4px 0 0 #2f8a4e; }
.wk_mk_key.wk_mk_copy   { box-shadow: inset 4px 0 0 #d39b22; }
.wk_mk_key.wk_mk_hidden { box-shadow: inset 4px 0 0 #b03a3a; }
.wk_a_stud .wk_btn_sm { margin-left: 0; }
#wk_addmsg, [id^="wk_lgmsg_"], [id^="wk_rt_msg_"] { overflow-wrap: anywhere; }
[id^="wk_rtform_"] .wk_select { max-width: 100%; min-width: 0; }
@media (max-width: 650px) {
  [id^="wk_rtform_"] .wk_edit_row { flex-wrap: wrap; }
  [id^="wk_rtform_"] .wk_select { flex: 1 1 100%; }
}
:root[data-theme="dark"] .wk_lg_box { background: transparent; border-color: #3a4459; }

/* WIKISEARCHTABLE_20261110 (run list 638, owner 11-10) + WIKINEWFIND_20261110 (run list 640): both WikiPedigree searches as
   one six-column sortable table, .wk_rtable (wiki_rows.j2 #wk_res_table, wiki_legacy_rows.j2 #wk_lg_table): Horse Name with
   the ID line under it, Sex, Born, Sire, Dam Sire, Dam. The legacy view opens in a hidden row under its horse
   (.wk_lg_onerow): a load into a table row must not widen the table (white-space normal + contain inline-size, the 10-22
   rule). Phone, 650px and under: Dam Sire and Dam are hidden and a line under the name carries them (.wk_phpar), smaller
   type and padding, headers wrap, long names break: nothing scrolls sideways. */
.wk_rtable td { vertical-align: top; }
.wk_rtable th[data-msort] { cursor: pointer; user-select: none; }
.wk_rtable .wk_c_sex { width: 2.6em; }
.wk_rtable .wk_c_yr { width: 3.6em; }
.wk_rtable td.wk_c_nm, .wk_rtable td.wk_c_par { overflow-wrap: anywhere; }
.wk_rtable .wk_idline { margin-top: 1px; }
.wk_rtable .wk_phpar { display: none; margin-top: 1px; }
.wk_lgmeta { display: flex; flex-wrap: wrap; align-items: center; row-gap: 3px; margin-top: 2px; }
.wk_lgmeta .wk_btn_sm { margin-left: 8px; }
/* the speed icon just left of Horse Name (_wiki_sort.j2 wkSpeed): an empty span, the glyph drawn here so the header's text
   stays its label for misc_sortTable (incJS_11_misc_pages.js matches the header text) */
.wk_speed { margin-right: 4px; font-size: 0.85em; }
.wk_speed_fast::before { content: "\26A1"; }
.wk_speed_slow::before { content: "\1F422"; }
.wk_rtable tr.wk_lg_onerow > td.wk_lg_onecell { white-space: normal; contain: inline-size; padding: 0 0 8px; background: transparent; }
.wk_rtable .wk_lg_one { margin: 4px 0 0; }
:root[data-theme="dark"] .wk_table th { color: #b8c7e8; border-bottom-color: #3a4459; }
@media (max-width: 650px) {
  .wk_rtable { font-size: 12px; }
  .wk_rtable th, .wk_rtable td { padding: 4px 3px; }
  .wk_rtable th { white-space: normal; }
  .wk_rtable .wk_c_ds, .wk_rtable .wk_c_dam { display: none; }
  .wk_rtable .wk_phpar { display: block; }
  #wk_legacybox { padding: 8px; }
}

/* WIKIADMIN_20261109 (run list 620, owner 11-09: a wiki admin like the btb admin, those alerts on that page): the Wiki
   Admin page (wiki_admin.j2, wiki_admin_rows.j2). Tabs as BTB Admin and SysOp (ehr_page_account.css blocks 11 and 12): a
   hidden radio per tab, the FIRST children of .wka_tabs (the ~ selectors), a kit <label class="pg_tab"> per button; the
   :checked radio shows its panel and underlines its tab. Rows are the .wk_lrow rows of Roles; a row action opens
   .wka_act under its row. The kit tab bar wraps on a phone. */
.wka_tabs          { position: relative; }
.wka_tab_radio     { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.wka_tab           { user-select: none; cursor: pointer; }
#wka_tab_req:checked   ~ .wka_tabbar .wka_tab_req,
#wka_tab_add:checked   ~ .wka_tabbar .wka_tab_add,
#wka_tab_upd:checked   ~ .wka_tabbar .wka_tab_upd,
#wka_tab_rec:checked   ~ .wka_tabbar .wka_tab_rec,
#wka_tab_info:checked  ~ .wka_tabbar .wka_tab_info,
#wka_tab_roles:checked ~ .wka_tabbar .wka_tab_roles { font-weight: 700; }
#wka_tab_req:checked   ~ .wka_tabbar .wka_tab_req::after,
#wka_tab_add:checked   ~ .wka_tabbar .wka_tab_add::after,
#wka_tab_upd:checked   ~ .wka_tabbar .wka_tab_upd::after,
#wka_tab_rec:checked   ~ .wka_tabbar .wka_tab_rec::after,
#wka_tab_info:checked  ~ .wka_tabbar .wka_tab_info::after,
#wka_tab_roles:checked ~ .wka_tabbar .wka_tab_roles::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0;
                                                            height: .25rem; background: var(--ehr-theme-accent); }
#wka_tab_req:focus-visible   ~ .wka_tabbar .wka_tab_req,
#wka_tab_add:focus-visible   ~ .wka_tabbar .wka_tab_add,
#wka_tab_upd:focus-visible   ~ .wka_tabbar .wka_tab_upd,
#wka_tab_rec:focus-visible   ~ .wka_tabbar .wka_tab_rec,
#wka_tab_info:focus-visible  ~ .wka_tabbar .wka_tab_info,
#wka_tab_roles:focus-visible ~ .wka_tabbar .wka_tab_roles { outline: 2px solid var(--ehr-action); outline-offset: -2px; }
.wka_panel         { display: none; padding: 10px 2px 4px; }
#wka_tab_req:checked   ~ .wka_panel_req,
#wka_tab_add:checked   ~ .wka_panel_add,
#wka_tab_upd:checked   ~ .wka_panel_upd,
#wka_tab_rec:checked   ~ .wka_panel_rec,
#wka_tab_info:checked  ~ .wka_panel_info,
#wka_tab_roles:checked ~ .wka_panel_roles { display: block; }
.wka_n             { display: inline-block; min-width: 18px; margin-left: 6px; padding: 0 5px; border-radius: 9px;
                     font-size: 11px; font-weight: 700; line-height: 18px; text-align: center;
                     background: #b03a3a; color: #fff; }
.wka_n_zero        { background: transparent; color: inherit; opacity: .55; font-weight: 400; }
.wka_act           { margin: 6px 0 2px; padding: 8px 10px; border-left: 3px solid #d39b22; background: rgba(211, 155, 34, .07); }
.wka_act .wk_edit_row { flex-wrap: wrap; }
.wka_info          { margin: 4px 0 2px; white-space: pre-wrap; overflow-wrap: anywhere; }
.wka_links         { overflow-wrap: anywhere; }
/* AUDIT2_20261109: a chip that names a stable (now under X) may wrap: a 50 character name must not widen a phone page */
.wk_st.wka_st_wrap { white-space: normal; overflow-wrap: anywhere; }
.wka_row_done .wk_lname { color: #6b7480; }
.wka_panel .wk_admin { margin-top: 0; }
:root[data-theme="dark"] .wka_act { background: rgba(211, 155, 34, .10); }
:root[data-theme="dark"] .wka_row_done .wk_lname { color: #9aa3b2; }

/* =====================================================================
   RETIRED_20260809 -- retired-horse status text (stable list + anywhere
   a status badge is skipped for Status='R'). Pairs with the retired-first
   branches in the template; horsepage_info_v2.jinja shows plain text.
   ===================================================================== */
.shl_retired {
	display: inline-block;
	font-size: 11px;
	font-weight: 600;
	color: #8a8f98;
	text-transform: uppercase;
	letter-spacing: 0.4px;
}

/* =====================================================================
   GCARDS_FIN_20260809 -- account page Financial Overview reworked around
   g-cards (the template). Legacy USD now hides FIRST on narrow screens (it
   used to be the last survivor); Held hides next; Points + g-Cards
   never hide. The old pndpnt/pndclm/pndauct/5max rules in
   ehr_legacy_08_stablepage_ratings.css are orphaned, left in place.
   ===================================================================== */
.stable_page_fin_legacy_tag {
	font-size: 10px;
	font-weight: 400;
	text-transform: lowercase;
	opacity: 0.7;
}
.stable_page_fin_holds_note {
	font-size: 11px;
	color: #8a8f98;
}
/* ACCUSD_20260818: the USD column was removed from the template, so its
   hide-first breakpoint has nothing to hide. Rule and .stable_page_fin_legacy_tag
   above are kept (deprecate in place) — legacy_tag is generic enough to reuse,
   and ehr_legacy_08_stablepage_ratings.css still carries the older orphans. */
@media (max-width: 1000px) {
	/* .stable_page_fin_col_usd { display: none; } */
}
@media (max-width: 800px) {
	.stable_page_fin_col_cardsheld { display: none; }
}
/* ACCUSD_20260818: the "what does Held mean" note under the table. Visible,
   not a tooltip — the label was misread by the owner, so hovering is not a fix. */
.stable_page_fin_note {
	margin: 10px 2px 0;
	font-size: 12px;
	line-height: 1.5;
	color: #6b7280;
	max-width: 68ch;
}
.stable_page_fin_note strong { color: #374151; }

/* =====================================================================
   SIRECARDS_MATRIX_20260809 -- "My Sire Cards" inventory matrix on the
   account page (the template), modeled on the old mysirecards.asp. Uses the
   existing /img/sirecards/sirecard_a..g.png art; empty tiers dim.
   ===================================================================== */
.acc_cardmatrix {
	display: flex;
	flex-flow: row wrap;
	gap: 14px;
	padding: 6px 2px;
}
.acc_cardmatrix_cell {
	text-align: center;
}
.acc_cardmatrix_imgwrap {
	position: relative;
	display: inline-block;
}
.acc_cardmatrix_imgwrap img {
	width: 92px;
	height: auto;
	display: block;
	border-radius: 6px;
	box-shadow: 0 1px 4px rgba(0,0,0,0.35);
}
.acc_cardmatrix_count {
	position: absolute;
	top: -7px;
	right: -7px;
	min-width: 22px;
	padding: 2px 6px;
	border-radius: 11px;
	background: #030369;
	color: #fff;
	font-size: 12px;
	font-weight: 700;
	line-height: 1.4;
	box-shadow: 0 1px 3px rgba(0,0,0,0.4);
}
.acc_cardmatrix_label {
	margin-top: 6px;
	font-size: 12px;
	font-weight: 600;
}
.acc_cardmatrix_gtag {
	display: inline-block;
	margin-left: 3px;
	padding: 1px 6px;
	border-radius: 9px;
	background: #1a6b3c;
	color: #fff;
	font-size: 10px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.3px;
}
.acc_cardmatrix_empty {
	opacity: 0.35;
}
@media (max-width: 600px) {
	.acc_cardmatrix { gap: 10px; }
	.acc_cardmatrix_imgwrap img { width: 72px; }
}

/* =====================================================================
   LEASE_LISTING_20260809 -- owner-side listing controls added to the
   lease market + my-mares list (the template). Reuses sd_btn /
   lz_withdraw / lz_wd / lz_msg from LEASE_20260805; only the few new
   hooks are defined here.
   ===================================================================== */
.ml_list {
	margin-left: 6px;
}
.lz_listbox {
	margin: 8px 0;
}
/* ---- .lz_ownerbar -> MOVED KITLOOK_20261018: css/ehr_page_breeding_mares.css */


/* =====================================================================
   WELCOME_20260810 -- new-player getting-started one-pager.
   ===================================================================== */
.welcome_wrap {
	max-width: 920px;
	margin: 0 auto;
	padding: 8px 12px 40px;
}
/* Re-skin 2026-08-12: theme tokens (--ehr-*) instead of hardcoded navy,
   so the page follows the active theme (incl. the green "derby"). */
.welcome_hero {
	background: var(--ehr-theme-gradient, linear-gradient(135deg, #1a5e1a, #0c420c));
	color: #ffffff;
	border-radius: 14px;
	padding: 26px 28px;
	margin-bottom: 18px;
	box-shadow: 0 6px 18px rgba(0,0,0,0.12);
}
.welcome_hero_title {
	font-size: 24px;
	font-weight: 800;
	margin-bottom: 6px;
	text-shadow: 0 1px 4px rgba(0,0,0,0.25);
}
.welcome_hero_sub {
	font-size: 14px;
	line-height: 1.6;
	opacity: 0.92;
}
.welcome_notice {
	background: #fff7e6;
	border: 1px solid #ffd98a;
	color: #7a5200;
	border-radius: 8px;
	padding: 12px 14px;
	margin-bottom: 16px;
	font-size: 14px;
}
.welcome_horses {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
	gap: 12px;
	margin-top: 8px;
}
.welcome_horse_card {
	position: relative;
	border: 1px solid var(--ehr-border, #e0e0e0);
	border-radius: 12px;
	padding: 14px 14px 12px;
	background: #ffffff;
	box-shadow: 0 1px 3px rgba(0,0,0,0.06);
	overflow: hidden;
}
/* Racing-silk accent stripe along the top of each card */
.welcome_horse_card::before {
	content: "";
	position: absolute;
	top: 0; left: 0; right: 0;
	height: 4px;
	background: var(--ehr-theme-gradient, linear-gradient(135deg, #1a5e1a, #0c420c));
}
/* Clickable starter-horse card: opens the horse one-pager in a new tab.
   Scoped to the anchor form so it never affects a plain-div usage. */
a.welcome_horse_card {
	display: block;
	text-decoration: none;
	color: inherit;
	cursor: pointer;
	transition: border-color .15s ease, box-shadow .15s ease, transform .12s ease;
}
a.welcome_horse_card:hover {
	border-color: var(--ehr-theme-accent, #2d8a2d);
	box-shadow: 0 6px 16px rgba(0,0,0,0.14);
	transform: translateY(-2px);
}
.welcome_horse_view {
	margin-top: 8px;
	font-size: 12px;
	font-weight: 600;
	color: var(--ehr-link, #0c420c);
	opacity: 0.9;
}
.welcome_horse_name {
	font-weight: 700;
	font-size: 15px;
	margin-bottom: 4px;
}
.welcome_horse_meta {
	font-size: 12px;
	opacity: 0.8;
	margin-bottom: 4px;
}
.welcome_horse_sire {
	opacity: 0.75;
}
.welcome_horse_rec {
	font-size: 12px;
	opacity: 0.7;
}
.welcome_horse_empty {
	grid-column: 1 / -1;
	opacity: 0.7;
	font-size: 13px;
	padding: 10px;
}
.welcome_cta_row {
	margin-top: 14px;
}
.welcome_cta {
	display: inline-block;
	background: #2e7d32;
	color: #ffffff;
	text-decoration: none;
	font-weight: 700;
	font-size: 14px;
	padding: 11px 20px;
	border-radius: 8px;
	box-shadow: 0 2px 6px rgba(46,125,50,0.30);
	transition: background .15s ease, transform .1s ease;
}
.welcome_cta:hover {
	background: #256428;
	transform: translateY(-1px);
}

/* =====================================================================
   CHECKBOARD_20260810 -- milestones checkboard (tile grid + expandable).
   ===================================================================== */
.cb_progress {
	font-size: 12px;
	font-weight: 600;
	opacity: 0.7;
	margin-left: 10px;
}
.cb_intro {
	font-size: 13px;
	line-height: 1.5;
	opacity: 0.8;
	margin: 4px 0 12px;
}
.cb_note {
	font-size: 12px;
	line-height: 1.5;
	color: #b26a00;
	background: #fff8e1;
	border: 1px solid #ffe082;
	border-radius: 6px;
	padding: 8px 12px;
	margin: 0 0 14px;
}
/* Milestones progress bar (the template .cb_bar; width set from
   board_done/board_total in the template) */
.cb_bar {
	height: 10px;
	border-radius: 5px;
	background: rgba(0,0,0,0.08);
	overflow: hidden;
	margin: 6px 0 12px;
}
.cb_bar_fill {
	height: 100%;
	border-radius: 5px;
	background: linear-gradient(90deg, #2e7d32, #67b26f);
	transition: width .4s ease;
	min-width: 0;
}
/* Welcome "how to race" — numbered step circles (CSS counter, no markup
   change: the <ol> lis get a badge instead of the browser's plain digits). */
.welcome_howto {
	margin: 8px 0 16px;
	padding-left: 0;
	font-size: 14px;
	line-height: 1.6;
	list-style: none;
	counter-reset: welcome_step;
}
.welcome_howto li {
	position: relative;
	margin-bottom: 10px;
	padding-left: 40px;
	counter-increment: welcome_step;
}
.welcome_howto li::before {
	content: counter(welcome_step);
	position: absolute;
	left: 0;
	top: 0;
	width: 26px;
	height: 26px;
	border-radius: 50%;
	background: var(--ehr-theme-gradient, linear-gradient(135deg, #1a5e1a, #0c420c));
	color: #ffffff;
	font-weight: 800;
	font-size: 13px;
	display: flex;
	align-items: center;
	justify-content: center;
}
.welcome_howto strong { color: var(--ehr-link, #0c420c); }
.welcome_tiers {
	background: rgba(0,0,0,0.03);
	border: 1px solid var(--ehr-border, #e0e0e0);
	border-radius: 10px;
	padding: 12px 16px;
}
.welcome_tiers_title {
	font-size: 12px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	opacity: 0.7;
	margin-bottom: 6px;
}
.welcome_tiers ul { margin: 0; padding-left: 20px; font-size: 13px; line-height: 1.55; }
.welcome_tiers li { margin-bottom: 5px; }
.welcome_tiers strong { color: var(--ehr-link, #0c420c); }
.cb_group_label {
	font-size: 12px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	opacity: 0.6;
	margin: 14px 0 6px;
}
.cb_grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
	gap: 10px;
}
/* Re-skin 2026-08-12: solid cards instead of the washed opacity look. */
.cb_tile {
	border: 1px solid var(--ehr-border, #e0e0e0);
	border-radius: 10px;
	overflow: hidden;
	background: #ffffff;
	box-shadow: 0 1px 3px rgba(0,0,0,0.05);
	transition: box-shadow .15s ease, border-color .15s ease;
}
.cb_tile:hover {
	border-color: var(--ehr-theme-accent, #2d8a2d);
	box-shadow: 0 3px 10px rgba(0,0,0,0.10);
}
.cb_tile.cb_earned {
	border-color: #7cc47f;
	background: linear-gradient(0deg, rgba(46,125,50,0.07), rgba(46,125,50,0.07)), #ffffff;
}
.cb_tile_head {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 11px 12px;
	cursor: pointer;
	user-select: none;
}
.cb_icon {
	font-size: 18px;
}
.cb_title {
	font-weight: 700;
	font-size: 14px;
	flex: 1 1 auto;
}
.cb_state {
	flex: 0 0 auto;
}
.cb_check {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 20px;
	height: 20px;
	border-radius: 50%;
	background: #2e7d32;
	color: #ffffff;
	font-weight: 900;
	font-size: 11px;
}
.cb_lock {
	opacity: 0.35;
}
.cb_arrow {
	flex: 0 0 auto;
	font-size: 10px;
	opacity: 0.55;
	transition: transform 0.15s ease;
}
.cb_tile_head.cb_open .cb_arrow {
	transform: rotate(90deg);
}
.cb_body {
	display: none;
	padding: 0 12px 12px 12px;
	font-size: 13px;
	line-height: 1.5;
}
.cb_body.cb_open {
	display: block;
}
.cb_goal {
	opacity: 0.85;
}
.cb_reward {
	margin-top: 8px;
	font-weight: 700;
	font-size: 12px;
	color: #b8860b;
}
.cb_optional_note {
	margin-top: 6px;
	font-size: 11px;
	font-style: italic;
	opacity: 0.6;
}
@media (max-width: 600px) {
	.cb_grid, .welcome_horses {
		grid-template-columns: 1fr;
	}
}

/* =====================================================================
   SIGNUP_UI_20260812 -- shared pre-auth skin for the signup funnel
   (the template, the template, the template, the template).
   Matches the redesigned login page (will_login.css): green header bar,
   turf-texture hero, floating white card. Prefix suw_. Templates carry
   NO <style> blocks -- all funnel styling lives here.
   ===================================================================== */
.suw_page {
	margin: 0;
	font-family: Arial, sans-serif;
	display: flex;
	flex-direction: column;
	min-height: 100vh;
}

/* Header bar -- same green + lime mark as .login-header */
.suw_head {
	padding: .55rem 1rem;
	background-color: #0c420c;
	box-shadow: 0 4px 6px -4px rgba(0, 0, 0, 0.5);
	position: relative;
	z-index: 3;
}
.suw_brand {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	text-decoration: none;
}
.suw_brand_mark {
	font-size: 1.4rem;
	font-weight: 800;
	color: #84cc16;
	letter-spacing: .5px;
}
.suw_brand_name {
	color: #ffffff;
	font-weight: 700;
	font-size: 1.05rem;
	line-height: 1.15;
}
.suw_brand_sub {
	display: block;
	font-weight: 400;
	font-size: .68rem;
	color: rgba(255,255,255,0.65);
}

/* Turf hero -- same treatment as .login-hero */
.suw_hero {
	flex: 1 0 auto;
	background:
		linear-gradient(rgba(15,81,50,0.88), rgba(11,56,36,0.94)),
		url('/img/turf-texture.png');
	background-size: cover;
	padding: 40px 20px 56px;
	display: flex;
	justify-content: center;
	align-items: flex-start;
}

/* Two-column signup layout: pitch left, card right */
.suw_cols {
	display: flex;
	flex-wrap: wrap;
	gap: 36px;
	max-width: 1020px;
	width: 100%;
	align-items: flex-start;
	justify-content: center;
}
.suw_pitch {
	flex: 1 1 400px;
	max-width: 520px;
	color: #ffffff;
	padding-top: 14px;
}
.suw_pitch_head {
	font-size: 34px;
	line-height: 1.12;
	font-weight: 800;
	margin: 0 0 14px;
	text-shadow: 0 2px 8px rgba(0,0,0,0.35);
}
.suw_pitch_head .suw_free {
	color: #ffd75e;
}
.suw_pitch_sub {
	font-size: 15px;
	line-height: 1.65;
	color: rgba(255,255,255,0.92);
	margin: 0 0 12px;
}
.suw_pitch_sub strong { color: #ffffff; }
.suw_perks {
	list-style: none;
	padding: 0;
	margin: 20px 0 0;
}
.suw_perks li {
	position: relative;
	padding: 8px 0 8px 42px;
	font-size: 14px;
	line-height: 1.5;
	color: rgba(255,255,255,0.94);
}
.suw_perks .suw_ic {
	position: absolute;
	left: 0;
	top: 6px;
	width: 30px;
	height: 30px;
	border-radius: 50%;
	background: rgba(255,255,255,0.14);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 16px;
}
.suw_perks b { color: #ffd75e; font-weight: 700; }
.suw_community {
	margin-top: 18px;
	font-size: 13px;
	color: rgba(255,255,255,0.75);
	font-style: italic;
}

/* The floating white card (form + state panels) */
.suw_card {
	flex: 0 1 400px;
	width: 100%;
	max-width: 420px;
	background: #ffffff;
	border-radius: 14px;
	box-shadow: 0 20px 50px rgba(0,0,0,0.30);
	padding: 26px 26px 22px;
}
.suw_card_solo {
	/* single-card pages (setpw / resend / resetpw) */
	flex: 0 1 440px;
	max-width: 460px;
}
.suw_card_title {
	font-size: 20px;
	font-weight: 800;
	color: #0c420c;
	margin: 0 0 6px;
}
.suw_card_note {
	font-size: 13px;
	color: #5c6a60;
	line-height: 1.55;
	margin: 0 0 16px;
}
.suw_card_note strong { color: #0c420c; }

/* Form controls */
.suw_group { margin-bottom: 13px; }
.suw_group label {
	display: block;
	font-weight: 600;
	font-size: 13px;
	color: #24352a;
	margin-bottom: 5px;
}
.suw_group label .suw_opt {
	font-weight: 400;
	color: #8a978e;
}
.suw_group input[type="text"],
.suw_group input[type="email"],
.suw_group input[type="password"] {
	width: 100%;
	box-sizing: border-box;
	padding: 0.7rem 0.8rem;
	border: 1px solid #c8d2ca;
	border-radius: 8px;
	font-size: 14px;
	transition: border-color .15s ease, box-shadow .15s ease;
}
.suw_group input:focus {
	outline: none;
	border-color: #1b9e46;
	box-shadow: 0 0 0 3px rgba(27,158,70,0.18);
}
.suw_tos {
	font-size: 13px;
	font-weight: 400;
	color: #24352a;
	display: flex;
	align-items: flex-start;
	gap: 8px;
	margin: 14px 0 0;
	cursor: pointer;
}
.suw_tos input { margin-top: 2px; }
.suw_tos a { color: #1b7a3c; text-decoration: underline; }
.suw_tos a:hover { color: #0c420c; }

/* CTA button */
.suw_cta {
	display: block;
	width: 100%;
	margin-top: 16px;
	background: #1b9e46;
	color: #ffffff;
	border: none;
	border-radius: 8px;
	font-size: 17px;
	font-weight: 800;
	letter-spacing: .3px;
	padding: 13px;
	cursor: pointer;
	transition: background .15s ease, transform .1s ease;
}
.suw_cta:hover { background: #178a3d; }
.suw_cta:active { transform: translateY(1px); }
.suw_cta_dark {
	background: #0c420c;
}
.suw_cta_dark:hover { background: #0a380a; }

/* Under-card link row */
.suw_links {
	text-align: center;
	margin-top: 14px;
	font-size: 13px;
	line-height: 1.9;
}
.suw_links a { color: #4a5c50; text-decoration: underline; }
.suw_links a:hover { color: #0c420c; }

/* Error + state panels (inside the card) */
.suw_err {
	padding: 10px 14px;
	background: #fdecea;
	border: 1px solid #f5c6cb;
	border-radius: 8px;
	color: #b71c1c;
	font-size: 13px;
	line-height: 1.5;
	margin-bottom: 14px;
}
.suw_panel {
	padding: 22px 18px;
	border-radius: 10px;
	text-align: center;
	margin-bottom: 14px;
}
.suw_panel_ok    { background: #e8f5e9; border: 1px solid #a5d6a7; }
.suw_panel_warn  { background: #fff8e1; border: 1px solid #ffe082; }
.suw_panel_bad   { background: #fdecea; border: 1px solid #f5c6cb; }
.suw_panel_ic { font-size: 34px; line-height: 1; margin-bottom: 10px; }
.suw_panel_h  { font-size: 17px; font-weight: 800; margin-bottom: 8px; }
.suw_panel_ok  .suw_panel_h { color: #2e7d32; }
.suw_panel_warn .suw_panel_h { color: #b26a00; }
.suw_panel_bad  .suw_panel_h { color: #b71c1c; }
.suw_panel_b {
	font-size: 14px;
	color: #333333;
	line-height: 1.6;
}

/* Live password checklist (setpw page; automated.js SIGNUP_20260809) */
.suw_rules {
	list-style: none;
	margin: 12px 0 0;
	padding: 12px 14px;
	background: #f5f8f5;
	border: 1px solid #e0e8e0;
	border-radius: 8px;
}
.suw_rules li {
	position: relative;
	font-size: 12.5px;
	color: #6b7a6e;
	line-height: 1.9;
	padding-left: 24px;
}
.suw_rules li::before {
	content: "\25CB"; /* open circle */
	position: absolute;
	left: 2px;
	color: #a9b6ab;
	font-weight: 700;
}
.suw_rules li.suw_ok {
	color: #2e7d32;
}
.suw_rules li.suw_ok::before {
	content: "\2713"; /* check */
	color: #2e7d32;
}

/* SIGNUPCODE_20260822: one-line helper under a field. .suw_rules is a
   checklist <ul> and .suw_opt only styles the word '(optional)' inside a
   label, so neither fits a sentence sitting under an input. Colours are
   lifted from .suw_rules li so it reads as the same family. */
.suw_hint {
	margin-top: 5px;
	font-size: 12.5px;
	line-height: 1.5;
	color: #6b7a6e;
}

/* Footer */
.suw_foot {
	background-color: #222222;
	color: #ffffff;
	text-align: center;
	padding: 1rem;
	font-size: 0.82rem;
}

/* Mobile: single column, FORM FIRST (the visitor already clicked
   "Get Started" -- don't make them scroll past the pitch again). */
@media (max-width: 860px) {
	.suw_hero { padding: 22px 14px 40px; }
	.suw_cols { gap: 22px; }
	.suw_card { order: 1; flex-basis: 100%; max-width: 480px; }
	.suw_pitch { order: 2; flex-basis: 100%; max-width: 480px; padding-top: 0; }
	.suw_pitch_head { font-size: 26px; }
}

/* =====================================================================
   TOS_20260813 -- Terms of Service reading sheet (the template). Rides on the
   suw_ funnel skin: same green header/turf ground, but the card becomes
   a wide, quiet reading surface instead of a form card.
   ===================================================================== */
.tos_hero {
	align-items: flex-start;
	padding: 34px 18px 50px;
}
.tos_sheet {
	background: #ffffff;
	border-radius: 14px;
	box-shadow: 0 20px 50px rgba(0,0,0,0.28);
	padding: 34px 40px 30px;
	max-width: 780px;
	width: 100%;
	color: #2a3430;
}
.tos_head {
	border-bottom: 2px solid #e4eae5;
	padding-bottom: 14px;
	margin-bottom: 20px;
}
.tos_title {
	font-size: 27px;
	font-weight: 800;
	color: #0c420c;
	margin: 0 0 4px;
	line-height: 1.2;
}
.tos_updated {
	font-size: 12px;
	font-weight: 600;
	letter-spacing: .06em;
	text-transform: uppercase;
	color: #8a978e;
}
.tos_lede {
	font-size: 15px;
	line-height: 1.7;
	background: #f3f7f3;
	border-left: 4px solid #1b9e46;
	border-radius: 0 8px 8px 0;
	padding: 14px 18px;
	margin: 0 0 20px;
}
.tos_h2 {
	font-size: 16px;
	font-weight: 800;
	color: #0c420c;
	margin: 26px 0 8px;
	padding-top: 16px;
	border-top: 1px solid #edf1ed;
}
.tos_p {
	font-size: 14px;
	line-height: 1.75;
	margin: 0 0 13px;
}
.tos_defs {
	margin: 0 0 16px;
	padding-left: 20px;
	font-size: 14px;
	line-height: 1.7;
}
.tos_defs li { margin-bottom: 7px; }
.tos_sheet a { color: #1b7a3c; }
.tos_sheet a:hover { color: #0c420c; }
/* CONTACT_PUBLIC_20260927: /contact.py puts Contact Admin's buttons on this sheet; keep their own colours */
.tos_sheet a.pg_btn, .tos_sheet a.pg_btn:hover { color: #fff; }
.tos_sheet a.pg_btn_2, .tos_sheet a.pg_btn_2:hover { color: #1a3c34; }
.tos_addr {
	font-style: normal;
	font-size: 14px;
	line-height: 1.7;
	background: #f5f8f5;
	border: 1px solid #e0e8e0;
	border-radius: 8px;
	padding: 14px 18px;
	margin: 18px 0 0;
}
.tos_back {
	margin-top: 24px;
	padding-top: 16px;
	border-top: 1px solid #edf1ed;
	font-size: 13px;
}

@media (max-width: 860px) {
	.tos_sheet { padding: 24px 20px 22px; border-radius: 10px; }
	.tos_title { font-size: 22px; }
	.tos_hero { padding: 18px 12px 36px; }
}

/* =====================================================================
   SIRECARD_TIERS_20260815 -- colour-code the account page's My Sire Cards,
   and pare them down on mobile.

   Palette is sampled from the card art itself (website/img/sirecards/
   sirecard_a..g.png, 75x100 RGBA), so the chips and the artwork agree:

       a  #dddd5f  gold     Classic
       b  #7341b8  purple   Elite  thru Classic
       c  #ce9142  orange   Strong thru Classic
       d  #36427d  navy     Good   thru Classic
       e  #713b42  maroon   Solid  thru Classic
       f  #378d42  green    Ample  thru Classic
       g  #747980  grey     Common thru Classic  <- the spendable g-card

   Desktop keeps the real card art (its baked-in tier text is legible at
   that size) and adds a tier-coloured ring + count badge. Under 600px the
   art is swapped for a compact colour chip carrying the tier letter: the
   baked-in text is unreadable below ~70px, so showing it would be noise.
   This layers on top of the ACC_CARDMATRIX block above -- that one still
   owns layout; this owns colour and the small-screen form.
   ===================================================================== */

.acc_cardmatrix_cell            { --sc: #747980; }
.acc_cardmatrix_cell.acc_cardtier_a { --sc: #dddd5f; --sc_ink: #3a3a10; }
.acc_cardmatrix_cell.acc_cardtier_b { --sc: #7341b8; --sc_ink: #ffffff; }
.acc_cardmatrix_cell.acc_cardtier_c { --sc: #ce9142; --sc_ink: #3a2610; }
.acc_cardmatrix_cell.acc_cardtier_d { --sc: #36427d; --sc_ink: #ffffff; }
.acc_cardmatrix_cell.acc_cardtier_e { --sc: #713b42; --sc_ink: #ffffff; }
.acc_cardmatrix_cell.acc_cardtier_f { --sc: #378d42; --sc_ink: #ffffff; }
.acc_cardmatrix_cell.acc_cardtier_g { --sc: #747980; --sc_ink: #ffffff; }

.acc_cardmatrix_imgwrap img {
	box-shadow: 0 0 0 2px var(--sc), 0 2px 6px rgba(0, 0, 0, 0.28);
}
.acc_cardmatrix_count {
	background: var(--sc);
	color: var(--sc_ink, #fff);
	border: 1px solid rgba(0, 0, 0, 0.35);
	font-variant-numeric: tabular-nums;
}
.acc_cardmatrix_label {
	color: var(--sc);
	filter: brightness(0.82);
}
/* Tier letter rides along only on the mobile chip. */
.acc_cardmatrix_letter { display: none; }

/* A tier you own none of stays legible rather than washing out to nothing. */
.acc_cardmatrix_cell.acc_cardmatrix_empty { opacity: 1; }
.acc_cardmatrix_empty .acc_cardmatrix_imgwrap img { opacity: 0.28; filter: grayscale(1); }
.acc_cardmatrix_empty .acc_cardmatrix_count { background: #8b8b8b; color: #fff; }
.acc_cardmatrix_empty .acc_cardmatrix_label { opacity: 0.5; }

@media (max-width: 600px) {
	.acc_cardmatrix { gap: 8px; }
	/* Pared down: drop the artwork, keep the colour + letter + count. */
	.acc_cardmatrix_imgwrap img { display: none; }
	.acc_cardmatrix_imgwrap {
		width: 46px;
		height: 58px;
		border-radius: 6px;
		background: var(--sc);
		box-shadow: inset 0 -14px 18px rgba(0, 0, 0, 0.22),
		            0 1px 3px rgba(0, 0, 0, 0.3);
		display: flex;
		align-items: center;
		justify-content: center;
	}
	.acc_cardmatrix_letter {
		display: block;
		font-size: 22px;
		font-weight: 800;
		line-height: 1;
		color: var(--sc_ink, #fff);
		text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
	}
	.acc_cardmatrix_count { top: -6px; right: -6px; font-size: 11px; }
	.acc_cardmatrix_label { font-size: 11px; }
	.acc_cardmatrix_empty .acc_cardmatrix_imgwrap { background: #9aa0a6; opacity: 0.45; }
}

/* ---- sire-card reward chips on the Benchmarks board (2026-08-15) ----
   Same palette as SIRECARD_TIERS_20260815 above, so "Reward: 1 x Solid sire
   card" on the board reads in the same colour as the card in My Sire Cards. */
.cb_sirecard {
	display: inline-block;
	padding: 1px 8px;
	border-radius: 10px;
	font-weight: 700;
	font-size: 0.92em;
	color: #fff;
	background: #747980;
	box-shadow: inset 0 -6px 8px rgba(0, 0, 0, 0.18);
}
.cb_sirecard_a { background: #dddd5f; color: #3a3a10; }
.cb_sirecard_b { background: #7341b8; }
.cb_sirecard_c { background: #ce9142; color: #3a2610; }
.cb_sirecard_d { background: #36427d; }
.cb_sirecard_e { background: #713b42; }
.cb_sirecard_f { background: #378d42; }
.cb_sirecard_g { background: #747980; }

/* ---- BSHARE_20260815: the S/DS/DDS pick + picks bar on Breeding Shares (.bshare_btn*, .bshare_summary, .bshare_sum_*,
   .breeding_myshares_use, a.breeding_myshares_sire_name) -> MOVED KITLOOK_20261018: css/ehr_page_breeding_sires.css (section 5).
   .bshare_note stays here: Breed a Foal and the scratch breed page use it (breed.j2, breeding_scratch.j2). */
.bshare_note {
	margin: 0 0 10px 0;
	padding: 8px 12px;
	border-left: 4px solid #0c420c;
	border-radius: 4px;
	background: #eef5ee;
	color: #24401f;
	font-size: 13px;
}

/* ---- BREED_THEO_20260816: theoretical mating preview -------------------
   The chart itself reuses the sd_ped_* block (automated.css:343-371) that the
   sire, mare and wiki charts already share — only the frame is new here. */
.bt_bar {
	display: flex; align-items: center; flex-flow: row wrap; gap: 10px;
	margin: 10px 0 6px 0;
}
.bt_btn {
	padding: 6px 14px;
	border: 1px solid #0c420c; border-radius: 4px;
	background: #0c420c; color: #fff;
	font-size: 13px; font-weight: 700; cursor: pointer;
}
.bt_btn:hover { background: #146414; }
.bt_btn:focus-visible { outline: 2px solid #0c420c; outline-offset: 2px; }
.bt_bar_hint { font-size: 12px; opacity: 0.75; color: var(--ehr-text-muted); }

.bt_panel { margin: 0 0 14px 0; }
.bt_wrap  { padding: 10px 12px; border: 1px solid #d4dae0; border-radius: 6px; background: #fbfcfd; }
.bt_empty { padding: 10px 4px; font-size: 13px; opacity: 0.8; }

/* Which lines this mating actually determines. */
.bt_lines { display: flex; flex-flow: row wrap; gap: 8px; margin-bottom: 10px; }
.bt_line {
	padding: 2px 9px; border-radius: 10px;
	border: 1px solid #2c5aa0; background: #fff; color: #2c5aa0;
	font-size: 12px; white-space: nowrap;
}
.bt_line b { letter-spacing: 0.04em; }
/* A line this mating does not supply — muted, not hidden, so the blank half
   of the chart has a stated reason. */
.bt_line_off  { border-color: #c3cad1; color: #9aa2aa; background: #f4f6f8; }
.bt_line_mare { border-color: #6a3d9a; color: #6a3d9a; }

.bt_note {
	margin-top: 10px; padding: 8px 12px;
	border-left: 4px solid #b06a12; border-radius: 4px;
	background: #fdf6ec; color: #4a3800;
	font-size: 12.5px; line-height: 1.5;
}
.bt_dupe {
	padding: 0 5px; border-radius: 3px;
	background: #b06a12; color: #fff; font-weight: 700; font-size: 11.5px;
}
/* BTNOTE_20260922: the note is now written from the chart -- two headed
   parts, a list of this mating's repeats (same badge as the chart), a key. */
.bt_note p                 { margin: 0 0 6px 0; }
.bt_note_hd                { font-weight: 700; margin: 8px 0 3px 0; }
.bt_note_hd:first-child    { margin-top: 0; }
.bt_rep_list               { margin: 0 0 6px 0; padding-left: 18px; }
.bt_rep_list li            { margin: 3px 0; }
.bt_rep_list .sd_ped_dupe  { margin-left: 3px; }
.bt_note_key               { font-size: 11.5px; opacity: 0.85; }

/* BSHARE pick-in-flight (.bshare_cell / .bshare_busy / .bshare_sum_err) -> MOVED KITLOOK_20261018: css/ehr_page_breeding_sires.css */

/* "view" clickthrough beside each scratch-breeding slot. */
.bs_viewsire { margin-left: 8px; font-size: 12px; color: #0c420c; text-decoration: underline; white-space: nowrap; }
.bs_viewsire:hover { color: #146414; }

/* Scratch breeding: why the dropdowns are empty, instead of leaving it silent. */
.bs_loaderr { margin: 0 0 12px 0; padding: 9px 13px; border-radius: 4px;
              border-left: 4px solid #b71c1c; background: #fdecea; color: #5b1a15; font-size: 13px; }
.bs_loaderr code { background: rgba(0,0,0,.07); padding: 1px 5px; border-radius: 3px; }
.bs_loaderr_soft { border-left-color: #b06a12; background: #fdf6ec; color: #4a3800; }

/* =====================================================================
   RATEBAND_20260816 -- the A-G colour scale for HPot.

   (2026-09-12: HPot ONLY. DRt used this scale too, via `drtband`, and
   that was wrong -- DamRating is a ~0-15 producer score, not a 0-100
   percentage, so every rated mare landed in 'G'. DRt is now the 0-15
   heat index `drtheat`, styled by .ml_heat_* in MARELIST_20260912.)

   HPot is graded A-G at 80/70/60/50/40/30 by
   python_functions.fn_fog_to_rating, the game's own bucketer for
   FogOfWar. The SQL sends the letter as `hpot`, so the template never
   decides a threshold.

   The hexes are the SIRECARD_TIERS_20260815 palette, unchanged and
   deliberately: it was sampled from the card art (img/sirecards/
   sirecard_a..g.png), it already runs A-best to G-worst, and a player
   who has learned that gold beats purple beats orange on their cards
   should not have to learn a second ranking here. Kept as its own class
   set rather than reusing .cb_sirecard_* because these are ratings, not
   cards -- same palette, different thing, so either can move later.

   HPot shows the LETTER; the tint is the glance.
   ===================================================================== */
.rt_band {
	display: inline-block;
	min-width: 2.1em;
	padding: 1px 6px;
	border-radius: 10px;
	font-weight: 700;
	font-size: 0.92em;
	text-align: center;
	color: #fff;
	background: #747980;
	box-shadow: inset 0 -6px 8px rgba(0, 0, 0, 0.18);
	font-variant-numeric: tabular-nums;
}
.rt_band_a { background: #dddd5f; color: #3a3a10; }
.rt_band_b { background: #7341b8; }
.rt_band_c { background: #ce9142; color: #3a2610; }
.rt_band_d { background: #36427d; }
.rt_band_e { background: #713b42; }
.rt_band_f { background: #378d42; }
.rt_band_g { background: #747980; }

/* An unrated mare -- FogOfWar 0 / DamRating 0 -- grades 'G' like a genuinely
   poor one. Show it as absent instead of as a bad score: a rating nobody has
   measured is not the same claim as a rating that came back low. */
.rt_band_none {
	background: none;
	color: #999;
	box-shadow: none;
	font-weight: 400;
}

/* ---- SDBOUGHT_20260816: "you just bought this", on the sire page ----
   Replaces an alert() that fired on a SUCCESSFUL purchase and was followed by
   a reload -- so the confirmation arrived before, and had to be dismissed to
   reach, the page showing the share, the new balance and the new price.

   Quiet on purpose: the player already knows they clicked Buy. This confirms
   it without competing with the sire's own identity band directly below. */
.sd_bought {
	margin: 0 0 10px;
	padding: 7px 12px;
	border-left: 4px solid #378d42;
	background: rgba(55, 141, 66, 0.10);
	border-radius: 3px;
	font-size: 0.95em;
}
.sd_bought b { color: #2c6f35; }

/* ---- RESIDENCY_20260817 + RZ_20260817 + SUPPORTLINK_20260914 -> MOVED KITLOOK_20261018: css/ehr_page_misc_people.css section 5 (residency.j2 rz_) */

/* ---- HPWATCH_20260817: the watchlist control, on TWO screens ----
   The horse page (Horse Settings, above the note) and the stable page's
   '+' note row render the same button through the same handler, keyed by
   prefix — 'hp' and 'shl' — exactly as the note Save already is.

   These rules started inside horsepage_defaults.jinja's <style>. That
   was fine while the control lived on one screen; the stable page never
   includes that template, so the button arrived unstyled. Shared control,
   shared stylesheet. */
.hp_watch_row { margin-top: 12px; }
.hp_watch_lab { font-size: 12px; font-weight: 600; color: #555; margin-bottom: 4px; }
.hp_watch_btn { width: auto; }
/* WATCHCOLOR_20260914 (owner: "make it a little more obvious"). Both states
   were green -- the Save-button green, then a darker green for Watching -- so
   a click barely changed the button. Gold now: an amber outline asks, solid
   gold with the filled star answers. Same pair as .sd_watch_* (sire detail).
   automated.css loads after ehr_horsepage_03, so these beat
   .horsepage_save_btn / :hover at equal weight. */
.hp_watch_btn                   { background: #fffbeb; color: #92400e; border: 2px solid #d97706; }
.hp_watch_btn:hover             { background: #fde68a; }
.hp_watch_btn.hp_watch_on       { background: #f59e0b; border-color: #d97706; color: #3b2300; }
.hp_watch_btn.hp_watch_on:hover { background: #d97706; }
/* The stable list's copy also carries .shl_notes_save_btn, whose colours are
   all !important (ehr_legacy_03_stablelist.css) -- so that one stayed blue in
   BOTH states. Matching !important, scoped to the watch button only; the
   notes Save button beside it keeps its blue. */
.shl_notes_save_btn.hp_watch_btn                   { background: #fffbeb !important; color: #92400e !important; border: 2px solid #d97706 !important; }
.shl_notes_save_btn.hp_watch_btn:hover             { background: #fde68a !important; }
.shl_notes_save_btn.hp_watch_btn.hp_watch_on       { background: #f59e0b !important; border-color: #d97706 !important; color: #3b2300 !important; }
.shl_notes_save_btn.hp_watch_btn.hp_watch_on:hover { background: #d97706 !important; }
.hp_watch_btn[disabled] { opacity: 0.6; cursor: default; }
/* WATCHADD_20260913: the second, compact button in the horse page's name band. */
.hp_watch_top_row  { display: flex; align-items: center; gap: 8px; margin: 2px 0 6px; flex-wrap: wrap; }
.hp_watch_btn.hp_watch_top { width: auto; padding: 3px 10px; font-size: 12px; }
.hp_watch_top_msg  { display: none; font-size: 12px; }

/* ---- XFERCR_20260818: credit transfer amount field -----------------
   The amount input never existed in the template while incJS_06_stable.js had
   always read it, so the transfer died on a null getElementById before
   it reached the server. New markup carries classes rather than inline
   style= so the panel can be restyled without touching the template. */
.xfercr_field   { margin-bottom: 16px; }
.xfercr_label   { display: block; font-size: 13px; font-weight: 600; color: #333; margin-bottom: 6px; }
.xfercr_input   { width: 100%; padding: 12px 14px; border: 2px solid #ddd; border-radius: 8px;
                  font-size: 15px; outline: none; box-sizing: border-box;
                  transition: border-color 0.2s; }
.xfercr_input:focus { border-color: #1a6b3c; }
/* Tabular figures: the amount and the running "left after" sit directly
   above one another and jump around in a proportional face. */
.xfercr_input, .xfercr_balance { font-variant-numeric: tabular-nums; }
.xfercr_balance { font-size: 13px; color: #666; margin-top: 6px; }
/* .xfercr_after / .xfercr_after-bad (set by incJS_06_stable.js on Account -> Transfer credits) -> MOVED KITLOOK_20261018:
   css/ehr_page_account.css. The other xfercr_* rules here have no template left (old acc.j2 copies only). */
.xfercr_error   { color: #c62828; font-size: 13px; margin-top: 6px; min-height: 18px; }

/* ---- SIRECARDS_20260818 -> MOVED KITLOOK_20261018: css/ehr_page_breeding_cards.css */

/* ---- SIRECARDS_BUILD_20260819 -> MOVED KITLOOK_20261018: css/ehr_page_breeding_cards.css */

/* ---- ENTRIES_20260819: Stables → Entries pager --------------------
   Server-side paging existed from the start; nothing could request page 2. */
.re_pager      { display: flex; align-items: center; justify-content: center;
                 gap: 14px; padding: 12px 8px; }
.re_pager_btn  { padding: 6px 12px; border: 1px solid #1a6b3c; background: #fff;
                 color: #1a6b3c; border-radius: 6px; font-size: 13px;
                 font-weight: 600; cursor: pointer; }
.re_pager_btn:hover:not([disabled]) { background: #f2f8f4; }
.re_pager_btn[disabled] { opacity: 0.4; cursor: default; border-color: #ccc; color: #999; }
.re_pager_at   { font-size: 12px; color: #6b7280; font-variant-numeric: tabular-nums; }

/* ---- VIEWER_20260819: "Watch this race" on the finished-race chart -----
   The new game had no route to a race viewer from any screen. Since 10-05
   (WATCH3D_20261005, end of this file) the chart carries Watch 2D and
   Watch 3D; 3D greyed by the old rule (.rr_watch_btn.wv_off). */
.rr_watch      { margin: 10px 0 4px; }
.rr_watch_btn  { display: inline-block; padding: 7px 14px; border-radius: 6px;
                 background: linear-gradient(135deg, #1a4731, #1a6b3c); color: #fff;
                 font-size: 13px; font-weight: 600; text-decoration: none; }
.rr_watch_btn:hover { background: linear-gradient(135deg, #1a6b3c, #2e8b57); color: #fff; }

/* ---- CARDPICK_20260820 -> MOVED KITLOOK_20261018: css/ehr_page_breeding_cards.css */

/* ---- CARDTRADE_20260820 + HOMETRADE_20261015 + HOMEAREA_20261016 -> MOVED KITLOOK_20261018: css/ehr_page_breeding_cards.css */

/* ---- CARDTIERS_20260820 -> MOVED KITLOOK_20261018: css/ehr_page_breeding_cards.css */

/* ---- CARDART_20260821 -> MOVED KITLOOK_20261018: css/ehr_page_breeding_cards.css */

/* ---- CARDTIERS_20260821 + LOCTIERS_20261015 -> MOVED KITLOOK_20261018: css/ehr_page_breeding_cards.css */

/* ---- CANDYSTRIPE_20260821 -> MOVED KITLOOK_20261018: css/ehr_page_breeding_cards.css */

/* ---- CANDYSTRIPE_20260821b -> MOVED KITLOOK_20261018: css/ehr_page_breeding_cards.css */

/* ---- CARDRATE_20260822: card tier on the sire page ------------------
   The headline card sits beside the name; the per-line letters under it
   are hover-titled with which line each belongs to, so 'A | B | A' is
   readable without a legend taking up space. */
.sd_cardrate       { float: right; margin: 0 0 6px 12px; text-align: center; }
.sd_cardrate_img   { width: 52px; height: auto; display: block; }
.sd_cardrate_lines { margin-top: 4px; font-size: 12px; font-weight: 700;
                     color: #1a3c34; letter-spacing: .5px; white-space: nowrap; }
.sd_cardrate_one   { cursor: help; }
.sd_cardrate_sep   { color: #b9c2bb; margin: 0 3px; font-weight: 400; }



/* =====================================================================
   YRGE_20260822 -- links out to YRGE.com articles.

   Two surfaces, one palette: a 📰 badge on each entries/results row
   (prefix re_yrge_) and a block on the horse page (prefix hp_yrge_).
   Amber is YRGE's own accent, which is the point -- these leave the
   site and should not look like an internal control.

   NO TITLES ARE EVER RENDERED by either surface. A recap headline
   states the winner outright, and the headline is not in the database
   anyway -- it lives inside the generated HTML file.
   ===================================================================== */

/* ── the entries / results row badge ──────────────────────────────── */
.re_yrge {
  margin-left: 6px; text-decoration: none; cursor: pointer;
  opacity: .75; font-size: 14px;
}
.re_yrge:hover { opacity: 1; }
/* A recap only ever appears on a race that has already run, so the
   stronger colour cannot act as a spoiler tell on an unrun race. */
.re_yrge_recap   { filter: none; }
.re_yrge_preview { filter: grayscale(35%); }
/* BTB uses its own glyph rather than a colour variant -- two article
   systems, and a player should be able to tell which one they are opening
   before they click. */
.re_btb { filter: none; }

/* ── the horse page block ─────────────────────────────────────────────
   REBUILT 2026-08-22 (prefix hp_news_, was hp_yrge_). Owner: the old panel
   was "kinda small" -- a 13px list that read as a footnote -- and the
   wording "In the press" was not wanted. It now carries the same weight as
   the Account Home card and leads with the headline.
   hp_yrge_hidden survives under its old name because automated.js and the
   template both key the 5-at-a-time paging on it. */
.hp_news {
  margin: 14px 0 18px; padding: 14px 16px;
  border: 1px solid #e6d3ac; border-left: 3px solid #d97706;
  border-radius: 6px; background: #fdfaf3;
}
.hp_news_hd, .hp_news_sub {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 700; color: #8a5a12;
  margin-bottom: 10px;
}
.hp_news_sub {
  margin-top: 14px; padding-top: 12px; border-top: 1px solid #f0e6d2;
  color: #3f5a86;
}
.hp_news_mark {
  display: inline-block; padding: 2px 7px; border-radius: 3px;
  background: #d97706; color: #fff;
  font-size: 11px; font-weight: 700; letter-spacing: .08em;
}
.hp_news_mark_btb { background: #4a6fa5; }

.hp_news_list { margin: 0; padding: 0; list-style: none; }
.hp_news_item {
  padding: 9px 0; border-bottom: 1px solid #f0e6d2;
}
.hp_news_item:last-child { border-bottom: 0; }

/* The headline. Same size as the Account Home card -- this is the thing a
   player is meant to read, so it is not a 13px list row any more. */
.hp_news_title {
  display: block; font-size: 16px; font-weight: 700; line-height: 1.35;
  color: #7a3d06; text-decoration: none;
}
.hp_news_title:hover { text-decoration: underline; }
.hp_news_grab {
  margin-top: 3px; font-size: 13px; line-height: 1.45;
  color: #5c5245; font-style: italic;
}
.hp_news_meta {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 9px;
  margin-top: 5px; font-size: 12px; color: #7d7365;
}
.hp_news_kind {
  padding: 1px 6px; border-radius: 3px;
  background: #f0e0c4; color: #8a5a12; font-weight: 600; font-size: 11px;
}
.hp_news_kind_btb { background: #dde5f2; color: #3f5a86; }

/* Paging, 5 at a time. Everything is already in the DOM; this class is the
   only thing between a row and the reader (automated.js removes it). */
.hp_yrge_hidden { display: none; }
.hp_news_morewrap { margin-top: 10px; }
.hp_news_more {
  display: inline-block; padding: 4px 12px; cursor: pointer;
  border: 1px solid #e0c99a; border-radius: 4px; background: #fff8ea;
  color: #8a5a12; font-size: 12.5px; font-weight: 600;
}
.hp_news_more:hover { background: #f7ecd6; }

/* ── Account Home: the latest article (.acc_yrge_*, YRGE_20260822) -> MOVED KITLOOK_20261018: css/ehr_page_account.css */

/* KITREVIEW_20261018: dark follows data-theme (the theme the player picked), not the device setting; was @media (prefers-color-scheme: dark) */
:root[data-theme="dark"] .hp_news { background: #221c12; border-color: #5a4520; border-left-color: #d97706; }
:root[data-theme="dark"] .hp_news_hd { color: #e0b063; }
:root[data-theme="dark"] .hp_news_sub { color: #9db8e8; border-top-color: #3a2f1c; }
:root[data-theme="dark"] .hp_news_item { border-bottom-color: #3a2f1c; }
:root[data-theme="dark"] .hp_news_title { color: #f0b060; }
:root[data-theme="dark"] .hp_news_grab { color: #b9ad98; }
:root[data-theme="dark"] .hp_news_meta { color: #a1937c; }
:root[data-theme="dark"] .hp_news_kind { background: #4a3a1c; color: #e0b063; }
:root[data-theme="dark"] .hp_news_kind_btb { background: #23324a; color: #9db8e8; }
:root[data-theme="dark"] .hp_news_more { background: #2b2213; border-color: #5a4520; color: #e0b063; }
:root[data-theme="dark"] .hp_news_more:hover { background: #3a2f1c; }
/* .acc_yrge_* -> MOVED KITLOOK_20261018: css/ehr_page_account.css (dark from data-theme there) */

/* Phones: the byline is the first thing worth dropping to its own line. */
@media (max-width: 560px) {
  .hp_news_title { font-size: 15px; }
  .hp_news_meta { gap: 6px; }
  /* .acc_yrge_* -> MOVED KITLOOK_20261018: css/ehr_page_account.css */
}


/* =====================================================================
   SPOILER_20260822 -- the veil over a recap headline. Shared by the horse
   page and Account Home so the two cannot disagree about what a spoiler
   looks like. See automated.js, same block name.
   ===================================================================== */

/* The headline itself. display:none, so the text IS in the page source --
   acceptable: reading source is a choice, glancing at a page is not. */
.news_veiled { display: none; }

/* The control in front of it. Reads as a deliberate cover, not as an
   error or a disabled thing -- a player should want to click it. */
.news_spoiler {
  display: inline-flex; align-items: center; gap: 8px;
  margin: 2px 0 4px; padding: 6px 11px; cursor: pointer;
  border: 1px dashed #c9b48a; border-radius: 5px;
  background: #f7f0e0; color: #6f5a2e;
  font-size: 13px; font-weight: 600;
}
.news_spoiler:hover { background: #f1e6cf; border-color: #b89f6d; }
.news_spoiler_lock {
  padding: 1px 6px; border-radius: 3px;
  background: #6f5a2e; color: #fff;
  font-size: 10.5px; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase;
}

/* KITREVIEW_20261018: dark follows data-theme (the theme the player picked), not the device setting; was @media (prefers-color-scheme: dark) */
:root[data-theme="dark"] .news_spoiler { background: #2b2415; border-color: #5a4a28; color: #d8c79c; }
:root[data-theme="dark"] .news_spoiler:hover { background: #3a3020; }
:root[data-theme="dark"] .news_spoiler_lock { background: #d8c79c; color: #2b2415; }


/* =====================================================================
   RATINGS_20260823 -- EOY Rating sire link
   Pairs with rtg_openWikiSire in automated.js.

   Restrained on purpose. The EOY table is twelve columns of numbers; if
   every sire were underlined and blue the eye would be dragged to the one
   column that is NOT the point of the page. So it reads as ordinary text
   until pointed at, matching how the Horse column keeps its name plain
   and hangs the action off the arrow next to it.

   The base .rtg_td_sire colour is left alone -- this only adds the
   affordance, so a row whose sire has no WikiPedigree entry is visually
   identical to one that does until you hover, and nothing about the table
   advertises a link that is not there.
   ===================================================================== */
.rtg_sire_link { cursor: pointer; }
.rtg_sire_link:hover {
  color: #166534;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* KITREVIEW_20261018: dark follows data-theme (the theme the player picked), not the device setting; was @media (prefers-color-scheme: dark) */
:root[data-theme="dark"] .rtg_sire_link:hover { color: #7fca9a; }


/* ---- RATINGS_20260823 (b) .rtg_owner_* + .rtg_pc_msg (the other rtg_pc_* were dead since pc_ replaced them 09-12) -> MOVED KITLOOK_20261018: css/ehr_page_misc_people.css section 1 */


/* =====================================================================
   RATINGS_20260823 (c) -- sex colour box, EOY + Hall of Fame

   The same box the stable list uses. Its rule is
   `.stable_horse_list_col_sex .badge` in ehr_legacy_03_stablelist.css --
   scoped to that table, so it cannot simply be borrowed, and the bare
   `.badge` class it hangs off already carries unrelated styling in
   ehr_fauxstrap.css and ehr_horsepage_06_backcompat.css. Re-declared here
   under an rtg_ name with the SAME geometry and the SAME three colours, so
   the three screens read identically without either file reaching into the
   other's selectors.

   If the stable page's colours ever change, change them here too -- that is
   the cost of not sharing a selector, and it is the cheaper cost.
   ===================================================================== */
.rtg_sexbadge {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 20px; height: 20px;
  font-weight: bold;
  border-radius: 3px;
  color: #222;
}
.rtg_sexbadge_f { background: lightpink; }
.rtg_sexbadge_m { background: lightblue; }
.rtg_sexbadge_g { background: tan; }

/* The three named colours are light by definition, so the glyph stays dark
   in dark mode rather than inverting to an unreadable white-on-pink. */
/* KITREVIEW_20261018: dark follows data-theme (the theme the player picked), not the device setting; was @media (prefers-color-scheme: dark) */
:root[data-theme="dark"] .rtg_sexbadge { color: #222; }

/* deploy-touch 2026-08-23 batch ratings-owner-sire */


/* ---- RATINGS_20260823 (d) .rtg_pc_holder -> MOVED KITLOOK_20261018: css/ehr_page_misc_people.css section 1 */


/* ---- RU_20260908 + RZDECLARE_20260924 + RZLISTED_20260924 + WILLMERGE_20261006 R8 -> MOVED KITLOOK_20261018: css/ehr_page_misc_people.css sections 5 and 6 (rz_ / ru_) */

/* ---- BRECENT_20260911 -> MOVED KITLOOK_20261018: css/ehr_page_breeding_mares.css (block 7, on the kit; its prefers-color-scheme block is gone) */

/* ---- MARELIST_20260912: parents line, DRt heat, open-mare notice --------
   Three additions to the mare/lease tables (the template).

   1. .ml_parents -- SIRE x DAMSIRE under her name. The damsire was only
      reachable by expanding the row; the old leasing page had it on the face
      of the list all along, as a second line rather than a column, which is
      also why dropping the separate "Her sire" column costs nothing.

   2. .ml_heat_* -- the DRt scale. DamRating is a CUMULATIVE producer score
      (real values run about 0-15), not a 0-100 percentage, so the A-G fog
      bands used by .rt_band put every rated mare in the bottom bucket and the
      column carried no signal at all. These 16 steps are the game's own
      ladder, lifted verbatim from inc_heatindex_mare.asp:6-8 and matching
      python_functions.fn_heatmap: blue lowest, red highest, saturating at 14.
      Index arrives from SQL as int(damrating^0.65) capped 15, so no threshold
      lives in CSS or in the template.

      These hexes do NOT flip in dark mode. They are data, not chrome -- a
      heat scale that inverted would mean the opposite thing on half the
      viewers' screens. Only the text colour adapts, per step.

   3. .ml_open_note -- Open Mares is empty for nine months of the year by
      design, and an empty table with no explanation reads as a broken filter.
      <details> is native, so the explainer needs no JavaScript.
   ------------------------------------------------------------------------ */
/* KITLOOK_20261018: 1 (.ml_parents), the .ml_heat_none dash and 3 (.ml_open_note / .ml_open_more / .ml_open_body) are
   Find Mares' alone -> MOVED KITLOOK_20261018: css/ehr_page_breeding_mares.css. The heat scale (2) is shared with the horse page and
   mare_detail.j2 and stays here. */
.ml_heat {
	font-variant-numeric: tabular-nums;
	font-weight: 700;
	color: #222;
}
/* The same index as an inline chip (the template counters), where a bare
   background on an inline span has no shape. Sizing mirrors .rt_band so the
   DRt and HPot counters sit level. */
.ml_heat_chip { display: inline-block; min-width: 2.1em; padding: 1px 6px;
                border-radius: 10px; text-align: center; font-size: 0.92em; }

.ml_heat_0  { background: #0000ff; color: #fff; }
.ml_heat_1  { background: #3333ff; color: #fff; }
.ml_heat_2  { background: #6666ff; color: #fff; }
.ml_heat_3  { background: #99ffff; }
.ml_heat_4  { background: #ccccff; }
.ml_heat_5  { background: #ffffcc; }
.ml_heat_6  { background: #ffff99; }
.ml_heat_7  { background: #ffff66; }
.ml_heat_8  { background: #ffff33; }
.ml_heat_9  { background: #ffff00; }
.ml_heat_10 { background: #ffcc00; }
.ml_heat_11 { background: #ff9900; }
.ml_heat_12 { background: #ff6600; }
.ml_heat_13 { background: #ff3300; color: #fff; }
.ml_heat_14 { background: #ff0000; color: #fff; }
.ml_heat_15 { background: #ff0000; color: #fff; }


/* ---- SORTARROW_20260912: sortable headers -----------------------------
   .stable-sort-arrow had NO rule anywhere; 74 <th>s across seven live pages
   carried style="cursor:pointer" + style="opacity:0.3" inline to make up
   for it. Two rules replace all of them. misc_sortTable / stable_sortTable
   still set arrow.style.opacity on click, which overrides this default. */
th[onclick]        { cursor: pointer; user-select: none; }
.stable-sort-arrow { opacity: 0.3; font-size: 0.85em; }

/* ---- ACCPANEL_20260912 (Account home, its panels, ADMINTOOLS_20260915 Admin) -> MOVED KITLOOK_20261018: css/ehr_page_account.css
   Dropped there as unused: .adm_kv (no template has it); .adm_card's margin (the kit card has it). */


/* ---- BULKBUY_20260912 -> MOVED KITLOOK_20261018: css/ehr_page_races.css */

/* ---- SHAREBID_PAGER_20260912: the old breeding list pages' footer ------- */
.sharebid_pager  { display: flex; justify-content: center; align-items: center; gap: 12px; padding: 16px 0 8px; }
.sharebid_pageno { font-size: 12px; color: #4b5563; }   /* WILLMERGE_20261017 (render R13): was #6b7280, 4.0:1 on Will's grey page (the white card is gone) */

/* KITREVIEW_20261018: dark follows data-theme (the theme the player picked), not the device setting; was @media (prefers-color-scheme: dark) */
:root[data-theme="dark"] .sharebid_pageno { color: #94a3b8; }

/* ---- ACCPANEL_20260912 dark block -> MOVED KITLOOK_20261018: css/ehr_page_account.css (dark now comes from Will's tokens) */

/* ---- PGTITLE_20260912 -> MOVED KITLOOK_20261018: .pg_head / .pg_title / .pg_sub are in css/ehr_kit.css section 2. */

/* ---- RACESLIST_20260912: Races -> Races (the template) ------------------
   The upcoming/drawn race list. Sits on top of the rl_ set in
   ehr_style_12_raceslist.css, which still owns the race header card
   (.rl_race_header and its cards/toggle), the expand column (.rl_th_expand /
   .rl_td_expand), the horse-name link (.rl_horse_name_wrap a) and the
   strike-through (.rl_scratched). This block restyles the table itself to
   match .br_table (BRECENT_20260911) and replaces what used to be inline:
   the text-art "** Scratches **" rows, the heat cell, the CLAIM pill, the
   collapsed detail row and the empty state.

   automated.css loads AFTER ehr_style_12 and ehr_legacy_05, so a rule here at
   the same specificity wins on order; the few doubled selectors below are the
   places where the legacy sheet is more specific than that.

   The heat colour is DATA (fn_heatmap, via jList['fnheat']) and arrives as a
   custom property on the cell -- the one inline style this page keeps. It
   does not flip in dark mode for the same reason .ml_heat_* does not: an
   inverted heat scale would mean the opposite thing on half the screens. */

.rl2_wrap   { max-width: 1400px; margin: 0 auto; padding: 16px 12px; }
.rl2_head   { margin-bottom: 14px; }
.rl2_title  { margin: 0 0 4px; font-size: 20px; font-weight: 700; color: #1a3c34; }
.rl2_sub    { font-size: 13px; color: #6b7280; line-height: 1.5; max-width: 62ch; }

/* ---- race header card: the rl_ card, recoloured to the house palette ----
   Layout (flex rows, label column, mobile toggle) stays in ehr_style_12. */
.rl_race_header.rl2_race { background: #fff; border: 1px solid #e3e6ea; border-radius: 8px;
                           border-left: 4px solid #1a6b3c; margin-top: 18px; }
.rl2_race .rl_race_track { color: #1a3c34; }
.rl2_race .rl_race_title { color: #374151; }

/* Status chip inside the header: same shape as .br_chip. Open = green
   (entries still taken), drawn = grey (field is set, waiting to run). */
.rl2_chip       { display: inline-block; padding: 2px 9px; border-radius: 10px;
                  font-size: 11px; font-weight: 700; white-space: nowrap;
                  border: 1px solid transparent; }
.rl2_chip_open  { border-color: #b8d4c4; background: #eaf5ef; color: #1a6b3c; }
.rl2_chip_drawn { border-color: #cdd5dd; background: #f1f4f7; color: #46525f; }

/* ---- the entries table ----
   .rl_table gives width/collapse; the doubled selectors below out-rank the
   legacy .race_upcoming_entries_table th / .racesdrawn_table td rules
   (0,1,1) and the .rl_table thead tr stripe (0,1,2). */
.rl2_tablewrap  { border: 1px solid #e3e6ea; border-radius: 8px; background: #fff; }
.rl2_table.rl2_table thead tr { background: #fafbfc; }
.rl2_table.rl2_table th { padding: 6px 6px; 
                          color: #6b7280; font-weight: 600; background: #fafbfc;
                          border-bottom: 1px solid #e3e6ea; white-space: nowrap; }
.rl2_table.rl2_table td { padding: 6px 6px; 
                          vertical-align: middle;
                          border-bottom: 0; border-top: 1px solid #e5eaef; }
.rl2_table tbody tr:first-child td { border-top: 0; }

/* Zebra + hover. nth-child cannot stripe this table -- every horse owns three
   <tr>s (row, expander, detail) and the divider rows break the rhythm -- so
   the template counts horse rows itself and marks every second one .rl2_alt. */
.rl2_table tbody tr.rl2_row        { background: #fcfdfe; }
.rl2_table tbody tr.rl2_alt        { background: #f2f5f8; }
.rl2_table tbody tr.rl2_row:hover  { background: #e9eef3; }
.rl2_table tbody tr.rl2_alt:hover  { background: #e1e8ee; }

/* A scratched horse or one past the entry limit is still a fact about the
   race, so it stays on the face of the table -- just quieter. The name cell
   in the open-race table also carries .rl_scratched (strike-through). */
.rl2_table tbody tr.rl2_row_scratched.rl2_row_scratched,
.rl2_table tbody tr.rl2_row_cutoff.rl2_row_cutoff { background: #f7f8f9; color: #6b7280; }
.rl2_row_scratched .rl_horse_name_wrap a,
.rl2_row_cutoff    .rl_horse_name_wrap a { color: #6b7280; }

/* Section dividers: "Scratches" and the entry-limit cutoff. A single cell
   spanning the row (colspan is what pairs it with the row above for the sort
   helper, and fixColspan keeps the count honest). */
.rl2_table.rl2_table tbody tr.rl2_divider td { padding: 5px 10px; font-size: 11px; font-weight: 700;
                                              text-transform: uppercase; letter-spacing: 0.05em;
                                              color: #6b7280; background: #f1f4f7;
                                              border-top: 1px solid #e3e6ea; border-bottom: 1px solid #e3e6ea; }
.rl2_divider_text        { display: inline-block; }
.rl2_divider_scratch td  { color: #8a2b2b; }
.rl2_divider_cutoff  td  { color: #7a5a12; }
.rl2_table.rl2_table tbody tr.rl2_divider_scratch td { background: #fdf6f6; }
.rl2_table.rl2_table tbody tr.rl2_divider_cutoff  td { background: #fdf6e7; }

/* ---- cells ---- */
.rl2_num   { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.rl2_left   { text-align: left; }
.rl2_ctr   { text-align: center; }
.rl2_owner { color: #46525f; }
.rl2_table .racesdrawn_owner_name { color: inherit; }          /* was #0000FF in legacy_05 */
.rl2_sire  { color: #46525f; }
.rl2_notes { color: #6b7280; font-size: 12px; }

/* Post position: the pp_N colours are the game's saddle-cloth scheme and stay
   in ehr_legacy_05; this only shapes the cell. */
.rl2_table.rl2_table td.rl2_pp { text-align: center; font-weight: 700; min-width: 28px;
                                 border-left: 1px solid rgba(0,0,0,0.12);
                                 border-right: 1px solid rgba(0,0,0,0.12); }

/* Heat cell: background from the custom property the template sets. A row
   with no heat value leaves --heat as "#", which is invalid and falls back to
   the row colour on its own -- no guard needed. */
.rl2_table.rl2_table td.rl2_heat { background: var(--heat); text-align: center; }

/* The CLAIM pill (drawn claiming races, other people's horses). Was inline. */
.rl2_claim_btn        { display: inline-block; margin-left: 6px; padding: 1px 7px;
                        font-size: 10px; font-weight: 700; letter-spacing: 0.03em; cursor: pointer;
                        border: 1px solid #1a6b3c; border-radius: 3px; color: #1a6b3c; background: #eaf5ef; }
.rl2_claim_btn:hover  { background: #1a6b3c; color: #fff; }
/* RACESCRATCH_20261020 (paste 381): the Scratch link on your own entry of an open race (the old red [Scratch]);
   the kit bad tokens, so every theme follows. Its confirm box reuses the race finder rafi_claim_warn look. */
.rl2_scratch_link     { display: inline-block; margin-left: 6px; padding: 1px 7px;
                        font-size: 10px; font-weight: 700; letter-spacing: 0.03em; cursor: pointer;
                        border: 1px solid var(--pg-bad-border); border-radius: 3px; color: var(--pg-bad-text); background: var(--pg-bad-bg); }
.rl2_scratch_link:hover { text-decoration: underline; }
/* RACEOWN_20261020 (paste 382, owner 10-20: "highlight the stable name (maybe like reverse lettering in a box) if the player
   owns the horse in the race"): reversed lettering -- the theme text colour as the box, the card colour as the letters --
   so it stays readable in every theme (light: black box, white letters; dark: light box, dark letters). Race page Owner
   cells and expanded Owner (races_list.j2) and the results chart (races_complete.j2, on top of rr_mine). */
/* STABLELOOK_20261022 (paste 405): an owner name that opens that master stable read only (data-rtg-stable, rtg_openStable) --
   race card, results, claims, the stable search */
.ehr_stable_link { color: inherit; cursor: pointer; text-decoration: underline dotted; text-underline-offset: 2px; }
.ehr_stable_link:hover { text-decoration-style: solid; }
.rl2_own_name, .rl2_table .rl2_own_name, .rr_mine.rl2_own_name { display: inline-block; padding: 0 5px; border-radius: 3px; font-weight: 700;
                        background: var(--ehr-text-primary, #1e293b); color: var(--ehr-surface-bg, #ffffff); }
/* RACEOWN_20261020 (owner 10-20): the Age/Dist card of a race, tinted very lightly by the surface it runs on (dirt brown,
   turf green, poly blue), led by the race type and surface badges (the results chart rr_chip_ty_* / rr_chip_surf_*
   colours, ehr_style_14_raceresults.css) and closed by a forecast weather mark: a TEXT glyph (U+FE0E, never the colour
   emoji), so it takes the site colour and size like the letters around it. */
.rl_race_card.rl2_agedist          { padding-left: 6px; padding-right: 6px; border-radius: 4px; }
.rl_race_card.rl2_surf_d           { background: #f6efe6; }
.rl_race_card.rl2_surf_t           { background: #eaf6ed; }
.rl_race_card.rl2_surf_p           { background: #e9f2fc; }
.rl2_ad_badge                      { margin-right: 5px; vertical-align: 1px; }
.rl2_ad_wx                         { margin-right: 7px; font-size: 24px; line-height: 1; vertical-align: -4px; cursor: help;
                                     font-family: "Segoe UI Symbol", "Noto Sans Symbols 2", "Noto Sans Symbols", "DejaVu Sans",
                                                  "Apple Symbols", sans-serif;
                                     color: var(--ehr-text-secondary, #475569); }
/* owner 10-20: the Precip row tinted by the forecast (sunny / cloudy / rain incl. thunderstorms) */
.rl_race_card.rl2_wxrow            { padding-left: 6px; padding-right: 6px; border-radius: 4px; }
.rl_race_card.rl2_wxrow_sun        { background: #fdf6d8; }
.rl_race_card.rl2_wxrow_cloud      { background: #eef0f3; }
.rl_race_card.rl2_wxrow_rain       { background: #e6f0fb; }
:root[data-theme="dark"] .rl_race_card.rl2_wxrow_sun   { background: rgba(230, 200, 80, 0.16); }
:root[data-theme="dark"] .rl_race_card.rl2_wxrow_cloud { background: rgba(160, 170, 185, 0.14); }
:root[data-theme="dark"] .rl_race_card.rl2_wxrow_rain  { background: rgba(80, 140, 220, 0.18); }
:root[data-theme="dark"] .rl_race_card.rl2_surf_d { background: rgba(176, 128, 72, 0.16); }
:root[data-theme="dark"] .rl_race_card.rl2_surf_t { background: rgba(72, 160, 96, 0.15); }
:root[data-theme="dark"] .rl_race_card.rl2_surf_p { background: rgba(80, 140, 220, 0.16); }
/* RACETINT_20261020 (paste 383, owner 10-20): the race card Close / Run lines light red when the close or the run is 3 hours
   away or less (SQL clock: close_in_secs / run_in_secs), the Type line light green for stakes and graded (ST G1-G3) and
   light yellow for claiming (C MC O). Same shape as the Precip line tint (rl2_wxrow). */
.rl_race_card.rl2_tintrow          { padding-left: 6px; padding-right: 6px; border-radius: 4px; }
.rl_race_card.rl2_soonrow          { background: #fde8e8; }
.rl_race_card.rl2_tyrow_stakes     { background: #e6f6ea; }
.rl_race_card.rl2_tyrow_claim      { background: #fdf8d6; }
:root[data-theme="dark"] .rl_race_card.rl2_soonrow      { background: rgba(220, 80, 80, 0.20); }
:root[data-theme="dark"] .rl_race_card.rl2_tyrow_stakes { background: rgba(72, 160, 96, 0.16); }
:root[data-theme="dark"] .rl_race_card.rl2_tyrow_claim  { background: rgba(230, 200, 80, 0.15); }
/* CLAIMPLACED_20261010: the chip that replaces CLAIM once this stable has a claim in. pg_chip + pg_chip_ok carry
   the colours (light and dark); span. outranks the later .pg_chip font size. */
span.rl2_claim_placed { margin-left: 6px; font-size: 10px; letter-spacing: 0.03em; cursor: default; }

/* ---- expander + detail rows ----
   The expander <tr> is hidden/shown by the :has() rules in ehr_style_12 and
   the panel by .stable_horse_list_show; nothing here changes that. The
   doubled descendant selector out-ranks the min-width:650px rule in
   ehr_legacy_08 that otherwise blanks .stable_horse_list_expanded_row on
   wide screens (same fix .re_expanded_info applies on the entries page). */
.rl2_expand_row    { border: 0; }
.rl2_table.rl2_table td.rl2_expand_td { padding: 0; border-top: 0; }
.rl2_expanded.rl2_expanded .stable_horse_list_expanded_row { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.rl2_expanded .stable_horse_list_expanded_item { min-width: 80px; }
.rl2_expanded_wide { flex: 1 1 300px; }
.rl2_detail_row    { visibility: collapse; text-align: left; }
.rl2_hidden        { display: none; }

/* ---- foot + empty ---- */
.rl2_pager { margin-top: 12px; padding-top: 10px; border-top: 1px solid #e3e6ea;
             font-size: 12px; color: #6b7280; text-align: center; }
/* RACEPAGE_20260925: the pager is real now (races_pager.j2), top and bottom */
.rl2_pager_top { margin: 0 0 12px; padding: 0 0 10px; border-top: 0; border-bottom: 1px solid #e3e6ea; }
.rl2_pginfo { display: inline-block; margin: 0 10px; }
.rl2_pgbtn  { padding: 5px 12px; border: 1px solid #cfd6dd; border-radius: 6px; background: #fff;
              color: #1a3c34; font-size: 12px; font-weight: 600; cursor: pointer; }
.rl2_pgbtn:hover { background: #f1f5f4; }

/* ---- HORSESEARCH_20260925 / HSRCOLS / HSRBADGE / HSRBEST (hsr_) -> MOVED KITLOOK_20261018: css/ehr_page_misc_market.css, section 6 */
/* HPOWNER_20260925: the horse page Owner card -- masterstable on top, the holding stable under it when it differs */
.horsepage_owner_stable { font-size: 11px; font-weight: 400; color: #6b7280; }
/* KITREVIEW_20261018: dark follows data-theme (the theme the player picked), not the device setting; was @media (prefers-color-scheme: dark) */
:root[data-theme="dark"] .horsepage_owner_stable { color: #94a3b8; }

/* ---- HOTLIST_20260925 (Hot Races, hrl_) -> MOVED KITLOOK_20261018: css/ehr_page_races.css */
.rl2_empty { padding: 18px 14px; font-size: 13px; color: #6b7280;
             border: 1px dashed #dfe4e9; border-radius: 8px; background: #fcfdfe; }
.rl2_empty strong { color: #1a3c34; }

@media (max-width: 560px) {
	.rl2_wrap { padding: 12px 8px; }
	.rl2_table.rl2_table th, .rl2_table.rl2_table td { padding: 7px 8px; }
}

/* KITREVIEW_20261018: dark follows data-theme (the theme the player picked), not the device setting; was @media (prefers-color-scheme: dark) */
:root[data-theme="dark"] .rl2_title { color: #e5e7eb; }
:root[data-theme="dark"] .rl2_sub, :root[data-theme="dark"] .rl2_pager, :root[data-theme="dark"] .rl2_notes { color: #94a3b8; }
:root[data-theme="dark"] .rl_race_header.rl2_race { background: #131a26; border-color: #2a3342; border-left-color: #2f6b4a; }
:root[data-theme="dark"] .rl2_race .rl_race_header_top { border-bottom-color: #2a3342; }
:root[data-theme="dark"] .rl2_race .rl_race_track { color: #e5e7eb; }
:root[data-theme="dark"] .rl2_race .rl_race_title { color: #cbd5e1; }
:root[data-theme="dark"] .rl2_race .rl_race_card { border-bottom-color: #2a3342; }
:root[data-theme="dark"] .rl2_race .rl_race_card_value { color: #e5e7eb; }
:root[data-theme="dark"] .rl2_chip_open { background: rgba(26,107,60,0.22); border-color: #2f6b4a; color: #6ee7a8; }
:root[data-theme="dark"] .rl2_chip_drawn { background: #1e293b; border-color: #3a4252; color: #cbd5e1; }
:root[data-theme="dark"] .rl2_tablewrap { background: #131a26; border-color: #2a3342; }
:root[data-theme="dark"] .rl2_table.rl2_table thead tr { background: #1a2232; }
:root[data-theme="dark"] .rl2_table.rl2_table th { background: #1a2232; color: #94a3b8; border-bottom-color: #2a3342; }
:root[data-theme="dark"] .rl2_table.rl2_table td { border-top-color: #2a3342; color: #cbd5e1; }
:root[data-theme="dark"] .rl2_table tbody tr.rl2_row { background: #131a26; }
:root[data-theme="dark"] .rl2_table tbody tr.rl2_alt { background: #171f2c; }
:root[data-theme="dark"] .rl2_table tbody tr.rl2_row:hover, :root[data-theme="dark"] .rl2_table tbody tr.rl2_alt:hover { background: #1e293b; }
:root[data-theme="dark"] .rl2_table tbody tr.rl2_row_scratched.rl2_row_scratched, :root[data-theme="dark"] .rl2_table tbody tr.rl2_row_cutoff.rl2_row_cutoff { background: #10161f; color: #94a3b8; }
:root[data-theme="dark"] .rl2_row_scratched .rl_horse_name_wrap a, :root[data-theme="dark"] .rl2_row_cutoff    .rl_horse_name_wrap a { color: #94a3b8; }
:root[data-theme="dark"] .rl2_table .rl_horse_name_wrap a { color: #6ee7a8; text-decoration-color: #3a4252; }
:root[data-theme="dark"] .rl2_table .rl_horse_name_wrap a:hover { background: #1e293b; }
:root[data-theme="dark"] .rl2_table.rl2_table tbody tr.rl2_divider td { background: #1a2232; color: #94a3b8;
                                               border-top-color: #2a3342; border-bottom-color: #2a3342; }
:root[data-theme="dark"] .rl2_table.rl2_table tbody tr.rl2_divider_scratch td { background: #3a2124; color: #e8a7aa; }
:root[data-theme="dark"] .rl2_table.rl2_table tbody tr.rl2_divider_cutoff  td { background: rgba(176,106,18,0.20); color: #e8c98a; }
:root[data-theme="dark"] .rl2_owner, :root[data-theme="dark"] .rl2_sire { color: #cbd5e1; }
:root[data-theme="dark"] .rl2_table.rl2_table td.rl2_pp { border-left-color: rgba(255,255,255,0.12); border-right-color: rgba(255,255,255,0.12); }
:root[data-theme="dark"] .rl2_claim_btn { border-color: #2f6b4a; color: #6ee7a8; background: rgba(26,107,60,0.18); }
:root[data-theme="dark"] .rl2_claim_btn:hover { background: #2f6b4a; color: #fff; }
:root[data-theme="dark"] .rl2_expanded.rl2_expanded { background: #1a2232; border-top-color: #2a3342; }
:root[data-theme="dark"] .rl2_expanded .stable_horse_list_expanded_label { color: #94a3b8; }
:root[data-theme="dark"] .rl2_expanded .stable_horse_list_expanded_value { color: #e5e7eb; }
:root[data-theme="dark"] .rl2_pager { border-top-color: #2a3342; }
:root[data-theme="dark"] .rl2_pager_top { border-bottom-color: #2a3342; }
:root[data-theme="dark"] .rl2_pgbtn { background: #1e293b; border-color: #3a4252; color: #e5e7eb; }
:root[data-theme="dark"] .rl2_pgbtn:hover { background: #273449; }
/* HORSESEARCH_20260925 dark lines -> MOVED KITLOOK_20261018: css/ehr_page_misc_market.css (the tokens do it) */
:root[data-theme="dark"] .rl2_empty { background: #131a26; border-color: #3a4252; color: #94a3b8; }
:root[data-theme="dark"] .rl2_empty strong { color: #e5e7eb; }

/* ---- HOTLIST_20260912 + LOCCOL_20260927 + HLSORT_20260926 (Breeding -> Hotlist, prefix hl_) -> MOVED KITLOOK_20261018: css/ehr_page_breeding_sires.css
   (section 3, on the kit and Will's tokens; the prefers-color-scheme blocks are retired). */

/* ---- PGKIT_20260912 -> MOVED KITLOOK_20261018: the page kit (pg_wrap / pg_card / pg_table / pg_btn / pg_in / pg_chip /
   pg_note / pg_empty ...) is now css/ehr_kit.css, in Will's look on Will's tokens, loaded just before this file.
   The 09-12 green palette and its prefers-color-scheme block are retired; the old rules are in automated.css_20261018_prekit2. */

/* ---- PLAYERSTATS_20260912 + pc_ + HOF_20260912 + EOY_20260912 -> MOVED KITLOOK_20261018: css/ehr_page_misc_people.css sections 1-4 (ps_ / pc_ / hof_ / eoy_) */

/* ---- css_misc_20260912 (WATCHLIST_20260912, AUCTION_20260912, CLAIMS_20260912, JOCKEYS_20260912) -> MOVED KITLOOK_20261018: css/ehr_page_misc_market.css, sections 1-5 */

/* ═══════════════════════════════════════════════════════════════════════
   LIMITS_20260923 -- limits on screen.
     bd_limits   the "this week" strip on the breeding screen (breed.j2)
     accl_*      Account -> My limits (acc_limits.j2, inside a pg_card)
     sd3_weekspend  the weekly points line under the sire page's buy grid
                 (neutral; amber once the budget is reached -- declared after
                 .sd_note so it wins on equal specificity)
   ═══════════════════════════════════════════════════════════════════════ */
/* ---- LIMITS_20260923 (bd_limits lines) -> MOVED KITLOOK_20261018: css/ehr_page_breeding_cards.css */

/* accl_* (Account -> My limits) -> MOVED KITLOOK_20261018: css/ehr_page_account.css */

.sd3_weekspend        { color: #374151; background: #f3f4f6; }
.sd3_weekspend_hit    { color: #92400e; background: #fef3c7; }

/* KITREVIEW_20261018: dark follows data-theme (the theme the player picked), not the device setting; was @media (prefers-color-scheme: dark) */
/* ---- LIMITS_20260923 (bd_ dark lines) -> MOVED KITLOOK_20261018: css/ehr_page_breeding_cards.css */
:root[data-theme="dark"] .sd3_weekspend { color: #cbd5e1; background: #1b2332; }
:root[data-theme="dark"] .sd3_weekspend_hit { color: #e8d7bd; background: rgba(255, 193, 7, 0.10); }

/* ---- LIMITS_20260923 (bd_lim phone) -> MOVED KITLOOK_20261018: css/ehr_page_breeding_cards.css */

/* ---- GROUP_20260923 (accl_group, Account -> My limits) -> MOVED KITLOOK_20261018: css/ehr_page_account.css */


/* ---- WILL2UI_20260924: website-only controls in will2's look --------------------------------
   The will2 UI merge (PLAN_20260924_will2_ui_into_website.md). Loads last, so it wins ties with
   the blocks above; delete this block to get the pre-merge look of these controls back.
   Deliberately NOT here: the Auction / Transfer action panels (ehr_style_09 / _15) -- they are a
   matched pair and move together or not at all; the owner's gold watch buttons (WATCHCOLOR_20260914);
   the misc pages' kit (PGKIT_20260912). */

/* Entries pager (ENTRIES_20260819): was a green outline (#1a6b3c) -- now will2's secondary button,
   .btn + .btn-secondary + .btn-sm, on the theme variables so it follows the theme switcher. */
.re_pager_btn {
    padding: 6px 10px;
    font-size: .8em;
    font-weight: 600;
    line-height: 1.5;
    color: var(--ehr-button-secondary-text);
    background: var(--ehr-button-secondary-bg);
    border: 1px solid var(--ehr-button-secondary-bg);
    border-radius: 10px;
}
.re_pager_btn:hover:not([disabled]) { background: var(--ehr-theme-strong); }  /* cancels the green hover above; .btn-secondary has no hover state */
.re_pager_btn[disabled] { opacity: .4; color: var(--ehr-button-secondary-text); border-color: var(--ehr-button-secondary-bg); }   /* WILLMERGE_20261017 (Q5) */
.re_pager_at { color: var(--ehr-text-primary); }

/* YRGE articles card (YRGE_20260822) sits between will2's header and the tab strip. It had
   vertical margins only, so its left edge ran to the page edge while the header content sits
   1em in. Same inset as .hp_info_grid's padding. */
.horsepage_wrapper > .hp_news { margin: 1em; }

/* ---- BULKPAGE_20260926 + MYBUYS_20260926 (bkb_, mrb_) -> MOVED KITLOOK_20261018: css/ehr_page_races.css */

/* ---- RZLOG_20260926 + RZAPPROVAL_20260926 -> MOVED KITLOOK_20261018: css/ehr_page_misc_people.css sections 5, 6 and 7 (rz_ / ru_ / rzl_) */

/* ---- BULKCARDS_20260926 (bkb_splitlbl, bkb_rznote, mrb_rznote) -> MOVED KITLOOK_20261018: css/ehr_page_races.css */

/* ---- RACEPPS_20260926: the "Past Performances" button in a drawn race's header (races_list.j2) ----
   Opens /race_pps.html in a new tab; that page carries its own css (race_pps.css).
   PPLINK_20260926 (owner: "that Past Performances link doesnt stand out at all"): a solid button in the header's top line. */
.rl2_head_right { display: inline-flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.rl2_ppbtn { display: inline-block; padding: 5px 12px; border-radius: 6px; border: 1px solid #14572f;
             background: #1a6b3c; color: #ffffff !important; font-size: 13px; font-weight: 700; line-height: 1.2;
             white-space: nowrap; text-decoration: none !important; cursor: pointer;
             box-shadow: 0 1px 2px rgba(0,0,0,0.18); }
.rl2_ppbtn:hover { background: #218a4d; }
.rl2_ppbtn:focus-visible { outline: 2px solid #f5c542; outline-offset: 2px; }
/* KITREVIEW_20261018: dark follows data-theme (the theme the player picked), not the device setting; was @media (prefers-color-scheme: dark) */
:root[data-theme="dark"] .rl2_ppbtn { background: #2f8a57; border-color: #3fa66b; color: #ffffff !important; }
:root[data-theme="dark"] .rl2_ppbtn:hover { background: #38a066; }

/* ---- RZOWN_20260926 + RZAPPLY_20260928 + FOLD_20260928 -> MOVED KITLOOK_20261018: css/ehr_page_misc_people.css sections 5 and 6 (residency.j2 rz_, residency_supporters.j2 ru_) */

/* ---- CONTACT_20260926 -> MOVED KITLOOK_20261018: css/ehr_page_misc_people.css section 8 (Contact Admin, ct_) */

/* ---- STABLEDECL_20260930 (Account -> Your stable group) -> MOVED KITLOOK_20261018: css/ehr_page_account.css.
   Dropped there as unused: .acc_decl_hd .acc_decl_list (no template has them). */

/* WATCH3D_20261005 (owner 10-05): Watch 2D / Watch 3D on every results row. wv_off = 3D greyed (not covered by the old rule:
   a viewer level above 0, race id divisible by 3, or a graded race) but still a link, as the old site did. */
.wv_btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.7);
}
.wv_btn img {
  width: 20px;
  height: 20px;
  object-fit: contain;
}
/* WILLMERGE_20261108 (run list 607, P4, owner 11-08): Races was not changed by Will and keeps its text buttons as they were */
.rl_race_header .wv_btn {
    display: inline-block;
    padding: 1px 6px;
    margin: 0 2px;
    border: 1px solid #1a6b3c;
    border-radius: var(--hp-radius-sm);
    line-height: 16px;
    color: #1a6b3c;
    text-decoration: none;
    white-space: nowrap;
    box-shadow: none;
}
.wv_btn:hover { background: #1a6b3c; color: #fff; }
.wv_btn.wv_off,
.rr_watch_btn.wv_off,
a.horsepage_pp_icon.wv_off {
    filter: grayscale(1);
    opacity: .45;
}

@media (max-width: 500px) {
  .wv_btn img {
    width: 18px;
    height: 18px;
  }
}
/* KITREVIEW_20261018: dark follows data-theme (the theme the player picked), not the device setting; was @media (prefers-color-scheme: dark) */
/* KITREVIEW_20261018: the device-dark .wv_btn lines that were here are retired, not converted: the 2D / 3D buttons sit on the
   pastel row tints of Will's Entries list, which stay light in every theme, so the main colours read better there. */

/* RACEDATE_20261006 -- Races -> Races filter panel: the one-day date box (race_top.html .rl2_datepick).
   It sits under the chip groups and above Load Races, boxed like a chip group (.temp-tag-grid in
   ehr_legacy_01_base.css). Colours are the theme variables the panel itself uses (.tag-grid-wrapper),
   so derby / light / dark follow it. ehr_base.css strips input borders and backgrounds, so the box
   draws its own; 1rem keeps iOS from zooming on focus. The link is an a, not a button: the
   .tag-grid-wrapper button rule paints button text white. */
.rl2_datepick { display: flex; flex-wrap: wrap; align-items: center; gap: .5em 1em;
                border: 1px solid #ccc; padding: .5em .75em; margin: 0 0 .75em; }
.rl2_datepick label { margin: 0; font-weight: bold; color: var(--ehr-text-primary); }
.rl2_datepick input[type=date] { font-size: 1rem; padding: 4px 8px; border: 1px solid #767676; border-radius: 6px;
                                 background: var(--ehr-surface-bg); color: var(--ehr-text-primary); cursor: pointer; }
.rl2_dateclear { font-size: .85em; color: var(--ehr-link); text-decoration: underline; cursor: pointer; }
[data-theme="dark"] .rl2_datepick input[type=date] { color-scheme: dark; }
/* RACEDATE_20261006 (render check): --ehr-link has no dark value (#16789a on #3b3b3b is 2.2:1); input edge #767676
   is 3.8-4.5:1 on the light panels (was #ccc, 1.6:1). */
[data-theme="dark"] .rl2_dateclear { color: #7dd3fc; }
[data-theme="dark"] .rl2_datepick input[type=date] { border-color: #ccc; }

/* ---- ADMINALERTS_20261012 -> MOVED KITLOOK_20261018: the Alerts tab (adm_al_*, .adm_tab_badge_yellow) is in css/ehr_page_account.css.
   Only the side-menu counts (side_menu.j2, staff only) stay here. ---- */
/* side menu, staff only: red = unseen errors (! when there are none but the checker is late), yellow = watch */
.adm_menu_counts   { display: inline-flex; gap: 3px; margin-left: 4px; vertical-align: middle; }
.adm_menu_badge    { display: inline-block; min-width: 16px; box-sizing: border-box; padding: 0 5px; border-radius: 8px;
                     font-size: 10.5px; font-weight: 700; line-height: 16px; text-align: center; letter-spacing: 0; text-transform: none; }
.adm_menu_badge_red    { background: #c62828; color: #fff; }
.adm_menu_badge_yellow { background: #f5c518; color: #3d2e00; }
.ehr-quick-btn .adm_menu_counts { position: absolute; top: 2px; left: 50%; margin-left: 6px; }

/* ---- LEASECUR_20261013 (the lease price pills .lz_amt*, the g-card row tint .lz_row_g) and LEASENOTE_20261013 (the
   "since your last visit" box .lzn_*) -> MOVED KITLOOK_20261018: css/ehr_page_breeding_mares.css (blocks 4 and 5, on tokens). The side-menu
   count below is side_menu.j2's and stays. */
/* side menu: the lease news count (blue, apart from the staff red / yellow) */
.lzn_menu_badge { display: inline-block; min-width: 16px; box-sizing: border-box; margin-left: 4px; padding: 0 5px;
                  border-radius: 8px; background: #2563eb; color: #fff; font-size: 10.5px; font-weight: 700; line-height: 16px;
                  text-align: center; vertical-align: middle; letter-spacing: 0; text-transform: none; }
.ehr-quick-btn .lzn_menu_badge { position: absolute; top: 2px; right: 50%; margin-right: 6px; margin-left: 0; }

/* ---- COOLDOWN_20261016 -> MOVED KITLOOK_20261018: css/ehr_page_breeding_cards.css */

/* LAYOUT_20261016 (paste 323, owner 10-16): FULL SCREEN, phase 2. A player who picks Full screen in Account settings
   gets a 1280-wide viewport (topwrapper) and <html class="ehr-layout-full">. Owner: show every column and let the page
   slide sideways instead of hiding columns ("1 and 2 - makes sense to me"). Every rule below needs that class, so the
   Responsive layout is untouched. */

/* 1. The content area stops being a size container, so no "@container content" rule hides a column (the stable list
      and every list that shares its column classes), and wide tables are no longer clipped: the page slides. */
html.ehr-layout-full .ehr-page-container { container-type: normal; }
html.ehr-layout-full .page-content { container-type: normal; }   /* WILLMERGE_20261108 (run list 607, P6): Will moved the size container here */
html.ehr-layout-full .ehr-page-container,
html.ehr-layout-full .ehr-main-content,
html.ehr-layout-full .ehr-content-frame { overflow-x: visible; }
/* the one wide-screen rule that container applied: the phone-only details line under a stable list row stays hidden */
html.ehr-layout-full .stable_horse_list_horse_details { display: none; }

/* 2. Columns that @media rules hide on screens up to 1300-1500 px wide (the full-screen width is 1280) */
html.ehr-layout-full .sdc_t2,
html.ehr-layout-full .sdc_t3,
html.ehr-layout-full .md_t1,
html.ehr-layout-full .racesdrawn_col_jockey,
html.ehr-layout-full .racesdrawn_col_bred,
html.ehr-layout-full .raceresults_bot_col_jockey,
html.ehr-layout-full .raceresults_bot_col_bred,
html.ehr-layout-full .stable_horse_list_col_bred,
html.ehr-layout-full .auctions_hide_1400,
html.ehr-layout-full .auc_th_tag,
html.ehr-layout-full .auc_td_tag,
html.ehr-layout-full .auc_th_form,
html.ehr-layout-full .auc_td_form,
html.ehr-layout-full .rr_c_jockey,
html.ehr-layout-full .rr_c_bred { display: table-cell; }

/* 3. Horse page PPs: every column (they otherwise open up by panel width), the card slides sideways, and Show Calls
      (a narrow-panel control) is not needed */
html.ehr-layout-full .horsepage_hide_500,
html.ehr-layout-full .horsepage_hide_600,
html.ehr-layout-full .horsepage_hide_700,
html.ehr-layout-full .horsepage_hide_800,
html.ehr-layout-full .horsepage_hide_900,
html.ehr-layout-full .horsepage_hide_1000,
html.ehr-layout-full .horsepage_hide_1100,
html.ehr-layout-full .horsepage_hide_1200,
html.ehr-layout-full .horsepage_hide_1300,
html.ehr-layout-full .horsepage_hide_1500,
html.ehr-layout-full .horsepage_hide_1600 { display: table-cell !important; }
html.ehr-layout-full .horsepage_pps_section { overflow-x: auto; }
html.ehr-layout-full .horsepage_pps_title .show-btn { display: none; }

/* 4. RAFI: every column; the rows keep a readable width and slide inside their box (.right-section scrolls) */
html.ehr-layout-full .results-header > .header-cell,
html.ehr-layout-full .results-row > .cell { display: block; }
html.ehr-layout-full .results-header,
html.ehr-layout-full .results-row { min-width: 960px; }

/* MOREFILTERS_20261016 (paste 329): My Stable > Filter > More filters (stable_horses.j2): the Bred in drop-down and the
   Capper / CPU value / Has note chips, closed until the link is pressed.
   10-16 fix (owner: "i dont see the extra filters thingy"): the .tag-grid-wrapper button rule (ehr_legacy_01_base.css)
   paints button text white, on the white panel; the link colour now comes from the theme with a stronger selector, as the
   race date box does (.rl2_dateclear), and the drop-down draws its own box (ehr_base.css strips input borders). */
.stable_more { margin: 0 0 .75em; }
/* STABLEREFRESH_20261018 (owner 10-18): the refresh button at the far right of the Filter bar (stable_refresh, incHashtags.js) */
.tag-grid-wrapper .toggle-title .stable_refresh_btn { float: right; background: none; border: 0; padding: 0 6px; font-size: 1.6em; line-height: 1; cursor: pointer;
  color: var(--ehr-theme-on-tint); }   /* WILLMERGE_20261108 (run list 607, render): the bar is white now */
.tag-grid-wrapper .toggle-title .stable_refresh_btn:hover { opacity: .65; }
/* INLINEREFRESH_20261018 (owner 10-18): the refresh button on Breeding Recent, Claims and Watchlist (.js-loadhere: the same screen,
   tab and filters, in place). At the end of a tab row it goes to the far right; in the Breeding Recent header it floats right. */
.ehr_refresh            { margin-left: auto; line-height: 1.1; font-size: 18px; font-weight: 700; padding: 2px 11px; }   /* owner: "a bit bigger" */
/* .br_head .ehr_refresh (Breeding Recent) -> MOVED KITLOOK_20261018: css/ehr_page_breeding_mares.css */
.ehr_bar_right          { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-left: auto; }
.tag-grid-wrapper .stable_more_btn { background: none; border: 0; padding: 2px 0; font-size: 13px; font-weight: 700;
                                     color: var(--ehr-link); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.stable_more_box { margin-top: 6px; border: 1px solid var(--ehr-border-strong); padding: .5em .75em; }
.stable_more_lab { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; margin: 0 0 6px;
                   color: var(--ehr-text-primary); }
.stable_more_sel { font-size: 1rem; padding: 3px 8px; max-width: 240px; border: 1px solid var(--ehr-text-muted); border-radius: 6px;
                   background: var(--ehr-surface-bg); color: var(--ehr-text-primary); }

/* CAPCOL_20261016 (owner 10-16): the capper colour in its own narrow column right of the horse name on My Stable
   (stable_horses.j2 .stable_horse_list_col_cap); the colour comes from the row (--heat, fn_heatmap), blue cold to red hot. */
.stable_horse_list_col_cap { width: 52px; }
.stable_cap_bar { display: inline-block; width: 6px; height: 18px; border-radius: 3px; background: var(--heat); vertical-align: middle;
                  box-shadow: 0 0 0 1px rgba(0, 0, 0, .2); }
/* the stable list drops its secondary columns as the page narrows (ehr_legacy_03_stablelist.css); Cap goes with Age */
/* WILLCAPAGE (run 541, owner 11-02: "will wants his version live"): Cap shows at every width, as Will has it; the 539 rule that hid it below 500px of content is gone, and Will adjusts the phone fit on his end */
/* @container content (max-width: 650px) {
    .stable_horse_list_col_cap { display: none; width: 0 !important; padding: 0 !important; overflow: hidden; }
} */
/* CAPNARROW_20261128 (run list 814, owner 11-28 on a phone: "slide the cap column ... under the horse name to the left of the records
   when you get that small"): at 500px of content and under the stable list narrows the Plan column to 30px (ehr_legacy_03_stablelist.css),
   so the training picture shrank to 18px and its weeks spilled over it. There the Cap column goes (no Cap sort at that width), its bar
   shows at the start of the record line under the horse name (stable_horses.j2 .shl_capnarrow), and the Plan cell (.shl_plancol) gets
   the room for the full 40px picture back. Wider than 500px: as before. */
.stable_cap_bar.shl_capnarrow { display: none; }
@container content (max-width: 500px) {
    .stable_horse_list_table .stable_horse_list_col_cap { display: none; }
    .stable_horse_list_table td.shl_plancol { width: 52px; }
    .stable_horse_list_horse_details .stable_cap_bar.shl_capnarrow { display: inline-block; width: 5px; height: 12px; margin-right: 6px; vertical-align: -1px; }
}
@media (max-width: 980px) {
    .st_wrap, .sc_wrap, .breeding_scratch_container, .ml_wrap, .breeding_myshares_container, .pg_wrap {
        padding: .5em;
        width: auto;
    }
}
/* WILLMERGE_20261017 -- render check fixes (~/help_shots/willmerge_20261017/REPORT.md) */
/* R1: Entries rows carry Will's pastel surface tint in every theme; in the dark theme their text stayed #e0e0e0 (1.0-1.8:1) */
/* [data-theme="dark"] tr[id^="re_mainrow_"][class*="-mkw"] > td,
[data-theme="dark"] tr[id^="re_mainrow_"][class*="-mkw"] > td a:not(.wv_btn) { color: #1f2937; } */
/* R8: Watch 2D / 3D on a tinted row (Entries, PPs): a white pill, so the green reads on every tint and theme */
tr[class*="-mkw"] .wv_btn { background: var(--ehr-theme-base); color: var(--ehr-button-primary-text); }
tr[class*="-mkw"] .wv_btn:hover { background: #1a6b3c; color: #fff; }
/* ---- WILLMERGE_20261017 R6 (the Jockeys alternate row in dark) -> MOVED KITLOOK_20261018: css/ehr_page_misc_market.css (JOCKEYS; the card follows the theme now, so the patch is gone) */
/* WILLMERGE_20261017 R7 (Hot List link colours, dark) + R16 (.list_table td.sireavail_col) -> MOVED KITLOOK_20261018: css/ehr_page_breeding_sires.css (on tokens). */
/* WILLMERGE_20261017 (render R13): the pager's grey on the dark theme's #171717 page, same value the device-dark rule uses */
[data-theme="dark"] .sharebid_pageno { color: #94a3b8; }
/* WILLMERGE_20261017 (render R17) -> MOVED KITLOOK_20261018: the 981-1400px .pg_table cell padding is in css/ehr_kit.css. */
/* JOCKEYCARD_20261023 (paste 408, owner 10-23, intake 36): a jockey name that opens the floating jockey card (data-jockey-card,
   jk_cardOpen in automated.js; inside = jockey/jinja/jockey_card.j2). PPs, race card and expanded rows, results. Theme tokens
   only, so every theme follows; on a phone the card is the window width less the gutters. */
.jkc_link { color: inherit; cursor: pointer; text-decoration: underline dotted; text-underline-offset: 2px; }
.jkc_link:hover { text-decoration-style: solid; }
.jkc_box { display: none; position: absolute; z-index: 9000; width: 470px; max-width: calc(100vw - 16px); box-sizing: border-box;
           background: var(--ehr-surface-bg, #fff); color: var(--ehr-text-primary, #1e293b);
           border: 1px solid var(--ehr-border, #c9d1db); box-shadow: 0 6px 24px rgba(0, 0, 0, 0.25);
           font-size: 12.5px; line-height: 1.35; text-align: left; white-space: normal; }
.jkc_head { display: flex; align-items: center; gap: 8px; padding: 6px 8px 6px 10px;
            background: var(--ehr-table-header-bg, #1e293b); color: var(--ehr-card-primary-header-text, #fff); }
.jkc_name { flex: 1 1 auto; font-family: var(--pg-name-font, sans-serif); font-size: 17px; font-weight: 700; }
.jkc_close { flex: 0 0 auto; border: 0; background: transparent; color: inherit; font-size: 20px; line-height: 1; cursor: pointer; padding: 0 4px; }
.jkc_sub { display: flex; flex-wrap: wrap; gap: 4px 14px; padding: 6px 10px; color: var(--ehr-text-secondary, #555); }
.jkc_off { font-weight: 700; color: var(--pg-bad-text, #8f1c1c); }
.jkc_table { width: calc(100% - 16px); margin: 0 8px 6px; border-collapse: collapse; }
.jkc_table th, .jkc_table td { padding: 2px 3px; border-bottom: 1px solid var(--ehr-border, #e2e6ea); white-space: nowrap; }
.jkc_table th { font-weight: 700; color: var(--ehr-text-secondary, #555); text-align: left; }
.jkc_table .jkc_num { text-align: right; }
.jkc_lbl { font-weight: 700; }
.jkc_rides td:nth-child(4) { white-space: normal; }
.jkc_rides_head { padding: 4px 10px 2px; font-weight: 700; }
.jkc_msg { padding: 10px 12px; color: var(--ehr-text-secondary, #555); }
.jkc_foot { padding: 2px 10px 8px; text-align: right; }
@media (max-width: 500px) { .jkc_stats th:nth-child(4), .jkc_stats td:nth-child(4), .jkc_stats th:nth-child(5), .jkc_stats td:nth-child(5),
                            .jkc_stats th:nth-child(9), .jkc_stats td:nth-child(9) { display: none; }
                            .jkc_rides th:nth-child(3), .jkc_rides td:nth-child(3) { display: none; } }

/* DOSAGE_20261126 (run list 790, owner 11-26): the dosage box under a pedigree chart (_dosage_box.j2 on the WikiPedigree
   horse page, the foal preview and the horse page Pedigree tab) and the chef-de-race badge (.wk_chef). The five columns
   fit a 320px phone: the table scrolls inside its own wrap, never the page. Dark follows data-theme like the rest.
   Owner 11-26: DI and CD on one line, More info opens the rest in place (details / summary, no script). */
.dsg_box { margin: 12px 0 8px; padding: 8px 12px; border: 1px solid #c9d5ea; border-radius: 5px; background: #f6f8fc; font-size: 13px; }
.dsg_sum { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 16px; cursor: pointer; list-style: none; }
.dsg_sum::-webkit-details-marker { display: none; }
.dsg_sum::marker { content: ''; }
.dsg_more { margin-left: auto; font-size: 12px; font-weight: 600; color: #2b5fa8; text-decoration: underline; white-space: nowrap; }
.dsg_more_c, .dsg_box[open] .dsg_more_o { display: none; }
.dsg_box[open] .dsg_more_c { display: inline; }
.dsg_sum:focus-visible { outline: 2px solid #2b5fa8; outline-offset: 2px; }
.dsg_body { margin-top: 8px; padding-top: 8px; border-top: 1px solid #dde4f0; }
.dsg_box_err { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; }
/* Owner 11-26: "If you have the room put the DP before you open as well. But don't force it on the smaller screens": the box
   is a size container, so the DP on the line goes when the box itself is narrow (a side panel on a desktop too), and on any
   screen under 560px (the same for a browser without container queries). More info shows it either way. */
details.dsg_box { container-type: inline-size; }
@container (max-width: 460px) { .dsg_sum_dp { display: none; } }
@media (max-width: 560px) { .dsg_sum_dp { display: none; } }
.dsg_hd { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: #20355e; }
.dsg_nums { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-bottom: 8px; }
.dsg_num { white-space: nowrap; font-weight: 600; }
.dsg_k { font-size: 11px; font-weight: 700; color: #5b6575; text-transform: uppercase; letter-spacing: .04em; margin-right: 4px; }
.dsg_tablewrap { overflow-x: auto; max-width: 100%; }
.dsg_dp { border-collapse: collapse; min-width: 280px; width: 100%; max-width: 520px; margin-bottom: 8px; }
.dsg_dp th, .dsg_dp td { border: 1px solid #c9d2c9; padding: 3px 6px; text-align: center; }
.dsg_dp th { font-size: 11px; font-weight: 700; background: #e6ecf8; color: #20355e; overflow: hidden; text-overflow: ellipsis; }
.dsg_dp td { font-weight: 600; background: #fff; }
.dsg_chefs { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin-bottom: 6px; }
.dsg_chef { overflow-wrap: anywhere; }
.dsg_cat { display: inline-block; padding: 0 5px; border-radius: 8px; background: #20355e; color: #fff; font-size: 10px; font-weight: 700; }
.dsg_none { color: #5b6575; }
.dsg_body .dsg_none { margin-bottom: 6px; }
.dsg_hint { font-size: 11px; color: #6b7480; line-height: 1.4; }
.wk_chef { background: #20355e; color: #fff; border-color: #20355e; }
.wk_chefsel { max-width: 180px; flex: 0 1 180px; }
:root[data-theme="dark"] .dsg_box { background: #1a2030; border-color: #3a4459; }
:root[data-theme="dark"] .dsg_hd { color: #b8c7e8; }
:root[data-theme="dark"] .dsg_more { color: #9fbdf0; }
:root[data-theme="dark"] .dsg_body { border-top-color: #3a4459; }
:root[data-theme="dark"] .dsg_k, :root[data-theme="dark"] .dsg_none, :root[data-theme="dark"] .dsg_hint { color: #9aa3b2; }
:root[data-theme="dark"] .dsg_dp th { background: #232c3f; color: #b8c7e8; border-color: #3a4459; }
:root[data-theme="dark"] .dsg_dp td { background: #1c2333; color: #e6e9ee; border-color: #3a4459; }
:root[data-theme="dark"] .dsg_cat, :root[data-theme="dark"] .wk_chef { background: #b8c7e8; color: #1c2333; border-color: #b8c7e8; }
/* DOSAGELISTS_20261127 (run list 811, owner 11-27: a chef tag in each sire cell of the pedigree trees): the chef-de-race
   pill after a sire name in the first four generations (_ped_chart.j2 on the WikiPedigree page and the foal preview, the
   horse page Pedigree tab), with the list name once a second list is switched on (.dsg_ctag_lst). Sized like the repeat
   badge (.sd_ped_dupe): an inline-block capped at its cell, so it never hangs out of a narrow cell on a phone. */
.dsg_ctag { display: inline-block; max-width: 100%; box-sizing: border-box; overflow-wrap: anywhere; margin-left: 5px; padding: 1px 4px; border-radius: 3px; background: #20355e; color: #fff; font-size: 10px; font-weight: 700; line-height: 1.2; vertical-align: baseline; }
.dsg_ctag_lst { font-weight: 400; }
@media (max-width: 480px) {
  .dsg_ctag { margin-left: 3px; padding: 0 3px; font-size: 9px; }
}
:root[data-theme="dark"] .dsg_ctag { background: #b8c7e8; color: #1c2333; }
