/* ═══════════════════════════════════════════════════════════════════════════
   ehr_page_breeding_mares.css -- KITLOOK_20261018. Section stylesheet for the Breeding menu's mare screens.
   Loads after automated.css (topwrapper.j2), so a rule here beats the legacy sd_ / lz_ rules it re-scopes.

   SCREENS AND WHAT EACH ONE USES
     Find Mares + Open Mares + Lease Market   python/_incFiles/breeding/mare_list.py (one endpoint; mode + status pick the screen)
       mare_list.j2          page + filters   kit: pg_wrap, pg_head/pg_title, details.pg_filter > summary.pg_filter_hd (the fold,
                                                   s.11d) + pg_filter_body, pg_grid/pg_f/pg_lab/pg_in, pg_actions, pg_btn (s.2, 4, 7)
       mare_list_notices.j2  lease news box   kit: pg_note pg_note_info, pg_muted                     (s.6)
       mare_list_rows.j2     the results      kit: pg_table on the sd_table, pg_name, pg_sex, pg_chip(_ok/_warn/_bad), pg_btn /
                                                   pg_btn_2 / pg_btn_accent / pg_btn_danger / pg_btn_sm, pg_note_bad (confirm
                                                   panels), pg_empty, pg_card (my open-mare bids), pg_sub, pg_muted (s.3-6)
                             The mare rows deliberately mirror My Stable (Will's): the ▼ arrow, the expand row of
                             .stable_horse_list_expanded_item cards, grey header, zebra by mare (two rows per mare).
                             KITREVIEW_20261018: the arrow cell is pg_x, the open row's cell pg_detail_panel, the pager
                             pg_pager / pg_pager_at (ehr_kit.css s.11a-c); the tiles stay inside the panel.
     Breeding Recent       breeding/breeding_recent.py -> breeding_recent.j2
                             kit: pg_wrap, pg_head/pg_title/pg_sub, pg_chip(_ok/_warn/_bad), pg_card + pg_table, pg_name,
                                  pg_sex, pg_link, pg_detail_lab, pg_empty, pg_muted, pg_btn (the refresh button)

   WHAT IS NOT HERE (shared, left where it is; overridden below only under .ml_wrap)
     .sd_table / .sd_btn / .sd_hname / .sd_sexchip ... the sire one-pager kit (automated.css SD_20260805)
     .ml_f, .ml_list, .ml_breed, .ml_heat*, .lz_bidbox*, .lz_wd, .lz_warn, .lz_go, .lz_cancel, .lz_msg*, .lz_listbox
                                     also on mare_detail.j2, the horse page, breed.j2 / breeding_bids.j2 / sire_detail.j2
     .rt_band_*                      the HPot letter chips (RATEBAND_20260816)
     .stable_horse_list_*            My Stable, Will's own

   Will: the common restyles
     - every colour is a kit token or one of yours; the page tokens below are only the lease DATA colours.
     - row tint of a g-card lease = --ml-g-row; the price pills = --ml-bp-* (points, slate) / --ml-g-* (g-cards, gold).
     - header / zebra / hover of the mare tables = your --ehr-table-* tokens (block 2); the two-rows-per-mare zebra is there.
     - buttons: the legacy .sd_btn keeps its class (shared), so block 1 restates the kit button for .sd_btn.pg_btn* inside
       these pages: a change to .pg_btn in ehr_kit.css needs the same change in block 1 (KIT CANDIDATE: a kit-level
       .sd_btn.pg_btn reset would remove it).
     - DRt heat (.ml_heat_*) and HPot letters (.rt_band_*) are data scales in automated.css; they set their own text colour.
   ═══════════════════════════════════════════════════════════════════════════ */

/* ---------------------------------------------------------------------------
   0. PAGE TOKENS -- the lease data colours (LEASECUR_20261013), the only colours with no kit name.
      Same hues in every theme; the dark line keeps them readable on Will's dark rows.
   --------------------------------------------------------------------------- */
:root {
  --ml-bp-bg:        #eef2f7;  --ml-bp-border: #c4d0e1;  --ml-bp-text: #1e3a5f;   /* a price in points (BP): slate */
  --ml-g-bg:         #fff1c9;  --ml-g-border:  #d9a520;  --ml-g-text:  #5c3b00;   /* a price in g-cards: gold */
  --ml-g-row:        #fffaea;  --ml-g-row-hover: #fbefcb;                          /* a g-card lease's row tint */
  --ml-g-edge:       #d9a520;                                                       /* ... and its gold edge on the arrow cell */
  --br-card-text:    #6a3d9a;                                                       /* Breeding Recent: paid with sire cards */
}
:root[data-theme="dark"] {
  --ml-bp-bg:        rgba(119, 141, 169, 0.22);  --ml-bp-border: #5b6d86;  --ml-bp-text: #dbe4f0;
  --ml-g-bg:         rgba(217, 165, 32, 0.20);   --ml-g-border:  #a07818;  --ml-g-text:  #f3d68a;
  --ml-g-row:        rgba(217, 165, 32, 0.10);   --ml-g-row-hover: rgba(217, 165, 32, 0.18);
  --ml-g-edge:       #c9971c;
  --br-card-text:    #c9a7f0;
}

/* ---------------------------------------------------------------------------
   1. BUTTONS -- KITLOOK_20261018: the row and panel buttons keep .sd_btn (shared with the sire / mare one-pagers) and add
      the kit classes; .sd_btn (automated.css) loads after the kit and would win, so the kit look is restated here, scoped.
   --------------------------------------------------------------------------- */
.ml_wrap .sd_btn.pg_btn        { padding: 6px 14px; border: 1px solid transparent; border-radius: var(--pg-radius-ctl);
                                 background: var(--ehr-button-primary-bg); color: var(--ehr-button-primary-text);
                                 font-size: 13px; font-weight: 600; line-height: 1.4; text-transform: none; letter-spacing: normal; }
.ml_wrap .sd_btn.pg_btn_sm     { padding: 2px 10px; font-size: 11.5px; }
.ml_wrap .sd_btn.pg_btn_2      { background: var(--ehr-surface-bg); color: var(--ehr-text-primary); border-color: var(--ehr-border-default); }
.ml_wrap .sd_btn.pg_btn_2:hover { background: var(--ehr-table-primary-hover-bg); color: var(--ehr-text-primary); }
.ml_wrap .sd_btn.pg_btn_accent { background: var(--ehr-label-accent); color: var(--ehr-theme-accent-text); border-radius: 20px; }
.ml_wrap .sd_btn.pg_btn_danger { background: var(--ehr-surface-bg); color: var(--pg-neg); border-color: var(--pg-bad-border); }
.ml_wrap .sd_btn.pg_btn_danger:hover { background: var(--pg-bad-bg); color: var(--pg-neg); }
.ml_wrap .lz_cancel            { opacity: 1; }   /* lz_cancel (shared) dims to .8; pg_btn_2 already reads as the second choice */
.ml_wrap .lz_msg_ok            { color: var(--pg-pos); }   /* lz_msg_* (shared, written by lz_say) were fixed greens / reds */
.ml_wrap .lz_msg_no            { color: var(--pg-neg); }

/* ---------------------------------------------------------------------------
   2. MARE_LIST_20260805 (moved from automated.css) -- Find Mares / Open Mares / Lease Market: shell, filters, tables
   --------------------------------------------------------------------------- */
.ml_head   { margin-bottom: .5em; }
.ml_sub    { margin: 0 0 6px; }
/* LISTONLY_20261021 (owner 10-21): the count line carries the page's one refresh at its right (mare_list_rows.j2
   .ml_listbar); the "Press Update List to apply" note (.pg_pending, ehr_kit.css) stands left of Update List */
.ml_listbar                    { display: flex; align-items: flex-start; gap: 8px; }
.ml_listbar .ml_sub            { flex: 1 1 auto; }
.ml_listbar .ehr_refresh       { flex: 0 0 auto; margin-bottom: 6px; }
.ml_wrap .pg_actions .pg_pending { align-self: center; margin-left: 0; }

/* the filter bar: a kit Filter card. .ml_f (shared with mare_detail.j2) is a 12px column with dimmed spans and 28px
   fields; inside this card the kit's label + field take over. */
.ml_filters.pg_filter          { margin-bottom: var(--pg-gap); }
.ml_fgrid                      { grid-template-columns: minmax(170px, 1.25fr) repeat(auto-fill, minmax(140px, 1fr)); }
.ml_wrap .ml_filters .ml_f     { gap: 0; font-size: 13px; }
.ml_wrap .ml_f > .pg_lab       { opacity: 1; }
.ml_wrap .ml_f > .pg_in        { height: auto; min-height: 32px; padding: 6px 9px; }
.ml_go                         { align-self: flex-end; }

/* the tables: Will's stable list on the shared sd_table -- grey bold header, zebra BY MARE (row + its expand row), hover
   on the mare's row only, a 1px frame. Restated at (0,3,x) because .sd_table loads after the kit. */
.ml_wrap .sd_table.pg_table                    { background: transparent; color: var(--ehr-text-primary); }
.ml_wrap .ml_table.pg_table                    { border: 1px solid var(--ehr-border-default); }
.ml_wrap .sd_table.pg_table > thead > tr       { background: var(--ehr-table-primary-header-bg); }
.ml_wrap .sd_table.pg_table > thead > tr > th  { padding: 8px 6px; font-size: 13px; color: var(--ehr-table-primary-header-text);
                                                 border-bottom: 1px solid var(--ehr-border-default); }
.ml_wrap .sd_table.pg_table td                 { font-size: 13px; border-bottom-color: var(--ehr-border-default); }
/* KIT CANDIDATE (KITREVIEW_20261018): zebra in PAIRS -- a mare's row and her expand row share a shade (the kit's .pg_table
   zebra is per row and has no pair rule yet; sires, people and market carry the same nth-child(4n+...) rule). */
.ml_wrap .ml_table > tbody > tr:nth-child(4n+1),
.ml_wrap .ml_table > tbody > tr:nth-child(4n+2) { background: var(--ehr-table-row-bg); }
.ml_wrap .ml_table > tbody > tr:nth-child(4n+3),
.ml_wrap .ml_table > tbody > tr:nth-child(4n+4) { background: var(--ehr-table-row-alt-bg); }
.ml_wrap .ml_table > tbody > tr:nth-child(odd):hover { background: var(--ehr-table-primary-hover-bg); }
/* KITREVIEW_20261018: the arrow cell is the kit's .pg_x (28px, centred, text colour, link colour on hover). .sd_table td
   (automated.css, loads after the kit) would keep its 6px side padding, so the kit's width and padding are restated at
   (0,3,1); the legacy toggle span keeps its class (re_toggleExpanded looks for it) and takes the cell's hover colour. */
.ml_wrap .sd_table.pg_table th.pg_x,
.ml_wrap .sd_table.pg_table td.pg_x          { width: 28px; padding-left: 4px; padding-right: 4px; text-align: center; }
.ml_wrap .ml_table .pg_x:hover .stable_horse_list_expand_toggle { color: var(--ehr-link-color); }

/* names as the stable list writes them (.pg_name); sire x damsire under them */
.ml_wrap .sd_hname a.pg_name        { color: var(--ehr-text-primary); font-weight: 600; text-decoration: none; cursor: pointer; }
.ml_wrap .sd_hname a.pg_name:hover  { color: var(--ehr-link-color); background: none; padding: 0; }
.ml_parents { font-size: 10.5px; letter-spacing: 0.02em; color: var(--ehr-text-secondary); text-transform: uppercase;
              line-height: 1.3; margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 26ch; }

/* the year + sex chip as the stable list's sex square */
.ml_wrap .sd_sexchip.pg_sex         { padding: 0 5px; border-radius: 0; font-size: 11px; color: var(--pg-sex-text); white-space: nowrap; }
.ml_wrap .sd_sexchip.sd_sex_f       { background: var(--pg-sex-f); }
.ml_wrap .sd_sexchip.sd_sex_m       { background: var(--pg-sex-m); }

/* how the mare is yours: a kit chip. own is the quiet default -- lease and public are the two a player needs to spot. */
.ml_via        { white-space: nowrap; }
.ml_via_lease  { border-color: var(--pg-info-border); background: var(--pg-info-bg); color: var(--pg-info-text); }
.ml_via_public { border-color: var(--pg-warn-border); background: var(--pg-warn-bg); color: var(--pg-warn-text); }
.ml_free       { color: var(--ehr-text-secondary); }
.ml_heat_none  { font-weight: 400; color: var(--ehr-text-secondary); }
/* An unrated mare (DamRating 0) is not a bad mare -- she is an unmeasured one, so she gets no colour at all. */
.ml_heat_0:has(.ml_heat_none) { background: none; }

.ml_note.pg_empty { margin: 10px 0; line-height: 1.5; }

/* KITREVIEW_20261018 (finding 5): the pager is the kit's .pg_pager (flex, centred, pg_btn_2 buttons, pg_pager_at label).
   The kit gives the card-foot fill under a .pg_tablewrap; these tables stand alone, so the same foot is restated for a
   pager that follows the mare table (the Open Mares view has the bids card in between: a plain pager there). */
.ml_wrap .ml_table + .ml_pager.pg_pager { border: 1px solid var(--ehr-border-default); border-top: 0;
                                          background: var(--ehr-card-primary-header-bg); border-radius: 0 0 var(--pg-radius) var(--pg-radius); }

/* A number column's HEADER right-aligns with its data (.sd_table th is text-align:left at (0,1,1)). */
.ml_num                      { text-align: right; }
.ml_wrap .sd_table th.ml_num { text-align: right; }

/* KITREVIEW_20261018 (finding 6): the open row's cell is the kit's .pg_detail_panel (card fill, the 3px highlight strip,
   one line under it). The legacy panel div inside it brought its own 10px padding and a top rule: off, the cell pads now.
   A g-card listing's tint (block 4, higher specificity) still paints its panel gold, as before. */
.ml_table > tbody > tr > td.pg_detail_panel > .stable_horse_list_expanded_info { padding: 0; border-top: 0; }
/* ehr_legacy_08_stablepage_ratings.css hides .stable_horse_list_expanded_row from 650px up -- right on the stable page,
   wrong here: the dropped tier columns live ONLY in that row. Scoped re-enable. */
.ml_table .stable_horse_list_expanded_row { display: flex; flex-wrap: wrap; gap: 16px; }
/* KITLOOK_20261018: Will's expand cards are white with fixed greys; in his dark theme the row around them is dark, so
   there they take the theme's surface and text (the main themes are unchanged, the green left edge stays). */
:root[data-theme="dark"] .ml_table .stable_horse_list_expanded_item  { background: var(--ehr-surface-bg);
    border-top-color: var(--ehr-table-secondary-border-color); border-right-color: var(--ehr-table-secondary-border-color);
    border-bottom-color: var(--ehr-table-secondary-border-color); }
:root[data-theme="dark"] .ml_table .stable_horse_list_expanded_label { color: var(--ehr-text-secondary); }
:root[data-theme="dark"] .ml_table .stable_horse_list_expanded_value { color: var(--ehr-text-primary); }

/* progressive columns. Nothing is ever more than one tap away: every tier a width hides also lives in the expand row.
   Tiers drop in the order t1 (widest content) -> t2 -> t3. */
@media (max-width: 1100px) { .ml_t1 { display: none; } }
@media (max-width: 900px)  { .ml_t2 { display: none; } }
@media (max-width: 720px)  { .ml_t3 { display: none; } }
/* KITLOOK_20261018: a fourth tier for the two lease tables that still ran past a phone's frame (Bid / Raise / Breed cut
   off): the market's DRt and Previously Leased's Paid -- both repeated in the expand row (Dam rating / You paid). */
@media (max-width: 520px)  { .lz_t4 { display: none; } }
/* KITREVIEW_20261018 (finding 13): Find Mares had no slack at 375 (its 12 columns met the frame exactly), so the Opens
   time could only wrap one word a line. A fifth tier gives it room: the Sex column goes on a phone -- every row on this
   screen is a mare, and her year is in the panel (Age 9 (2018)). misc_sortTable skips a display:none header. */
@media (max-width: 520px)  { .ml_t5 { display: none; } }

.ml_act    { white-space: nowrap; text-align: right; }
/* MAREDISA3_20261006 / MLFOLD_20261006: the action cell and the chip cells wrap only when the table runs out of room;
   direct row cells only, so the order book nested in an expand row keeps its own layout. */
@media (max-width: 620px) { .ml_act { white-space: normal; } }
.ml_table > tbody > tr > td.ml_act          { white-space: normal; }
.ml_table > tbody > tr > td.ml_act .pg_chip { white-space: normal; }
/* MLFOLD_20261006 (review): an open expand row must not resize the columns. */
.ml_table > tbody > tr > td > .stable_horse_list_expanded_info { contain: inline-size; }
/* MLCOLS_20261007: the row's secondary buttons, in a bar at the top of her expand row (the stable page's action cards). */
.ml_actbar                { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 8px; }
.ml_actbar .ml_list       { margin-left: 0; }
.ml_actbar .lz_msg        { margin-top: 0; }
.ml_table > tbody > tr > td.ml_opens .pg_chip,
.ml_table > tbody > tr > td.ml_lease .pg_chip,
.ml_table > tbody > tr > td.ml_bid .om_pill   { white-space: normal; }
@media (max-width: 720px) {
  .ml_table > thead > tr > th[onclick] { white-space: normal; }
}
/* KITREVIEW_20261018 (finding 13): "(old site)" after an old-site bid never splits; the market's residency chip drops
   its "for <residency>" tail on a phone (the name is one tap away: the row's panel and the delist / convert text). */
.lz_oldsite { white-space: nowrap; }
@media (max-width: 520px) { .lz_oldsite { display: block; font-size: 9.5px; letter-spacing: 0; line-height: 1.2; } }
/* KITLOOK_20261018: on a phone the mare table was wider than the frame (DRt and Breed cut off, before and after the kit):
   tighter cells, a narrower arrow column, the name and its parents line may wrap, and the badges stack two by two.
   KITREVIEW_20261018: the kit's 520 step (ehr_kit.css 11e, .pg_table 12px / 5px 4px) cannot reach these tables -- .sd_table
   td (automated.css, equal specificity, loads later) wins -- so this block stays; it is 2px tighter than the kit's step
   because the 12-column tables need it. KIT CANDIDATE: a kit-level .sd_table.pg_table reset would retire it. */
@media (max-width: 520px) {
  .ml_wrap .ml_table.pg_table > thead > tr > th { padding: 6px 2px; font-size: 11px; }
  .ml_wrap .ml_table.pg_table > tbody > tr > td { padding-left: 2px; padding-right: 2px; }
  .ml_wrap .ml_table.pg_table > tbody > tr > td.pg_detail_panel { padding: 8px 8px 10px 11px; }   /* KITREVIEW_20261018: the panel keeps a gutter inside its strip */
  .ml_wrap .sd_table.pg_table th.pg_x,
  .ml_wrap .sd_table.pg_table td.pg_x           { width: 14px; padding-left: 2px; padding-right: 0; }
  .ml_wrap .ml_table .stable_horse_list_expand_toggle { padding: 0; }
  .ml_wrap .ml_table .sd_hname a.pg_name        { font-size: 1.05em; letter-spacing: .02em; }
  .ml_wrap .ml_table .ml_parents                { white-space: normal; max-width: 16ch; font-size: 9.5px; letter-spacing: 0; }
  .ml_wrap .ml_table .race_upcoming_entries_badges { flex-wrap: wrap; max-width: 46px; }
  .ml_wrap .ml_table .race_upcoming_entries_badges img { max-width: 20px; height: auto; }
  .ml_wrap .ml_table .sd_sexchip.pg_sex         { white-space: normal; height: auto; padding: 1px 2px; line-height: 1.2; text-align: center; }
  .ml_wrap .ml_table .pg_chip                   { padding: 1px 4px; }
  .ml_wrap .ml_table .sd_btn.pg_btn_sm          { padding: 2px 5px; }
  .ml_wrap .ml_table .rt_band                   { min-width: 0; padding: 1px 5px; }
  /* the lease tables carry three price columns: slimmer pills, a smaller unit */
  .ml_wrap .lz_table .sd_hname a.pg_name        { font-size: 1em; letter-spacing: 0; }
  .ml_wrap .lz_table > tbody > tr > td .lz_amt  { padding: 0 3px; font-size: 11.5px; }
  .ml_wrap .lz_table > tbody > tr > td .lz_amt_u { margin-left: 1px; font-size: 9px; letter-spacing: 0; }
  .ml_wrap .lz_table > tbody > tr > td.ml_act   { font-size: 11px; }
  .ml_wrap .lz_table > tbody > tr > td.ml_act .pg_chip { padding: 1px 3px; font-size: 10px; }
  .ml_wrap .lz_table > tbody > tr > td.ml_act .lz_rezfor { display: none; }   /* KITREVIEW_20261018, finding 13 */
  /* KITREVIEW_20261018 (finding 13): the Opens time ("Jan 3 4:15 PM") was one word a line in a cell squeezed to its
     narrowest; the chip is wide enough for two lines (Jan 3 / 4:15 PM) now that the Sex column (ml_t5) has gone. */
  .ml_wrap .ml_table > tbody > tr > td.ml_opens .pg_chip { min-width: 4.6em; text-align: center; }
  /* Open Mares' "my bids" list: the same compaction, so Withdraw stays on the screen */
  .ml_wrap .om_table.pg_table > thead > tr > th,
  .ml_wrap .om_table.pg_table > tbody > tr > td { padding: 5px 3px; font-size: 12px; }
  .ml_wrap .om_table .sd_hname a.pg_name        { font-size: 1em; letter-spacing: 0; }
  .ml_wrap .om_table .sd_btn.pg_btn_sm          { padding: 2px 5px; }
}

/* ---------------------------------------------------------------------------
   3. LEASE_20260805 + LEASE_LISTING_20260809 (moved from automated.css) -- the market's cells, order book, panels
   --------------------------------------------------------------------------- */
/* bid-column states: no bid, my bid, withdrawn -- told apart by the dash and the word "out", not by colour alone */
.lz_none  { color: var(--ehr-text-secondary); }
.lz_mine  { font-weight: 700; color: var(--ehr-text-primary); }
.lz_mine.lz_none { opacity: .6; }   /* a bid placed on the old site: shown, but it does not count here */
.lz_out   { letter-spacing: .02em; }
.lz_bidn  { font-size: 11px; color: var(--ehr-text-secondary); margin-left: 3px; }
.lz_net   { font-weight: 700; color: var(--pg-pos); }
.lz_when  { font-size: 11px; color: var(--ehr-text-secondary); white-space: nowrap; }

/* the order book: only ever on my own listings, nested in the expand row */
.lz_book        { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--ehr-border-default); }
.lz_book_head   { font-weight: 700; font-size: 13px; margin-bottom: 6px; }
.lz_book_note   { display: block; font-weight: 400; font-size: 11.5px; color: var(--ehr-text-secondary); margin-top: 2px; }
.lz_book_table  { margin-top: 4px; }
.ml_wrap .lz_book_table.pg_table > thead > tr > th,
.ml_wrap .lz_book_table.pg_table > tbody > tr > td { padding: 4px 8px; font-size: 12px; }

/* the accept confirmation: an inline panel in a hidden row, never confirm() */
.ml_wrap .lz_confirm_row > td { background: var(--pg-info-bg); color: var(--pg-info-text); }
.lz_confirm     { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 8px 4px; }
.lz_confirm_txt { flex: 1 1 320px; font-size: 12.5px; line-height: 1.5; }
.lz_confirm_act { display: flex; gap: 8px; flex-wrap: wrap; }
.lz_confirm_txt .lz_warn { margin-top: 4px; }

/* the bid / list / take / disassociate panels (.lz_bidbox, shared) and the permanent-step panels (.lz_wd, shared, now a
   kit pg_note_bad): their light-only colours restated on tokens here. lz_bidbox_txt was forced dark in the dark theme
   because the expand row used to be white there; the row is Will's dark row now. */
.ml_wrap .lz_bidbox                  { border-top-color: var(--ehr-border-default); }
.ml_wrap .lz_bidbox .lz_bidbox_txt   { color: var(--ehr-text-primary); font-size: 12.5px; }
.ml_wrap .lz_bidbox_act .ml_f        { font-size: 12px; }
.ml_wrap .lz_bidbox_act .pg_in       { height: auto; min-height: 30px; padding: 4px 8px; }
.ml_wrap .lz_wd.pg_note              { padding: 10px 12px; border-radius: var(--pg-radius);
                                       background: var(--pg-bad-bg); color: var(--pg-bad-text); }
.ml_wrap .lz_warn                    { color: var(--pg-bad-text); font-size: 12px; }

.lz_ownerbar { display: flex; flex-flow: row wrap; align-items: center; gap: 8px; margin-top: 10px; padding-top: 8px;
               border-top: 1px solid var(--ehr-border-default); }
.lz_ownerbar .lz_wd { flex-basis: 100%; }

/* the legacy stable list hides .stable_horse_list_expanded_row below 650px; on the market that row holds the order book
   and the bid panel, so it is re-enabled for these tables (the !important beats ehr_legacy_03's phone rule). */
@media (max-width: 650px) {
  .lz_table .stable_horse_list_expanded_row { display: flex !important; }
}

/* ---------------------------------------------------------------------------
   4. LEASECUR_20261013 (moved from automated.css) -- points or g-cards at a glance: every lease price is a pill (lzAmt),
      BP in slate, g in gold; a g-card listing's row and its expand row get a gold tint and a gold edge on the arrow cell.
      KITLOOK_20261018: on tokens (block 0), so the tint is a dark gold on Will's dark rows, and the DRt heat cell keeps
      its colour on a tinted row (the tint painted over it).
   --------------------------------------------------------------------------- */
.lz_amt   { display: inline-block; padding: 0 6px; border: 1px solid; border-radius: 9px; font-weight: 700;
            line-height: 1.45; white-space: nowrap; font-variant-numeric: tabular-nums; }
.lz_amt_u { margin-left: 3px; font-size: 10px; font-weight: 700; letter-spacing: .02em; }
.lz_amt_p { background: var(--ml-bp-bg); border-color: var(--ml-bp-border); color: var(--ml-bp-text); }
.lz_amt_g { background: var(--ml-g-bg);  border-color: var(--ml-g-border);  color: var(--ml-g-text); }
.lz_mine .lz_amt { box-shadow: 0 0 0 1px currentColor; }     /* my own bid: the same pill, ringed */
.ml_wrap .lz_table > tbody > tr.lz_row_g > td:not(.ml_heat),
.ml_wrap .lz_table > tbody > tr.lz_row_g > td.ml_heat_0:has(.ml_heat_none)    { background-color: var(--ml-g-row); }
.ml_wrap .lz_table > tbody > tr.lz_row_g:hover > td:not(.ml_heat)             { background-color: var(--ml-g-row-hover); }
.ml_wrap .lz_table > tbody > tr.lz_row_g > td.rl_td_expand                    { box-shadow: inset 3px 0 0 var(--ml-g-edge); }

/* ---------------------------------------------------------------------------
   5. LEASENOTE_20261013 (moved from automated.css) -- the "since your last visit" box at the top of the Lease Market,
      now a kit info note (pg_note pg_note_info); the quiet one-line form is pg_muted. Prices inside are the lease pills.
      (.lzn_menu_badge, the side-menu count, stays in automated.css: it is side_menu.j2's.)
   --------------------------------------------------------------------------- */
.lzn_box.pg_note      { margin: 0 0 var(--pg-gap); }
.lzn_head             { font-weight: 700; margin-bottom: 3px; }
.lzn_list             { list-style: none; margin: 0; padding: 0; }
.lzn_item             { padding: 2px 0; }
.lzn_item + .lzn_item { border-top: 1px solid var(--pg-info-border); }
.lzn_ago              { margin-left: 8px; font-size: 11.5px; white-space: nowrap; opacity: .75; }
.lzn_more, .lzn_new   { margin-top: 4px; }
.lzn_box a.lzn_horse  { color: inherit; font-weight: 700; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.lzn_box b            { color: inherit; }
.lzn_muted            { display: inline-block; margin: 0 0 .75em; font-size: 12.5px; }

/* ---------------------------------------------------------------------------
   6. OPENMARES_20260922 (moved from the <style> block in mare_list_rows.j2) + MARELIST_20260912's open-mare explainer --
      Open Mares (status P): the round strip (a kit note: info, open = ok, draw pending = warn), my wallet, the bid pills
      (kit chips), my bids this season (a kit card).
   --------------------------------------------------------------------------- */
.om_strip.pg_note   { margin: 0 0 10px; border-color: var(--pg-info-border); background: var(--pg-info-bg); color: var(--pg-info-text); }
.om_strip.om_strip_open { border-color: var(--pg-ok-border);   background: var(--pg-ok-bg);   color: var(--pg-ok-text); }
.om_strip.om_strip_wait { border-color: var(--pg-warn-border); background: var(--pg-warn-bg); color: var(--pg-warn-text); }
.om_strip b         { white-space: nowrap; }
.om_strip .om_hint b { white-space: normal; }   /* KITREVIEW_20261018: the hint's bold sentence ran 775px wide on a phone */
.om_wallet          { font-size: 0.92em; margin-top: 3px; }
.om_wallet span     { margin-right: 12px; white-space: nowrap; }
.om_pill            { margin-right: 4px; }
.om_pill_1          { border-color: var(--pg-ok-border);   background: var(--pg-ok-bg);   color: var(--pg-ok-text); }
.om_pill_2          { border-color: var(--pg-warn-border); background: var(--pg-warn-bg); color: var(--pg-warn-text); }
.om_pill_w          { border-color: var(--pg-info-border); background: var(--pg-info-bg); color: var(--pg-info-text); }
.om_pill_x          { color: var(--ehr-text-secondary); text-decoration: line-through; }
.om_box             { margin: 6px 0 8px 0; }
.om_mine.pg_card    { margin: 14px 0 6px 0; }
.om_mine > .lz_none { padding: .75em 1em; }
.om_mine > .lz_msg  { padding: 0 1em; }
.om_mine .om_table  { width: 100%; }
.om_max             { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 6px 10px; padding: .75em 1em;
                      border-top: 1px solid var(--ehr-border-default); }
.om_max .ml_f       { font-size: 12px; }
.om_max .pg_lab     { opacity: 1; }
.om_max input       { width: 8em; }
.om_max .lz_msg     { flex-basis: 100%; }
.om_hint            { margin-top: 6px; padding: 4px 8px; border-left: 3px solid var(--pg-warn-border);
                      background: var(--pg-warn-bg); color: var(--pg-warn-text); }

/* <details> is native, so the explainer needs no JavaScript; it sits inside the strip and takes its colours */
.ml_open_more   { margin-top: 8px; }
.ml_open_more > summary { cursor: pointer; font-weight: 700; font-size: 12.5px; color: inherit; }
.ml_open_more > summary:hover { text-decoration: underline; }
.ml_open_body   { margin-top: 8px; max-width: 68ch; }
.ml_open_body p { margin: 0 0 9px; }
/* .ml_open_note: no template uses it (grep 2026-10-18: python/, wrappers/, js/); moved with its block, on tokens. Delete
   when nothing brings it back. */
.ml_open_note   { margin: 0 0 12px; padding: 11px 14px; border-left: 4px solid var(--pg-warn-border); border-radius: var(--pg-radius);
                  background: var(--pg-warn-bg); color: var(--pg-warn-text); font-size: 13px; line-height: 1.55; }

/* ---------------------------------------------------------------------------
   7. BRECENT_20260911 (moved from automated.css) -- Breeding -> Breeding Recent. The status chip is the point of the page:
      four states, four kit chips, each with its own word. An in-flight row is tinted so it reads as "not settled yet".
      KITLOOK_20261018: on the kit -- the @media (prefers-color-scheme: dark) block is gone; the tokens carry the dark theme.
   --------------------------------------------------------------------------- */
.br_head                { margin-bottom: 14px; }
.br_head .ehr_refresh   { float: right; }   /* INLINEREFRESH_20261018: the refresh button, right of the title */
.br_sub                 { max-width: 62ch; }

/* the summary strip: counts, not a chart; a zero count is RENDERED ("0 waiting" answers "did my breeding go through") */
.br_sum         { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }
.br_pill        { display: inline-flex; align-items: baseline; gap: 6px; padding: 4px 11px; font-size: 12px; font-weight: 400; }
.br_pill_n      { font-weight: 700; font-variant-numeric: tabular-nums; }

.br_tablewrap.pg_card { overflow: hidden; }
.br_table td    { padding: 9px 10px; vertical-align: top; }
.br_table th    { padding: 8px 10px; }
.br_wrap .br_table > tbody > tr.br_row_live        { background: color-mix(in srgb, var(--pg-ok-bg) 55%, var(--ehr-table-row-bg)); }
.br_wrap .br_table > tbody > tr.br_row_stuck       { background: color-mix(in srgb, var(--pg-bad-bg) 70%, var(--ehr-table-row-bg)); }
.br_wrap .br_table > tbody > tr.br_row_live:hover,
.br_wrap .br_table > tbody > tr.br_row_stuck:hover { background: var(--ehr-table-primary-hover-bg); }

.br_chip        { white-space: nowrap; }

/* cells */
.br_when        { white-space: nowrap; }
.br_ago         { font-weight: 600; color: var(--ehr-text-primary); }
.br_exact       { display: block; font-size: 11px; color: var(--ehr-text-secondary); }
.br_pending     { color: var(--ehr-text-secondary); }
.br_sexchip     { margin-left: 5px; vertical-align: 1px; }
.br_sexchip.pg_sex { min-width: 17px; height: 17px; font-size: 10px; }
/* A button, not an <a>: it opens a named window through a delegated handler and has no href to fall back to; it reads as
   a link (.pg_link) with the name's face (.pg_name). The reset keeps the browser's button chrome off. */
.br_link        { background: none; border: 0; padding: 0; cursor: pointer; text-align: left; }
.br_link.pg_name { font-family: var(--pg-name-font); font-size: 1.1em; }
.br_link:hover  { text-decoration: underline; }

/* the three sire lines, stacked and labelled (S / DS / DDS, then the dam) */
.br_ped         { line-height: 1.6; }
.br_ped_row     { display: block; }
.br_ped_lab     { display: inline-block; min-width: 30px; }
.br_dam         { color: var(--ehr-text-primary); }

.br_cost        { white-space: nowrap; text-align: right; font-variant-numeric: tabular-nums; }
.br_cost_card   { color: var(--br-card-text); font-weight: 600; }
.br_cost_none   { color: var(--ehr-text-secondary); }

/* the factory's own words, verbatim: a progress note, except when it is the reason a build gave up */
.br_msg         { font-size: 11.5px; color: var(--ehr-text-secondary); line-height: 1.45; }
.br_msg_bad     { color: var(--pg-neg); }
.br_tries       { font-size: 11px; color: var(--ehr-text-secondary); white-space: nowrap; }

.br_empty strong { display: block; margin-bottom: 4px; }
.br_foot        { margin-top: 10px; line-height: 1.55; }

/* No horizontal scrollbar -- house rule. The two droppable columns are restated elsewhere on the row: the exact clock
   (the relative age stays) and the pedigree (the breeding screen has the mating). */
@media (max-width: 760px) {
  .br_c_ped  { display: none; }
}
@media (max-width: 560px) {
  .br_exact  { display: none; }
  .br_table th, .br_table td { padding: 7px 8px; }
}
