/* Tradewood — Dark Wood (portal look of xsarts.eu, user decision 29.11.2026).
   One theme only: the light theme and the theme toggle are gone.
   Cinzel is self-hosted (internal/web/static/fonts/). */

/* ---------- Cinzel webfont (latin + latin-ext, 400/700) ---------- */
@font-face {
  font-family: "Cinzel";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/static/fonts/cinzel-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Cinzel";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/static/fonts/cinzel-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Cinzel";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/static/fonts/cinzel-700-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Cinzel";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/static/fonts/cinzel-700-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---------- Tokens: one dark Wood theme ---------- */
:root {
  color-scheme: dark;
  --bg-from: #0d0a07;
  --bg-to: #2a1d10;
  --glow-1: rgba(0, 0, 0, 0);
  --glow-2: rgba(0, 0, 0, 0);
  --surface: #1d150d;
  --surface-strong: #241a10;
  --surface-solid: #1d150d;
  --text: #e8dcc2;
  --text-muted: #a8977a;
  --accent: #ffd100;
  --accent-contrast: #1a1204;
  --accent-2: #f0a030;
  --gold-light: #ffdf4d;
  --gold-dark: #c99a00;
  --edge: #5a4424;
  --highlight: rgba(255, 240, 200, 0.06);
  --shadow: 0 12px 40px rgba(0, 0, 0, 0.55), 0 2px 8px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 18px 56px rgba(0, 0, 0, 0.65), 0 4px 12px rgba(0, 0, 0, 0.40);
  --warn-bg: #3a2410;
  --warn-text: #f0a030;
  --coin-gold: #ffd100;
  --coin-silver: #c9c2b0;
  --coin-copper: #c97b4a;
  --faction-alliance: #5da9ff;
  --faction-horde: #f0645b;
  --faction-neutral: #3cc3ab;
  --ok: #3fbf5a;
  --line: #5a4424;
  /* Stronger control border: ≥ 3:1 against the effective input surface
     (TestFilterControlsContrast). */
  --line-control: #b8913f;
  --row-hover: rgba(255, 220, 160, 0.05);
  --skel: rgba(200, 160, 100, 0.10);
  --skel-shine: rgba(255, 210, 140, 0.18);
  --chart-grid: rgba(184, 145, 63, 0.35);
  /* Item quality (M2h): in-game colors, lightened toward white to ≥ 4.5:1 on
     every render surface (TestQualityColorContrast). Common uses --text. */
  --q-poor: #b1b1b1;
  --q-uncommon: #1eff00;
  --q-rare: #7db6ee;
  --q-epic: #d19bf7;
  --q-legendary: #ff972e;
  --q-heirloom: #e6cc80;
  --q-artifact: #e6cc80;

  /* Typography: portal stacks; Cinzel is self-hosted. */
  --font-display: "Cinzel", "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif;
  --font-body: "Palatino Linotype", "Book Antiqua", Palatino, Georgia, "Times New Roman", serif;
  --font-ui: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif;
  --fs-hero: clamp(2.625rem, 7vw, 4.75rem);  /* 42–76 px */
  --fs-h2: clamp(2rem, 5vw, 2.875rem);       /* 32–46 px */
  --fs-h3: clamp(1.75rem, 4vw, 2.5rem);      /* 28–40 px */
  --fs-14: 0.875rem;
  --fs-16: 1rem;
  --fs-19: 1.1875rem;
  --fs-23: 1.4375rem;
  --fs-28: 1.75rem;
  --fs-34: 2.125rem;
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-6: 24px;
  --sp-8: 32px;
  --sp-12: 48px;
  --header-h: 56px; /* sticky header bar (.header-inner min-height); anchor targets clear it */
  --radius: 8px;
  --radius-sm: 6px;
  --wrap: 1120px;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --t: 200ms;
}





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

html {
  -webkit-text-size-adjust: 100%;
  background: var(--bg-from);
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-body);
  font-size: var(--fs-16);
  line-height: 1.6;
  color: var(--text);
  /* Portal page background: one radial gradient from the warm wood top to the
     dark base. No backdrop image, no translucency. */
  background-color: var(--bg-from);
  background: radial-gradient(ellipse at 50% -10%, var(--bg-to) 0%, var(--bg-from) 60%);
  background-attachment: fixed;
}

/* Headings: display serif, Driftwood clamp scale. Page titles (h1 outside the
   hero) use the H2 step, section heads the H3 step, card titles a fixed 23 px. */
h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: 0.03em;
  margin: 0 0 var(--sp-3);
}
h1 { font-size: var(--fs-h2); }
h2 { font-size: var(--fs-h3); }
h3 { font-size: var(--fs-23); }
p { margin: 0 0 var(--sp-4); }

a { color: var(--accent); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: var(--sp-4);
  top: -100px;
  z-index: 100;
  padding: var(--sp-2) var(--sp-4);
  background: var(--surface-solid);
  color: var(--text);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
}
.skip-link:focus { top: var(--sp-2); }

.container {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--sp-4);
}
@media (min-width: 640px) { .container { padding: 0 var(--sp-6); } }

.main { flex: 1; padding-top: var(--sp-6); padding-bottom: var(--sp-12); outline: none; }

.muted { color: var(--text-muted); }
.lead { font-size: var(--fs-19); color: var(--text-muted); }

/* ---------- Wood panels (header, hero, cards) — no blur, no translucency ---------- */
.panel {
  background: var(--surface);
  border: 1px solid var(--edge);
  box-shadow: inset 0 1px 0 var(--highlight), var(--shadow);
}

.card {
  border-radius: var(--radius);
  padding: var(--sp-6);
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  border-width: 0 0 1px;
  border-radius: 0;
}
.header-inner {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  min-height: var(--header-h);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  min-height: 44px;
  color: var(--text);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--fs-19);
  letter-spacing: 0.06em;
  text-decoration: none;
}
.brand-mark { color: var(--accent); font-size: var(--fs-23); }
/* flex-wrap: entries drop to a second line instead of overflowing the header
   if a wider font or a longer translation ever exceeds the row. */
.main-nav { flex: 1; display: flex; flex-wrap: wrap; gap: var(--sp-4); }
.main-nav a, .lang-switch a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 var(--sp-2);
  white-space: nowrap; /* a label never breaks; a wider translation wraps the nav row instead */
  color: var(--text);
  text-decoration: none;
  border-radius: var(--radius-sm);
}
.main-nav a:hover, .lang-switch a:hover { color: var(--accent); }
.main-nav a[aria-current="page"] { color: var(--accent); box-shadow: inset 0 -2px 0 var(--accent); }
.header-tools { display: flex; align-items: center; gap: var(--sp-2); }
.lang-switch { display: flex; align-items: center; font-size: var(--fs-14); font-weight: 600; }
.lang-switch a[aria-current="true"] { color: var(--accent); }
.lang-sep { color: var(--text-muted); }



/* Wordmark only from md (768 px): with three main-nav entries the mark alone
   keeps the single header row clear of the tools up to 767 px. */
@media (max-width: 767px) {
  .brand-word { display: none; }
}
@media (max-width: 639px) {
  .header-inner { gap: var(--sp-2); }
}

/* ---------- Banners ---------- */
.banner, .banner-warn {
  background: var(--warn-bg);
  color: var(--warn-text);
  padding: var(--sp-3) var(--sp-4);
}
.legal-notice { border-radius: var(--radius-sm); font-weight: 600; }

/* ---------- Breadcrumbs ---------- */
.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  list-style: none;
  margin: 0 0 var(--sp-4);
  padding: 0;
  font-size: var(--fs-14);
  color: var(--text-muted);
}
.breadcrumbs li + li::before { content: "›"; margin-right: var(--sp-2); }
.breadcrumbs a { color: var(--text-muted); }

/* ---------- Buttons, inputs ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 var(--sp-6);
  border-radius: var(--radius-sm);
  font: inherit;
  font-family: var(--font-ui);
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: transform var(--t) var(--ease), box-shadow var(--t) var(--ease), background-color var(--t) var(--ease);
}
.btn:hover { transform: scale(1.02); box-shadow: var(--shadow); }
.btn-primary {
  border: 0;
  color: var(--accent-contrast);
  background: linear-gradient(180deg, var(--gold-light), var(--gold-dark));
}
.btn-secondary {
  border: 1px solid var(--accent);
  color: var(--accent);
  background: transparent;
}

input[type="search"], input[type="email"], input[type="number"] {
  width: 100%;
  min-height: 44px;
  padding: 0 var(--sp-4);
  border: 1px solid var(--line-control);
  border-radius: var(--radius-sm);
  background: var(--surface-strong);
  color: var(--text);
  font: inherit;
  font-family: var(--font-ui);
}
input[type="search"] { padding-left: 40px; }
select {
  min-height: 44px;
  max-width: 100%;
  padding: 0 var(--sp-3);
  border: 1px solid var(--line-control);
  border-radius: var(--radius-sm);
  background: var(--surface-strong);
  color: var(--text);
  font: inherit;
  font-family: var(--font-ui);
  cursor: pointer;
}
select:hover, input[type="search"]:hover, input[type="email"]:hover, input[type="number"]:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--line-control)); }
select:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
input::placeholder { color: var(--text-muted); opacity: 1; }
input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- Landing ---------- */
/* Hero (*wood family pattern): name, punchline, key figures, dual CTA, trust line. */
.hero { padding: var(--sp-12) var(--sp-6) var(--sp-8); text-align: center; }
@media (max-width: 639px) { .hero { padding: var(--sp-12) var(--sp-4) var(--sp-8); } }
/* Copy + image: stacked below 1024 px (image under the text), side by side above.
   The copy stays the primary axis; the image only supplements it. */
.hero-top { display: grid; gap: var(--sp-8); align-items: center; margin-bottom: var(--sp-8); }
.hero-copy { min-width: 0; }
.hero-media { width: 100%; max-width: 640px; margin: 0 auto; }
.hero-img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--edge);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
@media (min-width: 1024px) {
  .hero-top { grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); }
  .hero-copy { text-align: left; }
  .hero-copy .hero-punchline { margin-left: 0; }
  .hero-copy .hero-cta { justify-content: flex-start; }
  /* The brand name is one unbreakable word (Cinzel, letter-spacing .03em):
     its width is ~6.71 × font-size. Fit it to the copy column instead of
     letting it overflow into the image column. Column width =
     (min(100vw, --wrap) − 48px container padding − 48px hero padding
      − 2px border − 32px grid gap) / 2.15. So font-size ≤ column / 6.71;
     the 14.7 divisor adds a ~2% safety margin. */
  .hero-copy .hero-title {
    font-size: min(4.75rem, 5.5vw, calc((min(100vw, var(--wrap)) - 130px) / 14.7));
  }
}
.eyebrow {
  margin: 0 0 var(--sp-2);
  color: var(--accent);
  font-size: var(--fs-14);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.hero-title {
  margin: 0 0 var(--sp-4);
  font-size: var(--fs-hero);
  line-height: 1.1;
  width: 100%;
}
@media (max-width: 639px) { .hero-title { font-size: min(2.5rem, calc((100vw - 66px) / 6.71)); } }
.hero-punchline { max-width: 60ch; margin: 0 auto var(--sp-6); }

.figures {
  display: grid;
  gap: var(--sp-3);
  max-width: 720px;
  margin: 0 auto var(--sp-8);
  padding: 0;
  list-style: none;
}
@media (min-width: 640px) { .figures { grid-template-columns: repeat(3, 1fr); } }
.figure {
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
  padding: var(--sp-4);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-strong);
}
.figure-value {
  color: var(--accent);
  font-family: var(--font-display);
  font-size: var(--fs-34);
  font-weight: 800;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.figure-label { color: var(--text-muted); font-size: var(--fs-14); font-weight: 600; }

.hero-cta { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--sp-3); }
.trust-line { margin: var(--sp-3) 0 0; color: var(--text-muted); font-size: var(--fs-14); }

.hero-search {
  max-width: 640px;
  margin: var(--sp-8) auto 0;
  padding-top: var(--sp-6);
  border-top: 1px solid var(--line);
  text-align: left;
}
.search-label { display: block; margin-bottom: var(--sp-2); font-weight: 600; }
.search-form {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  margin-bottom: var(--sp-3);
  max-width: 640px;
}
.hero-search .search-form { margin-bottom: 0; }
@media (min-width: 640px) { .search-form { flex-direction: row; } }
.search-field { position: relative; flex: 1; display: block; }
.search-glyph {
  position: absolute;
  left: var(--sp-3);
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.stats-bar {
  display: grid;
  gap: var(--sp-3);
  list-style: none;
  margin: var(--sp-6) 0 0;
  padding: var(--sp-4) var(--sp-6);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}
@media (min-width: 640px) { .stats-bar { grid-template-columns: repeat(3, 1fr); } }

.section { margin-top: var(--sp-8); }
.section-title { text-align: center; }
/* Landing section heads use the H2 step of the Driftwood scale. */
.section-title, .top-box h2, .addon-box h2 { font-size: var(--fs-h2); }
.section-intro { max-width: 60ch; margin: 0 auto var(--sp-6); text-align: center; }

/* Ornament divider (tree rings + sparkline), currentColor follows the theme. */
.ornament {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  margin: var(--sp-12) auto 0;
  max-width: 480px;
  color: color-mix(in srgb, var(--accent) 70%, var(--text-muted));
  opacity: 0.8;
}
.ornament::before, .ornament::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line));
}
.ornament::after { background: linear-gradient(90deg, var(--line), transparent); }
.ornament svg { flex: none; display: block; }

/* USP: personalisation teaser first (full width), then the "available now" grid. */
.feature {
  display: flex;
  gap: var(--sp-4);
  align-items: flex-start;
  transition: transform var(--t) var(--ease), box-shadow var(--t) var(--ease);
}
.feature:hover { transform: translateY(-4px); box-shadow: inset 0 1px 0 var(--highlight), var(--shadow-lg); }
.feature h3 { margin: var(--sp-2) 0; }
.feature p { color: var(--text-muted); }
.feature-body > :last-child { margin-bottom: 0; }
.feature-icon {
  flex: none;
  display: inline-grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  color: var(--accent);
}
.icon { display: block; }
.feature-teaser {
  margin-bottom: var(--sp-4);
  border-color: color-mix(in srgb, var(--accent) 45%, var(--edge));
}
.feature-teaser h3 { font-size: var(--fs-23); }
.feature-lead { color: var(--text) !important; font-size: var(--fs-19); font-weight: 600; margin-bottom: var(--sp-2); }
.feature-grid { display: grid; gap: var(--sp-4); }
@media (min-width: 768px) { .feature-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 479px) { .feature { flex-direction: column; } }

.top-box { margin-top: var(--sp-8); }
.top-list { margin: 0 0 var(--sp-4); padding-left: var(--sp-6); font-variant-numeric: tabular-nums; }
.top-list li { display: list-item; padding: var(--sp-1) 0; }
.top-list .price { float: right; }
.more-link { font-weight: 600; }

/* Addon box (M3c): centered intro, then the installer card — one per configured
   WoW version, the only distribution of Addon and Agent. */
.addon-cards { display: grid; justify-items: center; gap: var(--sp-4); }
.addon-card { width: 100%; max-width: 360px; padding: var(--sp-6); }
.addon-card h3 { margin: 0 0 var(--sp-4); }
/* Name/value rows (version, size, SHA-256): one grid over all pairs, so the
   values line up. */
.installer-meta {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: var(--sp-2) var(--sp-3);
  margin: 0 0 var(--sp-6);
}
.installer-meta > div { display: contents; }
.installer-meta dt { color: var(--text-muted); font-size: var(--fs-14); font-weight: 600; }
.installer-meta dd { margin: 0; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.installer-sha { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: var(--fs-14); }
.addon-card .btn { width: 100%; }
.addon-unavailable { margin: var(--sp-2) 0 0; font-size: var(--fs-14); }

/* Installation steps (M3c): numbered circles in accent color, 2 × 2 from tablet width. */
.install-steps { display: grid; gap: var(--sp-4) var(--sp-8); margin: 0; padding: 0; list-style: none; }
@media (min-width: 768px) { .install-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.install-steps li { position: relative; padding-left: 48px; }
.install-num {
  position: absolute;
  left: 0;
  top: -3px; /* centers the 32 px circle on the first 25.6 px text line */
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid var(--accent);
  border-radius: 50%;
  color: var(--accent);
  font-family: var(--font-ui);
  font-size: var(--fs-14);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.install-note { max-width: 70ch; margin: var(--sp-6) 0 0; padding-top: var(--sp-4); border-top: 1px solid var(--line); }

/* Premium route (M5b): the installer section is advertised as the premium
   path. The bonus block sits on the panel card (no own fill), so its text
   keeps the card contrast; the purchase hint and the fallback note sit on the
   page background. */
.premium-card { margin-bottom: var(--sp-6); }
.premium-bonus {
  margin-top: var(--sp-6);
  padding: var(--sp-4);
  border: 1px solid color-mix(in srgb, var(--accent) 45%, var(--line));
  border-radius: 6px;
}
.premium-bonus .badge { margin-bottom: var(--sp-2); }
.premium-bonus p { margin: 0; }
.premium-bonus p + p { margin-top: var(--sp-2); }
.premium-bonus strong { font-size: var(--fs-19); }
.premium-buy { margin: var(--sp-4) 0 0; text-align: center; }
.premium-soon { margin: var(--sp-3) 0 0; text-align: center; }

/* Section badge over the centered section head: centered like the pricing
   head badge, with the same gap (var(--sp-3)) to the H2. */
.addon-box > .badge {
  display: flex;
  width: fit-content;
  margin: 0 auto var(--sp-3);
}

/* Pricing section (M5a): 3-column grid from tablet, equal card height, actions pinned to bottom. */
.pricing-section { scroll-margin-top: calc(var(--header-h) + var(--sp-6)); }
.pricing-head { text-align: center; }
.pricing-head .badge-dev, .pricing-head .badge-live {
  margin-bottom: var(--sp-3);
  background: var(--surface-strong);
}
.pricing-grid {
  display: grid;
  gap: var(--sp-4);
  align-items: stretch;
}
@media (min-width: 768px) {
  .pricing-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.pricing-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.pricing-plan-title { margin: 0 0 var(--sp-2); }
.pricing-amount {
  margin: 0 0 var(--sp-1);
  color: var(--accent);
  font-family: var(--font-display);
  font-size: var(--fs-34);
  font-weight: 800;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
.pricing-meta { margin: 0 0 var(--sp-4); font-size: var(--fs-14); }
.pricing-list {
  display: grid;
  gap: var(--sp-2);
  margin: 0 0 var(--sp-6);
  padding-left: var(--sp-4);
}
.pricing-list li { overflow-wrap: break-word; }
.pricing-actions {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}
.pricing-form {
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
  margin: 0;
}
.pricing-actions .btn { width: 100%; }
.pricing-pay-hint { margin: 0; font-size: var(--fs-14); text-align: center; }
.btn-disabled, .pricing-btn-disabled {
  border: 1px solid var(--line-control);
  background: var(--surface-strong);
  color: var(--text-muted);
  cursor: default;
}
.btn-disabled:hover, .pricing-btn-disabled:hover { transform: none; box-shadow: none; }
.pricing-fineprint {
  max-width: 72ch;
  margin: var(--sp-6) auto 0;
  font-size: var(--fs-14);
  text-align: center;
}
.pricing-info {
  display: grid;
  gap: var(--sp-6);
  margin-top: var(--sp-6);
}
@media (min-width: 768px) {
  .pricing-info { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.pricing-info-col { min-width: 0; }
.pricing-info-col > :last-child { margin-bottom: 0; }
.pricing-route {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: var(--fs-14);
  overflow-wrap: anywhere;
  word-break: break-word;
}
.pricing-faq { margin-top: var(--sp-8); }
.pricing-faq-title {
  font-size: var(--fs-h3);
  text-align: center;
  margin-bottom: var(--sp-4);
}
.pricing-faq-grid {
  display: grid;
  gap: var(--sp-4);
}
@media (min-width: 768px) {
  .pricing-faq-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.pricing-faq-item { min-width: 0; }
.pricing-faq-item h3 { font-size: var(--fs-19); margin-bottom: var(--sp-2); }
.pricing-faq-item p { margin: 0; color: var(--text-muted); overflow-wrap: anywhere; }
.badge {
  display: inline-flex;
  align-items: center;
  padding: var(--sp-1) var(--sp-3);
  border-radius: 999px;
  border: 1px solid var(--accent);
  color: var(--accent);
  font-size: var(--fs-14);
  font-weight: 600;
}
.badge-dev, .badge-live { padding: 2px var(--sp-3); font-size: 0.8125rem; }
.badge-dev { background: color-mix(in srgb, var(--accent) 14%, transparent); }
.badge-live {
  border-color: var(--ok);
  color: var(--ok);
  background: color-mix(in srgb, var(--ok) 12%, transparent);
}

/* ---------- Price ---------- */
.price { font-variant-numeric: tabular-nums; white-space: nowrap; }
.coin + .coin { margin-left: 0.35em; }
.coin::after {
  content: "";
  display: inline-block;
  width: 0.5em;
  height: 0.5em;
  margin-left: 0.15em;
  border-radius: 50%;
  vertical-align: 0.1em;
}
.coin-gold::after { background: var(--coin-gold); }
.coin-silver::after { background: var(--coin-silver); }
.coin-copper::after { background: var(--coin-copper); }

/* ---------- Static pages ---------- */
.prose { max-width: 70ch; }
.prose section { margin-top: var(--sp-6); }

/* ---------- Error pages ---------- */
.error-page { max-width: 640px; margin: var(--sp-8) auto 0; text-align: center; }
.error-code { font-size: var(--fs-34); font-family: var(--font-display); font-weight: 800; color: var(--accent); margin-bottom: var(--sp-2); }
.actions { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--sp-3); }

/* ---------- Footer ---------- */
.site-footer {
  margin-top: auto;
  padding: var(--sp-6) 0;
  border-top: 1px solid var(--edge);
  background: var(--surface-strong);
  color: var(--text-muted);
  font-size: var(--fs-14);
}
.footer-nav { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2); margin-bottom: var(--sp-3); }
.footer-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--text);
}
.footer-note { margin: 0 0 var(--sp-2); max-width: 90ch; }
.footer-copy { margin: 0 0 var(--sp-2); }

/* ---------- htmx (Teil 2): skeleton after 150 ms, no spinner (DESIGN §3.8) ---------- */
.htmx-indicator { opacity: 0; }
.htmx-request .htmx-indicator, .htmx-request.htmx-indicator { opacity: 1; transition: opacity var(--t) var(--ease) 150ms; }

/* ---------- JS / no-JS switches ---------- */
:root:not(.js) .js-only { display: none !important; }
.js .no-js-only { display: none !important; }

/* ---------- Page head, sections, hints ---------- */
.page-head { margin-bottom: var(--sp-6); }
.page-head .lead { margin: 0; }
.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--sp-2) var(--sp-4);
  margin-bottom: var(--sp-4);
}
.section-head h2, .section-head p { margin: 0; }
.hint {
  margin: var(--sp-4) 0;
  padding: var(--sp-3) var(--sp-4);
  border-left: 3px solid var(--accent-2);
  border-radius: var(--radius-sm);
  background: var(--surface-strong);
  color: var(--text-muted);
}
.notice {
  margin-bottom: var(--sp-6);
  padding: var(--sp-4) var(--sp-6);
  border-left: 4px solid var(--accent);
}
.notice p { margin: 0; }
.notice-title { font-weight: 700; margin-bottom: var(--sp-1) !important; }
.table-foot { margin: var(--sp-3) 0 0; font-size: var(--fs-14); }

/* ---------- Filter bar (DESIGN §3.2) ---------- */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: var(--sp-4);
  padding: var(--sp-4);
  margin-bottom: var(--sp-6);
}
@media (min-width: 640px) { .filter-bar { padding: var(--sp-4) var(--sp-6); } }
.filter-search { flex: 1 1 260px; min-width: 0; }
.filter-search label, .field label {
  display: block;
  margin-bottom: var(--sp-1);
  font-size: var(--fs-14);
  font-weight: 600;
  color: var(--text-muted);
}
/* Caption-style fine print below the filter fields (M2f: provisional ruleset
   note); its own full-width grid row so the selects stay aligned. */
.field-note { grid-column: 1 / -1; margin: 0; font-size: var(--fs-14); line-height: 1.5; color: var(--text-muted); }
.filter-more { flex: 1 1 100%; }
.filter-more > summary {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  min-height: 44px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}
.filter-more > summary::-webkit-details-marker { display: none; }
.filter-more > summary::before {
  content: "▸";
  color: var(--accent);
  transition: transform var(--t) var(--ease);
}
.filter-more[open] > summary::before { transform: rotate(90deg); }
.filter-count:empty { display: none; }
.filter-count {
  padding: 2px var(--sp-2);
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 18%, transparent);
  color: var(--text);
  font-size: var(--fs-14);
}
.filter-fields {
  display: grid;
  gap: var(--sp-3);
  padding-top: var(--sp-2);
}
.filter-fields select, .filter-fields input[type="number"] { width: 100%; }
/* New level/rarity controls: stronger border so the control boundary reaches
   ≥ 3:1 on the effective input surface (existing filter controls keep --line). */
.field-control input, .field-control select { border-color: var(--line-control); }
.field-control input:hover, .field-control select:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--line-control)); }
.filter-actions { display: flex; flex-wrap: wrap; gap: var(--sp-3); align-items: flex-end; }
@media (min-width: 640px) {
  .filter-fields { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); align-items: end; }
}
/* Tablet/desktop: every field visible in one wrapping row (wireframe §2.3);
   the <details> toggle is only the mobile pattern. Older engines without
   ::details-content keep the toggle – still fully usable. */
@media (min-width: 768px) {
  .filter-more { flex: 3 1 480px; }
  .filter-more > summary { display: none; }
  .filter-more::details-content { content-visibility: visible; display: contents; }
  .filter-fields { padding-top: 0; }
}

/* ---------- Results + skeleton (DESIGN §3.8) ---------- */
.results-wrap { position: relative; min-height: 240px; }
.results-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--sp-1) var(--sp-4);
  margin-bottom: var(--sp-3);
}
.results-head p { margin: 0; }
.results-count { font-weight: 600; }
.results-updated { font-size: var(--fs-14); line-height: 1.5; max-width: 72ch; }
.results-wrap > .skeleton {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  padding: var(--sp-12) 0 0;
  background: var(--bg-from);
  pointer-events: none;
}
.skeleton-row { display: block; height: 44px; border-radius: var(--radius-sm); flex: none; }
.skeleton-row, .chart-skeleton {
  background: linear-gradient(90deg, var(--skel) 25%, var(--skel-shine) 50%, var(--skel) 75%);
  background-size: 200% 100%;
  animation: tw-shimmer 1.4s ease-in-out infinite;
}
@keyframes tw-shimmer {
  from { background-position: 100% 0; }
  to { background-position: -100% 0; }
}

/* ---------- Data tables (DESIGN §3.1): solid surface, never .panel ---------- */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: var(--radius); }
.table-scroll .data-table { min-width: 640px; }
.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-solid);
  box-shadow: var(--shadow);
  font-variant-numeric: tabular-nums;
  overflow: hidden;
}
.data-table th, .data-table td {
  padding: var(--sp-3) var(--sp-4);
  text-align: left;
  vertical-align: middle;
  border-top: 1px solid var(--line);
}
.data-table thead th {
  border-top: 0;
  font-size: var(--fs-14);
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
}
.data-table tbody th { font-weight: 600; }
.data-table tbody tr { transition: background-color var(--t) var(--ease); }
.data-table tbody tr:hover { background: var(--row-hover); }
.data-table .num { text-align: right; white-space: nowrap; }

/* ---------- Browse sortable column heads (DESIGN §3.1) ----------
   The whole head cell is the link; the active column is accented, hover gives a
   subtle background + underline. Contrast checked against the opaque table
   surface (--surface-solid). */
.data-table thead th.sort-col { padding: 0; }
.sort-link {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-3) var(--sp-4);
  color: var(--text-muted);
  font-size: var(--fs-14);
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: background-color var(--t) var(--ease), color var(--t) var(--ease);
}
.sort-col.num .sort-link { justify-content: flex-end; }
.sort-link:hover { background: var(--row-hover); color: var(--text); text-decoration: underline; }
.sort-col.is-active .sort-link { color: var(--accent); }
.sort-link:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.sort-arrow { fill: currentColor; }

.cell-name a { color: var(--text); font-weight: 600; text-decoration: none; }
.cell-name a:hover { color: var(--accent); text-decoration: underline; }

/* Item names in their in-game quality color (M2h); the class sits on the element
   carrying the name (browse link, item h1, landing top list). Links keep the
   color on hover; common is the normal text color. */
.q-poor, a.q-poor, a.q-poor:hover { color: var(--q-poor); }
.q-common, a.q-common, a.q-common:hover { color: var(--text); }
.q-uncommon, a.q-uncommon, a.q-uncommon:hover { color: var(--q-uncommon); }
.q-rare, a.q-rare, a.q-rare:hover { color: var(--q-rare); }
.q-epic, a.q-epic, a.q-epic:hover { color: var(--q-epic); }
.q-legendary, a.q-legendary, a.q-legendary:hover { color: var(--q-legendary); }
.q-heirloom, a.q-heirloom, a.q-heirloom:hover { color: var(--q-heirloom); }
.q-artifact, a.q-artifact, a.q-artifact:hover { color: var(--q-artifact); }
.price-none { color: var(--text-muted); }

/* Wide/narrow column variants (offers, house comparison; wireframe §2.4 mobile). */
.col-narrow { display: none; }
@media (max-width: 639px) {
  .col-wide { display: none; }
  .col-narrow { display: inline; }
  .data-table th, .data-table td { padding: var(--sp-3); }
}

/* Browse: every row becomes a card below 640 px – same HTML (DESIGN §3.1). */
@media (max-width: 639px) {
  .browse-table, .browse-table tbody { display: block; border: 0; background: none; box-shadow: none; overflow: visible; }
  .browse-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .browse-table tbody { display: grid; gap: var(--sp-3); }
  .browse-table tr {
    position: relative;
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-areas: "name trend" "min median" "qty sales";
    gap: var(--sp-1) var(--sp-3);
    padding: var(--sp-3) var(--sp-4);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface-solid);
    box-shadow: var(--shadow);
  }
  .browse-table th, .browse-table td { display: block; padding: 0; border: 0; text-align: left; }
  .browse-table .cell-name { grid-area: name; min-width: 0; overflow-wrap: anywhere; }
  .browse-table .cell-trend { grid-area: trend; text-align: right; }
  .browse-table .cell-min { grid-area: min; }
  .browse-table .cell-median { grid-area: median; text-align: right; }
  .browse-table .cell-qty { grid-area: qty; }
  .browse-table .cell-sales { grid-area: sales; text-align: right; }
  .browse-table td[data-label]::before {
    content: attr(data-label) " ";
    color: var(--text-muted);
    font-size: var(--fs-14);
  }
  /* whole card is the link */
  .browse-table .cell-name a::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius); }
  .browse-table .cell-name a:focus-visible { outline: none; }
  .browse-table .cell-name a:focus-visible::after { outline: 2px solid var(--accent); outline-offset: 2px; }
}

/* ---------- Trend: neutral color on purpose (DESIGN §3.6) ---------- */
.trend { display: inline-flex; align-items: baseline; gap: var(--sp-1); white-space: nowrap; font-variant-numeric: tabular-nums; }
.trend > [aria-hidden="true"] { color: var(--text-muted); font-size: 0.8em; }
.trend-na { color: var(--text-muted); }

/* ---------- Pagination ---------- */
.pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  margin-top: var(--sp-6);
}
.pager-pages { display: flex; gap: var(--sp-1); list-style: none; margin: 0; padding: 0; }
.pager-step, .pager-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-1);
  min-width: 44px;
  min-height: 44px;
  padding: 0 var(--sp-3);
  border: 1px solid var(--line-control);
  border-radius: var(--radius-sm);
  background: var(--surface-strong);
  color: var(--text);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  text-decoration: none;
  transition: border-color var(--t) var(--ease), color var(--t) var(--ease), transform var(--t) var(--ease);
}
a.pager-step:hover, a.pager-num:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-1px); }
.pager-num.is-current {
  border-color: transparent;
  background: linear-gradient(180deg, var(--gold-light), var(--gold-dark));
  color: var(--accent-contrast);
}
.is-disabled { opacity: 0.45; cursor: not-allowed; }
.pager-gap { display: inline-flex; align-items: center; justify-content: center; min-width: 32px; color: var(--text-muted); }
.pager-status { display: none; color: var(--text-muted); font-size: var(--fs-14); }
@media (max-width: 639px) {
  .pager { justify-content: space-between; }
  .pager-pages { display: none; }
  .pager-status { display: inline; }
}

/* ---------- Category browser (M2i-C2): tree card left from 960 px, table right ---------- */
.cat-layout { display: grid; gap: var(--sp-6); align-items: start; --cat-row: 44px; --cat-tw: 44px; }
.cat-main { min-width: 0; }
.cat-tree { padding: var(--sp-2); }
.cat-list { list-style: none; margin: 0; padding: 0; }
.cat-list .cat-list { padding-left: var(--cat-tw); }
/* Link and expander are two controls on one row: the <details> spans the whole
   item (so its child list nests below), the link sits over the summary's right. */
.cat-item { display: grid; grid-template-columns: var(--cat-tw) minmax(0, 1fr); }
.cat-link {
  grid-column: 2;
  grid-row: 1;
  z-index: 1;
  align-self: start;
  display: flex;
  align-items: center;
  min-height: var(--cat-row);
  padding: 0 var(--sp-3) 0 var(--sp-1);
  color: var(--text);
  line-height: 1.25;
  overflow-wrap: anywhere;
  text-decoration: none;
  border-radius: var(--radius-sm);
}
.cat-link:hover { color: var(--accent); background: var(--row-hover); }
.cat-link[aria-current="true"] {
  color: var(--text);
  font-weight: 700;
  background: color-mix(in srgb, var(--accent) 18%, transparent);
  box-shadow: inset 3px 0 0 var(--accent);
}
.cat-sub { grid-column: 1 / -1; grid-row: 1; }
.cat-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--cat-tw);
  height: var(--cat-row);
  cursor: pointer;
  list-style: none;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
}
.cat-toggle::-webkit-details-marker { display: none; }
.cat-toggle::before { content: "▸"; font-size: var(--fs-14); transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1); }
.cat-sub[open] > .cat-toggle::before { transform: rotate(90deg); }
.cat-toggle:hover { background: var(--row-hover); }
.cat-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--sp-2) var(--sp-4); margin-bottom: var(--sp-3); }
.cat-path { margin: 0; font-size: var(--fs-19); }
.cat-sep { margin: 0 var(--sp-2); color: var(--text-muted); }
.cat-all { display: inline-flex; align-items: center; min-height: 44px; }
@media (min-width: 960px) {
  .cat-layout { grid-template-columns: 300px minmax(0, 1fr); --cat-row: 36px; --cat-tw: 32px; }
  .cat-tree {
    position: sticky;
    top: calc(var(--header-h) + var(--sp-4));
    max-height: calc(100vh - var(--header-h) - var(--sp-8));
    overflow-y: auto;
  }
}
/* Own row for the main navigation from 520 px down: with three entries
   (Items, Categories, Account) the single row needs about 500 px (Segoe UI,
   incl. scrollbar). The nav gap follows the 8 px header gap there, so the
   three entries still fit at 320 px. */
@media (max-width: 519px) {
  .header-inner { flex-wrap: wrap; }
  .main-nav { order: 3; flex: 1 0 100%; gap: var(--sp-2); }
}

/* ---------- Empty state (DESIGN §3.7) ---------- */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-12) var(--sp-6);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  background: var(--surface-strong);
  text-align: center;
}
.empty-state p { margin: 0; max-width: 52ch; }
.empty-glyph { font-size: var(--fs-34); line-height: 1; color: var(--accent-2); }
.empty-title { font-size: var(--fs-19); font-weight: 700; }
.empty-note { font-size: var(--fs-14); }
.empty-state .btn { margin-top: var(--sp-3); }

/* ---------- Error page search ("item unknown") ---------- */
.error-search { margin: var(--sp-6) auto; text-align: left; }

/* ---------- Item head, house badge + switch (DESIGN §3.4) ---------- */
.item-head { margin-bottom: var(--sp-6); }
.item-head h1 { overflow-wrap: anywhere; }
.item-name-note {
  display: block;
  margin: var(--sp-1) 0 0;
  font-size: var(--fs-14);
  font-weight: 400;
  line-height: 1.4;
  color: var(--text-muted);
}
.item-head .item-name-note { margin: 0 0 var(--sp-3); }
.item-meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-3) var(--sp-4); }
.item-updated { margin: var(--sp-2) 0 0; font-size: var(--fs-14); line-height: 1.5; max-width: 72ch; }
.house-badge {
  --faction: var(--faction-neutral);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: var(--sp-1) var(--sp-3);
  border: 1px solid color-mix(in srgb, var(--faction) 55%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--faction) 10%, transparent);
  color: var(--faction);
  font-size: var(--fs-14);
  font-weight: 700;
  white-space: nowrap;
}
.house-alliance { --faction: var(--faction-alliance); }
.house-horde { --faction: var(--faction-horde); }
.house-neutral { --faction: var(--faction-neutral); }
.house-glyph { width: 14px; height: 14px; flex: none; }
.house-switch { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2); }
.house-switch label { font-size: var(--fs-14); font-weight: 600; color: var(--text-muted); }
@media (max-width: 639px) {
  .house-switch { flex: 1 1 100%; }
  .house-switch select { flex: 1 1 auto; width: 100%; }
}

/* ---------- Stat tiles (DESIGN §3.6) ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--sp-3);
  margin: 0;
}
@media (min-width: 768px) {
  .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--sp-4); }
  .item-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
  .stat-median { order: -1; } /* mobile order: median first (wireframe §2.4) */
  .item-stats .stat-week { grid-column: 1 / -1; } /* 9th tile spans full width on 2-col mobile */
}
.stat {
  padding: var(--sp-4);
  border-radius: var(--radius);
  transition: transform var(--t) var(--ease), box-shadow var(--t) var(--ease);
}
.stat:hover { transform: translateY(-2px); box-shadow: inset 0 1px 0 var(--highlight), var(--shadow-lg); }
.stat:hover, .stat:focus-within { position: relative; z-index: 30; }
.stat dt {
  display: flex;
  align-items: center;
  gap: var(--sp-1);
  font-size: var(--fs-14);
  font-weight: 600;
  color: var(--text-muted);
}
.stat dd {
  margin: var(--sp-1) 0 0;
  font-size: var(--fs-19);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
@media (min-width: 1024px) { .stat dd { font-size: var(--fs-23); } }
.stat-sub { display: block; font-size: var(--fs-14); font-weight: 400; color: var(--text-muted); }
.help-wrap { position: relative; display: inline-flex; align-items: center; }
.help {
  cursor: help;
  color: var(--text-muted);
  font-weight: 400;
  border-radius: var(--radius-sm);
  line-height: 1;
  transition: color var(--t) var(--ease);
}
.help:hover, .help:focus-visible { color: var(--accent); }
.help-tip {
  position: absolute;
  top: calc(100% + var(--sp-2));
  left: 50%;
  transform: translateX(-50%) translateY(-2px);
  z-index: 20;
  width: max-content;
  max-width: min(26ch, calc(100vw - var(--sp-8)));
  padding: var(--sp-2) var(--sp-3);
  border: 1px solid var(--line-control);
  border-radius: var(--radius-sm);
  background: var(--surface-solid);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: var(--fs-14);
  font-weight: 400;
  line-height: 1.45;
  text-align: left;
  white-space: normal;
  box-shadow: var(--shadow-lg);
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--t) var(--ease), transform var(--t) var(--ease), visibility 0s linear var(--t);
}
.help-wrap:hover .help-tip,
.help:focus-visible + .help-tip,
.help:focus + .help-tip {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
  transition: opacity var(--t) var(--ease), transform var(--t) var(--ease), visibility 0s;
}
.data-table thead th .help-wrap { margin-left: var(--sp-1); }
.js .help-tip.is-fixed {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 40;
  transform: translateY(-2px);
}
.js .help-tip.is-fixed.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
  transition: opacity var(--t) var(--ease), transform var(--t) var(--ease), visibility 0s;
}

/* ---------- Browse: item icon + in-game style tooltip (DESIGN §1 P2) ----------
   Only rendered when an icon exists (no placeholder). The tooltip reuses
   .help-tip (opaque --surface-solid, portalled by tip.js out of the
   overflow:hidden table). Without JS the .help-wrap-style fallback below shows
   it in place (may be clipped by the table, like the header ⓘ hints). */
/* vertical-align: top, not middle: the wrapper is exactly one text line high
   (the name link sets its height, the icon's negative margins keep it inside),
   so top alignment sits it flush in the cell's line box. "middle" shifts it by
   half the x-height against the strut and grows the row by ~2px. */
.name-with-icon { display: inline-flex; align-items: center; gap: var(--sp-2); max-width: 100%; vertical-align: top; }
.name-with-icon > a { min-width: 0; }
.item-tip-wrap { position: relative; display: inline-flex; flex: none; }
.item-icon-trigger:focus + .help-tip {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}
@media (hover: hover) {
  .item-tip-wrap:hover .help-tip { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }
}
/* Negative block margins on the flex child: the 22px icon takes less than one
   text line, so the wrapper stays one line high; together with vertical-align:
   top above, rows with and without icon measure exactly the same height in the
   table and the mobile cards (the trigger keeps its full box for the focus ring). */
.name-with-icon > .item-icon, .item-tip-wrap { margin-block: -4px; }
.item-icon {
  display: block;
  flex: none;
  box-sizing: border-box;
  width: 22px;
  height: 22px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface-strong);
}
.item-icon-trigger { display: inline-flex; border-radius: 4px; cursor: help; }
.item-icon-trigger:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.help-tip.item-tip {
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-width: min(36ch, calc(100vw - var(--sp-8)));
  padding: var(--sp-3);
}
/* No color here: the quality class (.q-*, common → --text) on the name sets it. */
.item-tip-name { font-size: var(--fs-16); font-weight: 700; }
.item-tip-split { display: flex; justify-content: space-between; gap: var(--sp-4); }
/* Equip/Use lines: in-game green (same token as positive deltas), no own font */
.item-tip-effect { color: var(--ok); }
.item-tip-desc { margin-top: var(--sp-1); color: var(--text-muted); font-style: italic; }
/* short open delay against flicker while the pointer crosses the column */
.js .item-tip.is-fixed.is-open {
  transition: opacity var(--t) var(--ease) 150ms, transform var(--t) var(--ease) 150ms, visibility 0s 150ms;
}
/* Mobile row card: the name link covers the card (a::after); with a real
   pointer the icon sits above it so hover reaches the trigger. */
@media (max-width: 639px) and (hover: hover) {
  .browse-table .item-tip-wrap { position: relative; z-index: 1; }
}

/* ---------- Chart (DESIGN §3.3): fixed height, skeleton until ready ---------- */
.chart-range {
  display: inline-flex;
  gap: 2px;
  padding: 2px;
  border: 1px solid var(--line-control);
  border-radius: var(--radius-sm);
  background: var(--surface-strong);
}
.chart-range button {
  min-height: 40px;
  min-width: 44px;
  padding: 0 var(--sp-4);
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text-muted);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: background-color var(--t) var(--ease), color var(--t) var(--ease);
}
.chart-range button:hover { color: var(--text); }
.chart-range button[aria-pressed="true"] { background: var(--accent); color: var(--accent-contrast); }
.chart {
  position: relative;
  height: 408px; /* 260 px main + 100 px bars + padding (wireframe §2.4 mobile) */
  padding: 0;
  border: 1px solid var(--line);
  background: var(--surface-strong);
  box-shadow: var(--shadow);
  overflow: hidden;
}
@media (min-width: 640px) { .chart { height: 528px; } } /* 360 px + 120 px + padding */
.chart-canvas, .chart-skeleton { position: absolute; inset: var(--sp-4); }
.chart-skeleton {
  display: grid;
  place-items: center;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: var(--fs-14);
}
.chart.is-ready .chart-skeleton { display: none; }
.chart.is-error .chart-skeleton { animation: none; background: var(--skel); }
.chart-error {
  position: absolute;
  top: var(--sp-3);
  right: var(--sp-3);
  z-index: 1;
  margin: 0;
  padding: var(--sp-1) var(--sp-3);
  border-radius: var(--radius-sm);
  background: var(--warn-bg);
  color: var(--warn-text);
  font-size: var(--fs-14);
  font-weight: 600;
}
.history-table { margin-top: var(--sp-4); }
.history-table > summary {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--accent);
  font-weight: 600;
  cursor: pointer;
}
.history-table[open] > summary { margin-bottom: var(--sp-3); }

/* ---------- Offers, house comparison ---------- */
.offers-table tbody th { font-weight: 700; } /* unit price is the row key */
.houses-table a { text-decoration: none; }
.houses-table a:hover .house-badge { border-color: var(--faction); }
.houses-table tr.is-current { background: color-mix(in srgb, var(--accent) 9%, transparent); }
.houses-table tr.is-current th:first-child { box-shadow: inset 3px 0 0 var(--accent); }
.cheapest { margin-left: var(--sp-2); color: var(--accent); }

/* ---------- Account (M3a) ---------- */
.account-card { max-width: 560px; margin: var(--sp-6) auto 0; }
.account-form { display: grid; gap: var(--sp-4); margin-top: var(--sp-4); }
.account-actions { display: flex; flex-wrap: wrap; gap: var(--sp-3); margin-top: var(--sp-2); }
.account-alert { border-radius: var(--radius-sm); margin-bottom: var(--sp-4); font-weight: 600; }
.account-notice { margin-top: var(--sp-4); border-radius: var(--radius-sm); background: var(--surface-strong); }
.account-meta { display: grid; gap: var(--sp-3); margin: var(--sp-4) 0 var(--sp-6); padding: 0; }
.account-meta dt { font-size: var(--fs-14); font-weight: 600; color: var(--text-muted); margin-bottom: var(--sp-1); }
.account-meta dd { margin: 0; font-family: var(--font-ui); }
.coupling-code {
  display: inline-block;
  padding: var(--sp-2) var(--sp-3);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-solid);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: var(--fs-19);
  font-weight: 700;
  letter-spacing: 0.08em;
}
.account-logout { margin-top: var(--sp-6); padding-top: var(--sp-4); border-top: 1px solid var(--line); }

/* ---------- Account dashboard (M3d): credit | devices, then uploads and settings full width ---------- */
.account-dash { display: grid; gap: var(--sp-6); margin-top: var(--sp-6); }
@media (min-width: 1024px) {
  .account-dash { grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); align-items: start; }
  .account-wide { grid-column: 1 / -1; }
}
/* Sections are grid items: min-width 0 lets the upload table scroll inside its card instead of
   widening the column. */
.account-credit, .account-devices, .account-uploads { min-width: 0; }
/* In-page jump targets (href="#couple"): scroll-margin is not inherited, so it must sit on the
   target itself and exceed the sticky header (height + 1px border) — guarded by TestCSSAnchorTargetsClearStickyHeader. */
.account-couple { scroll-margin-top: calc(var(--header-h) + var(--sp-6)); }
.account-head h1 { margin: 0 0 var(--sp-3); line-height: 1.1; }
.account-head .lead { margin: 0; max-width: 65ch; }
.account-dash h2 { margin: 0 0 var(--sp-4); font-size: var(--fs-28); line-height: 1.2; }
.account-dash .account-alert { margin-bottom: 0; }
.account-subtitle { margin: var(--sp-6) 0 var(--sp-3); font-size: var(--fs-19); line-height: 1.2; }
.account-empty { margin: 0; }
.account-cta { justify-content: center; margin-top: var(--sp-4); }

.credit-figure { margin: 0 0 var(--sp-3); }
.account-credit-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--sp-2) var(--sp-3); margin-bottom: var(--sp-4); }
.account-credit-head h2 { margin: 0; overflow-wrap: anywhere; }
.credit-figure .figure-value { font-size: var(--fs-hero); }
.ledger-list { display: grid; margin: 0; padding: 0; list-style: none; }
.ledger-list li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--sp-3);
  padding: var(--sp-2) 0;
  border-bottom: 1px solid var(--line);
}
.ledger-list li:last-child { border-bottom: 0; }
.ledger-reason { display: flex; flex-direction: column; gap: 2px; }
.ledger-reason time { color: var(--text-muted); font-size: var(--fs-14); }
.ledger-delta { color: var(--ok); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ledger-delta.is-debit { color: var(--text-muted); }

.device-list { display: grid; gap: var(--sp-3); margin: 0; padding: 0; list-style: none; }
.device {
  padding: var(--sp-4);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-strong);
  transition: transform var(--t) var(--ease), box-shadow var(--t) var(--ease);
}
.device:hover { transform: translateY(-2px); box-shadow: inset 0 1px 0 var(--highlight), var(--shadow); }
.device-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--sp-2); }
.device-name { font-size: var(--fs-19); overflow-wrap: anywhere; }
.device-meta { display: grid; gap: var(--sp-3); margin: var(--sp-3) 0 0; }
@media (min-width: 640px) { .device-meta { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.device-meta dt { margin-bottom: var(--sp-1); color: var(--text-muted); font-size: var(--fs-14); font-weight: 600; }
.device-meta dd { margin: 0; }
.device-fp { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: var(--fs-14); }
.account-couple { margin-top: var(--sp-6); border-top: 1px solid var(--line); }
.couple-steps { display: grid; gap: var(--sp-2); margin: 0 0 var(--sp-4); padding-left: var(--sp-6); }

.badge-warn {
  padding: 2px var(--sp-3);
  border-color: var(--warn-text);
  color: var(--warn-text);
  background: var(--warn-bg);
  font-size: 0.8125rem;
}
.uploads-table td { vertical-align: top; }
.upload-reason { display: block; margin-top: var(--sp-1); color: var(--text-muted); font-size: var(--fs-14); }

.settings-grid { display: grid; gap: var(--sp-6); }
@media (min-width: 768px) { .settings-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; } }
.account-settings .account-meta, .account-settings .account-form { margin: 0; }

/* ---------- Account: TradeWood_Data download card (PLAN §12.8) ----------
   Full-width card after the credit/devices row: the ZIP is not account data,
   but it belongs to the signed-in surface. The ornament sits inside the card
   between the intro and the download action. */
.account-dataaddon { min-width: 0; }
.account-dataaddon-head { display: flex; align-items: flex-start; gap: var(--sp-4); margin-bottom: var(--sp-3); }
.account-dataaddon-copy { min-width: 0; }
.account-dataaddon-copy h2 { margin: 0; font-size: var(--fs-28); line-height: 1.2; overflow-wrap: anywhere; }
.account-dataaddon-intro { max-width: 70ch; margin: 0; }
.account-dataaddon-note { margin: var(--sp-2) 0 0; font-size: var(--fs-14); }
.account-dataaddon .ornament { margin-top: var(--sp-6); }
.account-dataaddon-size { font-size: var(--fs-14); font-variant-numeric: tabular-nums; }
.account-dataaddon-hint, .account-dataaddon-unavailable {
  max-width: 70ch;
  margin: var(--sp-4) 0 0;
  font-size: var(--fs-14);
  /* The WoW path has no spaces: break it anywhere so the card never widens the
     mobile viewport (DESIGN §9: no horizontal scrollbar at 360 px). */
  overflow-wrap: anywhere;
}

/* ---------- Account trade book (M4 frontend) ---------- */
.tradebook, .prognosis, .vendor-deals { display: grid; gap: var(--sp-6); margin-top: var(--sp-6); }
.tradebook-section, .prognosis-section, .vendor-deals-section { min-width: 0; }
.tradebook-section h2, .prognosis-section h2, .vendor-deals-section h2 { margin: 0 0 var(--sp-4); font-size: var(--fs-28); line-height: 1.2; }
.tradebook-kpis { margin: 0; }
.tradebook-gated, .tradebook-empty, .tradebook-plausibility,
.prognosis-gated, .prognosis-insufficient, .prognosis-rule, .prognosis-confidence,
.vendor-deals-gated, .vendor-deals-empty { max-width: 720px; }
.tradebook-flips-table, .tradebook-events-table, .tradebook-inventory-table, .vendor-deals-table { width: 100%; }
.tradebook-inventory-list { min-width: 0; }
.tradebook-inventory-grid { display: grid; gap: var(--sp-4); }
@media (min-width: 768px) { .tradebook-inventory-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.tradebook-plausibility-grid, .prognosis-figures { display: grid; gap: var(--sp-3); margin: 0 0 var(--sp-4); padding: 0; }
@media (min-width: 640px) {
  .tradebook-plausibility-grid, .prognosis-figures { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.tradebook-plausibility-grid dt, .prognosis-figures dt { margin-bottom: var(--sp-1); color: var(--text-muted); font-size: var(--fs-14); font-weight: 600; }
.tradebook-plausibility-grid dd, .prognosis-figures dd { margin: 0; font-size: var(--fs-19); font-weight: 700; font-variant-numeric: tabular-nums; }

/* ---------- Account weekday prognosis (M4b frontend): the trade book's card and grid rhythm;
   the weekday table keeps the solid data surface. The buy/sell rows carry the same accent bar as
   the current row of the item's house table (DESIGN §3.4). ---------- */
.prognosis-head h1, .vendor-deals-head h1 { overflow-wrap: anywhere; }
/* Opaque panel behind the house badge text on the card head: the faction tint
   alone would not keep all three labels ≥ 4.5:1, the solid --surface-solid fill
   does (TestPrognosisContrast). */
.prognosis-head .house-badge, .vendor-deals-head .house-badge {
  background: var(--surface-solid);
  border-color: color-mix(in srgb, var(--faction) 55%, var(--surface-solid));
}
.prognosis-house, .vendor-deals-house { margin-top: var(--sp-4); }
.prognosis-confidence { border-left: 4px solid var(--accent); }
.prognosis-confidence p { margin: 0; }
.prognosis-rule-text { font-size: var(--fs-19); }
.prognosis-table { width: 100%; }
.prognosis-table tbody th { white-space: nowrap; }
.prognosis-table tbody th .badge { margin-left: var(--sp-2); }
.prognosis-table tr.is-buy th:first-child, .prognosis-table tr.is-sell th:first-child { box-shadow: inset 3px 0 0 var(--accent); }
.prognosis-summary { display: flex; flex-wrap: wrap; gap: 0 var(--sp-3); font-variant-numeric: tabular-nums; }
.prognosis-source { margin: calc(-1 * var(--sp-2)) 0 var(--sp-3); font-size: var(--fs-14); }
.prognosis-combined-grid { display: grid; gap: var(--sp-4); }
@media (min-width: 640px) {
  .prognosis-combined-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.prognosis-slot { min-width: 0; }
.prognosis-slot-cheap { border-left: 4px solid var(--accent); }
.prognosis-slot-expensive { border-left: 4px solid var(--warn-text); }
.prognosis-slot-time { margin: var(--sp-2) 0 var(--sp-4); font-size: var(--fs-19); font-weight: 700; overflow-wrap: anywhere; }
.prognosis-slot-figures { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-3); margin: 0 0 var(--sp-3); padding: 0; }
.prognosis-slot-figures dt { margin-bottom: var(--sp-1); color: var(--text-muted); font-size: var(--fs-14); font-weight: 600; }
.prognosis-slot-figures dd { margin: 0; font-size: var(--fs-19); font-weight: 700; font-variant-numeric: tabular-nums; }
.prognosis-slot-samples { margin: 0; font-size: var(--fs-14); font-variant-numeric: tabular-nums; }
.prognosis-combined-pending { max-width: 720px; border-left: 4px solid var(--accent-2); }
.prognosis-combined-pending p:last-child { margin-bottom: 0; }

/* ---------- Item page: teaser of the premium weekday prognosis (M4b frontend) ---------- */
.item-prognosis { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--sp-4); margin: var(--sp-8) 0 0; }
.item-prognosis-copy { flex: 1 1 320px; min-width: 0; }
.item-prognosis-copy p + p { margin-top: var(--sp-2); }
.item-prognosis .btn { flex: none; }

/* ---------- Item page: AI analysis (M4d frontend) ---------- */
.item-ai { margin: var(--sp-8) 0 0; }
.item-ai-head { display: flex; align-items: center; gap: var(--sp-3); margin-bottom: var(--sp-3); min-width: 0; }
.item-ai-head .icon { flex: none; color: var(--accent); }
.item-ai-head h2 { margin: 0; font-size: var(--fs-28); line-height: 1.2; overflow-wrap: anywhere; min-width: 0; }
.item-ai-text { margin: 0 0 var(--sp-3); max-height: 26rem; overflow-y: auto; white-space: pre-line; overflow-wrap: anywhere; color: var(--text); }
.item-ai-meta, .item-ai-note, .item-ai-lang { margin: 0 0 var(--sp-2); font-size: var(--fs-14); }
.item-ai-stale { margin: 0 0 var(--sp-3); padding: var(--sp-3) var(--sp-4); border-left: 3px solid var(--accent-2); border-radius: var(--radius-sm); background: var(--surface-strong); color: var(--text-muted); overflow-wrap: anywhere; }
.item-ai-state { margin: 0; }
.item-ai-state-title { margin: 0 0 var(--sp-2); font-weight: 700; overflow-wrap: anywhere; }
.item-ai-state p { margin: 0 0 var(--sp-3); }
.item-ai-state .account-actions { margin-top: 0; }

/* ---------- Account watchlist / price alerts (M4c frontend) ---------- */
.watchlist { display: grid; gap: var(--sp-6); margin-top: var(--sp-6); }
.wl-list-area, .wl-section, .wl-inventory, .wl-create, .wl-consent-wrap { min-width: 0; }
.wl-section h2, .wl-inventory h2, .wl-create h2, .wl-consent h2, .wl-card-head h2 { margin: 0 0 var(--sp-2); font-size: var(--fs-28); line-height: 1.2; overflow-wrap: anywhere; }
.wl-head-top, .wl-card-head { display: flex; align-items: flex-start; gap: var(--sp-4); margin-bottom: var(--sp-3); }
.wl-head-copy, .wl-card-head > div { min-width: 0; }
.wl-head h1, .wl-gated h2, .wl-empty h2, .wl-consent-page h1 { overflow-wrap: anywhere; }
.wl-head h1 { margin: 0; }
.wl-card-intro { margin: 0; overflow-wrap: anywhere; }
.wl-meta-line { display: flex; flex-wrap: wrap; gap: var(--sp-1) var(--sp-2); margin: var(--sp-3) 0 0; font-size: var(--fs-14); font-variant-numeric: tabular-nums; }
.wl-gated, .wl-empty, .wl-consent { max-width: 720px; }
.wl-feedback { margin: 0 0 var(--sp-4); }
.wl-consent-hint { margin: 0 0 var(--sp-4); }
.wl-table { width: 100%; }
.wl-table .house-badge {
  background: var(--surface-solid);
  border-color: color-mix(in srgb, var(--faction) 55%, var(--surface-solid));
}
.wl-row-paused td, .wl-row-paused th { opacity: 0.78; }
.wl-rule-cell { white-space: nowrap; }
.wl-rule-dir { display: block; font-size: var(--fs-14); color: var(--text-muted); }
.wl-mail-cell { white-space: nowrap; font-size: var(--fs-14); }
.wl-actions-cell { min-width: 200px; }
.wl-row-actions { display: flex; flex-wrap: wrap; align-items: flex-start; gap: var(--sp-2); }
.wl-inline-form { display: inline-flex; margin: 0; }
.wl-btn-sm { min-height: 44px; padding: 0 var(--sp-3); font-size: var(--fs-14); }
.wl-disclosure > summary { list-style: none; }
.wl-disclosure > summary::-webkit-details-marker { display: none; }
.wl-confirm { position: relative; }
.wl-edit-form {
  display: grid;
  gap: var(--sp-3);
  margin-top: var(--sp-2);
  padding: var(--sp-3);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-strong);
  min-width: 220px;
}
.wl-confirm-box {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-2);
  margin-top: var(--sp-2);
  padding: var(--sp-2) var(--sp-3);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-strong);
}
.wl-confirm-text { font-size: var(--fs-14); font-weight: 600; color: var(--text); }

/* Create grid: inventory picker + free search/create side by side from 960 px */
.wl-create-grid { display: grid; gap: var(--sp-6); align-items: start; }
@media (min-width: 960px) {
  .wl-create-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* In-page jump targets clear the sticky header (TestCSSAnchorTargetsClearStickyHeader). */
.wl-inventory, .wl-create, .wl-consent-wrap { scroll-margin-top: calc(var(--header-h) + var(--sp-6)); }
.wl-inv-stamp { margin: 0 0 var(--sp-4); font-size: var(--fs-14); }
.wl-inv-list, .wl-search-list { display: grid; gap: var(--sp-2); margin: 0; padding: 0; list-style: none; }
.wl-inv-item, .wl-search-hit {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-2) var(--sp-3);
  padding: var(--sp-3);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-strong);
}
.wl-inv-info, .wl-search-hit-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1 1 160px; }
.wl-inv-name { font-weight: 600; overflow-wrap: anywhere; }
.wl-inv-meta { display: flex; flex-wrap: wrap; gap: var(--sp-1); font-size: var(--fs-14); font-variant-numeric: tabular-nums; }
.wl-search-form { margin-bottom: var(--sp-3); }
.wl-search-row { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.wl-search-row input[type="search"] { flex: 1 1 180px; min-width: 0; padding-left: var(--sp-3); }
.wl-search-results { margin-bottom: var(--sp-4); }
.wl-search-msg { margin: 0; font-size: var(--fs-14); }
.wl-form { margin-top: 0; }
.wl-selected-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: var(--sp-3);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-strong);
}
.wl-selected-label { font-size: var(--fs-14); font-weight: 600; color: var(--text-muted); }
.wl-selected-name { font-size: var(--fs-16); overflow-wrap: anywhere; }
.wl-form-pair { display: grid; gap: var(--sp-3); }
@media (min-width: 640px) {
  .wl-form-pair { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.wl-form-pair select { width: 100%; }
.wl-price-fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
.wl-price-fieldset legend { margin-bottom: var(--sp-2); font-size: var(--fs-14); font-weight: 600; color: var(--text-muted); }
.wl-coin-inputs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--sp-2); }
.wl-coin-inputs input[type="number"] { min-width: 0; padding: 0 var(--sp-2); }
.wl-consent-status { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2) var(--sp-3); margin-bottom: var(--sp-4); }
.wl-consent-status p { margin: 0; overflow-wrap: anywhere; }
.wl-consent-status:last-child, .wl-consent .account-notice:last-child { margin-bottom: 0; }
.wl-consent-page { text-align: center; }
.wl-consent-icon { margin: 0 auto var(--sp-4); }

/* ---------- Account license / Premium (M5b frontend) ---------- */
.license { display: grid; gap: var(--sp-6); margin-top: var(--sp-6); }
.lic-main { display: grid; gap: var(--sp-6); min-width: 0; }
.lic-head-top, .lic-card-head { display: flex; align-items: flex-start; gap: var(--sp-4); margin-bottom: var(--sp-3); }
.lic-head-copy, .lic-card-head > div, .lic-status, .lic-unavailable, .lic-redeem, .lic-queue, .lic-shop { min-width: 0; }
.lic-head h1, .lic-status h2, .lic-unavailable h2, .lic-redeem h2, .lic-queue h2, .lic-shop h2, .lic-card-head h2 {
  margin: 0 0 var(--sp-2);
  line-height: 1.2;
  overflow-wrap: anywhere;
}
.lic-status h2, .lic-unavailable h2, .lic-redeem h2, .lic-queue h2, .lic-shop h2 { font-size: var(--fs-28); }
.lic-head h1 { margin: 0; }
.lic-card-head .badge { margin-bottom: var(--sp-2); }
.lic-card-intro, .lic-status-body, .lic-credit-preserved, .lic-rule-note, .lic-feedback { overflow-wrap: anywhere; }
.lic-card-intro { margin: 0; }
.lic-feedback { margin: 0; }
.lic-status-head, .lic-queue-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-2) var(--sp-3);
  margin-bottom: var(--sp-3);
}
.lic-status-head h2, .lic-queue-head h2 { margin: 0; }
.lic-status-body { margin: 0 0 var(--sp-3); }
.lic-credit-preserved { margin: var(--sp-3) 0 0; font-weight: 600; }
.lic-rule-note { margin: var(--sp-3) 0 0; font-size: var(--fs-14); }
.lic-active-meta { display: grid; gap: var(--sp-3); margin: var(--sp-4) 0 0; padding: var(--sp-4); border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-strong); }
@media (min-width: 640px) {
  .lic-active-meta { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.lic-active-meta dt { margin-bottom: var(--sp-1); color: var(--text-muted); font-size: var(--fs-14); font-weight: 600; }
.lic-active-meta dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.lic-masked-key {
  display: inline-block;
  padding: 2px var(--sp-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-solid);
  color: var(--text);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: var(--fs-14);
  font-weight: 600;
  white-space: nowrap;
}
.lic-unavailable { max-width: 720px; }
.lic-grid { display: grid; gap: var(--sp-6); align-items: start; }
@media (min-width: 960px) {
  .lic-grid { grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); }
}
.lic-form { margin-top: var(--sp-4); }
.lic-form input[type="text"] { width: 100%; min-width: 0; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.lic-queue-count { margin: 0; font-size: var(--fs-14); font-variant-numeric: tabular-nums; }
.lic-empty { margin-top: var(--sp-4); }
.lic-table { width: 100%; margin-top: var(--sp-4); }
.lic-pos-cell { white-space: nowrap; font-variant-numeric: tabular-nums; }
.lic-pos-num { font-weight: 700; }
.lic-status-cell { min-width: 140px; }
.lic-fail-reason { display: block; margin-top: var(--sp-1); color: var(--text-muted); font-size: var(--fs-14); overflow-wrap: anywhere; }
.lic-date-cell { white-space: nowrap; font-size: var(--fs-14); }
.lic-actions-cell { min-width: 140px; }
.lic-inline-form { display: inline-flex; margin: 0; }
.lic-btn-sm { min-height: 44px; padding: 0 var(--sp-3); font-size: var(--fs-14); }
.lic-disclosure > summary { list-style: none; }
.lic-disclosure > summary::-webkit-details-marker { display: none; }
.lic-confirm { position: relative; }
.lic-confirm-box {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-2);
  margin-top: var(--sp-2);
  padding: var(--sp-2) var(--sp-3);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-strong);
}
.lic-confirm-text { font-size: var(--fs-14); font-weight: 600; color: var(--text); }
.lic-shop-grid { display: grid; gap: var(--sp-4); margin-top: var(--sp-4); }
@media (min-width: 768px) {
  .lic-shop-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- UI stack (DESIGN §6.4): small controls, labels and numeric data.
   Serif old-style figures hurt scanning in tables, so data stays on --font-ui. */
.main-nav, .lang-switch, .eyebrow, .breadcrumbs, .badge, .house-badge, .trust-line,
.search-label, .figure-label, .filter-bar, .house-switch, .chart-range, .chart-error,
.history-table > summary, .results-head, .table-foot, .item-updated, .data-table,
.stats, .stats-bar, .price, .pager, .site-footer, .skip-link, .account-meta dt,
.device-meta dt, .ledger-list, .upload-reason, .installer-meta,
.tradebook-plausibility-grid, .prognosis-figures, .prognosis-source, .prognosis-slot-figures, .prognosis-slot-samples, .wl-meta-line, .wl-inv-meta,
.wl-selected-item, .wl-price-fieldset legend, .wl-confirm-text, .wl-rule-dir,
.pricing-meta, .pricing-pay-hint, .pricing-fineprint,
.lic-active-meta, .lic-queue-count, .lic-fail-reason, .lic-confirm-text, .lic-pos-num, .lic-rule-note {
  font-family: var(--font-ui);
}

/* ---------- Account recommendations (M4e frontend): the account pages' card rhythm.
   The slot list is the solid data table from 1024 px up (it fits its container
   there without an inner scrollbar: the item column wraps, the narrow value
   columns stay nowrap); below 1024 px every row becomes a card (same HTML,
   cell labels via data-label) — checked in the browser at 360/768/1024/1440. ---------- */
.recommendations { display: grid; gap: var(--sp-6); margin-top: var(--sp-6); }
.recommendations-section, .reco-notes { min-width: 0; }
.recommendations-section h2, .reco-notes h2 { margin: 0 0 var(--sp-4); font-size: var(--fs-28); line-height: 1.2; overflow-wrap: anywhere; }
.reco-head-top { display: flex; align-items: flex-start; gap: var(--sp-4); margin-bottom: var(--sp-3); }
.reco-head-copy { min-width: 0; }
.reco-head h1, .reco-gated h2 { margin: 0; overflow-wrap: anywhere; }
.reco-head .item-meta { margin: 0 0 var(--sp-3); }
.reco-meta-line { display: flex; flex-wrap: wrap; gap: var(--sp-1) var(--sp-2); margin: var(--sp-3) 0 0; font-size: var(--fs-14); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
/* Opaque panel behind the house badge text on the card head (as prognosis/vendor
   deals): the faction tint alone would not keep all three labels ≥ 4.5:1. */
.reco-head .house-badge {
  background: var(--surface-solid);
  border-color: color-mix(in srgb, var(--faction) 55%, var(--surface-solid));
}
.reco-gated, .reco-unavailable, .reco-empty, .reco-notes { max-width: 720px; }
.reco-notes p { margin: 0 0 var(--sp-3); overflow-wrap: anywhere; }
.reco-notes p:last-child { margin-bottom: 0; }
.reco-market-off { margin: 0 0 var(--sp-4); border-radius: var(--radius-sm); font-weight: 600; }
.reco-summary { margin: 0; }
.account-reco-status { margin: var(--sp-3) 0 0; }
.reco-table { width: 100%; }
/* Only the numbers and the badge stay nowrap (narrow columns); the secondary
   lines wrap, so the table fits the 1024 px container without a scrollbar. */
.reco-table .cell-name { min-width: 0; vertical-align: top; overflow-wrap: anywhere; }
.reco-table .num { vertical-align: top; }
.reco-table .stat-sub { white-space: normal; }
.reco-item-name { overflow-wrap: anywhere; }
.reco-reasons { margin: var(--sp-2) 0 0; padding-left: var(--sp-4); color: var(--text-muted); font-size: var(--fs-14); overflow-wrap: anywhere; }
.reco-reasons li + li { margin-top: var(--sp-1); }
.reco-prognosis { margin: var(--sp-3) 0 0; font-size: var(--fs-14); overflow-wrap: anywhere; }
.reco-prognosis .badge { margin-left: var(--sp-2); white-space: normal; }
.reco-ai { min-width: 0; margin-top: var(--sp-3); padding: var(--sp-3) var(--sp-4); border-left: 3px solid var(--accent-2); border-radius: var(--radius-sm); background: var(--surface-strong); }
.reco-ai-label { display: flex; align-items: center; gap: var(--sp-2); margin: 0 0 var(--sp-2); color: var(--accent); font-size: var(--fs-14); font-weight: 700; }
.reco-ai-label .icon { flex: none; width: 20px; height: 20px; }
.reco-ai-text { margin: 0; color: var(--text); font-size: var(--fs-14); overflow-wrap: anywhere; }
.reco-ai-stale { margin: var(--sp-2) 0 0; font-size: var(--fs-14); }
/* One pill geometry in the class column: the base .badge (watch) would be
   32.4 px tall with 14 px text while badge-dev/badge-warn are 26.8 px with
   13 px; the scoped rule puts all four on the badge-dev/badge-warn metrics. */
.reco-badge-hold { border-color: var(--accent-2); color: var(--accent-2); }
/* The class badge is a one-line pill: in the narrow desktop column it broke
   into two text lines inside the 999 px pill (measured in the browser at
   1024/1440 px, de/en); nowrap keeps it 26.8 px tall and the table fits its
   container without an inner scrollbar. */
.reco-table .reco-class .badge {
  padding: 2px var(--sp-3);
  font-size: 0.8125rem;
  white-space: nowrap;
}
.reco-table tbody tr.is-sell th:first-child { box-shadow: inset 3px 0 0 var(--accent); }
@media (max-width: 1023px) {
  .table-scroll .reco-table, .reco-table tbody { display: block; min-width: 0; border: 0; background: none; box-shadow: none; overflow: visible; }
  .reco-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .reco-table tbody { display: grid; gap: var(--sp-3); }
  .reco-table tr {
    position: relative;
    display: grid;
    min-width: 0;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "item class" "detail detail" "qty qty" "price price" "gross gross";
    gap: var(--sp-2) var(--sp-3);
    padding: var(--sp-4);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface-solid);
    box-shadow: var(--shadow);
  }
  .reco-table tbody tr.is-sell { box-shadow: inset 3px 0 0 var(--accent), var(--shadow); }
  .reco-table tbody tr.is-sell th:first-child { box-shadow: none; }
  .reco-table th, .reco-table td { display: block; min-width: 0; padding: 0; border: 0; text-align: left; white-space: normal; overflow-wrap: anywhere; }
  /* The item cell opens its box (display: contents): name and badge share the
     head row, reasons/prognosis/AI note take the full card width. */
  .reco-table tbody th.reco-item { display: contents; }
  .reco-table .reco-item-name { grid-area: item; }
  /* Card values start at the left edge like their labels (.data-table .num is right-aligned). */
  .data-table.reco-table td { text-align: left; }
  .reco-table .reco-reasons, .reco-table .reco-prognosis, .reco-table .reco-ai { grid-area: detail; }
  .reco-table .reco-class { grid-area: class; justify-self: end; text-align: right; }
  .reco-table .reco-qty { grid-area: qty; }
  .reco-table .reco-price { grid-area: price; }
  .reco-table .reco-gross { grid-area: gross; }
  .reco-table td[data-label]::before { content: attr(data-label) ": "; color: var(--text-muted); font-weight: 600; }
  .reco-split { justify-content: flex-start; }
  /* Narrow phones: the badge moves under the name so both get the full width. */
  @media (max-width: 479px) {
    .reco-table tr {
      grid-template-columns: minmax(0, 1fr);
      grid-template-areas: "item" "class" "detail" "qty" "price" "gross";
    }
    .reco-table .reco-class { justify-self: start; text-align: left; }
  }
}

/* ---------- Motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition: none !important;
    animation: none !important;
  }
}

/* ---------- Admin area (PLAN §14): slim operator layout, panel cards, no public nav ---------- */
/* minmax(0, 1fr) + min-width: 0 down the chain: an auto track/column would take
   the min-content of the widest child (a 640px table inside a card) and widen
   the page on phones instead of letting .table-scroll scroll (checked in the
   browser at 320/390/768/1024/1440). */
.admin-section { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--sp-3); }
.admin-header .header-inner { min-height: var(--header-h); }
.admin-brand { cursor: default; }
.admin-badge { margin-left: var(--sp-2); padding: 0 var(--sp-2); font-size: var(--fs-14); }
.admin-tools { margin-left: auto; }
.admin-home { min-height: 40px; }
.admin-title { margin: 0 0 var(--sp-6); font-size: var(--fs-h2); }
.admin-footer { margin-top: var(--sp-8); }
.admin-footer .footer-inner { display: block; }
.admin-login { margin-top: 0; }
.admin-form input[type="text"], .admin-form input[type="password"] {
  width: 100%;
  min-height: 44px;
  padding: 0 var(--sp-4);
  border: 1px solid var(--line-control);
  border-radius: var(--radius-sm);
  background: var(--surface-strong);
  color: var(--text);
  font: inherit;
  font-family: var(--font-ui);
}
.admin-form input[type="text"]:hover, .admin-form input[type="password"]:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--line-control)); }
/* minmax(0, 1fr): a single auto track would grow to the min-content of the
   widest item (a 640px table inside a card) and widen the page on phones. */
.admin-dash { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--sp-6); }
.admin-head { display: grid; gap: var(--sp-3); }
.admin-head .lead { margin: 0; max-width: 65ch; }
.admin-head form { margin: 0; }
.admin-section-title { margin: 0 0 var(--sp-3); font-size: var(--fs-19); }
.admin-stats { margin: 0; }
.admin-stats .stat dd { display: grid; gap: var(--sp-1); }
/* Timestamp wraps at the space (date / time line) so it never runs over the
   narrow stat tiles at 320–768 px. */
.admin-time { white-space: normal; overflow-wrap: anywhere; }
.admin-status { justify-self: start; font-weight: 600; background: var(--surface-strong); }
.admin-status-warn { border-color: var(--warn-text); color: var(--warn-text); background: var(--warn-bg); }
/* Very narrow viewports: the Admin badge would crowd the header tools. */
@media (max-width: 359px) {
  .admin-badge { display: none; }
  .admin-brand { flex-shrink: 0; }
}

/* Admin accounts, list + detail (PLAN §14.2 #2+#3). The list is the solid
   .data-table inside .table-scroll: on narrow viewports it scrolls inside the
   container instead of widening the page (min-width 640px of .data-table).
   Text colours are only --text, --text-muted and --accent on the solid table
   surface, the panel cards and --surface-strong inputs (contrast:
   TestAdminAccountsContrast). */
.admin-head-actions { display: flex; flex-wrap: wrap; gap: var(--sp-3); align-items: center; }
.admin-head-actions form { margin: 0; }
.admin-account-mail { margin: 0; overflow-wrap: anywhere; }
.admin-banner { margin: 0; font-weight: 600; }
.admin-toolbar { display: flex; flex-wrap: wrap; gap: var(--sp-3); align-items: flex-end; }
.admin-search { flex: 1 1 220px; min-width: 0; margin: 0; }
.admin-form input[type="search"], .admin-form textarea {
  width: 100%;
  padding: 0 var(--sp-4);
  border: 1px solid var(--line-control);
  border-radius: var(--radius-sm);
  background: var(--surface-strong);
  color: var(--text);
  font: inherit;
  font-family: var(--font-ui);
}
.admin-form input[type="search"] { min-height: 44px; }
.admin-form textarea { min-height: 88px; padding: var(--sp-3) var(--sp-4); resize: vertical; }
.admin-form input[type="search"]:hover, .admin-form textarea:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--line-control)); }
.admin-table { max-width: 100%; }
/* System fetch table: below 1024 px the inner .table-scroll is active; the
   narrower horizontal cell padding keeps the 768 px table inside its 672 px
   scroll container without an inner scrollbar (long duration/count cells). */
@media (max-width: 1023px) {
  .admin-system-table th, .admin-system-table td { padding: var(--sp-3) var(--sp-3); }
}
.admin-table .admin-cell-email { min-width: 200px; overflow-wrap: anywhere; }
.admin-table .admin-time { font-size: var(--fs-14); white-space: nowrap; overflow-wrap: normal; }
.admin-table .admin-wrap { overflow-wrap: anywhere; }
/* Compact desktop cells of the license list: date-only timestamps (full time in
   the title attribute), plan as a badge, clipped error code with a title tooltip. */
.admin-table .admin-date { font-size: var(--fs-14); white-space: nowrap; }
.admin-plan { font-weight: 600; background: var(--surface-strong); white-space: nowrap; }
/* adminShortCode clips to 10 runes + "…"; 12ch keeps the ellipsis visible. */
.admin-code { display: inline-block; max-width: 12ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; }
/* Admin tables: the inner .table-scroll is allowed below 1024 px (mobile and
   tablet), and removed at ≥1024 px so the desktop table fits its container
   without an inner scrollbar (compact dates, plan badge, clipped error code).
   Breakpoint is the same for every admin table. */
@media (min-width: 1024px) {
  .admin-section .table-scroll { overflow-x: visible; }
  .admin-section .table-scroll .data-table { min-width: 0; }
  .admin-table th, .admin-table td { padding: var(--sp-2); }
  /* The desktop heads stay one line because the global .data-table thead th
     rule already sets white-space: nowrap; the compact short labels plus the
     smaller cell padding keep the row within the container. No extra
     nowrap declarations are needed here. The account cell min-width is 120px
     (instead of 160px) so the nowrap plan badge fits the 1024px table. */
  .admin-section .admin-table .admin-cell-account { min-width: 120px; }
}
.table-scroll .admin-table-compact { min-width: 20rem; }
.admin-cell-sub { display: block; margin-top: var(--sp-1); font-size: var(--fs-14); color: var(--text-muted); overflow-wrap: anywhere; }
.admin-mono { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; }
.admin-pager { display: flex; flex-wrap: wrap; gap: var(--sp-3); align-items: center; justify-content: space-between; }
.admin-pager-status { font-size: var(--fs-14); color: var(--text-muted); }
.admin-card { margin: 0; }
.admin-meta { display: grid; gap: var(--sp-4); grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); margin: 0; padding: 0; }
.admin-meta-row { display: grid; gap: 2px; min-width: 0; }
.admin-meta-row dt { font-size: var(--fs-14); font-weight: 600; color: var(--text-muted); }
.admin-meta-row dd { margin: 0; font-family: var(--font-ui); overflow-wrap: anywhere; }
.admin-meta-status { display: grid; gap: var(--sp-1); justify-items: start; }
.admin-detail-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--sp-6); }
.admin-dash > *, .admin-detail-grid > * { min-width: 0; }
@media (min-width: 1024px) {
  .admin-detail-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
}
.admin-actions { display: grid; gap: var(--sp-6); }
.admin-action { display: grid; gap: var(--sp-3); margin: 0; justify-items: start; }
.admin-action label { font-size: var(--fs-14); font-weight: 600; color: var(--text-muted); }
.admin-action-text { margin: 0; max-width: 65ch; font-size: var(--fs-14); color: var(--text-muted); }

/* ---------- Admin area, part 3 (PLAN §14.2 #4-#6): nav, license list, notice editor ---------- */
.admin-nav { display: flex; flex-wrap: wrap; gap: var(--sp-3); }
.admin-nav .btn-secondary:hover { background: color-mix(in srgb, var(--accent) 8%, transparent); }
.admin-nav .btn.is-active { background: color-mix(in srgb, var(--accent) 14%, transparent); }
.admin-nav .btn.is-active:hover { background: color-mix(in srgb, var(--accent) 22%, transparent); }
.admin-filter { display: flex; flex-wrap: wrap; gap: var(--sp-3); margin: 0; padding: 0; list-style: none; }
/* Filter pills: same height, gap and active/hover tint as the section nav and
   the search toolbar of the account list. */
.admin-filter-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 var(--sp-3);
  border: 1px solid var(--line-control);
  border-radius: 999px;
  background: var(--surface-strong);
  font-family: var(--font-ui);
  font-size: var(--fs-14);
  font-weight: 600;
  text-decoration: none;
  transition: background-color var(--t) var(--ease), border-color var(--t) var(--ease);
}
.admin-filter-link:hover { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, var(--surface-strong)); text-decoration: none; }
.admin-filter-link.is-current { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, var(--surface-strong)); text-decoration: none; }
.admin-filter-link.is-current:hover { background: color-mix(in srgb, var(--accent) 22%, var(--surface-strong)); }
.admin-table .admin-cell-account { min-width: 160px; overflow-wrap: anywhere; }
.admin-check { display: flex; align-items: center; gap: var(--sp-2); font-weight: 600; color: var(--text-muted); font-size: var(--fs-14); }

/* Global operator notice (PLAN §14.2 #6): neutral, below the header, wraps on phones. */
.site-notice { background: var(--surface-strong); color: var(--text); border-bottom: 1px solid var(--line); }
.site-notice-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--sp-2) var(--sp-4); padding: var(--sp-3) var(--sp-4); }
@media (min-width: 640px) { .site-notice-inner { padding: var(--sp-3) var(--sp-6); } }
.site-notice-text { min-width: 0; overflow-wrap: anywhere; white-space: pre-line; }
.site-notice-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  min-width: 40px; min-height: 40px;
  padding: 0;
  border: 1px solid var(--accent);
  border-radius: var(--radius-sm);
  background: transparent;
  color: inherit;
  font-family: var(--font-ui);
  font-size: var(--fs-19);
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  transition: background-color var(--t) var(--ease), border-color var(--t) var(--ease);
}
/* The template ships the button with the hidden attribute (No-JS fallback);
   the explicit rule keeps [hidden] from being overridden by display:inline-flex. */
.site-notice-close[hidden] { display: none; }
.site-notice-close:hover { background: color-mix(in srgb, var(--accent) 12%, transparent); }
.site-notice-close:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
