/* WoW Forever AH analytics. Base colours shared with the other lfams.org sites. */
:root {
  --bg: #0b0d12; --card: #161a24; --card-2: #1c2130; --border: #232838; --text: #e8eaf0; --muted: #9aa3b2;
  --accent: #6c8cff; --accent-text: #8fa8ff;
  --gold: #ffc23d; --up: #3ddc84; --down: #ff7a7e; --violet: #b48cff; --teal: #4fd1c5;
  --q-poor: #9d9d9d; --q-common: #e8eaf0; --q-uncommon: #1eff00; --q-rare: #3b8cff; --q-epic: #c069ff; --q-legendary: #ff8000;
  --radius: 14px; --radius-sm: 10px;
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font-sans); font-size: 15px; line-height: 1.45; }
a { color: var(--accent-text); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(26px, 4vw, 36px); font-weight: 900; letter-spacing: -0.03em; line-height: 1.05; }
h2 { font-size: 19px; font-weight: 800; letter-spacing: -0.01em; }
h3 { font-size: 15px; font-weight: 800; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.wrap { max-width: 1240px; margin: 0 auto; padding: 0 24px 64px; display: flex; flex-direction: column; gap: 22px; }
.top { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; padding: 18px 0; border-bottom: 1px solid var(--border); }
.brand { color: var(--text); font-weight: 900; font-size: 19px; letter-spacing: -0.03em; }
.brand span { color: var(--gold); }
.brand:hover { text-decoration: none; }
.top nav { display: flex; gap: 4px; flex-wrap: wrap; flex: 1; }
.top nav a { color: var(--muted); font-weight: 700; padding: 8px 10px; border-radius: 8px; }
.top nav a:hover { color: var(--text); text-decoration: none; background: var(--card); }
.top nav a.on { color: var(--text); background: var(--card); }
.house-pick select, select, input, textarea {
  font: inherit; color: var(--text); background: var(--card); border: 1px solid var(--border); border-radius: 8px; padding: 7px 10px; }
input[type=number] { width: 7em; }
button, .btn { font: inherit; font-weight: 800; color: var(--bg); background: var(--accent); border: 0; border-radius: 8px; padding: 8px 14px; cursor: pointer; }
button.ghost { background: var(--card-2); color: var(--text); }
button.link { background: none; color: var(--down); padding: 0; font-weight: 700; }

.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.between { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 480px), 1fr)); gap: 18px; }
.grid3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 18px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.stat { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; }
.stat b { font-size: 21px; font-weight: 800; font-variant-numeric: tabular-nums; }
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.lbl { font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.m, td.n, th.n { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.gold { color: var(--gold); }
.up { color: var(--up); }
.down { color: var(--down); }
.note { background: rgba(255,194,61,.08); border: 1px solid rgba(255,194,61,.3); border-radius: var(--radius-sm); padding: 10px 14px; font-size: 14px; }
.note.info { background: rgba(108,140,255,.08); border-color: rgba(108,140,255,.3); }
.chip { display: inline-block; font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; padding: 3px 8px; border-radius: 99px; background: var(--card-2); color: var(--muted); }
.chip.warn { background: rgba(255,122,126,.14); color: var(--down); }
.chip.ok { background: rgba(61,220,132,.14); color: var(--up); }

.tablewrap { overflow-x: auto; margin: 0 -4px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 6px 8px; border-bottom: 1px solid var(--border); white-space: nowrap; }
td { padding: 7px 8px; border-bottom: 1px solid rgba(35,40,56,.6); vertical-align: top; }
td.n, th.n { text-align: right; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }

.q-poor { color: var(--q-poor); } .q-common { color: var(--q-common); } .q-uncommon { color: var(--q-uncommon); }
.q-rare { color: var(--q-rare); } .q-epic { color: var(--q-epic); } .q-legendary { color: var(--q-legendary); }

.chart { position: relative; width: 100%; min-height: 120px; }
.chart svg { display: block; overflow: visible; touch-action: pan-y; }
.chart .grid line { stroke: var(--border); }
.chart .grid text, .chart .mark-l { fill: var(--muted); font-size: 11px; font-family: var(--font-mono); }
.chart .mark { stroke-dasharray: 3 3; opacity: .7; }
.chart .cross { stroke: var(--muted); stroke-dasharray: 2 3; }
.chart .tip { position: absolute; top: 4px; background: var(--card-2); border: 1px solid var(--border); border-radius: 8px; padding: 6px 9px; font-size: 12px; pointer-events: none; white-space: nowrap; z-index: 2; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.legend i { display: inline-block; width: 12px; height: 3px; border-radius: 2px; vertical-align: middle; margin-right: 6px; }

.bar { height: 6px; background: var(--card-2); border-radius: 3px; overflow: hidden; min-width: 60px; }
.bar > i { display: block; height: 100%; background: var(--accent); }
.heat td.n { position: relative; }
details summary { cursor: pointer; color: var(--muted); font-size: 13px; }
form.inline { display: flex; gap: 8px; align-items: end; flex-wrap: wrap; }
form.inline label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); }
footer { color: var(--muted); font-size: 12px; border-top: 1px solid var(--border); padding-top: 14px; }

@media (max-width: 640px) {
  .wrap { padding: 0 16px 48px; gap: 18px; }
  .top { gap: 10px; }
  .top nav { order: 3; width: 100%; overflow-x: auto; flex-wrap: nowrap; }
  .house-pick { order: 2; width: 100%; min-width: 0; }
  .house-pick select { width: 100%; max-width: 100%; }
  .card { padding: 14px; }
}
