/* RuinHead — iron-slate base, meter colours carried over from in-game damage meters */
:root {
  --bg: #14181d;
  --surface: #1b2027;
  --raised: #232a33;
  --line: #313a45;
  --line-soft: #262d36;
  --text: #ece6da;
  --muted: #9ba4ae;
  --faint: #6e7781;
  --ember: #e9a23b;      /* damage, primary actions */
  --ember-ink: #241703;
  --heal: #3fb89a;
  --taken: #e06a5f;
  --danger: #e06a5f;
  --s1: #3987e5; --s2: #d95926; --s3: #199e70; --s4: #c98500; --s5: #d55181;
  --radius-lg: 12px;
  --radius: 8px;
  --radius-sm: 5px;
  --ui: "Barlow Semi Condensed", "Arial Narrow", system-ui, sans-serif;
  --body: "Barlow", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.55 var(--body);
}
a { color: var(--ember); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--ember); outline-offset: 2px; border-radius: 3px; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
[hidden] { display: none !important; }

/* ---------- layout ---------- */
.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding-left: 16px; padding-right: 16px; }
.site-main { flex: 1; padding-top: 36px; padding-bottom: 72px; }
.site-header { border-bottom: 1px solid var(--line-soft); background: var(--surface); }
.site-header .wrap { display: flex; align-items: center; gap: 28px; min-height: 60px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 9px; color: var(--text); font: 700 22px/1 var(--ui); letter-spacing: .01em; }
.brand:hover { text-decoration: none; }
.brand svg { flex: none; }
.nav { display: flex; gap: 4px; flex-wrap: wrap; flex: 1; }
.nav a { color: var(--muted); font: 600 15px/1 var(--ui); padding: 9px 11px; border-radius: var(--radius-sm); }
.nav a:hover { color: var(--text); background: var(--raised); text-decoration: none; }
.nav a[aria-current="page"] { color: var(--text); box-shadow: inset 0 -2px 0 var(--ember); border-radius: 0; }
.account { display: flex; align-items: center; gap: 10px; font: 600 15px/1 var(--ui); }
.account img { width: 28px; height: 28px; border-radius: 50%; }
.account a.quiet { color: var(--muted); }
.site-footer { border-top: 1px solid var(--line-soft); color: var(--faint); font-size: 14px; padding: 22px 0; }

/* ---------- type ---------- */
h1, h2, h3 { font-family: var(--ui); font-weight: 700; line-height: 1.15; margin: 0; letter-spacing: .005em; }
h1 { font-size: clamp(28px, 4vw, 38px); }
h2 { font-size: 22px; margin-bottom: 14px; }
h3 { font-size: 18px; }
.lede { color: var(--muted); max-width: 62ch; margin: 8px 0 0; }
.section { margin-top: 44px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.meta-line { color: var(--muted); margin: 8px 0 0; display: flex; flex-wrap: wrap; gap: 4px 18px; }

/* ---------- controls ---------- */
input[type=text], input[type=search], select, textarea {
  width: 100%; padding: 10px 12px; border-radius: var(--radius);
  border: 1px solid var(--line); background: var(--bg); color: var(--text); font: inherit; font-size: 15px;
}
input::placeholder, textarea::placeholder { color: var(--faint); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--ember); }
label.field { display: block; }
label.field > span { display: block; font: 600 14px/1 var(--ui); color: var(--muted); margin-bottom: 7px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 18px; border-radius: var(--radius); border: 1px solid transparent; cursor: pointer;
  font: 700 16px/1 var(--ui); background: var(--ember); color: var(--ember-ink); white-space: nowrap;
}
.btn:hover { filter: brightness(1.08); text-decoration: none; }
.btn:disabled { background: var(--raised); color: var(--faint); cursor: default; filter: none; }
.btn.secondary { background: transparent; color: var(--text); border-color: var(--line); }
.btn.secondary:hover { background: var(--raised); }
.btn.small { padding: 7px 12px; font-size: 14px; }
.btn.danger { background: transparent; color: var(--danger); border-color: color-mix(in srgb, var(--danger) 45%, transparent); }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

.status { min-height: 24px; margin-top: 12px; font-size: 15px; }
.status.err { color: var(--danger); }
.status.ok { color: var(--heal); }

/* ---------- upload ---------- */
.upload { background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--radius-lg); padding: 20px; margin-top: 24px; }
.drop {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  min-height: 150px; padding: 24px 16px; text-align: center; cursor: pointer;
  border: 2px dashed var(--line); border-radius: var(--radius); background: var(--bg);
  transition: border-color .15s, background-color .15s;
}
.drop:hover, .drop.over { border-color: var(--ember); background: color-mix(in srgb, var(--ember) 6%, var(--bg)); }
.drop:focus-within { border-color: var(--ember); }
.drop .big { font: 700 20px/1.2 var(--ui); }
.drop .file-picked { color: var(--text); font-weight: 600; }
.upload-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) auto; gap: 12px; align-items: end; margin-top: 16px; }
@media (max-width: 760px) { .upload-fields { grid-template-columns: 1fr; } }
.ts-box { margin-top: 12px; }

/* ---------- tables ---------- */
.table-scroll { overflow-x: auto; margin: 0 -4px; padding: 0 4px; }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th, td { text-align: left; padding: 11px 10px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
th { color: var(--muted); font: 600 14px/1.2 var(--ui); white-space: nowrap; }
td.r, th.r { text-align: right; font-variant-numeric: tabular-nums; }
tbody tr:hover td { background: var(--surface); }
td .sub { display: block; color: var(--faint); font-size: 13.5px; margin-top: 2px; }
.empty { color: var(--muted); padding: 28px 10px; }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: end; margin-bottom: 14px; }
.toolbar > * { flex: 1 1 180px; }
.toolbar > .btn { flex: 0 0 auto; }

/* ---------- stat strip ---------- */
.stats { display: flex; flex-wrap: wrap; gap: 0; margin: 26px 0 0; border: 1px solid var(--line-soft); border-radius: var(--radius-lg); background: var(--surface); }
.stat { flex: 1 1 140px; padding: 14px 18px; border-right: 1px solid var(--line-soft); }
.stat:last-child { border-right: 0; }
.stat b { display: block; font: 700 26px/1.1 var(--ui); font-variant-numeric: tabular-nums; }
.stat span { color: var(--muted); font-size: 14px; }

/* ---------- tabs ---------- */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin: 34px 0 16px; overflow-x: auto; }
.tabs button {
  background: none; border: 0; color: var(--muted); font: 600 16px/1 var(--ui); padding: 12px 14px; cursor: pointer;
  box-shadow: inset 0 -2px 0 transparent; white-space: nowrap;
}
.tabs button:hover { color: var(--text); }
.tabs button[aria-selected="true"] { color: var(--text); box-shadow: inset 0 -2px 0 var(--ember); }

/* ---------- the meter: name sits on the bar, like the in-game meter ---------- */
.meter { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.meter-row { display: grid; grid-template-columns: 26px 1fr; gap: 8px; align-items: stretch; }
.meter-rank { color: var(--faint); font: 600 14px/34px var(--ui); text-align: right; font-variant-numeric: tabular-nums; }
.meter-bar {
  position: relative; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 34px; padding: 0 12px; border-radius: var(--radius-sm); background: var(--surface);
  color: var(--text); font: 600 15px/1.2 var(--ui); text-align: left; width: 100%; border: 0; cursor: default; overflow: hidden;
}
button.meter-bar { cursor: pointer; }
button.meter-bar:hover { background: var(--raised); }
.meter-bar .fill {
  position: absolute; inset: 0 auto 0 0; background: color-mix(in srgb, var(--fill, var(--ember)) 26%, var(--surface));
  border-right: 2px solid var(--fill, var(--ember)); border-radius: var(--radius-sm) 0 0 var(--radius-sm);
}
.meter-bar > span { position: relative; }
.meter-bar .who { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: flex; align-items: baseline; gap: 8px; }
.meter-bar .who small { color: #c9c3b8; font-weight: 500; font-size: 13px; }
.meter-bar .val { white-space: nowrap; font-variant-numeric: tabular-nums; }
.meter-bar .val small { color: #c9c3b8; font-weight: 500; margin-left: 10px; }
.meter.heal { --fill: var(--heal); }
.meter.taken { --fill: var(--taken); }
.meter-row.open .meter-bar { border-radius: var(--radius-sm) var(--radius-sm) 0 0; }
.detail { grid-column: 2; background: var(--surface); border-radius: 0 0 var(--radius-sm) var(--radius-sm); padding: 4px 12px 12px; margin-top: -4px; }
.detail table { font-size: 14px; }
.detail th, .detail td { padding: 8px 8px; }
.detail .actions { margin-top: 10px; display: flex; gap: 14px; flex-wrap: wrap; font-size: 14px; }

/* ---------- chart ---------- */
.chart-card { background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--radius-lg); padding: 16px 16px 10px; }
.chart-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 14px; color: var(--text); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 14px; height: 3px; border-radius: 2px; display: inline-block; }
.chart { position: relative; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart .grid line { stroke: var(--line-soft); }
.chart .axis text { fill: var(--faint); font: 12px var(--body); font-variant-numeric: tabular-nums; }
.chart .series path { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .death line { stroke: var(--taken); stroke-dasharray: 3 3; stroke-width: 1.5; }
.chart .cross { stroke: var(--muted); stroke-width: 1; }
.tip {
  position: absolute; pointer-events: none; background: var(--raised); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 8px 10px; font-size: 13.5px; min-width: 160px; z-index: 5;
  box-shadow: 0 6px 18px rgba(0,0,0,.35);
}
.tip b { font-family: var(--ui); display: block; margin-bottom: 4px; }
.tip div { display: flex; justify-content: space-between; gap: 14px; font-variant-numeric: tabular-nums; }
.tip i { display: inline-block; width: 10px; height: 3px; border-radius: 2px; margin-right: 6px; vertical-align: middle; }

/* ---------- deaths ---------- */
.death-list { display: grid; gap: 10px; }
.death { background: var(--surface); border: 1px solid var(--line-soft); border-left: 3px solid var(--taken); border-radius: var(--radius); }
.death summary { cursor: pointer; padding: 12px 14px; display: flex; gap: 14px; align-items: baseline; flex-wrap: wrap; list-style: none; }
.death summary::-webkit-details-marker { display: none; }
.death summary .t { color: var(--faint); font-variant-numeric: tabular-nums; min-width: 44px; }
.death summary .who { font: 700 16px/1.2 var(--ui); }
.death .recap { padding: 0 14px 12px; }
.death td.dmg { color: var(--taken); }
.death td.heal { color: var(--heal); }

/* ---------- compare ---------- */
.diff-up { color: var(--heal); }
.diff-down { color: var(--taken); }

/* ---------- misc ---------- */
.pill { display: inline-block; font: 600 12.5px/1 var(--ui); padding: 4px 7px; border-radius: 4px; background: var(--raised); color: var(--muted); vertical-align: middle; }
.notice { background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 14px 16px; color: var(--muted); }
pre.raw { white-space: pre-wrap; word-break: break-word; max-height: 560px; overflow: auto; background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 14px; font-size: 13px; }
dialog { background: var(--surface); color: var(--text); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 22px; width: min(440px, calc(100vw - 32px)); }
dialog::backdrop { background: rgba(5, 7, 9, .6); }
dialog h3 { margin-bottom: 10px; }
dialog textarea { min-height: 90px; resize: vertical; margin: 12px 0; }

@media (max-width: 640px) {
  .site-main { padding-top: 24px; }
  .site-header .wrap { gap: 10px 18px; padding-top: 10px; padding-bottom: 6px; }
  .nav { order: 3; flex-basis: 100%; margin: 0 -11px; }
  .stat { border-right: 0; border-bottom: 1px solid var(--line-soft); flex-basis: 50%; }
  .meter-row { grid-template-columns: 1fr; }
  .meter-rank { display: none; }
  .detail { grid-column: 1; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* ---------- settings.txt help ---------- */
.fight-pick { margin-top: 16px; }
.where { margin-top: 14px; border: 1px solid var(--line-soft); border-radius: var(--radius); background: var(--bg); padding: 12px 16px; }
.where summary { cursor: pointer; font: 600 16px/1.3 var(--ui); color: var(--ember); }
.where p, .where ol { margin: 10px 0; }
.where ol { padding-left: 22px; }
.where li { margin: 5px 0; }
.where code { background: var(--raised); border: 1px solid var(--line-soft); border-radius: var(--radius-sm); padding: 1px 6px; font-size: 14px; overflow-wrap: anywhere; }
.where kbd { background: var(--raised); border: 1px solid var(--line); border-bottom-width: 2px; border-radius: var(--radius-sm); padding: 0 6px; font: 600 13px/1.6 var(--ui); }
.path-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.path-row code { flex: 1 1 220px; padding: 8px 10px; font-size: 15px; }
.small-print { font-size: 14px; }

/* ---------- Warcraft Logs-style additions ---------- */
:root { --threat: #a97be0; }
.upload-fields { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.small-print { font-size: 13.5px; margin: 10px 0 0; }

/* parse badges, coloured like Warcraft Logs */
.parse { display: inline-block; min-width: 30px; padding: 3px 6px; border-radius: 4px; text-align: center;
  font: 700 14px/1 var(--ui); font-variant-numeric: tabular-nums; background: var(--raised); }
.parse.grey { color: #a6a6a6; } .parse.green { color: #1eff00; } .parse.blue { color: #0070ff; }
.parse.purple { color: #a335ee; } .parse.orange { color: #ff8000; } .parse.pink { color: #e268a8; }
.parse.gold { color: #e5cc80; } .parse.none { color: var(--faint); }
.meter-rank .parse { min-width: 34px; }
.parse-note { font-size: 14px; margin: 0 0 12px; }
.parse-note .parse { margin-left: 2px; }

.pill.kill { background: color-mix(in srgb, var(--heal) 22%, var(--raised)); color: var(--heal); }
.pill.wipe { background: color-mix(in srgb, var(--taken) 20%, var(--raised)); color: var(--taken); }
h1 .pill { font-size: 13px; position: relative; top: -4px; margin-left: 4px; }

.meter.threat { --fill: var(--threat); }
.meter.speed { --fill: var(--s1); }
@media (min-width: 641px) { .meter-row { grid-template-columns: 40px 1fr; } }
@media (max-width: 640px) {
  .meter-row:has(.parse) { grid-template-columns: 40px 1fr; }
  .meter-row:has(.parse) .meter-rank { display: block; }
  .meter-row:has(.parse) .detail { grid-column: 1 / -1; }
  .owner-bar { font-size: 14px; }
}
.meter-row.you .who { color: var(--ember); }

/* uploader controls on log and report pages */
.owner-bar { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; margin-top: 16px; padding: 10px 14px;
  border: 1px solid var(--line-soft); border-radius: var(--radius); background: var(--surface); font-size: 15px; }
.owner-bar label { display: flex; gap: 8px; align-items: center; color: var(--muted); }
.owner-bar select { width: auto; padding: 6px 8px; }
.owner-bar .status { margin: 0; }

/* fights in a report */
.group-nav { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: baseline; margin-bottom: 10px; font: 600 15px/1.3 var(--ui); }

/* picking fights from settings.txt */
.fight-list { border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 12px 14px; margin: 16px 0 0; }
.fight-list legend { font: 600 14px/1 var(--ui); color: var(--muted); padding: 0 6px; }
.fight-tools { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.fight-tools > span { flex: 1; }
.fights { list-style: none; margin: 0; padding: 0; max-height: 340px; overflow-y: auto; }
.fights li { display: flex; gap: 10px; align-items: center; padding: 7px 4px; border-bottom: 1px solid var(--line-soft); }
.fights li:last-child { border-bottom: 0; }
.fight-item { flex: 1; display: flex; gap: 10px; align-items: center; cursor: pointer; min-width: 0; }
.fight-item input { width: 18px; height: 18px; accent-color: var(--ember); flex: 0 0 auto; }
.fight-item span { min-width: 0; }
.fight-item b { font-weight: 600; }
.fight-item small { display: block; color: var(--faint); font-size: 13.5px; }
.fights select.res { width: auto; flex: 0 0 auto; padding: 6px 8px; font-size: 14px; }

/* developer docs */
.prose code { font-size: 14px; background: var(--raised); padding: 1px 5px; border-radius: 4px; }
.prose pre.raw code, .prose pre.raw { white-space: pre; overflow-x: auto; }
.prose li { margin: 6px 0; }

/* =========================================================
   Revamp (Nov 2026): hero, sticky header, addon suggestions
   ========================================================= */
:root { --ember-soft: color-mix(in srgb, var(--ember) 14%, transparent); }
body {
  background:
    radial-gradient(900px 420px at 15% -120px, color-mix(in srgb, var(--ember) 13%, transparent), transparent 70%),
    radial-gradient(700px 360px at 95% -80px, color-mix(in srgb, var(--s1) 9%, transparent), transparent 70%),
    var(--bg);
  background-repeat: no-repeat;
}
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.eyebrow { display: inline-block; font: 700 13px/1 var(--ui); letter-spacing: .09em; text-transform: uppercase; color: var(--ember); margin-bottom: 10px; }
.pill.ember { background: var(--ember-soft); color: var(--ember); }
.link-btn { background: none; border: 0; padding: 0; color: var(--faint); font: inherit; cursor: pointer; }
.link-btn:hover { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- home hero ---------- */
.hero { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 40px; align-items: center; padding: 18px 0 8px; }
.hero h1 { font-size: clamp(34px, 5.4vw, 54px); line-height: 1.04; letter-spacing: -.005em; }
.hero .lede { font-size: 17.5px; margin-top: 14px; }
.hero .btn-row { margin-top: 22px; }
.hero .btn { padding: 12px 20px; font-size: 17px; }
.hero-slim { display: block; padding-bottom: 0; }
.hero-slim h1 { font-size: clamp(32px, 4.6vw, 46px); }
.how { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 26px 0 0; padding: 0; color: var(--muted); font-size: 15px; }
.how li { display: flex; align-items: center; gap: 9px; }
.how li > b { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--raised); border: 1px solid var(--line); color: var(--ember); font: 700 13px/1 var(--ui); flex: none; }
.how li span b { color: var(--text); font-weight: 600; }
.hero-preview { margin: 0; background: linear-gradient(180deg, var(--raised), var(--surface)); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 16px 16px 18px; box-shadow: 0 24px 60px -28px rgba(0,0,0,.7), 0 0 0 1px rgba(255,255,255,.02) inset; transform: rotate(-.6deg); }
.hero-preview figcaption { display: flex; align-items: center; gap: 10px; font: 700 17px/1 var(--ui); margin-bottom: 12px; }
.hero-preview figcaption .faint { margin-left: auto; font-weight: 600; font-variant-numeric: tabular-nums; }
.hero-preview .meter-bar { background: var(--bg); }
.hero-preview .meter-row { grid-template-columns: 40px 1fr; }
.hero-preview .meter-rank { display: block; }
.upload-title { margin: 52px 0 0; scroll-margin-top: 80px; }
.upload-title + .upload { margin-top: 14px; }
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; gap: 28px; }
  .hero-preview { transform: none; }
}

/* ---------- addon cards ---------- */
.addon-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.addon-grid.wide { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.addon-card {
  display: flex; gap: 14px; align-items: flex-start; padding: 14px;
  background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--radius-lg);
  transition: border-color .15s, transform .15s, background-color .15s;
}
.addon-card:hover { border-color: color-mix(in srgb, var(--ember) 45%, var(--line)); transform: translateY(-2px); background: color-mix(in srgb, var(--raised) 55%, var(--surface)); }
.addon-card img { width: 72px; height: 72px; border-radius: 10px; flex: none; background: #000; }
.addon-card.compact img { width: 56px; height: 56px; border-radius: 8px; }
.addon-body { min-width: 0; display: flex; flex-direction: column; align-self: stretch; }
.addon-card h3 { font-size: 18px; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.addon-card h3 a { color: var(--text); }
.addon-card.compact h3 { font-size: 17px; }
.addon-cat { color: var(--faint); font: 600 13px/1.2 var(--ui); margin-top: 4px; }
.addon-card p { margin: 6px 0 10px; color: var(--muted); font-size: 14.5px; line-height: 1.45; }
.addon-get { margin-top: auto; font: 600 14.5px/1.2 var(--ui); }

/* suggestion band shown above the footer */
.addon-band { border-top: 1px solid var(--line-soft); background: linear-gradient(180deg, color-mix(in srgb, var(--surface) 70%, transparent), var(--bg)); padding: 34px 0 40px; }
.band-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px 20px; flex-wrap: wrap; margin-bottom: 16px; }
.band-head h2 { margin: 0; }
.band-actions { display: flex; gap: 16px; align-items: center; font: 600 15px/1 var(--ui); }
.addon-strip { margin-top: 52px; }

/* addons page */
.featured-addon {
  display: grid; grid-template-columns: 148px 1fr; gap: 26px; align-items: center; margin-top: 30px; padding: 22px;
  border-radius: var(--radius-lg); border: 1px solid color-mix(in srgb, var(--ember) 35%, var(--line));
  background: radial-gradient(500px 220px at 0% 0%, var(--ember-soft), transparent 70%), var(--surface);
}
.featured-addon img { width: 148px; height: 148px; border-radius: 14px; background: #000; }
.featured-addon h2 { font-size: 28px; margin-bottom: 8px; }
.featured-addon p { color: var(--muted); max-width: 64ch; margin: 0 0 16px; }
@media (max-width: 600px) { .featured-addon { grid-template-columns: 1fr; } .featured-addon img { width: 108px; height: 108px; } }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { background: transparent; border: 1px solid var(--line); color: var(--muted); border-radius: 999px; padding: 7px 13px; font: 600 14px/1 var(--ui); cursor: pointer; }
.chip:hover { color: var(--text); background: var(--raised); }
.chip[aria-pressed="true"] { background: var(--ember); border-color: var(--ember); color: var(--ember-ink); }
.steps { list-style: none; counter-reset: step; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin: 0; padding: 0; }
.steps li { counter-increment: step; background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--radius-lg); padding: 16px 16px 16px 58px; position: relative; color: var(--muted); font-size: 15px; }
.steps li::before { content: counter(step); position: absolute; left: 16px; top: 15px; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; background: var(--ember-soft); color: var(--ember); font: 700 15px/1 var(--ui); }
.steps li b { display: block; color: var(--text); font: 700 17px/1.2 var(--ui); margin-bottom: 4px; }
.steps code { font-size: 14px; background: var(--raised); padding: 1px 5px; border-radius: 4px; }

/* footer */
.site-footer { background: var(--surface); }
.footer-row { display: flex; align-items: center; gap: 10px 26px; flex-wrap: wrap; }
.footer-row p { margin: 0 0 0 auto; }
.brand.small { font-size: 17px; gap: 7px; }
.brand.small svg { width: 20px; height: 17px; }
.footer-links { display: flex; gap: 18px; flex-wrap: wrap; font: 600 15px/1 var(--ui); }
.footer-links a { color: var(--muted); }
.footer-links a:hover { color: var(--text); }
@media (max-width: 640px) { .footer-row p { margin-left: 0; flex-basis: 100%; } }
@media (max-width: 640px) { .site-header { position: static; } }
/* even rows: 4 picks on the home page, 3 in the suggestion band */
.addon-strip .addon-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.addon-band .addon-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (min-width: 980px) { .addon-strip .addon-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 760px) { .addon-band .addon-grid { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .addon-strip .addon-grid { grid-template-columns: 1fr; } }
/* sign-in required to upload */
.signin-gate { display: flex; align-items: center; gap: 16px 22px; flex-wrap: wrap; padding: 22px; border: 2px dashed var(--line); border-radius: var(--radius); background: var(--bg); }
.signin-gate > div { flex: 1 1 320px; }
.signin-gate h3 { font-size: 20px; margin-bottom: 6px; }
.signin-gate p { margin: 0; max-width: 62ch; }

/* ---- roster + gear (Better Fight Logs 1.5), attendance, shares ---- */
.pill.ilvl { background: color-mix(in srgb, var(--s1) 22%, var(--raised)); color: #9cc4ff; margin-left: 4px; }
.pill.pins { background: color-mix(in srgb, var(--heal) 20%, var(--raised)); color: var(--heal); }
.pill.auras { background: color-mix(in srgb, var(--threat) 22%, var(--raised)); color: #c9b0f0; }
.roster-strip { display: flex; flex-wrap: wrap; gap: 10px 26px; align-items: flex-start; margin-top: 12px; padding: 12px 16px; border: 1px solid var(--line-soft); border-radius: var(--radius-lg); background: var(--surface); font-size: 14.5px; }
.roster { flex: 1 1 320px; display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; color: var(--muted); }
.roster b { color: var(--text); font: 700 15px/1.2 var(--ui); }
.roster .names { color: var(--text); }
.roster .names .you { color: var(--ember); font-weight: 600; }
.roster .quiet { font-size: 13.5px; }
.gear { flex: 0 1 auto; }
.gear summary { cursor: pointer; display: flex; align-items: center; gap: 8px; list-style: none; }
.gear summary::-webkit-details-marker { display: none; }
.gear[open] summary .muted::after { content: " (hide)"; color: var(--faint); }
.gear-slots { list-style: none; margin: 10px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 6px; }
.gear-slots li { display: flex; justify-content: space-between; gap: 8px; padding: 5px 9px; border-radius: var(--radius-sm); background: var(--raised); border-left: 3px solid var(--rarity, var(--line)); font-size: 13.5px; }
.gear-slots li span { color: var(--muted); }
.gear-slots li b { color: var(--rarity, var(--text)); font-variant-numeric: tabular-nums; }
.rarity-common { --rarity: #d8d8d8; } .rarity-gray, .rarity-poor, .rarity-junk { --rarity: #8f8f8f; }
.rarity-uncommon, .rarity-green { --rarity: #1eff00; } .rarity-rare, .rarity-blue { --rarity: #3c8dff; }
.rarity-epic, .rarity-purple { --rarity: #a335ee; } .rarity-legendary, .rarity-orange { --rarity: #ff8000; }
.rarity-mythic, .rarity-artifact { --rarity: #e6cc80; }
.bar-cell { width: 160px; }
.mini-bar { display: block; height: 8px; border-radius: 4px; background: var(--raised); overflow: hidden; min-width: 90px; }
.mini-bar i { display: block; height: 100%; background: var(--ember); border-radius: 4px; }
.plain-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.share-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(260px, 1fr); gap: 18px; align-items: start; margin-top: 22px; }
.share-form textarea { width: 100%; min-height: 150px; resize: vertical; font-family: ui-monospace, Consolas, monospace; font-size: 13px; }
.share-how { background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--radius-lg); padding: 18px 20px; }
.share-how h3 { margin: 0 0 10px; font: 700 18px/1.2 var(--ui); }
.how-list { margin: 0; padding-left: 18px; color: var(--muted); font-size: 14.5px; display: grid; gap: 10px; }
.how-list b { color: var(--text); }
.how-list code { background: var(--raised); padding: 1px 5px; border-radius: 4px; font-size: 13px; }
.raw-string summary { cursor: pointer; color: var(--muted); }
.raw-string pre { margin-top: 10px; max-height: 320px; overflow: auto; word-break: break-all; white-space: pre-wrap; }
.addon-card.soon { opacity: .85; }
.addon-card.soon img { filter: saturate(.6); }
@media (max-width: 760px) { .share-grid { grid-template-columns: 1fr; } .bar-cell { display: none; } }

/* Better Fight Logs 1.7 dungeon runs (report page) */
.run-facts { margin: 14px 0 0; padding: 0 0 0 18px; color: var(--text); line-height: 1.7; }
.run-facts li.muted { color: var(--muted); }
tr.me td { background: var(--surface); }
#run-tools { justify-content: flex-start; flex-wrap: wrap; gap: 8px; }
#run-tools > span { flex: 0 0 auto; margin-right: 4px; }

/* ---------- dungeon leaderboards (Better Fight Logs 1.8 timed runs) ---------- */
.board td small { display: block; color: var(--muted); font-size: 13px; margin-top: 2px; }
.board td { vertical-align: top; }
.board .pill { margin: 0 4px 4px 0; }
.board details.splits { margin-top: 6px; font-size: 13px; color: var(--muted); }
.board details.splits summary { cursor: pointer; }
.pill.medal { font-weight: 700; }
.pill.medal-gold { color: #241703; background: #e9c25b; border-color: #e9c25b; }
.pill.medal-silver { color: #1b1f24; background: #c4ccd4; border-color: #c4ccd4; }
.pill.medal-bronze { color: #1f1206; background: #c58b54; border-color: #c58b54; }
.runs-notice { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin: 14px 0; }
.runs-notice span { flex: 1 1 320px; }

/* Better Fight Logs 1.9: training dummy tests (log page "Measured for the sim") */
.pill.dummy-pill { background: rgba(218, 94, 190, 0.16); color: #f0a6dc; border-color: rgba(218, 94, 190, 0.45); vertical-align: middle; }
.dummy-sim { margin: 18px 0 26px; }
.dummy-sim h2 { margin: 0 0 6px; }
.dummy-sim .dummy-key td:first-child { color: var(--muted, #a9a39a); width: 34%; }
.dummy-sim table { margin-top: 10px; }
.dummy-sim details { margin-top: 14px; }
.dummy-sim .r small { display: block; opacity: 0.7; }

/* ---------- header: "More" menu ---------- */
.nav-more { position: relative; display: flex; }
.nav-more-btn { background: none; border: 0; cursor: pointer; color: var(--muted); font: 600 15px/1 var(--ui); padding: 9px 11px; border-radius: var(--radius-sm); }
.nav-more-btn:hover, .nav-more.open .nav-more-btn { color: var(--text); background: var(--raised); }
.nav-more.has-current .nav-more-btn { color: var(--text); box-shadow: inset 0 -2px 0 var(--ember); border-radius: 0; }
.nav-menu { display: none; position: absolute; top: calc(100% + 6px); left: 0; z-index: 30; min-width: 160px; flex-direction: column; gap: 2px; padding: 6px;
  background: var(--raised); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 18px 40px -18px rgba(0,0,0,.8); }
.nav-more.open .nav-menu { display: flex; }
.nav-menu a:hover { background: var(--surface); }
@media (max-width: 640px) {
  .nav { gap: 0 2px; }
  .nav a { padding: 8px 9px; font-size: 14.5px; }
  .nav-more, .nav-menu { display: contents; }
  .nav-more-btn { display: none; }
}

/* ---------- item database, item pages, auction prices ---------- */
.rarity-vanity { --rarity: #e68fd0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.item-icon { flex: none; border-radius: 6px; background: var(--bg); border: 1px solid color-mix(in srgb, var(--rarity, var(--line)) 55%, var(--line)); object-fit: contain; }
.item-icon.none { display: inline-grid; place-items: center; color: var(--faint); font: 700 14px/1 var(--ui); }
.item-filters { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; margin-top: 22px; }
.item-filters .field { flex: 1 1 150px; margin: 0; }
.item-filters .field.grow { flex: 3 1 260px; }
.field.inline { display: inline-flex; align-items: center; gap: 10px; margin: 0; }
.field.inline span { margin: 0; }
.field.inline select, .field.inline input { width: auto; min-width: 200px; }
.item-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 8px; margin-top: 10px; }
.item-list .empty { grid-column: 1 / -1; }
.item-row { display: flex; align-items: center; gap: 12px; padding: 8px 12px 8px 8px; min-width: 0; background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--radius); color: var(--text); }
.item-row:hover { text-decoration: none; background: var(--raised); border-color: var(--line); }
.item-name { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; }
.item-name b { font: 600 16px/1.2 var(--ui); color: var(--rarity, var(--text)); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item-name small { color: var(--faint); font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item-price { flex: none; font-size: 14px; }
.money { white-space: nowrap; font-variant-numeric: tabular-nums; }
.coin i { font-style: normal; font-weight: 600; margin-left: 1px; }
.coin.g i { color: #e9c25b; } .coin.s i { color: #c4ccd4; } .coin.c i { color: #c58b54; }
.item-ref { display: inline-flex; align-items: center; gap: 7px; color: var(--rarity, var(--text)); vertical-align: middle; }
.item-ref b { color: var(--muted); font-weight: 600; }
td.refs .item-ref { margin: 0 14px 4px 0; }
.rar-name { color: var(--rarity, var(--text)); }
.chip.rar-chip { color: var(--rarity, var(--muted)); }
.chip.rar-chip[aria-pressed="true"] { background: color-mix(in srgb, var(--rarity) 22%, var(--raised)); border-color: var(--rarity); color: var(--rarity); }
.crumbs { margin: 0 0 18px; color: var(--faint); font: 600 14.5px/1 var(--ui); }
.item-head { display: flex; gap: 18px; align-items: flex-start; }
.item-head h1 { color: var(--rarity, var(--text)); font-size: clamp(28px, 4.4vw, 40px); }
.item-head .item-icon { border-radius: 10px; border-width: 2px; }
.item-desc { margin: 8px 0 0; max-width: 68ch; }
.item-flavor { margin: 6px 0 0; color: #d9b25f; font-style: italic; max-width: 68ch; }
.item-head .btn-row { margin-top: 12px; }
.item-head .btn-row:empty { display: none; }
.item-facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); margin: 22px 0 0; background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--radius); overflow: hidden; }
.item-facts > div { padding: 11px 14px; box-shadow: 1px 0 0 var(--line-soft), 0 1px 0 var(--line-soft); }
.item-facts dt { color: var(--muted); font: 600 13px/1 var(--ui); margin-bottom: 6px; }
.item-facts dd { margin: 0; font-size: 15px; }
.price-box { display: flex; flex-wrap: wrap; gap: 18px 40px; align-items: center; margin-top: 22px; padding: 16px 18px; background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--radius-lg); }
.price-box .eyebrow { margin-bottom: 6px; }
.price-big { font: 700 28px/1.1 var(--ui); }
.price-box p { margin: 6px 0 0; }
#price > p { margin: 18px 0 0; }
.spark { vertical-align: middle; color: var(--muted); }
.spark.up { color: var(--heal); } .spark.down { color: var(--taken); }
.level-table td, .level-table th { padding: 7px 10px; }
.level-table tr.here td { background: var(--ember-soft); }
.level-table tr.here td:first-child { box-shadow: inset 3px 0 0 var(--ember); }
.th-sort { background: none; border: 0; padding: 0; color: inherit; font: inherit; cursor: pointer; }
.th-sort:hover { color: var(--text); }
.th-sort[aria-sort="ascending"]::after { content: " ▲"; font-size: 10px; color: var(--ember); }
.th-sort[aria-sort="descending"]::after { content: " ▼"; font-size: 10px; color: var(--ember); }
.price-table td { vertical-align: middle; }
@media (max-width: 640px) {
  .item-head { gap: 12px; }
  .item-head .item-icon { width: 52px; height: 52px; }
  .field.inline select, .field.inline input { min-width: 0; width: 100%; }
  .item-list { grid-template-columns: 1fr; }
}

/* ---------- dummy test: estimated resource ---------- */
.dummy-est { margin: 18px 0 24px; }
.dummy-est h3 { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.dummy-est .chips { display: inline-flex; }
.dummy-est .chip { padding: 5px 11px; font-size: 13px; }
.dummy-est .dummy-key td b { font-variant-numeric: tabular-nums; }
.price-table td.faint, .price-table .item-ref { white-space: nowrap; }

/* a small count next to a link: something is waiting for you there */
.count-badge { display: inline-block; min-width: 18px; padding: 0 5px; box-sizing: border-box; border-radius: 9px; background: var(--ember); color: var(--ember-ink); font: 700 12px/18px var(--ui); text-align: center; vertical-align: 1px; }

/* front page: one card per part of the site */
.home-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 14px; }
.home-card { display: flex; gap: 14px; align-items: flex-start; padding: 18px; border: 1px solid var(--line-soft); border-radius: var(--radius-lg); background: var(--surface); color: var(--text); text-decoration: none; transition: border-color .12s, transform .12s, background .12s; }
.home-card:hover, .home-card:focus-visible { border-color: var(--ember); background: var(--raised); transform: translateY(-2px); }
.home-card svg { width: 34px; height: 34px; flex: none; fill: var(--ember); stroke: var(--ember); margin-top: 2px; }
.home-card h3 { font: 700 19px/1.2 var(--ui); margin: 0 0 5px; }
.home-card p { margin: 0 0 9px; color: var(--muted); font-size: 14.5px; line-height: 1.45; }
.home-card .go { font: 600 14px var(--ui); color: var(--ember); }
.home-card .go::after { content: " \2192"; }
@media (prefers-reduced-motion: reduce) { .home-card { transition: none; } .home-card:hover { transform: none; } }

/* front page: the two founders */
.founders { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 14px; max-width: 760px; }
.founder { display: flex; gap: 14px; align-items: center; padding: 16px 18px; border: 1px solid var(--line-soft); border-radius: var(--radius-lg); background: var(--surface); color: var(--text); text-decoration: none; transition: border-color .12s, background .12s; }
.founder:hover, .founder:focus-visible { border-color: var(--ember); background: var(--raised); }
.founder img, .founder-initial { width: 52px; height: 52px; border-radius: 50%; flex: none; }
.founder-initial { display: grid; place-items: center; background: var(--raised); border: 1px solid var(--line); color: var(--ember); font: 700 22px var(--ui); }
.founder b { display: block; font: 700 19px/1.2 var(--ui); }
.founder small { display: block; color: var(--muted); font-size: 14px; line-height: 1.4; margin: 2px 0 4px; }
.founder em { font: 600 13.5px var(--ui); font-style: normal; color: var(--ember); }
.founder em::after { content: " \2197"; }
.site-footer p a { color: var(--muted); }
.site-footer p a:hover { color: var(--ember); }

/* log page: "What could be better" */
.insights { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.insights li { display: flex; gap: 12px; align-items: baseline; background: var(--surface); border: 1px solid var(--line-soft); border-left: 3px solid var(--line); border-radius: var(--radius); padding: 10px 14px; line-height: 1.5; }
.insights li.warn { border-left-color: var(--ember); }
.insights li.good { border-left-color: var(--heal); }
.insights .tag { flex: none; width: 58px; font: 700 12px/1.6 var(--ui); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.insights li.warn .tag { color: var(--ember); }
.insights li.good .tag { color: var(--heal); }
