/* Forever Guide styles.
   Colors: dark panels, WoW gold for navigation state, class colors only as accents.
   Spacing: every gap uses the --s scale (4px steps). Contrast: text colors meet 4.5:1 on --bg and --panel. */

:root {
  --bg: #111214;
  --panel: #1a1b1e;
  --panel-2: #23252a;
  --line: #2f3238;
  --line-strong: #454952;
  --text: #ecebe8;
  --muted: #aaa69f;
  --gold: #f0b429;
  --gold-soft: #3a2f12;
  --link: #6cb6ff;
  --live: #5fd068;
  --beta: #6cb6ff;
  --proj: #e8a33d;
  --disp: #ff7a59;
  --unk: #d4cfc7;
  --radius: 6px;
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px;
  --side: 264px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.55 var(--font);
}
a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: #9fd0ff; }
h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 var(--s3); }
h1 { font-size: 28px; }
h2 { font-size: 21px; }
h3 { font-size: 17px; }
h4 { font-size: 15px; }
p { margin: 0 0 var(--s3); }
ul { margin: 0 0 var(--s3); padding-left: var(--s5); }
li { margin-bottom: var(--s1); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.icon { width: 1em; height: 1em; display: inline-block; vertical-align: -0.125em; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.nowrap { white-space: nowrap; }
[hidden] { display: none !important; }

/* ---------- Gate ---------- */
.gate {
  position: fixed; inset: 0; z-index: 100;
  display: grid; place-items: center;
  background: var(--bg);
  padding: var(--s4);
}
.gate-box {
  width: 100%; max-width: 380px;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: var(--s5);
}
.gate-box h1 { font-size: 22px; display: flex; align-items: center; gap: var(--s2); }
.gate-box h1 .icon { color: var(--gold); font-size: 28px; }
.gate-row { display: flex; gap: var(--s2); margin-top: var(--s3); }
.gate-row input { flex: 1; min-width: 0; }
.gate-error { color: var(--disp); min-height: 1.5em; margin: var(--s2) 0 0; }

/* ---------- Form controls ---------- */
input[type=text], input[type=password], input[type=number], select, textarea {
  background: var(--bg); border: 1px solid var(--line-strong); border-radius: var(--radius);
  padding: var(--s2) var(--s3); min-height: 40px;
}
input:focus-visible, select:focus-visible, textarea:focus-visible { border-color: var(--gold); }
textarea { width: 100%; min-height: 120px; font-family: var(--mono); font-size: 13px; }
.btn {
  display: inline-flex; align-items: center; gap: var(--s2);
  background: var(--panel-2); border: 1px solid var(--line-strong); border-radius: var(--radius);
  padding: var(--s2) var(--s4); min-height: 40px; cursor: pointer; text-decoration: none; color: var(--text);
  transition: background-color .15s, border-color .15s;
}
.btn:hover { background: #2d3036; border-color: #5a5f69; color: var(--text); }
.btn.primary { background: var(--gold); border-color: var(--gold); color: #1a1405; font-weight: 600; }
.btn.primary:hover { background: #ffc94d; border-color: #ffc94d; color: #1a1405; }
.btn.small { min-height: 32px; padding: var(--s1) var(--s3); font-size: 13px; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
label.field { display: grid; gap: var(--s1); margin-bottom: var(--s3); }
label.field > span { font-size: 13px; color: var(--muted); }

/* ---------- Header ---------- */
.site-header {
  display: flex; align-items: center; gap: var(--s3);
  padding: var(--s2) var(--s4);
  border-bottom: 1px solid var(--line);
  background: var(--panel);
  position: sticky; top: 0; z-index: 30;
}
.brand { display: flex; align-items: center; gap: var(--s2); color: var(--text); text-decoration: none; font-weight: 700; letter-spacing: .02em; }
.brand .icon { color: var(--gold); font-size: 22px; }
.brand small { font-weight: 400; color: var(--muted); letter-spacing: 0; }
.header-spacer { flex: 1; }
.whoami { font-size: 13px; color: var(--muted); }
.whoami b { color: var(--text); }
.menu-btn { display: none; }

/* ---------- Tile bar (top tabs) ---------- */
.tilebar-wrap { position: relative; z-index: 35; }
.tilebar {
  display: flex; gap: var(--s2);
  padding: var(--s3) var(--s4);
  border-bottom: 1px solid var(--line);
  overflow-x: auto; scrollbar-width: thin;
}
.tile {
  flex: 1 0 104px; max-width: 150px;
  display: grid; justify-items: center; gap: var(--s1);
  padding: var(--s2) var(--s2) var(--s2);
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  color: var(--muted); text-decoration: none; cursor: pointer;
  font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  transition: border-color .15s, color .15s, background-color .15s;
}
.tile .icon { font-size: 30px; color: #c9c4bc; }
.tile:hover { border-color: var(--line-strong); color: var(--text); background: var(--panel-2); }
.tile[aria-current="page"], .tile[aria-expanded="true"] { color: var(--gold); border-color: #6b5520; background: var(--gold-soft); }
.tile[aria-current="page"] .icon, .tile[aria-expanded="true"] .icon { color: var(--gold); }

/* Classes panel (opens under the Classes tile) */
.mega {
  position: absolute; left: var(--s4); right: var(--s4); top: calc(100% - var(--s1)); z-index: 40;
  background: var(--panel); border: 1px solid var(--line-strong); border-radius: var(--radius);
  padding: var(--s4); box-shadow: 0 12px 32px rgba(0,0,0,.5);
  /* Closed by default; opens and closes with a 0.3s fade and slide. */
  opacity: 0; transform: translateY(-8px); visibility: hidden; pointer-events: none;
  transition: opacity .3s ease, transform .3s ease, visibility 0s linear .3s;
}
.mega.is-open {
  opacity: 1; transform: none; visibility: visible; pointer-events: auto;
  transition: opacity .3s ease, transform .3s ease, visibility 0s;
}
.mega-classes { display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); gap: var(--s2); margin-bottom: var(--s4); }
.mega-class {
  display: grid; justify-items: center; gap: var(--s1); padding: var(--s2) var(--s1);
  border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none;
  font-size: 12px; font-weight: 600; background: var(--bg);
}
.mega-class .icon { font-size: 26px; }
.mega-class:hover { background: var(--panel-2); border-color: var(--line-strong); }
.mega-roles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s4); }
.mega-roles h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); display: flex; gap: var(--s2); align-items: center; }
.mega-roles ul { list-style: none; padding: 0; margin: 0; }
.mega-roles li { margin: 0; }
.mega-roles a { display: flex; justify-content: space-between; gap: var(--s2); padding: var(--s1) var(--s2); border-radius: 4px; text-decoration: none; }
.mega-roles a:hover { background: var(--panel-2); }
.mega-roles .rank { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }

/* ---------- Layout ---------- */
.layout { display: grid; grid-template-columns: var(--side) minmax(0, 1fr); min-height: calc(100vh - 160px); }
.sidebar {
  border-right: 1px solid var(--line);
  padding: var(--s4) var(--s3);
  position: sticky; top: 57px; align-self: start;
  max-height: calc(100vh - 57px); overflow-y: auto;
}
.content { padding: var(--s5) var(--s6) var(--s7); max-width: 980px; width: 100%; }
/* The content area only receives focus from code after a page change (for screen readers), so no ring. */
.content:focus { outline: none; }

/* Sidebar groups (collapsible, like Wowhead's guide menu) */
.nav-group { margin-bottom: var(--s2); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.nav-head {
  width: 100%; display: flex; align-items: center; gap: var(--s2);
  padding: var(--s2) var(--s3); background: var(--panel);
  border: 0; cursor: pointer; font-weight: 700; text-align: left;
}
.nav-head:hover { background: var(--panel-2); }
.nav-head .chev { margin-left: auto; transition: transform .15s; color: var(--muted); }
.nav-head[aria-expanded="false"] .chev { transform: rotate(-90deg); }
.nav-list { list-style: none; margin: 0; padding: 0; background: var(--bg); }
/* Collapsible sections slide shut over 0.3s (rows shrink from 1fr to 0fr while fading). */
.collapse { display: grid; grid-template-rows: 1fr; opacity: 1; transition: grid-template-rows .3s ease, opacity .3s ease; }
.collapse > * { overflow: hidden; min-height: 0; }
.collapse.is-closed { grid-template-rows: 0fr; opacity: 0; }
.nav-list li { margin: 0; border-top: 1px solid var(--line); }
.nav-list a, .nav-sub-head {
  display: flex; align-items: center; gap: var(--s2);
  padding: var(--s2) var(--s3); color: var(--text); text-decoration: none; font-size: 14px;
}
.nav-list a::after { content: "\2197"; margin-left: auto; color: var(--muted); font-size: 12px; }
.nav-list a:hover { background: var(--panel-2); }
.nav-list a[aria-current="page"] { color: var(--link); font-weight: 700; }
.nav-list a[aria-current="page"]::after { content: "\2192"; color: var(--link); }
.nav-sub-head { width: 100%; background: transparent; border: 0; cursor: pointer; font-weight: 600; text-align: left; }
.nav-sub-head:hover { background: var(--panel-2); }
.nav-sub-head .chev { margin-left: auto; color: var(--muted); transition: transform .15s; }
.nav-sub-head[aria-expanded="false"] .chev { transform: rotate(-90deg); }
.nav-sub { list-style: none; margin: 0; padding: 0 0 var(--s2); }
.nav-sub li { border: 0; }
.nav-sub a { padding: var(--s1) var(--s3) var(--s1) var(--s5); font-size: 13px; }
.nav-sub a .dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.nav-toc a { font-size: 13px; color: var(--muted); }

/* Bottom bar for phones */
.bottombar { display: none; }

/* ---------- Content blocks ---------- */
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--s3); margin-bottom: var(--s4); }
.page-head h1 { margin: 0; }
.page-head .meta { color: var(--muted); font-size: 13px; }
.lead { font-size: 16px; color: #d9d6d1; max-width: 70ch; }
.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: var(--s4); margin-bottom: var(--s4);
}
.card > h2, .card > h3 { display: flex; align-items: center; gap: var(--s2); flex-wrap: wrap; }
.card-head { display: flex; align-items: baseline; gap: var(--s3); flex-wrap: wrap; margin-bottom: var(--s3); }
.card-head h2, .card-head h3 { margin: 0; }
.card-head .meta { margin-left: auto; color: var(--muted); font-size: 13px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s4); }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s4); }
.facts { list-style: none; padding: 0; margin: 0; }
.facts > li { padding: var(--s2) 0; border-top: 1px solid var(--line); margin: 0; }
.facts > li:first-child { border-top: 0; padding-top: 0; }
.fact-line { display: flex; gap: var(--s2); align-items: baseline; flex-wrap: wrap; }
.fact-text { flex: 1 1 260px; }
.why { color: var(--muted); font-size: 14px; display: block; margin-top: 2px; }

/* Status tags: always text, never color alone */
.tag {
  display: inline-flex; align-items: center; gap: var(--s1);
  font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  padding: 1px var(--s2); border-radius: 999px; border: 1px solid currentColor; white-space: nowrap;
  background: transparent;
}
.tag.live { color: var(--live); }
.tag.beta { color: var(--beta); }
.tag.projected { color: var(--proj); }
.tag.disputed { color: var(--disp); }
.tag.unknown { color: var(--unk); border-style: dashed; }
.tag.role-dps, .tag.role-tank, .tag.role-healer { color: var(--muted); text-transform: none; letter-spacing: 0; font-weight: 600; }
.tag.exp { color: var(--proj); }
.tag.main { color: var(--gold); }
.tag.alt { color: var(--muted); }
button.tag { cursor: pointer; }
button.tag:hover { background: var(--panel-2); }
.unknown-text { color: var(--unk); font-style: normal; }
.unknown-text::before { content: "UNKNOWN: "; font-weight: 700; }

/* Source popover */
.src-btn {
  font-size: 11px; color: var(--muted); background: transparent; border: 1px solid var(--line-strong);
  border-radius: 999px; padding: 1px var(--s2); cursor: pointer; white-space: nowrap;
}
.src-btn:hover { color: var(--text); border-color: #6b707a; }
.pop {
  position: absolute; z-index: 60; max-width: min(420px, calc(100vw - 32px));
  background: var(--panel-2); border: 1px solid var(--line-strong); border-radius: var(--radius);
  padding: var(--s3); box-shadow: 0 12px 32px rgba(0,0,0,.55); font-size: 13px;
}
.pop ul { margin: 0; padding-left: var(--s4); }
.pop .alt { margin-top: var(--s2); padding-top: var(--s2); border-top: 1px solid var(--line); }

/* Banners */
.banner {
  display: flex; gap: var(--s3); align-items: flex-start;
  border: 1px solid var(--line-strong); border-radius: var(--radius);
  padding: var(--s3) var(--s4); margin-bottom: var(--s4); background: var(--panel);
}
.banner.warn { border-color: #7a5a1c; background: #241c0c; }
.banner.bad { border-color: #7a2f22; background: #26120e; }
.banner.info { border-color: #22476e; background: #0f1a26; }
.banner .icon { font-size: 20px; flex: none; margin-top: 2px; }

/* Tabs */
.tabs { display: flex; gap: var(--s1); border-bottom: 1px solid var(--line); margin: var(--s4) 0; overflow-x: auto; }
.tab {
  background: transparent; border: 0; border-bottom: 2px solid transparent;
  padding: var(--s2) var(--s3); cursor: pointer; color: var(--muted); font-weight: 600; white-space: nowrap;
  text-decoration: none;
}
.tab:hover { color: var(--text); }
.tab[aria-selected="true"] { color: var(--text); border-bottom-color: var(--gold); }

/* Class page */
.class-hero {
  display: grid; grid-template-columns: auto 1fr; gap: var(--s4); align-items: center;
  padding: var(--s4); background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  border-top: 3px solid var(--cc, var(--gold));
}
.class-hero .crest {
  width: 64px; height: 64px; border-radius: var(--radius); display: grid; place-items: center;
  background: var(--bg); border: 1px solid var(--line); color: var(--cc, var(--gold)); font-size: 40px;
}
.class-hero h1 { color: var(--cct, var(--cc, var(--text))); margin-bottom: var(--s1); }
.chips { display: flex; flex-wrap: wrap; gap: var(--s2); margin-top: var(--s2); }
.chip {
  display: inline-flex; align-items: center; gap: var(--s1);
  font-size: 13px; padding: 2px var(--s2); border-radius: var(--radius);
  background: var(--bg); border: 1px solid var(--line); color: var(--text); text-decoration: none;
}
a.chip:hover { border-color: var(--line-strong); background: var(--panel-2); }
.chip .icon { color: var(--muted); }
.chip b { font-variant-numeric: tabular-nums; }
.counts { font-size: 13px; color: var(--muted); }

.level-strip {
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2);
  margin-top: var(--s4); padding: var(--s3); background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius);
}
.level-strip label { font-weight: 600; }
.level-strip input { width: 80px; }
.band-btn {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: var(--s1) var(--s3); cursor: pointer; font-variant-numeric: tabular-nums; min-height: 32px;
}
.band-btn:hover { border-color: var(--line-strong); }
.band-btn[aria-pressed="true"] { border-color: var(--gold); color: var(--gold); background: var(--gold-soft); }

.band { scroll-margin-top: 72px; }
.band.is-now { border-color: #6b5520; box-shadow: 0 0 0 1px #6b5520 inset; }
.band-head { display: flex; align-items: baseline; gap: var(--s3); flex-wrap: wrap; margin-bottom: var(--s3); }
.band-head h3 { margin: 0; }
.band-head .now { color: var(--gold); font-weight: 700; font-size: 13px; }
.band h4 { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; margin: var(--s4) 0 var(--s2); }

/* Tables */
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
.tbl th, .tbl td { text-align: left; padding: var(--s2) var(--s3); border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl th { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; font-weight: 700; }
.tbl tr:hover td { background: #16171a; }
.tbl .num { text-align: right; }
.bar { height: 8px; border-radius: 4px; background: var(--line); overflow: hidden; min-width: 80px; }
.bar > span { display: block; height: 100%; background: var(--gold); }
.class-name { font-weight: 600; text-decoration: none; }

/* Steps with checkboxes */
.step { display: grid; grid-template-columns: auto 1fr; gap: var(--s3); align-items: start; }
.step .check { margin-top: 3px; }
.check { display: inline-grid; place-items: center; }
.check input { width: 20px; height: 20px; accent-color: var(--gold); cursor: pointer; }
.check input:disabled { cursor: not-allowed; }
.step-title { font-weight: 600; }
.step-meta { display: flex; flex-wrap: wrap; gap: var(--s2); margin-top: var(--s1); font-size: 13px; color: var(--muted); }
.sync-state { font-size: 12px; color: var(--proj); }

/* Home */
.class-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: var(--s3); }
.class-card {
  display: grid; gap: var(--s1); justify-items: start;
  padding: var(--s3); border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--panel); text-decoration: none; color: var(--text);
  border-top: 3px solid var(--cc);
  transition: background-color .15s, border-color .15s;
}
.class-card:hover { background: var(--panel-2); border-color: var(--line-strong); border-top-color: var(--cc); color: var(--text); }
.class-card .icon { font-size: 30px; color: var(--cc); }
.class-card strong { color: var(--cct, var(--cc)); font-size: 16px; }
.class-card .roles { font-size: 12px; color: var(--muted); }
.countdown { font-variant-numeric: tabular-nums; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: var(--s1) var(--s4); margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }

/* Group board */
.board { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: var(--s3); }
.member { padding: var(--s3); border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); border-top: 3px solid var(--cc, var(--line)); }
.member h3 { margin-bottom: var(--s1); }
.progress { height: 6px; background: var(--line); border-radius: 3px; overflow: hidden; margin: var(--s2) 0; }
.progress > span { display: block; height: 100%; background: var(--gold); }

/* Sign-in, Discord roles, characters, professions */
.linkish { background: none; border: 0; padding: 0; color: var(--link); cursor: pointer; text-decoration: underline; text-underline-offset: 2px; font: inherit; }
.linkish:hover { color: #9fd0ff; }
.btn.discord { background: #5865f2; border-color: #5865f2; color: #fff; font-weight: 600; }
.btn.discord:hover { background: #7079f5; border-color: #7079f5; color: #fff; }
.inline-form { display: inline; margin: 0; }
.char-row { display: flex; align-items: center; gap: var(--s2); flex-wrap: wrap; }
.char-row .char-option { flex: 1 1 260px; }
.gate-box .signin-btn { display: inline-flex; margin-top: var(--s2); text-decoration: none; }
.role-chips { display: flex; flex-wrap: wrap; gap: var(--s1); align-items: center; margin-top: var(--s2); }
.role-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; padding: 1px var(--s2); border-radius: 999px; border: 1px solid var(--line-strong); }
.role-chip::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--rc, var(--line-strong)); }
.role-chip.warn-chip { border-color: #7a5a1c; color: var(--proj); }
.role-chip.warn-chip::before { display: none; }
.char-picker { margin-top: var(--s3); display: grid; gap: var(--s2); }
.char-option { display: flex; align-items: center; gap: var(--s3); padding: var(--s2) var(--s3); border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); cursor: pointer; transition: border-color .15s, background-color .15s; }
.char-option:hover { border-color: var(--line-strong); }
.char-option:has(input:checked) { border-color: var(--gold); background: var(--gold-soft); }
.char-option input { accent-color: var(--gold); width: 18px; height: 18px; }
.prof-picker { border: 1px solid var(--line); border-radius: var(--radius); padding: var(--s3); margin: 0 0 var(--s3); }
.prof-picker legend { padding: 0 var(--s1); font-size: 13px; color: var(--muted); }
.prof-picker p { margin: 0 0 var(--s2); }
.chip-row { display: flex; flex-wrap: wrap; gap: var(--s2); margin-bottom: var(--s3); }
.check-chip { display: inline-flex; align-items: center; gap: 6px; padding: var(--s1) var(--s3); min-height: 36px; border: 1px solid var(--line-strong); border-radius: 999px; cursor: pointer; font-size: 14px; user-select: none; transition: border-color .15s, background-color .15s, color .15s; }
.check-chip:hover { border-color: #6b707a; }
.check-chip:has(input:checked) { border-color: var(--gold); background: var(--gold-soft); color: var(--gold); }
.check-chip:has(input:disabled) { opacity: .5; cursor: not-allowed; }
.check-chip input { accent-color: var(--gold); margin: 0; }
.secret-once { display: block; padding: var(--s2); margin-top: var(--s2); background: var(--bg); border: 1px solid var(--line-strong); border-radius: var(--radius); word-break: break-all; font-family: var(--mono); }

/* Classes at a glance */
.spec-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: var(--s3); margin-top: var(--s3); }
.spec-card { padding: var(--s3); border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); display: grid; gap: var(--s2); align-content: start; }
.spec-head { display: flex; align-items: center; gap: var(--s2); flex-wrap: wrap; }
.pc { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s3); }
.pc h4 { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; margin: var(--s2) 0 var(--s1); }
.class-summary { scroll-margin-top: 72px; border-top: 3px solid var(--cc); }
.cs-icon { color: var(--cc); font-size: 26px; display: inline-flex; }
@media (max-width: 760px) { .pc { grid-template-columns: minmax(0, 1fr); } }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: var(--s4); color: var(--muted); font-size: 12px; }
.site-footer p { margin: 0 0 var(--s1); max-width: 980px; }

/* ---------- Phones ---------- */
@media (max-width: 760px) {
  body { font-size: 15px; }
  .tilebar { display: none; }
  .menu-btn { display: inline-flex; }
  .layout { grid-template-columns: minmax(0, 1fr); }
  .sidebar {
    position: fixed; inset: 0 auto 0 0; width: min(86vw, 320px); z-index: 70;
    background: var(--bg); max-height: none; top: 0;
    transform: translateX(-102%); transition: transform .3s ease;
    padding-bottom: 96px;
  }
  .sidebar.open { transform: none; box-shadow: 0 0 0 100vmax rgba(0,0,0,.55); }
  .content { padding: var(--s4) var(--s4) 96px; }
  .bottombar {
    display: grid; grid-template-columns: repeat(5, 1fr);
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
    background: var(--panel); border-top: 1px solid var(--line);
    padding-bottom: env(safe-area-inset-bottom);
  }
  .bottombar a, .bottombar button {
    display: grid; justify-items: center; gap: 2px; padding: var(--s2) 0;
    font-size: 11px; color: var(--muted); text-decoration: none; background: none; border: 0; cursor: pointer;
  }
  .bottombar .icon { font-size: 22px; }
  .bottombar [aria-current="page"] { color: var(--gold); }
  .grid-2, .grid-3 { grid-template-columns: minmax(0, 1fr); }
  .mega { position: fixed; inset: auto 0 56px 0; max-height: 75vh; overflow-y: auto; border-radius: var(--radius) var(--radius) 0 0; }
  .mega-classes { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .mega-roles { grid-template-columns: minmax(0, 1fr); }
  .class-hero { grid-template-columns: minmax(0, 1fr); }
  .tbl.stack thead { display: none; }
  .tbl.stack tr { display: block; border-bottom: 1px solid var(--line); padding: var(--s2) 0; }
  .tbl.stack td { display: flex; gap: var(--s3); border: 0; padding: var(--s1) 0; }
  .tbl.stack td::before { content: attr(data-label); color: var(--muted); min-width: 96px; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
  .tbl.stack .num { text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}
