/* The selected Learn design: a quiet presentation, then one guided action. */
:root {
  --bg: #fffcf8;
  --paper: #fff;
  --ink: #3e2e50;
  --muted: #74677c;
  --line: #e5dce7;
  --blue: #694880;
  --blue-light: #eee8f7;
  --amber: #9c4d28;
  --apricot: #f4b486;
  --lavender-line: #d8cee5;
}
body { background: var(--bg); }
button { display: inline-flex; align-items: center; justify-content: center; gap: 9px; border-radius: 12px; }
button:hover { background: var(--blue-light); }
.primary { border-bottom: 3px solid #483058; }
.primary:hover { background: #543568; }
svg.icon { width: 23px; height: 23px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
header { height: 82px; border-bottom: 1px solid var(--line); background: #fff; }
.brand { font-size: 22px; gap: 11px; }
.brand b { font-weight: 700; }
.course-title { font-size: 14px; letter-spacing: 0; }
.course-title span { font-size: 11px; }
#account-button { background: var(--bg); font-size: 13px; }
.toolbar { max-width: 1280px; margin: auto; padding: 16px 26px; border: 0; gap: 16px; }
.toolbar button { padding: 9px 14px; font-size: 13px; }
.toolbar .toolbar-links { gap: 8px; margin: 0; }
.toolbar button[aria-current=page] { background: var(--blue-light); color: var(--blue); box-shadow: none; }
.toolbar svg.icon { width: 20px; height: 20px; }
#cantonese-toggle, #cantonese-toggle[aria-pressed=true] { background: #fbe7d8; color: #643d29; border-color: transparent; font-size: 13px; }
#cantonese-toggle[aria-pressed=false] { background: transparent; color: var(--muted); border-color: var(--line); }
.progress-row { max-width: 980px; margin: 12px auto 0; padding: 0 30px; display: flex; align-items: center; gap: 18px; color: var(--muted); font-size: 12px; }
#chapter-label { max-width: none; font-size: 12px; }
#slide-count { white-space: nowrap; }
.course-progress { height: 5px; flex: 1; background: none; min-width: 50px; }
#progress-fill { display: flex; gap: 4px; height: 100%; background: none; }
#progress-fill i { flex: 1; background: #e8e0eb; border-radius: 4px; }
#progress-fill .done { background: var(--blue); }
#progress-fill .current { background: var(--apricot); }
.presentation { display: block; max-width: 980px; min-height: 0; padding: 0 30px; margin: auto; }
.slide { display: block; }
.lesson-route { display: flex; justify-content: center; align-items: center; gap: 20px; margin: 22px 0 18px; }
.route-item { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; }
.route-item .symbol { width: 36px; height: 36px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; background: white; }
.route-item.current { color: var(--ink); font-weight: 600; }
.route-item.current .symbol { background: var(--apricot); border-color: var(--apricot); border-radius: 12px; transform: rotate(-5deg); }
.route-item.current svg { transform: rotate(5deg); }
.route-dash { width: 40px; border-top: 1px dashed #bcacc8; }
.narrative { text-align: center; max-width: 740px; margin: auto; }
.narrative > .eyebrow { display: none; }
h1 { max-width: 740px; margin: 0 auto 14px; font: 42px/1.18 Georgia, 'Times New Roman', serif; letter-spacing: -.8px; }
h1 em { font-style: normal; position: relative; white-space: nowrap; }
h1 em::after { content: ''; position: absolute; left: 1px; right: 0; bottom: -3px; height: 4px; border-radius: 50%; background: var(--apricot); transform: rotate(-1deg); }
.spoken { max-width: 700px; margin: auto; font-size: 17px; line-height: 1.6; color: var(--muted); }
.cantonese-help { border: 0; padding: 0; font-size: 14px; line-height: 1.8; color: #665071; max-width: none; }
.narrative > .cantonese-help { margin: 14px auto 0; max-width: 620px; display: flex; justify-content: center; align-items: flex-start; gap: 9px; }
.cantonese-help > svg { color: var(--blue); width: 20px; height: 20px; margin-top: 3px; }
.narrative > .cantonese-help p { max-width: 570px; }
.scene { max-width: 820px; margin: 24px auto 0; }
.plot-paper { padding: 17px 24px 12px; border: 1px solid var(--lavender-line); background: var(--blue-light); border-radius: 20px 20px 20px 5px; }
.plot-top { display: flex; justify-content: space-between; align-items: center; gap: 15px; font-size: 12px; color: var(--blue); }
.plot-title, .curve-note { display: flex; align-items: center; gap: 8px; }
.plot-top .icon { width: 19px; height: 19px; }
.curve-note { color: var(--muted); }
.curve-note .icon { width: 18px; height: 18px; }
.scene #plot > svg { display: block; width: 100%; height: 330px; max-height: none; margin-top: 3px; }
.scene #plot > svg.single-curve { height: 300px; }
.scene svg.icon { width: 23px; height: 23px; }
.scene svg text { font-family: 'Trebuchet MS', Arial, sans-serif; fill: var(--ink); }
.single-curve text { font-size: 14px; }
.single-curve .axis-label { font-size: 13px; fill: var(--muted); }
.single-curve .point-label { fill: #864221; font-size: 12px; }
.figure-caption { display: flex; align-items: center; justify-content: space-between; gap: 15px; font-size: 13px; padding-top: 11px; border-color: var(--lavender-line); }
.figure-caption .quantity { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--ink); text-align: left; max-width: none; }
.figure-caption .quantity b { font-size: 20px; font-weight: 600; }
.figure-caption .quantity svg { color: var(--blue); }
.figure-caption .point-key { display: flex; align-items: center; gap: 7px; font-size: 11px; max-width: none; }
.point-key i { width: 9px; height: 9px; flex-shrink: 0; border-radius: 50%; background: var(--apricot); border: 1px solid var(--amber); }
#scene-control { margin-top: 17px; padding: 0; border: 0; background: transparent; }
.slider-row { display: grid; grid-template-columns: 155px minmax(0,1fr) 70px; gap: 20px; align-items: center; }
#scene-control .slider-name { display: flex; align-items: center; justify-content: flex-start; gap: 10px; font-size: 13px; }
.slider-name .icon { color: var(--blue); }
.slider-name small { display: block; font-size: 11px; color: var(--muted); }
.slider-control input { margin: 0; display: block; min-height: 38px; }
.slider-ticks { position: relative; display: flex; justify-content: space-between; gap: 10px; font-size: 10px; color: var(--muted); }
.slider-ticks .target { position: absolute; transform: translateX(-50%); color: var(--amber); font-weight: 600; }
.price-value { padding: 6px 4px; border-radius: 12px; background: #fbe7d8; color: #663e2b; font-size: 23px; font-weight: 600; text-align: center; }
.helper-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-top: 16px; }
.exam-wording { margin: 0; flex: 1; min-width: 0; }
.exam-wording summary { display: flex; align-items: center; gap: 8px; list-style: none; font-size: 12px; min-height: 44px; padding: 6px 0; }
.exam-wording summary::-webkit-details-marker { display: none; }
.exam-wording summary .icon { width: 20px; height: 20px; }
.exam-wording[open] .disclosure-plus { transform: rotate(45deg); }
.exam-wording > div { max-width: 450px; padding: 12px; background: #fff; border: 1px solid var(--line); border-radius: 10px; }
.scene-footnote { margin: 12px 0 0; max-width: 270px; font-size: 10px; text-align: right; }
.scene-actions { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-top: 15px; padding: 18px 0; border-top: 1px solid var(--line); }
.scene-back { border: 0; color: var(--muted); font-size: 12px; padding-left: 0; }
#lesson-actions { display: flex; gap: 14px; }
#lesson-actions:empty { display: none; }
#lesson-actions button { font-size: 14px; padding: 11px 20px; }
#lesson-actions .primary { min-width: 230px; }
#lesson-actions .hint { border-color: #cfbedb; background: white; }
.hint .icon { color: var(--amber); }
.demonstrate { margin: 0; }
#scene-feedback { background: #f9efe5; border-left: 3px solid var(--apricot); padding: 14px 18px; border-radius: 0 10px 10px 0; margin: 0 0 16px; }
#scene-feedback:empty { display: none; }
footer { max-width: 980px; margin: auto; padding: 13px 30px 23px; display: flex; min-height: 0; border: 0; background: transparent; gap: 20px; }
.account-line { margin: 0; display: flex; align-items: center; gap: 7px; }
.account-line .icon { width: 16px; height: 16px; }
#account-status { margin: 0; font-size: 11px; }
.transport { gap: 18px; }
.transport #next { min-width: 0; border: 0; padding: 5px 0; font-size: 12px; color: var(--muted); gap: 10px; }
.transport #next .icon { width: 18px; height: 18px; }
.transport #back { display: none; }
.practice-view .transport #back { display: inline-flex; font-size: 12px; }
.practice-view .course-progress { visibility: hidden; }
.question, .written-question { padding: 24px; background: #fff; border: 1px solid var(--line); border-radius: 20px 20px 20px 5px; }
.question h2, .written-question h2 { font-size: 23px; }
.question > .cantonese-help, .written-question > .cantonese-help { position: relative; padding-left: 29px; }
.question > .cantonese-help > svg, .written-question > .cantonese-help > svg { position: absolute; left: 0; }
.options button { border-radius: 12px; }
.options button span { border: 0; border-radius: 50%; background: var(--blue-light); width: 30px; height: 30px; padding: 4px; text-align: center; flex-shrink: 0; }
.options button.correct span { background: var(--blue); color: white; }
.practice-wrap { max-width: 900px; margin-top: 30px; }
.practice-top h1 { margin-left: 0; }
.practice-switch button { white-space: nowrap; }
.practice-switch [aria-pressed=true] { background: var(--blue-light); }
.concept-map { margin: auto; }
.concept-map > div { border-radius: 16px; }
.comparison { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.comparison > div { border: 1px solid var(--line); background: #fff; padding: 24px; border-radius: 16px; }
.relation { background: var(--blue-light); border-radius: 20px 20px 20px 5px; padding: 25px; }
.relative-visual { padding: 25px 0; }
.relative-ratio { font-size: 62px; }
.canvas-wrap { max-width: 600px; margin: auto; }
dialog { border-radius: 18px; }
.cantonese-off .cantonese-help { display: none; }
@media (min-width: 1500px) { .progress-row { margin-top: 25px; } .lesson-route { margin-block: 26px; } }
@media (max-width: 760px) {
  header { height: 70px; padding: 0 20px; }
  .brand { font-size: 19px; gap: 8px; }
  #account-button { padding: 8px 10px; font-size: 12px; }
  .toolbar { padding: 10px 16px; flex-wrap: wrap; gap: 7px; }
  .toolbar button { font-size: 11px; padding: 7px 9px; gap: 5px; }
  .toolbar .toolbar-links { flex: 1; justify-content: flex-end; gap: 0; }
  .toolbar svg.icon { width: 18px; height: 18px; }
  .toolbar #cantonese-toggle { margin-left: auto; font-size: 12px; }
  #notes-button .icon { display: none; }
  .progress-row { margin-top: 12px; padding: 0 20px; font-size: 10px; gap: 10px; flex-wrap: wrap; }
  #chapter-label { font-size: 10px; flex: 1; }
  .course-progress { order: 3; flex-basis: 100%; }
  .presentation { padding: 0 20px; }
  .lesson-route { gap: 10px; margin: 20px 0; }
  .route-dash { width: 20px; }
  .route-item { gap: 6px; font-size: 11px; }
  .route-item .symbol { width: 32px; height: 32px; }
  .route-item .icon { width: 20px; height: 20px; }
  .narrative { text-align: left; }
  h1 { font-size: 32px; line-height: 1.2; letter-spacing: -.5px; margin-bottom: 14px; }
  .spoken { font-size: 15px; }
  .narrative > .cantonese-help { justify-content: flex-start; font-size: 14px; margin-top: 13px; }
  .scene { margin-top: 20px; }
  .plot-paper { padding: 13px 12px 12px; border-radius: 17px 17px 17px 4px; }
  .plot-top { font-size: 11px; gap: 8px; }
  .plot-title { gap: 5px; }
  .curve-note { font-size: 10px; gap: 4px; }
  .curve-note .icon { width: 16px; height: 16px; }
  .scene #plot > svg, .scene #plot > svg.single-curve { height: auto; max-height: none; min-height: 200px; }
  .scene #plot .single-curve text { font-size: 21px; }
  .scene #plot .single-curve .axis-label { font-size: 17px; }
  .scene #plot .single-curve .point-label { font-size: 17px; }
  .figure-caption { font-size: 11px; gap: 10px; flex-wrap: wrap; }
  .figure-caption > span { margin: 0; text-align: left; }
  .figure-caption .quantity { font-size: 11px; gap: 6px; }
  .figure-caption .quantity b { font-size: 18px; }
  .figure-caption .point-key { font-size: 10px; }
  .slider-row { grid-template-columns: minmax(0,1fr) 62px; gap: 6px 14px; }
  #scene-control .slider-name { grid-column: 1; font-size: 13px; }
  .slider-name small { font-size: 10px; }
  .price-value { grid-column: 2; grid-row: 1 / 3; align-self: center; font-size: 22px; }
  .slider-control { grid-column: 1; grid-row: 2; }
  .slider-ticks { font-size: 9px; }
  .helper-row { display: block; margin-top: 12px; }
  .scene-footnote { text-align: left; font-size: 9px; margin-top: 4px; max-width: none; }
  .scene-actions { padding: 16px 0; gap: 10px; flex-wrap: wrap; }
  .trial-scene .scene-back { display: none; }
  .trial-scene .transport #back { display: inline-flex; font-size: 11px; }
  #lesson-actions { width: 100%; gap: 10px; }
  #lesson-actions button { font-size: 12px; padding: 10px 12px; }
  #lesson-actions .hint { flex: 1; }
  #lesson-actions .primary { min-width: 0; flex: 1.5; font-size: 13px; }
  footer { padding: 8px 20px calc(20px + env(safe-area-inset-bottom)); flex-wrap: wrap; align-items: flex-start; gap: 10px; }
  #account-status { max-width: none; text-align: left; font-size: 10px; }
  footer .transport { width: auto; margin-left: auto; gap: 16px; }
  footer .transport #next { min-width: 0; }
  .account-line { width: 100%; }
  .question, .written-question { padding: 18px 15px; }
  .question h2, .written-question h2 { font-size: 21px; }
  .practice-wrap { padding: 0 20px; }
  .practice-switch { flex-wrap: wrap; }
  .comparison { grid-template-columns: 1fr; gap: 12px; }
}
@media (max-width: 360px) {
  header { padding: 0 16px; }
  .brand { font-size: 17px; }
  #account-button .icon { width: 18px; height: 18px; }
  .toolbar { padding: 10px; gap: 4px; }
  .toolbar button { padding: 7px 5px; font-size: 10px; }
  .presentation, .progress-row { padding-inline: 16px; }
  h1 { font-size: 29px; }
  .route-dash { width: 12px; }
  .lesson-route { gap: 7px; }
  .curve-note .icon { display: none; }
  #lesson-actions { gap: 7px; }
  #lesson-actions button { padding: 10px 8px; }
}
@media print {
  .progress-row, .lesson-route, .scene-actions, .helper-row, footer { display: none; }
  .presentation { padding: 0; }
  .scene { break-inside: avoid; }
}

.slider-ticks .endpoint-target { color: var(--amber); font-weight: 600; }
