:root {
  --ink: #19283c;
  --muted: #647083;
  --blue: #245bd7;
  --blue-soft: #f0f4ff;
  --line: #e4e7ed;
  --paper: #fff;
  --background: #fafbfD;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  color: var(--ink);
  background: var(--background);
  font-synthesis: none;
}
* { box-sizing: border-box; }
body { margin: 0; line-height: 1.6; }
a { color: var(--blue); text-underline-offset: 3px; }
button, input { font: inherit; }
button, a, summary, input { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
a, button, input, summary { touch-action: manipulation; }
:focus-visible { outline: 3px solid #739cf6; outline-offset: 4px; }
[hidden] { display: none !important; }
::selection { background: #dce7ff; }
.skip-link { position: fixed; top: -80px; left: 16px; padding: 10px 18px; background: white; z-index: 10; }
.skip-link:focus { top: 10px; }
.site-header { height: 76px; border-bottom: 1px solid var(--line); background: var(--paper); }
.header-inner { max-width: 940px; height: 100%; margin: auto; padding: 0 32px; display: flex; align-items: center; justify-content: space-between; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-size: 15px; font-weight: 750; letter-spacing: .08em; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; background: var(--blue); color: white; }
.brand-mark svg { width: 23px; height: 23px; stroke: currentColor; stroke-width: 1.5; stroke-linejoin: round; }
.header-caption { color: var(--muted); font-size: 13px; }
main { max-width: 940px; min-height: calc(100vh - 180px); padding: 48px 32px 24px; margin: auto; outline: none; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 12px; font-size: clamp(28px, 4vw, 38px); line-height: 1.18; font-weight: 700; letter-spacing: -.035em; }
h1[tabindex="-1"]:focus { outline: none; }
h2 { font-size: 19px; line-height: 1.35; letter-spacing: -.015em; font-weight: 650; }
.page-heading > p { color: var(--muted); margin-bottom: 28px; font-size: 15px; }
.course-progress { display: flex; align-items: center; justify-content: space-between; gap: 24px; color: var(--muted); font-size: 13px; margin-bottom: 18px; }
progress { width: 140px; height: 6px; border: none; border-radius: 6px; overflow: hidden; background: #e5eaf3; accent-color: var(--blue); }
progress::-webkit-progress-bar { background: #e5eaf3; border-radius: 6px; }
progress::-webkit-progress-value { background: var(--blue); border-radius: 6px; }
progress::-moz-progress-bar { background: var(--blue); border-radius: 6px; }
.continue-card { padding: 27px 30px; border: 1px solid #d5e1fc; border-radius: 14px; background: var(--blue-soft); display: flex; gap: 32px; align-items: center; justify-content: space-between; margin-bottom: 32px; }
.kicker { display: block; color: #5373aa; font-size: 11px; font-weight: 700; letter-spacing: .08em; line-height: 1.6; margin-bottom: 9px; text-transform: uppercase; }
.continue-card h2 { margin-bottom: 8px; font-size: 23px; }
.continue-card p { max-width: 510px; color: #52647e; margin-bottom: 0; font-size: 14px; line-height: 1.6; }
.primary-button { display: inline-flex; justify-content: center; align-items: center; gap: 20px; min-height: 46px; flex-shrink: 0; padding: 11px 19px; border: 1px solid var(--blue); border-radius: 8px; background: var(--blue); color: white; font-size: 14px; font-weight: 650; line-height: 1.5; text-decoration: none; }
.primary-button:hover { background: #1749b8; border-color: #1749b8; }
.primary-button span { font-size: 18px; }
.course-outline { border-top: 1px solid var(--line); }
.stage { border-bottom: 1px solid var(--line); }
.stage > summary { display: flex; align-items: center; gap: 17px; padding: 24px 0; cursor: pointer; list-style: none; }
summary::-webkit-details-marker { display: none; }
.stage-number { color: #7a879a; font-size: 12px; font-weight: 600; }
.stage h2 { margin: 0; flex: 1; }
.stage-count { color: #7a879a; font-size: 12px; }
.chevron { width: 20px; text-align: center; font-size: 20px; color: #8993a3; transform: rotate(-90deg); }
.stage[open] .chevron { transform: none; }
.topic-list { padding: 0 0 20px 0; margin: 0; list-style: none; display: grid; gap: 4px; }
.topic-row { display: flex; align-items: center; gap: 15px; min-height: 64px; padding: 11px 16px; border: 1px solid transparent; border-radius: 9px; color: var(--ink); text-decoration: none; }
.topic-row:hover { background: #f0f2f7; }
.topic-row.is-next { border-color: #cdddff; background: white; box-shadow: 0 2px 6px #1b356607; }
.topic-marker { display: grid; place-items: center; width: 32px; height: 32px; border: 1px solid #e0e5ed; border-radius: 50%; color: #738298; font-size: 11px; background: white; flex-shrink: 0; }
.is-next .topic-marker { color: var(--blue); border-color: #b7ccff; background: var(--blue-soft); }
.is-done .topic-marker { color: #17765a; border-color: #bfe6d7; background: #e9f7f0; font-weight: bold; font-size: 14px; }
.topic-title { font-size: 15px; font-weight: 550; flex: 1; }
.topic-status { color: #7a879a; font-size: 12px; white-space: nowrap; }
.is-done .topic-status { color: #17765a; }
.row-arrow { margin-left: 8px; color: #9aa5b5; }
.lesson-page { max-width: 790px; }
.back-link { display: inline-flex; align-items: center; gap: 9px; color: #596a82; text-decoration: none; font-size: 14px; min-height: 36px; margin-bottom: 26px; }
.back-link:hover { color: var(--blue); }
.lesson-heading .kicker { margin-bottom: 12px; }
.lesson-heading > p { color: #596a82; font-size: 16px; margin-bottom: 22px; }
.prerequisite { padding-left: 14px; border-left: 2px solid #dae1ee; color: #647083; font-size: 13px; line-height: 1.65; margin: 0 0 32px; }
.prerequisite strong { color: #526278; font-weight: 600; }
.lesson-section { margin: 30px 0; }
.lesson-section h2 { margin-bottom: 15px; }
.materials { display: grid; gap: 9px; }
.material { display: flex; align-items: center; gap: 16px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 9px; text-decoration: none; background: white; color: var(--ink); }
.material:hover { border-color: #b8cdfb; box-shadow: 0 2px 8px #14305a08; }
.material-icon { color: var(--blue); font-size: 22px; width: 24px; flex-shrink: 0; }
.material > span:nth-child(2) { flex: 1; min-width: 0; }
.material strong { display: block; font-size: 14px; font-weight: 600; }
.material small { display: block; color: #718097; line-height: 1.5; font-size: 12px; margin-top: 4px; }
.material-arrow { font-size: 17px; color: #8c9ab0; }
.lesson-note { font-size: 12px; color: #7c6846; padding-left: 14px; border-left: 2px solid #e9d8ba; line-height: 1.65; }
.lesson-note p { margin: 0 0 6px; }
.section-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 20px; margin-bottom: 7px; }
.section-heading h2 { margin-bottom: 0; }
#task-count { color: #758298; font-size: 12px; }
.tasks { margin-top: 8px; }
.task { display: flex; align-items: flex-start; gap: 14px; min-height: 56px; padding: 16px 4px; cursor: pointer; border-bottom: 1px solid var(--line); color: #394b64; line-height: 1.65; font-size: 14px; }
.task input { margin: 3px 0 0; width: 19px; height: 19px; flex-shrink: 0; accent-color: var(--blue); cursor: pointer; }
.task.is-checked { color: #7a8799; }
.task.is-checked span { text-decoration: line-through; text-decoration-color: #b4bdca; }
.understanding { padding: 19px 21px; border-radius: 9px; background: #f0f3f8; margin: 30px 0; }
.understanding h2 { font-size: 13px; margin-bottom: 8px; color: #45618a; }
.understanding p { font-size: 14px; color: #53657f; margin: 0; }
.lesson-nav { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin: 30px 0; }
.previous-topic { color: #64738b; font-size: 13px; text-decoration: none; }
.topic-reference { border-top: 1px solid var(--line); padding: 20px 0 0; font-size: 12px; color: var(--muted); }
.topic-reference summary { cursor: pointer; list-style: none; width: fit-content; padding: 4px 0; }
.topic-reference summary::before { content: '+ '; color: #7f8ca1; }
.topic-reference[open] summary::before { content: '− '; }
.topic-reference p { margin: 12px 0 5px; }
.site-footer { max-width: 940px; margin: 0 auto; padding: 30px 32px; display: flex; justify-content: space-between; gap: 20px; font-size: 11px; color: #7a879a; }
.site-footer a { color: #64738b; text-decoration: none; }
.site-footer a:hover { color: var(--blue); text-decoration: underline; }
.storage-warning { max-width: 876px; margin: 12px auto; padding: 12px 18px; border: 1px solid #e8d5b5; border-radius: 8px; font-size: 13px; color: #7c5a2e; background: #fff8e9; }
.loading { padding: 36px 0; color: var(--muted); font-size: 14px; }
.error-page { padding: 32px 0; }
.error-page p { color: var(--muted); }
.document-page { max-width: 940px; }
.prose { overflow-wrap: anywhere; font-size: 15px; line-height: 1.85; }
.prose h1 { margin: 15px 0 25px; }
.prose h2 { margin: 38px 0 14px; font-size: 23px; }
.prose h3 { margin: 27px 0 10px; font-size: 18px; }
.prose li { margin: 5px 0; }
.prose code { font-size: .85em; background: #edf0f5; padding: 2px 5px; border-radius: 4px; overflow-wrap: anywhere; }
.prose pre { overflow-x: auto; padding: 18px; border-radius: 8px; background: #edf0f5; line-height: 1.6; }
.prose pre code { padding: 0; background: none; }
.notation-source { margin: 18px 0 24px; }
.notation-source > summary { width: fit-content; cursor: pointer; list-style: none; color: var(--muted); font-size: 13px; }
.notation-source > summary::before { content: '+ '; }
.notation-source[open] > summary::before { content: '− '; }
.prose blockquote { margin-left: 0; padding-left: 18px; border-left: 3px solid #cedaef; color: #64738b; }
.prose a:not([href]) { color: #8d6c40; cursor: not-allowed; border-bottom: 1px dotted currentColor; }
.table-wrap { overflow-x: auto; margin: 22px 0; border: 1px solid var(--line); border-radius: 8px; }
.prose table { width: 100%; border-collapse: collapse; text-align: left; font-size: 13px; }
.prose th, .prose td { padding: 10px 13px; border-bottom: 1px solid var(--line); vertical-align: top; min-width: 100px; }
.prose th { background: #eff3f9; font-weight: 600; }
.document-warning { padding: 10px 14px; background: #fff8e9; font-size: 12px; border-radius: 6px; color: #7d6239; }
.reference-search { display: grid; gap: 8px; font-size: 13px; font-weight: 600; }
.reference-search input { min-height: 46px; width: 100%; border: 1px solid #d2dae7; border-radius: 7px; padding: 10px 12px; font-size: 14px; color: var(--ink); background: white; }
.reference-documents { margin: 24px 0; list-style: none; padding: 0; }
.reference-documents a { display: flex; align-items: baseline; gap: 20px; justify-content: space-between; padding: 15px 2px; color: #3d5475; border-bottom: 1px solid var(--line); text-decoration: none; font-size: 14px; }
.reference-documents a:hover { color: var(--blue); }
.reference-documents span { color: #8c9ab0; }
.no-results { font-size: 14px; color: var(--muted); padding: 16px 0; }
@media (max-width: 650px) {
  .site-header { height: 64px; }
  .header-inner { padding: 0 20px; }
  .header-caption { font-size: 11px; }
  main { padding: 32px 20px 16px; }
  .page-heading > p { margin-bottom: 23px; font-size: 14px; }
  .continue-card { flex-direction: column; align-items: stretch; gap: 21px; padding: 23px; margin-bottom: 24px; }
  .continue-card h2 { font-size: 22px; }
  .continue-card .primary-button { justify-content: space-between; }
  .stage > summary { gap: 12px; padding: 22px 0; }
  .stage h2 { font-size: 17px; }
  .topic-row { padding: 12px 4px; gap: 11px; }
  .topic-title { font-size: 14px; }
  .topic-status { font-size: 11px; }
  .row-arrow { display: none; }
  .topic-row.is-next { padding-left: 10px; padding-right: 10px; }
  .lesson-heading > p { font-size: 15px; }
  .material { padding: 14px; gap: 11px; }
  .material small { font-size: 12px; }
  .task { font-size: 14px; }
  .lesson-nav { gap: 10px; }
  .lesson-nav .primary-button { gap: 14px; }
  .site-footer { padding: 26px 20px; font-size: 10px; gap: 15px; }
  .storage-warning { margin: 10px 20px; }
  .prose { font-size: 14px; }
  .prose h1 { font-size: 28px; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }
