/* ============================================================
   BIOL 141 · Exam 2 Boss Rush — stylesheet
   ============================================================ */

:root {
  --bg: #0a0e1a;
  --bg-2: #0f1526;
  --panel: rgba(22, 30, 51, 0.72);
  --panel-solid: #161e33;
  --panel-2: rgba(30, 40, 66, 0.6);
  --line: rgba(120, 150, 220, 0.18);
  --line-strong: rgba(140, 175, 255, 0.35);
  --text: #e8eefc;
  --text-dim: #a3b0cc;
  --muted: #7183a6;
  --accent: #5b8cff;
  --accent-2: #22d3ee;
  --accent-3: #a78bfa;
  --good: #34d399;
  --bad: #fb7185;
  --warn: #fbbf24;
  --gold: #fcd34d;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.85);
  --shadow-glow: 0 0 0 1px rgba(91, 140, 255, 0.35), 0 18px 50px -20px rgba(91, 140, 255, 0.55);
  --font: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Code", Menlo, Consolas, monospace;
}

html[data-theme="light"] {
  --bg: #eef2fb;
  --bg-2: #e3e9f7;
  --panel: rgba(255, 255, 255, 0.82);
  --panel-solid: #ffffff;
  --panel-2: rgba(240, 244, 255, 0.85);
  --line: rgba(40, 70, 140, 0.14);
  --line-strong: rgba(40, 70, 140, 0.3);
  --text: #101a30;
  --text-dim: #3d4c6b;
  --muted: #66769a;
  --accent: #2f5fe0;
  --accent-2: #0891b2;
  --accent-3: #7c3aed;
  --good: #059669;
  --bad: #e11d48;
  --shadow: 0 16px 36px -20px rgba(20, 40, 90, 0.5);
}

* { box-sizing: border-box; }
html, body { height: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.bg-orbs { position: fixed; inset: 0; z-index: -1; overflow: hidden; }
.bg-orbs span {
  position: absolute; border-radius: 50%; filter: blur(90px); opacity: 0.4;
  animation: float 22s ease-in-out infinite;
}
.bg-orbs span:nth-child(1) { width: 46vw; height: 46vw; background: #2b53c8; top: -12vw; left: -8vw; }
.bg-orbs span:nth-child(2) { width: 38vw; height: 38vw; background: #0e7490; bottom: -14vw; right: -6vw; animation-delay: -7s; }
.bg-orbs span:nth-child(3) { width: 30vw; height: 30vw; background: #6d28d9; top: 40%; left: 55%; animation-delay: -14s; }
html[data-theme="light"] .bg-orbs span { opacity: 0.22; }
@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(4vw, 3vw) scale(1.08); }
  66% { transform: translate(-3vw, -2vw) scale(0.95); }
}

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 14px;
  padding: 10px 18px;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }
.brand-mark { font-size: 26px; filter: drop-shadow(0 0 12px rgba(91,140,255,.7)); }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-text b { font-size: 15px; letter-spacing: .5px; }
.brand-text small { font-size: 11px; color: var(--muted); letter-spacing: 1.2px; text-transform: uppercase; }

.hud { margin-left: auto; display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.hud-item { display: flex; align-items: center; gap: 7px; font-size: 12px; }
.hud-label { color: var(--muted); letter-spacing: 1px; font-weight: 700; font-size: 10px; }
.hud-value { font-weight: 800; font-size: 15px; font-variant-numeric: tabular-nums; }
.hud-sub { color: var(--muted); font-size: 10px; }
.xp-bar {
  width: 90px; height: 7px; border-radius: 99px; overflow: hidden;
  background: rgba(120, 150, 220, 0.2); border: 1px solid var(--line);
}
.xp-bar i { display: block; height: 100%; width: 0%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); transition: width .5s cubic-bezier(.2,.9,.2,1); }

.icon-btn {
  background: var(--panel-2); border: 1px solid var(--line); color: var(--text);
  width: 36px; height: 36px; border-radius: 10px; cursor: pointer; font-size: 16px;
  display: grid; place-items: center; transition: .18s;
}
.icon-btn:hover { border-color: var(--line-strong); transform: translateY(-1px); }
.menu-btn { display: none; }

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: 268px 1fr; min-height: calc(100vh - 59px); }

.sidebar {
  border-right: 1px solid var(--line);
  padding: 16px 12px 40px;
  position: sticky; top: 59px; height: calc(100vh - 59px); overflow-y: auto;
  background: color-mix(in srgb, var(--bg-2) 60%, transparent);
}
.sidebar nav { display: flex; flex-direction: column; gap: 3px; }
.nav-group-title {
  font-size: 10px; letter-spacing: 1.4px; text-transform: uppercase;
  color: var(--muted); margin: 16px 10px 6px; font-weight: 800;
}
.nav-link {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 11px; border-radius: 10px; text-decoration: none;
  color: var(--text-dim); font-size: 13.5px; font-weight: 600;
  border: 1px solid transparent; transition: .15s;
}
.nav-link:hover { background: var(--panel-2); color: var(--text); }
.nav-link.active { background: linear-gradient(90deg, rgba(91,140,255,.22), rgba(34,211,238,.08)); color: var(--text); border-color: var(--line-strong); }
.nav-ico { font-size: 16px; width: 20px; text-align: center; }
.nav-pct { margin-left: auto; font-size: 10.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.nav-link.done .nav-pct { color: var(--good); }
.sidebar-foot { margin-top: 22px; padding: 0 10px; }
.tiny { font-size: 11px; }
.muted { color: var(--muted); }

/* ---------- view ---------- */
.view { padding: 26px 30px 90px; max-width: 1100px; outline: none; }
.page-head { margin-bottom: 22px; }
.eyebrow { font-size: 11px; letter-spacing: 2px; text-transform: uppercase; color: var(--accent-2); font-weight: 800; }
h1 { font-size: clamp(24px, 3.4vw, 34px); margin: 6px 0 8px; line-height: 1.2; letter-spacing: -0.4px; }
h2 { font-size: 21px; margin: 30px 0 10px; letter-spacing: -0.2px; }
h3 { font-size: 16.5px; margin: 20px 0 8px; }
p { margin: 9px 0; color: var(--text-dim); }
a { color: var(--accent-2); }
.lead { font-size: 16px; color: var(--text-dim); max-width: 72ch; }
hr { border: none; border-top: 1px solid var(--line); margin: 26px 0; }
code, .mono { font-family: var(--mono); font-size: .92em; background: rgba(120,150,220,.14); padding: 1px 6px; border-radius: 6px; }
ul, ol { color: var(--text-dim); padding-left: 22px; }
li { margin: 4px 0; }
b, strong { color: var(--text); }

/* ---------- cards & grid ---------- */
.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 20px; box-shadow: var(--shadow); backdrop-filter: blur(10px);
}
.card + .card { margin-top: 14px; }
.grid { display: grid; gap: 14px; }
.grid.cols-2 { grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.grid.cols-4 { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }

.tile {
  display: flex; flex-direction: column; gap: 8px;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px; text-decoration: none; color: var(--text);
  transition: .2s; position: relative; overflow: hidden;
}
.tile:hover { transform: translateY(-3px); border-color: var(--line-strong); box-shadow: var(--shadow-glow); }
.tile .tile-ico { font-size: 26px; }
.tile h3 { margin: 0; font-size: 15.5px; }
.tile p { margin: 0; font-size: 12.5px; color: var(--muted); }
.tile-bar { height: 6px; border-radius: 99px; background: rgba(120,150,220,.18); overflow: hidden; }
.tile-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
.tile-meta { font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }

/* ---------- badges / chips ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 700; letter-spacing: .4px;
  padding: 4px 10px; border-radius: 99px;
  background: var(--panel-2); border: 1px solid var(--line); color: var(--text-dim);
}
.chip.good { color: var(--good); border-color: color-mix(in srgb, var(--good) 45%, transparent); }
.chip.warn { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 45%, transparent); }
.chip.bad { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 45%, transparent); }
.chip.accent { color: var(--accent-2); border-color: color-mix(in srgb, var(--accent-2) 45%, transparent); }

.badge-card {
  display: flex; gap: 12px; align-items: flex-start;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px;
  transition: .2s;
}
.badge-card.locked { opacity: .48; filter: grayscale(.85); }
.badge-card.earned { border-color: color-mix(in srgb, var(--gold) 45%, transparent); box-shadow: 0 0 0 1px color-mix(in srgb, var(--gold) 22%, transparent), 0 14px 34px -22px var(--gold); }
.badge-ico { font-size: 30px; line-height: 1; }
.badge-card h4 { margin: 0 0 3px; font-size: 14px; }
.badge-card p { margin: 0; font-size: 12px; color: var(--muted); }
.badge-date { font-size: 10.5px; color: var(--muted); margin-top: 5px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 17px; border-radius: 11px; cursor: pointer;
  font-family: inherit; font-size: 13.5px; font-weight: 700;
  background: var(--panel-2); border: 1px solid var(--line-strong); color: var(--text);
  transition: .18s; text-decoration: none;
}
.btn:hover { transform: translateY(-1px); border-color: var(--accent); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn.primary { background: linear-gradient(135deg, var(--accent), var(--accent-3)); border-color: transparent; color: #fff; }
.btn.primary:hover { box-shadow: var(--shadow-glow); }
.btn.ghost { background: transparent; }
.btn.small { padding: 6px 12px; font-size: 12px; border-radius: 9px; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

/* ---------- callouts ---------- */
.callout {
  border-left: 3px solid var(--accent); background: var(--panel-2);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0; padding: 12px 16px; margin: 14px 0;
}
.callout.trap { border-color: var(--bad); }
.callout.memo { border-color: var(--gold); }
.callout.tip { border-color: var(--good); }
.callout h4 { margin: 0 0 5px; font-size: 13px; letter-spacing: .6px; text-transform: uppercase; }
.callout p, .callout li { margin: 4px 0; font-size: 13.5px; }
.callout.trap h4 { color: var(--bad); }
.callout.memo h4 { color: var(--gold); }
.callout.tip h4 { color: var(--good); }
.callout:not(.trap):not(.memo):not(.tip) h4 { color: var(--accent-2); }

table { border-collapse: collapse; width: 100%; margin: 14px 0; font-size: 13.5px; }
th, td { border: 1px solid var(--line); padding: 8px 11px; text-align: left; }
th { background: var(--panel-2); font-weight: 700; font-size: 12px; letter-spacing: .5px; text-transform: uppercase; color: var(--text-dim); }
td { color: var(--text-dim); }
tbody tr:hover td { background: rgba(120,150,220,.07); }

/* ---------- objective blocks ---------- */
.obj { border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); margin: 12px 0; overflow: hidden; }
.obj-head { display: flex; gap: 12px; align-items: flex-start; padding: 15px 17px; cursor: pointer; user-select: none; }
.obj-head:hover { background: var(--panel-2); }
.obj-check {
  flex: none; width: 22px; height: 22px; border-radius: 7px; margin-top: 2px;
  border: 2px solid var(--line-strong); display: grid; place-items: center; font-size: 13px; transition: .2s;
}
.obj.done .obj-check { background: var(--good); border-color: var(--good); color: #04120c; }
.obj-titles { flex: 1; }
.obj-code { font-size: 11px; font-weight: 800; letter-spacing: 1px; color: var(--accent-2); }
.obj-title { font-size: 15px; font-weight: 700; color: var(--text); margin: 2px 0 3px; }
.obj-goal { font-size: 12.5px; color: var(--muted); }
.obj-caret { color: var(--muted); font-size: 13px; transition: transform .25s; }
.obj.open .obj-caret { transform: rotate(90deg); }
.obj-body { display: none; padding: 0 17px 17px 51px; }
.obj.open .obj-body { display: block; animation: fade .25s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

.cp-list { list-style: none; padding: 0; margin: 12px 0 0; }
.cp-list li { display: flex; gap: 10px; align-items: flex-start; padding: 6px 0; font-size: 13.5px; color: var(--text-dim); border-bottom: 1px dashed var(--line); }
.cp-list li:last-child { border-bottom: none; }
.cp-box {
  flex: none; width: 19px; height: 19px; border-radius: 6px; margin-top: 2px; cursor: pointer;
  border: 2px solid var(--line-strong); display: grid; place-items: center; font-size: 11px; transition: .15s;
}
.cp-box:hover { border-color: var(--accent); }
.cp-list li.checked .cp-box { background: var(--good); border-color: var(--good); color: #04120c; }
.cp-list li.checked { color: var(--muted); }

/* ---------- quiz ---------- */
.quiz-shell { max-width: 780px; }
.q-progress { display: flex; gap: 5px; flex-wrap: wrap; margin-bottom: 16px; }
.q-dot { width: 26px; height: 6px; border-radius: 99px; background: rgba(120,150,220,.22); transition: .25s; }
.q-dot.cur { background: var(--accent); box-shadow: 0 0 12px var(--accent); }
.q-dot.right { background: var(--good); }
.q-dot.wrong { background: var(--bad); }
.q-dot.missed { background: var(--warn); }

.q-stem { font-size: 17px; font-weight: 600; color: var(--text); margin: 6px 0 16px; line-height: 1.5; }
.q-choices { display: flex; flex-direction: column; gap: 9px; }
.choice {
  display: flex; gap: 12px; align-items: flex-start; text-align: left;
  padding: 12px 15px; border-radius: 12px; cursor: pointer; font-family: inherit; font-size: 14px;
  background: var(--panel); border: 1px solid var(--line); color: var(--text-dim); transition: .15s;
}
.choice:hover:not(:disabled) { border-color: var(--accent); color: var(--text); transform: translateX(3px); }
.choice .key {
  flex: none; width: 24px; height: 24px; border-radius: 8px; display: grid; place-items: center;
  background: var(--panel-2); border: 1px solid var(--line); font-size: 12px; font-weight: 800; color: var(--text-dim);
}
.choice.correct { border-color: var(--good); background: color-mix(in srgb, var(--good) 12%, var(--panel)); color: var(--text); }
.choice.correct .key { background: var(--good); color: #04120c; border-color: var(--good); }
.choice.incorrect { border-color: var(--bad); background: color-mix(in srgb, var(--bad) 12%, var(--panel)); color: var(--text); }
.choice.incorrect .key { background: var(--bad); color: #1a0509; border-color: var(--bad); }
.choice:disabled { cursor: default; }

.explain {
  margin-top: 14px; padding: 14px 16px; border-radius: 12px;
  background: var(--panel-2); border: 1px solid var(--line-strong);
  font-size: 13.5px; color: var(--text-dim); animation: fade .25s ease;
}
.explain h4 { margin: 0 0 6px; font-size: 12px; letter-spacing: 1px; text-transform: uppercase; color: var(--accent-2); }
.explain .why-right { color: var(--good); font-weight: 700; }
.explain .why-wrong { color: var(--bad); font-weight: 700; }

/* ---------- flashcards ---------- */
.fc-stage { display: grid; place-items: center; gap: 16px; }
.flashcard { width: min(620px, 100%); height: 300px; perspective: 1400px; cursor: pointer; }
.flashcard-inner { position: relative; width: 100%; height: 100%; transition: transform .6s cubic-bezier(.3,.9,.2,1); transform-style: preserve-3d; }
.flashcard.flipped .flashcard-inner { transform: rotateY(180deg); }
.fc-face {
  position: absolute; inset: 0; backface-visibility: hidden; border-radius: var(--radius);
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  padding: 28px; border: 1px solid var(--line-strong); box-shadow: var(--shadow); overflow-y: auto;
}
.fc-front { background: linear-gradient(150deg, var(--panel-solid), var(--bg-2)); }
.fc-back { background: linear-gradient(150deg, color-mix(in srgb, var(--accent) 16%, var(--panel-solid)), var(--bg-2)); transform: rotateY(180deg); }
.fc-tag { font-size: 10px; letter-spacing: 2px; text-transform: uppercase; color: var(--accent-2); font-weight: 800; margin-bottom: 12px; }
.fc-text { font-size: 19px; font-weight: 600; color: var(--text); line-height: 1.45; }
.fc-back .fc-text { font-size: 16px; font-weight: 500; }
.fc-hint { position: absolute; bottom: 14px; font-size: 11px; color: var(--muted); }

/* ---------- tools ---------- */
.tool-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.field { display: flex; flex-direction: column; gap: 5px; margin: 10px 0; }
.field label { font-size: 11.5px; letter-spacing: .8px; text-transform: uppercase; color: var(--muted); font-weight: 700; }
input[type="text"], input[type="number"], select, textarea {
  font-family: var(--mono); font-size: 14px; padding: 10px 12px; border-radius: 10px;
  background: var(--bg-2); border: 1px solid var(--line); color: var(--text); width: 100%;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(91,140,255,.2); }
textarea { min-height: 84px; resize: vertical; }
.out { font-family: var(--mono); font-size: 14px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px; padding: 14px; margin-top: 12px; white-space: pre-wrap; word-break: break-word; color: var(--text); }
.out .ok { color: var(--good); }
.out .no { color: var(--bad); }
.out .hi { color: var(--accent-2); }

.punnett { display: grid; gap: 2px; margin-top: 12px; font-family: var(--mono); font-size: 15px; }
.punnett div { padding: 8px 4px; text-align: center; border-radius: 6px; background: var(--panel-2); }
.punnett .hdr { background: color-mix(in srgb, var(--accent) 28%, var(--panel-2)); font-weight: 800; }
.punnett .corner { background: transparent; }

.codon-table { width: 100%; border-collapse: collapse; font-family: var(--mono); font-size: 11.5px; }
.codon-table th, .codon-table td { padding: 3px 5px; text-align: center; border: 1px solid var(--line); }
.codon-table th { background: var(--panel-2); color: var(--accent-2); font-size: 10px; }
.aa-seq { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.aa-chip { display: flex; flex-direction: column; align-items: center; padding: 6px 9px; border-radius: 9px; background: var(--panel-2); border: 1px solid var(--line); font-family: var(--mono); font-size: 11px; }
.aa-chip b { font-size: 13px; color: var(--accent-2); }
.aa-chip.stop { border-color: var(--bad); }
.aa-chip.stop b { color: var(--bad); }

.meiosis-stage { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.stage-card { flex: 1 1 150px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 12px; padding: 12px; }
.stage-card h4 { margin: 0 0 5px; font-size: 13px; color: var(--accent-2); }
.stage-card p { margin: 0; font-size: 12px; }
.stage-card .sep { color: var(--gold); font-weight: 700; }

/* ---------- stat rings ---------- */
.ring-row { display: flex; gap: 22px; flex-wrap: wrap; align-items: center; }
.ring { display: grid; place-items: center; position: relative; width: 104px; height: 104px; }
.ring svg { transform: rotate(-90deg); }
.ring .ring-val { position: absolute; font-size: 19px; font-weight: 800; font-variant-numeric: tabular-nums; }
.ring-label { text-align: center; font-size: 11px; color: var(--muted); margin-top: 6px; letter-spacing: .6px; }
.ring-wrap { display: flex; flex-direction: column; align-items: center; }
.mini-ring { width: 100%; height: 6px; border-radius: 99px; background: rgba(120,150,220,.2); overflow: hidden; margin-bottom: 8px; }
.mini-ring i { display: block; height: 100%; background: linear-gradient(90deg, var(--good), var(--accent-2)); transition: width .5s; }

/* ---------- toasts ---------- */
.toasts { position: fixed; right: 18px; bottom: 18px; z-index: 200; display: flex; flex-direction: column; gap: 10px; align-items: flex-end; }
.toast {
  display: flex; gap: 12px; align-items: center; min-width: 250px; max-width: 360px;
  padding: 12px 16px; border-radius: 13px; background: var(--panel-solid);
  border: 1px solid var(--line-strong); box-shadow: var(--shadow);
  animation: toastIn .35s cubic-bezier(.2,.9,.2,1); font-size: 13px;
}
.toast.good { border-color: color-mix(in srgb, var(--good) 55%, transparent); }
.toast.badge { border-color: var(--gold); box-shadow: 0 0 0 1px color-mix(in srgb, var(--gold) 35%, transparent), var(--shadow); }
.toast .t-ico { font-size: 22px; }
.toast b { display: block; font-size: 13px; }
.toast small { color: var(--muted); font-size: 11.5px; }
@keyframes toastIn { from { opacity: 0; transform: translateX(40px) scale(.95); } to { opacity: 1; transform: none; } }
.toast.out { animation: toastOut .3s ease forwards; }
@keyframes toastOut { to { opacity: 0; transform: translateX(30px); } }

/* ---------- modal ---------- */
.modal { position: fixed; inset: 0; z-index: 300; display: grid; place-items: center; background: rgba(4,8,18,.72); backdrop-filter: blur(5px); padding: 20px; }
.modal[hidden] { display: none; }
.modal-card { background: var(--panel-solid); border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 24px; max-width: 460px; width: 100%; box-shadow: var(--shadow); animation: fade .25s ease; }

/* ---------- misc ---------- */
.stat-big { font-size: 27px; font-weight: 800; font-variant-numeric: tabular-nums; }
.kv { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px dashed var(--line); font-size: 13px; }
.kv:last-child { border-bottom: none; }
.kv span:first-child { color: var(--muted); }
.kv span:last-child { font-weight: 700; font-variant-numeric: tabular-nums; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 11.5px; color: var(--muted); margin-top: 10px; }
.legend i { display: inline-block; width: 11px; height: 11px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.mono-block { font-family: var(--mono); font-size: 13px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; margin: 10px 0; overflow-x: auto; }
.center { text-align: center; }
.spacer { height: 18px; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .menu-btn { display: grid; }
  .sidebar { position: fixed; z-index: 60; left: 0; top: 59px; width: 280px; transform: translateX(-102%); transition: transform .28s cubic-bezier(.3,.9,.2,1); box-shadow: var(--shadow); }
  .sidebar.open { transform: none; }
  .view { padding: 18px 16px 80px; }
  .hud { gap: 10px; }
  .xp-bar { width: 60px; }
  .brand-text small { display: none; }
}
@media (max-width: 560px) {
  .hud-item:nth-child(2), .hud-item:nth-child(4) { display: none; }
  .flashcard { height: 340px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
