@charset "UTF-8";

:root {
  --page: #f8f9fb;
  --surface: #fff;
  --ink: #263730;
  --muted: #6d7773;
  --line: #e4e8e6;
  --green: #326d54;
  --green-dark: #204c3a;
  --green-light: #eaf2e9;
  --accent: #cbebaa;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --sidebar: 250px;
  --header: 76px;
  color-scheme: light;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Kaku Gothic ProN", "Noto Sans JP", Meiryo, sans-serif;
  font-size: 14px;
  color: var(--ink);
  background: var(--page);
  -webkit-font-smoothing: antialiased;
}

* { box-sizing: border-box; }
body { margin: 0; }
button, input, select { font: inherit; }
button, a, input, select { -webkit-tap-highlight-color: transparent; }
button, a { touch-action: manipulation; }
button { color: inherit; cursor: pointer; }
button:disabled { cursor: default; opacity: .45; }
a { color: inherit; text-decoration: none; }
button { border: 0; background: none; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
:focus-visible { outline: 3px solid #3e8268; outline-offset: 4px; border-radius: 4px; }
button, a { transition: background .16s, color .16s, border-color .16s; }
[hidden] { display: none !important; }
h1, h2, h3, p { margin: 0; }
code, kbd { font-family: var(--mono); }
p code, li code, .inline-code { font-size: .87em; padding: .15em .35em; border-radius: 4px; background: #edf0ec; color: #446049; overflow-wrap: anywhere; }
::selection { background: #d9ebc6; color: #1c392c; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; top: -60px; left: 16px; z-index: 100; padding: 12px 20px; background: var(--green-dark); color: white; }
.skip-link:focus { top: 10px; }
.eyebrow { font: 10px/1.6 var(--mono); letter-spacing: .16em; font-weight: 600; color: var(--muted); }
.text-button { padding: 9px 0; font-size: 12px; color: #5d6862; }
.text-button:hover { color: var(--green); }
.text-button span { margin-left: 6px; }
.icon-button { width: 36px; height: 36px; display: inline-flex; justify-content: center; align-items: center; border-radius: 7px; flex-shrink: 0; }
.icon-button:hover { background: #e9eee9; }
.arrow { font-size: 19px; line-height: 1; }
.button { display: inline-flex; justify-content: center; align-items: center; gap: 18px; min-height: 46px; padding: 0 22px; border: 1px solid var(--green-dark); border-radius: 7px; font-size: 12px; font-weight: 600; background: var(--green-dark); color: #fff; }
.button:hover { background: #143d2b; }
.button.secondary { background: transparent; border-color: #d6ded8; color: var(--ink); }
.button.secondary:hover { background: var(--green-light); }
.button.small { min-height: 36px; padding: 0 14px; font-size: 11px; }

.header { height: var(--header); position: fixed; inset: 0 0 auto; z-index: 30; border-bottom: 1px solid var(--line); background: rgba(255, 255, 255, .97); display: flex; align-items: center; justify-content: space-between; padding: 0 36px 0 27px; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 11px; font-size: 18px; font-weight: 700; letter-spacing: -.7px; white-space: nowrap; }
.brand-light { color: #88908b; font-weight: 400; font-size: 16px; letter-spacing: -.5px; margin-left: 3px; }
.brand-mark { display: inline-flex; justify-content: center; align-items: center; width: 33px; height: 33px; background: #204c3a; border-radius: 9px; color: white; font-size: 26px; font-weight: 700; padding-bottom: 4px; letter-spacing: -3px; padding-right: 4px; }
.brand-mark span { color: var(--accent); }
.header-actions { display: flex; align-items: center; gap: 27px; }
.search-trigger { display: flex; align-items: center; gap: 10px; height: 34px; width: 227px; padding: 0 10px; border-radius: 6px; border: 1px solid #e5e8e5; background: #fafbfa; color: #7b857f; font-size: 11px; text-align: left; }
.search-trigger svg { width: 15px; height: 15px; }
.search-trigger kbd { font-size: 10px; margin-left: auto; border: 1px solid #e0e4e0; border-radius: 3px; padding: 1px 4px; }
.header-github { border-left: 1px solid var(--line); padding-left: 24px; display: flex; color: #66716a; }
.header-github:hover { color: var(--green-dark); }
.header-github svg { width: 19px; height: 19px; }
.menu-toggle { display: none; }

.sidebar { position: fixed; top: var(--header); bottom: 0; left: 0; width: var(--sidebar); display: flex; flex-direction: column; border-right: 1px solid var(--line); background: #fff; z-index: 25; padding: 29px 18px 20px; overflow-y: auto; }
.nav-section-label { font-size: 9px; font-weight: 600; color: #8b958e; letter-spacing: .12em; margin: 25px 14px 9px; }
.nav-section-label:first-of-type { margin-top: 27px; }
.nav-link { display: flex; align-items: center; gap: 11px; min-height: 40px; margin-bottom: 3px; padding: 9px 12px; border-radius: 5px; font-size: 11.5px; color: #6c7670; position: relative; }
.nav-link:hover { background: #f6f8f5; color: var(--green-dark); }
.nav-link[aria-current="page"] { color: #315a3d; background: #eef3e9; font-weight: 600; }
.nav-link svg { width: 15px; height: 15px; }
.nav-number { font: 10px var(--mono); color: #9aa29d; }
.nav-link[aria-current="page"] .nav-number { color: #6d8d57; }
.nav-complete { margin-left: auto; color: var(--green); font-size: 11px; }
.nav-link .nav-tag { margin-left: auto; font-size: 8px; padding: 2px 5px; background: #f3f1eb; color: #8b795a; border-radius: 3px; font-weight: 400; }
.sidebar-bottom { margin-top: auto; padding: 32px 13px 0; }
.progress-heading { display: flex; justify-content: space-between; font: 9px var(--mono); letter-spacing: .07em; color: #839087; }
.progress-heading span:last-child { color: #4d6a54; }
progress { width: 100%; height: 4px; border: 0; border-radius: 4px; overflow: hidden; appearance: none; display: block; margin: 12px 0; background: #edf0eb; accent-color: #6c965d; }
progress::-webkit-progress-bar { background: #edf0eb; }
progress::-webkit-progress-value { background: #6c965d; border-radius: 4px; }
progress::-moz-progress-bar { background: #6c965d; border-radius: 4px; }
.sidebar-bottom p { color: #91988f; font-size: 9px; }
.sidebar-bottom .exercise-progress { color: #526b47; font-size: 10px; line-height: 1.8; margin-top: 13px; }
.sidebar-note { display: flex; align-items: center; gap: 7px; border-top: 1px solid var(--line); margin-top: 23px; padding-top: 17px; color: #7b877d; font-size: 9px; }
.status-dot { width: 5px; height: 5px; border-radius: 50%; background: #7ca46b; flex-shrink: 0; }

main { margin-left: var(--sidebar); padding: calc(var(--header) + 30px) 48px 0; min-height: 100vh; outline: none; }
.page-wrap { max-width: 1110px; margin: 0 auto; }
.breadcrumb { display: flex; align-items: center; gap: 10px; font-size: 10px; color: #7d8981; margin-bottom: 28px; }
.breadcrumb svg { width: 13px; height: 13px; }
.breadcrumb .slash { color: #c2c9c1; }
.breadcrumb .current { color: #506154; }
.hero { position: relative; display: grid; grid-template-columns: 1.1fr 1fr; gap: 24px; padding: 25px 0 42px; align-items: center; }
.hero-copy { position: relative; z-index: 1; }
.edition-label { display: inline-flex; align-items: center; gap: 7px; padding: 5px 9px; font: 9px var(--mono); letter-spacing: .06em; border: 1px solid #dce4d6; border-radius: 4px; color: #678355; background: #f1f5ed; margin-bottom: 22px; }
.edition-label svg { width: 12px; height: 12px; }
.hero h1 { font-size: clamp(28px, 2.65vw, 42px); line-height: 1.65; letter-spacing: -.065em; font-weight: 750; white-space: nowrap; }
.hero h1 .hero-emphasis { color: #44733d; }
.hero-description { color: #65735f; font-size: 13px; line-height: 2.2; margin-top: 17px; }
.hero-actions { display: flex; align-items: center; gap: 20px; margin-top: 28px; }
.hero-actions .button { font-size: 11px; gap: 28px; }
.hero-actions .text-button { font-size: 10px; display: inline-flex; align-items: center; gap: 6px; }
.hero-actions svg { width: 14px; height: 14px; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 15px; margin-top: 21px; color: #8b938b; font-size: 9px; }
.hero-meta span { display: flex; align-items: center; gap: 5px; }
.hero-meta svg { height: 12px; width: 12px; }

.model-illustration { position: relative; padding: 26px 0 15px 7px; }
.model-illustration::before { content: ""; position: absolute; inset: -40px -15px -30px; z-index: -1; background-image: radial-gradient(#dbe2d7 .8px, transparent .8px); background-size: 17px 17px; mask-image: radial-gradient(ellipse at center, #000 25%, transparent 70%); }
.illustration-topline { display: flex; align-items: center; justify-content: space-between; color: #8f9e89; font: 8px var(--mono); letter-spacing: .08em; margin: 0 5px 18px; }
.illustration-topline span:first-child { display: flex; align-items: center; gap: 7px; }
.flow-input { display: flex; justify-content: center; align-items: center; gap: 7px; }
.flow-caption { color: #8c958c; font-size: 9px; margin-right: 6px; }
.token { padding: 8px 12px; font: 11px var(--mono); border: 1px solid #dbe3d6; background: #f4f7f0; border-radius: 5px; color: #5e7551; text-align: center; }
.token.ghost { background: transparent; border-style: dashed; color: #a2ac99; }
.flow-connector { height: 26px; width: 1px; background: #cad5c3; margin: 0 auto; position: relative; }
.flow-connector::after { content: ""; position: absolute; bottom: 0; left: -3px; width: 7px; height: 7px; border: solid #b5c4ad; border-width: 0 1px 1px 0; transform: rotate(45deg); }
.transformer-box { margin: 0 23px; padding: 18px 20px 15px; border: 1px solid #d5dfcd; border-radius: 8px; background: linear-gradient(125deg, #f0f5e8, #f8faf4); box-shadow: 0 5px 0 -2px #f7f9f2, 0 6px 0 -2px #dce4d6, 0 10px 0 -4px #f7f9f2, 0 11px 0 -4px #dce4d6; }
.transformer-heading { display: flex; align-items: center; justify-content: space-between; font: 10px var(--mono); color: #507240; }
.transformer-heading .layers { font-size: 8px; border: 1px solid #d5dfca; padding: 3px 5px; border-radius: 4px; }
.network { width: 100%; height: 74px; margin: 9px 0 5px; stroke: #c7d6b9; stroke-width: .7; }
.network circle { fill: #fcfdf9; stroke: #8bab71; stroke-width: 1.2; }
.network circle.middle { fill: #d7e7c3; }
.transformer-footer { border-top: 1px dashed #d3dfc8; padding-top: 9px; display: flex; justify-content: space-between; font: 8px var(--mono); color: #869b73; }
.prediction-card { background: white; border: 1px solid #e0e6da; border-radius: 6px; padding: 14px 15px 12px; margin: 3px 42px 0; box-shadow: 0 5px 20px #34431a04; }
.prediction-title { font: 8px var(--mono); color: #84907b; letter-spacing: .08em; display: flex; justify-content: space-between; margin-bottom: 10px; }
.prediction-title span:last-child { letter-spacing: 0; font: 8px -apple-system, sans-serif; }
.prediction-row { display: grid; grid-template-columns: 35px 1fr 28px; align-items: center; gap: 8px; margin: 7px 0; font-size: 9px; color: #87917f; }
.prediction-bar { background: #f0f3ed; height: 6px; border-radius: 3px; }
.prediction-bar span { display: block; height: 100%; border-radius: inherit; background: #bdd6a2; }
.prediction-row:first-of-type { color: #466d35; }
.prediction-row:first-of-type .prediction-bar span { background: #8cb365; }
.prediction-row strong { font: 8px var(--mono); }
.illustration-note { margin: 16px 0 0; text-align: center; font-size: 8px; color: #94a087; }

.principles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; padding: 22px 0 25px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.principle { display: flex; gap: 12px; align-items: flex-start; padding: 2px 7px; }
.principle-icon { width: 32px; height: 32px; background: #edf1e8; border-radius: 8px; display: flex; align-items: center; justify-content: center; color: #769361; flex-shrink: 0; }
.principle-icon svg { width: 16px; height: 16px; }
.principle h3 { font-size: 12px; margin-bottom: 5px; font-weight: 600; }
.principle p { font-size: 10px; color: #6f7a67; line-height: 1.8; }
.section-header { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; margin: 34px 0 20px; }
.section-header .eyebrow { font-size: 8px; color: #91a083; margin-bottom: 7px; display: block; }
.section-header h2 { font-size: 20px; letter-spacing: -.04em; font-weight: 650; }
.section-header p { font-size: 10px; color: #8b948b; margin-top: 8px; }
.section-header .section-count { color: #8a9685; font: 9px var(--mono); border: 1px solid #e0e6dc; border-radius: 4px; padding: 5px 8px; white-space: nowrap; margin-bottom: 3px; }
.start-card { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid #d8e0d2; border-radius: 9px; overflow: hidden; background: #fff; }
.start-card-copy { padding: 25px 27px; display: flex; flex-direction: column; align-items: flex-start; }
.chapter-overline { display: flex; align-items: center; gap: 9px; font: 9px var(--mono); color: #7c9370; letter-spacing: .04em; }
.chapter-overline .chapter-chip { background: #eff4e9; border: 1px solid #e1e9d8; padding: 3px 6px; border-radius: 3px; font: 8px -apple-system, sans-serif; letter-spacing: 0; }
.start-card h3 { font-size: 18px; font-weight: 600; letter-spacing: -.04em; margin: 13px 0 10px; }
.start-card-copy p { font-size: 12px; color: #68785e; line-height: 2; }
.start-card-link { display: inline-flex; align-items: center; gap: 25px; font-size: 10px; color: #5d7e48; font-weight: 600; margin-top: 21px; }
.start-card-link:hover { color: #274b26; }
.mini-code { padding: 20px 21px; background: #202c29; color: #c6d2c4; min-width: 0; display: flex; flex-direction: column; justify-content: center; }
.mini-code-heading { display: flex; align-items: center; gap: 5px; border-bottom: 1px solid #34413a; padding-bottom: 13px; margin-bottom: 13px; color: #a6b7a8; font: 9px var(--mono); }
.window-dot { width: 5px; height: 5px; background: #6f8372; border-radius: 50%; }
.window-dot:nth-child(2) { background: #87957b; }
.window-dot:nth-child(3) { background: #9aa78c; }
.mini-code-heading span:last-child { margin-left: 9px; }
.mini-code code { font-size: 10px; line-height: 2.2; white-space: pre; display: block; overflow-x: auto; }
.mini-code .comment { color: #7d927e; }
.mini-code .command { color: #c3dda8; }
.mini-code .file { color: #c5d4c3; }
.mini-code-footer { display: flex; justify-content: space-between; margin-top: 12px; color: #8ba089; font: 8px var(--mono); }
.roadmap-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 13px; margin-top: 14px; }
.chapter-card { min-width: 0; display: flex; flex-direction: column; padding: 21px 21px 17px; border: 1px solid #e1e6dd; border-radius: 8px; background: #fff; position: relative; }
.chapter-card:hover { border-color: #a6be94; background: #fcfdf9; }
.chapter-card-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; }
.chapter-card .card-number { font: 10px var(--mono); color: #98a58e; }
.chapter-card .card-icon { width: 27px; height: 27px; border-radius: 6px; display: flex; align-items: center; justify-content: center; background: #f0f4eb; color: #8b9f78; }
.chapter-card .card-icon svg { width: 15px; height: 15px; }
.chapter-card h3 { font-size: 13px; font-weight: 600; margin-bottom: 8px; }
.chapter-card p { font-size: 11px; color: #6b7a5f; line-height: 1.9; margin-bottom: 19px; }
.chapter-card-bottom { display: flex; align-items: center; justify-content: space-between; margin-top: auto; gap: 7px; }
.chapter-card-bottom code { font-size: 8px; color: #8d9988; overflow-wrap: anywhere; }
.chapter-card-bottom .arrow { color: #9aae8d; font-size: 16px; }
.chapter-card.completed::after { content: "✓ 読了"; position: absolute; top: 22px; left: 46px; font-size: 8px; color: var(--green); }
.reading-note { margin: 28px 0 0; padding: 22px 25px; display: flex; align-items: flex-start; gap: 14px; background: #eff3ed; border-radius: 7px; }
.reading-note > svg { color: #7e9972; width: 18px; height: 18px; margin-top: 1px; }
.reading-note h3 { font-size: 11px; margin-bottom: 6px; font-weight: 600; }
.reading-note p { font-size: 11px; line-height: 2; color: #66765b; }
.site-footer { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 26px 0 23px; margin-top: 28px; border-top: 1px solid var(--line); color: #8c9787; font-size: 9px; line-height: 1.8; }
.footer-links { display: flex; align-items: center; gap: 13px; font-size: 8px; white-space: nowrap; }
.footer-links a:hover { color: var(--green-dark); }

.lesson-header { max-width: 800px; padding: 8px 0 27px; }
.lesson-header h1 { font-size: clamp(25px, 2.5vw, 35px); font-weight: 650; letter-spacing: -.045em; margin: 18px 0 15px; line-height: 1.6; }
.lesson-lead { font-size: 14px; line-height: 2.1; color: #64765c; max-width: 690px; }
.lesson-meta { display: flex; align-items: center; gap: 17px; color: #8a9785; font-size: 10px; margin-top: 18px; flex-wrap: wrap; }
.lesson-meta span { display: flex; gap: 5px; align-items: center; }
.lesson-meta svg { width: 13px; height: 13px; }
.lesson-meta a { font-family: var(--mono); color: #63864e; }
.lesson-grid { display: grid; grid-template-columns: minmax(0, 1fr) 150px; gap: 32px; }
.lesson-article { min-width: 0; }
.goals { border: 1px solid #dfe6d7; border-radius: 7px; padding: 21px 24px; background: #f1f5eb; margin: 0 0 30px; }
.goals h2 { display: flex; align-items: center; gap: 8px; font-size: 11px; color: #5b7a49; margin-bottom: 12px; }
.goals h2 svg { width: 14px; height: 14px; }
.goals ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 9px; }
.goals li { font-size: 12px; line-height: 1.8; display: flex; gap: 10px; }
.goals li::before { content: "✓"; color: #7f9d64; }
.lesson-toc { align-self: start; position: sticky; top: calc(var(--header) + 34px); border-left: 1px solid var(--line); padding: 3px 0 0 17px; }
.lesson-toc .eyebrow { font-size: 8px; display: block; margin-bottom: 12px; }
.lesson-toc button { display: block; width: 100%; text-align: left; padding: 9px 0; font-size: 10px; color: #899480; line-height: 1.8; }
.lesson-toc button:hover { color: var(--green); }
.lesson-toc button[aria-current="true"] { color: var(--green-dark); font-weight: 600; }
.lesson-toc .toc-source { display: inline-flex; gap: 5px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); font: 9px var(--mono); color: #5c7b4f; }
.lesson-step { scroll-margin-top: calc(var(--header) + 24px); margin: 0 0 37px; }
.step-title { display: flex; gap: 13px; align-items: flex-start; margin-bottom: 16px; }
.step-index { border: 1px solid #dfe6d8; border-radius: 5px; padding: 4px 6px; font: 10px var(--mono); color: #849979; background: #f1f5ed; margin-top: 2px; }
.step-title h2 { font-size: 18px; font-weight: 600; letter-spacing: -.02em; line-height: 1.7; }
.lesson-step > p { font-size: 14px; color: #5f6f56; line-height: 2.2; margin-bottom: 16px; }
.code-panel { border: 1px solid #263c2e; background: #202c29; border-radius: 8px; overflow: hidden; margin: 21px 0 14px; }
.code-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 16px; border-bottom: 1px solid #35423a; color: #adbca6; font: 10px var(--mono); }
.code-heading a { overflow-wrap: anywhere; line-height: 1.6; }
.code-heading a:hover { color: #e2f0d7; }
.code-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; color: #8ba184; font-size: 9px; }
.code-actions button { color: #aabd9e; border: 1px solid #42533d; border-radius: 4px; padding: 4px 7px; font-size: 9px; }
.code-actions button:hover { background: #384734; }
.code-scroll { overflow-x: auto; padding: 13px 0; }
.code-scroll pre { margin: 0; width: max-content; min-width: 100%; tab-size: 4; }
.code-line { display: block; font: 12.5px/1.9 var(--mono); color: #d6dfd0; padding: 0 20px 0 0; min-height: 24px; }
.code-line.is-focused { background: #354732; box-shadow: inset 2px 0 #a9c784; }
.line-number { display: inline-block; width: 51px; text-align: right; padding-right: 18px; color: #72836e; user-select: none; font-size: 9px; }
.syntax-comment { color: #8a9d83; font-style: italic; }
.syntax-string { color: #d2d79b; }
.syntax-number { color: #deba8e; }
.syntax-keyword { color: #b3cfec; }
.code-footnote { font-size: 12px; color: #687b58; line-height: 2; border-left: 2px solid #c8d9b9; padding: 4px 0 4px 13px; margin-top: 12px; }
.code-footnote strong { color: #577947; font-weight: 600; }
.code-focus-button { font-size: 9px; color: #6b8b52; border: 1px solid #dbe5d2; padding: 5px 9px; margin-top: 10px; border-radius: 4px; background: #f1f6eb; }
.code-focus-button[aria-pressed="true"] { background: #dfebd3; border-color: #aac391; }
.callout { padding: 16px 18px; border-radius: 6px; background: #f4f1e9; border: 1px solid #e8e1d0; margin: 18px 0; color: #857345; font-size: 11px; line-height: 2; }
.callout strong { display: block; font-size: 10px; margin-bottom: 3px; color: #846d35; }
.source-list { display: flex; flex-wrap: wrap; gap: 6px; margin: 13px 0 0; }
.source-list a { font: 9px var(--mono); padding: 6px 8px; color: #658051; background: #eef3e8; border: 1px solid #e0e8d8; border-radius: 4px; }
.source-list a:hover { background: #e0ebd4; }

.lab { scroll-margin-top: calc(var(--header) + 24px); border: 1px solid #dce4d5; border-radius: 8px; background: #fff; padding: 23px; margin: 28px 0 34px; }
.lab-heading { display: flex; align-items: center; gap: 8px; color: #7e966e; font: 8px var(--mono); letter-spacing: .1em; margin-bottom: 10px; }
.lab-heading svg { width: 14px; height: 14px; }
.lab h2 { font-size: 17px; margin-bottom: 11px; letter-spacing: -.03em; font-weight: 600; }
.lab-description { font-size: 12px; color: #657955; line-height: 2; margin-bottom: 20px; }
.lab-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 15px 24px; padding: 15px 0; }
.lab-controls label { display: flex; align-items: center; gap: 10px; font-size: 10px; color: #647959; }
input[type="range"] { accent-color: #6a8f4c; width: 125px; cursor: pointer; }
select { border: 1px solid #d6e0cb; border-radius: 4px; padding: 6px; color: #51713b; background: #f5f8ef; }
output { font: 10px var(--mono); min-width: 24px; }
.lab-caption { font-size: 11px; line-height: 1.9; color: #6c7b5d; padding-top: 14px; margin-top: 10px; border-top: 1px dashed #e1e7d9; }
.token-track { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; min-height: 45px; }
.token-track .token { min-width: 36px; padding: 10px 12px; }
.token.active { border-color: #729455; background: #e4eed6; color: #41672f; }
.token.future { border-color: #e5e8e1; background: #f6f7f3; color: #b1b9a8; }
.demo-label { display: block; font: 9px var(--mono); color: #829173; margin-bottom: 9px; }
.shift-grid { display: grid; grid-template-columns: 45px repeat(5, minmax(0, 1fr)); gap: 6px; align-items: center; font-size: 10px; margin-bottom: 12px; }
.shift-grid .token { padding: 11px 3px; overflow-wrap: anywhere; font-size: 11px; }
.lab-result { min-height: 34px; margin-top: 12px; font-size: 11px; color: #5e7d49; line-height: 1.9; }
.mask-grid { display: grid; grid-template-columns: 30px repeat(5, 1fr); gap: 5px; max-width: 400px; }
.mask-grid .axis-label { text-align: center; font-size: 9px; color: #82936f; display: flex; align-items: center; justify-content: center; }
.mask-cell { height: 34px; border: 1px solid #e8ece2; border-radius: 3px; background: #f5f7f1; color: #b9c2af; font: 9px var(--mono); display: flex; justify-content: center; align-items: center; }
.mask-cell.allowed { background: #e7eedc; border-color: #dbe5cd; color: #8da472; }
.mask-cell.selected { background: #a5c67c; border-color: #87ab5c; color: #314e19; }
.mask-cell.current-row:not(.allowed) { background: #f1eee8; border-color: #e4ddcc; }
.probabilities { display: grid; gap: 13px; margin: 15px 0; }
.probability-row { display: grid; grid-template-columns: 42px 1fr 49px; align-items: center; gap: 12px; font-size: 11px; color: #647759; }
.probability-track { background: #f0f4e9; border-radius: 3px; height: 12px; overflow: hidden; }
.probability-fill { background: #a9c589; height: 100%; border-radius: inherit; transition: width .15s; }
.probability-row:first-child .probability-fill { background: #6f9850; }
.probability-row output { text-align: right; font-size: 10px; }
.shape-pipeline { display: grid; gap: 8px; margin: 12px 0; }
.shape-stage { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; border: 1px solid #e0e7d7; border-radius: 5px; background: #f7f9f3; font-size: 10px; color: #68844f; }
.shape-stage code { font-size: 11px; }
.shape-stage:last-child { background: #eaf1df; border-color: #d5e2c3; }
.quiz { scroll-margin-top: calc(var(--header) + 24px); padding: 25px; border: 1px solid #dfe6d8; border-radius: 8px; margin: 26px 0; background: #fff; }
.quiz .eyebrow { font-size: 8px; color: #8aa071; }
.quiz h2 { font-size: 16px; margin: 9px 0 13px; font-weight: 600; }
.quiz fieldset { padding: 0; margin: 0; border: 0; }
.quiz legend { font-size: 13px; line-height: 2; margin-bottom: 15px; }
.quiz-option { display: flex; align-items: flex-start; gap: 10px; border: 1px solid #e4e9de; border-radius: 5px; padding: 12px 14px; margin: 8px 0; font-size: 12px; color: #617751; line-height: 1.9; cursor: pointer; }
.quiz-option:hover { background: #f7faf1; border-color: #c4d5af; }
.quiz-option:has(input:checked) { background: #eff5e7; border-color: #a2bb82; }
.quiz-option input { margin: 3px 0 0; accent-color: #6f9051; flex-shrink: 0; }
.quiz .button { margin-top: 11px; }
.quiz-feedback { padding: 13px 15px; font-size: 12px; line-height: 2; border-radius: 5px; background: #edf4e5; margin-top: 15px; color: #56743c; }
.quiz-feedback.incorrect { background: #f7f0e3; color: #886d30; }
.takeaway { padding: 17px 0; border-top: 1px solid var(--line); margin-top: 23px; font-size: 12px; color: #677e55; line-height: 2.1; }
.takeaway strong { display: block; margin-bottom: 5px; font-size: 10px; color: #8ca573; }
.lesson-completion { padding: 25px; margin: 16px 0; background: #eaf1e1; border: 1px solid #d8e4c9; border-radius: 8px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.lesson-completion p { font-size: 12px; font-weight: 600; color: #506d39; }
.lesson-completion small { font-size: 10px; display: block; margin-top: 6px; color: #809369; line-height: 1.8; }
.lesson-pagination { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 22px; }
.pagination-link { border: 1px solid #e0e7d7; border-radius: 6px; padding: 17px 19px; background: #fff; font-size: 11px; color: #698551; display: flex; flex-direction: column; gap: 9px; }
.pagination-link:hover { border-color: #a9bf93; }
.pagination-link:last-child { text-align: right; }
.pagination-link span { font-size: 9px; color: #97a489; }

.study-route { border-bottom: 1px solid var(--line); padding: 0 0 25px; margin: -4px 0 32px; }
.study-route .eyebrow { font-size: 9px; color: #6b8658; }
.study-route p { font-size: 12px; line-height: 1.9; margin-top: 5px; color: #64765a; }
.study-route-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 14px; }
.study-route-actions button { display: inline-flex; gap: 8px; align-items: center; border: 1px solid #d9e3d0; border-radius: 5px; padding: 10px 13px; font-size: 11px; background: #fff; color: #4f713c; }
.study-route-actions button:hover { background: #eaf2e0; border-color: #a7be92; }
.study-route-actions button span { font: 9px var(--mono); color: #809868; }
.workbook { scroll-margin-top: calc(var(--header) + 24px); margin: 37px 0 26px; padding-top: 27px; border-top: 1px solid #d5e0cc; }
.workbook-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.workbook-heading .eyebrow { color: #6b8658; font-size: 9px; }
.workbook-heading h2 { margin: 10px 0; font-size: 24px; font-weight: 650; letter-spacing: -.04em; }
.workbook-heading p { color: #617653; font-size: 12px; line-height: 1.9; }
.workbook-chapter { font: 9px/1.8 var(--mono); color: #748665; white-space: nowrap; padding-top: 4px; }
.workbook-statuses { display: flex; flex-wrap: wrap; gap: 10px 18px; padding: 17px 0 9px; }
.workbook-statuses > span { display: inline-flex; gap: 8px; align-items: center; color: #627359; font-size: 11px; }
.question-status { font-size: 10px; line-height: 1.5; font-weight: 500; padding: 4px 9px; border-radius: 5px; border: 1px solid #dde4d6; background: #edf1e8; color: #637259; }
.question-status.solved, .question-status.assisted { background: #e4f0d8; border-color: #bdd4a6; color: #3d6326; }
.question-status.retry, .question-status.reviewed { background: #f4eddf; border-color: #e0d3b3; color: #7a602c; }
.question-status.hint { background: #edf0f8; border-color: #cfd9e9; color: #4f6383; }
.workbook-save-note { color: #6c7b60; font-size: 10px; line-height: 1.9; }
.code-exercise { margin-top: 20px; padding: 25px; background: #fff; border: 1px solid #d5e0cb; border-radius: 8px; scroll-margin-top: calc(var(--header) + 24px); }
.code-exercise > .eyebrow, .workbook .quiz > .eyebrow { font-size: 9px; color: #678151; }
.code-exercise h3 { margin: 10px 0 12px; font-weight: 600; font-size: 18px; line-height: 1.8; letter-spacing: -.025em; }
.exercise-prompt { font-size: 13px; line-height: 2; color: #5f7154; }
.exercise-code { background: #202c29; color: #d6dfd0; border: 1px solid #2e4534; border-radius: 7px; margin-top: 20px; overflow: hidden; }
.exercise-source { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 12px 15px; border-bottom: 1px solid #3b4d3d; font: 10px/1.7 var(--mono); color: #bdd0b2; }
.exercise-source span { overflow-wrap: anywhere; min-width: 0; }
.exercise-source span:last-child { white-space: nowrap; font-size: 9px; color: #a6bb9b; flex-shrink: 0; }
.exercise-code .code-line { min-height: 29px; line-height: 29px; }
.blank-marker { display: inline-flex; align-items: center; justify-content: center; min-width: 39px; height: 22px; line-height: 1; vertical-align: baseline; margin: 0 3px; padding: 0 9px; border: 1px dashed #acd38e; border-radius: 4px; background: #d9ecc6; color: #244b26; font: 11px var(--mono); font-weight: 700; }
.blank-marker:hover { background: #bcdba0; border-style: solid; }
.exercise-instructions { color: #6c7c60; font-size: 11px; line-height: 2; margin: 14px 0 20px; }
.exercise-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px 16px; }
.exercise-field { min-width: 0; }
.exercise-field label { display: flex; align-items: flex-start; gap: 8px; color: #4e683c; font-size: 12px; line-height: 1.8; margin-bottom: 9px; }
.field-number { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; height: 20px; min-width: 20px; background: #eaf2e1; border: 1px solid #d6e2c9; border-radius: 4px; color: #567c3b; font: 10px var(--mono); }
.exercise-field input { display: block; width: 100%; min-height: 44px; font: 14px/1.5 var(--mono); border: 1px solid #cddac1; border-radius: 5px; padding: 10px 12px; background: #fbfcf8; color: #284a29; }
.exercise-field input::placeholder { font-family: -apple-system, sans-serif; font-size: 11px; color: #78876d; }
.exercise-field input[aria-invalid="true"] { border-color: #b57b45; background: #fff8ed; }
.exercise-field input.is-correct { border-color: #739d4b; background: #f1f8e8; }
.blank-feedback { margin-top: 8px; color: #4d7435; font-size: 11px; line-height: 1.9; }
.blank-feedback.incorrect { color: #86612f; }
.workbook-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 23px; }
.workbook .workbook-actions .button { margin-top: 0; }
.exercise-hint { border-left: 3px solid #a9bad5; border-radius: 0 5px 5px 0; background: #f0f3f9; padding: 14px 17px; margin-top: 17px; color: #536a87; font-size: 12px; line-height: 2; }
.exercise-hint strong { font-size: 10px; font-weight: 600; }
.exercise-hint p { margin-top: 4px; }
.workbook-secondary-actions { display: flex; justify-content: space-between; gap: 15px; margin-top: 18px; padding-top: 16px; border-top: 1px dashed #e0e6d8; }
.workbook-secondary-actions button { padding: 4px 0; text-align: left; font-size: 11px; line-height: 1.8; color: #6d785d; text-decoration: underline; text-underline-offset: 4px; }
.workbook-secondary-actions button:hover { color: #365728; }
.exercise-solution { padding: 18px; margin-top: 17px; border: 1px solid #e1d6bc; border-radius: 6px; background: #faf7ef; color: #6b644a; font-size: 12px; line-height: 2; }
.exercise-solution > strong { display: block; font-size: 12px; font-weight: 600; color: #756136; }
.exercise-solution ol { padding-left: 20px; margin: 15px 0 10px; }
.exercise-solution li { padding-left: 4px; margin: 7px 0; }
.exercise-solution > p { margin-top: 10px; }
.exercise-solution > a { display: inline-block; color: #577746; font-size: 11px; padding-top: 6px; }
.exercise-read-link { display: inline-block; margin-top: 19px; padding: 5px 0; font-size: 11px; color: #587a41; }
.workbook .quiz { margin-bottom: 14px; }
.workbook-footnote { font-size: 11px; color: #6e7b62; line-height: 2; }

dialog { position: fixed; width: min(620px, calc(100% - 32px)); max-height: 80vh; padding: 25px; border: 1px solid #d6dfcc; border-radius: 12px; background: #fafcf7; color: var(--ink); box-shadow: 0 24px 100px #1c352238; overscroll-behavior: contain; }
dialog::backdrop { background: #1b302257; backdrop-filter: blur(3px); }
.dialog-heading { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 20px; }
.dialog-heading h2 { font-size: 18px; font-weight: 600; line-height: 1.8; }
.dialog-heading .eyebrow { font-size: 8px; }
dialog input[type="search"] { display: block; width: 100%; border: 1px solid #cfdcc0; border-radius: 6px; padding: 13px; font-size: 13px; background: white; color: var(--ink); }
.search-count { font-size: 10px; color: #8c9b7e; padding: 16px 0 10px; }
.search-results { max-height: 46vh; overflow-y: auto; }
.search-result { display: block; padding: 13px 12px; margin: 3px 0; border-radius: 5px; border: 1px solid transparent; }
.search-result:hover, .search-result:focus-visible { background: #eef4e5; border-color: #d8e3cb; }
.search-result strong { font-size: 12px; font-weight: 600; display: block; }
.search-result .result-kind { color: #879e71; font: 8px var(--mono); display: block; margin-bottom: 4px; }
.search-result p { font-size: 10px; color: #7d8e6f; line-height: 1.9; margin-top: 7px; }
.dialog-footer { display: flex; gap: 7px; margin-top: 16px; border-top: 1px solid var(--line); padding-top: 15px; color: #88997a; font-size: 9px; }
.dialog-footer span { margin-left: auto; }
.dialog-footer kbd { border: 1px solid #dbe4d1; padding: 0 4px; border-radius: 3px; }
.glossary-list { margin-top: 15px; }
.glossary-entry { padding: 16px 4px; border-bottom: 1px solid #e1e8d9; }
.glossary-entry h3 { font-size: 13px; font-weight: 600; margin-bottom: 9px; }
.glossary-entry p { font-size: 11px; line-height: 2; color: #728366; }
.glossary-entry a { display: inline-block; font-size: 10px; color: #66854b; margin-top: 9px; }
.empty-state { padding: 27px 5px; font-size: 12px; line-height: 2; color: #7f8f73; }
.toast { position: fixed; bottom: 25px; left: calc(50% + var(--sidebar) / 2); transform: translateX(-50%); z-index: 80; padding: 13px 22px; max-width: calc(100% - 32px); background: #254330; border: 1px solid #4c6b44; border-radius: 7px; color: #eef5e7; font-size: 11px; line-height: 1.8; box-shadow: 0 8px 30px #14211722; }
.loading-state { max-width: 900px; margin: 80px auto; }
.loading-state h1 { margin: 20px 0; }
.load-error, .noscript-message { margin: 60px auto; padding: 25px; max-width: 700px; background: #faf0db; border: 1px solid #e7d5ae; border-radius: 8px; font-size: 14px; line-height: 2; }
.noscript-message { position: relative; margin-left: calc(var(--sidebar) + 48px); }

@media (min-width: 1500px) {
  :root { --sidebar: 270px; }
  main { padding-right: 65px; padding-left: 65px; }
  .hero { gap: 55px; padding-top: 36px; padding-bottom: 49px; }
  .hero h1 { font-size: 43px; }
  .hero-description { font-size: 13px; }
  .nav-link { font-size: 12px; }
  .principle h3 { font-size: 12px; }
  .principle p { font-size: 10px; }
  .chapter-card h3 { font-size: 13px; }
  .chapter-card p { font-size: 11px; }
}
@media (max-width: 1200px) {
  :root { --sidebar: 225px; }
  main { padding-left: 32px; padding-right: 32px; }
  .hero { gap: 20px; }
  .hero h1 { font-size: 30px; }
  .hero-description { font-size: 12px; }
  .hero-description br { display: none; }
  .hero-actions { gap: 14px; }
  .hero-actions .button { padding: 0 16px; gap: 15px; }
  .prediction-card { margin-left: 20px; margin-right: 20px; }
  .transformer-box { margin: 0 10px; padding: 15px; }
  .principles { gap: 9px; }
  .principle { gap: 9px; padding: 0; }
  .principle p { font-size: 9px; }
  .lesson-grid { grid-template-columns: minmax(0, 1fr); }
  .lesson-toc { display: none; }
}
@media (max-width: 1000px) {
  :root { --sidebar: 210px; }
  .sidebar { padding-left: 10px; padding-right: 10px; }
  .nav-link { font-size: 10.5px; gap: 8px; }
  main { padding-left: 26px; padding-right: 26px; }
  .hero { grid-template-columns: 1fr; padding-top: 12px; }
  .hero h1 { font-size: 37px; }
  .hero-description { font-size: 12px; }
  .hero-description br { display: block; }
  .model-illustration { display: none; }
  .hero-meta { margin-top: 17px; }
  .principles { gap: 13px; }
  .principle { display: block; }
  .principle-icon { margin-bottom: 10px; }
  .start-card { grid-template-columns: 1.1fr 1fr; }
  .start-card-copy { padding: 22px 20px; }
  .start-card h3 { font-size: 16px; }
  .mini-code { padding: 16px; }
  .mini-code code { font-size: 8px; }
  .roadmap-grid { grid-template-columns: repeat(2, 1fr); }
  .site-footer { align-items: flex-start; flex-direction: column; gap: 8px; }
}
@media (max-width: 760px) {
  :root { --sidebar: 0px; --header: 64px; }
  .header { padding: 0 18px; gap: 10px; }
  .brand { font-size: 17px; gap: 8px; }
  .brand-light { font-size: 14px; }
  .brand-mark { width: 29px; height: 29px; font-size: 24px; border-radius: 7px; }
  .header-actions { gap: 8px; }
  .search-trigger { background: none; border: none; padding: 0; justify-content: center; width: 34px; height: 36px; }
  .search-trigger svg { width: 18px; height: 18px; }
  .search-trigger span, .search-trigger kbd, .header-github, .glossary-trigger { display: none; }
  .menu-toggle { display: inline-flex; }
  .sidebar { width: 270px; transform: translateX(-100%); visibility: hidden; transition: transform .2s, visibility .2s; padding: 23px 18px; }
  body.menu-open .sidebar { transform: translateX(0); visibility: visible; }
  body.menu-open { overflow: hidden; }
  .sidebar-overlay { position: fixed; inset: var(--header) 0 0; background: #1c30274d; z-index: 24; }
  .nav-link { font-size: 12px; min-height: 42px; }
  main { padding: calc(var(--header) + 24px) 24px 0; margin: 0; }
  .breadcrumb { font-size: 9px; margin-bottom: 20px; }
  .hero { padding: 16px 0 30px; }
  .hero h1 { font-size: clamp(28px, 6vw, 39px); }
  .edition-label { font-size: 8px; margin-bottom: 19px; }
  .hero-description { font-size: 12px; margin-top: 14px; }
  .hero-actions { margin-top: 23px; }
  .hero-meta { font-size: 8px; gap: 14px; }
  .principles { grid-template-columns: 1fr; gap: 18px; padding-top: 23px; padding-bottom: 23px; }
  .principle { display: flex; gap: 12px; }
  .principle h3 { font-size: 12px; line-height: 1.7; }
  .principle p { font-size: 11px; line-height: 1.8; }
  .principle p br { display: none; }
  .principle-icon { width: 31px; height: 31px; margin: 2px 0 0; }
  .section-header { margin-top: 27px; }
  .section-header h2 { font-size: 19px; }
  .section-header p { font-size: 9px; }
  .section-header .section-count { display: none; }
  .start-card { grid-template-columns: 1fr; }
  .start-card-copy { padding: 23px; }
  .start-card h3 { font-size: 18px; }
  .mini-code { padding: 18px 23px; }
  .mini-code code { font-size: 10px; }
  .mini-code-footer { margin-top: 8px; }
  .roadmap-grid { gap: 11px; }
  .chapter-card { padding: 18px 16px 16px; }
  .chapter-card h3 { font-size: 12px; }
  .chapter-card p { font-size: 11px; }
  .chapter-card-bottom code { font-size: 7px; }
  .reading-note { padding: 20px; }
  .reading-note p { font-size: 11px; }
  .lesson-header h1 { font-size: 26px; }
  .lesson-lead { font-size: 13px; }
  .lesson-meta { font-size: 9px; gap: 12px; }
  .goals { padding: 18px; }
  .lesson-step > p { font-size: 14px; }
  .step-title h2 { font-size: 17px; }
  .code-heading { padding: 11px 12px; font-size: 9px; }
  .code-actions { gap: 5px; }
  .code-actions .source-lines { display: none; }
  .code-line { font-size: 12px; }
  .line-number { width: 39px; padding-right: 12px; font-size: 8px; }
  .lab { padding: 19px 16px; }
  .lab-controls { gap: 10px; flex-direction: column; align-items: flex-start; }
  .lab h2 { font-size: 16px; }
  .quiz { padding: 20px 17px; }
  .quiz legend { font-size: 12px; }
  .quiz-option { padding: 10px; font-size: 12px; }
  .study-route-actions { gap: 7px; }
  .study-route-actions button { font-size: 10px; padding: 9px; gap: 6px; }
  .workbook-heading { flex-direction: column; gap: 10px; }
  .workbook-heading h2 { font-size: 22px; }
  .workbook-chapter { font-size: 8px; }
  .code-exercise { padding: 20px 17px; }
  .code-exercise h3 { font-size: 17px; }
  .exercise-prompt { font-size: 12px; }
  .exercise-fields { grid-template-columns: 1fr; gap: 18px; }
  .exercise-field input { font-size: 16px; }
  .exercise-source { flex-direction: column; gap: 3px; padding: 10px 12px; }
  .workbook-actions .button { font-size: 11px; }
  .exercise-solution { padding: 15px 12px; }
  .lesson-completion { padding: 20px; align-items: flex-start; flex-direction: column; }
  .lesson-pagination { gap: 10px; }
  .pagination-link { padding: 14px; font-size: 10px; line-height: 1.8; }
  .toast { left: 50%; width: max-content; }
  .noscript-message { margin: 20px; }
}
@media (max-width: 380px) {
  main { padding-left: 17px; padding-right: 17px; }
  .brand-light { font-size: 12px; }
  .brand { gap: 6px; }
  .header { padding-left: 14px; padding-right: 12px; }
  .hero h1 { font-size: 26px; }
  .hero-description br { display: none; }
  .hero-meta { gap: 9px; }
  .chapter-card { padding-left: 13px; padding-right: 13px; }
  .roadmap-grid { gap: 8px; }
  .section-header .section-count { display: none; }
  .shift-grid { gap: 3px; grid-template-columns: 30px repeat(5, minmax(0, 1fr)); }
  .shift-grid .token { font-size: 9px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}
@media print {
  :root { --sidebar: 0px; --header: 0px; }
  .header, .sidebar, .sidebar-overlay, .lesson-toc, .hero-actions, .code-actions, .code-focus-button, .lesson-completion, .lesson-pagination, .toast, .quiz button, dialog { display: none !important; }
  main { margin: 0; padding: 0; }
  body { background: white; }
  .lesson-grid { display: block; }
  .code-panel { break-inside: avoid; }
  .study-route-actions, .workbook-actions, .workbook-secondary-actions, .exercise-read-link { display: none; }
  .exercise-code { background: #f5f7f0; border-color: #dbe3d0; break-inside: avoid; }
  .exercise-source { color: #435b36; }
  .exercise-fields { grid-template-columns: repeat(2, 1fr); }
  .exercise-field input { border-color: #a8b39d; }
  .blank-marker { color: #263730; background: #edf2e7; }
  .code-scroll { overflow: visible; }
  .code-scroll pre { width: auto; white-space: pre-wrap; }
  .code-line { white-space: pre-wrap; overflow-wrap: anywhere; color: #263730; }
  .code-panel { background: #f5f7f0; border-color: #dbe3d0; }
  .code-heading, .syntax-comment, .syntax-keyword, .syntax-number, .syntax-string { color: #435b36; }
  .line-number { color: #74826a; }
}
