:root {
  --bg: #f6f7f9; --card: #ffffff; --text: #16181d; --muted: #646b78; --border: #e1e4ea;
  --accent: #b7791f; --good: #1f7a3a; --bad: #b42318; --warn-bg: #fff7e6;
  --p0: #8a8f98; --p1: #1f9d55; --p2: #2563eb; --p3: #9333ea;
  --bar-you: #b7791f; --bar-top: #8a8f98;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d0f13; --card: #161a21; --text: #e8eaee; --muted: #9aa1ad; --border: #262c36;
    --accent: #f0b44c; --good: #4ade80; --bad: #f87171; --warn-bg: #2a2110;
    --p0: #9aa1ad; --p1: #4ade80; --p2: #60a5fa; --p3: #c084fc;
    --bar-you: #f0b44c; --bar-top: #5b6372;
  }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; }
a { color: var(--accent); }
main { max-width: 1180px; margin: 0 auto; padding: 16px; display: flex; flex-direction: column; gap: 16px; }
footer { max-width: 1180px; margin: 0 auto; padding: 16px; color: var(--muted); font-size: 12px; }
.topbar { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--border); background: var(--card); flex-wrap: wrap; gap: 8px; }
.topbar nav { display: flex; gap: 16px; }
.topbar a { text-decoration: none; }
.brand { font-weight: 700; color: var(--text) !important; }
h1 { margin: 0; font-size: 24px; }
h2 { margin: 0 0 10px; font-size: 17px; }
h3 { margin: 14px 0 6px; font-size: 14px; color: var(--muted); }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.good { color: var(--good); }
.bad { color: var(--bad); font-weight: 600; }
.warn { background: var(--warn-bg); padding: 10px 12px; border-radius: 8px; }
.card { background: var(--card); border: 1px solid var(--border); border-radius: 10px; padding: 16px; min-width: 0; }
.hero { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 12px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 800px) { .grid2 { grid-template-columns: 1fr; } }
.row { display: flex; gap: 8px; }
.grow { flex: 1; min-width: 0; }
input, button { font: inherit; padding: 7px 10px; border-radius: 7px; border: 1px solid var(--border); background: var(--bg); color: var(--text); }
button, .button { background: var(--accent); color: #111; border: 0; font-weight: 600; cursor: pointer; text-decoration: none; display: inline-block; padding: 7px 12px; border-radius: 7px; }
.button.secondary { background: transparent; color: var(--accent); padding-left: 0; }
.button.small { padding: 3px 8px; font-size: 13px; }
.charform { display: flex; gap: 6px; flex-wrap: wrap; }
.charform input { width: 150px; }
.list { list-style: none; padding: 0; margin: 0; }
.list li { padding: 5px 0; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; gap: 8px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 6px 8px; text-align: left; border-bottom: 1px solid var(--border); vertical-align: top; }
th { color: var(--muted); font-weight: 600; white-space: nowrap; }
td { font-variant-numeric: tabular-nums; }
.parse { font-weight: 700; }
.parse.p0 { color: var(--p0); } .parse.p1 { color: var(--p1); } .parse.p2 { color: var(--p2); } .parse.p3, .parse.p4 { color: var(--p3); }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.kpi { background: var(--card); border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; display: flex; flex-direction: column; }
.kpi span { color: var(--muted); font-size: 12px; }
.kpi strong { font-size: 22px; font-variant-numeric: tabular-nums; }
.kpi em { font-style: normal; font-size: 13px; color: var(--muted); }
.kpi em.bad { color: var(--bad); } .kpi em.good { color: var(--good); }
.findings { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; }
.findings li span { display: block; color: var(--muted); font-size: 13px; }
.findings li.sev3::marker { color: var(--bad); font-weight: 700; }
.findings li.sev2::marker { color: var(--accent); font-weight: 700; }
.dual { width: 140px; display: flex; flex-direction: column; gap: 2px; }
.dual i, .dual b { display: block; height: 5px; border-radius: 3px; }
.dual i { background: var(--bar-you); } .dual b { background: var(--bar-top); }
/* rotation timeline */
.tl { display: flex; flex-direction: column; gap: 4px; }
.tl-row { display: flex; align-items: center; gap: 8px; }
.tl-label { width: 150px; flex: none; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tl-track { position: relative; flex: 1; height: 22px; border-bottom: 1px solid var(--border); }
.tl-row.axis .tl-track { border: 0; height: 16px; }
.tl-tick { position: absolute; top: 0; font-size: 10px; color: var(--muted); transform: translateX(-50%); }
.tl-end { position: absolute; top: 0; bottom: 0; border-left: 1px dashed var(--muted); opacity: .5; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; }
.tl-track .dot { position: absolute; transform: translateX(-50%); }
.dot.me { background: var(--bar-you); }
.dot.top { background: var(--bar-top); }
.tl-track .dot.me { top: 3px; }
.tl-track .dot.top { top: 12px; }
.tick, .waste-key { display: inline-block; width: 2px; height: 12px; background: var(--bad); }
.tl-track .tick { position: absolute; top: 5px; opacity: .8; }
.idle, .idle-key { display: inline-block; height: 10px; width: 14px; background: var(--bad); opacity: .35; border-radius: 2px; }
.tl-track .idle { position: absolute; top: 6px; }
.opener { margin: 0 0 8px; padding-left: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 13px; counter-reset: s; }
.opener li { counter-increment: s; }
.opener li::before { content: counter(s) ". "; color: var(--muted); }
@media (max-width: 600px) { .tl-label { width: 90px; } }
textarea, select { font: inherit; padding: 7px 10px; border-radius: 7px; border: 1px solid var(--border); background: var(--bg); color: var(--text); }
textarea { width: 100%; font-family: ui-monospace, Menlo, monospace; font-size: 12px; }
.stack { display: flex; flex-direction: column; gap: 8px; }
.talent-row { padding: 6px 0; border-bottom: 1px solid var(--border); }
.row.wrap { flex-wrap: wrap; gap: 8px 16px; align-items: center; }
label { font-size: 14px; }
pre { white-space: pre-wrap; background: var(--bg); padding: 8px; border-radius: 6px; }
code { background: var(--bg); padding: 1px 5px; border-radius: 4px; }
/* progress */
.progress-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(420px, 1fr)); gap: 16px; }
@media (max-width: 500px) { .progress-grid { grid-template-columns: 1fr; } }
.spark { width: 100%; height: 90px; display: block; margin-bottom: 8px; }
.spark .grid { stroke: var(--border); stroke-width: 1; }
.spark .axis { fill: var(--muted); font-size: 8px; text-anchor: end; }
.spark .line { fill: none; stroke: var(--bar-you); stroke-width: 2; stroke-linejoin: round; }
.spark .dot { fill: var(--bar-you); stroke: var(--card); stroke-width: 2; }
.spark .hit { fill: transparent; }
.spark .pt:hover .dot { r: 5; }
.nowrap { white-space: nowrap; }
.tl-track .idle.away { background: var(--accent); opacity: .45; }
.spark .line.alt { stroke: var(--bar-top); }
tr.me-row td { background: color-mix(in srgb, var(--accent) 10%, transparent); }
/* training lanes */
.lanes { display: flex; flex-direction: column; gap: 10px; }
.lane { display: flex; gap: 10px; align-items: center; }
.lane-label { width: 210px; flex: none; font-size: 13px; line-height: 1.3; }
.lane-track { position: relative; flex: 1; height: 34px; border-bottom: 1px solid var(--border); }
.lane.axis .lane-track { height: 16px; border: 0; }
.lane-track .press { position: absolute; top: 9px; height: 22px; border-radius: 3px; font-size: 10px; line-height: 22px;
  text-align: center; color: #111; overflow: hidden; box-shadow: 0 0 0 1px var(--card); }
.lane-track .press.off { top: 0; height: 9px; font-size: 0; }
.press.spender, .key.spender { background: #e8b84a; } .press.builder, .key.builder { background: #6fa8dc; }
.press.cooldown, .key.cooldown { background: #b48ce0; } .press.other, .key.other { background: #8a8f98; }
.lane-track .gap, .key.gap { position: absolute; top: 9px; height: 22px; background: repeating-linear-gradient(45deg, rgba(220,70,60,.35) 0 4px, transparent 4px 8px); border-radius: 3px; }
.key { display: inline-block; width: 12px; height: 10px; border-radius: 2px; margin: 0 4px 0 10px; vertical-align: middle; position: static !important; }
@media (max-width: 700px) { .lane { flex-direction: column; align-items: stretch; } .lane-label { width: auto; } }
.lane-track .fail { position: absolute; top: 31px; width: 2px; height: 6px; background: var(--bad); }
.key.fail-key { background: var(--bad); width: 3px; }
/* icons (icons.py) */
a.wh { display: inline-flex; align-items: center; gap: 5px; text-decoration: none; vertical-align: middle; }
a.wh span { text-decoration: underline; text-decoration-color: color-mix(in srgb, currentColor 35%, transparent); }
.ico { border-radius: 3px; box-shadow: 0 0 0 1px rgba(0,0,0,.6); flex: none; }
.q3 { color: #3a8ee6; } .q4 { color: #a65bea; } .q5 { color: #ff8000; }
/* training blocks as icons: coloured bottom edge = category */
.lane-track .press { display: block; padding: 0; border-bottom: 3px solid transparent; background: var(--card) !important; color: var(--text); }
.lane-track .press img { width: 100%; height: 19px; object-fit: cover; display: block; border-radius: 2px; }
.lane-track .press.spender { border-color: #e8b84a; } .lane-track .press.builder { border-color: #6fa8dc; }
.lane-track .press.cooldown { border-color: #b48ce0; } .lane-track .press.other { border-color: #8a8f98; }
.lane-track .press.off { top: -12px; height: 18px; border-bottom-width: 2px; }
.lane-track .press.off img { height: 16px; }
.lane-track { height: 40px; }
.button.secondary-btn { background: transparent; color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
/* talent trees */
.trees { display: flex; gap: 18px; flex-wrap: wrap; justify-content: center; overflow-x: auto; padding-bottom: 6px; }
.tree { background: radial-gradient(ellipse at top, color-mix(in srgb, var(--accent) 8%, transparent), transparent 70%); border-radius: 10px; }
.tree-title { text-align: center; font-family: var(--font-display); text-transform: uppercase; letter-spacing: .08em; font-size: 13px; color: var(--muted); margin-top: 4px; }
.tree-canvas { position: relative; }
.tree-links { position: absolute; inset: 0; }
.tree-links line { stroke: var(--border); stroke-width: 2; }
.tree-links line.on { stroke: #c9a23a; stroke-width: 2.5; }
.tnode { position: absolute; width: 36px; height: 36px; transform: translate(-50%, -50%); display: block; }
.tnode img { width: 100%; height: 100%; display: block; }
.tnode.passive img { border-radius: 50%; }
.tnode.active img { border-radius: 6px; }
.tnode.choice img { clip-path: polygon(30% 0, 70% 0, 100% 30%, 100% 70%, 70% 100%, 30% 100%, 0 70%, 0 30%); }
.tnode.sel { filter: drop-shadow(0 0 0 #e8b84a) drop-shadow(0 0 3px rgba(232,184,74,.75)); }
.tnode.sel.passive img, .tnode.sel.active img { box-shadow: 0 0 0 2px #e8b84a; }
.tnode.off img { filter: grayscale(1) brightness(.45); }
.trank { position: absolute; right: -6px; bottom: -6px; font-size: 9px; background: #111; color: #e8b84a; border-radius: 3px; padding: 0 3px; line-height: 13px; }
.tpct { position: absolute; left: 50%; top: -15px; transform: translateX(-50%); font-size: 9px; font-weight: 700; line-height: 12px; padding: 0 3px; border-radius: 3px; background: #0b0d12; }
.tpct.hi, .tpct-key.hi { color: #4ade80; } .tpct.mid, .tpct-key.mid { color: #f0b44c; } .tpct.lo, .tpct-key.lo { color: #f87171; }
.tpct-key { font-weight: 700; }

/* ===================================================================================================
   Design system v2 (SKTools-inspired): dark, condensed uppercase display type, coloured section bars
   =================================================================================================== */
:root {
  --bg: #0a0d12; --card: #11151d; --card-2: #151a24; --text: #e7eaf0; --muted: #8a93a4; --border: #1d2431;
  --accent: #e8b84a; --accent-2: #4fd1c5; --good: #4ade80; --bad: #f87171; --warn-bg: #2a2110;
  --bar-you: #e8b84a; --bar-top: #5b6372;
  --crit: #ef5350; --haste: #4ade80; --mastery: #b48cf2; --vers: #9aa4b2;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-display: "Oswald", "Inter", sans-serif;
}
@media (prefers-color-scheme: light) {
  :root { --bg: #f4f5f8; --card: #ffffff; --card-2: #f7f8fa; --text: #151821; --muted: #5d6575; --border: #e2e5eb;
          --accent: #a87412; --accent-2: #0e8a80; --good: #1f7a3a; --bad: #b42318; --warn-bg: #fff7e6; --bar-top: #8a8f98; }
}
body { font-family: var(--font-body); background: var(--bg);
  background-image: radial-gradient(1200px 500px at 70% -10%, color-mix(in srgb, var(--accent-2) 7%, transparent), transparent 60%); }
h1 { font-family: var(--font-display); text-transform: uppercase; letter-spacing: .03em; font-weight: 600; font-size: 30px; }
.card { background: var(--card); border-color: var(--border); border-radius: 12px; }
.card > h2, .card > .row > h2 { font-family: var(--font-display); text-transform: uppercase; letter-spacing: .08em; font-weight: 600;
  font-size: 17px; display: flex; align-items: center; gap: 10px; }
.card > h2::before { content: ""; width: 3px; height: 18px; border-radius: 2px; background: var(--accent-2); flex: none; }
h3 { font-family: var(--font-display); text-transform: uppercase; letter-spacing: .08em; font-weight: 500; font-size: 13px; }
.topbar { background: color-mix(in srgb, var(--bg) 85%, transparent); backdrop-filter: blur(8px); position: sticky; top: 0; z-index: 10; }
.brand { font-family: var(--font-display); letter-spacing: .12em; font-size: 18px; display: inline-flex; align-items: center; gap: 8px; }
.brand-mark { width: 8px; height: 20px; border-radius: 4px; background: linear-gradient(var(--accent-2), color-mix(in srgb, var(--accent-2) 40%, transparent)); }
.topbar nav a { color: var(--muted); font-weight: 500; }
.topbar nav a:hover { color: var(--text); }
.kpi { background: var(--card); border-radius: 12px; }
.kpi strong { font-family: var(--font-display); font-weight: 600; font-size: 26px; letter-spacing: .02em; }
.kpi span { text-transform: uppercase; letter-spacing: .08em; font-size: 11px; }
button, .button { border-radius: 8px; }
th { text-transform: uppercase; letter-spacing: .06em; font-size: 11px; }

/* jump-to pill bar */
.jump { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; background: var(--card); border: 1px solid var(--border);
  border-radius: 12px; padding: 10px 14px; }
.jump span { font-family: var(--font-display); text-transform: uppercase; letter-spacing: .1em; font-size: 12px; color: var(--muted); margin-right: 6px; }
.jump a { font-family: var(--font-display); text-transform: uppercase; letter-spacing: .08em; font-size: 12px; text-decoration: none;
  color: var(--text); background: var(--card-2); border: 1px solid var(--border); padding: 5px 12px; border-radius: 8px; }
.jump a:hover { border-color: var(--accent-2); }

/* character hero */
.char-hero { position: relative; display: grid; grid-template-columns: minmax(200px, 340px) 1fr; gap: 24px; align-items: center;
  background: linear-gradient(120deg, color-mix(in srgb, var(--class) 22%, var(--card)) 0%, var(--card) 55%);
  border: 1px solid var(--border); border-radius: 16px; padding: 12px 24px; overflow: hidden; min-height: 300px; }
.char-render { width: 100%; max-height: 380px; object-fit: contain; object-position: center bottom; filter: drop-shadow(0 10px 20px rgba(0,0,0,.5)); }
.char-avatar { width: 120px; border-radius: 12px; }
.eyebrow { font-family: var(--font-display); text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-size: 14px; }
.char-name { font-size: 64px; line-height: 1; margin: 4px 0 6px; color: var(--class); letter-spacing: .02em; }
.faction.alliance { color: #60a5fa; } .faction.horde { color: #f87171; }
.char-tiles { display: flex; gap: 10px; margin: 14px 0; flex-wrap: wrap; }
.ctile { background: rgba(0,0,0,.35); border: 1px solid var(--border); border-radius: 10px; padding: 10px 16px; min-width: 130px; }
.ctile span { display: block; font-family: var(--font-display); text-transform: uppercase; letter-spacing: .1em; font-size: 11px; color: var(--muted); }
.ctile strong { font-family: var(--font-display); font-size: 30px; font-weight: 600; color: var(--accent); }
@media (max-width: 760px) { .char-hero { grid-template-columns: 1fr; } .char-name { font-size: 44px; } .char-render { max-height: 240px; } }

/* stat tiles */
.stat-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.stile { display: flex; gap: 12px; align-items: center; background: var(--card-2); border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; }
.stile img { width: 38px; height: 38px; border-radius: 8px; }
.stile span { display: block; font-family: var(--font-display); text-transform: uppercase; letter-spacing: .1em; font-size: 12px; }
.stile strong { font-family: var(--font-display); font-size: 28px; font-weight: 600; margin-right: 6px; }
.stile em { font-style: normal; color: var(--muted); font-size: 13px; }
.stile.crit span { color: var(--crit); } .stile.haste span { color: var(--haste); } .stile.mastery span { color: var(--mastery); } .stile.vers span { color: var(--vers); }

/* gear grid */
.gear-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px; }
@media (max-width: 760px) { .gear-grid { grid-template-columns: 1fr; } }
.gear-col { display: flex; flex-direction: column; gap: 8px; }
.gear-item { display: flex; gap: 12px; background: var(--card-2); border: 1px solid var(--border); border-radius: 10px; padding: 8px 10px; min-height: 64px; }
.gear-icon { position: relative; flex: none; }
.gear-icon .ico-medium { width: 46px; height: 46px; border-radius: 6px; }
.gear-icon .ilvl { position: absolute; right: -4px; bottom: -4px; background: #000c; color: #fff; font-size: 11px; font-weight: 600; padding: 0 4px; border-radius: 4px; }
.gear-icon .ilvl.low { color: var(--bad); }
.gear-text { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.gear-text .slot { font-family: var(--font-display); text-transform: uppercase; letter-spacing: .1em; font-size: 11px; color: var(--muted); }
.gear-text .gname { font-weight: 600; }
.gear-text .genchant { font-size: 12px; } .gear-text .genchant a.wh span { color: var(--good); }
.gear-text .ggems { display: flex; gap: 8px; flex-wrap: wrap; font-size: 12px; }
.char-render { height: 400px; width: 100%; object-fit: cover; object-position: 50% 28%; transform: scale(1.35); transform-origin: 50% 35%; max-height: none; }
.char-hero > :first-child { align-self: stretch; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.gear-text .genchant { color: var(--good); }
/* links: colour carries meaning (item quality, green enchants/gems), no underline noise */
a.wh span { text-decoration: none; }
a.wh:hover span { text-decoration: underline; }
a.wh:not(:has(.q3)):not(:has(.q4)):not(:has(.q5)) span { color: var(--text); }
.gear-text .genchant a.wh span, .gear-text .ggems a.wh span { color: var(--good) !important; }
/* gear advice */
.advice-list { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; }
.adv-tag { display: inline-block; font-family: var(--font-display); text-transform: uppercase; letter-spacing: .08em; font-size: 11px;
  padding: 1px 7px; border-radius: 6px; margin-right: 6px; background: var(--card-2); border: 1px solid var(--border); }
.adv-upgrade .adv-tag { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 40%, transparent); }
.adv-replace .adv-tag { color: var(--accent); } .adv-enchant .adv-tag, .adv-gem .adv-tag { color: var(--accent-2); }
.adv-swap .adv-tag { color: var(--muted); }
.verdict { margin-bottom: 4px; } .verdict.adv-ok { color: var(--good); } .verdict.adv-upgrade { color: var(--bad); }
.verdict.adv-replace { color: var(--accent); } .verdict.adv-swap { color: var(--muted); }

/* Header character search */
.char-search input { width: 220px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--border); background: var(--card); color: var(--text); font: inherit; font-size: 13px; }
.char-search input:focus { outline: none; border-color: var(--accent-2); }
@media (max-width: 720px) { .char-search, .char-search input { width: 100%; } }

/* Phone widths: nothing may push the page wider than the screen */
main > * { min-width: 0; max-width: 100%; }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.char-tiles { flex-wrap: wrap; }
.stat-tiles { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.gear-name, .gname { overflow-wrap: anywhere; }
@media (max-width: 760px) {
  main { padding: 12px; }
  .topbar { padding: 10px 12px; }
  .topbar nav { width: 100%; overflow-x: auto; white-space: nowrap; gap: 14px; scrollbar-width: none; -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); mask-image: linear-gradient(90deg, #000 85%, transparent); }
  .topbar nav::-webkit-scrollbar { display: none; }
  .char-hero { grid-template-columns: minmax(0, 1fr); padding: 16px; }
  .char-name { font-size: 36px; overflow-wrap: anywhere; }
  .ctile { min-width: 0; flex: 1 1 100px; padding: 8px 12px; }
  .stile strong { font-size: 22px; }
  .card { padding: 12px; }
  .jump { overflow-x: auto; flex-wrap: nowrap; white-space: nowrap; scrollbar-width: none; }
  .tree-wrap, .trees { overflow-x: auto; }
}

/* Talent trees: enlarge to full screen */
.trees-bar { display: flex; justify-content: flex-end; margin-bottom: 6px; }
.trees-box.full { position: fixed; inset: 0; z-index: 50; background: var(--bg); padding: 12px 20px; overflow: auto; }
.trees-box.full .trees { flex-wrap: nowrap; justify-content: center; overflow: visible; width: max-content; margin: 0 auto; }
.secondary-btn.small, button.small { padding: 4px 12px; font-size: 13px; }

/* Crafting quality icon after an enchant name */
.rank-ico { width: 16px; height: 16px; vertical-align: -3px; margin-left: 3px; }
.src { display: block; color: var(--muted); font-size: 12px; }
.adv-target { display: inline-flex; gap: 6px; align-items: center; margin-left: 4px; }
.pop { display: grid; grid-template-columns: 36px 1fr; gap: 0 4px; margin-bottom: 6px; } .pop b { font-weight: 600; }

/* Home: Tonight panel */
.tonight-grid { display: grid; grid-template-columns: 1.3fr 1.2fr .8fr; gap: 24px; }
@media (max-width: 1000px) { .tonight-grid { grid-template-columns: 1fr; } }
.tonight h3 { font-family: var(--font-display); text-transform: uppercase; letter-spacing: .06em; font-size: 14px; color: var(--muted); margin: 0 0 10px; }
.focus-list { margin: 0 0 14px; padding-left: 22px; display: flex; flex-direction: column; gap: 10px; }
.focus-list li::marker { color: var(--accent-2); font-weight: 700; }
.focus-list strong { display: block; }
.focus-list span { color: var(--muted); font-size: 14px; }
.night-stats { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.night-stats > div { background: var(--bg); border: 1px solid var(--border); border-radius: 8px; padding: 6px 10px; min-width: 84px; }
.night-stats span { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.night-stats strong { font-size: 18px; }
.night-stats em { display: block; font-style: normal; font-size: 11px; color: var(--muted); }
.chase { margin-bottom: 12px; }
.chase-where { font-weight: 600; margin-bottom: 4px; }
.chase-item { padding-left: 10px; margin: 2px 0; }
.checklist { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.checklist label { display: flex; gap: 8px; align-items: center; cursor: pointer; }
.checklist input:checked + * , .checklist label:has(input:checked) { color: var(--muted); text-decoration: line-through; }

/* Tables with class="cards-on-phone" become one card per row on phones (cells carry data-label) */
.only-stack { display: none; }
@media (max-width: 700px) {
  table.cards-on-phone thead { display: none; }
  table.cards-on-phone, table.cards-on-phone tbody { display: block; }
  table.cards-on-phone tr { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px 12px; padding: 12px 0; border-bottom: 1px solid var(--border); }
  table.cards-on-phone td { display: block; border: 0; padding: 0; }
  table.cards-on-phone td[data-label]::before { content: attr(data-label); display: block; font-weight: 400; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
  table.cards-on-phone td.card-head { grid-column: 1 / -1; font-size: 15px; }
  table.cards-on-phone td.card-head::before { display: none; }
  table.cards-on-phone td.card-actions { grid-column: 1 / -1; display: flex; gap: 8px; }
  table.cards-on-phone td.card-actions .button { flex: 1; text-align: center; }
  table.cards-on-phone .hide-stack { display: none; }
  table.cards-on-phone .only-stack { display: inline; margin-left: 6px; }
}

/* Page loading indicator */
#loading { position: fixed; inset: 0 0 auto 0; z-index: 100; pointer-events: none; }
.loading-bar { height: 3px; background: linear-gradient(90deg, transparent, var(--accent-2), transparent); background-size: 40% 100%; background-repeat: no-repeat; animation: loadbar 1.1s linear infinite; }
@keyframes loadbar { from { background-position: -40% 0; } to { background-position: 140% 0; } }
.loading-note { position: fixed; right: 16px; bottom: 16px; max-width: 320px; background: var(--card); border: 1px solid var(--border); border-radius: 10px; padding: 10px 14px; font-size: 13px; color: var(--muted); box-shadow: 0 8px 24px rgba(0,0,0,.35); animation: fadein .3s ease .8s both; }
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .loading-bar { animation: none; background: var(--accent-2); } }

/* Grouped nav: 5 sections + tabs under the active one */
.topbar nav a.active { color: var(--text); box-shadow: inset 0 -2px 0 var(--accent-2); padding-bottom: 2px; }
.subnav { max-width: 1180px; margin: 0 auto; padding: 10px 16px 0; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.subnav a { text-decoration: none; color: var(--muted); font-size: 13px; font-weight: 500; padding: 5px 12px; border-radius: 999px; border: 1px solid var(--border); white-space: nowrap; }
.subnav a:hover { color: var(--text); }
.subnav a.active { color: var(--text); border-color: var(--accent-2); background: color-mix(in srgb, var(--accent-2) 12%, transparent); }
.enh > div + div { margin-top: 2px; }
/* Sticky jump bar (long pages); anchors land below the sticky header + bar */
.jump.sticky { position: sticky; top: 60px; z-index: 9; overflow-x: auto; flex-wrap: nowrap; white-space: nowrap; scrollbar-width: none; background: color-mix(in srgb, var(--card) 92%, transparent); backdrop-filter: blur(8px); }
main section[id], main .card[id] { scroll-margin-top: 130px; }

/* Progress: parse-per-kill chart (line in SVG, readable HTML labels on top) */
.pchart { display: grid; grid-template-columns: 26px 1fr; grid-template-rows: 120px auto; gap: 4px 6px; margin: 4px 0 12px; }
.pchart-y { position: relative; font-size: 11px; color: var(--muted); }
.pchart-y span { position: absolute; right: 0; transform: translateY(-50%); }
.pchart-plot { position: relative; }
.pchart-plot svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.pchart-plot .grid { stroke: var(--border); stroke-width: 1; vector-effect: non-scaling-stroke; }
.pchart-plot .line { fill: none; stroke: var(--bar-you); stroke-width: 2; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.pdot { position: absolute; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%; background: var(--bar-you); box-shadow: 0 0 0 2px var(--card); cursor: default; }
.pdot::after { content: ""; position: absolute; inset: -8px; }  /* bigger hover target */
.plabel { position: absolute; bottom: 12px; left: 50%; transform: translateX(-50%); font-size: 11px; font-weight: 600; background: none !important; padding: 0 !important; }
.ptip { display: none; position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%); white-space: nowrap; background: var(--bg); border: 1px solid var(--border); border-radius: 6px; padding: 4px 8px; font-size: 12px; color: var(--text); z-index: 5; box-shadow: 0 6px 16px rgba(0,0,0,.35); }
.pdot:hover .ptip, .pdot:focus .ptip { display: block; }
.pdot:hover, .pdot:focus { outline: none; transform: scale(1.3); }
.pchart-x { grid-column: 2; display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); }

/* Toggle switch (replaces bare checkboxes for options) */
.toggle { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; font-size: 14px; }
.toggle input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.toggle .switch { flex: none; width: 34px; height: 20px; border-radius: 999px; background: var(--border); position: relative; transition: background .15s; }
.toggle .switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: 50%; background: var(--muted); transition: transform .15s, background .15s; }
.toggle input:checked + .switch { background: color-mix(in srgb, var(--accent) 45%, transparent); }
.toggle input:checked + .switch::after { transform: translateX(14px); background: var(--accent); }
.toggle input:focus-visible + .switch { outline: 2px solid var(--accent-2); outline-offset: 2px; }
.checklist input[type="checkbox"] { accent-color: var(--accent); width: 16px; height: 16px; }
.sim-options { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.stat-top { margin-top: 6px; font-size: 12px; color: var(--muted); line-height: 1.5; }
.stat-top b { color: var(--text); font-weight: 600; }
.warn-tag { display: inline-block; margin-left: 4px; padding: 0 6px; border-radius: 999px; font-size: 10px; text-transform: uppercase; letter-spacing: .05em; border: 1px solid var(--warn, #e0a33a); color: var(--warn, #e0a33a); }
.stat-note { margin: 12px 0 6px; padding: 10px 12px; border-left: 3px solid var(--accent-2); background: color-mix(in srgb, var(--accent-2) 8%, transparent); border-radius: 6px; }
.stile .warn-tag { display: inline-block; width: auto; font-size: 10px; letter-spacing: .05em; color: #e0a33a; border-color: #e0a33a; }
.tgt { color: var(--muted); font-size: 11px; font-weight: 400; margin-left: 3px; }

/* Where your missing DPS goes */
.gap-head { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 20px; margin-bottom: 14px; }
.gap-head span { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.gap-head strong { font-family: var(--font-display); font-size: 30px; line-height: 1.1; }
.gap-head em { display: block; font-style: normal; font-size: 12px; color: var(--muted); }
.gap-arrow { color: var(--muted); font-size: 22px; padding-bottom: 4px; }
.gap-total { margin-left: auto; text-align: right; }
.gap-rows { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.gap-rows li { display: grid; grid-template-columns: minmax(180px, 1.3fr) 2fr 80px; gap: 12px; align-items: center; }
.gap-label strong { display: block; }
.gap-label span { display: block; line-height: 1.35; }
.gap-bar { height: 12px; background: var(--bg); border-radius: 6px; overflow: hidden; }
.gap-bar > div { height: 100%; background: var(--accent); border-radius: 6px; min-width: 4px; }
.gap-val { text-align: right; }
.gap-val strong { display: block; }
.gap-detail summary { cursor: pointer; font-weight: 600; margin: 6px 0; }
@media (max-width: 700px) { .gap-rows li { grid-template-columns: 1fr 64px; } .gap-bar { grid-column: 1 / -1; grid-row: 2; } .gap-total { margin-left: 0; text-align: left; } }
.gap-rows.compact { margin-top: 12px; } .gap-rows.compact li { grid-template-columns: minmax(160px, 1fr) 2fr 70px; }
table.ghost td:first-child { color: var(--muted); }
.headline { margin: 0; padding: 14px 18px; border-radius: 10px; font-size: 17px; line-height: 1.5; border: 1px solid var(--border);
  border-left: 4px solid var(--muted); background: var(--card); }
.headline.bad { border-left-color: var(--bad); } .headline.good { border-left-color: var(--good, #3ecf8e); }

/* Burst (Avenging Wrath) windows */
#windows .kpis { margin-bottom: 12px; }
.kpi em { font-style: normal; font-size: 12px; color: var(--muted); }
.win-strip { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 6px; }
.win { background: var(--bg); border: 1px solid var(--border); border-radius: 8px; padding: 6px 10px; min-width: 88px; }
.win span { display: block; font-size: 11px; color: var(--muted); }
.win strong { font-size: 18px; }
.win em { display: block; font-style: normal; font-size: 11px; color: var(--muted); }
.win.bad { border-color: color-mix(in srgb, var(--bad) 60%, var(--border)); }
.win.bad strong { color: var(--bad); }

/* Boss plans */
.plan-tl { margin: 8px 0 14px; display: flex; flex-direction: column; gap: 6px; }
.plan-row { display: grid; grid-template-columns: 210px 1fr; gap: 10px; align-items: center; }
.plan-name { font-size: 13px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.plan-track { position: relative; height: 16px; background: var(--bg); border-radius: 4px; }
.plan-track .pe { position: absolute; top: 3px; height: 10px; border-radius: 3px; background: var(--muted); opacity: .45; min-width: 3px; }
.plan-track .pe.danger { background: var(--bad); opacity: .9; }
.plan-track.marks { height: 26px; background: none; }
.plan-track .pm { position: absolute; top: 2px; transform: translateX(-50%); }
.plan-track .pm .ico { width: 20px; height: 20px; border-radius: 4px; box-shadow: 0 0 0 2px var(--card); }
.plan-track .pd { position: absolute; top: 2px; transform: translateX(-50%); color: var(--bad); font-weight: 700; }
.plan-track.ticks { height: 14px; background: none; }
.plan-track.ticks span { position: absolute; font-size: 10px; color: var(--muted); transform: translateX(-50%); }
tr.killed td:first-child { box-shadow: inset 3px 0 0 var(--bad); }
@media (max-width: 700px) { .plan-row { grid-template-columns: 1fr; } .plan-name { font-size: 12px; } }

/* Macros */
.macro .why { margin: 0 0 10px; padding-left: 18px; }
.macro .why li { margin: 3px 0; }
.macro-box { position: relative; margin: 8px 0; }
.macro-box pre { margin: 0; padding: 12px 14px; padding-right: 80px; background: var(--bg); border: 1px solid var(--border); border-radius: 8px; font-size: 13px; line-height: 1.5; white-space: pre-wrap; }
.macro-box button { position: absolute; top: 8px; right: 8px; }
.list-steps { margin: 8px 0 0; padding-left: 20px; } .list-steps li { margin: 4px 0; }

/* Raid night: deaths-by-time histogram */
.hist { display: flex; align-items: flex-end; gap: 4px; height: 110px; margin: 6px 0 20px; }
.hbar { flex: 1; min-width: 14px; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; position: relative; }
.hbar > div { background: var(--bad); opacity: .75; border-radius: 3px 3px 0 0; min-height: 1px; }
.hbar span { position: absolute; bottom: -16px; left: 50%; transform: translateX(-50%); font-size: 10px; color: var(--muted); white-space: nowrap; }
.journal { margin: 4px 0 12px; padding: 10px 14px; border-left: 3px solid var(--accent); background: color-mix(in srgb, var(--accent) 7%, transparent); border-radius: 6px; font-size: 14px; }
.journal ul { margin: 6px 0 0; padding-left: 18px; } .journal li { margin: 3px 0; }
.what { font-size: 12px; color: var(--muted); margin-top: 3px; line-height: 1.4; max-width: 520px; }
.what b { color: var(--text); font-weight: 600; }
.drop-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; } .drop-row > span:first-child { font-weight: 500; }
.me-row td { background: color-mix(in srgb, var(--accent) 12%, transparent); font-weight: 600; }
/* Heatmap: one hue, opacity = amount */
table.heat { border-collapse: separate; border-spacing: 2px; font-size: 11px; }
table.heat .hn { white-space: nowrap; font-size: 12px; padding-right: 8px; }
table.heat .hc { writing-mode: vertical-rl; transform: rotate(180deg); font-weight: 500; height: 90px; padding: 2px; }
table.heat .hc.kill { text-decoration: underline; }
table.heat .hcell { min-width: 34px; text-align: center; border-radius: 3px; padding: 4px 2px;
  background: color-mix(in srgb, var(--bad) calc(var(--o) * 85%), var(--bg)); color: var(--text); }
.milestones { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; border-left: 2px solid var(--border); }
.milestones li { padding-left: 14px; position: relative; }
.milestones li::before { content: ""; position: absolute; left: -6px; top: 6px; width: 10px; height: 10px; border-radius: 50%; background: var(--border); }
.milestones li.big::before { background: var(--accent); }
.milestones li.big a { font-weight: 600; }
/* Progression: boss health removed per pull (taller = closer to a kill) */
.prog { display: flex; align-items: flex-end; gap: 6px; height: 70px; margin: 4px 0 18px; }
.pbar { width: 44px; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; position: relative; background: var(--bg); border-radius: 4px; }
.pbar > div { background: var(--accent-2); border-radius: 4px; opacity: .8; }
.pbar.kill > div { background: var(--good, #3ecf8e); }
.pbar span { position: absolute; bottom: -16px; left: 0; right: 0; text-align: center; font-size: 10px; color: var(--muted); }
.lust { font-weight: 600; }
.recap { display: grid; grid-template-columns: 1fr 1.4fr 1fr; gap: 12px; }
.recap > div { background: var(--card); border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; }
.recap h3 { margin: 0 0 6px; font-family: var(--font-display); text-transform: uppercase; letter-spacing: .06em; font-size: 13px; color: var(--muted); }
.recap ul, .recap ol { margin: 0; padding-left: 18px; font-size: 14px; } .recap li { margin: 3px 0; }
.recap .fix { border-color: var(--accent-2); }
@media (max-width: 900px) { .recap { grid-template-columns: 1fr; } }
.playbook { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px 20px; margin: 6px 0 14px; padding: 12px 14px; background: var(--bg); border-radius: 8px; }
.playbook h3 { margin: 0 0 6px; font-family: var(--font-display); text-transform: uppercase; letter-spacing: .06em; font-size: 12px; color: var(--muted); }
/* Training: press-by-press mistake markers above your lane */
.lane-track .mark { position: absolute; top: -18px; transform: translateX(-50%); font-size: 10px; line-height: 1; cursor: help; }
.lane-track .mark.waste { color: var(--bad); }
.lane-track .mark.late { color: #e0a33a; font-size: 9px; top: -14px; }
.mark-key.waste { color: var(--bad); margin-left: 10px; } .mark-key.late { color: #e0a33a; margin-left: 10px; }
.posmap, .distchart { width: 100%; background: var(--bg); border-radius: 8px; }
.posmap { aspect-ratio: 1; max-width: 420px; }
.distchart { height: 150px; }
.posmap .me { fill: none; stroke: #e8a33a; stroke-width: 1.6; stroke-linejoin: round; opacity: .9; }
.posmap .boss { fill: none; stroke: var(--muted); stroke-width: 1.4; stroke-dasharray: 3 3; }
.posmap .start { fill: #e8a33a; }
.posmap .death { fill: var(--bad); font-size: 14px; font-weight: 700; }
.distchart .melee { fill: var(--good, #3ecf8e); opacity: .12; }
.distchart .d { fill: none; stroke: #e8a33a; stroke-width: 1.6; }
/* Sim: character card + grouped results */
.simcard { margin: 10px 0; padding: 12px 14px; background: var(--bg); border: 1px solid var(--border); border-radius: 10px; }
.simcard-head { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; margin-bottom: 8px; }
.ilvl-badge { margin-left: auto; font-family: var(--font-display); font-size: 20px; color: var(--accent); }
.simcard-gear { display: flex; flex-wrap: wrap; gap: 6px; }
.sg { position: relative; } .sg .ico-medium { width: 40px; height: 40px; border-radius: 6px; }
.sg em { position: absolute; bottom: -2px; right: -2px; font-style: normal; font-size: 10px; background: rgba(0,0,0,.75); padding: 0 3px; border-radius: 3px; }
.simres li { display: grid; grid-template-columns: minmax(200px, 1.4fr) 2fr 110px; gap: 12px; align-items: center; }
.simbar { height: 10px; background: var(--bg); border-radius: 5px; position: relative; overflow: hidden; }
.simbar > div { position: absolute; top: 0; bottom: 0; border-radius: 5px; }
.simbar .up { left: 50%; background: var(--good, #3ecf8e); } .simbar .down { right: 50%; background: var(--bad); }
.simbar::after { content: ""; position: absolute; left: 50%; top: -2px; bottom: -2px; width: 1px; background: var(--muted); }
.simres .side { color: var(--muted); }

/* Sim: input source tag, Droptimizer options, per-boss strip, ability table, buffed stats */
.tag { display: inline-block; font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--border); margin-left: 6px; vertical-align: middle; }
.tag.good { color: var(--good); border-color: color-mix(in srgb, var(--good) 40%, transparent); }
.tag.warn { color: var(--accent); background: var(--warn-bg); padding: 2px 8px; border-color: color-mix(in srgb, var(--accent) 40%, transparent); }
.dropt { border: 1px solid var(--border); border-radius: 10px; padding: 10px 14px 12px; margin: 4px 0; display: flex; flex-direction: column; gap: 8px; }
.dropt legend { font-weight: 600; padding: 0 6px; }
.dropt-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span { display: inline-block; padding: 5px 11px; border: 1px solid var(--border); border-radius: 999px; font-size: 13px; cursor: pointer; }
.chip input:checked + span { border-color: var(--accent); color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); font-weight: 600; }
.chip input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.kpi strong.small-strong { font-size: 17px; }
.boss-strip { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin: 6px 0 4px; }
.boss-strip > div { border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.boss-strip span { font-size: 12px; color: var(--muted); }
.boss-strip strong { font-size: 18px; font-variant-numeric: tabular-nums; }
.boss-strip > div.good strong { color: var(--good); }
.boss-strip > div.muted strong { color: var(--muted); }
.boss-strip em { font-style: normal; font-size: 12px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
td.barcell .dual { width: 100%; min-width: 80px; }
.stat-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.stat-chips > span { border: 1px solid var(--border); border-radius: 8px; padding: 5px 10px; font-size: 13px; font-variant-numeric: tabular-nums; }
.stat-chips em { font-style: normal; color: var(--muted); margin-right: 4px; }
[hidden] { display: none !important; }
.simres li.more { display: none; }
.simres.open li.more { display: grid; }
@media (max-width: 700px) { .simres .simbar { grid-column: 1 / -1; grid-row: 2; } }
tr.more-row { display: none; }
.table-wrap.open tr.more-row { display: table-row; }
.tg-picker { margin-top: 12px; border-top: 1px solid var(--border); padding-top: 10px; }
.tg-head { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: baseline; margin-bottom: 8px; }
.tg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.tg-item { position: relative; cursor: pointer; }
.tg-item input { position: absolute; opacity: 0; pointer-events: none; }
.tg-item > span { display: grid; grid-template-columns: 36px 1fr; grid-template-rows: auto auto; column-gap: 8px; align-items: center;
  border: 1px solid var(--border); border-radius: 8px; padding: 6px 8px; opacity: .55; }
.tg-item > span > a { grid-row: 1 / 3; }
.tg-item b { font-weight: 600; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tg-item em { font-style: normal; font-size: 12px; color: var(--muted); }
.tg-item input:checked + span { opacity: 1; border-color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, transparent); }
.tg-item.vault input:checked + span { border-color: var(--good); }
.tg-item input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.tg-verdict { padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; margin: 6px 0 12px; }
.tg-verdict.good { border-color: color-mix(in srgb, var(--good) 50%, transparent); }
.tg-verdict.good strong { color: var(--good); }
.gear-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 6px 14px; margin-bottom: 14px; }
.gg { display: grid; grid-template-columns: 1fr; padding: 6px 8px; border-radius: 8px; border: 1px solid transparent; min-width: 0; }
.gg.changed { border-color: var(--good); background: color-mix(in srgb, var(--good) 8%, transparent); }
.gg-slot { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.gg a span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gg em { font-style: normal; font-size: 12px; color: var(--muted); }
.gap-label .swap { display: block; }
details.opts { border: 1px solid var(--border); border-radius: 10px; padding: 10px 14px; }
details.opts summary { cursor: pointer; }
details.opts[open] summary { margin-bottom: 10px; }
.opts-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px 14px; margin-bottom: 10px; }
.opts-grid label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); }
.pawn { margin-top: 12px; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.pawn code { display: block; white-space: normal; word-break: break-all; font-size: 12px; padding: 8px; border: 1px solid var(--border); border-radius: 6px; max-width: 100%; }
.pawn p code { display: inline; padding: 1px 4px; border: 0; }
.tchart { position: relative; margin: 6px 0 18px; padding-left: 44px; }
.tchart svg { width: 100%; height: 200px; display: block; overflow: visible; }
.tchart .grid { stroke: var(--border); stroke-width: 1; vector-effect: non-scaling-stroke; }
.tchart .line { stroke: var(--accent); stroke-width: 2; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.tchart .cross { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 3 3; vector-effect: non-scaling-stroke; }
.taxis { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); margin-top: 4px; }
.ty { position: absolute; left: 0; top: 0; height: 200px; display: flex; flex-direction: column; justify-content: space-between; font-size: 11px; color: var(--muted); padding: 10px 0 90px; }
.ttip { position: absolute; top: -6px; transform: translateX(-50%); margin-left: 22px; background: var(--card); border: 1px solid var(--border); border-radius: 6px; padding: 3px 8px; font-size: 12px; white-space: nowrap; pointer-events: none; font-variant-numeric: tabular-nums; }
.report-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 18px; }
.seq { list-style: none; padding: 0; margin: 6px 0; display: flex; flex-wrap: wrap; gap: 6px; }
.seq li { display: flex; flex-direction: column; align-items: center; font-size: 11px; color: var(--muted); }
.seq li em { font-style: normal; font-variant-numeric: tabular-nums; }
.uptimes { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 6px 18px; }
.uptimes > div { display: grid; grid-template-columns: 1fr 90px 44px; gap: 8px; align-items: center; font-size: 13px; min-width: 0; }
.uptimes > div > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.uptimes strong { text-align: right; font-variant-numeric: tabular-nums; }
.uptimes .dual { width: 100%; }
.progress { height: 8px; border-radius: 4px; background: var(--border); overflow: hidden; margin: 10px 0 6px; }
.progress > div { height: 100%; background: var(--accent); transition: width .6s ease; }
.run-row { display: flex; flex-wrap: wrap; gap: 12px 18px; align-items: center; }
.modes { display: flex; gap: 6px; flex-wrap: wrap; margin: 6px 0 14px; border-bottom: 1px solid var(--border); }
.modes button { background: none; color: var(--text); border: 0; border-bottom: 2px solid transparent; border-radius: 0; padding: 8px 12px 10px; text-align: left; display: flex; flex-direction: column; font-weight: 400; }
.modes button strong { font-size: 14px; letter-spacing: .02em; }
.modes button span { font-size: 11px; color: var(--muted); }
.modes button.on { border-bottom-color: var(--accent); }
.modes button.on strong { color: var(--accent); }
.modes button:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
form[data-mode="quick"] .tg-picker, form[data-mode="dropt"] .tg-picker, form[data-mode="talents"] .tg-picker { display: none; }
.sim-options > .m { display: contents; }
.sim-options > .m[hidden] { display: none; }
@media (max-width: 700px) { .modes button { padding: 6px 8px 8px; } .modes button span { display: none; } }
.vault-banner { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; justify-content: space-between; margin-top: 12px; padding: 10px 12px;
  border: 1px solid color-mix(in srgb, var(--good) 50%, transparent); border-radius: 8px; }
svg.trend { width: 100%; height: 220px; overflow: visible; }
svg.trend .grid { stroke: var(--border); stroke-width: 1; }
svg.trend .ylab { font-size: 10px; fill: var(--muted); }
svg.trend .tl { stroke-width: 2; }
svg.trend .tl.sim { stroke: var(--accent); } svg.trend .tl.real { stroke: var(--good); }
svg.trend .dot { stroke: var(--card); stroke-width: 2; }
svg.trend .dot.sim { fill: var(--accent); } svg.trend .dot.real { fill: var(--good); }
.legend { display: flex; gap: 16px; font-size: 12px; color: var(--muted); margin: 4px 0; }
.legend .sw { display: inline-block; width: 12px; height: 4px; border-radius: 2px; vertical-align: middle; margin-right: 6px; }
.legend .sw.sim { background: var(--accent); } .legend .sw.real { background: var(--good); }
.pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px 18px; }
.pick-grid h4 { margin: 0 0 4px; font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.pick { display: flex; gap: 8px; align-items: center; font-size: 13px; padding: 3px 0; cursor: pointer; }
.pick em { font-style: normal; color: var(--muted); font-size: 12px; }
/* Positioning: hit markers (validated categorical palette, dataviz reference slots 1-4) */
:root { --hit1: #2a78d6; --hit2: #eb6834; --hit3: #1baf7a; --hit4: #eda100; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --hit1: #3987e5; --hit2: #d95926; --hit3: #199e70; --hit4: #c98500; } }
:root[data-theme="dark"] { --hit1: #3987e5; --hit2: #d95926; --hit3: #199e70; --hit4: #c98500; }
.posmap .me { stroke: var(--text) !important; opacity: .55; }
.posmap .hit { stroke: var(--card); stroke-width: 1.5; opacity: .9; }
.hit.c1, .sw.c1 { fill: var(--hit1); background: var(--hit1); } .hit.c2, .sw.c2 { fill: var(--hit2); background: var(--hit2); }
.hit.c3, .sw.c3 { fill: var(--hit3); background: var(--hit3); } .hit.c4, .sw.c4 { fill: var(--hit4); background: var(--hit4); }
.hitmark { stroke-width: 2; } .hitmark.c1 { stroke: var(--hit1); } .hitmark.c2 { stroke: var(--hit2); } .hitmark.c3 { stroke: var(--hit3); } .hitmark.c4 { stroke: var(--hit4); }
.hitlegend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 8px 0 4px; font-size: 13px; }
.hitlegend .sw { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: middle; }
/* Retail / Forever switch */
.gameswitch { display: inline-flex; border: 1px solid var(--border); border-radius: 999px; padding: 2px; gap: 2px; }
.gameswitch a { padding: 4px 12px; border-radius: 999px; font-size: 12px; font-weight: 600; letter-spacing: .04em; color: var(--muted); }
.gameswitch a.on { background: var(--accent); color: #111; }
.gameswitch a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
/* Forever gear path */
.fv-form { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: end; }
.fv-form label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); }
.fv-slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
.fv-slot h3 { margin: 0 0 6px; }
.fv-item { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; padding: 6px 0; border-top: 1px solid var(--border); }
.fv-item:first-of-type { border-top: 0; }
.fv-item .meta { grid-column: 1 / -1; font-size: 12px; color: var(--muted); }
.fv-item .src { grid-column: 1 / -1; font-size: 12px; }
.fv-item .lvl { font-size: 12px; color: var(--muted); text-align: right; white-space: nowrap; }
.q0 { color: #9d9d9d; } .q1 { color: var(--text); } .q2 { color: #1eff00; } .q3 { color: #0070dd; } .q4 { color: #a335ee; } .q5 { color: #ff8000; }
@media (prefers-color-scheme: light) { .q2 { color: #1a8a00; } }
.pick-row { padding: 6px 0; border-top: 1px solid var(--border); } .pick-row:first-of-type { border-top: 0; }
.dots { display: inline-flex; gap: 3px; } .dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--border); } .dots i.on { background: var(--accent); }
.rank { color: var(--accent); text-transform: uppercase; font-size: 11px; letter-spacing: .04em; }
.planbtn { background: none; border: 1px solid var(--border); color: var(--muted); font-size: 11px; font-weight: 600; padding: 1px 7px; border-radius: 999px; margin-left: 6px; vertical-align: middle; }
.planbtn:hover { border-color: var(--accent); color: var(--accent); }
.planbtn.added { border-color: var(--good); color: var(--good); }
.fv-switch { display: flex; align-items: center; gap: 6px; }
.fv-switch select { font-size: 13px; padding: 4px 8px; }
.fv-switch form { margin: 0; }

/* ---- Top bar: brand + game switch left, sections centred, character menu right ---- */
.topbar { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; }
.tb-left { display: flex; align-items: center; gap: 14px; min-width: 0; }
.tb-nav { justify-self: center; }
.charmenu { justify-self: end; position: relative; }
.charmenu > summary { list-style: none; cursor: pointer; display: flex; flex-direction: column; align-items: flex-end; line-height: 1.2;
  padding: 5px 30px 5px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--card); position: relative; max-width: 260px; }
.charmenu > summary::-webkit-details-marker { display: none; }
.charmenu > summary::after { content: ""; position: absolute; right: 12px; top: 50%; margin-top: -3px; border: 5px solid transparent; border-top-color: var(--muted); }
.charmenu[open] > summary { border-color: var(--accent-2); }
.charmenu .cm-name { font-weight: 700; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.charmenu .cm-sub { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.cm-panel { position: absolute; right: 0; top: calc(100% + 6px); width: 300px; max-height: 70vh; overflow-y: auto; background: var(--card);
  border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 16px 40px rgba(0,0,0,.45); padding: 8px; z-index: 30; }
.cm-search input { width: 100%; box-sizing: border-box; border-radius: 8px; font-size: 13px; }
.cm-group { font-family: var(--font-display); text-transform: uppercase; letter-spacing: .1em; font-size: 11px; color: var(--muted); padding: 10px 8px 4px; }
.cm-row { display: flex; flex-direction: column; padding: 7px 10px; border-radius: 8px; text-decoration: none; color: var(--text); }
.cm-row:hover { background: var(--card-2); }
.cm-row.on { background: color-mix(in srgb, var(--accent-2) 12%, transparent); box-shadow: inset 2px 0 0 var(--accent-2); }
.cm-star { color: var(--accent); }
.cm-empty { font-size: 13px; color: var(--muted); padding: 8px; margin: 0; }
.cm-foot { border-top: 1px solid var(--border); margin: 8px 0 0; padding-top: 6px; }
.linkbtn { background: none; color: var(--accent); padding: 6px 8px; font-weight: 600; font-size: 13px; width: 100%; text-align: left; }
.linkbtn:hover { background: var(--card-2); }
@media (max-width: 900px) {
  .topbar { grid-template-columns: 1fr auto; }
  .tb-nav { grid-column: 1 / -1; grid-row: 2; justify-self: stretch; }
  .charmenu { grid-column: 2; grid-row: 1; }
  .charmenu > summary { max-width: 170px; }
  .cm-panel { width: min(300px, calc(100vw - 32px)); }
}

/* ---- Raid -> boss picker ---- */
.bosspick { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0 0 16px; position: sticky; top: 64px; z-index: 9;
  padding: 10px 12px; background: color-mix(in srgb, var(--card) 92%, transparent); backdrop-filter: blur(8px); border: 1px solid var(--border); border-radius: 12px; }
.bp-raid { background: transparent; color: var(--muted); border: 1px solid var(--border); border-radius: 999px; padding: 6px 14px; font-weight: 600; font-size: 13px; }
.bp-raid em { font-style: normal; font-size: 11px; background: var(--card-2); border-radius: 999px; padding: 1px 7px; margin-left: 4px; color: var(--muted); }
.bp-raid:hover { color: var(--text); }
.bp-raid.on { color: var(--text); border-color: var(--accent-2); background: color-mix(in srgb, var(--accent-2) 12%, transparent); }
.bosspick select { font-weight: 600; min-width: 220px; }

/* ---- Section tabs on long pages ---- */
.jump.tabs a.on { border-color: var(--accent-2); color: var(--text); background: color-mix(in srgb, var(--accent-2) 12%, transparent); }

/* ---- Home hero (compact character hero) ---- */
.char-hero.compact .char-render { height: 260px; }
.char-hero.compact .char-name { font-size: 56px; }
.ctile em { display: block; font-style: normal; font-size: 12px; color: var(--muted); }

/* ---- Training view ---- */
.train-controls { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin: 0 0 16px; }
.seg { display: inline-flex; border: 1px solid var(--border); border-radius: 999px; padding: 2px; gap: 2px; flex-wrap: wrap; }
.seg label { padding: 6px 14px; border-radius: 999px; font-size: 13px; font-weight: 600; color: var(--muted); cursor: pointer; }
.seg label.on { background: var(--accent-2); color: #0a0d12; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label:focus-within { outline: 2px solid var(--accent-2); outline-offset: 2px; }
.train-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin-bottom: 16px; }
.ttile { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; border-top: 3px solid var(--border); }
.ttile.you { border-top-color: var(--accent); } .ttile.peer { border-top-color: #6fa8dc; } .ttile.perfect { border-top-color: var(--accent-2); }
.ttile > span { display: block; font-family: var(--font-display); text-transform: uppercase; letter-spacing: .08em; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ttile strong { display: block; font-family: var(--font-display); font-size: 34px; font-weight: 600; line-height: 1.1; }
.ttile em { display: block; font-style: normal; font-size: 12px; color: var(--muted); }
.ttile ul { list-style: none; padding: 0; margin: 10px 0 0; display: flex; gap: 14px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.ttile ul b { color: var(--text); }
.ttile ul li.bad b { color: var(--bad); }
.lane-legend { color: var(--muted); line-height: 2; margin-top: 14px; }
.lane-legend .key:first-child { margin-left: 0; }
@media (max-width: 700px) {
  .lane-track { flex: none; width: 100%; }  /* column layout: flex: 1 would collapse the track to 0 height */
  .lane:not(.axis) .lane-label { margin-bottom: 14px; }  /* room for off-GCD presses and markers above the track */
  .lane.axis .lane-label { display: none; }
}
table.order tr.diff td { background: color-mix(in srgb, var(--bad) 9%, transparent); }
table.order td { white-space: nowrap; }
@media (max-width: 900px) {
  .topbar { grid-template-columns: minmax(0, 1fr) auto; }
  .tb-left { gap: 10px; }
}
@media (max-width: 560px) {
  .brand { font-size: 0; gap: 0; }  /* keep the mark, drop the wordmark */
  .charmenu > summary { max-width: 130px; padding-right: 26px; }
  .charmenu .cm-sub { display: none; }
  .gameswitch a { padding: 4px 10px; }
}
.cm-results { margin-top: 6px; }
.cm-results.busy { opacity: .6; }
.cm-hit { flex-direction: row; align-items: center; gap: 10px; }
.cm-hit > span { display: flex; flex-direction: column; min-width: 0; }
.cm-hit img, .cm-noav { width: 32px; height: 32px; border-radius: 6px; flex: none; background: var(--card-2); }
.cm-row.kb { background: var(--card-2); box-shadow: inset 2px 0 0 var(--accent); }
.cm-panel { width: 340px; }
.cm-tag { font-size: 10px; font-weight: 600; color: var(--muted); border: 1px solid var(--border); border-radius: 999px; padding: 0 6px; margin-left: 4px; vertical-align: 2px; }

/* ---- Guild page ---- */
.guild-raids { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.graid { border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; background: var(--card-2); }
.graid.old { opacity: .6; }
.graid > span { display: block; font-size: 13px; color: var(--muted); }
.graid strong { font-family: var(--font-display); font-size: 26px; font-weight: 600; }
.graid em { display: block; font-style: normal; font-size: 12px; color: var(--muted); margin-top: 6px; }
.gbar { position: relative; height: 6px; border-radius: 3px; background: var(--border); margin-top: 6px; overflow: hidden; }
.gbar i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 3px; }
.gbar i.normal { background: #4ade80; opacity: .5; } .gbar i.heroic { background: #a78bfa; } .gbar i.mythic { background: #f59e0b; }
.comp { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 6px 24px; }
.comp-row { display: grid; grid-template-columns: 110px 1fr 32px; align-items: center; gap: 10px; font-size: 13px; }
.comp-bar { height: 8px; border-radius: 4px; background: var(--card-2); overflow: hidden; }
.comp-bar i { display: block; height: 100%; border-radius: 4px; }
.comp-row b { text-align: right; }
.roster-filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 10px; }
.roster-filters input[type=search] { min-width: 200px; }
table.roster td { white-space: nowrap; }
.cm-noav.guild { background: color-mix(in srgb, var(--accent) 25%, var(--card-2)); -webkit-mask: none; position: relative; }
.cm-noav.guild::after { content: "G"; position: absolute; inset: 0; display: grid; place-items: center; font-weight: 700; color: var(--accent); font-size: 14px; }
.bp-raid:focus:not(:focus-visible) { outline: none; }
.order-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin: 4px 0 14px; }
.order-stats > div { border: 1px solid var(--border); border-radius: 10px; padding: 10px 14px; background: var(--card-2); }
.order-stats span { display: block; font-family: var(--font-display); text-transform: uppercase; letter-spacing: .08em; font-size: 11px; color: var(--muted); }
.order-stats strong { font-family: var(--font-display); font-size: 28px; font-weight: 600; }
.order-stats strong small { font-size: 15px; color: var(--muted); margin-left: 2px; }
.order-stats em { display: block; font-style: normal; font-size: 12px; color: var(--muted); }
.pill-new { font-size: 10px; font-weight: 700; text-transform: uppercase; background: #29b6f6; color: #0a0d12; border-radius: 3px; padding: 0 4px; margin-left: 4px; vertical-align: 1px; }
.digest-spec { border-left: 3px solid var(--border); padding: 2px 0 2px 12px; margin: 8px 0 14px; }
.digest-spec.yours { border-left-color: var(--accent-2); }
.digest-spec-name { font-weight: 700; margin-bottom: 4px; }
.digest-list { margin: 0; padding-left: 18px; }
.digest-list li { margin: 3px 0; line-height: 1.45; }
.digest-list li.note { color: var(--muted); font-style: italic; }
.digest-news { list-style: none; padding: 0; margin: 0; }
.digest-news li { padding: 8px 0; border-bottom: 1px solid var(--border); }
.digest-news li:last-child { border-bottom: 0; }
.rxp-card { padding: 12px 16px; }
.rxp-row { display: flex; gap: 12px; align-items: center; }
.rxp-badge { font-family: var(--font-display); text-transform: uppercase; letter-spacing: .08em; font-size: 11px; padding: 4px 8px; border-radius: 6px;
  background: color-mix(in srgb, #ff7a2f 22%, transparent); color: #ffb27a; white-space: nowrap; }
.simready .bar { height: 5px; border-radius: 3px; background: var(--border); margin: 4px 0; max-width: 160px; overflow: hidden; }
.simready .bar i { display: block; height: 100%; background: var(--accent-2); border-radius: 3px; }
.ready { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; padding: 1px 6px; border-radius: 4px; }
.ready.usable, .ready.ws-launched, .ready.ws-beta { background: color-mix(in srgb, var(--good) 22%, transparent); color: var(--good); }
.ready.getting-there, .ready.ws-alpha { background: color-mix(in srgb, var(--accent) 22%, transparent); color: var(--accent); }
.ready.not-yet, .ready.ws-unlaunched { background: var(--card-2); color: var(--muted); }
.ready.ws-gearplanner { background: color-mix(in srgb, #6fa8dc 22%, transparent); color: #9cc3ea; }
.now-card .now-tiles { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 12px; }
.now-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; }
.now-grid h3 { margin-top: 0; }
.level-row { display: flex; gap: 14px; padding: 10px 14px; margin-bottom: 8px; }
.level-row.current { border-color: var(--accent-2); }
.level-num { font-family: var(--font-display); font-size: 26px; font-weight: 600; min-width: 38px; color: var(--accent); }
.level-body { flex: 1; min-width: 0; display: grid; gap: 4px; }
.level-gear summary { cursor: pointer; }
.planall { margin-left: 8px; font-size: 12px; padding: 2px 8px; }
/* last week's data: dim the numbers a little, keep the character readable */
table.weekly tr.stale td:not(:first-child) { opacity: .72; }
table.weekly tr.stale td:first-child .muted.small:last-child { color: var(--accent); }
.vault-dots { display: inline-flex; gap: 3px; vertical-align: middle; margin-right: 4px; }
.vault-dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--border); }
.vault-dots i.on { background: var(--accent-2); }

/* Thin dark scrollbars on sideways-scrolling tables (no white browser track) */
.table-wrap, .table-wrap * { scrollbar-width: thin; scrollbar-color: color-mix(in srgb, var(--muted, #888) 45%, transparent) transparent; }
.table-wrap::-webkit-scrollbar { height: 8px; width: 8px; background: transparent; }
.table-wrap::-webkit-scrollbar-track { background: transparent; }
.table-wrap::-webkit-scrollbar-thumb { background: color-mix(in srgb, var(--muted, #888) 45%, transparent); border-radius: 8px; }
.table-wrap::-webkit-scrollbar-thumb:hover { background: color-mix(in srgb, var(--muted, #888) 70%, transparent); }
.table-wrap::-webkit-scrollbar-corner { background: transparent; }

/* paper doll: gear laid out like the in-game character sheet, character render in the middle */
.paperdoll { display: grid; gap: 8px 14px; grid-template-columns: minmax(0, 1fr) minmax(90px, 150px) minmax(90px, 150px) minmax(0, 1fr);
  grid-template-areas: "head r r hands" "neck r r waist" "shoulder r r legs" "back r r feet" "chest r r finger1" "wrist r r finger2"
    ". r r trinket1" ". r r trinket2" "main_hand main_hand off_hand off_hand"; margin-bottom: 14px; }
.paperdoll > * { min-width: 0; }
.paperdoll .pd-render { grid-area: r; position: relative; overflow: hidden; border-radius: 12px;
  background: radial-gradient(ellipse at 50% 45%, color-mix(in srgb, var(--class, var(--accent)) 18%, transparent), transparent 70%); }
.paperdoll .pd-render img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; transform: scale(1.5); transform-origin: 50% 40%; }
.pd-head { grid-area: head; } .pd-neck { grid-area: neck; } .pd-shoulder { grid-area: shoulder; } .pd-back { grid-area: back; }
.pd-chest { grid-area: chest; } .pd-wrist { grid-area: wrist; } .pd-hands { grid-area: hands; } .pd-waist { grid-area: waist; }
.pd-legs { grid-area: legs; } .pd-feet { grid-area: feet; } .pd-finger1 { grid-area: finger1; } .pd-finger2 { grid-area: finger2; }
.pd-trinket1 { grid-area: trinket1; } .pd-trinket2 { grid-area: trinket2; }
.pd-main_hand { grid-area: main_hand; justify-self: end; } .pd-off_hand { grid-area: off_hand; justify-self: start; }
.paperdoll .pd-shirt, .paperdoll .pd-tabard { display: none; }
.paperdoll .gear-item.pd-r { flex-direction: row-reverse; text-align: right; }
.paperdoll .gear-item.pd-r .ggems { justify-content: flex-end; }
.paperdoll .gear-item.pd-r .gear-icon .ilvl { right: auto; left: -4px; }
.paperdoll .pd-main_hand, .paperdoll .pd-off_hand { width: min(100%, 360px); }
.paperdoll.compact .gg.pd-r { text-align: right; }
@media (max-width: 760px) {
  .paperdoll { display: flex; flex-direction: column; }
  .paperdoll .pd-render { display: none; }
  .paperdoll .gear-item.pd-r { flex-direction: row; text-align: left; }
  .paperdoll .gear-item.pd-r .gear-icon .ilvl { left: auto; right: -4px; }
  .paperdoll.compact .gg.pd-r { text-align: left; }
  .paperdoll .pd-main_hand, .paperdoll .pd-off_hand { width: auto; justify-self: auto; }
}

/* row hover on data tables: easier to follow a row across wide tables */
.table-wrap table tbody tr { transition: background-color .12s; }
.table-wrap table tbody tr:hover > td { background: color-mix(in srgb, var(--accent) 7%, transparent); }
@media (hover: none) { .table-wrap table tbody tr:hover > td { background: none; } }

/* inline "late" text (the .warn class is a padded box meant for whole paragraphs) */
.late-text { color: var(--accent); }

/* "?" help buttons + popover */
.help-q { display: inline-grid; place-items: center; width: 20px; height: 20px; margin-left: 8px; padding: 0; border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--accent) 45%, var(--border)); background: var(--card-2); color: var(--accent);
  font: 700 12px/1 var(--font-body, sans-serif); flex: none;
  cursor: pointer; vertical-align: middle; text-transform: none; letter-spacing: 0; }
.help-q:hover, .help-q:focus-visible { color: var(--text); border-color: var(--accent); outline: none; }
#help-pop { position: absolute; z-index: 60; padding: 10px 12px; border-radius: 10px; background: var(--card); border: 1px solid var(--border);
  box-shadow: 0 10px 30px rgb(0 0 0 / .35); font-size: 13px; line-height: 1.45; text-transform: none; letter-spacing: 0; }
#help-pop strong { display: block; margin-bottom: 4px; }
#help-pop p { margin: 0; color: var(--muted); }
/* first-visit tour */
#tour { position: fixed; inset: 0; z-index: 70; }
#tour .tour-spot { position: fixed; border-radius: 10px; box-shadow: 0 0 0 9999px rgb(0 0 0 / .62); border: 2px solid var(--accent);
  transition: all .2s ease; pointer-events: none; }
#tour .tour-card { position: fixed; padding: 14px 16px; border-radius: 12px; background: var(--card); border: 1px solid var(--border);
  box-shadow: 0 16px 40px rgb(0 0 0 / .45); }
#tour .tour-card h3 { margin: 2px 0 6px; }
#tour .tour-card p { margin: 0 0 12px; color: var(--muted); line-height: 1.45; }
#tour .tour-btns { display: flex; gap: 8px; align-items: center; }
#tour .tour-btns span { flex: 1; }

/* "?" inside the small stat boxes: top-right corner, so it never pushes the label onto a second line */
.kpi { position: relative; }
.kpi .help-q { position: absolute; top: 8px; right: 8px; margin: 0; width: 18px; height: 18px; font-size: 11px; }
.kpi > span { padding-right: 22px; }

/* "Show" section bars: one line; whatever doesn't fit goes under "More" (wowcoach/templates/base.html: fitJump) */
.jump.fitted { overflow: visible; flex-wrap: nowrap; white-space: nowrap; }
.jump-more { position: relative; margin-left: auto; }
.jump-more > summary { list-style: none; cursor: pointer; font-family: var(--font-display); text-transform: uppercase; letter-spacing: .08em;
  font-size: 12px; padding: 6px 12px; border-radius: 8px; border: 1px solid var(--border); background: var(--card-2); }
.jump-more > summary::-webkit-details-marker { display: none; }
.jump-more[open] > summary, .jump-more > summary:hover { border-color: var(--accent-2); }
.jump-more-list { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; display: flex; flex-direction: column; gap: 4px; min-width: 190px;
  padding: 8px; border-radius: 10px; background: var(--card); border: 1px solid var(--border); box-shadow: 0 12px 30px rgb(0 0 0 / .4); }
.jump-more-list a { display: block; }

.brand-icon { width: 26px; height: 26px; border-radius: 7px; flex: none; }

/* App page */
.app-hero { display: flex; gap: 18px; align-items: center; }
.app-hero img { border-radius: 14px; flex: none; }
.app-hero h1 { margin: 0 0 6px; }
.app-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 860px) { .app-cols { grid-template-columns: 1fr; } .app-hero { align-items: flex-start; } }
.app-list { margin: 0 0 14px; padding-left: 18px; display: flex; flex-direction: column; gap: 8px; line-height: 1.45; }
.app-get { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 6px 0 14px; }
.app-steps { margin: 0 0 10px; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.app-faq dt { font-weight: 600; margin-top: 10px; }
.app-faq dd { margin: 4px 0 0; color: var(--muted); line-height: 1.45; }
.button.disabled { opacity: .55; cursor: default; pointer-events: none; }

/* Feedback button + panel (bottom right, every page) */
#fb-btn { position: fixed; right: 18px; bottom: 18px; z-index: 50; padding: 9px 14px; border-radius: 999px; border: 1px solid var(--border);
  background: var(--card); color: var(--text); font: 600 13px var(--font-body, sans-serif); cursor: pointer; box-shadow: 0 6px 18px rgb(0 0 0 / .35); }
#fb-btn:hover { border-color: var(--accent); }
#fb-panel { position: fixed; right: 18px; bottom: 18px; z-index: 55; width: min(380px, calc(100vw - 36px)); padding: 14px 16px; border-radius: 12px;
  background: var(--card); border: 1px solid var(--border); box-shadow: 0 16px 40px rgb(0 0 0 / .45); display: flex; flex-direction: column; gap: 10px; }
#fb-panel[hidden] { display: none; }
#fb-panel h3 { margin: 0; }
#fb-panel textarea { width: 100%; resize: vertical; }
.fb-btns { display: flex; gap: 8px; align-items: center; } .fb-btns #fb-status { flex: 1; }
.fb-note { margin: 0; }
.fb-row .fb-head { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.fb-row .fb-act { margin-left: auto; }
.fb-row.fb-done { opacity: .6; }
.fb-msg { white-space: pre-wrap; margin: 10px 0 6px; }
.fb-shot { max-width: 100%; max-height: 420px; border-radius: 8px; border: 1px solid var(--border); margin-top: 6px; }
