/* ── Fonts ──────────────────────────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=MedievalSharp&family=IM+Fell+English:ital@0;1&family=Cinzel:wght@400;700&family=Crimson+Text:ital,wght@0,400;0,600;1,400&display=swap');

/* ── Reset / Base ────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:          #0e0c0a;
  --bg-panel:    #151210;
  --bg-surface:  #1c1915;
  --bg-hover:    #231f1b;
  --border:      #3a3028;
  --border-gold: #6b5230;
  --gold:        #c8a55a;
  --gold-bright: #e8c87a;
  --gold-dim:    #8a6d3b;
  --text:        #d4c4a0;
  --text-dim:    #8a7a60;
  --text-bright: #ede0c0;
  --red:         #c0392b;
  --green:       #2e7d32;
  --amber:       #b07d20;
  --purple:      #6a3fa0;
  --teal:        #1a6b5a;
  --font-title:  'Cinzel', serif;
  --font-body:   'Crimson Text', Georgia, serif;
  --font-ui:     'Crimson Text', Georgia, serif;
}

html { font-size: 16px; scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.5;
  min-height: 100vh;
  background-image:
    radial-gradient(ellipse at 20% 50%, rgba(60,30,10,0.15) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 20%, rgba(20,10,40,0.12) 0%, transparent 50%);
}

a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--gold-bright); text-decoration: underline; }

/* ── Layout ──────────────────────────────────────────────────────────────────── */
.site-wrapper {
  display: grid;
  grid-template-rows: auto 1fr auto;
  grid-template-columns: 200px 1fr;
  grid-template-areas:
    "header  header"
    "sidebar main"
    "footer  footer";
  min-height: 100vh;
}

/* ── Header ──────────────────────────────────────────────────────────────────── */
.site-header {
  grid-area: header;
  background: linear-gradient(180deg, #100e0c 0%, #1a1510 60%, #0e0c0a 100%);
  border-bottom: 2px solid var(--border-gold);
  padding: 1.25rem 1.5rem 1rem;
  text-align: center;
  position: relative;
}

.site-header::before,
.site-header::after {
  content: '';
  display: block;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-dim), transparent);
  margin: 0.3rem auto;
  width: 80%;
}

.site-title {
  font-family: var(--font-title);
  font-size: 1.9rem;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-shadow: 0 0 30px rgba(200, 165, 90, 0.35), 0 2px 4px rgba(0,0,0,0.8);
  line-height: 1.2;
}

.site-subtitle {
  font-family: var(--font-title);
  font-size: 0.85rem;
  color: var(--gold-dim);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-top: 0.35rem;
}

.site-tagline {
  font-family: var(--font-body);
  font-style: italic;
  font-size: 0.9rem;
  color: var(--text-dim);
  margin-top: 0.2rem;
}

/* ── Sidebar ─────────────────────────────────────────────────────────────────── */
.site-sidebar {
  grid-area: sidebar;
  background: var(--bg-panel);
  border-right: 1px solid var(--border);
  padding: 1rem 0;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.sidebar-heading {
  font-family: var(--font-title);
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold-dim);
  padding: 0 0.75rem 0.5rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0.5rem;
}

#class-nav {
  display: flex;
  flex-direction: column;
}

.nav-class {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.75rem;
  color: var(--text-dim);
  border-left: 3px solid transparent;
  transition: background 0.1s, color 0.1s;
  font-family: var(--font-ui);
  font-size: 0.95rem;
}

.nav-class:hover {
  background: var(--bg-hover);
  color: var(--text-bright);
  text-decoration: none;
}

.nav-class.active {
  background: var(--bg-surface);
  color: var(--gold);
}

.nav-short {
  font-family: var(--font-title);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  min-width: 2.5rem;
  color: inherit;
  opacity: 0.8;
}

.nav-name {
  font-size: 0.88rem;
}

/* ── Main content ────────────────────────────────────────────────────────────── */
.site-main {
  grid-area: main;
  padding: 1.5rem 2rem 2rem;
  min-width: 0;
}

/* ── Class two-column layout ─────────────────────────────────────────────────── */
.class-layout {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
}

.class-content {
  flex: 1;
  min-width: 0;
  max-width: 720px;
}

/* ── Class header ────────────────────────────────────────────────────────────── */
.class-header {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 2px;
  padding: 1rem 1.25rem;
  margin-bottom: 1.25rem;
}

.class-header-top {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
}

.class-badge {
  font-family: var(--font-title);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 0.2rem 0.5rem;
  border-radius: 2px;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0,0,0,0.6);
}

.class-title {
  font-family: var(--font-title);
  font-size: 1.6rem;
  color: var(--gold-bright);
  font-weight: 700;
}

.class-role {
  font-family: var(--font-ui);
  font-style: italic;
  font-size: 0.95rem;
  color: var(--text-dim);
}

.class-armor {
  font-size: 0.8rem;
  font-family: var(--font-ui);
  color: var(--text-dim);
  background: var(--border);
  padding: 0.1rem 0.4rem;
  border-radius: 2px;
}

.class-subhead {
  font-size: 0.88rem;
  color: var(--text-dim);
  font-style: italic;
  line-height: 1.4;
}

/* ── Stat priority ───────────────────────────────────────────────────────────── */
.stat-priority {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-top: 2px solid var(--border-gold);
  padding: 0.9rem 1.25rem;
  margin-bottom: 1.25rem;
}

.stat-title {
  font-family: var(--font-title);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-dim);
  margin-bottom: 0.6rem;
}

.stat-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: 0;
}

.stat-list li {
  font-size: 0.92rem;
  line-height: 1.4;
  padding: 0.2rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}

.stat-list li:last-child { border-bottom: none; }

.stat-rank {
  font-family: var(--font-title);
  font-size: 0.75rem;
  color: var(--gold-dim);
  margin-right: 0.25rem;
}

.stat-list strong {
  color: var(--gold);
  font-weight: 600;
}

/* ── BiS Table ───────────────────────────────────────────────────────────────── */
.table-wrapper {
  border: 1px solid var(--border);
  border-top: 2px solid var(--border-gold);
  margin-bottom: 1.5rem;
  overflow: hidden;
}

.bis-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.bis-table thead {
  background: linear-gradient(180deg, #201a14 0%, #181410 100%);
}

.bis-table th {
  font-family: var(--font-title);
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-dim);
  padding: 0.55rem 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--border-gold);
}

.col-slot { width: 100px; }

.slot-row {
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.slot-row:nth-child(even) { background: rgba(255,255,255,0.015); }
.slot-row:hover           { background: var(--bg-hover); }

.slot-name {
  font-family: var(--font-title);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gold-dim);
  padding: 0.65rem 0.75rem;
  vertical-align: top;
  white-space: nowrap;
  border-right: 1px solid var(--border);
}

.slot-items {
  padding: 0.45rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

/* ── Item rows ───────────────────────────────────────────────────────────────── */
.item-row {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  padding: 0.15rem 0;
}

.item-details {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}

.item-link {
  color: var(--gold);
  font-weight: 600;
  font-size: 0.94rem;
  line-height: 1.3;
}

.item-link:hover { color: var(--gold-bright); }

.item-name.no-link {
  color: var(--text);
  font-size: 0.94rem;
  font-weight: 600;
  line-height: 1.3;
}

.item-source {
  font-size: 0.78rem;
  color: var(--text-dim);
  font-style: italic;
}

.item-note {
  display: block;
  font-size: 0.8rem;
  color: var(--text-dim);
  font-style: italic;
  margin-top: 0.1rem;
}

.id-tbd {
  font-size: 0.72rem;
  color: var(--red);
  font-weight: normal;
  margin-left: 0.25rem;
  font-style: normal;
}

/* ── Labels ──────────────────────────────────────────────────────────────────── */
.item-label {
  display: inline-block;
  font-family: var(--font-title);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.15rem 0.35rem;
  border-radius: 2px;
  white-space: nowrap;
  flex-shrink: 0;
  margin-top: 0.12rem;
  min-width: 3.5rem;
  text-align: center;
}

.label-bis     { background: #1a4a1a; color: #6fcf6f; border: 1px solid #2d6b2d; }
.label-alt     { background: #1a2e4a; color: #6fa8cf; border: 1px solid #2d4d6b; }
.label-rem-alt { background: #3a2060; color: #c08fff; border: 1px solid #5a3090; }
.label-option  { background: #2a2010; color: #c0a050; border: 1px solid #4a3818; }
.label-class   { background: #3a1a1a; color: #cf6f6f; border: 1px solid #6b2d2d; }

/* ── Augment slot indicators ─────────────────────────────────────────────────── */
.aug-slots {
  display: inline-flex;
  gap: 0.2rem;
  margin-left: 0.4rem;
  vertical-align: middle;
}

.aug-slots abbr {
  display: inline-block;
  font-family: var(--font-title);
  font-size: 0.55rem;
  font-weight: 700;
  padding: 0.1rem 0.25rem;
  border-radius: 2px;
  border: 1px solid #4a3090;
  background: #1e0f3a;
  color: #a070df;
  text-decoration: none;
  cursor: help;
  letter-spacing: 0.03em;
}

.aug-slots.inline { display: inline-flex; }

/* ── LDON Aug Section ────────────────────────────────────────────────────────── */
.ldon-aug-section {
  margin-top: 28px;
  padding: 20px 24px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-top: 3px solid #4a3080;
  border-radius: 0 0 4px 4px;
}

.aug-section-title {
  font-family: var(--font-title);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #a070df;
  margin: 0 0 6px;
}

.aug-section-intro {
  font-size: 0.85rem;
  color: var(--text-dim);
  line-height: 1.55;
  margin: 0 0 18px;
}

.aug-no-slots {
  font-size: 0.88rem;
  color: #4a3a5a;
  font-style: italic;
  text-align: center;
  padding: 10px 0;
}

/* Slot counter bar */
.aug-slot-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
  padding: 10px 14px;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 3px;
}

.aug-slot-counter {
  font-size: 0.82rem;
  color: #9070b0;
  display: flex;
  align-items: center;
  gap: 3px;
}

.aug-slot-counter strong {
  color: #c8a0ff;
  font-weight: 700;
}

.aug-slot-counter.exhausted          { color: #6a5a7a; }
.aug-slot-counter.exhausted strong   { color: #9060c0; }

.aug-count-badge {
  display: inline-block;
  font-family: var(--font-title);
  font-size: 0.62rem;
  background: #1a2a1a;
  color: #70b060;
  border: 1px solid #2a4a2a;
  border-radius: 3px;
  padding: 0 4px;
  margin-left: 4px;
  vertical-align: middle;
}

/* Category groups */
.aug-category { margin-bottom: 18px; }

.aug-cat-head {
  font-family: var(--font-title);
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #7050a0;
  padding: 3px 0;
  margin-bottom: 2px;
  border-bottom: 1px solid #2a1a40;
}

/* Individual aug rows */
.aug-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 8px;
  border-radius: 3px;
  cursor: pointer;
  transition: background 0.1s;
  border-bottom: 1px solid #160f22;
}

.aug-row:last-child { border-bottom: none; }

.aug-row:hover:not(.aug-row-disabled) { background: #1e1230; }

.aug-row-selected {
  background: #121a10;
  border-left: 3px solid #60aa50;
  padding-left: 5px;
}

.aug-row-selected:hover { background: #161e14; }

.aug-row-disabled {
  cursor: default;
  opacity: 0.32;
}

.aug-row-left {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.aug-name {
  font-family: var(--font-title);
  font-size: 0.78rem;
  color: #b888e8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.aug-row-selected .aug-name { color: #80cc70; }

.aug-source {
  font-size: 0.76rem;
  color: #5a4a6a;
  font-family: var(--font-body);
}

.aug-note {
  font-style: italic;
  color: #4a3a5a;
  margin-left: 4px;
}

.aug-row-right {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}

.aug-stat-val {
  font-family: var(--font-body);
  font-size: 0.82rem;
  color: #c8a840;
  white-space: nowrap;
}

.aug-focus-label {
  font-style: italic;
  color: #6080a0;
  font-size: 0.75rem;
}

.aug-type-badge {
  font-family: var(--font-title);
  font-size: 0.58rem;
  letter-spacing: 0.04em;
  border-radius: 2px;
  padding: 1px 4px;
  border: 1px solid #3a2060;
  background: #1a0f2e;
  color: #7050a0;
}

.aug-type-badge.t8  { border-color: #3a2060; background: #1a0f2e; color: #9060d0; }
.aug-type-badge.t3  { border-color: #1a3050; background: #0a1a2e; color: #5090c0; }
.aug-type-badge.t7  { border-color: #203040; background: #0e1820; color: #607080; }
.aug-type-badge.t25 { border-color: #403010; background: #201800; color: #907030; }

/* Multi-slot aug switcher states */
.aug-type-badge.slot-active  { filter: brightness(2.2); outline: 1px solid currentColor; }
.aug-type-badge.slot-switchable { cursor: pointer; filter: brightness(1.5); }
.aug-type-badge.slot-switchable:hover { filter: brightness(2.5); }
.aug-type-badge.slot-unavail { opacity: 0.35; }

/* Augment entries in the stats panel */
.aug-t-badge {
  font-family: var(--font-title);
  font-size: 0.6rem;
  border-radius: 2px;
  padding: 1px 5px;
  white-space: nowrap;
}

.aug-t-badge.t8  { border: 1px solid #3a2060; background: #1a0f2e; color: #9060d0; }
.aug-t-badge.t3  { border: 1px solid #1a3050; background: #0a1a2e; color: #5090c0; }
.aug-t-badge.t7  { border: 1px solid #203040; background: #0e1820; color: #607080; }
.aug-t-badge.t25 { border: 1px solid #403010; background: #201800; color: #907030; }

/* ── LDON notice (legacy, kept for safety) ───────────────────────────────────── */
.aug-notice {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--purple);
  padding: 0.9rem 1.25rem;
  margin-top: 0;
}

.aug-notice h3 {
  font-family: var(--font-title);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #a070df;
  margin-bottom: 0.4rem;
}

.aug-notice p {
  font-size: 0.88rem;
  color: var(--text-dim);
  line-height: 1.5;
}

/* ── Footer ──────────────────────────────────────────────────────────────────── */
.site-footer {
  grid-area: footer;
  background: var(--bg-panel);
  border-top: 1px solid var(--border);
  text-align: center;
  padding: 0.75rem 1rem;
  font-size: 0.8rem;
  color: var(--text-dim);
  font-style: italic;
}

.site-footer a { color: var(--gold-dim); }
.site-footer a:hover { color: var(--gold); }

/* ── Scrollbar ───────────────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-panel); }
::-webkit-scrollbar-thumb { background: var(--border-gold); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--gold-dim); }

/* ── Item selection ──────────────────────────────────────────────────────────── */
.item-row.selectable {
  cursor: pointer;
  border-radius: 2px;
  transition: background 0.1s;
}

.item-row.selectable:hover {
  background: rgba(200,165,90,0.06);
}

.item-row.selectable.selected {
  background: rgba(200,165,90,0.12);
  outline: 1px solid var(--border-gold);
  outline-offset: -1px;
}

.item-row.selectable.selected .item-label {
  box-shadow: 0 0 0 1px var(--gold-dim);
}

/* ── Stats panel ─────────────────────────────────────────────────────────────── */
.stats-panel {
  width: 240px;
  flex-shrink: 0;
  position: sticky;
  top: 1rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-top: 2px solid var(--border-gold);
  padding: 0.85rem 1rem 1rem;
  font-size: 0.85rem;
  max-height: calc(100vh - 2rem);
  overflow-y: auto;
}

.stats-panel-head {
  font-family: var(--font-title);
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-dim);
  margin-bottom: 0.6rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.stats-count {
  background: var(--border-gold);
  color: var(--gold-bright);
  font-size: 0.6rem;
  padding: 0.05rem 0.35rem;
  border-radius: 10px;
  font-family: var(--font-title);
}

.stats-panel-empty {
  color: var(--text-dim);
  font-style: italic;
  font-size: 0.82rem;
  line-height: 1.4;
}

.stats-slot-list {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.stats-slot-entry {
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
  padding: 0.25rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}

.stats-slot-name {
  font-family: var(--font-title);
  font-size: 0.58rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gold-dim);
}

.stats-slot-item {
  color: var(--text);
  font-size: 0.8rem;
  line-height: 1.3;
}

.stats-divider {
  height: 1px;
  background: var(--border-gold);
  margin: 0.75rem 0 0.6rem;
  opacity: 0.5;
}

.stats-totals-head {
  font-family: var(--font-title);
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-dim);
  margin-bottom: 0.4rem;
}

.stats-totals {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.stats-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.18rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.03);
}

.stats-total-label {
  font-family: var(--font-title);
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  color: var(--text-dim);
}

.stats-total-value {
  font-weight: 700;
  color: var(--gold);
  font-size: 0.85rem;
  font-family: var(--font-title);
}

.stats-clear-btn {
  margin-top: 0.85rem;
  width: 100%;
  background: transparent;
  border: 1px solid var(--border-gold);
  color: var(--gold-dim);
  font-family: var(--font-title);
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.35rem 0;
  cursor: pointer;
  border-radius: 2px;
  transition: background 0.1s, color 0.1s;
}

.stats-clear-btn:hover {
  background: var(--border-gold);
  color: var(--gold-bright);
}

/* ── Tooltip ─────────────────────────────────────────────────────────────────── */
.item-tooltip {
  position: fixed;
  z-index: 9999;
  pointer-events: none;
  background: #12100e;
  border: 1px solid var(--border-gold);
  border-top: 2px solid var(--gold);
  padding: 0.75rem 0.9rem;
  max-width: 280px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.7), 0 2px 6px rgba(0,0,0,0.5);
  border-radius: 2px;
  font-size: 0.85rem;
}

.tt-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}

.tt-icon {
  width: 40px;
  height: 40px;
  object-fit: contain;
  border: 1px solid var(--border);
  border-radius: 2px;
  background: var(--bg-panel);
  flex-shrink: 0;
}

.tt-name {
  font-family: var(--font-title);
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--gold-bright);
  line-height: 1.25;
}

.tt-aug {
  font-size: 0.72rem;
  color: #a070df;
  margin-bottom: 0.3rem;
  letter-spacing: 0.06em;
}

.tt-source {
  font-size: 0.78rem;
  color: var(--text-dim);
  font-style: italic;
  margin-bottom: 0.4rem;
}

.tt-stats {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
  margin-bottom: 0.4rem;
}

.tt-stat {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.1rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}

.tt-stat-k {
  font-family: var(--font-title);
  font-size: 0.64rem;
  letter-spacing: 0.04em;
  color: var(--text-dim);
}

.tt-stat-v {
  font-weight: 700;
  color: var(--gold);
  font-family: var(--font-title);
  font-size: 0.78rem;
}

.tt-note {
  font-size: 0.78rem;
  color: var(--text-dim);
  font-style: italic;
  line-height: 1.4;
  margin-top: 0.3rem;
}

/* ── Responsive ──────────────────────────────────────────────────────────────── */
@media (max-width: 720px) {
  .site-wrapper {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto 1fr auto;
    grid-template-areas:
      "header"
      "sidebar"
      "main"
      "footer";
  }

  .site-sidebar {
    position: relative;
    height: auto;
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding: 0.5rem 0;
  }

  #class-nav {
    flex-direction: row;
    flex-wrap: wrap;
    padding: 0 0.5rem;
    gap: 0.25rem;
  }

  .nav-class {
    padding: 0.3rem 0.5rem;
    border-left: none;
    border-bottom: 2px solid transparent;
  }

  .nav-class.active {
    border-bottom-color: var(--gold);
  }

  .nav-name { display: none; }

  .site-main { padding: 1rem; }

  .class-layout {
    flex-direction: column;
  }

  .class-content {
    max-width: 100%;
  }

  .stats-panel {
    width: 100%;
    position: static;
    max-height: none;
  }

  .site-title { font-size: 1.3rem; }
}
