/* ============================================================
   Philosophy Quest — theme
   Dark "ink & marble" with gold accents. Mobile-first.
   ============================================================ */
:root {
  --bg: #14121b;
  --bg-2: #1c1926;
  --panel: #211d2c;
  --panel-2: #2a2537;
  --line: #38324a;
  --ink: #ece7f5;
  --ink-dim: #b3aac6;
  --muted: #8b83a1;
  --gold: #d7b24a;
  --gold-soft: #e6cd82;
  --good: #6bbf73;
  --bad: #d76a63;
  --radius: 16px;
  --radius-sm: 11px;
  --shadow: 0 10px 30px rgba(0,0,0,.35);
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --maxw: 760px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background:
    radial-gradient(1200px 800px at 50% -10%, #241f33 0%, transparent 60%),
    var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100dvh;
}
button { font-family: inherit; cursor: pointer; }
h1, h2, h3 { font-family: var(--serif); font-weight: 700; letter-spacing: .2px; }
::selection { background: var(--gold); color: #201a08; }

/* ---- App bar ------------------------------------------------ */
.appbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
  padding: max(10px, env(safe-area-inset-top)) 16px 10px;
  background: rgba(20,18,27,.82);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 9px; background: none; border: 0; color: var(--ink); padding: 4px; }
.brand-glyph {
  font-family: var(--serif); font-size: 26px; line-height: 1;
  color: var(--gold); text-shadow: 0 0 18px rgba(215,178,74,.5);
}
.brand-name { font-family: var(--serif); font-weight: 700; font-size: 17px; }
.appbar-stats { display: flex; align-items: center; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 5px;
  background: var(--panel); border: 1px solid var(--line);
  padding: 5px 10px; border-radius: 999px; font-size: 14px; color: var(--ink-dim);
}
.chip b { color: var(--ink); }
.level-chip { flex-direction: column; align-items: stretch; gap: 3px; padding: 5px 10px; }
.lvl { font-size: 12px; color: var(--gold-soft); font-weight: 700; text-align: center; }
.lvl-bar { width: 54px; height: 4px; background: #0e0c14; border-radius: 3px; overflow: hidden; }
.lvl-fill { display: block; height: 100%; background: linear-gradient(90deg, var(--gold), var(--gold-soft)); }

/* ---- Layout ------------------------------------------------- */
.screen {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 18px 16px calc(40px + env(safe-area-inset-bottom));
  animation: fade .28s ease;
}
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---- Home --------------------------------------------------- */
.home-hero {
  text-align: center;
  padding: 14px 8px 6px;
}
.home-title {
  font-size: clamp(30px, 8vw, 44px);
  margin: 6px 0 4px;
  background: linear-gradient(180deg, var(--gold-soft), var(--gold));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.home-tag { color: var(--ink-dim); margin: 0 auto 18px; max-width: 30ch; }
.home-status {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 14px;
}
.status-box {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 12px 8px; display: flex; flex-direction: column; gap: 3px;
}
.status-num { font-family: var(--serif); font-size: clamp(15px, 4.4vw, 19px); color: var(--gold-soft); font-weight: 700; }
.status-lbl { font-size: 11.5px; color: var(--muted); }

.section-head { font-size: 15px; color: var(--muted); text-transform: uppercase; letter-spacing: 1.5px; margin: 24px 4px 12px; }

.game-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 460px) { .game-grid { grid-template-columns: 1fr; } }

.game-tile, .study-tile {
  position: relative; text-align: left;
  display: flex; gap: 12px; align-items: center;
  background: linear-gradient(160deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px; color: var(--ink);
  transition: transform .12s ease, border-color .12s ease, box-shadow .12s ease;
}
.game-tile:hover, .study-tile:hover { transform: translateY(-2px); border-color: var(--gold); box-shadow: var(--shadow); }
.game-tile:active, .study-tile:active { transform: translatey(0) scale(.99); }
.tile-glyph { font-size: 30px; flex: none; filter: drop-shadow(0 2px 8px rgba(0,0,0,.4)); }
.tile-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.tile-title { font-family: var(--serif); font-size: 18px; }
.tile-desc { font-size: 13px; color: var(--ink-dim); }
.tile-best {
  position: absolute; top: 10px; right: 12px; font-size: 11px; color: var(--gold-soft);
  background: rgba(215,178,74,.12); border: 1px solid rgba(215,178,74,.3);
  padding: 2px 8px; border-radius: 999px;
}
.tile-best.new { color: var(--muted); background: none; border-color: var(--line); }
.study-tile { width: 100%; }
.tile-arrow { margin-left: auto; font-size: 22px; color: var(--gold); }

.home-foot { text-align: center; margin-top: 26px; color: var(--muted); font-size: 14px; }
.link-btn { background: none; border: 0; color: var(--gold-soft); text-decoration: underline; font-size: 14px; }

/* ---- Progress bar ------------------------------------------- */
.progress { position: relative; height: 12px; background: #0f0d16; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.progress-fill { height: 100%; background: linear-gradient(90deg, var(--gold), var(--gold-soft)); transition: width .5s ease; }
.progress-label { position: absolute; inset: 0; display: grid; place-items: center; font-size: 10px; color: var(--ink); text-shadow: 0 1px 2px rgba(0,0,0,.6); }

/* ---- Shared game chrome ------------------------------------- */
.game-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.qcount { font-size: 13px; color: var(--muted); text-align: center; flex: 1; font-weight: 600; }
.ghost-btn {
  background: var(--panel); border: 1px solid var(--line); color: var(--ink-dim);
  padding: 8px 12px; border-radius: 999px; font-size: 13px; white-space: nowrap;
}
.ghost-btn:hover { color: var(--ink); border-color: var(--gold); }
.primary {
  background: linear-gradient(180deg, var(--gold-soft), var(--gold));
  color: #241c05; border: 0; font-weight: 700; font-size: 16px;
  padding: 14px 20px; border-radius: 12px; width: 100%;
  box-shadow: 0 6px 18px rgba(215,178,74,.25);
  transition: transform .1s ease, filter .1s ease;
}
.primary:hover { filter: brightness(1.05); }
.primary:active { transform: scale(.98); }
.danger-btn { background: rgba(215,106,99,.12); border: 1px solid var(--bad); color: #f0a9a4; padding: 12px 18px; border-radius: 12px; font-weight: 600; }
.tl-instr { color: var(--ink-dim); text-align: center; margin: 4px 0 16px; }

/* ---- Quiz --------------------------------------------------- */
.combo { font-size: 13px; color: var(--muted); min-width: 68px; text-align: right; font-weight: 700; }
.combo.hot { color: var(--gold-soft); }
.qbar { height: 5px; background: #0f0d16; border-radius: 3px; overflow: hidden; margin-bottom: 20px; }
.qbar-fill { height: 100%; background: linear-gradient(90deg, var(--gold), var(--gold-soft)); transition: width .3s ease; }
.qprompt { font-size: clamp(20px, 5.2vw, 26px); line-height: 1.35; margin: 0 0 20px; }
.options { display: flex; flex-direction: column; gap: 11px; }
.option {
  text-align: left; background: var(--panel); border: 1.5px solid var(--line);
  color: var(--ink); font-size: 16px; padding: 15px 16px; border-radius: 13px;
  transition: border-color .12s, background .12s, transform .08s;
}
.option:not(:disabled):hover { border-color: var(--gold); background: var(--panel-2); }
.option:not(:disabled):active { transform: scale(.99); }
.option:disabled { opacity: .95; cursor: default; }
.option.correct { border-color: var(--good); background: rgba(107,191,115,.16); color: #d7f5db; }
.option.wrong { border-color: var(--bad); background: rgba(215,106,99,.15); color: #f6cecb; }
.explain { margin-top: 18px; border-radius: 13px; padding: 14px 16px; border: 1px solid var(--line); animation: fade .25s ease; }
.explain.good { border-color: rgba(107,191,115,.5); background: rgba(107,191,115,.08); }
.explain.bad { border-color: rgba(215,106,99,.5); background: rgba(215,106,99,.08); }
.explain-head { font-weight: 700; font-family: var(--serif); margin-bottom: 4px; }
.explain.good .explain-head { color: var(--good); }
.explain.bad .explain-head { color: var(--bad); }
.explain-body { color: var(--ink-dim); font-size: 14.5px; }
.next-btn { margin-top: 16px; }

/* ---- Results ------------------------------------------------ */
.result-card { text-align: center; background: linear-gradient(160deg, var(--panel-2), var(--panel)); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 20px; box-shadow: var(--shadow); }
.result-emoji { font-size: 54px; }
.result-card h2 { font-size: 40px; margin: 6px 0 2px; color: var(--gold-soft); }
.result-verdict { color: var(--ink-dim); margin: 0 0 18px; }
.result-stats { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; margin-bottom: 16px; }
.stat { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 6px; display: flex; flex-direction: column; gap: 2px; }
.stat-num { font-family: var(--serif); font-size: 20px; color: var(--gold-soft); font-weight: 700; }
.stat-lbl { font-size: 11px; color: var(--muted); }
.record-badge { color: var(--gold-soft); font-weight: 700; margin-bottom: 16px; animation: pop .4s ease; }
@keyframes pop { 0% { transform: scale(.6); opacity: 0; } 70% { transform: scale(1.1); } 100% { transform: scale(1); opacity: 1; } }
.result-actions { display: flex; flex-direction: column; gap: 10px; }

/* ---- Timeline ----------------------------------------------- */
.tl-list, .dlg-log { list-style: none; padding: 0; margin: 0; }
.tl-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 18px; }
.tl-card {
  display: flex; align-items: center; gap: 12px;
  background: var(--panel); border: 1px solid var(--line);
  border-left: 4px solid var(--gold); border-radius: var(--radius-sm); padding: 12px 14px;
}
.tl-move { display: flex; flex-direction: column; gap: 4px; }
.tl-arrow { width: 34px; height: 26px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel-2); color: var(--ink); font-size: 12px; line-height: 1; }
.tl-arrow:disabled { opacity: .3; }
.tl-arrow:not(:disabled):active { background: var(--gold); color: #201a08; }
.tl-glyph { font-size: 24px; flex: none; }
.tl-name { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.tl-name strong { font-family: var(--serif); font-size: 17px; }
.tl-era { font-size: 12px; color: var(--muted); }
.tl-list.reveal .tl-card { border-left-width: 4px; }
.tl-card.ok { background: rgba(107,191,115,.1); }
.tl-card.miss { background: rgba(215,106,99,.1); }
.tl-mark { margin-left: auto; font-size: 18px; font-weight: 700; }
.tl-card.ok .tl-mark { color: var(--good); }
.tl-card.miss .tl-mark { color: var(--bad); }
.tl-score { text-align: center; font-size: 26px; margin: 6px 0 2px; color: var(--gold-soft); }
.check-btn { margin-top: 6px; }

/* ---- Quote Match -------------------------------------------- */
.qm-board { display: grid; grid-template-columns: 1fr; gap: 14px; margin-bottom: 14px; }
.qm-col { display: flex; flex-direction: column; gap: 10px; }
.qm-quote {
  text-align: left; background: var(--panel); border: 1.5px solid var(--line);
  color: var(--ink); font-family: var(--serif); font-style: italic; font-size: 15.5px;
  padding: 14px 15px; border-radius: 12px; line-height: 1.4;
}
.qm-quote.active { border-color: var(--gold); background: var(--panel-2); box-shadow: 0 0 0 3px rgba(215,178,74,.18); }
.qm-quote.done { opacity: .4; border-style: dashed; }
.qm-name {
  display: flex; align-items: center; gap: 9px;
  background: var(--panel-2); border: 1.5px solid var(--line);
  color: var(--ink); font-size: 15px; padding: 12px 14px; border-radius: 999px;
}
.qm-name:not(:disabled):hover { border-color: var(--accent, var(--gold)); }
.qm-name.done { opacity: .4; border-color: var(--good); background: rgba(107,191,115,.12); }
.qm-glyph { font-size: 18px; }
.qm-progress { text-align: center; color: var(--muted); font-size: 13px; }
@media (min-width: 620px) {
  .qm-board { grid-template-columns: 1.3fr 1fr; align-items: start; }
}

/* ---- Dialogue ----------------------------------------------- */
.dlg-grid { display: flex; flex-direction: column; gap: 12px; }
.dlg-choice {
  display: flex; align-items: center; gap: 14px; text-align: left;
  background: linear-gradient(160deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line); border-left: 4px solid var(--accent, var(--gold));
  border-radius: var(--radius); padding: 16px; color: var(--ink);
  transition: transform .12s, border-color .12s;
}
.dlg-choice:hover { transform: translateY(-2px); border-color: var(--gold); }
.dlg-glyph { font-size: 30px; flex: none; }
.dlg-meta { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.dlg-meta strong { font-family: var(--serif); font-size: 17px; }
.dlg-blurb { font-size: 13px; color: var(--ink-dim); }
.dlg-done { margin-left: auto; color: var(--good); font-size: 20px; font-weight: 700; }

.dlg-log { display: flex; flex-direction: column; gap: 12px; margin-bottom: 18px; }
.dlg-bubble {
  background: var(--panel); border: 1px solid var(--line);
  border-left: 3px solid var(--accent, var(--gold));
  padding: 12px 15px; border-radius: 12px; max-width: 92%;
  animation: fade .25s ease;
}
.dlg-bubble.me { align-self: flex-end; border-left: 0; border-right: 3px solid var(--gold); background: var(--panel-2); text-align: right; }
.dlg-bubble.dim { opacity: .5; }
.dlg-speaker { font-size: 12px; color: var(--gold-soft); font-weight: 700; margin-bottom: 4px; display: flex; align-items: center; gap: 6px; }
.dlg-bubble.me .dlg-speaker { color: var(--muted); justify-content: flex-end; }
.dlg-bubble p { margin: 0; font-family: var(--serif); font-size: 16.5px; line-height: 1.45; }
.dlg-glyph-sm { font-size: 15px; }
.dlg-choices { display: flex; flex-direction: column; gap: 10px; }
.dlg-reply {
  text-align: left; background: var(--panel-2); border: 1.5px solid var(--line);
  color: var(--ink); font-size: 15.5px; padding: 14px 16px; border-radius: 12px;
  transition: border-color .12s, transform .08s;
}
.dlg-reply:hover { border-color: var(--gold); }
.dlg-reply:active { transform: scale(.99); }
.dlg-takeaway {
  border: 1px solid var(--accent, var(--gold)); border-radius: var(--radius);
  background: rgba(215,178,74,.06); padding: 18px; margin: 8px 0 18px;
}
.dlg-takeaway-head { font-family: var(--serif); font-weight: 700; color: var(--gold-soft); margin-bottom: 6px; }
.dlg-takeaway p { margin: 0; color: var(--ink-dim); }
.dlg-xp { margin-top: 12px; font-weight: 700; color: var(--gold-soft); }

/* ---- Codex -------------------------------------------------- */
.codex-era { color: var(--muted); text-transform: uppercase; letter-spacing: 1.5px; font-size: 13px; margin: 22px 4px 10px; }
.codex-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (min-width: 560px) { .codex-grid { grid-template-columns: 1fr 1fr 1fr; } }
.codex-card {
  position: relative; text-align: center;
  background: linear-gradient(165deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line); border-top: 3px solid var(--accent, var(--gold));
  border-radius: var(--radius); padding: 16px 10px 12px; color: var(--ink);
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  transition: transform .12s, box-shadow .12s;
}
.codex-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.codex-mastered { position: absolute; top: 8px; right: 10px; color: var(--gold); }
.codex-glyph { font-size: 34px; }
.codex-name { font-family: var(--serif); font-size: 15.5px; line-height: 1.2; }
.codex-years { font-size: 11.5px; color: var(--muted); }
.codex-stars { font-size: 13px; color: var(--gold); letter-spacing: 2px; margin-top: 3px; }

.codex-hero { text-align: center; border-bottom: 1px solid var(--line); padding: 8px 0 20px; margin-bottom: 6px; }
.codex-hero-glyph { font-size: 60px; filter: drop-shadow(0 4px 16px rgba(0,0,0,.5)); }
.codex-hero h1 { font-size: clamp(26px, 7vw, 36px); margin: 6px 0 2px; color: var(--gold-soft); }
.codex-hero-sub { color: var(--ink-dim); font-size: 14px; }
.codex-hero-school { display: inline-block; margin-top: 8px; font-size: 12px; letter-spacing: 1px; text-transform: uppercase; color: var(--accent, var(--gold)); border: 1px solid var(--line); padding: 3px 12px; border-radius: 999px; }
.codex-hero-stars { margin-top: 10px; color: var(--gold); letter-spacing: 3px; font-size: 16px; display: flex; gap: 10px; align-items: center; justify-content: center; }
.codex-hero-badge { font-size: 11px; letter-spacing: 1px; color: var(--good); border: 1px solid var(--good); border-radius: 999px; padding: 2px 8px; }
.codex-hero-line { color: var(--ink); font-family: var(--serif); font-style: italic; font-size: 17px; max-width: 34ch; margin: 14px auto 0; }
.codex-section { margin: 20px 0; }
.codex-section h3 { font-size: 15px; color: var(--muted); text-transform: uppercase; letter-spacing: 1.4px; margin: 0 0 10px; }
.codex-big { font-family: var(--serif); font-size: 20px; line-height: 1.4; color: var(--ink); }
.codex-ideas { margin: 0; padding-left: 20px; }
.codex-ideas li { margin-bottom: 8px; color: var(--ink-dim); }
.codex-quotes blockquote { margin: 0 0 12px; padding: 12px 16px; border-left: 3px solid var(--gold); background: var(--panel); border-radius: 0 12px 12px 0; font-family: var(--serif); font-style: italic; color: var(--ink); }
.codex-fact { color: var(--ink-dim); }
.codex-nav { display: flex; justify-content: space-between; gap: 10px; margin: 18px 0; }

/* ---- Prose (about / settings) ------------------------------- */
.prose { color: var(--ink-dim); }
.prose h2 { color: var(--ink); font-size: 22px; margin: 22px 0 8px; }
.prose ul { padding-left: 20px; }
.prose li { margin-bottom: 6px; }
.prose b { color: var(--ink); }
.muted { color: var(--muted); font-size: 13px; }

/* ---- Toasts ------------------------------------------------- */
#toast-host { position: fixed; left: 0; right: 0; bottom: calc(20px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; align-items: center; gap: 8px; z-index: 60; pointer-events: none; }
.toast { background: var(--panel-2); border: 1px solid var(--line); color: var(--ink); padding: 10px 16px; border-radius: 999px; font-size: 14px; box-shadow: var(--shadow); opacity: 0; transform: translateY(12px); transition: .3s ease; }
.toast.show { opacity: 1; transform: none; }
.toast.bad { border-color: var(--bad); color: #f6cecb; }

/* ---- Confetti ----------------------------------------------- */
.confetti-host { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 55; }
.confetti { position: absolute; top: -12px; width: 9px; height: 14px; border-radius: 2px; animation: fall 2.4s linear forwards; }
@keyframes fall { to { transform: translateY(110vh) rotate(680deg); opacity: .9; } }

/* ---- Academy (home tile + lessons) -------------------------- */
.academy-tile {
  position: relative; width: 100%; text-align: left;
  display: flex; gap: 14px; align-items: center;
  background:
    radial-gradient(120% 140% at 0% 0%, rgba(215,178,74,.14), transparent 55%),
    linear-gradient(160deg, var(--panel-2), var(--panel));
  border: 1px solid rgba(215,178,74,.45); border-radius: var(--radius);
  padding: 18px; color: var(--ink);
  box-shadow: 0 8px 24px rgba(0,0,0,.28);
  transition: transform .12s, border-color .12s;
}
.academy-tile:hover { transform: translateY(-2px); border-color: var(--gold); }
.academy-tile .tile-glyph { font-size: 34px; }
.academy-badge {
  margin-left: auto; flex: none; font-size: 13px; font-weight: 700; color: #241c05;
  background: linear-gradient(180deg, var(--gold-soft), var(--gold));
  padding: 5px 12px; border-radius: 999px;
}

.learn-grid { display: flex; flex-direction: column; gap: 12px; margin-bottom: 6px; }
.learn-card {
  display: flex; align-items: center; gap: 14px; text-align: left;
  background: linear-gradient(160deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line); border-left: 4px solid var(--accent, var(--gold));
  border-radius: var(--radius); padding: 15px; color: var(--ink);
  transition: transform .12s, border-color .12s;
}
.learn-card:hover { transform: translateY(-2px); border-color: var(--gold); }
.learn-glyph { font-size: 30px; flex: none; }
.learn-meta { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.learn-meta strong { font-family: var(--serif); font-size: 17px; }
.learn-hook { font-size: 13px; color: var(--ink-dim); font-style: italic; }
.learn-done, .learn-go { margin-left: auto; flex: none; font-size: 20px; }
.learn-go { color: var(--gold); }

/* lesson body shared */
.learn-body { animation: fade .25s ease; }
.learn-actions { margin-top: 18px; }
.learn-step { display: inline-block; font-size: 12px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; font-weight: 700; }
.learn-tag { display: inline-block; font-size: 11px; letter-spacing: 1.2px; text-transform: uppercase; color: var(--gold-soft); font-weight: 700; margin-bottom: 6px; }

/* intro */
.learn-intro { text-align: center; border: 1px solid var(--line); border-top: 4px solid var(--accent, var(--gold)); border-radius: var(--radius); padding: 24px 18px; background: linear-gradient(160deg, var(--panel-2), var(--panel)); }
.learn-intro-glyph { font-size: 58px; filter: drop-shadow(0 4px 14px rgba(0,0,0,.5)); }
.learn-intro-name { font-size: clamp(26px, 7vw, 34px); margin: 6px 0 2px; color: var(--gold-soft); }
.learn-intro-sub { color: var(--muted); font-size: 13px; }
.learn-intro-hook { font-family: var(--serif); font-style: italic; font-size: clamp(18px, 4.6vw, 22px); line-height: 1.4; color: var(--ink); max-width: 32ch; margin: 16px auto; }
.learn-intro-big { text-align: left; background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.learn-intro-big p { margin: 0; font-family: var(--serif); font-size: 17px; }

/* concept */
.learn-concept-head { margin-bottom: 10px; }
.learn-concept-name { font-size: clamp(22px, 5.5vw, 28px); margin: 2px 0 0; padding-left: 12px; border-left: 4px solid var(--accent, var(--gold)); }
.learn-plain { font-size: 17px; line-height: 1.6; color: var(--ink); }
.learn-example, .learn-meaning, .learn-takeaway {
  margin-top: 16px; background: rgba(215,178,74,.07);
  border: 1px solid rgba(215,178,74,.3); border-radius: 12px; padding: 14px 16px;
  animation: fade .25s ease;
}
.learn-example p, .learn-meaning p, .learn-takeaway p { margin: 0; color: var(--ink-dim); font-size: 15.5px; line-height: 1.55; }

/* thought experiment */
.learn-scenario {
  display: flex; gap: 12px; align-items: flex-start;
  background: var(--panel); border: 1px solid var(--line);
  border-left: 4px solid var(--accent, var(--gold)); border-radius: 12px;
  padding: 16px; margin-bottom: 16px;
}
.learn-scenario p { margin: 0; font-family: var(--serif); font-size: 17px; line-height: 1.5; }
.learn-glyph-sm { font-size: 22px; flex: none; }
.learn-response {
  margin-top: 16px; background: var(--panel-2); border: 1px solid var(--line);
  border-left: 3px solid var(--accent, var(--gold)); border-radius: 12px; padding: 12px 15px;
  animation: fade .25s ease;
}
.learn-response p { margin: 0; font-family: var(--serif); font-size: 16px; line-height: 1.5; }

/* quote */
.learn-quote {
  margin: 0; padding: 18px 20px; border-left: 4px solid var(--accent, var(--gold));
  background: var(--panel); border-radius: 0 12px 12px 0;
  font-family: var(--serif); font-style: italic; font-size: clamp(19px, 5vw, 24px);
  line-height: 1.4; color: var(--ink);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001s !important; transition-duration: .05s !important; }
}
