/* Auction House Deals page - layered on top of assets/ah/base.css.
   Reuses .ah-window / .ah-table / .coin / quality-color classes and the
   --ah-* / --wgf-* design tokens defined there. */

/* Chrome-kit structural tokens come from /static/css/_tokens.css (single home,
   2026-07-04 uiux-standardization) - the old mirror copy here is gone. */

/* --- Toolbar: override the AH grid toolbar with a flexible wrap layout --- */
.ah-toolbar.deals-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px var(--space-3);
  align-items: center;
  padding: 12px;
}

.deals-toolbar .ah-realm-wrap {
  flex: 0 1 300px;
  max-width: 300px;
  margin-right: var(--space-1);
}

.deals-toolbar .deals-type-toggle {
  flex: 0 0 auto;
}

.deals-toolbar .ah-control {
  flex: 0 0 auto;
}

.deals-toolbar #dealsExportButton {
  padding: 0 var(--space-3);
}

/* Refresh button gets the cap-width padding (must equal --wgf-btn-cap exactly). */
.deals-toolbar #dealsRefreshButton {
  padding: 0 var(--wgf-btn-cap) !important;
  min-height: var(--wgf-btn-h);
}

.deals-toolbar .ah-realm-select {
  width: 100%;
}

.deals-realm-wrap {
  position: relative;
}

.deals-realm-suggest {
  position: absolute;
  z-index: 40;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  max-height: 260px;
  margin: 0;
  padding: var(--space-1);
  list-style: none;
  overflow-y: auto;
  /* Dropdown panel: near-black, thin metal rim (matches .wgf-dropdown__menu).
     Flat well fill - no gradient (Blizzard-palette law, 2026-09-03). */
  border: 1px solid var(--wgf-metal);
  border-radius: 6px;
  background: var(--wgf-well);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.58);
}

.deals-realm-suggest[hidden] {
  display: none;
}

.deals-realm-suggest li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-2);
  border: 1px solid transparent;
  border-radius: 4px;
  cursor: pointer;
}

.deals-realm-suggest li:hover,
.deals-realm-suggest li.is-active {
  background: rgba(var(--wgf-gold-rgb), 0.12);
  border-color: var(--wgf-border-neutral);
}

.deals-realm-suggest__name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--ah-text);
  font-weight: 700;
}

.deals-realm-suggest__meta {
  flex: 0 0 auto;
  color: var(--wgf-gold-link);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

/* Ensure [hidden] works on .deals-field even though display:flex in the author
   stylesheet would otherwise beat the browser's user-agent [hidden]{display:none}. */
.deals-field[hidden] { display: none !important; }

/* --- Deal-type tab strip: wgf-tab red-button slices (ig-38 container law) --- */
/* The container is a plate-strip; each button IS the client red button dimmed
   at rest, pressed slices for the active state. Same padding==cap-width rule as
   .wgf-tab: 13px at 30px height. */
.deals-type-toggle {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0;
  padding: 0 var(--space-1);
  border: 1px solid var(--wgf-metal-soft);
  border-radius: 0;
  background: linear-gradient(var(--wgf-well), var(--wgf-panel-1));
}

.deals-type-btn {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 30px;
  padding: 0 13px;                               /* == cap width at 30px height */
  border: 0;
  border-radius: 0;
  background:
    url(/assets/ui/128-redbutton-left-cap.png) left center / auto 100% no-repeat border-box,
    url(/assets/ui/128-redbutton-right-cap.png) right center / auto 100% no-repeat border-box,
    url(/assets/ui/_128-redbutton-center.png) left center / auto 100% repeat-x content-box;
  background-color: transparent;
  color: var(--wgf-gold-dim);
  font-family: var(--font-game);
  font-size: var(--text-sm);
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1;
  text-shadow: var(--text-ink-outline);
  cursor: pointer;
  white-space: nowrap;
  filter: brightness(0.66) saturate(0.9);        /* dimmed = unselected */
  transition: filter var(--motion-fast) var(--ease-standard),
              color var(--motion-fast) var(--ease-standard);
}

.deals-type-btn:hover {
  filter: brightness(0.9) saturate(1);
  color: var(--wgf-gold-bright);
}

.deals-type-btn:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

.deals-type-btn.is-active {
  /* selected = pressed red state (pressed cap slices + 1px sink) */
  background:
    url(/assets/ui/128-redbutton-left-cap-pressed.png) left center / auto 100% no-repeat border-box,
    url(/assets/ui/128-redbutton-right-cap-pressed.png) right center / auto 100% no-repeat border-box,
    url(/assets/ui/_128-redbutton-center-pressed.png) left center / auto 100% repeat-x content-box;
  background-color: transparent;
  color: var(--wgf-gold-bright);
  filter: none;
  transform: translateY(1px);
}

/* --- Filter bar: squared stone well, thin metal border, inset depth --- */
.deals-filterbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px var(--space-3);
  padding: 12px;
  background: var(--wgf-well);
  border-radius: 0;
  border-bottom: 1px solid var(--wgf-metal-soft);
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.75), inset 0 0 0 1px rgba(0, 0, 0, 0.6);
}

.deals-field {
  display: flex;
  flex-direction: column;
  flex: 1 1 110px;
  max-width: 180px;
  min-width: 0;
  gap: var(--space-1);
}

.deals-field-label {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--ah-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.deals-input {
  width: 100%;
  min-width: 0;
}

/* AH inputfield 3-slice treatment on filter number inputs (ig-62 pattern). */
.deals-filterbar .deals-input {
  height: var(--wgf-input-h);
  padding: 0 12px;
  border: 0;
  border-radius: 4px;
  background:
    url(/assets/ui/auctionhouse-ui-inputfield-left.png) left center / auto 100% no-repeat,
    url(/assets/ui/auctionhouse-ui-inputfield-right.png) right center / auto 100% no-repeat,
    url(/assets/ui/auctionhouse-ui-inputfield-middle.png) left center / auto 100% repeat-x;
  color: var(--wgf-text);
  font-family: var(--font-ui);
  font-size: var(--text-sm);
  box-shadow: none;
  appearance: textfield;
  -moz-appearance: textfield;
}

.deals-filterbar .deals-input::-webkit-outer-spin-button,
.deals-filterbar .deals-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.deals-filterbar .deals-input:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

.deals-reset {
  height: 31px;
  margin-left: 0;
  padding: 0 12px;
  border: 1px solid var(--wgf-border-neutral-soft);
  border-radius: 4px;
  background: transparent;
  color: var(--wgf-gold-link);
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.deals-filterbar .deals-reset {
  margin-left: auto;
}

.deals-reset:hover {
  color: var(--ah-gold);
  border-color: var(--ah-gold-border);
}

/* --- Refresh button: exact wgf-btn-red slices (replaces ah-search-button approx.) --- */
#dealsRefreshButton {
  height: var(--wgf-btn-h);
  min-width: 96px;
  border: 0;
  border-radius: 0;
  letter-spacing: normal;
  text-transform: none;
  font-size: var(--text-sm);
  background:
    url(/assets/ui/128-redbutton-left-cap.png) left center / auto 100% no-repeat border-box,
    url(/assets/ui/128-redbutton-right-cap.png) right center / auto 100% no-repeat border-box,
    url(/assets/ui/_128-redbutton-center.png) left center / auto 100% repeat-x content-box;
  background-color: transparent;
  color: var(--wgf-gold-bright);
  font-family: var(--font-game);
  font-weight: 700;
  text-shadow: var(--text-ink-outline);
  cursor: pointer;
  transition: filter var(--motion-fast) var(--ease-standard);
}

#dealsRefreshButton:hover {
  filter: brightness(1.12);
}

#dealsRefreshButton:active {
  background:
    url(/assets/ui/128-redbutton-left-cap-pressed.png) left center / auto 100% no-repeat border-box,
    url(/assets/ui/128-redbutton-right-cap-pressed.png) right center / auto 100% no-repeat border-box,
    url(/assets/ui/_128-redbutton-center-pressed.png) left center / auto 100% repeat-x content-box;
  background-color: transparent;
  transform: translateY(1px);
  filter: brightness(0.92);
}

#dealsRefreshButton:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

/* --- Source select: wgf-dropdown collapsed look (CSS-only, native select) --- */
/* CSS-only limit: the native arrow is suppressed; the AH dropdown arrow slice
   rides the right edge. Open-menu styling requires the .wgf-dropdown JS component
   (markup change listed in report). */
#dealsSourceSelect {
  height: var(--wgf-dropdown-h);
  min-width: 180px;
  padding: 0 40px 0 12px;
  border: 0;
  border-radius: 0;
  background:
    url(/assets/ui/auctionhouse-ui-dropdown-arrow-down.png) right 6px center / auto 20px no-repeat,
    url(/assets/ui/auctionhouse-ui-dropdown-left.png) left center / auto 100% no-repeat,
    url(/assets/ui/auctionhouse-ui-dropdown-right.png) right center / auto 100% no-repeat,
    url(/assets/ui/auctionhouse-ui-dropdown-middle.png) left center / auto 100% repeat-x;
  color: var(--wgf-gold);
  font-family: var(--font-game);
  font-size: var(--text-sm);
  font-weight: 600;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
  box-shadow: none;
}

#dealsSourceSelect:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

/* --- Info / caution bars: quiet stone plate rows, gold/red left accent ---
   Uses body class for specificity to override the inline <style> block in
   wow-auction-house/deals/index.html (.wgf-ah-page is on <body>). */
.wgf-ah-page .deals-freshness {
  border-radius: 0;
  background: var(--wgf-panel-1);
  border: 1px solid var(--wgf-border-neutral-soft);
  border-left: 3px solid var(--wgf-gold-dim);
  box-shadow: none;
}

.wgf-ah-page .deals-trust-warning {
  border-radius: 0;
  background: var(--wgf-panel-1);
  border: 1px solid rgba(var(--wgf-down-rgb), 0.25);
  border-left: 3px solid var(--wgf-down);
  box-shadow: none;
}

/* --- Explainer line --- */
.deals-explainer {
  margin: 0;
  padding: var(--space-2) 12px;
  background: var(--wgf-bg-base);
  border-bottom: 1px solid var(--wgf-border-neutral-soft);
  color: var(--ah-muted);
  font-size: 12.5px;
}

/* --- Table --- */
.deals-table-shell {
  border-left: 0;
}

.deals-table {
  min-width: 940px;
}

/* In-game journal column headers: Friz gold small-caps on a raised plate band.
   Matches .wgf-colhead__cell (ig-62 AH column header tabs). */
.deals-table thead th {
  background: linear-gradient(180deg, var(--wgf-plate-hi), var(--wgf-well));
  color: var(--wgf-gold-muted);
  font-family: var(--font-game);
  font-size: 11px;
  font-weight: 700;
  font-variant: small-caps;
  letter-spacing: 0.04em;
  text-shadow: var(--text-ink-outline);
  border: 1px solid var(--wgf-metal-soft);
  border-bottom: 1px solid var(--wgf-metal);
}

.deals-table th.ah-sortable {
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}

.deals-table thead th.ah-sortable:hover {
  background: linear-gradient(180deg, var(--wgf-panel-3), var(--wgf-panel-2));
  color: var(--wgf-gold-bright);
}

.deals-table th.is-sorted {
  color: var(--wgf-gold-bright);
}

.deals-table th .sort-arrow {
  font-size: 10px;
  margin-left: 2px;
}

/* Render-stable column hiding, toggled per deal type from JS. */
.deals-table.hide-col-discount .col-discount,
.deals-table.hide-col-spread .col-spread {
  display: none;
}

/* Hairline metal row separators */
.deals-table tbody td {
  vertical-align: top;
  border-bottom: 1px solid var(--wgf-metal-soft);
}

/* Whole row is clickable -> item detail view */
.deals-row {
  cursor: pointer;
}

/* Gold gradient hover per AH kit (matches .ah-table tbody tr:hover in base.css) */
.deals-row:hover {
  background: linear-gradient(180deg, rgba(var(--wgf-gold-rgb), 0.10), rgba(var(--wgf-gold-rgb), 0.04));
}

/* Empty state: centered Friz gold (ig-26 "Tip:" voice on empty AH table) */
.deals-table .ah-empty {
  padding: 38px var(--space-2) !important;
  color: var(--wgf-gold-bright) !important;
  font-family: var(--font-game);
  font-size: var(--text-sm) !important;
  font-variant: small-caps;
  letter-spacing: 0.04em;
  text-align: center;
  text-shadow: var(--text-ink-outline);
}

.deals-table .ah-empty strong {
  display: block;
  margin-bottom: var(--space-2);
}

/* Available cell: keep the count and sub-line cleanly stacked and aligned */
.deals-table .col-qty {
  text-align: right;
  white-space: nowrap;
}
.deals-qty {
  display: block;
  font-weight: 700;
}
.deals-qty-sub {
  display: block;
  margin-top: 1px;
}

.deals-table .col-source,
.deals-table .col-discount,
.deals-table .col-spread,
.deals-table .col-updated {
  white-space: nowrap;
}

/* Item cell */
.deals-item {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-weight: 700;
  text-decoration: none;
}

/* The client's own AH item-icon frame at native scale.
   auctionhouse-itemicon-small-border.png is a 32x32 slice whose metal ring occupies
   4px on each edge - measured off the alpha channel 2026-09-03: the opaque band sits
   at px 2-3 and 28-31 on both axes, the middle is fully transparent. A 24px content
   box inside a 4px border-image therefore reproduces the frame 1:1 with no scaling,
   and needs no wrapper element, which matters because the row <img> is emitted by two
   renderers this lane does not own (assets/ah-deals.js and
   tools/bake_deals_static_html.py). The 4px radius it replaces was not a client shape:
   AH list icons are square in a square frame. */
.deals-item-icon {
  box-sizing: content-box;
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  background: var(--ah-panel, var(--wgf-panel-1));
  border: 4px solid transparent;
  border-image: url("/assets/ui/auctionhouse-itemicon-small-border.png") 4 / 4px stretch;
}

.deals-item:hover .deals-item-name {
  text-decoration: underline;
}

.deals-badge {
  display: block;
  margin-top: 2px;
  font-size: 10.5px;
  font-weight: 700;
  color: var(--ah-muted);
}

/* Source chip: squared well chip, game font, no pill. */
.deals-src {
  display: inline-block;
  padding: 1px var(--space-2);
  border-radius: 3px;
  font-family: var(--font-game);
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.03em;
  font-variant: small-caps;
  text-transform: none;
}

.deals-src--realm {
  background: color-mix(in srgb, var(--wgf-gold-primary) 14%, transparent);
  color: var(--wgf-gold-bright);
  border: 1px solid color-mix(in srgb, var(--wgf-gold-primary) 40%, transparent);
}

/* Bronze trim, not orange: the commodity chip reads as the second metal in the
   client's own two-metal pair (gold plate / bronze rim), which is why it no
   longer carries its own hue. */
.deals-src--commodity {
  background: color-mix(in srgb, var(--wgf-gold-accent) 18%, transparent);
  color: var(--wgf-gold-muted);
  border: 1px solid color-mix(in srgb, var(--wgf-gold-accent) 55%, transparent);
}

/* Reference price sub-label */
.deals-ref-label {
  display: block;
  margin-top: 1px;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--wgf-neutral-text);
}

/* Discount badge, graded by magnitude. --ah-green is var(--wgf-up) (ah/base.css:16),
   the market-up channel the palette leaves untouched - it is data, not chrome. */
.deals-disc {
  font-weight: 800;
}
.deals-disc--hot { color: var(--ah-gold); }
.deals-disc--good { color: var(--ah-green); }
.deals-disc--ok { color: rgba(var(--wgf-up-rgb), 0.78); }
.deals-disc--none { color: var(--ah-muted); font-weight: 600; }

.deals-spread {
  font-weight: 700;
  color: var(--wgf-gold-muted);
}

.deals-profit {
  font-weight: 800;
}
.deals-profit .money { color: var(--ah-green); }

/* --- About / glossary section --- */
.deals-about {
  width: min(1500px, calc(100vw - 44px));
  margin: var(--space-4) auto 0;
  padding: 0 2px var(--space-2);
  color: var(--ah-text);
}

.deals-about h2 {
  font-family: var(--font-display);
  color: var(--ah-gold);
  font-size: 1.2rem;
  margin: 0 0 var(--space-2);
}

.deals-about p {
  color: var(--ah-muted);
  font-size: 13.5px;
  line-height: 1.55;
  max-width: 70ch;
}

.deals-glossary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px var(--space-4);
  margin: var(--space-3) 0;
}

.deals-glossary dt {
  color: var(--ah-gold-soft);
  font-weight: 800;
  font-size: 13px;
  margin-bottom: 2px;
}

.deals-glossary dd {
  margin: 0;
  color: var(--ah-muted);
  font-size: 12.5px;
  line-height: 1.5;
}

.deals-about-note {
  font-style: italic;
  font-size: 12px !important;
  color: var(--wgf-neutral-text) !important;
}

/* --- Score column --- */
.col-score {
  width: 64px;
  text-align: center;
  white-space: nowrap;
}

/* --- Column ladder: 1:1 with the client's AH list (ig-26) -----------------------
   assets/ah/base.css sizes the SIX-column browser table: .col-price 190px right,
   .col-market 160px right, .col-qty 110px right, .col-type 92px. The deals board has
   TEN columns and was inheriting three of those fixed widths - 460px of the table -
   while Under mkt / Spread / Est. profit got no width and no alignment at all. The
   three numbers a person actually compares therefore sat LEFT-aligned and ragged
   between right-aligned Price and Market. docs/ui-ux/13-ingame-reference.md ig-26 is
   explicit: "price as coin-notation left, item = icon + name in quality color, numeric
   columns right". This is that ladder, scoped to .deals-table so the browser page and
   every other .ah-table on the site are untouched. Widths sum to 728px + Item, inside
   the sheet's own .deals-table min-width: 940px. */
.deals-table .col-price   { width: 128px; text-align: right; }
.deals-table .col-market  { width: 118px; text-align: right; }
.deals-table .col-discount,
.deals-table .col-spread  { width: 84px;  text-align: right; }
.deals-table .col-profit  { width: 124px; text-align: right; }
.deals-table .col-qty     { width: 96px;  text-align: right; }
.deals-table .col-source  { width: 86px; }
.deals-table .col-updated { width: 84px;  text-align: right; }
.deals-table .col-name    { min-width: 0; }

/* Digits line up column to column, and the row keeps its height whether the cell is
   the baked plain-text price or the hydrated .wgf-price coin markup. */
.deals-table .col-price,
.deals-table .col-market,
.deals-table .col-discount,
.deals-table .col-spread,
.deals-table .col-profit,
.deals-table .col-qty,
.deals-table .col-updated {
  font-variant-numeric: tabular-nums;
}

/* The coin kit is an inline-flex box: inside a right-aligned cell its own content has
   to be pushed to the end too, or the glyph floats away from the number. */
.deals-table .wgf-price {
  justify-content: flex-end;
  line-height: 1;
}

/* Score key: the four tiers the Score column can show, spelled out on the page instead
   of hiding in a title="" the keyboard and touch never reach. Thresholds are the ones
   the renderers actually apply (assets/ah-deals.js scoreTier / tools/bake_deals_static_html.py
   score_tier: 7.0 / 5.5 / 3.5). The chips are the real .dsb-compact component from
   assets/wgf-deal-score.css, so the key and the column can never drift apart. */
.deals-scorekey {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px var(--space-2);
  margin: var(--space-2) 0 0;
  font-size: var(--text-xs);
  color: var(--ah-muted);
}

.deals-scorekey dt {
  margin: 0;
}

.deals-scorekey dd {
  margin: 0 var(--space-2) 0 0;
  font-variant-numeric: tabular-nums;
}

/* M17 deal-score chip styling now lives in the canonical assets/wgf-deal-score.css
   (single home, linked on the deals page). The minimal glue that used to live here
   was removed once the canonical sheet shipped (2026-06-23). */

/* --- FAQ section ---
   The FAQ is THE SPELLBOOK now (owner law 2026-08-04). Its look lives in the one
   home - assets/wgf-spellbook.css - which this page links, and the section opts
   in with `class="deals-faq wgf-spellbook"`. The bespoke two-column dl styling
   that used to live here is DELETED rather than left dormant: at equal
   specificity it would have fought the component and the winner would have come
   down to <link> order, which is the exact failure mode logged in
   wgf-zonebg.css. Only the section's own outer spacing stays here. */
.deals-faq {
  margin-top: 28px;
}

/* --- Responsive --- */
@media (max-width: 720px) {
  /* Turn each deal into a self-contained card instead of forcing a sideways
     scroll of a 10-column table. Score + Item form the card header; the key
     decision fields stack below as labelled rows (label via td::before from
     each cell's data-th). Reference-only columns are dropped on phones. */
  .deals-table,
  .deals-table tbody {
    display: block;
    min-width: 0;
  }
  .deals-table thead {
    position: absolute;
    width: 1px; height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
  .deals-table tbody tr {
    display: block;
  }
  .deals-table .deals-row {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 0.3rem 0.6rem;
    padding: var(--space-2) 12px;
    margin-bottom: var(--space-2);
    /* Mobile deal card: in-game tooltip plate (squared, flat - no gradient). */
    border: 1px solid var(--wgf-metal);
    border-radius: 5px;
    background: var(--wgf-panel-1);
  }
  .deals-table .deals-row > td {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 0.75rem;
    padding: 2px 0;
    border: 0;
    white-space: normal;
    text-align: left;
    /* Release the desktop column ladder above: on a phone these cells are grid
       children of the card, not columns, and a fixed 128px would clip them. */
    width: auto;
  }
  /* The coin kit follows the cell back to the left on the card layout. */
  .deals-table .deals-row > td .wgf-price {
    justify-content: flex-start;
  }
  .deals-table .deals-row > td::before {
    content: attr(data-th);
    flex: 0 0 auto;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--ah-muted);
  }
  /* Card header: score badge (col 1) + item name (col 2) on the first grid row */
  .deals-table .deals-row .col-score { grid-column: 1; grid-row: 1; justify-content: center; }
  .deals-table .deals-row .col-name  { grid-column: 2; grid-row: 1; font-weight: 700; }
  .deals-table .deals-row .col-score::before,
  .deals-table .deals-row .col-name::before { display: none; }
  .deals-table .deals-row .col-qty { text-align: left; }
  /* Reference-only columns: drop on phones to keep the card lean */
  .deals-table .deals-row .col-source,
  .deals-table .deals-row .col-market,
  .deals-table .deals-row .col-spread,
  .deals-table .deals-row .col-updated {
    display: none;
  }
  .ah-toolbar.deals-toolbar {
    gap: var(--space-2);
    padding: var(--space-2);
  }
  .deals-toolbar .ah-realm-wrap,
  .deals-toolbar #dealsSourceSelect {
    flex: 1 1 100%;
    max-width: none;
  }
  .deals-toolbar .ah-realm-wrap {
    width: 100%;
    margin-right: 0;
  }
  .deals-realm-suggest {
    right: 0;
  }
  .deals-type-toggle {
    width: 100%;
    justify-content: stretch;
  }
  .deals-type-btn {
    flex: 1 1 auto;
    text-align: center;
  }
  .deals-toolbar #dealsExportButton,
  .deals-toolbar #dealsRefreshButton {
    flex: 1 1 100%;
    width: 100%;
  }
  .deals-filterbar {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-2);
    padding: var(--space-2);
  }
  .deals-input {
    width: 100%;
  }
  .deals-field {
    min-width: 0;
  }
  .deals-filterbar .deals-reset {
    margin-left: 0;
    width: 100%;
    grid-column: 1 / -1;
  }
}

@media (max-width: 480px) {
  .deals-filterbar {
    grid-template-columns: 1fr;
  }
  .deals-type-toggle {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .deals-type-btn {
    min-height: 32px;
  }
}


/* ---- Deals loading caption (2026-06-28) ----------------------------------------
   Sets expectation during the (multi-second) deal scan so the shimmer skeleton
   does not read as a stuck/empty table. See assets/ah-deals.js renderSkeleton. */
.deals-loading-row td {
  padding: var(--space-3) var(--space-3);
  color: var(--wgf-muted, #b3a88f);
  font-size: 14px;
  background: rgba(var(--wgf-gold-rgb), 0.04);
}
.deals-loading-spinner {
  display: inline-block;
  width: 15px;
  height: 15px;
  margin-right: var(--space-2);
  vertical-align: -2px;
  border-radius: 50%;
  border: 2px solid rgba(var(--wgf-gold-rgb), 0.25);
  border-top-color: var(--wgf-gold-link, #ffe375);
  animation: deals-spin 0.7s linear infinite;
}
@keyframes deals-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .deals-loading-spinner { animation: none; }
}


/* ---- Context band + hero caption (2026-09-03, static:wow-auction-house lane) ----
   These sixteen rules lived in a <style> block inside the deals page's <head>, where
   they carried the pre-purge gold, a blue-grey surface and a salmon warning tint -
   none of them palette tokens, and none of them cache-busted, since an inline block
   ships with the HTML and no ?v= can move it. Moved here so the page has ONE
   stylesheet home and every colour is enforced by token. */
.deals-hero-context {
  margin: 0.15rem 0 0.35rem;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--wgf-gold);
}
.deals-hero-context[hidden] { display: none; }

.deals-context { margin: 0 0 0.75rem; }

.deals-context-heading {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  font-size: 1.15rem;
  line-height: 1.25;
  color: var(--wgf-gold);
}

.deals-snapshot-note {
  margin: 0 0 0.5rem;
  font-size: 0.8rem;
  line-height: 1.45;
  color: var(--wgf-neutral-text);
}

/* Freshness strip: recessed well, bronze rim, one gold edge on the reading side. */
.deals-freshness {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 1.4rem;
  margin: 0 0 0.55rem;
  padding: 0.5rem 0.7rem;
  border: 1px solid var(--wgf-metal);
  border-left: 3px solid var(--wgf-gold-accent);
  border-radius: 4px;
  background: var(--wgf-well);
  font-size: 0.85rem;
}
.deals-freshness[hidden] { display: none; }

.deals-fresh-item strong {
  margin-right: 0.25rem;
  font-weight: 600;
  color: var(--wgf-neutral-text);
}

.deals-fresh-emph {
  font-weight: 600;
  color: var(--wgf-gold);
}

/* Verify-in-game warning. Bronze plate, not a red alert: it is standing advice on
   every load, so it must not read as an error state. */
.deals-trust-warning {
  margin: 0 0 0.5rem;
  padding: 0.5rem 0.7rem;
  border: 1px solid var(--wgf-metal);
  border-radius: 4px;
  background: rgba(var(--wgf-gold-rgb), 0.06);
  color: var(--wgf-text);
  font-size: 0.9rem;
}

.deals-meta-note {
  margin: 0.4rem 0 0;
  font-size: 0.78rem;
  line-height: 1.45;
  color: var(--wgf-neutral-text);
}

.deals-advanced { margin: 0 0 0.6rem; }


/* ---- Glossary + related-page rail (2026-09-03) ----------------------------------
   The glossary terms carry a real datamined icon (.wgf-ah-icon16, wgf-ah-page.css);
   the rail reuses .wgf-ah-hubs from that same sheet, so nothing new is declared here
   but the spacing that belongs to this page. */
.deals-glossary dt .wgf-ah-icon16 {
  margin-right: var(--space-1);
}

.deals-about .wgf-ah-hubs {
  margin-top: var(--space-4);
  padding-left: 0;
  padding-right: 0;
}

/* The in-content rectangle sits between the glossary and the rail; centre it on the
   prose column rather than the 1500px table width. */
.deals-about .wgf-ad-slot--rectangle {
  max-width: 940px;
  margin-left: auto;
  margin-right: auto;
}

/* ---- wh parity 20261123wh: listview density on the deals table ----
   Header 30px uppercase muted; the in-game plate art and sort arrows stay. */
.deals-table thead th {
  height: 30px;
  padding-top: 0;
  padding-bottom: 0;
  font-family: var(--wh-font, "Open Sans", Arial, Helvetica, sans-serif);
  font-size: var(--wh-fs-sm, 12px);
  font-variant: normal;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--wh-muted, #888888);
}
.deals-table tbody td { vertical-align: middle; font-variant-numeric: tabular-nums; }
.deals-table tbody tr.deals-row:hover > td { background: var(--wh-raise, #2a2a2a); }
.deals-table th.is-sorted { color: var(--wh-heading, #ffffff); }
