:root {
  --ink: #10283f;
  --muted: #5e7183;
  --paper: #f8f5ee;
  --white: #fffdf9;
  --line: #dbe3e8;
  --blue: #0879b9;
  --orange: #f26722;
  --green: #16a864;
  --red: #d94645;
  --shadow: 0 22px 60px rgba(16, 40, 63, .12);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  overflow-x: hidden;
  background: var(--paper);
  color: var(--ink);
  font-family: "Manrope", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }

.app-header {
  min-height: 82px;
  padding: 12px clamp(20px, 4vw, 64px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background: rgba(255, 253, 249, .94);
  border-bottom: 1px solid rgba(16, 40, 63, .1);
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(16px);
}
.brand {
  display: flex;
  align-items: center;
  gap: 16px;
  color: var(--ink);
  text-decoration: none;
}
.brand img { width: 72px; height: 48px; object-fit: contain; }
.brand span { display: flex; flex-direction: column; gap: 2px; }
.brand strong { font-size: 17px; letter-spacing: -.02em; }
.brand small { color: var(--muted); font-size: 12px; }
.header-actions { display: flex; align-items: center; gap: 18px; }
.free-badge, .mode-pill {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 6px 13px;
  border-radius: 999px;
  background: #e8f7ef;
  color: #087b47;
  font-size: 12px;
  font-weight: 800;
}
.text-button {
  border: 0;
  background: transparent;
  color: var(--blue);
  font-weight: 800;
  cursor: pointer;
  padding: 8px;
}

main { min-height: calc(100vh - 170px); }
.course-hero {
  max-width: 1280px;
  margin: 0 auto;
  min-height: calc(100vh - 82px);
  padding: clamp(54px, 8vh, 110px) clamp(24px, 5vw, 74px);
  display: grid;
  grid-template-columns: 1fr minmax(420px, .9fr);
  align-items: center;
  gap: clamp(42px, 7vw, 100px);
}
.hero-copy { max-width: 650px; }
.hero-copy, .hero-visual { min-width: 0; }
.eyebrow, .narration-kicker, .question-type, .next-label {
  color: var(--orange);
  font-size: 12px;
  line-height: 1.4;
  font-weight: 800;
  letter-spacing: .13em;
}
h1, h2, h3, p { margin-top: 0; }
.hero-copy h1 {
  margin: 14px 0 22px;
  font-size: clamp(42px, 5.2vw, 72px);
  line-height: 1.02;
  letter-spacing: -.055em;
}
.hero-copy > p {
  max-width: 620px;
  margin-bottom: 28px;
  color: var(--muted);
  font-size: clamp(17px, 1.5vw, 20px);
  line-height: 1.7;
}
.lesson-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 28px;
}
.lesson-facts span {
  padding: 10px 13px;
  border-radius: 10px;
  background: rgba(8, 121, 185, .08);
  color: var(--muted);
  font-size: 13px;
}
.lesson-facts b { color: var(--ink); }
.primary-button, .secondary-button {
  min-height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 12px 22px;
  border-radius: 12px;
  border: 1px solid transparent;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.primary-button {
  background: var(--orange);
  color: white;
  box-shadow: 0 10px 24px rgba(242, 103, 34, .24);
}
.primary-button:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(242, 103, 34, .3); }
.primary-button:disabled { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }
.secondary-button { border-color: #bfd0dc; background: white; color: var(--ink); }
.full { width: 100%; }
.hero-copy > small { display: block; margin-top: 13px; color: var(--muted); }
.hero-visual {
  width: 100%;
  filter: drop-shadow(0 24px 38px rgba(16, 40, 63, .14));
  transform: rotate(-1.2deg);
}
.hero-visual svg { display: block; width: 100%; height: auto; }

.curriculum-section {
  max-width: 1280px;
  margin: 0 auto 80px;
  padding: 0 clamp(24px, 5vw, 74px);
}
.curriculum-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 230px;
  align-items: end;
  gap: 50px;
  padding-top: 18px;
  border-top: 1px solid rgba(16, 40, 63, .13);
}
.curriculum-heading h2 {
  max-width: 780px;
  margin: 10px 0 14px;
  font-size: clamp(30px, 4vw, 52px);
  line-height: 1.08;
  letter-spacing: -.045em;
}
.curriculum-heading p { max-width: 820px; margin: 0; color: var(--muted); line-height: 1.7; }
.beta-summary {
  padding: 20px;
  border-radius: 18px;
  background: var(--ink);
  color: white;
}
.beta-summary strong { display: block; color: #ffad7c; font-size: 45px; line-height: 1; }
.beta-summary span, .beta-summary small { display: block; }
.beta-summary span { margin-top: 6px; font-size: 13px; font-weight: 800; }
.beta-summary small { margin-top: 9px; color: #c5d3dd; font-size: 10px; line-height: 1.5; }
.module-grid {
  margin-top: 26px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.module-card {
  min-height: 190px;
  padding: 22px;
  position: relative;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 253, 249, .88);
}
.module-card.current { border-color: rgba(22, 168, 100, .5); background: #f1fbf6; }
.module-number { color: var(--blue); font-size: 12px; font-weight: 800; letter-spacing: .1em; }
.module-status {
  float: right;
  padding: 5px 8px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.module-status.live { background: #dff6ea; color: #087b47; }
.module-status.planned { background: #eaf0f4; color: var(--muted); }
.module-card h3 { margin: 25px 0 7px; font-size: 18px; letter-spacing: -.02em; }
.module-card p { min-height: 54px; margin-bottom: 13px; color: var(--muted); font-size: 12px; line-height: 1.55; }
.module-card > small { color: var(--ink); font-size: 10px; font-weight: 800; }
.beta-note {
  margin-top: 14px;
  padding: 18px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border: 1px solid #bfd0dc;
  border-radius: 16px;
  background: #eef7fb;
}
.beta-note div { display: flex; flex-direction: column; gap: 4px; }
.beta-note strong { font-size: 13px; }
.beta-note span { color: var(--muted); font-size: 12px; line-height: 1.5; }
.beta-note .secondary-button { flex: 0 0 auto; }

.lesson-shell { padding-bottom: 80px; }
.lesson-steps {
  max-width: 1320px;
  margin: 22px auto 34px;
  padding: 0 24px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
}
.lesson-steps button {
  position: relative;
  min-height: 82px;
  padding: 12px 14px 12px 52px;
  border: 0;
  border-bottom: 3px solid var(--line);
  background: transparent;
  text-align: left;
  cursor: pointer;
}
.lesson-steps button:disabled { cursor: default; opacity: .46; }
.lesson-steps span {
  position: absolute;
  left: 12px;
  top: 15px;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #e7edf1;
  font-size: 12px;
  font-weight: 800;
}
.lesson-steps b, .lesson-steps small { display: block; }
.lesson-steps b { font-size: 13px; }
.lesson-steps small { margin-top: 3px; color: var(--muted); font-size: 11px; }
.lesson-steps button.active { border-bottom-color: var(--orange); }
.lesson-steps button.active span { background: var(--orange); color: white; }
.lesson-steps button.completed { border-bottom-color: var(--green); }
.lesson-steps button.completed span { background: var(--green); color: white; }

.lesson-panel {
  max-width: 1320px;
  margin: 0 auto;
  padding: 28px;
  background: var(--white);
  border: 1px solid rgba(16, 40, 63, .1);
  border-radius: 24px;
  box-shadow: var(--shadow);
}
.panel-heading {
  margin-bottom: 24px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}
.panel-heading h2 { margin: 7px 0 7px; font-size: clamp(25px, 3vw, 38px); letter-spacing: -.035em; }
.panel-heading p { margin-bottom: 0; color: var(--muted); }
.playback-actions { display: flex; align-items: flex-end; gap: 10px; }
.playback-actions label { color: var(--muted); font-size: 11px; font-weight: 800; }
.playback-actions select {
  display: block;
  min-height: 46px;
  margin-top: 4px;
  padding: 0 34px 0 12px;
  border: 1px solid #bfd0dc;
  border-radius: 10px;
  background: white;
  color: var(--ink);
}
.explanation-layout { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 22px; }
.animation-card, .narration-card, .quiz-card, .feedback-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: white;
}
.animation-card { overflow: hidden; }
.animation-topline, .drawing-status, .drawing-footer {
  min-height: 48px;
  padding: 10px 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: #f4f8fa;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}
#lesson-animation { display: block; width: 100%; height: min(55vh, 520px); }
.technical-line { stroke: var(--ink); stroke-width: 4; }
.point { fill: var(--ink); }
.point.accent { fill: var(--orange); }
.point-label, .board-point text { fill: var(--ink); font: 800 22px Manrope, sans-serif; }
.construction-mark { stroke: var(--blue); stroke-width: 3; }
.construction-circle {
  fill: none;
  stroke: var(--orange);
  stroke-width: 4;
  stroke-dasharray: 8 8;
}
.construction-circle.blue { stroke: var(--blue); }
.result-line { stroke: var(--ink); stroke-width: 6; }
.right-angle { fill: none; stroke: var(--green); stroke-width: 4; }
.angle-label { fill: var(--green); font: 800 20px Manrope, sans-serif; }
#anim-centers, #anim-circle-left, #anim-circle-right, #anim-intersection, #anim-result {
  opacity: 0;
  transition: opacity .6s ease;
}
#lesson-animation .visible { opacity: 1; }
.timeline { height: 6px; background: #e8eef2; }
.timeline span { display: block; width: 0; height: 100%; background: var(--orange); transition: width .3s linear; }
.narration-card {
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.narration-card > p { min-height: 112px; margin: 14px 0 20px; color: var(--ink); font-size: 16px; line-height: 1.7; }
.why-box {
  width: 100%;
  margin-bottom: 22px;
  padding: 15px;
  border-left: 4px solid var(--blue);
  border-radius: 8px;
  background: #edf7fc;
}
.why-box strong { font-size: 12px; }
.why-box p { margin: 5px 0 0; color: var(--muted); font-size: 12px; line-height: 1.55; }
.narration-card .secondary-button { margin-top: 10px; }

.practice-layout { display: grid; grid-template-columns: 180px minmax(0, 1fr) 240px; gap: 16px; }
.toolbox {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px;
  border-radius: 16px;
  background: #f3f7f9;
}
.toolbox > strong { margin: 4px 6px 8px; font-size: 13px; }
.tool, .quiet-tool {
  width: 100%;
  border: 1px solid transparent;
  border-radius: 11px;
  background: transparent;
  cursor: pointer;
  text-align: left;
}
.tool { min-height: 58px; padding: 8px; display: flex; align-items: center; gap: 9px; }
.tool:hover, .tool.active { background: white; border-color: #bfd4e1; }
.tool-icon {
  width: 34px; height: 34px; display: grid; place-items: center;
  border-radius: 8px; background: #e4edf2; color: var(--blue); font-size: 20px; font-weight: 800;
}
.tool b, .tool small { display: block; }
.tool b { font-size: 12px; }
.tool small { margin-top: 2px; color: var(--muted); font-size: 9px; }
.toolbox-divider { height: 1px; margin: 7px 0; background: var(--line); }
.quiet-tool { padding: 8px; color: var(--muted); font-size: 11px; font-weight: 700; text-align: center; }
.quiet-tool:hover { color: var(--ink); background: rgba(255,255,255,.7); }
.drawing-workspace { overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: white; }
.drawing-status { min-height: 56px; line-height: 1.45; }
#drawing-instruction { color: var(--ink); }
#coordinate-readout { flex: 0 0 auto; font-variant-numeric: tabular-nums; }
#draw-board { display: block; width: 100%; height: min(56vh, 520px); touch-action: none; cursor: crosshair; }
.board-point { fill: var(--ink); }
#board-user circle { fill: none; stroke: var(--blue); stroke-width: 3.5; stroke-dasharray: 8 6; }
#board-user line { stroke: var(--ink); stroke-width: 5; stroke-linecap: round; }
#board-preview circle, #board-preview line { fill: none; stroke: var(--orange); stroke-width: 3; stroke-dasharray: 7 7; }
#board-ghost circle, #board-ghost line { fill: none; stroke: #8fb7cb; stroke-width: 3; stroke-dasharray: 5 9; opacity: .38; }
.drawing-footer { border-top: 1px solid var(--line); border-bottom: 0; background: white; justify-content: flex-start; }
.drawing-footer > span { white-space: nowrap; font-size: 10px; }
.drawing-footer .primary-button { min-height: 42px; margin-left: auto; padding: 8px 16px; font-size: 12px; }
.legend { display: inline-block; width: 16px; height: 3px; margin-right: 5px; vertical-align: middle; }
.legend.given { background: var(--ink); }
.legend.construction { border-top: 3px dashed var(--blue); }
.legend.result { background: var(--green); }
.feedback-card { align-self: start; padding: 18px; }
.feedback-icon {
  width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%;
  background: #e7f3f9; color: var(--blue); font-weight: 800;
}
.feedback-card h3 { margin: 13px 0 6px; font-size: 16px; }
.feedback-card > p { color: var(--muted); font-size: 12px; line-height: 1.55; }
.feedback-card ul { margin: 16px 0 0; padding: 0; list-style: none; }
.feedback-card li {
  position: relative;
  padding: 9px 0 9px 24px;
  border-top: 1px solid #eef2f4;
  color: var(--muted);
  font-size: 11px;
}
.feedback-card li::before {
  content: "○"; position: absolute; left: 2px; top: 8px; color: #99a9b5; font-weight: 800;
}
.feedback-card li.pass { color: #087b47; }
.feedback-card li.pass::before { content: "✓"; color: var(--green); }
.feedback-card li.fail { color: var(--red); }
.feedback-card.success { border-color: rgba(22, 168, 100, .45); background: #f2fbf6; }
.feedback-card.error { border-color: rgba(217, 70, 69, .35); background: #fff7f7; }

.quiz-panel { max-width: 920px; }
.quiz-counter {
  min-width: 72px;
  padding: 10px 14px;
  border-radius: 999px;
  background: #eef5f8;
  text-align: center;
  font-size: 13px;
  font-weight: 800;
}
.quiz-card { padding: clamp(24px, 5vw, 52px); }
.quiz-card h3 { margin: 13px 0 25px; font-size: clamp(21px, 3vw, 29px); line-height: 1.35; }
.answers { display: grid; gap: 10px; }
.answer {
  min-height: 58px;
  padding: 13px 16px;
  display: flex;
  align-items: center;
  gap: 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: white;
  cursor: pointer;
  text-align: left;
}
.answer:hover, .answer.selected { border-color: var(--blue); background: #f3f9fc; }
.answer .letter {
  width: 30px; height: 30px; display: grid; place-items: center; flex: 0 0 auto;
  border-radius: 50%; background: #edf2f5; font-size: 11px; font-weight: 800;
}
.answer.correct { border-color: var(--green); background: #effaf4; }
.answer.wrong { border-color: var(--red); background: #fff3f3; }
.quiz-feedback { min-height: 44px; padding: 12px 0 0; color: var(--muted); font-size: 13px; }
.quiz-card > .primary-button { float: right; }

.result-panel { padding: clamp(28px, 5vw, 60px); }
.result-summary {
  max-width: 880px;
  margin: 0 auto 48px;
  display: grid;
  grid-template-columns: 170px 1fr;
  align-items: center;
  gap: 38px;
}
.score-ring {
  width: 166px; height: 166px; display: grid; place-content: center; border-radius: 50%;
  background: conic-gradient(var(--green) var(--score, 0%), #e7eef1 0);
  position: relative; text-align: center;
}
.score-ring::before { content: ""; position: absolute; inset: 13px; border-radius: 50%; background: var(--white); }
.score-ring strong, .score-ring span { position: relative; z-index: 1; display: block; }
.score-ring strong { font-size: 34px; }
.score-ring span { color: var(--muted); font-size: 11px; }
.result-summary h2 { margin: 8px 0; font-size: clamp(26px, 4vw, 42px); letter-spacing: -.04em; }
.result-summary p { color: var(--muted); }
.achievement-list { display: flex; flex-wrap: wrap; gap: 8px; }
.achievement-list span { padding: 7px 9px; border-radius: 8px; background: #eaf8f1; color: #087b47; font-size: 11px; font-weight: 700; }
.next-card {
  max-width: 1040px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 330px;
  overflow: hidden;
  border-radius: 24px;
  background: var(--ink);
  color: white;
  box-shadow: 0 24px 60px rgba(16, 40, 63, .25);
}
.next-copy { padding: clamp(28px, 5vw, 54px); }
.next-label { color: #ffad7c; }
.next-copy h2 { margin: 10px 0; font-size: clamp(29px, 4vw, 45px); letter-spacing: -.04em; }
.next-copy p { color: #c5d3dd; line-height: 1.65; }
.next-copy ul { columns: 2; margin: 25px 0 0; padding-left: 20px; color: #e0e9ee; font-size: 13px; line-height: 2; }
.beta-actions {
  margin: 14px;
  padding: 28px;
  border-radius: 18px;
  background: white;
  color: var(--ink);
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
}
.beta-actions > span { color: var(--muted); font-size: 12px; }
.beta-actions > strong { margin: 6px 0; }
.beta-actions > strong b { color: #087b47; font-size: 30px; letter-spacing: -.04em; }
.beta-actions > strong small { color: var(--muted); font-size: 12px; }
.beta-actions p, .beta-actions > small { color: var(--muted); font-size: 10px; line-height: 1.55; }
.beta-actions .secondary-button { margin-top: 9px; }
.beta-actions .text-button { margin: 8px auto; }

.progress-modal { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 20px; }
.progress-modal[hidden] { display: none; }
.modal-backdrop { position: absolute; inset: 0; border: 0; background: rgba(16, 40, 63, .6); backdrop-filter: blur(5px); }
.progress-modal section {
  position: relative;
  z-index: 1;
  width: min(440px, 100%);
  padding: 30px;
  border-radius: 20px;
  background: var(--white);
  box-shadow: var(--shadow);
}
.modal-close {
  position: absolute; right: 14px; top: 12px; border: 0; background: transparent;
  font-size: 30px; color: var(--muted); cursor: pointer;
}
.progress-modal h2 { margin: 8px 0 18px; }
.progress-bar { height: 10px; overflow: hidden; border-radius: 999px; background: #e6edf1; }
.progress-bar span { display: block; width: 0; height: 100%; background: var(--green); }
.progress-modal p { margin: 12px 0 20px; color: var(--muted); font-size: 13px; }

footer {
  min-height: 100px;
  padding: 24px clamp(24px, 5vw, 70px);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
  border-top: 1px solid rgba(16, 40, 63, .1);
  color: var(--muted);
  font-size: 12px;
}
footer img { width: 65px; height: 42px; object-fit: contain; }
footer p { margin: 0; }
footer a { color: var(--blue); font-weight: 700; }

@media (max-width: 1040px) {
  .course-hero { grid-template-columns: 1fr 390px; }
  .module-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .practice-layout { grid-template-columns: 150px 1fr; }
  .feedback-card { grid-column: 1 / -1; }
  .feedback-card ul { display: grid; grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 780px) {
  .app-header { min-height: 70px; }
  .brand img { width: 58px; }
  .brand small, .free-badge { display: none; }
  .course-hero {
    width: 100%;
    min-height: auto;
    display: flex;
    flex-direction: column;
    padding-top: 55px;
  }
  .hero-copy, .hero-visual { width: 100%; max-width: 100%; }
  .hero-copy { order: 2; }
  .hero-visual { order: 1; }
  .curriculum-section { padding-left: 18px; padding-right: 18px; }
  .curriculum-heading { grid-template-columns: 1fr; gap: 22px; }
  .beta-summary { max-width: 330px; }
  .module-grid { grid-template-columns: 1fr; }
  .module-card { min-height: 0; }
  .module-card p { min-height: 0; }
  .beta-note { align-items: flex-start; flex-direction: column; }
  .lesson-steps { overflow-x: auto; grid-template-columns: repeat(5, 150px); padding-bottom: 6px; }
  .lesson-panel { margin: 0 12px; padding: 18px; border-radius: 18px; }
  .panel-heading { align-items: flex-start; flex-direction: column; }
  .explanation-layout { grid-template-columns: 1fr; }
  .narration-card > p { min-height: auto; }
  .practice-layout { grid-template-columns: 1fr; }
  .toolbox { flex-direction: row; flex-wrap: wrap; }
  .toolbox > strong { width: 100%; }
  .tool { width: auto; flex: 1 1 120px; }
  .toolbox-divider { display: none; }
  .quiet-tool { width: auto; flex: 1; }
  #draw-board, #lesson-animation { height: auto; min-height: 310px; }
  .feedback-card ul { grid-template-columns: 1fr 1fr; }
  .drawing-footer { flex-wrap: wrap; }
  .drawing-footer .primary-button { width: 100%; margin-left: 0; }
  .result-summary { grid-template-columns: 1fr; text-align: center; }
  .score-ring { margin: 0 auto; }
  .achievement-list { justify-content: center; }
  .next-card { grid-template-columns: 1fr; }
  .next-copy ul { columns: 1; }
  footer { flex-direction: column; text-align: center; }
}

@media (max-width: 480px) {
  .app-header { padding: 9px 12px; gap: 8px; }
  .brand { gap: 8px; min-width: 0; }
  .brand img { width: 44px; height: 40px; }
  .brand span { min-width: 0; }
  .brand strong { font-size: 12px; white-space: nowrap; }
  .header-actions { flex: 0 0 auto; gap: 2px; }
  .header-actions .text-button { padding: 6px; font-size: 11px; }
  .course-hero { padding-left: 18px; padding-right: 18px; }
  .hero-copy h1 { max-width: 100%; font-size: clamp(31px, 9.2vw, 36px); line-height: 1.06; overflow-wrap: normal; }
  .hero-copy > p { font-size: 15px; }
  .lesson-facts { width: 100%; }
  .lesson-facts span { flex: 1 1 125px; text-align: center; }
  .playback-actions { width: 100%; }
  .playback-actions .secondary-button { flex: 1; }
  .feedback-card ul { grid-template-columns: 1fr; }
  .result-panel { padding: 22px 15px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

/* Konu tabanlı ders akışı */
.header-link { display: inline-flex; align-items: center; text-decoration: none; }
.topic-hero { min-height: calc(100vh - 82px); }
.common-language-hero svg { border: 1px solid rgba(16, 40, 63, .08); box-shadow: var(--shadow); }
.topic-shell { max-width: 1280px; margin: 0 auto; padding: 32px clamp(18px, 4vw, 56px) 90px; }
.topic-progress-nav {
  position: sticky; top: 82px; z-index: 12;
  display: grid; grid-template-columns: repeat(7, minmax(105px, 1fr));
  gap: 6px; padding: 10px; margin-bottom: 20px;
  border: 1px solid var(--line); border-radius: 18px;
  background: rgba(248, 245, 238, .94); backdrop-filter: blur(16px);
}
.topic-progress-nav button {
  min-width: 0; min-height: 58px; padding: 8px;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; border-radius: 12px; background: transparent; cursor: pointer;
}
.topic-progress-nav button:hover:not(:disabled) { background: white; }
.topic-progress-nav button:disabled { opacity: .42; cursor: default; }
.topic-progress-nav span {
  width: 25px; height: 25px; flex: 0 0 auto; display: grid; place-items: center;
  border-radius: 50%; background: #e3ebef; color: var(--muted); font-size: 10px; font-weight: 800;
}
.topic-progress-nav b { overflow: hidden; text-overflow: ellipsis; font-size: 11px; white-space: nowrap; }
.topic-progress-nav button.active { background: white; box-shadow: 0 6px 18px rgba(16, 40, 63, .08); }
.topic-progress-nav button.active span { background: var(--orange); color: white; }
.topic-progress-nav button.completed span { background: var(--green); color: white; }
.topic-panel {
  min-height: 650px; padding: clamp(28px, 5vw, 62px);
  border: 1px solid var(--line); border-radius: 26px; background: var(--white); box-shadow: var(--shadow);
}
.topic-panel-heading { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: clamp(28px, 5vw, 70px); align-items: start; }
.topic-panel-heading h2, .example-heading h2 { margin: 10px 0 18px; font-size: clamp(30px, 4vw, 50px); line-height: 1.08; letter-spacing: -.045em; }
.intro-copy p, .example-heading p { color: var(--muted); font-size: 16px; line-height: 1.75; }
.lesson-route-card { padding: 24px; border-radius: 18px; background: var(--ink); color: white; }
.lesson-route-card strong { display: block; margin-bottom: 12px; }
.lesson-route-card ol { margin: 0; padding-left: 20px; color: #d7e2e8; font-size: 13px; line-height: 1.75; }
.outcomes-card { margin: 32px 0 28px; padding: 24px; border-radius: 18px; background: #eef7fb; }
.outcomes-card > span, .reading-notes > span { color: var(--blue); font-size: 11px; font-weight: 800; letter-spacing: .12em; }
.outcomes-card > div { margin-top: 15px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.outcomes-card div span { display: flex; align-items: flex-start; gap: 9px; color: var(--ink); font-size: 13px; line-height: 1.55; }
.outcomes-card b { color: var(--green); }
.example-heading { display: grid; grid-template-columns: minmax(0, 1fr) 90px; gap: 30px; align-items: start; }
.example-heading p { max-width: 880px; margin-bottom: 0; }
.example-counter { padding: 14px; border-radius: 16px; background: var(--ink); color: white; text-align: center; }
.example-counter strong, .example-counter span { display: block; }
.example-counter strong { color: #ffad7c; font-size: 32px; line-height: 1; }
.example-counter span { margin-top: 5px; color: #c5d3dd; font-size: 9px; }
.figure-study-layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 18px; margin-top: 34px; }
.technical-figure { margin: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 20px; background: #fbfdfe; }
.figure-canvas svg { display: block; width: 100%; height: auto; max-height: 540px; }
.technical-figure figcaption { min-height: 58px; padding: 16px 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; line-height: 1.55; }
.reading-notes { padding: 24px; border-radius: 20px; background: #f2f7f9; }
.reading-notes ol { margin: 16px 0 0; padding-left: 23px; }
.reading-notes li { padding: 0 0 18px 6px; color: var(--muted); font-size: 13px; line-height: 1.65; }
.reading-notes li::marker { color: var(--orange); font-weight: 800; }
.figure-questions { margin-top: 28px; padding-top: 28px; border-top: 1px solid var(--line); }
.question-section-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 16px; }
.question-section-heading h3 { margin: 7px 0 0; font-size: clamp(22px, 3vw, 30px); letter-spacing: -.03em; }
.question-section-heading > strong { padding: 9px 13px; border-radius: 999px; background: #eaf3f7; font-size: 12px; }
.topic-question-card { padding: clamp(22px, 4vw, 38px); border: 1px solid var(--line); border-radius: 20px; background: #fff; }
.topic-question-card > h3 { margin: 12px 0 22px; font-size: clamp(20px, 2.5vw, 27px); line-height: 1.35; }
.answer-button {
  width: 100%; min-height: 58px; padding: 13px 16px;
  display: flex; align-items: center; gap: 13px;
  border: 1px solid var(--line); border-radius: 12px; background: white;
  cursor: pointer; text-align: left; transition: border-color .18s ease, background .18s ease;
}
.answer-button:hover:not(:disabled), .answer-button.selected { border-color: var(--blue); background: #f3f9fc; }
.answer-button > span { width: 30px; height: 30px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 50%; background: #edf2f5; font-size: 11px; font-weight: 800; }
.answer-button.correct { border-color: var(--green); background: #effaf4; }
.answer-button.correct > span { background: var(--green); color: white; }
.answer-button.wrong { border-color: var(--red); background: #fff3f3; }
.answer-button.wrong > span { background: var(--red); color: white; }
.answer-button:disabled { color: var(--ink); cursor: default; }
.quiz-feedback.visible { min-height: 0; margin-top: 15px; padding: 14px 16px; border-radius: 11px; line-height: 1.6; }
.quiz-feedback.success { background: #eaf8f1; color: #087b47; }
.quiz-feedback.error { background: #fff1f1; color: #a52c2c; }
.topic-question-card > .primary-button { margin-top: 18px; margin-left: auto; }
.topic-result-panel { padding: clamp(30px, 5vw, 62px); }
.section-score-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin: 0 auto 34px; max-width: 960px; }
.section-score-grid article { padding: 18px; border: 1px solid var(--line); border-radius: 15px; text-align: center; background: #fbfdfe; }
.section-score-grid span, .section-score-grid small { display: block; color: var(--muted); font-size: 10px; }
.section-score-grid strong { display: block; margin: 7px 0 4px; font-size: 25px; }
.result-actions { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 10px; }

@media (max-width: 900px) {
  .topic-progress-nav { top: 70px; overflow-x: auto; grid-template-columns: repeat(7, 118px); }
  .topic-panel-heading, .figure-study-layout { grid-template-columns: 1fr; }
  .lesson-route-card { max-width: 520px; }
  .outcomes-card > div { grid-template-columns: 1fr; }
  .reading-notes ol { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
  .reading-notes li { padding-bottom: 0; }
  .section-score-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 600px) {
  .header-link { display: none; }
  .topic-shell { padding: 12px 10px 60px; }
  .topic-progress-nav { margin: 0 2px 12px; border-radius: 14px; }
  .topic-panel { min-height: 0; padding: 22px 15px; border-radius: 18px; }
  .example-heading { grid-template-columns: 1fr; }
  .example-counter { width: 92px; }
  .figure-study-layout { margin-top: 22px; }
  .reading-notes ol { grid-template-columns: 1fr; }
  .question-section-heading { align-items: flex-start; }
  .question-section-heading > strong { flex: 0 0 auto; }
  .answer-button { align-items: flex-start; font-size: 13px; line-height: 1.5; }
  .section-score-grid { grid-template-columns: repeat(2, 1fr); }
  .result-actions { align-items: stretch; flex-direction: column; }
  .result-actions .primary-button, .result-actions .secondary-button { width: 100%; }
}
