/* =============================================================================
   item-index.css — WoW Item Price Guide (/item/) — "same fashion" as
   cheapest-realm. Self-contained (carries the shared search/typeahead/chip/tile
   toolkit) so the live cheapest-realm page is untouched. Tokens come from
   static/css/_tokens.css; the WoW quality colors + .crp-* price coins are kept
   here (the .coin-* names collide with the AH coin-swatch system — never reuse).
   TODO(consolidate): extract this toolkit + cheapest-realm's into a shared file.
   ============================================================================= */
/* --q-* quality tokens now live in static/css/_tokens.css (2026-07-02). */
.crp-g { color: var(--wgf-gold) } .crp-s { color: #c0c0c0 } .crp-c { color: var(--coin-copper) }
.ii-coin-na { color: var(--wgf-muted) }

/* ===== hero search ===== */
/* kit re-cut 2026-07-04: full .wgf-window plate - stone tile + metal corner braces,
   same background stack as .wgf-window in wgf-chrome.css. Not a flat gradient card. */
.ii-searchsec { position: relative; margin: 1.1rem 0 1.4rem; padding: 1.5rem 1.5rem 1.6rem;
  border: 2px solid var(--wgf-metal); border-radius: 4px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.03), rgba(0,0,0,.18)),
    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,.65), var(--shadow-2); }
.ii-kicker { font-family: var(--font-display); text-transform: uppercase; letter-spacing: .14em;
  font-size: .74rem; color: var(--wgf-gold-soft); margin: 0 0 .7rem }
.search { position: relative }
.search__field { position: relative; display: flex; align-items: center }
.search__icon { position: absolute; left: 1.15rem; width: 26px; height: 26px; opacity: .85; pointer-events: none; color: var(--wgf-gold) }
.search__input { width: 100%; padding: 1.1rem 1.2rem 1.1rem 3.4rem; font-size: 1.45rem; font-family: var(--font-ui);
  border: 0; border-radius: 4px; color: var(--wgf-text);
  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;
  box-shadow: inset 0 2px 6px rgba(0,0,0,.7); transition: box-shadow .15s }
.search__input::placeholder { color: #7d7565 }
.search__input:focus { outline: none; box-shadow: var(--focus-ring), inset 0 2px 6px rgba(0,0,0,.7); }

/* typeahead */
.results { list-style: none; margin: .6rem 0 0; padding: .3rem; position: absolute; left: 0; right: 0; z-index: 30;
  background: linear-gradient(180deg,#0c0c0f,#050507); border: 1px solid var(--wgf-metal); border-radius: 6px; max-height: 26rem;
  overflow-y: auto; box-shadow: 0 24px 60px rgba(0,0,0,.6) }
.results[hidden] { display: none }
.results li { display: flex; align-items: center; gap: .85rem; padding: .6rem .7rem; cursor: pointer; border-radius: 10px; border: 1px solid transparent }
.results li:hover, .results li.is-active { background: var(--wgf-panel-3); border-color: var(--wgf-border) }
.ic { position: relative; flex: 0 0 auto; border-radius: 8px; background: #0a0906; border: 1px solid #3a3324; overflow: hidden }
.ic img { width: 100%; height: 100%; display: block }
.ic .qring { position: absolute; inset: 0; border-radius: 7px; box-shadow: inset 0 0 0 2px var(--qc,transparent) }
.results .ic { width: 40px; height: 40px }
.results .meta { min-width: 0; flex: 1 1 auto }
.results .nm { display: block; font-family: var(--font-game); font-weight: 600; font-size: 1.06rem; color: var(--qc,var(--wgf-text)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis }
.results .sub { display: block; font-size: .82rem; color: var(--wgf-muted); font-family: var(--font-mono); margin-top: .1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis }
.results .from { flex: 0 0 auto; text-align: right; font-family: var(--font-mono); font-size: .92rem; color: var(--wgf-gold) }
.results .from small { display: block; color: var(--wgf-muted); font-size: .68rem; letter-spacing: .04em; text-transform: uppercase }

/* ===== categories ===== */
.cats { margin: 1.05rem 0 0 }
.cats__label { font-family: var(--font-display); text-transform: uppercase; letter-spacing: .1em; font-size: .7rem; color: var(--wgf-muted); margin: 0 0 .55rem }
.cats__row { display: flex; flex-wrap: wrap; gap: .5rem }
/* Category selectors = the client RED BUTTON, tab-row idiom (owner 2026-07-04 + home
   .catchip parity): real 128-redbutton cap/center slices. Dimmed unselected, full on hover.
   is-active = the pressed/active red state (pressed cap slices + 1px sink). */
.catchip { box-sizing: border-box;
  display: inline-flex; align-items: center; justify-content: center;
  height: 32px; padding: 0 14px; 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;
  font-variant: small-caps; letter-spacing: .03em; line-height: 1;
  text-shadow: var(--text-ink-outline); cursor: pointer;
  filter: brightness(.7) saturate(.9);
  transition: filter var(--motion-fast) var(--ease-standard),
              color var(--motion-fast) var(--ease-standard); }
.catchip:hover { filter: brightness(1) saturate(1); color: var(--wgf-gold-bright); }
.catchip:active { filter: brightness(.85); transform: translateY(1px); }
.catchip.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); }
.catchip:focus-visible { outline: none; box-shadow: var(--focus-ring); }

/* ===== browse grid (category) ===== */
.browse-sec[hidden] { display: none }
.browse-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin: .2rem 0 .75rem }
.linkbtn { background: none; border: 0; color: var(--wgf-gold-bright); font-family: var(--font-ui); font-size: .9rem; cursor: pointer; padding: .2rem .3rem }
.linkbtn:hover { text-decoration: underline }
.browse-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(300px,1fr)); gap: .55rem }
/* Owner 2026-07-04: the navy plate is CONDEMNED outside item tooltips ("blue feels
   like slop"). Rows/tiles wear the warm near-black kit plate + metal border. */
.tile { display: flex; align-items: center; gap: .7rem; padding: .55rem .65rem; border: 1px solid var(--wgf-metal-soft);
  border-radius: 0; background: linear-gradient(180deg, rgba(255,255,255,.03), rgba(0,0,0,.25)), var(--wgf-plate); cursor: pointer; text-align: left; text-decoration: none;
  transition: border-color .12s, background .12s }
.tile:hover { border-color: var(--wgf-gold-dim); background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(0,0,0,.2)), var(--wgf-plate-hi) }
.tile .ic { width: 42px; height: 42px }
.tile .info { min-width: 0; flex: 1 1 auto; overflow: hidden }
.tile .nm { display: block; font-family: var(--font-game); font-weight: 600; color: var(--qc,var(--wgf-text)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 1.02rem }
.tile .mt { display: block; font-size: .78rem; color: var(--wgf-muted); font-family: var(--font-mono); white-space: nowrap; overflow: hidden; text-overflow: ellipsis }
.tile .fr { flex: 0 0 auto; min-width: 3.4rem; text-align: right; font-family: var(--font-mono); font-size: .86rem; color: var(--wgf-gold); line-height: 1.15 }
.tile .fr small { display: block; font-size: .6rem; color: var(--wgf-muted); text-transform: uppercase; letter-spacing: .04em }

/* ===== Hub panels (2026-09-03 hdr:item-index lane) =====================================
   Replaced the 200-row .ii-row / .ii-list dump the hub used to open with. Those rules are
   gone with the markup that emitted them: nothing in the repo referenced .ii-row, .ii-list,
   .wgf-ii-capped or .wgf-ii-showmore after the route stopped writing them (grep-verified
   across *.py, *.js and *.html). The browse grid's .tile rows below are untouched -
   assets/item-index.js still builds those.

   Panels are TABLES on purpose. The audit measured zero tables on a page whose whole job is
   comparing numbers; a table gives the reader column alignment and a screen reader real row
   and column headers. Direction is a glyph plus a class, never colour alone, and the only
   two colours used are --wgf-gold and --wgf-muted (no green: doc 18 §4). */
.ii-panels { display: block }
.ii-panel { margin: 1.6rem 0 0 }
.ii-panel:first-child { margin-top: 1.1rem }
.ii-panel__sub { margin: .2rem 0 .7rem; color: var(--wgf-muted); font-size: .93rem; max-width: 62ch }
.ii-panel__foot { margin: .55rem 0 0; font-size: .9rem; color: var(--wgf-muted) }
.ii-panel__foot a { color: var(--wgf-gold-bright) }

.ii-panel__t { width: 100%; border-collapse: collapse; border: 1px solid var(--wgf-metal-soft);
  background: var(--wgf-plate); font-size: .95rem }
.ii-panel__t thead th { text-align: left; padding: .5rem .8rem; font-family: var(--font-display);
  text-transform: uppercase; letter-spacing: .07em; font-size: .68rem; color: var(--wgf-muted);
  border-bottom: 1px solid var(--wgf-metal-soft); white-space: nowrap }
.ii-panel__t thead th + th, .ii-panel__t tbody td + td { text-align: right }
.ii-panel__t tbody th { text-align: left; font-weight: 600; color: var(--wgf-text) }
.ii-panel__t tbody tr + tr > * { border-top: 1px solid var(--wgf-metal-soft) }
.ii-panel__t tbody tr:hover { background: var(--wgf-plate-hi) }
.ii-panel__t td, .ii-panel__t tbody th { padding: .42rem .8rem; vertical-align: middle }
.ii-panel__item { width: 46% }
.ii-panel__cat { color: var(--wgf-gold-muted); font-family: var(--font-game); font-size: .78rem;
  font-variant: small-caps; white-space: nowrap }
.ii-panel__num { font-family: var(--font-mono); white-space: nowrap; color: var(--wgf-text) }
.ii-panel__num b { color: var(--wgf-text); font-weight: 600 }

/* One item reference: icon + quality-coloured name. Carries the tooltip hook in markup. */
.ii-il { display: inline-flex; align-items: center; gap: .55rem; text-decoration: none;
  min-width: 0; max-width: 100% }
.ii-il .ic { width: 32px; height: 32px; flex: 0 0 auto }
.ii-il .nm { min-width: 0; font-family: var(--font-game-display); font-variant: small-caps;
  font-weight: 600; font-size: 1.02rem; line-height: 1.15; color: var(--qc, var(--wgf-text));
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis }
.ii-il:hover .nm, .ii-il:focus-visible .nm { text-decoration: underline }
.ii-il:focus-visible { outline: none; box-shadow: var(--focus-ring) }

.ii-d { font-family: var(--font-mono); font-weight: 700; white-space: nowrap }
.ii-d--up { color: var(--wgf-gold) }
.ii-d--down { color: var(--wgf-muted) }
.ii-d--flat { color: var(--wgf-muted) }

/* The "what is this" block + facts table. */
.ii-intro { margin: .9rem 0 0 }
.ii-intro__lede { margin: 0 0 .5rem; font-size: 1.06rem; line-height: 1.5; color: var(--wgf-text); max-width: 68ch }
.ii-facts { width: 100%; border-collapse: collapse; margin: .9rem 0 0;
  border: 1px solid var(--wgf-metal-soft); background: var(--wgf-plate); font-size: .93rem }
.ii-facts__cap { caption-side: top; text-align: left; padding: .45rem .8rem;
  font-family: var(--font-display); text-transform: uppercase; letter-spacing: .07em;
  font-size: .68rem; color: var(--wgf-muted); border-bottom: 1px solid var(--wgf-metal-soft) }
.ii-facts th { text-align: left; font-weight: 600; color: var(--wgf-muted); padding: .42rem .8rem; white-space: nowrap }
.ii-facts td { padding: .42rem .8rem }
.ii-facts tr + tr > * { border-top: 1px solid var(--wgf-metal-soft) }
.ii-facts__v { font-family: var(--font-mono); color: var(--wgf-gold); white-space: nowrap }
.ii-facts__n { color: var(--wgf-muted); font-size: .88rem }
.ii-facts__n a { color: var(--wgf-gold-bright) }
/* Phones: the facts table fits the column instead of widening the page (site-health F06, 450px at 390). */
@media (max-width: 560px) {
  .ii-facts th, .ii-facts__v { white-space: normal }
  .ii-facts th, .ii-facts td { padding: .38rem .5rem }
  .ii-facts__n { overflow-wrap: anywhere }
  /* The movers tables keep their numeric columns and scroll inside their own box. */
  .ii-panel__t { display: block; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch }
  .ii-panel__t td, .ii-panel__t th, .ii-panel__t thead th { padding-left: .5rem; padding-right: .5rem }
}

/* Trade-good hubs. Same dense reference grid the A-Z uses, so the two lists read alike. */
.ii-cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: .35rem; list-style: none; margin: 0; padding: 0 }
.ii-cats > li > a { display: block; padding: .38rem .6rem; text-decoration: none;
  border: 1px solid var(--wgf-metal-soft); background: var(--wgf-plate);
  color: var(--wgf-gold); font-family: var(--font-game); font-variant: small-caps;
  font-size: 1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis }
.ii-cats > li > a:hover, .ii-cats > li > a:focus-visible { border-color: var(--wgf-gold-dim);
  background: var(--wgf-plate-hi); color: var(--wgf-gold-bright) }
.ii-cats > li > a:focus-visible { outline: none; box-shadow: var(--focus-ring) }

/* The A-Z wall, behind a control. */
.ii-dir { margin: .4rem 0 0; border: 1px solid var(--wgf-metal-soft); background: var(--wgf-plate) }
.ii-dir__summary { display: flex; align-items: baseline; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap; cursor: pointer; padding: .6rem .9rem;
  font-family: var(--font-display); text-transform: uppercase; letter-spacing: .06em;
  font-size: .82rem; color: var(--wgf-gold) }
.ii-dir__summary:hover { color: var(--wgf-gold-bright) }
.ii-dir__summary:focus-visible { outline: none; box-shadow: var(--focus-ring) }
.ii-dir__count { font-family: var(--font-mono); font-size: .78rem; color: var(--wgf-muted);
  text-transform: none; letter-spacing: 0 }
.ii-dir > .wgf-ref-list, .ii-dir > ul { padding: .2rem .9rem .9rem }
.ii-dir[open] > .ii-dir__summary { border-bottom: 1px solid var(--wgf-metal-soft) }

@media (max-width: 680px) {
  .ii-panel__t { font-size: .9rem }
  .ii-panel__t td, .ii-panel__t tbody th { padding: .4rem .55rem }
  .ii-panel__cat { display: none }
  .ii-panel__item { width: auto }
  .ii-il .nm { font-size: .96rem }
}

.empty { margin: .5rem 0 0; color: var(--wgf-muted) }
.empty[hidden] { display: none }
.section-h { font-family: var(--font-display); text-transform: uppercase; letter-spacing: .06em; font-size: 1.05rem; color: var(--wgf-gold); margin: 0 }

@media (max-width: 640px) {
  .search__input { font-size: 1.2rem; padding: 1rem 1rem 1rem 3rem }
}

.wgf-item-index-layout { max-width: var(--wh-maxw, 1400px); margin: 0 auto; padding-inline: clamp(16px, 3vw, 32px); box-sizing: border-box; }
.wgf-item-index-layout .wgf-seo-main { min-width: 0; }
.wgf-item-index-layout .wgf-seo-hero { max-width: none; }
.wgf-item-index-layout .wgf-ad-slot { margin-left: auto; margin-right: auto; }
@media (max-width: 640px) {
  .wgf-item-index-layout { padding-inline: 14px; }
  .ii-searchsec { padding: 1.1rem 1rem 1.15rem; }
}

/* =============================================================================
   THE A-Z ITEM DIRECTORY (owner ruling 2026-08-14, live-fire in-game reskin)
   "any item that is displayed in list form should look exactly like an in game tooltip"

   This is the block the owner circled on /item/: 400 <li><a> per page, 30 pages, rendered
   as browser bullet discs with underlined links - the single largest plain surface left on
   the site. It stays server-rendered <a href> markup (those links are what keeps ~11.5k
   tail item pages out of orphan status, so the HTML is not touched here), but it now reads
   as the client's own list panel: a dense multi-column roster of sunk plate rows with a
   metal edge, gold Friz names, and the selected-row gold wash on hover.

   The hover CARD comes free: every row here is /item/<slug>-<id>/, so wgf-item-tooltip.js
   binds it and the reader gets the real in-game tooltip with live AH pricing. That is the
   half of the owner ruling that markup could never deliver on its own.
   ============================================================================= */

.ii-dir-count {
  margin: 0 0 var(--space-3);
  color: var(--wgf-muted);
  font-family: var(--font-ui);
  font-size: var(--text-sm);
}

.ii-dir-list {
  display: grid;
  /* Dense columns: 400 names as one tall bullet column was unreadable and pushed the pager
     far below the fold. auto-fill keeps a short last page from stretching into giant rows. */
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 2px;
  margin: 0 0 var(--space-4);
  padding: 0;
  list-style: none;
}

/* Kill the shared gold diamond marker here - these rows carry their own plate, and the
   marker would sit outside it. (.wgf-ref-list still gets the diamond everywhere else.) */
.ii-dir-list > li {
  padding-left: 0;
}
.ii-dir-list > li::before {
  content: none;
}

.ii-dir-list > li > a {
  display: block;
  padding: 5px 10px;
  border: 1px solid transparent;
  border-left: 2px solid var(--wgf-metal);
  background: linear-gradient(rgba(0, 0, 0, 0.35), rgba(0, 0, 0, 0.5));
  color: var(--wgf-gold-dim);
  font-family: var(--font-game);
  font-size: var(--text-sm);
  letter-spacing: 0.01em;
  line-height: 1.35;
  text-decoration: none;
  text-shadow: var(--text-ink-outline);
  /* A long item name must not blow the column out; the full name is in the hover card. */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ii-dir-list > li > a:hover,
.ii-dir-list > li > a:focus-visible {
  border-color: rgba(var(--wgf-gold-rgb), 0.5);
  background: linear-gradient(rgba(var(--wgf-gold-rgb), 0.10), rgba(var(--wgf-gold-rgb), 0.04));
  color: var(--wgf-gold-bright);
  text-decoration: none;
}
.ii-dir-list > li > a:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

@media (max-width: 560px) {
  .ii-dir-list { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
}

/* ---- wh parity 20261123wh: listview rows ---- */
.ii-panel__t 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); text-transform: uppercase; letter-spacing: .05em;
  color: var(--wh-muted, #888888);
}
.ii-panel__t tbody tr:hover { background: var(--wh-raise, #2a2a2a); }
.ii-panel__t td, .ii-panel__t tbody th { padding-top: .3rem; padding-bottom: .3rem; font-variant-numeric: tabular-nums; }
