/* Understanding the Four Types of Life Insurance: standalone course styles */

@font-face { font-family: "Young Serif"; src: url("fonts/young-serif-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Public Sans"; src: url("fonts/public-sans-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Public Sans"; src: url("fonts/public-sans-latin-400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Public Sans"; src: url("fonts/public-sans-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  /* palette drawn from the course illustrations */
  --ink: #1d2a3a;          /* navy outline ink */
  --ink-soft: #3b4a5c;
  --slate: #3f6e78;        /* harbor slate */
  --slate-tint: #dfe9ea;
  --gold: #e0a436;         /* policy gold */
  --gold-deep: #9a6a12;    /* gold for text on paper (AA) */
  --gold-tint: #f8ead0;
  --paper: #fbf7ef;        /* illustration paper */
  --fog: #e3e8ea;          /* desk backdrop */
  --line: #d9d2c3;
  --right: #2e7356;
  --right-tint: #e1efe7;
  --wrong: #a8452f;
  --wrong-tint: #f6e3dd;

  --serif: "Young Serif", Georgia, serif;
  --sans: "Public Sans", system-ui, sans-serif;

  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.25rem;
  --step-2: 1.5rem;
  --step-3: 2rem;
  --step-4: 2.75rem;
  --step-5: 3.75rem;

  --measure: 42rem;
  --side: 19rem;
  --radius-s: 6px;
  --radius-m: 12px;
  --shadow: 0 1px 0 rgba(29, 42, 58, .08), 0 8px 24px -12px rgba(29, 42, 58, .25);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
[tabindex="-1"]:focus { outline: none; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--fog);
  color: var(--ink);
  font-family: var(--sans);
  font-size: var(--step-0);
  line-height: 1.6;
}
img { max-width: 100%; display: block; }
button { font: inherit; color: inherit; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.15; margin: 0; letter-spacing: -0.005em; }
p { margin: 0 0 .9em; }
p:last-child { margin-bottom: 0; }
strong { font-weight: 700; }
a { color: var(--slate); }

:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 4px; }

.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: var(--paper); padding: .5rem 1rem; z-index: 50; }
.skip:focus { left: 1rem; top: 1rem; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  border: 0; border-radius: 999px; cursor: pointer;
  padding: .7rem 1.4rem; font-weight: 700; font-size: var(--step-0);
  background: var(--ink); color: var(--paper);
  text-decoration: none;
  transition: background .15s ease, transform .15s ease;
}
.btn:hover { background: var(--slate); }
.btn:active { transform: translateY(1px); }
.btn[disabled] { background: #b8bec4; color: #fff; cursor: not-allowed; }
.btn.gold { background: var(--gold); color: var(--ink); }
.btn.gold:hover { background: #ebb757; }
.btn.ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 2px var(--ink); }
.btn.ghost:hover { background: var(--ink); color: var(--paper); }
.btn.small { padding: .45rem 1rem; font-size: var(--step--1); }

/* ---------- cover ---------- */
.cover { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); }
.cover-text {
  background: var(--ink); color: var(--paper);
  padding: clamp(2rem, 6vw, 5rem);
  display: flex; flex-direction: column; justify-content: center; gap: 1.75rem;
}
.cover-text h1 { font-size: clamp(2.5rem, 5.2vw, 4.4rem); line-height: 1.05; max-width: 12ch; }
.cover-text .lede { font-size: var(--step-1); line-height: 1.5; color: #d6dde4; max-width: 34rem; }
.cover-meta { display: flex; flex-wrap: wrap; gap: 1rem 2rem; color: #aeb9c5; font-size: var(--step--1); }
.cover-meta b { color: var(--paper); font-weight: 700; }
.cover-art { background: var(--paper); display: flex; flex-direction: column; justify-content: center; padding: clamp(1.5rem, 4vw, 3.5rem); gap: 2rem; }
.cover-art img { width: 100%; border-radius: var(--radius-m); }
.types { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: .75rem; }
.types li { border-top: 4px solid var(--c); padding-top: .6rem; }
.types b { font-family: var(--serif); font-weight: 400; font-size: var(--step-1); display: block; line-height: 1.2; }
.types span { font-size: var(--step--1); color: var(--ink-soft); line-height: 1.4; display: block; margin-top: .25rem; }

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: var(--side) minmax(0, 1fr); min-height: 100vh; }
.side {
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  background: var(--ink); color: #d6dde4;
  padding: 1.5rem 1.25rem 2rem;
  display: flex; flex-direction: column; gap: 1.25rem;
}
.side-title { font-family: var(--serif); color: var(--paper); font-size: var(--step-1); line-height: 1.25; text-decoration: none; }
.side-title:hover { color: var(--gold); }
.meter { display: grid; gap: .4rem; font-size: var(--step--1); }
.meter-bar { height: 6px; background: rgba(255, 255, 255, .14); border-radius: 3px; overflow: hidden; }
.meter-bar i { display: block; height: 100%; background: var(--gold); width: 0; transition: width .4s ease; }
.toc { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; counter-reset: les; }
.toc a {
  display: grid; grid-template-columns: 1.75rem 1fr; gap: .5rem; align-items: start;
  padding: .55rem .6rem; border-radius: var(--radius-s);
  color: #d6dde4; text-decoration: none; font-size: .95rem; line-height: 1.35;
}
.toc a:hover { background: rgba(255, 255, 255, .07); color: var(--paper); }
.toc a[aria-current="page"] { background: rgba(224, 164, 54, .16); color: var(--paper); box-shadow: inset 3px 0 0 var(--gold); }
.toc .mark {
  width: 1.5rem; height: 1.5rem; border-radius: 50%;
  display: grid; place-items: center; font-size: .75rem; font-weight: 700;
  box-shadow: inset 0 0 0 1.5px rgba(214, 221, 228, .45);
}
.toc .done .mark { background: var(--gold); color: var(--ink); box-shadow: none; }
.side-foot { margin-top: auto; font-size: var(--step--1); color: #93a1b0; }
.side-foot button { background: none; border: 0; color: #c3ccd6; text-decoration: underline; cursor: pointer; padding: 0; font-size: inherit; }

.topbar { display: none; }

.main { padding: clamp(1rem, 4vw, 3rem) clamp(1rem, 4vw, 3rem) 4rem; }
.sheet {
  max-width: 54rem; margin: 0 auto;
  background: var(--paper); border-radius: var(--radius-m); box-shadow: var(--shadow);
  padding: clamp(1.5rem, 5vw, 4rem) clamp(1.25rem, 6vw, 5rem);
}
.lesson-head { margin-bottom: 2.5rem; padding-bottom: 1.75rem; border-bottom: 2px solid var(--ink); }
.lesson-head .count { font-size: var(--step--1); color: var(--ink-soft); margin-bottom: .75rem; }
.lesson-head h1 { font-size: clamp(2.1rem, 4.5vw, var(--step-5)); line-height: 1.05; max-width: 18ch; }

.blocks > * + * { margin-top: 2.25rem; }
.blocks > .h + * { margin-top: 1rem; }
.prose { max-width: var(--measure); }
.prose ul, .prose ol { padding-left: 1.25rem; margin: 0 0 .9em; }
.prose li + li { margin-top: .35rem; }
.h { font-size: var(--step-3); max-width: 24ch; }
.h.sub { font-size: var(--step-2); }

/* lists */
.list { list-style: none; padding: 0; margin: 0; max-width: var(--measure); display: grid; gap: .8rem; }
.list li { display: grid; grid-template-columns: 2rem 1fr; gap: .75rem; align-items: start; }
.list li::before { content: ""; width: .6rem; height: .6rem; border-radius: 50%; background: var(--gold); margin: .55rem 0 0 .6rem; }
.list.ol { counter-reset: n; }
.list.ol li { counter-increment: n; }
.list.ol li::before {
  content: counter(n); width: 2rem; height: 2rem; margin: 0; border-radius: 50%;
  background: var(--ink); color: var(--paper); display: grid; place-items: center;
  font-family: var(--serif); font-size: .95rem;
}
.list.ol li > div { padding-top: .2rem; }

/* fact list (best-suited-for paragraphs split at semicolons) */
.facts { list-style: none; margin: 0; padding: 0; max-width: var(--measure); border-top: 1px solid var(--line); }
.facts li { padding: .7rem 0 .7rem 1.75rem; border-bottom: 1px solid var(--line); position: relative; }
.facts li::before { content: ""; position: absolute; left: .25rem; top: 1.25rem; width: .7rem; height: 2px; background: var(--slate); }
.facts-lead { font-weight: 700; margin-bottom: .5rem; }

/* image + text */
.aside { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: clamp(1.25rem, 4vw, 2.75rem); align-items: center; }
.aside img { border-radius: var(--radius-m); width: 100%; }
.aside .lead-q { font-family: var(--serif); font-size: var(--step-2); line-height: 1.2; margin-bottom: .75rem; }
.persona { background: var(--slate-tint); border-radius: var(--radius-m); padding: clamp(1rem, 3vw, 1.75rem); grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); }
.persona .lead-q { font-size: var(--step-1); }
.hero-img img { width: 100%; border-radius: var(--radius-m); }
.hero-img .prose { margin-top: 1.5rem; }
.hero-img.square { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 2rem; align-items: center; }
.hero-img.square .prose { margin-top: 0; }

/* accordion */
.acc { border-top: 2px solid var(--ink); max-width: var(--measure); }
.acc-item { border-bottom: 1px solid var(--line); }
.acc-item h3 { font-family: var(--sans); font-size: var(--step-0); font-weight: 700; }
.acc-btn {
  width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  background: none; border: 0; padding: 1rem .25rem; cursor: pointer; text-align: left; font-weight: 700;
}
.acc-btn:hover { color: var(--slate); }
.acc-icon { flex: none; width: 1.75rem; height: 1.75rem; border-radius: 50%; position: relative; box-shadow: inset 0 0 0 2px currentColor; }
.acc-icon::before, .acc-icon::after { content: ""; position: absolute; left: 50%; top: 50%; width: .7rem; height: 2px; background: currentColor; transform: translate(-50%, -50%); transition: transform .2s ease; }
.acc-icon::after { transform: translate(-50%, -50%) rotate(90deg); }
.acc-btn[aria-expanded="true"] .acc-icon { background: var(--ink); color: var(--paper); box-shadow: none; }
.acc-btn[aria-expanded="true"] .acc-icon::after { transform: translate(-50%, -50%) rotate(0); }
.acc-panel { padding: 0 .25rem 1.1rem 0; color: var(--ink-soft); }

/* flashcards */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr)); gap: 1rem; }
.card { display: block; width: 100%; perspective: 1200px; height: 12rem; border: 0; padding: 0; background: none; cursor: pointer; text-align: center; }
.card-inner { display: block; position: relative; width: 100%; height: 100%; transition: transform .5s cubic-bezier(.3, .7, .3, 1); transform-style: preserve-3d; }
.card.flipped .card-inner { transform: rotateY(180deg); }
.card-face {
  position: absolute; inset: 0; border-radius: var(--radius-m); backface-visibility: hidden;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .5rem;
  padding: 1.25rem; line-height: 1.4;
}
.card-front { background: #fff; box-shadow: inset 0 0 0 1.5px var(--line), 0 2px 0 var(--line); }
.card-front .hint { font-size: .8rem; color: var(--ink-soft); }
.card-back { background: var(--ink); color: var(--paper); transform: rotateY(180deg); font-family: var(--serif); font-size: var(--step-2); }
.card:hover .card-front { box-shadow: inset 0 0 0 1.5px var(--slate), 0 2px 0 var(--slate); }
.cards.long .card { height: 14rem; }
.cards.long .card-front { font-size: .95rem; }

/* tabs */
.tabs-wrap { display: grid; gap: 1rem; }
.tablist { display: flex; flex-wrap: wrap; gap: .5rem; }
.tab { border: 0; border-radius: 999px; padding: .55rem 1.1rem; cursor: pointer; background: #fff; box-shadow: inset 0 0 0 1.5px var(--line); font-weight: 700; }
.tab[aria-selected="true"] { background: var(--ink); color: var(--paper); box-shadow: none; }
.tab-panel { background: #fff; border-radius: var(--radius-m); box-shadow: inset 0 0 0 1.5px var(--line); padding: 1.25rem 1.5rem; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: .1rem 1.5rem; margin: 0; }
.kv dt { font-weight: 700; padding: .55rem 0; border-bottom: 1px solid var(--line); }
.kv dd { margin: 0; padding: .55rem 0; border-bottom: 1px solid var(--line); }
.kv dt:last-of-type, .kv dd:last-of-type { border-bottom: 0; }
.view-toggle { justify-self: start; background: none; border: 0; color: var(--slate); text-decoration: underline; cursor: pointer; padding: 0; font-weight: 700; }
.table-scroll { overflow-x: auto; border-radius: var(--radius-m); box-shadow: inset 0 0 0 1.5px var(--line); background: #fff; }
.compare { border-collapse: collapse; width: 100%; min-width: 40rem; font-size: .95rem; }
.compare th, .compare td { text-align: left; padding: .7rem .9rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.compare thead th { font-family: var(--serif); font-weight: 400; font-size: var(--step-1); background: var(--ink); color: var(--paper); }
.compare tbody th { font-weight: 700; width: 11rem; }
.compare tbody tr:last-child > * { border-bottom: 0; }

/* shared activity frame */
.activity { background: #fff; border-radius: var(--radius-m); box-shadow: inset 0 0 0 1.5px var(--line); padding: clamp(1.1rem, 3vw, 1.75rem); }
.activity-q { font-weight: 700; font-size: var(--step-1); line-height: 1.4; margin-bottom: 1.1rem; }
.activity-q p { margin: 0; }
.actions { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; margin-top: 1.25rem; }
.note { border-radius: var(--radius-s); padding: .9rem 1.1rem; margin-top: 1.1rem; }
.note b { display: block; margin-bottom: .2rem; }
.note.ok { background: var(--right-tint); box-shadow: inset 4px 0 0 var(--right); }
.note.bad { background: var(--wrong-tint); box-shadow: inset 4px 0 0 var(--wrong); }
.note.info { background: var(--slate-tint); box-shadow: inset 4px 0 0 var(--slate); }

/* multiple choice */
.choices { display: grid; gap: .6rem; margin: 0; padding: 0; border: 0; }
.choice {
  display: grid; grid-template-columns: 1.4rem 1fr auto; gap: .8rem; align-items: center;
  padding: .8rem 1rem; border-radius: var(--radius-s); cursor: pointer;
  box-shadow: inset 0 0 0 1.5px var(--line); background: var(--paper);
}
.choice:hover { box-shadow: inset 0 0 0 1.5px var(--slate); }
.choice input { appearance: none; margin: 0; width: 1.25rem; height: 1.25rem; border-radius: 50%; box-shadow: inset 0 0 0 2px var(--ink-soft); background: #fff; display: grid; place-items: center; cursor: pointer; }
.choice input:checked { box-shadow: inset 0 0 0 6px var(--ink); }
.choice:has(input:checked) { box-shadow: inset 0 0 0 2px var(--ink); background: #fff; }
.choice.is-right { box-shadow: inset 0 0 0 2px var(--right); background: var(--right-tint); }
.choice.is-wrong { box-shadow: inset 0 0 0 2px var(--wrong); background: var(--wrong-tint); }
.choice .tag { font-size: .8rem; font-weight: 700; }
.choice.is-right .tag { color: var(--right); }
.choice.is-wrong .tag { color: var(--wrong); }
.locked .choice { cursor: default; }

/* sorting */
.sort-stage { display: grid; gap: 1.25rem; }
.sort-card {
  justify-self: center; width: min(100%, 30rem); min-height: 7rem;
  background: var(--paper); border-radius: var(--radius-m); padding: 1.25rem 1.5rem;
  box-shadow: inset 0 0 0 2px var(--ink), 6px 6px 0 var(--gold);
  display: grid; place-items: center; text-align: center; font-weight: 700; font-size: var(--step-1); line-height: 1.4;
}
.sort-card.shake { animation: shake .4s; }
@keyframes shake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }
.sort-left { text-align: center; font-size: var(--step--1); color: var(--ink-soft); }
.piles { display: grid; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); gap: .75rem; }
.pile {
  border: 0; border-radius: var(--radius-m); padding: .9rem; cursor: pointer; text-align: left;
  background: var(--slate-tint); display: grid; gap: .5rem; align-content: start; min-height: 6rem;
}
.pile:hover:not([disabled]) { background: #cfdedf; }
.pile[disabled] { cursor: default; }
.pile-name { font-family: var(--serif); font-size: var(--step-1); display: flex; justify-content: space-between; align-items: baseline; }
.pile-name small { font-family: var(--sans); font-size: .8rem; color: var(--ink-soft); }
.pile ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .35rem; font-size: .85rem; line-height: 1.35; }
.pile li { background: #fff; border-radius: 4px; padding: .35rem .5rem; }

/* matching */
.match-rows { display: grid; gap: .9rem; }
.match-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: .75rem 1.25rem; align-items: center; padding-bottom: .9rem; border-bottom: 1px solid var(--line); }
.match-row:last-child { border-bottom: 0; padding-bottom: 0; }
.match-row .stmt { font-weight: 700; }
.chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.chip { border: 0; border-radius: 999px; padding: .4rem .8rem; cursor: pointer; font-size: .9rem; background: var(--paper); box-shadow: inset 0 0 0 1.5px var(--line); }
.chip:hover:not([disabled]) { box-shadow: inset 0 0 0 1.5px var(--slate); }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--paper); box-shadow: none; }
.chip.taken { opacity: .45; }
.chip[disabled] { cursor: default; }
.match-row.is-right .chip[aria-pressed="true"] { background: var(--right); }
.match-row.is-wrong .chip[aria-pressed="true"] { background: var(--wrong); }
.match-row .fix { grid-column: 2; font-size: .85rem; color: var(--wrong); font-weight: 700; }

/* labeled graphic */
.lg { position: relative; border-radius: var(--radius-m); overflow: hidden; }
.lg img { width: 100%; }
.marker {
  position: absolute; transform: translate(-50%, -50%);
  min-width: 2.6rem; height: 2.6rem; padding: 0 .6rem; border-radius: 999px; border: 0; cursor: pointer;
  background: var(--gold); color: var(--ink); font-weight: 700; font-size: .85rem; white-space: nowrap;
  box-shadow: 0 0 0 4px rgba(251, 247, 239, .9), 0 6px 14px -4px rgba(29, 42, 58, .5);
}
.marker[aria-expanded="true"] { background: var(--ink); color: var(--paper); }
.marker.seen:not([aria-expanded="true"]) { background: var(--paper); box-shadow: 0 0 0 3px var(--gold), 0 6px 14px -4px rgba(29, 42, 58, .5); }
.lg-pop { margin-top: 1rem; }
.lg-pop h3 { font-size: var(--step-2); margin-bottom: .5rem; }
.lg-hint { font-size: var(--step--1); color: var(--ink-soft); margin-top: .75rem; }

/* process */
.process { background: var(--ink); color: var(--paper); border-radius: var(--radius-m); overflow: hidden; }
.proc-slide { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); min-height: 22rem; }
.proc-slide.intro { grid-template-columns: 1fr; place-items: center; text-align: center; padding: clamp(1.5rem, 5vw, 3rem); }
.proc-slide.intro .proc-text { max-width: 32rem; padding: 0; }
.proc-img { background: var(--paper); }
.proc-img img { width: 100%; height: 100%; object-fit: cover; }
.proc-text { padding: clamp(1.25rem, 4vw, 2.5rem); display: flex; flex-direction: column; justify-content: center; gap: .8rem; color: #d6dde4; }
.proc-text h3 { font-size: var(--step-3); color: var(--paper); }
.proc-step { color: var(--gold); font-weight: 700; font-size: var(--step--1); }
.proc-nav { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .9rem 1.25rem; background: #16212e; }
.dots { display: flex; gap: .4rem; }
.dots i { width: .55rem; height: .55rem; border-radius: 50%; background: rgba(255, 255, 255, .25); }
.dots i.on { background: var(--gold); }
.proc-nav .btn.ghost { color: var(--paper); box-shadow: inset 0 0 0 2px var(--paper); }
.proc-nav .btn.ghost:hover { background: var(--paper); color: var(--ink); }
.proc-nav .btn.ghost[disabled] { opacity: .35; background: none; color: var(--paper); }

/* scenario */
.scenario { border-radius: var(--radius-m); overflow: hidden; background: var(--ink); color: var(--paper); }
.scene-art { position: relative; aspect-ratio: 16 / 8; background: var(--paper); }
.scene-art img { width: 100%; height: 100%; object-fit: cover; }
.scene-art .progress { position: absolute; left: 1rem; top: 1rem; background: rgba(29, 42, 58, .88); color: var(--paper); border-radius: 999px; padding: .35rem .85rem; font-size: var(--step--1); font-weight: 700; }
.scene-body { padding: clamp(1.25rem, 4vw, 2rem); display: grid; gap: 1.25rem; }
.speech { background: var(--paper); color: var(--ink); border-radius: var(--radius-m); padding: 1.1rem 1.3rem; position: relative; font-size: var(--step-0); }
.speech::before { content: ""; position: absolute; left: 2rem; top: -12px; border: 12px solid transparent; border-top: 0; border-bottom-color: var(--paper); }
.speech h3 { font-size: var(--step-2); margin-bottom: .5rem; }
.responses { display: grid; gap: .6rem; }
.resp {
  text-align: left; border: 0; border-radius: var(--radius-s); cursor: pointer; padding: .85rem 1rem;
  background: rgba(255, 255, 255, .08); color: var(--paper); box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .25);
  display: grid; grid-template-columns: 1.75rem 1fr; gap: .6rem; align-items: start; line-height: 1.45;
}
.resp:hover:not([disabled]) { background: rgba(255, 255, 255, .14); box-shadow: inset 0 0 0 1.5px var(--gold); }
.resp .letter { width: 1.75rem; height: 1.75rem; border-radius: 50%; display: grid; place-items: center; background: var(--paper); color: var(--ink); font-weight: 700; font-size: .85rem; }
.resp.tried { opacity: .5; text-decoration: line-through; }
.resp[disabled] { cursor: default; }
.verdict { border-radius: var(--radius-s); padding: 1rem 1.2rem; }
.verdict.ok { background: var(--right-tint); color: var(--ink); }
.verdict.bad { background: var(--wrong-tint); color: var(--ink); }
.verdict b { display: block; margin-bottom: .2rem; }
.scene-end { padding: clamp(1.5rem, 5vw, 3rem); text-align: center; display: grid; gap: 1rem; justify-items: center; }
.scene-end h3 { font-size: var(--step-3); }
.path { display: flex; gap: .5rem; flex-wrap: wrap; justify-content: center; }
.path span { background: rgba(255, 255, 255, .1); border-radius: 999px; padding: .35rem .9rem; font-size: var(--step--1); }
.path span.first { background: var(--gold); color: var(--ink); font-weight: 700; }

/* quiz */
.quiz-intro { display: grid; gap: 1rem; justify-items: start; }
.quiz-meta { display: flex; gap: 2rem; flex-wrap: wrap; }
.quiz-meta div { display: grid; }
.quiz-meta b { font-family: var(--serif); font-weight: 400; font-size: var(--step-3); line-height: 1; }
.quiz-meta span { font-size: var(--step--1); color: var(--ink-soft); }
.qbar { height: 6px; background: var(--line); border-radius: 3px; overflow: hidden; margin-bottom: 1.25rem; }
.qbar i { display: block; height: 100%; background: var(--gold); transition: width .3s ease; }
.qcount { font-size: var(--step--1); color: var(--ink-soft); margin-bottom: .4rem; }
.result { display: grid; grid-template-columns: auto 1fr; gap: 1.5rem 2rem; align-items: center; }
.ring { width: 9rem; height: 9rem; }
.ring circle { fill: none; stroke-width: 10; }
.ring .track { stroke: var(--line); }
.ring .val { stroke: var(--gold); stroke-linecap: round; transform: rotate(-90deg); transform-origin: 50% 50%; transition: stroke-dashoffset .8s ease; }
.ring text { font-family: var(--serif); font-size: 1.6rem; fill: var(--ink); }
.result h2 { font-size: var(--step-3); margin-bottom: .5rem; }
.review { margin-top: 2rem; display: grid; gap: 1rem; }
.review-item { border-left: 4px solid var(--right); padding: .25rem 0 .25rem 1rem; }
.review-item.miss { border-color: var(--wrong); }
.review-item .q { font-weight: 700; }
.review-item .q p { margin: 0; }
.review-item .a { font-size: .95rem; color: var(--ink-soft); }

/* lesson footer */
.next {
  margin-top: 3.5rem; padding-top: 2rem; border-top: 2px solid var(--ink);
  display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap;
}
.next .label { font-size: var(--step--1); color: var(--ink-soft); }
.next .title { font-family: var(--serif); font-size: var(--step-2); line-height: 1.2; }
.next a.prev { color: var(--ink-soft); font-size: var(--step--1); }

.footnote { max-width: 54rem; margin: 1.25rem auto 0; font-size: var(--step--1); color: var(--ink-soft); text-align: center; }

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .shell > div { min-width: 0; }
  .side {
    position: fixed; inset: 0 auto 0 0; width: min(20rem, 86vw); z-index: 30;
    transform: translateX(-100%); transition: transform .25s ease;
  }
  .shell.nav-open .side { transform: none; }
  .shell.nav-open::after { content: ""; position: fixed; inset: 0; background: rgba(29, 42, 58, .55); z-index: 25; }
  .topbar {
    display: flex; position: sticky; top: 0; z-index: 20; align-items: center; gap: .75rem;
    background: var(--ink); color: var(--paper); padding: .65rem 1rem;
  }
  .topbar button { background: none; border: 0; color: var(--paper); padding: .25rem; cursor: pointer; display: grid; place-items: center; }
  .topbar .t { font-family: var(--serif); font-size: 1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1; min-width: 0; }
  .topbar .pct { font-size: var(--step--1); color: var(--gold); font-weight: 700; }
  .cover { grid-template-columns: 1fr; }
  .cover-text { min-height: 70vh; }
}
@media (max-width: 680px) {
  :root { --step-3: 1.65rem; --step-2: 1.3rem; }
  .main { padding: .75rem .75rem 3rem; }
  .aside, .persona, .hero-img.square, .proc-slide, .result { grid-template-columns: 1fr; }
  .proc-img { aspect-ratio: 16 / 10; }
  .match-row { grid-template-columns: 1fr; }
  .match-row .fix { grid-column: 1; }
  .types { grid-template-columns: repeat(2, 1fr); }
  .kv { grid-template-columns: 1fr; }
  .kv dt { border-bottom: 0; padding-bottom: 0; }
  .marker { min-width: 2.1rem; height: 2.1rem; font-size: .75rem; padding: 0 .45rem; }
  .scene-art { aspect-ratio: 16 / 10; }
  .next { flex-direction: column; align-items: stretch; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
