/* ==========================================================================
   Auction Oracle — "Comptoir" (default theme since 2026-11-09)
   A merchant's ledger, made modern: warm graphite, paper-coloured text, ONE accent (ember) for actions,
   gold only for money, serif titles in sentence case, monospaced figures, hairline rules, numbered sections.
   No glow, no gradient frames, no starfield. Loaded last; everything is scoped to :is([data-theme="comptoir"], [data-theme="forever"]).
   Fonts: Fraunces and JetBrains Mono (SIL OFL 1.1, see assets/comptoir/fonts/OFL-*.txt).
   ========================================================================== */
@font-face { font-family: "Fraunces"; font-weight: 500; font-display: swap; src: url(/ui/assets/comptoir/fonts/fraunces-latin-500-normal.woff2) format("woff2"); }
@font-face { font-family: "Fraunces"; font-weight: 600; font-display: swap; src: url(/ui/assets/comptoir/fonts/fraunces-latin-600-normal.woff2) format("woff2"); }
@font-face { font-family: "Fraunces"; font-weight: 500; font-style: italic; font-display: swap; src: url(/ui/assets/comptoir/fonts/fraunces-latin-500-italic.woff2) format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-weight: 400; font-display: swap; src: url(/ui/assets/comptoir/fonts/jetbrains-mono-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-weight: 600; font-display: swap; src: url(/ui/assets/comptoir/fonts/jetbrains-mono-latin-600-normal.woff2) format("woff2"); }

:is([data-theme="comptoir"], [data-theme="forever"]) {
  color-scheme: dark;
  --bg: #0f0f0d; --bg2: #141412; --panel: #171715; --panel-solid: #171715; --panel2: #1e1e1b;
  --line: rgba(239, 233, 220, .085); --line2: rgba(239, 233, 220, .17);
  --fg: #efe9dc; --muted: #aaa494; --dim: #8c8675;
  --accent: #ff7a3d; --on-accent: #1b0e06; --accent-2: #e9c46a; --premium: #e9c46a;
  --link: #ffab80; --up: #7bd88f; --down: #ff6b5e; --warn: #f2b84b; --info: #8ab4f8; --predicted: #c8a8ff;
  --gold: #e9c46a; --silver: #c9ccd3; --copper: #d9925b;
  --nav-bg: #0c0c0b; --top-bg: rgba(15, 15, 13, .92);
  --radius: 6px; --radius-sm: 4px;
  --shadow: 0 1px 0 rgba(0, 0, 0, .4); --glow: 0 0 0 2px rgba(255, 122, 61, .38);
  --glass: none; --grid-pattern: none;
  --art-opacity: 0; --art-filter: none; --art-overlay: none;
  --font-ui: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-num: "JetBrains Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  --display-case: none; --display-spacing: -.01em;
  --frame-premium: linear-gradient(var(--line2), var(--line2));
  --frame-legendary: linear-gradient(var(--accent), var(--accent));
  --icon-accent: var(--accent);
  --brand-symbol-dark: block; --brand-symbol-light: none;
}

/* ---------- canvas: flat graphite with a faint ledger ruling ---------- */
:is([data-theme="comptoir"], [data-theme="forever"]) body {
  background:
    linear-gradient(rgba(239, 233, 220, .022) 1px, transparent 1px) 0 0 / 100% 32px,
    radial-gradient(1100px 600px at 100% -10%, rgba(255, 122, 61, .055), transparent 60%),
    var(--bg);
  color: var(--fg);
}
:is([data-theme="comptoir"], [data-theme="forever"]) #bgArt { display: none; }
:is([data-theme="comptoir"], [data-theme="forever"]) ::selection { background: rgba(255, 122, 61, .35); color: #fff; }

/* ---------- type ---------- */
:is([data-theme="comptoir"], [data-theme="forever"]) h1, :is([data-theme="comptoir"], [data-theme="forever"]) h2, :is([data-theme="comptoir"], [data-theme="forever"]) h3 {
  font-family: var(--font-display); text-transform: none; letter-spacing: -.01em; font-weight: 600;
}
:is([data-theme="comptoir"], [data-theme="forever"]) #pageTitle { font-size: 24px; line-height: 1.15; font-weight: 600; letter-spacing: -.015em; }
:is([data-theme="comptoir"], [data-theme="forever"]) #pageSub { color: var(--muted); font-size: 13px; }
:is([data-theme="comptoir"], [data-theme="forever"]) .money, :is([data-theme="comptoir"], [data-theme="forever"]) td.num, :is([data-theme="comptoir"], [data-theme="forever"]) th.num,
:is([data-theme="comptoir"], [data-theme="forever"]) .kpi .v, :is([data-theme="comptoir"], [data-theme="forever"]) .num, :is([data-theme="comptoir"], [data-theme="forever"]) kbd, :is([data-theme="comptoir"], [data-theme="forever"]) code {
  font-family: var(--font-num); font-variant-numeric: tabular-nums; letter-spacing: -.01em;
}
:is([data-theme="comptoir"], [data-theme="forever"]) a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 3px; }

/* ---------- panels: ruled sheets, numbered like a ledger ---------- */
:is([data-theme="comptoir"], [data-theme="forever"]) main { counter-reset: sheet; }
:is([data-theme="comptoir"], [data-theme="forever"]) .panel {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: none;
  backdrop-filter: none; -webkit-backdrop-filter: none;
}
:is([data-theme="comptoir"], [data-theme="forever"]) .panel::before, :is([data-theme="comptoir"], [data-theme="forever"]) .panel::after { content: none; }
:is([data-theme="comptoir"], [data-theme="forever"]) .panel > h2 {
  font-size: 17px; font-weight: 600; color: var(--fg); border-bottom: 1px solid var(--line); padding-bottom: 10px; margin-bottom: 12px;
  display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap;
}
:is([data-theme="comptoir"], [data-theme="forever"]) .panel > h2::before {
  counter-increment: sheet; content: counter(sheet, decimal-leading-zero);
  font: 600 10.5px/1 var(--font-num); color: var(--accent); letter-spacing: .04em; transform: translateY(-2px);
}
:is([data-theme="comptoir"], [data-theme="forever"]) .panel > h2::after { content: none; }
:is([data-theme="comptoir"], [data-theme="forever"]) .panel > h2 .dim, :is([data-theme="comptoir"], [data-theme="forever"]) .panel > h2 .xs, :is([data-theme="comptoir"], [data-theme="forever"]) .panel > h2 small {
  font-family: var(--font-ui); font-weight: 400; font-size: 12px; color: var(--dim); letter-spacing: 0; text-transform: none;
}
:is([data-theme="comptoir"], [data-theme="forever"]) h3 { font-size: 15px; }
:is([data-theme="comptoir"], [data-theme="forever"]) .legendary, :is([data-theme="comptoir"], [data-theme="forever"]) .premium { border-image: none; }

/* ---------- KPIs: big figures, small labels ---------- */
:is([data-theme="comptoir"], [data-theme="forever"]) .kpi { background: var(--panel2); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: none; }
:is([data-theme="comptoir"], [data-theme="forever"]) .kpi::after { content: none; }
:is([data-theme="comptoir"], [data-theme="forever"]) .kpi .l { font: 500 11px/1.3 var(--font-ui); color: var(--muted); text-transform: none; letter-spacing: .01em; }
:is([data-theme="comptoir"], [data-theme="forever"]) .kpi .v { font-size: 21px; font-weight: 600; color: var(--fg); }
:is([data-theme="comptoir"], [data-theme="forever"]) .kpi-seal { display: none; }

/* ---------- buttons & fields ---------- */
:is([data-theme="comptoir"], [data-theme="forever"]) button, :is([data-theme="comptoir"], [data-theme="forever"]) .btn {
  background: var(--accent); color: var(--on-accent); border: 1px solid var(--accent); border-radius: var(--radius-sm);
  font-weight: 600; box-shadow: none; text-shadow: none; background-image: none; letter-spacing: 0; text-transform: none;
}
:is([data-theme="comptoir"], [data-theme="forever"]) button:hover, :is([data-theme="comptoir"], [data-theme="forever"]) .btn:hover { filter: brightness(1.08); transform: none; }
:is([data-theme="comptoir"], [data-theme="forever"]) button.ghost, :is([data-theme="comptoir"], [data-theme="forever"]) .btn.ghost, :is([data-theme="comptoir"], [data-theme="forever"]) button.secondary,
:is([data-theme="comptoir"], [data-theme="forever"]) .icon-btn, :is([data-theme="comptoir"], [data-theme="forever"]) .search-trigger {
  background: transparent; color: var(--fg); border: 1px solid var(--line2);
}
:is([data-theme="comptoir"], [data-theme="forever"]) button.ghost:hover, :is([data-theme="comptoir"], [data-theme="forever"]) .btn.ghost:hover, :is([data-theme="comptoir"], [data-theme="forever"]) .icon-btn:hover,
:is([data-theme="comptoir"], [data-theme="forever"]) .search-trigger:hover { border-color: var(--accent); filter: none; }
:is([data-theme="comptoir"], [data-theme="forever"]) button:focus-visible, :is([data-theme="comptoir"], [data-theme="forever"]) a:focus-visible, :is([data-theme="comptoir"], [data-theme="forever"]) input:focus-visible,
:is([data-theme="comptoir"], [data-theme="forever"]) select:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; box-shadow: none; }
:is([data-theme="comptoir"], [data-theme="forever"]) input, :is([data-theme="comptoir"], [data-theme="forever"]) select, :is([data-theme="comptoir"], [data-theme="forever"]) textarea {
  background: #10100e; border: 1px solid var(--line2); border-radius: var(--radius-sm); color: var(--fg); box-shadow: none;
}
:is([data-theme="comptoir"], [data-theme="forever"]) input:focus, :is([data-theme="comptoir"], [data-theme="forever"]) select:focus, :is([data-theme="comptoir"], [data-theme="forever"]) textarea:focus { border-color: var(--accent); }

/* ---------- tables: a printed ledger ---------- */
:is([data-theme="comptoir"], [data-theme="forever"]) table { border-collapse: collapse; }
:is([data-theme="comptoir"], [data-theme="forever"]) th {
  font: 600 10.5px/1.2 var(--font-num); text-transform: uppercase; letter-spacing: .07em; color: var(--dim);
  background: transparent; border-bottom: 1px solid var(--line2);
}
:is([data-theme="comptoir"], [data-theme="forever"]) td { border-bottom: 1px solid var(--line); }
:is([data-theme="comptoir"], [data-theme="forever"]) tbody tr:hover td { background: rgba(255, 122, 61, .045); }

/* ---------- badges: stamped, not glowing ---------- */
:is([data-theme="comptoir"], [data-theme="forever"]) .badge {
  font: 600 10px/1.5 var(--font-num); letter-spacing: .05em; text-transform: uppercase; border-radius: 3px;
  background: transparent; border: 1px solid currentColor; box-shadow: none; padding: 0 5px;
}

/* ---------- navigation: a quiet spine ---------- */
:is([data-theme="comptoir"], [data-theme="forever"]) #nav { background: var(--nav-bg); border-right: 1px solid var(--line); box-shadow: none; }
:is([data-theme="comptoir"], [data-theme="forever"]) #nav .brand-text b { font: italic 500 18px/1.1 var(--font-display); letter-spacing: -.01em; text-transform: none; color: var(--fg); }
:is([data-theme="comptoir"], [data-theme="forever"]) #nav .brand-text small { font: 400 10.5px/1.3 var(--font-num); color: var(--dim); letter-spacing: .02em; text-transform: none; }
:is([data-theme="comptoir"], [data-theme="forever"]) .brand-mark { filter: grayscale(1) contrast(1.1); opacity: .8; }
:is([data-theme="comptoir"], [data-theme="forever"]) .nav-link, :is([data-theme="comptoir"], [data-theme="forever"]) #navlinks a {
  font-family: var(--font-ui); font-size: 13.5px; font-weight: 500; text-transform: none; letter-spacing: 0; color: var(--muted);
  border-radius: var(--radius-sm); border-left: 2px solid transparent; background: transparent; box-shadow: none;
}
:is([data-theme="comptoir"], [data-theme="forever"]) .nav-link:hover, :is([data-theme="comptoir"], [data-theme="forever"]) #navlinks a:hover { color: var(--fg); background: rgba(239, 233, 220, .04); }
:is([data-theme="comptoir"], [data-theme="forever"]) .nav-link.active, :is([data-theme="comptoir"], [data-theme="forever"]) #navlinks a.active, :is([data-theme="comptoir"], [data-theme="forever"]) #navlinks a[aria-current="page"] {
  color: var(--fg); border-left-color: var(--accent); background: rgba(255, 122, 61, .07);
}
:is([data-theme="comptoir"], [data-theme="forever"]) .nav-ic, :is([data-theme="comptoir"], [data-theme="forever"]) .page-ic { filter: grayscale(1); opacity: .55; }
:is([data-theme="comptoir"], [data-theme="forever"]) .nav-link.active .nav-ic, :is([data-theme="comptoir"], [data-theme="forever"]) #navlinks a.active .nav-ic { filter: none; opacity: 1; }
:is([data-theme="comptoir"], [data-theme="forever"]) .nav-group > summary, :is([data-theme="comptoir"], [data-theme="forever"]) .nav-sec, :is([data-theme="comptoir"], [data-theme="forever"]) .nav-group-title,
:is([data-theme="comptoir"], [data-theme="forever"]) #navlinks h3, :is([data-theme="comptoir"], [data-theme="forever"]) #navlinks .grp {
  font: 600 10px/1.2 var(--font-num); text-transform: uppercase; letter-spacing: .1em; color: var(--dim);
}
:is([data-theme="comptoir"], [data-theme="forever"]) #topbar { background: var(--top-bg); border-bottom: 1px solid var(--line); box-shadow: none; backdrop-filter: none; }

/* ---------- the data banner: a footnote, not an alarm ---------- */
:is([data-theme="comptoir"], [data-theme="forever"]) .data-banner {
  background: transparent; border: 0; border-left: 2px solid var(--line2); border-radius: 0; color: var(--muted);
  font-size: 12px; padding: 4px 10px; box-shadow: none;
}
:is([data-theme="comptoir"], [data-theme="forever"]) .data-banner.warn { border-left-color: var(--warn); background: transparent; }

/* ---------- money keeps its metal, quietly ---------- */
:is([data-theme="comptoir"], [data-theme="forever"]) .g, :is([data-theme="comptoir"], [data-theme="forever"]) .coin-g { color: var(--gold); }
:is([data-theme="comptoir"], [data-theme="forever"]) .s, :is([data-theme="comptoir"], [data-theme="forever"]) .coin-s { color: var(--silver); }
:is([data-theme="comptoir"], [data-theme="forever"]) .c, :is([data-theme="comptoir"], [data-theme="forever"]) .coin-c { color: var(--copper); }

/* ---------- home hero: no oracle crystal, a front page ---------- */
:is([data-theme="comptoir"], [data-theme="forever"]) .oracle-hero { background: var(--panel); border: 1px solid var(--line); box-shadow: none; }
:is([data-theme="comptoir"], [data-theme="forever"]) .hero-card { background: var(--panel2); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: none; }
:is([data-theme="comptoir"], [data-theme="forever"]) .hero-card:hover { border-color: var(--accent); transform: none; }
:is([data-theme="comptoir"], [data-theme="forever"]) .hero-n { font: 600 12px/1 var(--font-num); color: var(--accent); background: transparent; border: 1px solid var(--accent); }

/* ---------- podium & champions: flat ---------- */
:is([data-theme="comptoir"], [data-theme="forever"]) .pod { background: var(--panel2); border: 1px solid var(--line); box-shadow: none; }
:is([data-theme="comptoir"], [data-theme="forever"]) .pod-crest { background: transparent; border: 1px solid var(--accent); color: var(--accent); font-family: var(--font-num); }

/* ---------- motion: calm ---------- */
@media (prefers-reduced-motion: no-preference) {
  :is([data-theme="comptoir"], [data-theme="forever"]) .panel { animation: ao-sheet-in .28s cubic-bezier(.2, .8, .2, 1) both; }
  @keyframes ao-sheet-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
}

/* ---------- second pass: nav sockets, sub-links, the "ask" button, headings ---------- */
:is([data-theme="comptoir"], [data-theme="forever"]) .panel > h2 { justify-content: flex-start; }
:is([data-theme="comptoir"], [data-theme="forever"]) .nav-socket { background: none !important; border: 0 !important; box-shadow: none !important; color: var(--dim); }
:is([data-theme="comptoir"], [data-theme="forever"]) .nav-socket .si { color: var(--dim); filter: none; }
:is([data-theme="comptoir"], [data-theme="forever"]) .nav-link.active .nav-socket .si, :is([data-theme="comptoir"], [data-theme="forever"]) .nav-link:hover .nav-socket .si { color: var(--accent); }
:is([data-theme="comptoir"], [data-theme="forever"]) .nav-link .nav-ic { display: none; }
:is([data-theme="comptoir"], [data-theme="forever"]) .nav-link.nav-section { font-weight: 600; color: var(--fg); }
:is([data-theme="comptoir"], [data-theme="forever"]) .nav-sub { font-size: 13px; color: var(--muted); border-left: 1px solid var(--line); border-radius: 0; background: none; text-transform: none; letter-spacing: 0; }
:is([data-theme="comptoir"], [data-theme="forever"]) .nav-sub:hover { color: var(--fg); background: none; }
:is([data-theme="comptoir"], [data-theme="forever"]) .nav-sub.active { color: var(--fg); border-left: 2px solid var(--accent); background: none; font-weight: 500; }
:is([data-theme="comptoir"], [data-theme="forever"]) .nav-link .badge, :is([data-theme="comptoir"], [data-theme="forever"]) .nav-count { background: var(--accent); color: var(--on-accent); border: 0; }
:is([data-theme="comptoir"], [data-theme="forever"]) .ask-fab {
  background: var(--fg); color: #141412; border: 0; border-radius: 999px; box-shadow: 0 6px 20px rgba(0, 0, 0, .45);
  font: 600 13px/1 var(--font-ui); letter-spacing: 0; text-transform: none; background-image: none;
}
:is([data-theme="comptoir"], [data-theme="forever"]) .ask-fab img { display: none; }
:is([data-theme="comptoir"], [data-theme="forever"]) .ask-fab::before { content: "?"; display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--accent); color: var(--on-accent); font: 700 12px/1 var(--font-num); margin-right: 8px; }
:is([data-theme="comptoir"], [data-theme="forever"]) .brand-mark { display: none !important; }
:is([data-theme="comptoir"], [data-theme="forever"]) #nav .brand::before {
  content: "AO"; display: grid; place-items: center; width: 34px; height: 34px; flex: none; border-radius: 4px;
  background: var(--accent); color: var(--on-accent); font: 600 13px/1 var(--font-num); letter-spacing: -.02em;
}
:is([data-theme="comptoir"], [data-theme="forever"]) .nav-socket { display: grid !important; width: 22px; height: 22px; }
:is([data-theme="comptoir"], [data-theme="forever"]) .nav-socket .si { width: 17px; height: 17px; }
:is([data-theme="comptoir"], [data-theme="forever"]) #pageIcon { display: none; }
:is([data-theme="comptoir"], [data-theme="forever"]) .treasure3d-home { height: 140px; }
:is([data-theme="comptoir"], [data-theme="forever"]) .panel h2 .gold, :is([data-theme="comptoir"], [data-theme="forever"]) h2.gold { color: var(--fg); }
:is([data-theme="comptoir"], [data-theme="forever"]) .nav-link.active, :is([data-theme="comptoir"], [data-theme="forever"]) .nav-link.nav-section.active { border: 0 !important; border-left: 2px solid var(--accent) !important; box-shadow: none !important; outline: 0; }
:is([data-theme="comptoir"], [data-theme="forever"]) #nav .brand-text { min-width: 0; }
:is([data-theme="comptoir"], [data-theme="forever"]) #nav .brand-text small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 760px) {
  :is([data-theme="comptoir"], [data-theme="forever"]) #tabbar { background: #0c0c0b; border-top: 1px solid var(--line); box-shadow: none; backdrop-filter: none; }
  :is([data-theme="comptoir"], [data-theme="forever"]) #tabbar a { color: var(--dim); font: 500 11px/1.2 var(--font-ui); }
  :is([data-theme="comptoir"], [data-theme="forever"]) #tabbar a.on { color: var(--fg); background: none; box-shadow: inset 0 2px 0 var(--accent); }
  :is([data-theme="comptoir"], [data-theme="forever"]) #tabbar a.on .si { color: var(--accent); }
  :is([data-theme="comptoir"], [data-theme="forever"]) #pageTitle { font-size: 21px; }
}

/* character portrait: Blizzard's official render, or the official class icon (pages16.js) */
.pd-figure.pd-portrait { width: 200px; height: auto; min-height: 260px; border-radius: 8px; display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 8px; padding: 14px 12px; text-align: center; overflow: hidden; }
.pd-portrait .pd-render { width: 100%; max-height: 300px; object-fit: contain; }
.pd-portrait .pd-class-ic { width: 72px; height: 72px; border-radius: 6px; border: 1px solid var(--line2); }
.pd-portrait .pd-who { font-family: var(--font-display); font-size: 16px; color: var(--fg); }
.pd-portrait .pd-lvl b { font-size: 26px; color: var(--fg); }
.pd-portrait .pd-credit { line-height: 1.35; }
.pd-portrait-solo { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
@media (max-width: 760px) { .pd-figure.pd-portrait { width: 100%; max-width: 280px; margin: 0 auto; } }
.real-gold .gold-spark { display: block; }
.real-gold table td { vertical-align: middle; }
