/* Design system: docs/design.md. Flat dark surfaces, one gold accent, square corners.
   No external requests: the only font is self-hosted Open Sans (SIL OFL 1.1, see fonts/OFL.txt). */

/* Open Sans variable font (wdth=100, wght 400-700), Latin + Latin-1 + Latin Extended-A subset.
   Source: github.com/googlefonts/opensans @ bd7e37632246368c60fdcbd374dbf9bad11969b6
   (fonts/variable/OpenSans[wdth,wght].ttf), cut once with fonttools:
   fonttools varLib.instancer <ttf> wdth=100 wght=400:700, then pyftsubset --flavor=woff2. */
@font-face {
  font-family: "Open Sans";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/static/fonts/OpenSans-Latin-var.woff2") format("woff2");
}

/* ---- Tokens ---- */
:root {
  color-scheme: dark;

  /* surfaces */
  --bg-page: #170e09;
  --bg-section: #141a24;
  --bg-control: #000000;
  --bg-raised: #211510;
  --bg-filter: rgba(0, 0, 0, 0.5);
  --row-stripe: rgba(255, 255, 255, 0.05);
  --row-hover: rgba(255, 255, 255, 0.08);
  --line: rgba(255, 255, 255, 0.1);
  --line-strong: #504137;
  --line-control: #7a6656;

  /* accent and text */
  --gold: #f8b700;
  --gold-hover: #ffd045;
  --ink-heading: #ffffff;
  --ink: #ebdec2;
  --ink-muted: #b1997f;
  --ink-on-gold: #211510;

  /* state */
  --good: #1ec51e;
  --bad: #ff6a4d;
  --warn: #f0a020;
  --focus: #ffffff;

  /* channel pill (categorical, never a status colour) */
  --pill-vendor: #9ad0ff;

  /* coin denominations (money display; also the colour of the alt text if an icon fails) */
  --coin-gold: #ffd100;
  --coin-silver: #c0c0c0;
  --coin-copper: #e0914f;

  /* item quality (for item names once quality is known) */
  --q-poor: #9d9d9d;
  --q-common: #ffffff;
  --q-uncommon: #1eff00;
  --q-rare: #3a9bff;
  --q-epic: #c27ff7;
  --q-legendary: #ff8000;

  /* icon ring and the one permitted shadow (open dropdown) */
  --icon-ring: rgba(0, 0, 0, 0.6);
  --shadow-menu: rgba(0, 0, 0, 0.6);

  /* type scale */
  --font: "Open Sans", Arial, Helvetica, sans-serif;
  --fs-xs: 0.75rem;
  --fs-sm: 0.9rem;
  --fs-md: 1.08rem;
  --fs-lg: 1.296rem;
  --fs-xl: 2.24rem;
  --fs-2xl: 3.225rem;

  /* spacing */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 20px;
  --sp-6: 32px;
  --sp-7: 48px;
  --gutter: var(--sp-5);
}

/* ---- Base ---- */
*, *::before, *::after { box-sizing: border-box; border-radius: 0; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-width: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--fs-md);
  line-height: 1.5;
  background-color: var(--bg-page);
}

/* Centered frame, left-aligned content; owns the side gutter so the page never scrolls sideways.
   The section colour sits behind the main content. */
.frame {
  min-width: 0;
  max-width: 90rem;
  min-height: 100vh;
  margin: 0 auto;
  padding-block: var(--sp-6) var(--sp-7);
  padding-inline: var(--gutter);
  background-color: var(--bg-section);
}

h1, h2, h3 {
  margin: 0;
  color: var(--ink-heading);
  text-wrap: balance;
}

.page-title {
  margin-bottom: var(--sp-4);
  font-size: var(--fs-2xl);
  font-weight: 700;
  line-height: 1.15;
}

.section-title {
  margin-bottom: var(--sp-4);
  font-size: var(--fs-xl);
  font-weight: 400;
  line-height: 1.15;
}

a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--gold-hover); text-decoration: underline; }

.back-link { margin: 0 0 var(--sp-3); }

/* ---- Focus: one visible ring everywhere ---- */
a:focus-visible, select:focus-visible, input:focus-visible, summary:focus-visible,
.btn:focus-visible, .table-wrap:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

/* ---- Header blocks (no panel box) ---- */
.panel { margin: 0 0 var(--sp-6); }
.panel > :first-child { margin-top: 0; }
.panel > :last-child { margin-bottom: 0; }

.converting {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 var(--sp-2);
  margin: 0;
  font-size: var(--fs-md);
}

.converting .icon-inline { margin: 0; }

.legend { margin: 0 0 var(--sp-4); color: var(--ink); font-size: var(--fs-sm); }
.legend p { max-width: 65ch; margin: var(--sp-2) 0 0; }

details.legend summary {
  display: inline-block;
  color: var(--gold);
  cursor: pointer;
  list-style: none;
}

details.legend summary::-webkit-details-marker { display: none; }
details.legend summary:hover { color: var(--gold-hover); text-decoration: underline; }

details.legend summary::before {
  content: "";
  display: inline-block;
  margin-right: var(--sp-2);
  vertical-align: 0.05em;
  border-left: 5px solid currentColor;
  border-block: 4px solid transparent;
}

details.legend[open] summary::before {
  border-inline: 4px solid transparent;
  border-top: 5px solid currentColor;
  border-bottom: 0;
}

/* ---- Form ---- */
.field { margin: 0 0 var(--sp-4); }

.field label {
  display: block;
  margin-bottom: var(--sp-1);
  color: var(--ink);
  font-size: var(--fs-sm);
}

select, input[type="number"], input[type="text"] {
  width: 100%;
  max-width: 450px;
  height: 37px;
  padding: 0 10px;
  color: var(--ink-heading);
  font-family: inherit;
  font-size: var(--fs-sm);
  background: var(--bg-control);
  border: 1px solid var(--line-control);
}

select:hover, input:hover { border-color: var(--gold); }
select:focus, input:focus { border-color: var(--focus); }

input::placeholder { color: var(--ink-muted); opacity: 1; }

.btn {
  padding: 10px 24px;
  color: var(--ink-on-gold);
  font-family: inherit;
  font-size: var(--fs-md);
  font-weight: 700;
  cursor: pointer;
  background: var(--gold);
  border: 1px solid var(--gold);
}

.btn:hover { background: var(--gold-hover); border-color: var(--gold-hover); }

/* ---- Notices: raised row, 3px left edge, icon + text ---- */
.callout {
  margin: 0 0 var(--sp-4);
  padding: var(--sp-3) var(--sp-4);
  color: var(--ink);
  font-size: var(--fs-sm);
  background: var(--bg-raised);
  border-left: 3px solid var(--gold);
}

.callout::before {
  content: "\2139" / "";
  margin-right: var(--sp-2);
  color: var(--gold);
  font-weight: 700;
}

.callout ul { display: inline-block; margin: 0; padding-left: var(--sp-5); vertical-align: top; }
.callout-note { border-left-color: var(--gold); }

.callout-warn { border-left-color: var(--warn); }
.callout-warn::before { content: "\26A0" / ""; color: var(--warn); }

.callout-error { border-left-color: var(--bad); }
.callout-error::before { content: "\26A0" / ""; color: var(--bad); }

/* ---- Best summary (above the table): one line, no box ---- */
.best-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-2) var(--sp-4);
  margin: 0 0 var(--sp-6);
}

.summary-tag, .badge-best {
  display: inline-block;
  padding: 2px 6px;
  color: var(--ink-on-gold);
  font-size: var(--fs-xs);
  font-weight: 700;
  line-height: 1.4;
  text-transform: uppercase;
  white-space: nowrap;
  background: var(--gold);
}

.best-summary .item-name { color: var(--ink-heading); font-size: var(--fs-lg); }

.best-facts { display: flex; flex-wrap: wrap; gap: var(--sp-2) var(--sp-5); margin: 0; }
.best-facts > div { display: flex; flex-direction: column; min-width: 0; }
.best-facts dt { color: var(--ink-muted); font-size: var(--fs-sm); }

.best-facts dd {
  display: flex;
  align-items: center;
  margin: 0;
  color: var(--ink-heading);
  font-size: var(--fs-lg);
  font-variant-numeric: tabular-nums;
}

/* ---- Results table ---- */
.table-wrap {
  min-width: 0;
  max-width: 100%;
  overflow-x: auto;
  border-top: 1px solid var(--line);
}

table.results {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--fs-sm);
}

table.results th, table.results td {
  height: 50px;
  padding: var(--sp-1) var(--sp-2);
  text-align: left;
  vertical-align: middle;
  font-variant-numeric: tabular-nums;
}

table.results thead th {
  height: auto;
  padding-block: var(--sp-3);
  color: var(--gold);
  font-size: var(--fs-md);
  font-weight: 700;
  line-height: 1.25;
  text-wrap: balance;
  vertical-align: bottom;
  background: var(--bg-section);
}

table.results thead th abbr { text-decoration: none; }
table.results thead th:not(:first-child):not(:nth-child(2)):not(:last-child) { text-align: right; }

table.results thead th.sorted { color: var(--ink-heading); }

table.results thead th.sorted::after {
  content: "";
  display: inline-block;
  width: 0;
  height: 0;
  margin-left: var(--sp-2);
  vertical-align: 0.15em;
  border-inline: 4px solid transparent;
  border-top: 5px solid currentColor;
}

table.results tbody td, table.results tbody th { border-bottom: 1px solid var(--line); }
table.results tbody tr { color: var(--ink-muted); }
table.results tbody tr:nth-child(odd) { background: var(--row-stripe); }
table.results tbody tr:hover { background: var(--row-hover); }

.num { text-align: right !important; white-space: nowrap; color: var(--ink); }
table.results td.secondary { color: var(--ink-muted); }

.empty { display: block; color: var(--ink-muted); text-align: center; }

/* Item cell: fixed icon + text block; the first column stays put on sideways scroll.
   Sticky cells must be opaque: a solid section base with the stripe/hover layered on top
   (a layering trick with solid fills, not a component gradient). */
table.results th.item-cell {
  min-width: 14rem;
  color: var(--ink-heading);
  font-size: var(--fs-lg);
  font-weight: 400;
  background-color: var(--bg-section);
}

table.results tbody tr:nth-child(odd) th.item-cell {
  background-image: linear-gradient(var(--row-stripe), var(--row-stripe));
}

table.results tbody tr:hover th.item-cell {
  background-image: linear-gradient(var(--row-hover), var(--row-hover));
}

table.results th.item-cell, table.results thead th:first-child {
  position: sticky;
  left: 0;
  z-index: 1;
  border-right: 1px solid var(--line);
}

table.results thead th:first-child { z-index: 2; }

/* Best row: gold BEST tag before the name and a 2px gold left edge; no glow, no tint. */
table.results tbody tr.is-best th.item-cell { box-shadow: inset 2px 0 0 var(--gold); }

.item { display: flex; align-items: center; gap: var(--sp-3); min-width: 0; }
.item-text { min-width: 0; overflow-wrap: break-word; line-height: 1.3; }
.item-text .badge-best { margin-right: var(--sp-2); vertical-align: 0.15em; }
.item-text .item-via { font-size: var(--fs-sm); }
.item-name { min-width: 0; overflow-wrap: break-word; }

/* Money: gold, silver, copper parts, each number + coin icon. The s/c slots have a fixed
   width (two digits + icon) and omitted parts keep an empty slot, so columns line up. */
.money { display: inline-flex; align-items: center; justify-content: flex-end; gap: 0.5em; }
.coin-part {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.2em;
  font-variant-numeric: tabular-nums;
}
.coin-s, .coin-c { min-width: calc(2ch + 0.2em + 14px); }
.coin-g { color: var(--coin-gold); }
.coin-s { color: var(--coin-silver); }
.coin-c { color: var(--coin-copper); }
.coin-part .icon-coin { width: 14px; height: 14px; flex: none; overflow: hidden; }

.chip {
  display: inline-block;
  padding: 0 var(--sp-2);
  color: var(--warn);
  font-size: var(--fs-xs);
  white-space: nowrap;
  border: 1px dashed currentColor;
}

/* External (Wowhead) links: names keep their colour, underline on hover/focus only. */
.ext-link {
  color: inherit;
  text-decoration: underline dotted var(--ink-muted);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}
.ext-link:hover { color: var(--gold-hover); text-decoration: underline solid var(--gold-hover); }
.ext-link:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.currency-ref { display: inline-flex; align-items: center; gap: var(--sp-2); white-space: nowrap; }

/* ---- Icons (hotlinked Blizzard images; width/height attributes reserve the space) ---- */
.icon {
  display: inline-block;
  flex: none;
  vertical-align: middle;
  box-shadow: 0 0 0 1px var(--icon-ring);
}

.icon-coin { box-shadow: none; }

/* ---- Currency combobox (progressive enhancement over the native select) ---- */
.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.combo { position: relative; max-width: 450px; }

.combo .combo-input {
  max-width: none;
  padding: 0 48px 0 10px;
  font-weight: 700;
  text-overflow: ellipsis;
  border-color: var(--gold);
}

.combo.has-icon .combo-input { padding-left: 40px; }
.combo.is-open .combo-input, .combo .combo-input:focus { border-color: var(--focus); }

/* Chevron, 12px from the right edge. */
.combo::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 12px;
  width: 7px;
  height: 7px;
  margin-top: -6px;
  pointer-events: none;
  border-right: 2px solid var(--ink-heading);
  border-bottom: 2px solid var(--ink-heading);
  transform: rotate(45deg);
}

.combo.is-open::after { margin-top: -2px; transform: rotate(-135deg); }

.combo-current {
  position: absolute;
  top: 50%;
  left: 10px;
  transform: translateY(-50%);
  line-height: 0;
  pointer-events: none;
}

/* Popup: the pinned filter strip (task 0043) above the scrolling list. */
.combo-popup {
  position: absolute;
  z-index: 30;
  top: 100%;
  left: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  max-height: min(70vh, 420px);
  background: var(--bg-control);
  border: 1px solid var(--line-strong);
  box-shadow: 0 8px 24px var(--shadow-menu);
}

.combo-popup[hidden] { display: none; }

.listbox {
  flex: 1 1 auto;
  min-height: 0;
  margin: 0;
  padding: 0;
  overflow-y: auto;
  list-style: none;
}

/* Filter chips: expansion marks / text, border-only active state (ADR 0006: never
   tint or fill behind a mark). */
.combo-filter {
  flex: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  background: var(--bg-control);
  border-bottom: 1px solid var(--line);
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  margin: 0;
  padding: 3px 7px;
  position: relative;
  color: var(--gold);
  font: inherit;
  font-size: var(--fs-xs);
  font-weight: 700;
  line-height: 1;
  text-transform: uppercase;
  background: transparent;
  border: 2px solid var(--line-strong);
  border-radius: 0;
  cursor: pointer;
}

.chip[hidden] { display: none; }
.chip:hover { border-color: var(--ink-muted); }
.chip:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
/* Pressed: 2px gold border, outer-only glow and a check badge in the top-right corner
   (outside the mark; no fill, tint or filter on the mark, ADR 0006). */
.chip[aria-pressed="true"] {
  border-color: var(--gold);
  box-shadow: 0 0 0 1px var(--gold), 0 0 8px color-mix(in srgb, var(--gold) 55%, transparent);
}
.chip[aria-pressed="true"]::after {
  content: "\2713";
  position: absolute;
  top: -7px;
  right: -7px;
  width: 14px;
  height: 14px;
  color: var(--ink-on-gold);
  background: var(--gold);
  font-size: 11px;
  font-weight: 900;
  line-height: 14px;
  text-align: center;
  pointer-events: none;
}
.chip-mark { width: auto; height: auto; max-height: 18px; }
.chip .icon { width: 18px; height: 18px; object-fit: cover; }
.chip-clear { margin-left: auto; color: var(--ink-muted); border-color: transparent; text-decoration: underline; }
.chip-clear:hover { color: var(--ink-heading); border-color: transparent; }
.chip-clear::after { content: none; }

.listbox[hidden] { display: none; }

.option, .option-none {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  min-height: 42px;
  padding: 10px 20px;
  font-size: var(--fs-sm);
}

/* Non-selectable group heading ("Currencies" / "Items") in the open list. */
.option-groupbox { margin: 0; padding: 0; }
.option-grouplist { margin: 0; padding: 0; list-style: none; }
.option-group {
  padding: 10px 20px 4px;
  color: var(--ink-muted);
  font-size: var(--fs-xs);
  font-weight: 700;
  text-transform: uppercase;
  cursor: default;
}
.option-groupbox + .option-groupbox { border-top: 1px solid var(--line); }

.option { position: relative; color: var(--gold); cursor: pointer; }
.option-none { color: var(--ink-muted); }
.icon-spacer { display: inline-block; flex: none; width: 18px; height: 18px; }
.option:hover, .option.is-active, .option[aria-selected="true"] { color: var(--ink-heading); }
.option.is-active { outline: 2px solid var(--focus); outline-offset: -2px; }
.option-label { flex: 1; min-width: 0; overflow-wrap: break-word; }
/* Trailing expansion / event / PvP marker: last element of the row, before the check mark. */
.option-marker { flex: none; }
.option-marker-event, .option-marker-pvp { width: 18px; height: 18px; object-fit: cover; }
/* Expansion marks (committed files, task 0039): natural aspect ratio, never stretched.
   Files shorter than 18px stay at their native size; taller ones scale down to 18px. */
.option-marker-expansion { width: auto; height: auto; max-height: 18px; }
.option-marker[hidden] { display: none; }
.option .hint, .hint { color: var(--ink-muted); }

/* Check mark at the right of the selected option. */
.option[aria-selected="true"]::after {
  content: "";
  flex: none;
  width: 5px;
  height: 10px;
  margin-left: auto;
  border-right: 2px solid var(--ink-heading);
  border-bottom: 2px solid var(--ink-heading);
  transform: rotate(45deg);
}

.site-footer {
  margin-top: var(--sp-6);
  color: var(--ink-muted);
  font-size: var(--fs-xs);
  text-align: left;
}

/* Channel pills: colour plus the text label */
.pill {
  display: inline-block;
  padding: 2px 8px;
  font-size: var(--fs-xs);
  font-weight: 700;
  line-height: 1.4;
  text-transform: uppercase;
  background: transparent;
  border: 1px solid currentColor;
  border-radius: 2px;
}

.pill-vendor { color: var(--pill-vendor); }
.pill-ah { color: var(--gold); }

/* ---- Hint button + popover (design.md 5.14) ---- */
.hint-btn {
  position: relative;
  display: inline-block;
  box-sizing: content-box;
  width: 1.1em;
  height: 1.1em;
  margin: -6px 0 -6px var(--sp-1);
  padding: 5px;
  border: 0;
  border-radius: 0;
  background-color: transparent;
  color: var(--ink-muted);
  font: inherit;
  font-size: var(--fs-xs);
  font-weight: 700;
  line-height: 1.1em;
  text-align: center;
  vertical-align: middle;
  cursor: pointer;
}

.hint-btn::before {
  content: "";
  position: absolute;
  inset: 5px;
  border: 1px solid var(--line-control);
}

/* Warning variant (row warnings): the glyph alone in --warn, no "?" box. */
.hint-btn-warn { color: var(--warn); font-size: var(--fs-sm); }
.hint-btn-warn::before { display: none; }

/* Refund clock (task 0033): compact clock glyph plus hours in muted ink, no "?" box. Every
   row has one, so it stays in flow after the Days value and the values line up. */
.hint-btn-clock {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  width: auto;
  height: auto;
  box-sizing: border-box;
  margin: -6px 0 -6px var(--sp-1);
  padding: 6px 2px;
  font-size: var(--fs-xs);
  font-weight: 400;
  line-height: 1;
  white-space: nowrap;
}
.hint-btn-clock::before { display: none; }
.hint-btn-clock > span[aria-hidden] { display: inline-flex; align-items: center; gap: 2px; }
.clock-svg { flex: none; }
.days-cell { display: inline-flex; align-items: center; }
.best-facts dd .hint-btn-clock { margin-block: -6px; }

/* Total gold cell: the icon of a warned row sits in a trailing slot reserved by the
   column's padding, so the money columns line up with unwarned rows. */
@media (min-width: 40.01rem) {
  table.results td[data-label="Total gold"] { padding-inline-end: calc(var(--sp-1) + 1.1em + 10px + var(--sp-2)); }
  .total-cell { position: relative; display: inline-block; }
  .total-cell .hint-btn-warn { position: absolute; left: 100%; top: 50%; margin: 0 0 0 var(--sp-1); transform: translateY(-50%); }
}

.hint-btn:hover, .hint-btn[aria-expanded="true"] { color: var(--gold-hover); }
.hint-btn:hover::before, .hint-btn[aria-expanded="true"]::before { border-color: var(--gold-hover); }
.hint-btn:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

.hint-pop {
  position: fixed;
  z-index: 100;
  box-sizing: border-box;
  max-width: min(22rem, calc(100vw - 2 * var(--sp-2)));
  padding: var(--sp-2) var(--sp-3);
  background: var(--bg-raised);
  border: 1px solid var(--line-strong);
  box-shadow: 0 8px 24px var(--shadow-menu);
  color: var(--ink);
  font-size: var(--fs-sm);
  font-weight: 400;
  line-height: 1.4;
  text-align: left;
  text-wrap: pretty;
}

.hint-pop[hidden] { display: none; }

/* ---- Small screens: one stacked card per row (CSS only, labels from data-label) ---- */
@media (max-width: 40rem) {
  :root { --gutter: var(--sp-4); }
  .chip { min-height: 32px; padding: 6px 9px; }
  .page-title { font-size: var(--fs-xl); }
  .section-title { font-size: var(--fs-xl); }

  .table-wrap { overflow-x: visible; border-top: 0; }

  table.results, table.results tbody, table.results tr, table.results td, table.results th.item-cell {
    display: block;
    width: auto;
    height: auto;
  }

  table.results thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }

  table.results tbody tr {
    position: relative;
    padding: var(--sp-2) 0 var(--sp-2) var(--sp-3);
    border-bottom: 1px solid var(--line);
  }

  table.results tbody td, table.results tbody th { border-bottom: 0; }

  table.results tbody tr.is-best { box-shadow: inset 2px 0 0 var(--gold); }
  table.results tbody tr.is-best th.item-cell { box-shadow: none; }

  table.results th.item-cell {
    position: static;
    min-width: 0;
    padding-inline: 0;
    border-right: 0;
    background: none;
  }

  table.results tbody tr:nth-child(odd) th.item-cell,
  table.results tbody tr:hover th.item-cell { background-image: none; }

  table.results td {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: var(--sp-3);
    padding-block: var(--sp-1);
    padding-inline: 0 var(--sp-3);
  }

  table.results td::before {
    content: attr(data-label);
    flex: none;
    max-width: 50%;
    color: var(--ink-muted);
    font-size: var(--fs-sm);
    text-align: left;
  }

  .empty { display: inline; }
  table.results td[data-label="Total gold"] { padding-inline-end: var(--sp-3); }
  .total-cell { display: inline-flex; align-items: center; }
  .total-cell .hint-btn-warn { position: static; margin: -6px 0 -6px var(--sp-1); transform: none; }
}

/* ---- Reduced motion ---- */
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}

/* ---- Single page: filter row (design.md 5.3-5.5) ---- */
.filters {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: var(--sp-4);
  margin: 0 0 var(--sp-4);
}

.filter { flex: 0 1 auto; max-width: 100%; min-width: 0; }
.filter label {
  display: block;
  margin-bottom: var(--sp-1);
  color: var(--ink-muted);
  font-size: var(--fs-sm);
}
.filter-currency { width: 28rem; }
.filter-amount { width: 8rem; }
.filter-realm { width: 14rem; }
.filter select, .filter input, .filter .combo { max-width: none; }

.filter-submit { align-self: flex-end; height: 37px; padding-block: 0; }

.example-label {
  margin: 0 0 var(--sp-3);
  color: var(--ink-muted);
  font-size: var(--fs-sm);
}

@media (max-width: 40rem) {
  .filter, .filter-currency, .filter-amount, .filter-realm { width: 100%; }
  .filter-submit { width: 100%; }
}
