/* Illustrated study desk. The original component styles remain the functional base. */
:root {
  --bg: #f7f6f1;
  --paper: #fffdf8;
  --ink: #263b34;
  --teal: #21594d;
  --teal-deep: #163e34;
  --muted: #65736a;
  --line: #e0e5dc;
  --mint: #edf3ed;
  --gold: #a57631;
  --gold-pale: #faf0d9;
  --sidebar: 208px;
  --radius: 24px;
}
html { scroll-padding-bottom: 100px; }
body { -webkit-font-smoothing: antialiased; }
h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }
button, a, summary { -webkit-tap-highlight-color: transparent; }
button, .button { transition: background-color 160ms, border-color 160ms, transform 160ms; }
.button:active { transform: scale(.98); }
.button { border-radius: 10px; min-height: 48px; padding: 12px 20px; font-size: 15px; }
.primary { background: var(--teal); }
.secondary { background: var(--paper); border-color: #cbd5ca; }
.text-button { min-height: 44px; }
svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.sidebar { padding: 28px 16px; background: #fcfcf8; }
.wordmark { font-size: 25px; gap: 8px; }
.brand-symbol { width: 34px; height: 34px; font-size: 25px; }
.library-label { margin: 44px 12px 12px; color: #778277; }
.sidebar nav { gap: 4px; }
.sidebar nav a { font-size: 15px; padding: 12px; min-height: 48px; gap: 12px; border-radius: 9px; position: relative; }
.sidebar nav a > span { font: inherit; width: auto; text-align: left; }
.sidebar nav a.active { background: #eaf0e8; color: var(--teal); }
.sidebar nav b { font-variant-numeric: tabular-nums; background: #fdfdf9; }
.sidebar-note { margin: 40px 12px 16px; border: 0; padding: 24px 0; }
.sidebar-star { color: var(--gold); font-size: 28px; }
.sidebar-note p { font: 700 20px/1.2 Brandon; margin: 12px 0; }
.sidebar-note > span:last-child { line-height: 1.6; font-size: 12px; }
.sidebar-bottom { padding: 16px 8px 0; }
.edition-pill { border: 0; padding: 0; color: var(--muted); font-size: 12px; }
.sidebar-bottom .text-button { display: block; font-size: 12px; }
.topbar { height: 72px; padding: 0 40px; background: #fcfcf8; }
.topbar > div { display: flex; align-items: center; }
.desktop-label { color: var(--muted); font-size: 13px; }
.topbar-divider { color: #c3c9be; }
.progress-settings { display: flex; gap: 8px; align-items: center; min-height: 44px; border: 0; background: transparent; color: var(--muted); font-size: 12px; padding: 8px; }
.progress-settings svg { width: 17px; height: 17px; }
.progress-settings:hover { color: var(--teal); background: var(--mint); border-radius: 8px; }
main { max-width: 1392px; padding: 32px 40px 56px; min-height: calc(100vh - 150px); }
.home-heading { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.home-heading p { margin: 4px 0 0; font-size: 15px; color: var(--muted); }
.home-heading .eyebrow { font-size: 11px; letter-spacing: .09em; }
.edition-label { font-size: 12px; color: var(--muted); }
.hero { display: grid; grid-template-columns: .85fr 1.15fr; align-items: stretch; padding: 0; min-height: 368px; border: 1px solid #e6e5d9; border-radius: 24px; background: var(--paper); overflow: hidden; }
.hero-copy { padding: 36px; display: flex; flex-direction: column; justify-content: center; }
.collection-label { font: 700 10px Brandon; letter-spacing: .13em; color: var(--teal); }
.hero h1 { font-size: clamp(40px, 3.8vw, 56px); font-weight: 700; line-height: 1; letter-spacing: -.025em; margin: 20px 0; color: var(--teal-deep); }
.hero h1 span { color: #446a55; }
.hero .intro { font-size: 17px; line-height: 1.55; max-width: 330px; margin-bottom: 24px; color: #617263; }
.hero-actions { gap: 8px; }
.hero .button { white-space: nowrap; }
.hero-footnote { display: flex; align-items: center; gap: 8px; margin-top: 24px; font-size: 11px; color: var(--muted); }
.gold-star { color: var(--gold); font-size: 17px; }
.hero-artwork { display: block; position: relative; min-height: 368px; color: var(--teal-deep); text-decoration: none; background: #f3eee2; overflow: hidden; }
.hero-art { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 1; object-fit: cover; object-position: center; mix-blend-mode: normal; }
.art-caption { position: absolute; bottom: 0; left: 0; right: 0; padding: 14px 24px; background: #f9f6ecee; display: grid; grid-template-columns: 1fr auto; align-items: center; border-top: 1px solid #dddccf; }
.art-caption > span:first-child { grid-column: 1; font: 700 9px Brandon; letter-spacing: .12em; color: #748173; }
.art-caption b { grid-column: 1; font: 700 17px Brandon; margin-top: 2px; }
.art-caption .art-link { grid-column: 2; grid-row: 1 / 3; font: 22px Arial; }
.hero-artwork:hover .art-link { transform: translate(2px, -2px); }
.metrics { grid-template-columns: repeat(4, 1fr); gap: 0; border-bottom: 1px solid var(--line); margin: 0 0 36px; padding: 24px 0; }
.metric { border: 0; border-radius: 0; background: transparent; padding: 0 24px; border-right: 1px solid var(--line); }
.metric:first-child { padding-left: 4px; }
.metric:last-child { border-right: 0; }
.metric strong { font: 700 28px/1.1 Brandon; color: var(--teal-deep); font-variant-numeric: tabular-nums; }
.metric strong small { font: 400 14px Titillium; color: var(--muted); }
.metric span { display: block; margin-top: 4px; font-size: 12px; }
.resume-banner { border: 0; border-bottom: 1px solid var(--line); background: transparent; border-radius: 0; padding: 20px 4px; margin: 0; }
.resume-banner h3 { font-size: 18px; }
.resume-banner .button { min-height: 44px; padding: 10px 20px; }
.section-heading { align-items: center; margin-bottom: 20px; }
.section-heading .eyebrow { color: var(--muted); font-size: 9px; }
.section-heading h2 { font-size: 28px; font-weight: 700; margin-top: 8px; }
.section-heading a { min-height: 44px; display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; color: var(--teal); font-weight: 700; }
.topic-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.topic-card { min-height: 160px; display: grid; grid-template-columns: 168px minmax(0, 1fr) 20px; gap: 20px; padding: 0 20px 0 0; align-items: center; border: 1px solid #e4e7de; border-radius: 16px; overflow: hidden; background: #fffefa; }
.topic-card:hover { border-color: #a8bca9; transform: translateY(-2px); background: #fffefa; }
.topic-art { align-self: stretch; position: relative; min-height: 160px; background: #f4f0e5; overflow: hidden; }
.topic-art img { width: 100%; height: 100%; display: block; object-fit: cover; object-position: center; }
.chapter-folio { position: absolute; top: 12px; left: 12px; display: grid; place-items: center; min-width: 28px; height: 28px; padding: 4px; background: #fffdf1ed; border: 1px solid #e4dac0; border-radius: 8px; color: #795d2b; font: 700 12px Brandon; }
.topic-copy { min-width: 0; padding: 20px 0; }
.topic-top { margin-bottom: 8px; gap: 8px; }
.topic-number { font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: #8b743d; }
.topic-card h3 { font-size: 20px; line-height: 1.18; margin: 0 0 12px; color: #304b3c; text-wrap: pretty; }
.topic-meta { font-size: 12px; color: #718074; line-height: 1.4; }
.topic-arrow { color: #708575; font: 22px Arial; }
.empty-note { font-size: 11px; }
.mini-progress { margin-top: 12px; height: 3px; }
.page-heading h1 { font-size: 40px; font-weight: 700; color: var(--teal-deep); margin: 12px 0; }
.page-heading p { font-size: 17px; line-height: 1.55; }
.search-row { margin-bottom: 24px; }
.search-row input { max-width: 560px; min-height: 48px; padding: 12px 16px; background: #fffefa; border-color: #d5dece; border-radius: 10px; }
.topic-masthead { display: grid; grid-template-columns: 1.35fr .65fr; gap: 40px; align-items: center; padding: 8px 0 32px; }
.topic-masthead .page-heading { margin: 0; }
.topic-masthead-art { overflow: hidden; border-radius: 20px; border: 1px solid #e4e3d7; aspect-ratio: 3 / 2; background: var(--paper); }
.topic-masthead-art img { width: 100%; height: 100%; object-fit: cover; display: block; }
.topic-detail { gap: 24px; grid-template-columns: 1.2fr .8fr; }
.panel { border-radius: 16px; padding: 28px; background: #fffefa; }
.panel h2 { font-weight: 700; }
.panel .fine { font-size: 13px; line-height: 1.5; }
.mode-options { gap: 10px; }
.mode-card { padding: 16px; border-radius: 10px; }
.mode-card input { width: 16px; height: 16px; flex-shrink: 0; }
.mode-card small { line-height: 1.5; }
.subtle-panel { background: #f1f3eb; border-color: #e2e6d9; }
.subtle-panel h2 { font-size: 23px; }
.topic-list { line-height: 1.5; }
.home-deck { background: #e9eee3; border: 0; margin-top: 32px; border-radius: 16px; padding: 28px 32px; }
.home-deck h2 { font-size: 26px; }
.deck-feature { border-radius: 16px; }
.deck-row { padding: 20px; border-radius: 12px; align-items: center; }
.deck-row h3 { font-size: 18px; line-height: 1.25; }
.deck-help { line-height: 1.6; }
.practice-shell { max-width: 850px; }
.session-heading { margin-bottom: 24px; }
.session-heading h1 { font-size: 24px; font-weight: 700; }
.session-heading .eyebrow { color: var(--muted); font-size: 10px; }
.session-progress { gap: 16px; margin-bottom: 24px; font-size: 12px; font-variant-numeric: tabular-nums; }
.session-progress progress { height: 4px; min-width: 40px; }
.session-progress progress::-webkit-progress-value { background: var(--gold); }
.question-card { padding: 32px; border-radius: 18px; background: #fffefa; }
.question-tools { margin-bottom: 24px; gap: 16px; align-items: start; }
.question-type { font-size: 10px; line-height: 1.5; letter-spacing: .07em; }
.bookmark { flex-shrink: 0; min-height: 44px; background: var(--paper); padding: 8px 12px; }
.stem { font-size: 21px; line-height: 1.5; margin-bottom: 24px; color: #2d3e34; }
.confidence-row { border: 0; padding: 0; margin: 0 0 20px; font-size: 13px; }
.confidence-choice button { min-height: 44px; font-size: 13px; border-radius: 8px; background: #fffefa; }
.option { border-width: 1px; border-radius: 10px; padding: 16px; min-height: 64px; background: #fffefa; line-height: 1.45; }
.option-body { min-width: 0; overflow-wrap: anywhere; }
.option-key { background: #f1f4eb; color: #61735f; border: 0; }
.option-status { line-height: 1.4; }
.question-actions { margin-top: 20px; align-items: center; }
.feedback { border-radius: 16px; scroll-margin-top: 24px; }
.feedback-heading { padding: 24px 28px; }
.feedback-body { padding: 28px; font-size: 17px; line-height: 1.65; overflow-wrap: anywhere; }
.feedback:focus { outline: 0; }
.feedback:focus-visible { outline: 3px solid var(--gold); outline-offset: 4px; }
.feedback-body table { width: 100%; border-collapse: collapse; font-size: 15px; }
.feedback-body th, .feedback-body td { border: 1px solid var(--line); padding: 8px; }
.remember { border-left-width: 2px; padding: 18px 20px; border-radius: 0 8px 8px 0; }
.source-details { line-height: 1.6; }
summary { min-height: 44px; padding: 10px 0; }
.source-details details { border-top: 1px solid var(--line); margin: 8px 0; }
.question-figure { margin: 24px 0; }
.figure-expand { display: block; width: 100%; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--teal); }
.figure-expand img { max-height: 520px; width: auto; max-width: 100%; border-radius: 0; object-fit: contain; }
.figure-expand > span { display: block; padding-top: 10px; font-size: 12px; text-align: right; }
.figure-expand:hover { border-color: #90ac93; }
.question-figure figcaption { line-height: 1.5; }
.session-bottom { align-items: center; }
.session-bottom p { max-width: 340px; line-height: 1.5; }
.result-hero { background: #edf2e8; padding: 40px; border: 0; border-radius: 20px; }
.result-hero h1 { font-weight: 700; font-size: 34px; }
.result-score { font-weight: 700; }
.result-row { border-radius: 10px; min-height: 76px; }
.result-title { overflow-wrap: anywhere; min-width: 0; }
.result-row .result-title { font-size: 17px; }
.result-row small { margin-top: 4px; font-size: 13px; }
.site-footer { padding: 20px 40px; font-size: 11px; }
.site-footer button { min-height: 44px; font-size: 12px; padding: 0; }
dialog { max-height: calc(100dvh - 40px); overflow-y: auto; border-radius: 20px; padding: 32px; }
#figure-dialog { max-width: 1100px; width: calc(100% - 40px); padding: 52px 24px 20px; }
#figure-dialog img { display: block; width: auto; max-width: 100%; max-height: calc(100dvh - 160px); object-fit: contain; margin: auto; }
#figure-caption { font-size: 13px; text-align: center; margin: 16px 0 0; }
.toast { line-height: 1.45; }
.mobile-wordmark { text-decoration: none; }
.companion-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.companion-card { display: flex; flex-direction: column; align-items: start; padding: 32px; border: 1px solid var(--line); border-radius: 16px; background: #fffefa; text-decoration: none; color: var(--ink); }
a.companion-card:hover { border-color: #a8bca9; background: var(--paper); }
.companion-card h2 { font-size: 28px; margin: 12px 0; }
.companion-card p { font-size: 16px; color: var(--muted); line-height: 1.6; }
.resource-icon { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 12px; background: var(--mint); color: var(--teal); font-size: 25px; margin-bottom: 24px; }
.resource-action { margin-top: auto; min-height: 44px; display: flex; align-items: center; font-weight: 700; font-size: 14px; color: var(--teal); }
.resource-file-note { display: block; margin-top: 12px; }
.reader-resource { background: #edf2e8; }
.companion-home-link { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 24px 4px; text-decoration: none; border-bottom: 1px solid var(--line); }
.companion-home-link b { display: block; font: 700 22px Brandon; }
.companion-home-link small { display: block; font-size: 13px; color: var(--muted); margin-top: 4px; }
.reference-search { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin: 28px 0; }
.editorial-notes { background: #edf2e9; border: 1px solid #d5dece; border-radius: 12px; padding: 16px 20px; }
.editorial-notes > summary { cursor: pointer; font-weight: 700; min-height: 32px; padding-top: 4px; }
.editorial-notes > summary span { display: block; font-size: 13px; font-weight: 400; color: var(--muted); margin: 6px 0 0 16px; }
.editorial-notes > p { margin: 16px 0; }
.source-note-group { padding: 12px 0; border-top: 1px solid #d5dece; }
.source-note-group summary { cursor: pointer; font-weight: 700; min-height: 44px; display: list-item; padding: 10px 0; }
.source-note-group p { font-size: 14px; line-height: 1.6; margin: 10px 0; }
.reference-search input { width: 100%; max-width: 580px; border: 1px solid #d5dece; border-radius: 10px; background: #fffefa; padding: 12px 16px; min-height: 48px; }
.reference-search .fine { white-space: nowrap; font-variant-numeric: tabular-nums; }
.reference-list { display: grid; gap: 12px; }
.reference-row { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 20px; padding: 24px; border: 1px solid var(--line); background: #fffefa; border-radius: 12px; }
.reference-number { font: 700 14px Brandon; color: var(--gold); padding-top: 2px; font-variant-numeric: tabular-nums; }
.reference-row h2 { font-size: 20px; margin: 0 0 8px; overflow-wrap: anywhere; }
.reference-row p { font-size: 15px; line-height: 1.55; color: var(--muted); margin-bottom: 8px; overflow-wrap: anywhere; }
.reference-layer { font-size: 11px; color: #718074; }
.reference-link { display: inline-flex; min-height: 44px; align-items: center; margin-left: 16px; font-size: 13px; font-weight: 700; }
.reference-pagination { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 28px; }
.reference-pagination > span { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
@media (min-width: 1450px) {
  main { padding-top: 36px; }
  .hero { min-height: 408px; }
  .hero-copy { padding: 40px; }
  .hero h1 { font-size: 58px; }
}
@media (max-width: 1160px) {
  :root { --sidebar: 188px; }
  .sidebar { padding: 28px 12px; }
  .wordmark { font-size: 23px; }
  .topbar { padding: 0 28px; }
  main { padding: 28px; }
  .hero { grid-template-columns: 1fr 1fr; }
  .hero-copy { padding: 28px; }
  .hero h1 { font-size: 44px; }
  .hero .button { font-size: 13px; padding: 12px 14px; }
  .topic-card { grid-template-columns: 120px minmax(0, 1fr) 16px; gap: 16px; padding-right: 16px; }
  .topic-card h3 { font-size: 18px; }
  .topic-masthead { grid-template-columns: 1.3fr .7fr; gap: 24px; }
  .topic-detail { grid-template-columns: 1fr; }
  .subtle-panel .topic-list { margin-bottom: 20px; }
}
@media (max-width: 900px) and (min-width: 781px) {
  .topic-grid { grid-template-columns: 1fr; }
  .hero { grid-template-columns: 1fr; }
  .hero-artwork { min-height: 250px; grid-row: 1; }
  .hero-copy { grid-row: 2; }
  .topic-masthead { grid-template-columns: 1fr; }
  .topic-masthead-art { max-width: 440px; }
}
@media (max-width: 780px) {
  :root { --sidebar: 0px; }
  .sidebar { height: calc(72px + env(safe-area-inset-bottom)); padding: 8px 12px calc(8px + env(safe-area-inset-bottom)); background: #fdfdf8; }
  .sidebar nav { gap: 4px; grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .sidebar nav a { min-height: 54px; gap: 3px; padding: 6px 4px; border-radius: 10px; font-size: 10px; }
  .sidebar nav a > span { font-size: 10px; text-align: center; width: auto; line-height: 1.2; }
  .sidebar nav svg { width: 21px; height: 21px; }
  .sidebar nav b { position: absolute; top: 4px; right: 11px; margin: 0; padding: 1px 4px; font-size: 9px; min-width: 15px; }
  .study-session .sidebar { display: none; }
  .workspace { margin: 0; }
  .topbar { height: 60px; padding: 0 20px; }
  .mobile-wordmark { font-size: 22px; font-weight: 700; }
  .topbar-divider { margin: 0 10px; }
  .topbar b { font-size: 12px; }
  .progress-settings { width: 44px; height: 44px; padding: 10px; justify-content: center; }
  .progress-settings svg { width: 20px; height: 20px; }
  .progress-settings span { display: none; }
  main { padding: 20px 16px 32px; min-height: calc(100dvh - 150px); }
  .home-heading { margin-bottom: 16px; }
  .home-heading p { display: none; }
  .home-heading .eyebrow { font-size: 11px; }
  .edition-label { font-size: 10px; }
  .hero { grid-template-columns: 1fr; min-height: 0; border-radius: 20px; }
  .hero-artwork { min-height: 196px; grid-row: 1; }
  .hero-art { width: 100%; height: 100%; top: 0; right: auto; opacity: 1; object-position: center 47%; }
  .art-caption { padding: 10px 16px; }
  .art-caption > span:first-child { display: none; }
  .art-caption b { margin: 0; font-size: 14px; }
  .art-caption .art-link { grid-row: 1; font-size: 19px; }
  .hero-copy { padding: 20px; grid-row: 2; }
  .collection-label { font-size: 9px; letter-spacing: .11em; }
  .hero h1 { font-size: 32px; line-height: 1.02; margin: 12px 0; }
  .hero h1 br { display: none; }
  .hero h1 span { display: inline; }
  .hero .intro { font-size: 15px; line-height: 1.5; margin: 0 0 16px; max-width: 100%; }
  .hero .hero-actions { flex-wrap: nowrap; gap: 8px; }
  .hero .button { padding: 12px 14px; font-size: 13px; flex: 1; min-height: 46px; }
  .hero-footnote { display: none; }
  .metrics { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 28px; padding: 20px 0; }
  .metric { padding: 0 8px; }
  .metric strong { font-size: 23px; }
  .metric strong small { display: none; }
  .metric span { font-size: 10px; line-height: 1.35; }
  .resume-banner { padding: 16px 0; gap: 12px; align-items: center; }
  .resume-banner h3 { font-size: 16px; }
  .resume-banner p { font-size: 12px; }
  .resume-banner .button { font-size: 13px; padding: 10px 16px; }
  .section-heading { align-items: end; gap: 12px; margin-bottom: 16px; }
  .section-heading .eyebrow { font-size: 8px; letter-spacing: .06em; }
  .section-heading h2 { font-size: 25px; line-height: 1.12; margin-top: 6px; max-width: 230px; }
  .section-heading a { font-size: 12px; gap: 4px; white-space: nowrap; }
  .topic-grid { grid-template-columns: 1fr; gap: 12px; }
  .topic-card { min-height: 128px; grid-template-columns: 116px minmax(0, 1fr) 14px; gap: 14px; padding: 0 14px 0 0; border-radius: 14px; }
  .topic-art { min-height: 128px; }
  .topic-art img { object-position: center; }
  .chapter-folio { left: 8px; top: 8px; min-width: 24px; height: 24px; font-size: 10px; border-radius: 6px; }
  .topic-copy { padding: 16px 0; }
  .topic-top { margin-bottom: 6px; }
  .topic-number { font-size: 9px; }
  .topic-card h3 { font-size: 18px; line-height: 1.16; margin-bottom: 8px; }
  .topic-meta { font-size: 11px; line-height: 1.4; }
  .topic-arrow { font-size: 17px; }
  .page-heading { margin-bottom: 24px; }
  .page-heading h1 { font-size: 34px; line-height: 1.06; }
  .page-heading p { font-size: 16px; line-height: 1.5; }
  .search-row input { max-width: 100%; }
  .topic-masthead { grid-template-columns: 1fr; gap: 20px; padding-bottom: 24px; }
  .topic-masthead .page-heading { margin: 0; }
  .topic-masthead-art { grid-row: 1; aspect-ratio: 2.2 / 1; border-radius: 16px; }
  .topic-detail { gap: 16px; }
  .panel { padding: 20px; border-radius: 14px; }
  .panel h2 { font-size: 24px; }
  .mode-card { padding: 14px; }
  .mode-card b { font-size: 15px; }
  .mode-card small { font-size: 12px; }
  .session-controls { gap: 12px; display: grid; grid-template-columns: 1fr 1.1fr; align-items: end; }
  .session-controls select { width: 100%; min-width: 0; }
  .session-controls .button { padding: 12px 10px; font-size: 13px; }
  .home-deck { margin-top: 24px; padding: 24px; }
  .home-deck h2 { font-size: 26px; }
  .deck-feature { padding: 24px; }
  .deck-feature .button { margin-top: 16px; }
  .deck-row { padding: 16px; gap: 12px; }
  .deck-row h3 { font-size: 17px; }
  .deck-row .button { flex-shrink: 0; }
  .study-session main { padding: 20px 16px 24px; }
  .session-heading { gap: 12px; margin-bottom: 20px; align-items: start; }
  .session-heading h1 { font-size: 21px; max-width: 240px; }
  .session-heading .text-button { font-size: 12px; padding: 0; min-height: 44px; }
  .session-progress { font-size: 12px; gap: 12px; margin-bottom: 20px; }
  .question-card { padding: 20px; border-radius: 14px; }
  .question-tools { gap: 12px; margin-bottom: 20px; }
  .question-type { font-size: 9px; letter-spacing: .05em; }
  .bookmark { font-size: 12px; padding: 8px 10px; }
  .stem { font-size: 20px; line-height: 1.5; margin-bottom: 20px; }
  .confidence-row { gap: 8px; margin-bottom: 16px; }
  .confidence-row > span { font-size: 11px; }
  .confidence-choice { gap: 6px; }
  .confidence-choice button { font-size: 12px; padding: 8px 10px; }
  .option { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 8px 12px; padding: 14px; font-size: 16px; min-height: 60px; }
  .option-key { width: 24px; height: 26px; align-self: start; margin-top: 1px; }
  .option-status { display: block; grid-column: 2; max-width: none; text-align: left; font-size: 10px; }
  .source-letter { font-size: 11px; }
  .question-actions { gap: 12px; }
  .question-actions .button { font-size: 13px; padding: 12px 14px; }
  .feedback { margin-top: 16px; border-radius: 14px; }
  .feedback-heading { padding: 20px; }
  .feedback-heading h2 { font-size: 24px; }
  .feedback-heading p { font-size: 13px; line-height: 1.5; }
  .feedback-body { padding: 20px; font-size: 16px; line-height: 1.65; }
  .feedback-body table { font-size: 13px; }
  .feedback-body th, .feedback-body td { padding: 6px; }
  .remember { padding: 16px; margin-top: 20px; }
  .session-bottom { gap: 16px; margin-top: 20px; align-items: start; }
  .session-bottom p { font-size: 11px; max-width: 160px; }
  .session-bottom .button { font-size: 14px; padding: 12px 16px; }
  .session-bottom .hero-actions { flex-direction: column; }
  .figure-expand { padding: 8px; }
  .figure-expand img { max-height: 480px; }
  .result-hero { padding: 28px 20px; }
  .result-hero h1 { font-size: 29px; }
  .result-row { padding: 16px; gap: 12px; }
  .result-row .result-title { font-size: 16px; }
  .result-row small { font-size: 12px; }
  .review-filters .button { padding: 12px; font-size: 13px; }
  .site-footer { padding: 20px 20px calc(100px + env(safe-area-inset-bottom)); }
  .study-session .site-footer { padding-bottom: calc(24px + env(safe-area-inset-bottom)); }
  .toast { left: 16px; right: 16px; max-width: none; bottom: calc(88px + env(safe-area-inset-bottom)); font-size: 13px; }
  .study-session .toast { bottom: calc(20px + env(safe-area-inset-bottom)); }
  dialog { padding: 28px 24px; }
  #figure-dialog { width: calc(100% - 24px); padding: 52px 12px 16px; }
  .companion-grid { grid-template-columns: 1fr; gap: 16px; }
  .companion-card { padding: 24px; }
  .companion-card h2 { font-size: 26px; }
  .companion-home-link b { font-size: 21px; }
  .companion-home-link small { font-size: 12px; }
  .reference-search { align-items: start; flex-direction: column; gap: 12px; margin: 20px 0; }
  .reference-row { grid-template-columns: 28px minmax(0, 1fr); gap: 12px; padding: 20px; }
  .reference-row h2 { font-size: 18px; line-height: 1.3; }
  .reference-row p { font-size: 14px; }
  .reference-link { display: flex; margin-left: 0; }
  .reference-pagination { gap: 8px; }
  .reference-pagination .button { padding: 12px 16px; font-size: 13px; }
}
@media (max-width: 360px) {
  .hero h1 { font-size: 32px; }
  .hero .hero-actions { flex-direction: column; }
  .hero .button { width: 100%; flex: auto; }
  .topic-card { grid-template-columns: 94px minmax(0, 1fr) 12px; gap: 12px; padding-right: 12px; }
  .topic-card h3 { font-size: 17px; }
  .section-heading h2 { font-size: 23px; }
  .section-heading .eyebrow { display: none; }
  .confidence-row { align-items: start; flex-direction: column; }
  .session-controls { grid-template-columns: 1fr; }
  .deck-row { align-items: start; flex-direction: column; }
  .session-bottom { flex-wrap: wrap; }
  .session-bottom p { max-width: none; }
  .session-bottom .hero-actions { flex-direction: row; }
}
@media (prefers-reduced-motion: reduce) {
  .button:active, .topic-card:hover { transform: none; }
}
/* The option number is a visual anchor on touch screens as well as a key hint. */
@media (pointer: coarse) {
  .option-key[data-keyboard=true] { display: grid; }
}
