/*
  wow-token-dashboard.css — WoW Token dashboard (/wow-token/ only).

  Flattened 2026-06-12 (FR-1, FRONTEND_REVIEW_2026-06-12). The 12 WGF_*_START/END
  patch layers were collapsed into this single sheet; the rendered result is the
  final cascade of the old file (the "clean launch" design). Colors consume the
  shared palette in /static/css/_tokens.css. Pre-flatten original:
  backups/frontend-fr-fixes-20260612/assets/wow-token-dashboard.css

  NOTE: this page deliberately INVERTS market colors — a price increase is red
  (tokens cost more gold) and a decrease is green. A visible legend on the page
  explains this. See FR-8 in the review doc before "fixing" it.
  Design tokens come from /static/css/_tokens.css, loaded via <link> in the page
  head BEFORE this sheet (FR-3: the render-blocking CSS import chain was removed).
*/

/* ---------------------------------------------------------------- page scope */

body.wgf-token-dashboard-page {
  background:
    radial-gradient(circle at top center, rgba(var(--wgf-gold-rgb), 0.08), transparent 34rem),
    linear-gradient(180deg, var(--wgf-bg-2), var(--wgf-bg));
  color: var(--wgf-text);
}

/* Atmospheric backdrop (docs/ui-ux/02-components.md sec.16): a committed first-party
   dungeon tile behind the page so the tracker sits in the game world instead of a flat
   colored void (owner review 2026-07-03, "no cool wow assets shown anywhere"). Fixed +
   a scrim legibility floor + top gold glow; darkness is the lever, blur hides the
   600x300 upscale. Data sits on the opaque plates above. Nothing animates.            */
body.wgf-token-dashboard-page::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(var(--wgf-gold-rgb),.12), transparent 55%),
    linear-gradient(180deg, rgba(10,9,7,.82) 0%, rgba(10,9,7,.72) 32%, rgba(9,8,6,.90) 100%),
    url("/assets/dungeon-tiles/skyreach.jpg") center 30%/cover no-repeat;
  filter: blur(2px) saturate(1.04);
}

body.wgf-token-dashboard-page,
body.wgf-token-dashboard-page * {
  box-sizing: border-box;
}

body.wgf-token-dashboard-page .wgf-shell-main {
  width: 100%;
  max-width: none;
  margin: 0 auto;
  padding: var(--space-3) clamp(12px, 3vw, 28px) 36px;
}

/* ------------------------------------------------------------ layout shells */

.wtd-tool-with-sidebar,
.wtd-seo-block,
.wtd-ad-wrap {
  width: min(100%, var(--wh-maxw, 1400px));
  max-width: var(--wh-maxw, 1400px);
  margin-left: auto;
  margin-right: auto;
  padding-left: 0;
  padding-right: 0;
}

/* ── the token rail (un-retired 2026-09-03) ──────────────────────────────────
   This column was `display:none` at EVERY width from the first commit, with the
   note "the desktop sidebar ad slot is retired". Nothing else was retired with
   it: the five token pages still ship <aside class="wtd-sidebar-ad"> wrapping a
   real .wgf-ad-slot--sidebar well, wgf-adnetworks.js still reads that well, and
   config/wgf-adnetworks.json still carries two paid units for it
   (byHost["thewowdb.com"].sidebar: 160x300 at minWidth 0, 160x600 at minWidth
   1024). So the markup, the loader and the inventory were all present and the
   creative could never paint - wgf-adnetworks.js slotIsVisible() correctly
   refuses to inject into a box under a display:none ancestor, and names THIS
   column in its comment. No rationale for the retirement exists anywhere:
   `git log -S "wtd-sidebar-ad"` reaches only the squashed initial commit,
   DECISIONS_LOG.md has no entry, and docs/reference/AD_NETWORKS.md and
   PROJECT_STATE.md only describe the dead well as a defect. Un-retired.

   Shape follows the house rail (assets/wgf-seo-pages.css .wgf-seo-layout):
   same 1180px measure, main column minmax(0,1fr), fixed rail, align-items
   start, sticky aside. The column is 162px, NOT the shell's 300px: the only
   vertical units this domain owns are 160 wide, so a 300px column would be
   ~140px of permanent dead gutter beside every creative.

   162 = the 160px unit + the well's 1px bronze rule on each side, and every
   number in the chain lands on it exactly:
     - wgf-adnetworks.js availWidth() measures the SLOT, which is width:100%
       of this column, so avail = 162. pickVariant skips a unit only when
       `vw > avail`, so the 160x600 fits on the primary path instead of the
       "narrowest one, scaled" fallback, and fillIframe's scale stays 1.
     - wgf-monetization.css reserves the well at calc(100% - 2px) content-box,
       = 160 content + 2px rule = 162 outer, and after the fill sizeWell() sets
       width:160px content-box inline. Reservation and filled box are the SAME
       box, so the rail contributes no shift at all.
   A 160px column would have made both of those off by two: an overflowing rule
   and the 728x90 fallback bug (wgf-monetization.css, box-sizing note) in
   miniature. If a wider vertical unit is ever bought, this column is unit + 2.

   gap:0 at this width on purpose. Below the breakpoint the aside is an empty
   second ROW (its slot is hidden), and a `gap` would bill every phone 24px of
   blank page for furniture that is not there. The gutter is a column-gap, added
   only where there is actually a column. */
.wtd-tool-with-sidebar {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
}

.wtd-page,
.wtd-sidebar-ad {
  min-width: 0;
}

/* The aside carries NO chrome of its own - no border, no plate, no heading.
   Everything visible in it belongs to .wgf-ad-slot, which wgf-monetization.css
   keeps at display:none until a loader sets data-ad-state="loading", label
   included. So an empty or unfilled rail shows literally nothing; there is never
   an "Advertisement" label standing over a void. Do not add chrome here. */
.wtd-sidebar-ad {
  display: block;
}

/* 1180px, not the shell's 980px, and the number is arithmetic rather than taste.
   The wrapper is min(100%, 1180px) inside .wgf-shell-main's clamp(12px,3vw,28px)
   padding, so the tool column measures min(1180, V - 56) - 162 - 24.

     V = 1024  ->  782px       V = 1180  ->  938px       V >= 1236  ->  994px

   The dashboard's own narrow mode ends at max-width:980px, so the widest layout
   already renders down to a 925px box today (V = 981 -> 981 - 56). Anything at
   or above 925 is therefore proven ground and nothing inside has to be retuned;
   782 is not. 1180 is the lowest breakpoint that never takes the tool below that
   floor. Under it the rail is gone entirely and the dashboard keeps the whole
   measure for the chart - which also means the 160x300 (config minWidth 0) only
   serves from 1180 up. That is the deliberate trade: the flagship tool's width
   outranks a short unit on a narrow laptop. */
@media (min-width: 1180px) {
  .wtd-tool-with-sidebar {
    grid-template-columns: minmax(0, 1fr) 162px;
    column-gap: var(--space-4);
    align-items: start;
  }

  .wtd-sidebar-ad {
    position: sticky;
    top: var(--space-3);
  }

  /* A wrapper with no rail in it must NOT reserve the column, or the tool sits
     left of centre with dead space beside it - the same trap .wgf-seo-layout--full
     exists to solve on the shell pages. This is a static match: it depends on the
     markup, not on a runtime attribute, so it can never move the page after paint.

     Deliberately NOT extended to [data-ad-state="unfilled"], however tempting.
     Reclaiming the gutter on a proven no-fill would reflow the entire dashboard
     about 6s in (wgf-adnetworks.js sets that state after fillProbeMs), and
     wgf-monetization.css's contract for these slots is one bounded shift at mount
     and nothing after. On pages this heavily indexed a late full-width reflow is a
     CLS charge that outweighs 186px of whitespace, so the column stays reserved
     exactly as the shell rail's 300px does. An unfilled slot is still invisible;
     the shared sheet collapses it with its own label. */
  .wtd-tool-with-sidebar:not(:has(.wgf-ad-slot--sidebar)) {
    grid-template-columns: minmax(0, 1fr);
    column-gap: 0;
  }
}

.wtd-page {
  width: 100%;
  max-width: var(--wh-maxw, 1400px);
  margin: 0 auto;
  padding: 12px 0 var(--space-6);
  color: var(--wgf-gold);
}

/* No margin on the wrapper. .wgf-ad-slot is display:none until a loader fills it
   (wgf-monetization.css:20-22), but this wrapper div stays in the DOM either way - so a
   margin here is space reserved for something that usually is not there, and with the ad
   networks switched off (2026-08-16) it was the ONE visible gap left on the token pages.
   A filled slot brings its own margin (wgf-monetization.css:25-30), which is the correct
   home for that spacing: present exactly when the ad is. */
.wtd-ad-wrap--top {
  margin-bottom: 0;
}

.wtd-ad-wrap .wgf-ad-slot {
  margin-bottom: 0;
}

.wtd-seo-block {
  padding-top: var(--space-2);
  padding-bottom: var(--space-6);
}

/* ------------------------------------------------------------- panel chrome */

/* De-plain 2026-07-30 (owner ruling): sub-panels wear the kit-window material —
   metal edge + dark-washed Class Hall stone, square corners. No rounded floating
   web plates on this page; the hero already composes as the full .wgf-window. */
.wtd-region-card,
.wtd-chart-panel,
.wtd-history-panel,
body.wgf-token-dashboard-page .wgf-section {
  border: 1px solid var(--wgf-metal);
  border-radius: 0;
  background:
    linear-gradient(rgba(0, 0, 0, 0.44), rgba(0, 0, 0, 0.44)),
    url(/assets/ui/classhall-stone-tile.png) left top / 256px 256px repeat,
    var(--wgf-plate);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.65), var(--shadow-2);
}

/* ------------------------------------------------------------------- hero */

/* The hero composes as the client window (ig-38 container standard / .wgf-window):
   a metal frame with corner joinery around a title strip and a near-black WELL body.
   Owner 2026-07-03: no floating outlined gold-left panel; it must feel in-game. */
.wtd-token-tooltip {
  position: relative;
  overflow: hidden;
  margin-bottom: 28px;
  padding: 0;
  border: 2px solid var(--wgf-metal);
  border-radius: 4px;
  background:
    var(--wgf-well);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .65), 0 12px 34px rgba(0, 0, 0, .28);
  color: var(--wgf-text);
}

/* Title strip: raised warm-stone bar with the gold small-caps window title. */
.wtd-market-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin: 0;
  padding: var(--space-3) clamp(var(--space-3), 2.2vw, 24px);
  background: linear-gradient(var(--wgf-panel, var(--wgf-panel-1)), var(--wgf-plate-hi, var(--wgf-panel-1)));
  border-bottom: 1px solid var(--wgf-metal-soft);
}

.wtd-market-label {
  margin: 0 0 var(--space-1);
  color: var(--wgf-muted);
  font-family: var(--font-game);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.wtd-item-name {
  margin: 0;
  color: var(--wgf-gold);
  font-family: var(--font-game-display);
  font-size: clamp(17px, 1.7vw, 23px);
  font-weight: 700;
  font-variant: small-caps;
  line-height: 1.15;
  letter-spacing: .03em;
  text-shadow: var(--text-ink-outline);
}

.wtd-item-flavor {
  margin: var(--space-1) 0 0;
  color: var(--wgf-muted);
  font-family: var(--font-game);
  font-size: 12px;
}

/* Region switcher: no pill container. Each region IS the client red button
   (the .wgf-tab language: real 128-redbutton cap slices, yellow Friz). Active =
   the pressed red state; the rest are dimmed red buttons. */
.wtd-region-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1);
  min-width: 0;
  padding: 0;
  background: none;
  border: 0;
  border-radius: 0;
}

.wtd-region-tabs button {
  box-sizing: border-box;
  min-width: 48px;
  min-height: 30px;
  padding: 0 13px;
  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, #b58f3a);
  font-family: var(--font-game);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .02em;
  text-shadow: var(--text-ink-outline);
  cursor: pointer;
  filter: brightness(.66) saturate(.9);
  transition: filter var(--motion-fast, .12s) var(--ease-standard, ease),
              color var(--motion-fast, .12s) var(--ease-standard, ease);
}

.wtd-region-tabs button:hover {
  filter: brightness(.9) saturate(1);
  color: var(--wgf-gold-bright);
}

.wtd-region-tabs button.is-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;
  color: var(--wgf-gold-bright);
  filter: none;
  transform: translateY(1px);
}

.wtd-tooltip-rule {
  display: none;
}

/* -------------------------------------------------------------- price block */

.wtd-token-price-row {
  display: flex;
  align-items: center;
  gap: clamp(var(--space-2), 1.6vw, var(--space-3));
  width: 100%;
  margin: 0;
  padding: clamp(var(--space-3), 2.2vw, 24px) clamp(var(--space-3), 2.2vw, 24px) var(--space-3);
}

/* The real WoW Token item icon (epic quality), rendered ONCE on the left like the
   in-game token window. The price keeps its single trailing gold coin (the AH price
   idiom) - no generic coin flanking the number. */
.wtd-token-icon {
  flex-shrink: 0;
  display: inline-flex;
  width: 48px;
  height: 48px;
  border: 2px solid var(--q-epic);
  border-radius: 4px;
  background: var(--wgf-well);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .7), 0 2px 8px rgba(0, 0, 0, .6);
  overflow: hidden;
}

.wtd-token-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.wtd-price-stack {
  display: block;
  min-width: 0;
}

.wtd-price-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  line-height: 1;
}

.wtd-price-main {
  display: inline-block;
  color: #ffffff;
  /* The in-game client face on the headline number (owner: "feels like the game
     client"); the wgf-price component keeps tabular-nums for aligned figures. */
  font-family: var(--font-game);
  font-size: clamp(48px, 8vw, 104px);
  font-weight: 800;
  line-height: .95;
  overflow-wrap: anywhere;
}

.wtd-price-main .wgf-price {
  display: inline-flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: .12em;
  font-family: var(--font-game);
  font-size: inherit;
  line-height: inherit;
}

.wtd-price-main .wgf-price__seg {
  font-size: inherit;
}

.wtd-price-main .wgf-num {
  color: inherit;
}

/* Movement delta = plain colored text, not a pill. */
.wtd-price-change {
  display: inline-flex;
  align-items: center;
  align-self: center;
  width: fit-content;
  padding: 0;
  margin: 0;
  transform: translateY(.12em);
  background: none;
  border: 0;
  color: var(--wgf-muted);
  font-family: var(--font-game);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .02em;
  white-space: nowrap;
}

/* Inverted on purpose: up = costs more gold = red (see header note). */
.wtd-price-change.up {
  color: var(--wgf-down);
}

.wtd-price-change.down {
  color: var(--wgf-up);
}

.wtd-price-change.neutral {
  color: var(--wgf-muted);
}

/* Freshness line: legible in-game text on the near-black well body, NOT a pill
   (owner 2026-07-03). Sits inside the window body, obeys the legibility contract. */
.wtd-price-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-1) var(--space-3);
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 0 clamp(var(--space-3), 2.2vw, 24px) clamp(var(--space-3), 2.2vw, 24px);
  background: none;
  border: 0;
  border-radius: 0;
  color: var(--wgf-muted);
  font-family: var(--font-game);
  font-size: 12px;
  line-height: 1.35;
  letter-spacing: 0;
  white-space: normal;
}

.wtd-price-meta span {
  min-width: 0;
  padding: 0;
  background: none;
  border: 0;
  font-size: 12px;
}

.wtd-price-meta b {
  margin: 0 0 0 var(--space-1);
  color: var(--wgf-text);
}

.wtd-price-meta time {
  color: var(--wgf-text);
  font-weight: 700;
}

.wtd-status-value {
  border: 0;
  padding: 0;
  background: none;
}

.wtd-price-meta b.wtd-status-value {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-game);
  font-size: 12px;
  letter-spacing: .02em;
}

/* ---------------------------------------------------------- section headers */

.wtd-section-head {
  display: flex;
  justify-content: space-between;
  gap: var(--space-3);
  align-items: end;
  margin-bottom: 12px;
}

.wtd-section-head h2 {
  margin: 0;
  font-family: var(--font-game-display);
  font-variant: small-caps;
  letter-spacing: .02em;
  font-size: 22px;
}

.wtd-section-head p {
  margin: 0;
  color: var(--wgf-muted);
  font-size: 12px;
}

.wtd-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
  flex-wrap: wrap;
}

.wtd-panel-head h2,
.wtd-history-head h2 {
  margin: 0;
  font-family: var(--font-game-display);
  font-variant: small-caps;
  letter-spacing: .02em;
  font-size: 25px;
}

.wtd-section-head h2,
.wtd-panel-head h2,
.wtd-history-head h2,
body.wgf-token-dashboard-page .wgf-section h2 {
  text-shadow: none;
}

.wtd-panel-head p,
.wtd-history-head p {
  margin: var(--space-1) 0 0;
  color: var(--wgf-muted);
  font-size: 12px;
  line-height: 1.5;
}

.wtd-chart-note {
  margin-top: var(--space-2);
  color: var(--wgf-muted);
  font-size: 12px;
  line-height: 1.5;
}

/* ------------------------------------------------------------ region cards */

.wtd-region-compare {
  margin-bottom: var(--space-5);
}

.wtd-region-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-3);
}

.wtd-region-card {
  text-align: left;
  padding: 12px;
  color: var(--wgf-gold);
  cursor: pointer;
  transition: border-color .15s, background .15s, transform .15s, box-shadow .15s;
}

.wtd-region-card:hover {
  transform: translateY(-2px);
}

.wtd-region-label {
  display: block;
  margin-bottom: var(--space-2);
  color: var(--wgf-muted);
  text-transform: uppercase;
  letter-spacing: .06em;
  font-size: 10px;
  font-weight: 900;
}

.wtd-region-card strong {
  display: block;
  color: var(--wgf-text);
  font-family: var(--font-mono);
  font-size: 22px;
  line-height: 1;
}

.wtd-region-card small {
  display: block;
  margin-top: var(--space-1);
  color: var(--wgf-neutral-text);
  font-family: var(--font-mono);
  font-size: 11px;
}

/* Inverted market colors (see header note). */
.wtd-region-card small.up,
.wtd-history-panel td.up {
  color: var(--wgf-down);
}

.wtd-region-card small.down,
.wtd-history-panel td.down {
  color: var(--wgf-up);
}

.wtd-region-card small.neutral,
.wtd-history-panel td.neutral {
  color: var(--wgf-neutral-text);
}

/* ------------------------------------------------- region cards: baked quote
   The four cards in "Token Price by Region" (hub) and "Compare All Regions"
   (region page) were bare links: a reader could not see which region costs what
   without opening four tabs, and a crawler saw no number at all. Each card now
   carries a quote span that tools/bake_token_static_html.region_quote_html fills
   every 15 minutes; before the first bake it holds a plain sentence, so the card
   is never blank. Lives here, not in wow-token-region.css, because both page
   shapes use it and a shared class gets exactly one home.

   The children carry their own colour on purpose: .wtr-region-card span (in
   wow-token-region.css, which loads after this sheet) and .wtd-related-links a
   span below would otherwise win the wrapper at equal specificity. */

.wtd-region-quote {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--space-1) var(--space-2);
  margin-top: var(--space-1);
}

.wtd-region-quote .wtd-quote-price {
  font-family: var(--font-game);
  font-size: 15px;
  font-weight: 700;
  color: var(--wgf-text);
}

.wtd-region-quote .wtd-quote-move {
  font-family: var(--font-mono);
  font-size: 11px;
  white-space: nowrap;
  color: var(--wgf-neutral-text);
}

/* Inverted market colors (see header note). */
.wtd-region-quote .wtd-quote-move.up {
  color: var(--wgf-down);
}

.wtd-region-quote .wtd-quote-move.down {
  color: var(--wgf-up);
}

.wtd-spark {
  display: block;
  height: 26px;
  margin-top: var(--space-2);
}

.wtd-spark svg {
  width: 100%;
  height: 26px;
  display: block;
}

.wtd-spark svg polyline {
  stroke: var(--wgf-gold-primary);
}

/* -------------------------------------------------------------- stat grid */

.wtd-stat-grid,
.wtd-chart-panel {
  margin-bottom: var(--space-5);
}

.wtd-stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-2);
}

/* High/low cards re-cut onto the near-black inset WELL (.wgf-well), not the
   floating outlined panel (owner 2026-07-03). */
.wtd-stat-grid article {
  padding: var(--space-3);
  border: 1px solid var(--wgf-well-edge);
  border-radius: 4px;
  background: var(--wgf-well);
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, .75), inset 0 0 0 1px rgba(0, 0, 0, .6);
}

/* Period header: 24H / 7D / 30D */
.wtd-period-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--wgf-gold-primary);
  margin-bottom: var(--space-2);
  padding-bottom: var(--space-2);
  border-bottom: 1px solid var(--wgf-border-neutral-soft);
}

/* High / Low side-by-side within each period group */
.wtd-pair {
  display: flex;
  gap: var(--space-3);
}

.wtd-pair-item {
  flex: 1;
  min-width: 0;
}

.wtd-pair-item > span {
  display: block;
  margin-bottom: var(--space-1);
  color: var(--wgf-muted);
  text-transform: uppercase;
  letter-spacing: .06em;
  font-size: 9px;
  font-weight: 900;
}

.wtd-stat-grid strong {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  color: var(--wgf-text);
  font-family: var(--font-mono);
  font-size: 17px;
  line-height: 1.1;
}

/* ------------------------------------------------------------- chart panel */

.wtd-chart-panel {
  padding: var(--space-4);
}

/* Range selector: same red-button kit-tab language as the region switcher, no
   pill container. */
.wtd-range-buttons {
  display: flex;
  gap: var(--space-1);
  flex-wrap: wrap;
  padding: 0;
  background: none;
  border: 0;
  border-radius: 0;
}

.wtd-range-buttons button {
  box-sizing: border-box;
  min-height: 30px;
  padding: 0 13px;
  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, #b58f3a);
  font-family: var(--font-game);
  font-size: 11px;
  font-weight: 700;
  text-shadow: var(--text-ink-outline);
  cursor: pointer;
  filter: brightness(.66) saturate(.9);
  transition: filter var(--motion-fast, .12s) var(--ease-standard, ease),
              color var(--motion-fast, .12s) var(--ease-standard, ease);
}

.wtd-range-buttons button:hover {
  filter: brightness(.9) saturate(1);
  color: var(--wgf-gold-bright);
}

/* Fresh-DB honesty: ranges lock until saved history can actually fill them
   (wow-token-dashboard.js updateRangeAvailability). Grayed like a disabled
   in-game button, no hover lift. */
.wtd-range-buttons button.is-locked,
.wtd-range-buttons button.is-locked:hover {
  filter: grayscale(1) brightness(.55);
  color: var(--wgf-text-dim, #8a8478);
  cursor: not-allowed;
  transform: none;
}

.wtd-range-buttons button.is-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;
  color: var(--wgf-gold-bright);
  filter: none;
  transform: translateY(1px);
}

.wtd-chart-wrap {
  position: relative;
  height: 380px;
}

#wtdChart {
  display: block;
  width: 100%;
  height: 380px;
  border-radius: var(--radius-control);
  background:
    linear-gradient(rgba(255, 255, 255, .04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px),
    var(--wgf-bg-base);
  border: 1px solid var(--wgf-border-neutral-soft);
}

/* ---------------------------------------------------------- history table */

.wtd-history-panel {
  overflow: hidden;
  margin-bottom: var(--space-4);
}

.wtd-history-head {
  display: flex;
  justify-content: space-between;
  gap: var(--space-3);
  align-items: center;
  padding: var(--space-3) 20px;
  border-bottom: 1px solid var(--wgf-gold-shadow);
  background: radial-gradient(circle at 15% 0%, rgba(var(--wgf-gold-rgb), .08), transparent 32%), rgba(0, 0, 0, .12);
}

.wtd-history-legend {
  margin-top: var(--space-1);
  font-size: 12px;
}

.wtd-table-wrap {
  overflow-x: auto;
}

.wtd-history-scroll {
  max-height: min(320px, 42vh);
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-color: rgba(var(--wgf-gold-rgb), .45) rgba(0, 0, 0, .35);
  scrollbar-width: thin;
}

.wtd-history-scroll::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.wtd-history-scroll::-webkit-scrollbar-thumb {
  border-radius: var(--radius-pill);
  background: rgba(var(--wgf-gold-rgb), .42);
}

.wtd-history-scroll thead th {
  position: sticky;
  top: 0;
  z-index: 1;
}

.wtd-history-panel table {
  width: 100%;
  border-collapse: collapse;
}

.wtd-history-panel th {
  padding: var(--space-2) var(--space-3);
  text-align: left;
  color: var(--wgf-muted);
  background: rgba(0, 0, 0, .18);
  border-bottom: 1px solid var(--wgf-border-neutral-soft);
  text-transform: uppercase;
  letter-spacing: .06em;
  font-size: 9px;
}

.wtd-history-panel th.is-time,
.wtd-history-panel td:first-child {
  width: 170px;
  text-align: right;
}

.wtd-history-panel td {
  padding: var(--space-2) var(--space-3);
  color: var(--wgf-gold);
  border-bottom: 1px solid var(--wgf-border-neutral-soft);
  font-family: var(--font-mono);
  font-size: 12px;
}

.wtd-history-panel td.price {
  color: var(--wgf-text);
  font-weight: 900;
}

.wtd-history-panel tbody tr:nth-child(even) {
  background: rgba(255, 255, 255, .025);
}

.wtd-history-panel tbody tr {
  transition: background .12s ease, transform .12s ease;
}

.wtd-history-panel tbody tr:hover {
  background: rgba(var(--wgf-gold-rgb), .08);
  transform: scale(1.003);
}

.wtd-history-panel td.empty {
  color: var(--wgf-neutral-text);
  text-align: center;
  padding: 28px var(--space-3);
  font-family: inherit;
}

.wtd-history-panel td.empty strong {
  display: block;
  margin-bottom: var(--space-2);
  color: var(--wgf-gold-bright);
  font-family: var(--font-ui);
  font-size: 18px;
}

.wtd-history-panel td.empty span {
  color: var(--wgf-muted);
  line-height: 1.55;
}

.wtd-sort {
  all: unset;
  cursor: pointer;
  color: inherit;
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
}

.wtd-sort::after {
  content: "↕";
  opacity: .35;
  font-size: 10px;
}

.wtd-sort.is-active.asc::after {
  content: "↑";
  opacity: .85;
}

.wtd-sort.is-active.desc::after {
  content: "↓";
  opacity: .85;
}

/* --------------------------------------------------- SEO block / related */

.wtd-seo-block .wgf-section {
  margin-top: 20px;
}

.wtd-seo-block .wgf-section:first-child {
  margin-top: 0;
}

body.wgf-token-dashboard-page .wgf-section p,
.wtd-related-links a span {
  color: var(--wgf-muted);
}

/* .wtd-related-links lives in assets/wgf-plate-link.css now (the ONE home) —
   this page links it directly. The copy that used to sit here differed from the
   wgf-seo-pages.css copy (220px vs 240px minimum, different padding and type),
   so the same card grid looked different on a token page than everywhere else. */

/* FAQ = THE SPELLBOOK (owner law 2026-08-04). The look lives in the one home,
   assets/wgf-spellbook.css; the list opts in with
   `class="wtd-faq-list wgf-spellbook"`. The bespoke rules that used to sit here
   were DELETED, not left dormant: at equal specificity they would have fought
   the component and the winner would have come down to <link> order (see the
   LANDMINE notes in wgf-zonebg.css). */

/* ------------------------------------------------------------- breakpoints */

@media (max-width: 980px) {
  .wtd-region-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .wtd-region-tabs {
    margin-top: var(--space-3);
  }

  .wtd-chart-wrap,
  #wtdChart {
    height: 330px;
  }
}

@media (max-width: 900px) {
  .wtd-market-head {
    display: grid;
    grid-template-columns: 1fr;
  }

  .wtd-region-tabs {
    width: 100%;
  }
}

@media (max-width: 640px) {
  body.wgf-token-dashboard-page .wgf-shell-main {
    padding-left: var(--space-2);
    padding-right: var(--space-2);
  }

  .wtd-section-head,
  .wtd-panel-head,
  .wtd-history-head {
    display: block;
  }

  .wtd-region-tabs {
    margin-top: var(--space-3);
  }

  .wtd-range-buttons {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
    margin-top: var(--space-3);
  }

  .wtd-region-tabs button,
  .wtd-range-buttons button {
    min-width: 0;
    padding-left: var(--space-1);
    padding-right: var(--space-1);
  }

  .wtd-price-line .wtd-price-change {
    flex-basis: 100%;
    margin-top: var(--space-2);
    transform: none;
  }

  .wtd-region-grid {
    grid-template-columns: 1fr;
  }

  .wtd-chart-panel {
    padding: var(--space-3);
  }

  .wtd-chart-wrap,
  #wtdChart {
    height: 300px;
  }

  .wtd-history-panel th.is-time,
  .wtd-history-panel td:first-child {
    text-align: left;
  }
}

@media (max-width: 520px) {
  .wtd-token-tooltip {
    padding: 12px;
  }

  .wtd-price-main {
    font-size: clamp(38px, 13vw, 54px);
  }

  .wtd-price-main .wgf-price {
    gap: .08em;
  }

  .wtd-price-line {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-2);
  }

  .wtd-price-change {
    width: fit-content;
  }

  .wtd-price-meta {
    margin-left: 0;
    white-space: normal;
  }
}

@media (max-width: 430px) {
  .wtd-stat-grid {
    grid-template-columns: 1fr;
  }

  .wtd-chart-wrap,
  #wtdChart {
    height: 280px;
  }
}

/* == wh parity (20261123wh): panel header bars, compact rows; chart colours untouched == */
.wtd-panel-head,.wtd-history-head{ min-height:50px; padding:0 16px; margin:0; align-items:center;
  background:var(--wh-bar,#181818); border-bottom:1px solid var(--wh-border,#303030); }
.wtd-panel-head h2,.wtd-history-head h2,.wtd-section-head h2{ font-family:var(--wh-font,"Open Sans",Arial,sans-serif);
  font-variant:normal; font-size:18px; font-weight:600; letter-spacing:0; color:var(--wh-heading,#fff); }
.wtd-panel-head p,.wtd-history-head p,.wtd-section-head p{ font-size:var(--wh-fs-sm,12px); color:var(--wh-muted,#888); margin:2px 0 0; }
.wtd-history-panel th{ height:30px; padding:0 12px; font-family:var(--wh-font,"Open Sans",Arial,sans-serif);
  font-size:var(--wh-fs-sm,12px); font-weight:700; letter-spacing:.05em; background:transparent;
  border-bottom:1px solid var(--wh-border,#303030); }
.wtd-history-panel td{ height:34px; padding:3px 12px; font-size:var(--wh-fs,14px); border-bottom:1px solid var(--wh-border,#303030); }
.wtd-history-panel tbody tr:nth-child(even){ background:transparent; }
.wtd-history-panel tbody tr:hover{ background:var(--wh-raise,#2a2a2a); transform:none; }
.wtd-region-label,.wtd-market-label{ font-family:var(--wh-font,"Open Sans",Arial,sans-serif);
  font-size:var(--wh-fs-sm,12px); text-transform:uppercase; letter-spacing:.05em; color:var(--wh-muted,#888); }
.wtd-region-grid{ gap:8px; }
.wtd-region-card{ border-radius:var(--wh-radius,4px); }
.wtd-chart-note,.wtd-history-legend{ font-size:var(--wh-fs-sm,12px); }
.wtd-stat-grid article{ border-radius:var(--wh-radius,4px); }
