/* Learn pages. The quiz skin mirrors the Rattu app (src/styles.css tokens, McqAnswer,
   SortGroupsAnswer, FeedbackCard, QuizPlayer) so the move to the app feels the same:
   cream surface, white rounded cards with the sticker/card/press shadows, Fraunces question
   text, ochre "Check" button, mint for right and blush for not-yet (never red). */
:root {
  --lq-bg: oklch(0.985 0.008 85);
  --lq-card: oklch(1 0 0);
  --lq-ink: oklch(0.19 0.02 60);
  --lq-muted: oklch(0.5 0.02 60);
  --lq-border: oklch(0.92 0.015 80);
  --lq-primary: oklch(0.68 0.16 55);
  --lq-strong: oklch(0.56 0.15 50);
  --lq-ink-primary: oklch(0.52 0.13 50);
  --lq-mint: oklch(0.94 0.055 155);
  --lq-mint-edge: oklch(0.78 0.1 155);
  --lq-blush: oklch(0.94 0.035 20);
  --lq-blush-edge: oklch(0.82 0.06 20);
  --lq-success-ink: oklch(0.42 0.1 155);
  --lq-tray: oklch(0.955 0.012 80);
  --lq-sticker: 0 1px 0 oklch(0 0 0 / 0.04), 0 8px 18px -8px oklch(0.4 0.05 60 / 0.18);
  --lq-cardsh: 0 1px 0 oklch(0 0 0 / 0.03), 0 12px 28px -14px oklch(0.4 0.05 60 / 0.22);
  --lq-press: inset 0 -3px 0 oklch(0 0 0 / 0.06), 0 8px 20px -10px oklch(0.4 0.05 60 / 0.18);
}

.learn-hero { padding: 0.4rem 0 0; }
.toc { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem 1.3rem; margin: 1.2rem 0 1.6rem; }
.toc strong { font-family: "Fraunces", serif; display: block; margin-bottom: 0.3rem; }
.toc ol { margin: 0; padding-left: 1.2rem; columns: 2; column-gap: 2rem; font-size: 0.97rem; }
.toc a { color: var(--primary-ink); text-decoration: none; }
@media (max-width: 560px) { .toc ol { columns: 1; } }
.notes h2 { scroll-margin-top: 1rem; }
.notes ul, .notes ol { margin: 0 0 1rem; padding-left: 1.3rem; }
.notes li { margin-bottom: 0.35rem; }

/* ---- practice player (app look) ---- */
.lq { background: var(--lq-bg); border: 1px solid var(--lq-border); border-radius: 28px; padding: 1.1rem 1rem 1.3rem; margin: 1.2rem 0; font-family: "Nunito", "Inter Tight", system-ui, sans-serif; color: var(--lq-ink); line-height: 1.45; }
.lq button, .lq select, .lq input[type=text], .lq textarea { font: inherit; color: inherit; }
.lq-count { margin: 0 0 0.45rem; text-align: right; font-size: 0.9rem; font-weight: 700; color: var(--lq-muted); font-variant-numeric: tabular-nums; }
.lq-prog { display: flex; gap: 6px; margin-bottom: 1.1rem; }
.lq-prog span { flex: 1; height: 6px; border-radius: 99px; background: var(--lq-border); transition: background 0.2s; }
.lq-prog span.cur { background: oklch(0.68 0.16 55 / 0.6); }
.lq-prog span.on { background: var(--lq-primary); }
.lq-card { display: flex; align-items: flex-start; gap: 0.8rem; background: var(--lq-card); border: 1px solid var(--lq-border); border-radius: 28px; box-shadow: var(--lq-cardsh); padding: 1.1rem 1.1rem 1.2rem; }
.lq-mascot { width: 72px; height: 72px; flex: none; object-fit: contain; }
.lq-cardtext { min-width: 0; flex: 1; }
.lq-kicker { margin: 0.2rem 0 0; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.14em; font-weight: 800; color: var(--lq-ink-primary); }
.lq-q { margin: 0.25rem 0 0; font-family: "Fraunces", serif; font-weight: 500; font-size: 1.45rem; line-height: 1.2; white-space: pre-line; overflow-wrap: anywhere; }
.lq-answer { margin-top: 1.1rem; }
.lq-hint { margin: 0 0 0.7rem; font-size: 0.92rem; color: var(--lq-muted); }

.lq .opt { display: flex; align-items: center; justify-content: space-between; gap: 0.7rem; width: 100%; min-height: 64px; text-align: left; background: var(--lq-card); border: 1px solid var(--lq-border); border-radius: 20px; padding: 0.75rem 1.2rem; margin: 0 0 0.75rem; cursor: pointer; box-shadow: var(--lq-sticker); font-family: "Fraunces", serif; font-size: 1.125rem; line-height: 1.25; transition: transform 0.12s; }
.lq .opt:active:not([disabled]) { transform: scale(0.99); }
.lq .opt:hover:not([disabled]) { border-color: var(--lq-primary); }
.lq .opt.ok { background: var(--lq-mint); border-color: var(--lq-mint-edge); }
.lq .opt.ok::after { content: "✓"; flex: none; width: 32px; height: 32px; border-radius: 50%; background: var(--lq-strong); color: #fff; display: grid; place-items: center; font-family: "Nunito", sans-serif; font-weight: 800; font-size: 0.95rem; }
.lq .opt.bad { background: var(--lq-blush); border-color: var(--lq-blush-edge); }
.lq label.opt input { accent-color: var(--lq-strong); width: 20px; height: 20px; flex: none; margin: 0 0.7rem 0 0; }
.lq label.opt { justify-content: flex-start; }
.lq label.opt.ok::after { margin-left: auto; }
.lq .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.lq .row2 .opt { justify-content: center; text-align: center; margin: 0; }
.lq .row2 .opt.ok::after { display: none; }
.lq input[type=text], .lq textarea { width: 100%; background: var(--lq-card); border: 1.5px solid var(--lq-border); border-radius: 20px; padding: 0.85rem 1.1rem; font-family: "Fraunces", serif; font-size: 1.1rem; box-shadow: var(--lq-sticker); }
.lq input[type=text]:focus, .lq textarea:focus { outline: 2px solid var(--lq-primary); outline-offset: 1px; }
.lq input.ok { background: var(--lq-mint); border-color: var(--lq-mint-edge); }
.lq input.bad { background: var(--lq-blush); border-color: var(--lq-blush-edge); }
.lq-actions { margin-top: 0.9rem; display: flex; gap: 0.7rem; flex-wrap: wrap; align-items: center; }
.lq-btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; min-height: 52px; padding: 0 1.4rem; border: 0; border-radius: 20px; background: var(--lq-strong); color: #fff; font-weight: 800; font-size: 1.05rem; cursor: pointer; box-shadow: var(--lq-press); text-decoration: none; transition: transform 0.12s; }
.lq-btn:active:not([disabled]) { transform: scale(0.98); }
.lq-btn.block { width: 100%; }
.lq-btn.ghost { background: var(--lq-card); color: var(--lq-ink); border: 1px solid var(--lq-border); box-shadow: var(--lq-sticker); }
.lq-btn[disabled] { opacity: 0.5; cursor: default; }
.lq-actions .lq-btn { flex: 1 1 140px; }

/* feedback card (FeedbackCard) */
.lq-fbcard { margin-top: 1rem; background: var(--lq-card); border: 1px solid var(--lq-border); border-radius: 28px; box-shadow: var(--lq-cardsh); padding: 1.15rem 1.25rem 1.25rem; animation: lq-pop 0.28s cubic-bezier(0.34, 1.56, 0.64, 1); }
@keyframes lq-pop { from { opacity: 0; transform: translateY(8px) scale(0.98); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .lq-fbcard { animation: none; } }
.lq-fbtitle { margin: 0; font-size: 0.95rem; font-weight: 800; color: var(--lq-ink-primary); }
.lq-fbtitle.good { color: var(--lq-success-ink); }
.lq-fbsmall { margin: 0.5rem 0 0; font-size: 0.8rem; color: var(--lq-muted); }
.lq-fbans { margin: 0.15rem 0 0; font-family: "Fraunces", serif; font-size: 1.25rem; line-height: 1.25; }
.lq-fbans li { list-style: none; font-size: 1.1rem; margin-top: 0.15rem; }
ul.lq-fbans { padding: 0; }
.lq-why { margin: 0.8rem 0 0; padding-left: 0.8rem; border-left: 2px solid var(--lq-border); font-size: 0.95rem; color: var(--lq-muted); }
.lq-model { margin-top: 0.9rem; }

/* tap or drag: tray, chips, slots, buckets (SortGroupsAnswer) */
.pool { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0 0 1rem; min-height: 54px; padding: 0.75rem; background: oklch(0.955 0.012 80 / 0.5); border: 1px dashed var(--lq-border); border-radius: 20px; }
.pool:empty { display: none; }
.chip { background: var(--lq-card); border: 1px solid var(--lq-border); border-radius: 18px; padding: 0.5rem 1rem; cursor: grab; min-height: 44px; display: inline-flex; align-items: center; touch-action: none; user-select: none; -webkit-user-select: none; font-size: 1rem; font-weight: 600; box-shadow: var(--lq-sticker); transition: transform 0.1s; }
.chip.picked { background: var(--lq-strong); border-color: var(--lq-primary); color: #fff; }
.chip.dragging { opacity: 0.35; }
.chip.ghost { position: fixed; z-index: 99; pointer-events: none; transform: translate(-50%, -50%); box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22); }
.chip.ok { background: var(--lq-mint); border-color: var(--lq-mint-edge); box-shadow: none; }
.chip.bad { background: var(--lq-blush); border-color: var(--lq-blush-edge); box-shadow: none; }
.chip .arrow { display: block; font-size: 0.8rem; font-weight: 800; margin-left: 0.4rem; }
.slots { display: grid; gap: 0.6rem; }
.slot-row { display: grid; grid-template-columns: minmax(84px, 38%) 1fr; gap: 0.6rem; align-items: stretch; }
.slot-label { background: var(--lq-card); border: 1px solid var(--lq-border); border-radius: 18px; padding: 0.6rem 0.9rem; display: flex; align-items: center; font-family: "Fraunces", serif; font-weight: 600; font-size: 1.02rem; box-shadow: var(--lq-sticker); }
.slot { min-height: 54px; border: 2px dashed var(--lq-border); border-radius: 18px; padding: 0.3rem; display: flex; align-items: center; flex-wrap: wrap; gap: 0.3rem; background: var(--lq-card); }
.slot.hot, .bucket.hot { border-color: var(--lq-primary); background: oklch(0.955 0.06 95); }
.slot.ok { border-style: solid; border-color: var(--lq-mint-edge); background: var(--lq-mint); }
.slot.bad { border-style: solid; border-color: var(--lq-blush-edge); background: var(--lq-blush); }
.buckets { display: grid; gap: 0.75rem; }
.bucket { border: 2px solid var(--lq-border); border-radius: 20px; padding: 0.8rem; min-height: 90px; background: var(--lq-card); cursor: pointer; }
.bucket.armed { border-color: oklch(0.68 0.16 55 / 0.6); box-shadow: var(--lq-sticker); }
.bucket h4 { margin: 0 0 0.5rem; font-family: "Fraunces", serif; font-size: 0.98rem; font-weight: 600; color: var(--lq-muted); }
.bucket .chip { margin: 0 0.4rem 0.4rem 0; min-height: 40px; border-radius: 14px; font-size: 0.95rem; background: oklch(0.68 0.16 55 / 0.06); border-color: oklch(0.68 0.16 55 / 0.25); box-shadow: none; }
.bucket .chip.ok { background: var(--lq-mint); border-color: var(--lq-mint-edge); }
.bucket .chip.bad { background: var(--lq-blush); border-color: var(--lq-blush-edge); }
.bucket .addhint { font-size: 0.8rem; font-style: italic; color: var(--lq-muted); }
.bucket:has(.chip) .addhint { display: none; }
.seq-list { counter-reset: s; display: grid; gap: 0.5rem; margin: 0 0 1rem; padding: 0; list-style: none; }
.seq-list li { counter-increment: s; background: var(--lq-card); border: 1px solid var(--lq-border); border-radius: 18px; padding: 0.7rem 1rem 0.7rem 3rem; position: relative; cursor: pointer; box-shadow: var(--lq-sticker); font-family: "Fraunces", serif; font-size: 1.05rem; }
.seq-list li::before { content: counter(s); position: absolute; left: 0.8rem; top: 50%; transform: translateY(-50%); width: 28px; height: 28px; border-radius: 50%; background: oklch(0.68 0.16 55 / 0.15); color: var(--lq-ink-primary); display: grid; place-items: center; font-family: "Nunito", sans-serif; font-weight: 800; font-size: 0.9rem; }
.seq-list li.ok { background: var(--lq-mint); border-color: var(--lq-mint-edge); }
.seq-list li.bad { background: var(--lq-blush); border-color: var(--lq-blush-edge); }
.sel2 { width: 100%; border: 1px solid var(--lq-border); border-radius: 14px; padding: 0.6rem 0.7rem; background: var(--lq-card); font-family: "Fraunces", serif; font-size: 1rem; }
.m3 { display: grid; grid-template-columns: 1fr; gap: 0.5rem; margin-bottom: 0.75rem; padding: 0.8rem; background: var(--lq-card); border: 1px solid var(--lq-border); border-radius: 20px; box-shadow: var(--lq-sticker); }
.m3 b { font-family: "Fraunces", serif; font-weight: 600; font-size: 1.05rem; }
.m3.ok { background: var(--lq-mint); border-color: var(--lq-mint-edge); }
.m3.bad { background: var(--lq-blush); border-color: var(--lq-blush-edge); }

/* result */
.lq-result { text-align: center; background: var(--lq-card); border: 1px solid var(--lq-border); border-radius: 28px; box-shadow: var(--lq-cardsh); padding: 1.4rem 1.2rem 1.5rem; }
.lq-result img { width: 112px; height: 112px; object-fit: contain; }
.lq-result .big { font-family: "Fraunces", serif; font-size: 2.6rem; font-weight: 600; line-height: 1.1; margin: 0.3rem 0; }
.lq-result .big small { font-size: 1rem; font-family: "Nunito", sans-serif; color: var(--lq-muted); font-weight: 700; }
.lq-missed { margin: 0.9rem 0 0; padding: 0; list-style: none; text-align: left; display: grid; gap: 0.4rem; }
.lq-missed li { background: var(--lq-blush); border-radius: 14px; padding: 0.5rem 0.8rem; font-size: 0.93rem; }
.lq-missed-title { margin: 1rem 0 0; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.14em; font-weight: 800; color: var(--lq-ink-primary); text-align: left; }
.small { font-size: 0.9rem; color: var(--lq-muted); }

/* unlock / locked */
.locked { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 0.5rem; margin: 1rem 0; }
.locked span { display: block; padding: 0.55rem 0.8rem; border: 1px dashed var(--border); border-radius: 12px; background: repeating-linear-gradient(135deg, oklch(0.97 0.01 85), oklch(0.97 0.01 85) 8px, oklch(0.95 0.012 85) 8px, oklch(0.95 0.012 85) 16px); color: var(--muted); font-size: 0.88rem; }
.locked b { color: var(--ink); }
.unlock { background: var(--card); border: 1px solid var(--primary); border-radius: var(--radius); padding: 1.3rem 1.4rem; margin: 1.6rem 0; text-align: center; }
.unlock h2 { margin-top: 0; }

/* diagrams */
.diag { margin: 1.4rem 0 2rem; }
.diag figure { margin: 0 0 0.8rem; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 0.6rem; text-align: center; position: sticky; top: 0; z-index: 2; }
.diag img { max-width: 100%; height: auto; max-height: 40vh; }
@media (min-width: 900px) { .diag figure { position: static; } .diag img { max-height: 560px; } }
.diag figcaption { font-size: 0.85rem; color: var(--muted); margin-top: 0.4rem; }
.diag .d-play { font-family: "Nunito", "Inter Tight", system-ui, sans-serif; }
.diag .legend { font-size: 0.93rem; }
.diag .legend summary { cursor: pointer; font-weight: 600; margin-bottom: 0.3rem; }
.diag .legend table { border-collapse: collapse; }
.diag .legend td { border: 1px solid var(--border); padding: 0.25rem 0.7rem; }
.qa details { background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 0.7rem 1rem; margin: 0 0 0.6rem; }
.qa summary { cursor: pointer; font-weight: 600; }
.qa .ans { margin: 0.5rem 0 0; }
.qa ul { margin: 0.4rem 0; }
.learn-cards { list-style: none; padding: 0; display: grid; gap: 1rem; }
.learn-cards a { display: block; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem 1.2rem; text-decoration: none; color: var(--ink); }
.learn-cards h2 { margin: 0.2rem 0; font-size: 1.2rem; }
.learn-cards p { margin: 0; color: var(--muted); font-size: 0.95rem; }
.noscript-note { background: var(--butter); padding: 0.6rem 0.9rem; border-radius: 12px; }
.lq-actions.col { flex-direction: column; align-items: stretch; }
.lq-actions.col .lq-btn { flex: none; width: 100%; }

/* ---- quiz first: jump links, the quiz stage and its effect ---- */
.jump { display: flex; gap: 0.5rem; flex-wrap: wrap; margin: 0.2rem 0 1.4rem; }
.jump a { background: var(--card); border: 1px solid var(--border); border-radius: 999px; padding: 0.35rem 0.95rem; font-size: 0.92rem; font-weight: 600; text-decoration: none; color: var(--primary-ink); }
.jump a:hover { border-color: var(--primary); }
.stage > h2 { margin-top: 0.4rem; }
.stage > .small { margin: -0.3rem 0 1.1rem; }

/* the quiz box: a slowly turning ochre-to-butter border, a warm glow and a "free" tab */
@property --lq-a { syntax: "<angle>"; initial-value: 0deg; inherits: false; }
.lq { position: relative; border: 2.5px solid transparent; background: linear-gradient(var(--lq-bg), var(--lq-bg)) padding-box, conic-gradient(from var(--lq-a), oklch(0.68 0.16 55), oklch(0.93 0.09 95), oklch(0.78 0.12 25), oklch(0.82 0.1 155), oklch(0.68 0.16 55)) border-box; box-shadow: 0 22px 54px -26px oklch(0.68 0.16 55 / 0.7), 0 2px 0 oklch(1 0 0 / 0.6) inset; animation: lq-turn 9s linear infinite; padding-top: 1.6rem; min-height: 520px; }
@keyframes lq-turn { to { --lq-a: 360deg; } }
.lq::before { content: attr(data-ribbon); position: absolute; top: -0.95rem; left: 1.3rem; background: var(--lq-strong); color: #fff; font-size: 0.72rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; padding: 0.3rem 0.8rem; border-radius: 99px; box-shadow: var(--lq-press); transform: rotate(-2deg); }
@media (prefers-reduced-motion: reduce) { .lq { animation: none; } }
.lq-card { animation: lq-rise 0.35s cubic-bezier(0.34, 1.56, 0.64, 1); }
@keyframes lq-rise { from { opacity: 0; transform: translateY(10px) scale(0.985); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .lq-card { animation: none; } }

/* result: a proper "round complete" moment */
.lq-done { position: relative; overflow: hidden; background: linear-gradient(180deg, oklch(0.97 0.05 95), var(--lq-card) 55%); }
.lq-halo { width: 150px; height: 150px; margin: 0 auto; display: grid; place-items: center; border-radius: 50%; background: radial-gradient(circle, oklch(0.93 0.1 95 / 0.9), oklch(0.93 0.1 95 / 0) 68%); animation: lq-bob 2.4s ease-in-out infinite; }
@keyframes lq-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
@media (prefers-reduced-motion: reduce) { .lq-halo { animation: none; } }
.lq-stars { display: flex; justify-content: center; gap: 0.35rem; margin: 0.2rem 0 0.5rem; }
.lq-stars .star { font-size: 2.1rem; line-height: 1; color: oklch(0.88 0.03 80); transform: scale(0.4); opacity: 0; animation: lq-star 0.5s cubic-bezier(0.34, 1.7, 0.64, 1) forwards; }
.lq-stars .star.on { color: oklch(0.78 0.16 80); text-shadow: 0 2px 0 oklch(0.6 0.14 70 / 0.5), 0 0 18px oklch(0.85 0.16 85 / 0.8); }
@keyframes lq-star { to { transform: scale(1); opacity: 1; } }
.lq-result .big .n { display: inline-block; min-width: 1ch; }
.lq-line { margin: 0.3rem 0 0; font-weight: 700; }
.lq-tried { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.4rem; margin-top: 0.5rem; }
.lq-tried span { background: oklch(0.68 0.16 55 / 0.1); color: var(--lq-ink-primary); border-radius: 99px; padding: 0.25rem 0.8rem; font-size: 0.85rem; font-weight: 700; }
.lq-done .lq-missed-title { text-align: center; }
.lq-confetti { position: absolute; left: 50%; top: 34%; width: 0; height: 0; pointer-events: none; }
.lq-confetti i { position: absolute; width: 8px; height: 13px; border-radius: 2px; opacity: 0; animation: lq-fall 1.7s cubic-bezier(0.2, 0.8, 0.3, 1) forwards; }
@keyframes lq-fall { 0% { opacity: 1; transform: translate(0, 0) rotate(0); } 100% { opacity: 0; transform: translate(var(--dx), calc(var(--dy) + 190px)) rotate(var(--r)); } }

/* glass wall: blurred look-alike cards behind a frosted unlock panel */
.lq-wall { position: relative; margin-top: 1rem; border-radius: 28px; overflow: hidden; border: 1px solid var(--lq-border); background: var(--lq-bg); min-height: 380px; }
.lq-ghosts { display: grid; gap: 0.6rem; padding: 1rem; filter: blur(3px); transform: scale(1.04); }
.lq-ghost { background: var(--lq-card); border: 1px solid var(--lq-border); border-radius: 20px; padding: 0.8rem 1rem; box-shadow: var(--lq-sticker); display: grid; gap: 0.35rem; }
.lq-ghost .k { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.14em; font-weight: 800; color: var(--lq-ink-primary); }
.lq-ghost .c { font-family: "Fraunces", serif; font-size: 1rem; }
.lq-ghost i { display: block; height: 9px; width: 90%; border-radius: 99px; background: var(--lq-border); }
.lq-ghost i.s { width: 55%; }
.lq-glass { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 1.4rem 1.3rem; background: linear-gradient(180deg, oklch(1 0 0 / 0.08), oklch(1 0 0 / 0.78) 62%); -webkit-backdrop-filter: blur(10px) saturate(1.25); backdrop-filter: blur(10px) saturate(1.25); }
.lq-glass::after { content: ""; position: absolute; inset: 0; background: linear-gradient(105deg, transparent 35%, oklch(1 0 0 / 0.5) 50%, transparent 65%); transform: translateX(-120%); animation: lq-shine 4.5s ease-in-out infinite; pointer-events: none; }
@keyframes lq-shine { 0%, 55% { transform: translateX(-120%); } 100% { transform: translateX(120%); } }
@media (prefers-reduced-motion: reduce) { .lq-glass::after { animation: none; display: none; } }
.lq-glass > * { position: relative; z-index: 1; max-width: 360px; }
.lq-glass .lock { width: 56px; height: 56px; border-radius: 50%; background: var(--lq-strong); display: grid; place-items: center; box-shadow: var(--lq-press), 0 10px 28px -8px oklch(0.56 0.15 50 / 0.7); margin-bottom: 0.7rem; }
.lq-unl { margin: 0.3rem 0 0; font-family: "Fraunces", serif; font-size: 1.6rem; line-height: 1.15; font-weight: 600; }
.lq-unlsub { margin: 0.5rem 0 1rem; color: var(--lq-muted); font-size: 0.98rem; }
.lq-cta { text-align: center; margin-top: 1rem; }
.lq-glass .lq-btn { width: 100%; }

/* diagram tabs */
.dtabs { display: flex; gap: 0.45rem; flex-wrap: wrap; margin: 0.4rem 0 1rem; }
.dtab { font: inherit; font-weight: 700; font-size: 0.95rem; background: var(--card); border: 1.5px solid var(--border); border-radius: 999px; padding: 0.5rem 1.05rem; cursor: pointer; color: var(--ink); min-height: 44px; }
.dtab[aria-selected="true"] { background: var(--primary); border-color: var(--primary); color: #fff; }
.diag[hidden] { display: none; }

/* a tighter intro so the quiz is on the first screen */
.learn h1 { font-size: clamp(1.55rem, 6vw, 2.2rem); margin: 0.3rem 0 0.5rem; }
.learn .byline { margin-bottom: 0.7rem; font-size: 0.85rem; }
.learn .lede { font-size: 1.05rem; line-height: 1.5; margin: 0 0 0.9rem; padding-left: 0.8rem; }
.learn .quick { margin: 0 0 1rem; padding: 0.7rem 0.9rem; border-left: 4px solid var(--primary, oklch(0.68 0.16 55)); background: color-mix(in oklab, var(--primary, oklch(0.68 0.16 55)) 8%, transparent); border-radius: 0 0.6rem 0.6rem 0; }
.learn .quick p { margin: 0; font-size: 0.98rem; line-height: 1.5; }
.learn .quick .quick-q { font-weight: 700; margin-bottom: 0.25rem; }
.learn .jump { margin-bottom: 0.9rem; }
.learn .jump a { padding: 0.25rem 0.8rem; font-size: 0.85rem; }
.learn .stage > h2 { font-size: 1.25rem; margin: 0.5rem 0 0.2rem; }
.learn .stage > .small { margin: 0 0 1.3rem; }

/* locked dots: the rest of the chapter, waiting in the app */
.lq-prog span.lock { background: repeating-linear-gradient(135deg, oklch(0.93 0.015 80), oklch(0.93 0.015 80) 3px, oklch(0.88 0.02 80) 3px, oklch(0.88 0.02 80) 6px); }
.lq-prog { gap: 4px; }
a.dtab { text-decoration: none; display: inline-flex; align-items: center; }
a.dtab:hover { border-color: var(--primary); }
.lq { min-height: 460px; }
.lq-prog span { height: 7px; }

/* report a mistake: quiet link under the card */
.lq-report { display: inline-flex; align-items: center; gap: 0.35rem; margin-top: 1rem; font-size: 0.85rem; font-weight: 700; color: var(--lq-muted); text-decoration: none; }
.lq-report:hover, .lq-report:focus-visible { color: var(--primary-strong, var(--primary)); text-decoration: underline; }

/* finish screen: score and the unlock card fit one screen, the review list sits below */
.lq-done { padding: 1rem 1.1rem 1.1rem; }
.lq-done .lq-halo { width: 84px; height: 84px; }
.lq-done .lq-halo img { width: 76px; height: 76px; }
.lq-done .lq-stars .star { font-size: 1.7rem; }
.lq-done .big { font-size: 2.1rem; margin: 0.1rem 0; }
.lq-wall { min-height: 0; margin-top: 0.7rem; background: linear-gradient(180deg, var(--lq-card), oklch(0.97 0.02 70)); }
.lq-glass { position: static; inset: auto; padding: 1.1rem 1.2rem 1.2rem; background: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
.lq-glass .lock { width: 44px; height: 44px; margin-bottom: 0.4rem; }
.lq-glass .lock svg { width: 22px; height: 22px; }
.lq-unl { font-size: 1.35rem; }
.lq-unlsub { margin: 0.35rem 0 0.8rem; font-size: 0.93rem; }
.lq-review { margin-top: 1rem; background: var(--lq-card); border: 1px solid var(--lq-border); border-radius: 28px; padding: 0.2rem 1.1rem 1.1rem; text-align: center; }

/* chapter navigation, more chapters, mistakes, case study passage */
.chnav { display: grid; grid-template-columns: 1fr 1fr; gap: 0.8rem; margin: 2rem 0 1rem; }
.chnav a { display: block; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 0.8rem 1rem; text-decoration: none; color: var(--ink); font-weight: 600; }
.chnav a small { display: block; color: var(--muted); font-weight: 500; font-size: 0.8rem; margin-bottom: 0.15rem; }
.chnav .next { text-align: right; }
.more-chapters ul { list-style: none; padding: 0; columns: 2; column-gap: 1.5rem; }
.more-chapters li { margin-bottom: 0.4rem; break-inside: avoid; }
.more-chapters h3 { margin: 1rem 0 0.4rem; font-size: 1rem; }
.mistakes { list-style: none; padding: 0; }
.mistakes li { background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 0.7rem 1rem; margin: 0 0 0.6rem; }
.mistakes .x, .mistakes .ok { font-weight: 700; font-size: 0.85rem; }
.mistakes .x { color: #b3402a; }
.mistakes .ok { color: #2f7a4b; }
.passage { margin: 0 0 1rem; padding: 0.8rem 1rem; border-left: 4px solid var(--border); background: var(--card); border-radius: 0 14px 14px 0; }
.hub .learn-cards h3 { margin: 0.2rem 0; font-size: 1.1rem; }
@media (max-width: 560px) { .chnav { grid-template-columns: 1fr; } .chnav .next { text-align: left; } .more-chapters ul { columns: 1; } }
