/* Copyright © 2026 Christopher Snow. */
:root { color-scheme: light; --idle-bg:#e9ebed; --idle-ink:#50565c; --bg:#f7faf9; --panel:#fff; --ink:#193237; --muted:#536e71; --line:#d5e2e1; --soft:#edf3f2; --accent:#146653; --accent-soft:#e5f3ec; --code:#122824; --code-ink:#e1eee6; }
:root[data-theme="dark"] { color-scheme:dark; --idle-bg:#2a2d30; --idle-ink:#bdc3c9; --bg:#142326; --panel:#1c2e31; --ink:#e4efeb; --muted:#a7bfbd; --line:#3b5356; --soft:#24393b; --accent:#a3ddc2; --accent-soft:#28473e; --code:#0c1511; --code-ink:#e1eee6; }
* { box-sizing:border-box; } html { scroll-behavior:smooth; scroll-padding-top:90px; } body { margin:0; background:var(--bg); color:var(--ink); font:16px/1.65 system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; } a { color:var(--accent); text-underline-offset:4px; } button,input,select { font:inherit; } button,select,input { border:1px solid var(--line); border-radius:6px; background:var(--panel); color:var(--ink); min-height:42px; padding:7px 12px; } button,select { cursor:pointer; } button:hover { border-color:var(--accent); background:var(--accent-soft); } :focus-visible { outline:3px solid var(--accent); outline-offset:3px; } button.primary { background:var(--accent); color:var(--bg); border-color:var(--accent); font-weight:650; } .skip { position:absolute; top:-100px; background:var(--panel); padding:12px; z-index:10; } .skip:focus { top:10px; } .topbar { height:74px; position:sticky; top:0; z-index:5; display:flex; align-items:center; justify-content:space-between; padding:0 36px; border-bottom:1px solid var(--line); background:var(--bg); } .brand { text-decoration:none; color:var(--ink); font-size:20px; font-weight:750; display:flex; align-items:center; gap:12px; } .brand-icon { font-size:30px; color:var(--accent); } .brand-note { color:var(--muted); font-size:13px; font-weight:400; margin-left:14px; } .top-actions { display:flex; gap:24px; align-items:center; font-size:13px; } .top-actions a { text-decoration:none; color:var(--muted); } .top-actions button { font-size:13px; } .layout { max-width:1600px; margin:auto; display:grid; grid-template-columns:245px minmax(0,1fr); } .sidebar { position:sticky; top:74px; height:calc(100vh - 74px); padding:38px 22px; border-right:1px solid var(--line); display:flex; flex-direction:column; } .eyebrow { font:600 11px/1.6 ui-monospace,SFMono-Regular,Consolas,monospace; letter-spacing:1.5px; color:var(--accent); margin:0 0 14px; } .sidebar-title { font-size:21px; font-weight:650; margin:0 0 30px; } nav { display:grid; gap:6px; } nav a { display:flex; align-items:center; gap:10px; padding:10px; font-size:13px; color:var(--muted); text-decoration:none; border-radius:5px; min-height:42px; } nav a.current { background:var(--accent-soft); color:var(--accent); font-weight:650; } .dot { width:6px; height:6px; background:var(--accent); border-radius:50%; margin-left:auto; } .sidebar-bottom { margin-top:auto; padding-top:30px; color:var(--muted); font-size:12px; } .sidebar-bottom a { display:block; padding:5px 0; } .status-label { font:10px ui-monospace,monospace; letter-spacing:1px; } main { min-width:0; padding:54px 6% 0; max-width:1200px; } .intro { padding-bottom:45px; border-bottom:1px solid var(--line); margin-bottom:40px; } h1 { font-size:clamp(38px,4.6vw,64px); line-height:1.08; font-weight:600; letter-spacing:-2.4px; margin:20px 0 24px; } .lead { max-width:650px; font-size:19px; line-height:1.7; color:var(--muted); } .intro-meta { display:flex; flex-wrap:wrap; gap:8px 26px; font-size:12px; color:var(--muted); margin-top:24px; } h2 { font-size:28px; font-weight:600; letter-spacing:-.7px; line-height:1.25; margin:0 0 20px; } h3 { font-size:15px; margin:0; font-weight:650; } p { margin:0 0 17px; } .prose { max-width:760px; } .section-heading { display:flex; align-items:center; justify-content:space-between; gap:16px; } .tag { white-space:nowrap; border:1px solid var(--line); border-radius:4px; padding:4px 8px; font-size:11px; color:var(--muted); align-self:center; } .tag.live { color:var(--accent); border-color:var(--accent); } .lab-panel { margin-top:28px; background:var(--panel); border:1px solid var(--line); border-radius:10px; overflow:hidden; box-shadow:0 8px 32px #14251d05; } .panel-top { display:flex; justify-content:space-between; align-items:center; padding:16px 24px; border-bottom:1px solid var(--line); gap:16px; } .panel-top .eyebrow { margin:0; } .model-badge { font-size:11px; color:var(--muted); } .controls { padding:24px 24px 12px; display:grid; grid-template-columns:1.2fr 1fr 1fr; gap:18px; } .controls label { font-size:13px; font-weight:650; } .controls label span { display:block; font-size:11px; font-weight:400; color:var(--muted); margin:2px 0 8px; } select { width:100%; font-size:12px; padding:8px; } .presets { padding:0 24px 22px; display:flex; align-items:center; flex-wrap:wrap; gap:8px; font-size:12px; } .presets>span { color:var(--muted); margin-right:5px; } .presets button { font-size:12px; min-height:36px; } .prediction { padding:20px 24px; background:var(--soft); border-block:1px solid var(--line); } .prediction label { display:block; font-size:14px; margin-bottom:12px; } .prediction>div { display:flex; gap:8px; flex-wrap:wrap; } .prediction input { width:85px; } .prediction button { font-size:12px; } .feedback { margin:0; padding:16px 24px; color:var(--accent); font-size:13px; min-height:56px; } .figure-label { display:flex; justify-content:space-between; align-items:center; gap:12px; padding:8px 24px 12px; } .figure-label>span { font-size:11px; color:var(--muted); } .lanes { display:grid; grid-template-columns:repeat(16,minmax(0,1fr)); gap:4px; padding:0 24px; } button.lane { min-width:0; padding:0; min-height:38px; border:1px solid var(--line); border-radius:4px; background:var(--accent-soft); color:var(--accent); font:12px ui-monospace,monospace; } button.lane[aria-pressed="true"] { outline:2px solid var(--accent); outline-offset:1px; } button.lane.inactive { background:var(--soft); color:var(--muted); text-decoration:line-through; } .lane-detail { margin:12px 24px 24px; font:12px/1.6 ui-monospace,monospace; color:var(--muted); } .metrics { display:grid; grid-template-columns:repeat(4,1fr); border-block:1px solid var(--line); background:var(--soft); margin-bottom:22px; } .metrics>div { padding:18px; border-right:1px solid var(--line); } .metrics>div:last-child { border:0; } .metrics span { display:block; font-size:11px; color:var(--muted); line-height:1.5; min-height:33px; } .metrics strong { font:500 30px/1.6 ui-monospace,monospace; color:var(--accent); } .figure-note { font-size:12px; color:var(--muted); padding:0 24px; } .sectors { padding:0 24px; display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px 24px; } .sector { display:flex; gap:10px; align-items:center; } .sector-label { flex:0 0 90px; font:11px/1.5 ui-monospace,monospace; } .sector-label span { display:block; color:var(--muted); font-size:10px; } .words { display:grid; grid-template-columns:repeat(8,minmax(0,1fr)); flex:1; gap:2px; min-width:0; } .word { min-width:0; height:28px; display:flex; align-items:center; justify-content:center; border:1px solid var(--line); border-radius:2px; color:var(--muted); font:9px ui-monospace,monospace; } .word.used { background:var(--accent-soft); color:var(--accent); border-color:var(--accent-soft); } .word.selected { border:2px solid var(--accent); font-weight:750; } .explanation { font-size:13px; margin:24px; } details { font-size:13px; } summary { cursor:pointer; font-weight:650; min-height:44px; padding:12px 0; } details p { margin:10px 0; }
.more-settings { margin:20px 0; padding:16px 20px; border:1px solid var(--line); border-radius:8px; background:var(--panel); }
.more-settings summary { min-height:36px; padding:4px 0; font-size:14px; color:var(--accent); }
.more-settings > *:not(summary) { margin-top:14px; }
.named-choices { border:0; padding:0; margin:0 0 12px; }
.named-choices legend { font-size:14px; padding:0; margin-bottom:10px; }
.named-choice { display:flex; align-items:center; gap:10px; padding:10px 14px; border:1px solid var(--line); border-radius:6px; margin-bottom:8px; cursor:pointer; font-size:14px; min-height:44px; }
.named-choice:hover { border-color:var(--accent); background:var(--accent-soft); }
.named-choice input { accent-color:var(--accent); min-width:18px; min-height:18px; }
.named-choice span { flex:1; } .model-note { margin-top:20px; padding:6px 24px; border-top:1px solid var(--line); color:var(--muted); } .model-note a { display:inline-block; margin-bottom:16px; } .section-space { margin-top:58px; } .two-col { display:grid; grid-template-columns:1fr 1fr; gap:30px; align-items:start; } .two-col p { font-size:14px; } code { font-family:ui-monospace,SFMono-Regular,Consolas,monospace; font-size:1em; overflow-wrap:anywhere; } .code-panel { border-radius:8px; background:var(--code); color:var(--code-ink); overflow:hidden; margin-top:32px; } .code-title { padding:10px 16px; border-bottom:1px solid #ffffff20; font:11px ui-monospace,monospace; display:flex; align-items:center; justify-content:space-between; gap:10px; } .code-title button { background:transparent; color:var(--code-ink); border-color:#ffffff30; font-size:11px; } pre { max-width:100%; white-space:pre; overflow-wrap:normal; word-break:normal; font-size:16px; margin:0; padding:20px 16px; overflow:auto; line-height:1.9; } pre code { font-size:inherit; white-space:inherit; overflow-wrap:normal; word-break:normal; } .code-footer { border-top:1px solid #ffffff20; padding:16px; font-size:11px; display:grid; gap:12px; color:#b7ccc1; } .code-footer a { color:#a3e6bb; } .challenge { border-left:3px solid var(--accent); background:var(--soft); padding:26px 30px; } .challenge ol { padding-left:20px; font-size:14px; } .challenge li { margin-bottom:12px; padding-left:8px; } :is(.roadmap,.parallel-roadmap) { margin-top:24px; border-top:1px solid var(--line); } :is(.roadmap,.parallel-roadmap)>a,:is(.roadmap,.parallel-roadmap)>div { display:flex; align-items:center; gap:20px; padding:20px 0; border-bottom:1px solid var(--line); color:var(--ink); text-decoration:none; } .module-no { font:13px ui-monospace,monospace; color:var(--accent); } :is(.roadmap,.parallel-roadmap) p { font-size:13px; color:var(--muted); margin:5px 0 0; } footer { padding:30px 0; margin-top:50px; border-top:1px solid var(--line); display:flex; justify-content:space-between; gap:20px; font-size:11px; color:var(--muted); } [hidden] { display:none!important; }
@media(min-width:1400px) { .sectors { gap:12px 35px; } .word { font-size:11px; } }
@media(max-width:1100px) { .layout { grid-template-columns:200px minmax(0,1fr); } .sidebar { padding:30px 14px; } main { padding:40px 5% 0; } .sectors { grid-template-columns:1fr; } .word { font-size:11px; } .two-col { grid-template-columns:1fr; gap:0; } .code-panel { margin-top:10px; } }
@media(max-width:760px) { .topbar { padding:0 18px; height:64px; } .brand-note { display:none; } .top-actions { gap:14px; } .layout { display:block; } .sidebar { position:static; height:auto; border-right:0; border-bottom:1px solid var(--line); padding:12px 18px; } .sidebar>.eyebrow,.sidebar-title,.sidebar-bottom { display:none; } nav { display:flex; flex-wrap:wrap; gap:2px 10px; } nav a { padding:7px; min-height:40px; } nav a:nth-child(3),nav a:nth-child(4) { display:none; } main { padding:32px 20px 0; } h1 { font-size:42px; letter-spacing:-1.6px; } h2 { font-size:25px; } .lead { font-size:17px; } .intro { padding-bottom:26px; margin-bottom:28px; } .section-heading { align-items:start; flex-direction:column; gap:0; } .section-heading .tag { align-self:start; margin-bottom:20px; } .controls { grid-template-columns:1fr; gap:14px; } .controls label span { display:inline; margin-left:8px; } select { margin-top:6px; font-size:14px; min-height:44px; } .lanes { grid-template-columns:repeat(8,minmax(0,1fr)); } button.lane { min-height:42px; } .figure-label { align-items:start; flex-direction:column; gap:2px; } .metrics { grid-template-columns:repeat(2,1fr); } .metrics>div { border-bottom:1px solid var(--line); } .metrics>div:nth-child(2) { border-right:0; } .metrics span { min-height:0; } .metrics strong { font-size:28px; } .panel-top { align-items:start; } .panel-top .eyebrow { max-width:170px; } .presets button,button { min-height:44px; } .sector-label { flex-basis:80px; } .sector { gap:6px; } .words { gap:2px; } .word { font-size:9px; } .section-space { margin-top:38px; } .challenge { padding:22px; } :is(.roadmap,.parallel-roadmap)>a,:is(.roadmap,.parallel-roadmap)>div { gap:12px; align-items:start; flex-wrap:wrap; } :is(.roadmap,.parallel-roadmap)>div>div,:is(.roadmap,.parallel-roadmap)>a>div { flex:1; min-width:170px; } footer { flex-direction:column; gap:10px; } }
@media(prefers-reduced-motion:reduce) { html { scroll-behavior:auto; } }
@media(max-width:390px) { .named-choice { padding:8px 10px; font-size:13px; } .more-settings { padding:12px 14px; } .prediction { padding:16px 18px; } .prediction>div { flex-direction:column; } .prediction input { width:100%; } .prediction button { width:100%; } }
.start-course { display:inline-block; padding:12px 18px; border-radius:6px; background:var(--accent); color:var(--bg); text-decoration:none; font-weight:650; }
.offline-status { margin:36px 0 0; padding:14px 18px; border:1px solid var(--line); border-radius:6px; background:var(--soft); color:var(--muted); font-size:13px; }
.offline-update { margin-top:12px; padding:18px; border:1px solid var(--line); border-radius:6px; background:var(--panel); font-size:14px; }
.offline-update p { margin-bottom:14px; }
.update-actions { display:flex; flex-wrap:wrap; gap:10px; }
#update-error { margin:14px 0 0; }
.brand-icon { border-radius:7px; flex-shrink:0; }
#install-help { border-top:1px solid var(--line); margin-top:20px; padding-top:8px; }
#install-help ul { padding-left:20px; }
#install-help li { margin-block:12px; }
@media(display-mode:standalone) { #install-help { display:none; } }
@media(max-width:760px) { .top-actions>a { display:none; } .top-actions { gap:8px; } }
.sidebar { overflow-y:auto; }
footer { flex-wrap:wrap; }
.build-info { color:var(--muted); }
.version-status { display:block; margin-top:4px; }
.version-status[data-state="latest"] { color:var(--accent); }
@media(max-width:760px) { .course-nav a:nth-child(3),.course-nav a:nth-child(4) { display:flex; } }
@media(max-width:760px) { .sidebar { overflow:visible; } }
.course-contents-toggle { width:100%; display:flex; align-items:center; justify-content:space-between; gap:16px; padding:10px 14px; font-size:14px; font-weight:650; text-align:left; }
.course-contents-toggle span { color:var(--accent); }
@media(max-width:760px) {
  .sidebar .course-nav,.sidebar .lesson-nav { display:grid; grid-template-columns:minmax(0,1fr); gap:3px; }
  .sidebar .course-nav a,.sidebar .lesson-nav a { display:flex; min-height:44px; padding:10px 14px; font-variant-numeric:tabular-nums; }
  .course-contents-toggle[aria-expanded="true"] { margin-bottom:10px; }
}

/* App status is available on every page, with the pending badge outside its dialog. */
#app-status-open { display:flex; flex-direction:column; align-items:start; line-height:1.4; text-align:left; max-width:230px; }
#app-status-summary { font-size:10px; color:var(--muted); overflow-wrap:anywhere; }
#app-status-dialog { background:var(--panel); color:var(--ink); border:1px solid var(--line); border-radius:12px; padding:24px; width:min(600px,calc(100% - 24px)); max-height:calc(100dvh - 32px); overflow:auto; }
#app-status-dialog::backdrop { background:#0009; }
#app-status-dialog section { border-top:1px solid var(--line); padding-top:20px; margin-top:20px; }
#app-status-dialog h3 { font-size:20px; margin-bottom:10px; }
#app-status-dialog p { font-size:14px; overflow-wrap:anywhere; }
#app-status-dialog .build-info { display:inline; }
.status-heading,.status-actions { display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; }
.status-heading h2 { margin:0; }
.status-actions { justify-content:start; }
#download-progress { margin-top:20px; }
#asset-progress { display:block; width:100%; accent-color:var(--accent); }
#app-status-error { margin-top:16px; }
#app-status-error:empty,#version-detail:empty,#download-behaviour:empty { display:none; }
#version-status,#offline-status { font-weight:600; font-size:18px; margin:0 0 12px; }
#app-status-details { border-top:1px solid var(--line); margin-top:24px; padding-top:16px; }
#app-status-details summary { font-size:14px; }
#restart-note { margin-top:16px; }
.restore-notice { border:2px solid var(--accent); padding:16px; }
@media(max-width:760px) { .topbar { height:auto; min-height:74px; flex-wrap:wrap; gap:8px; padding:10px 16px; } .top-actions { gap:8px; flex-wrap:wrap; } #app-status-open { max-width:180px; } }
@media(prefers-reduced-motion:reduce) { html { scroll-behavior:auto; } }

/* Small reference exercises share the course's native disclosure controls. */
.reference-task { max-width:760px; margin:24px 0; padding:18px 20px; border:1px solid var(--line); border-left:4px solid var(--accent); border-radius:8px; background:var(--accent-soft); overflow-wrap:anywhere; }
.reference-task h3 { display:flex; align-items:flex-start; gap:10px; color:var(--accent); margin:0 0 12px; font-size:16px; line-height:1.5; }
.reference-task p { font-size:inherit; margin:0 0 12px; }
.reference-task details { border-top:1px solid var(--line); margin-top:8px; }
.reference-task .reference-note { color:var(--muted); font-size:12px; margin:12px 0 0; }
.reference-new-tab { font-size:12px; }
.reference-goal { max-width:760px; margin-top:24px; }
@media(max-width:760px) { .reference-task { padding:16px; } }

/* Chapters, appendices and practice have distinct, accessible contents headings. */
.nav-section { display:grid; gap:6px; margin-top:14px; padding-top:16px; border-top:1px solid var(--line); }
.sidebar .nav-group { margin:0 10px 6px; color:var(--ink); font-size:13px; font-weight:700; line-height:1.5; text-transform:uppercase; letter-spacing:.08em; }

.reference-icon { width:22px; height:22px; flex:none; margin-top:1px; }
.reference-code { white-space:pre; overflow-wrap:normal; background:var(--panel); border:1px solid var(--line); border-radius:6px; padding:16px; margin:0 0 16px; font:16px/1.7 ui-monospace,monospace; }
.reference-code code { font:inherit; }

/* References use normal reading text; exercises retain their labelled action cards. */
.chapter-references,.documentation-exercises { max-width:900px; }
.chapter-reference-list { padding-left:22px; }
.chapter-reference-list li { margin:16px 0; padding-left:4px; }
.chapter-reference-list li>a { font-weight:650; }
.chapter-reference-list p { margin:4px 0 0; }
.reference-version { color:var(--muted); font-size:14px; line-height:1.65; margin:20px 0; }
.chapter-references a,.documentation-exercises a { overflow-wrap:anywhere; }

/* Optional desktop actions remain beside the complete code they download. */
.chapter-code-download { display:flex; flex-wrap:wrap; align-items:center; gap:.5rem 1rem; padding:0 1.2rem 1rem; }
.chapter-code-download button,.chapter-code-download a { font-size:.9rem; }
.chapter-code-download [role=status] { flex-basis:100%; font-size:.9rem; }
.chapter-code-download [role=status]:empty { display:none; }
.desktop-index details { margin-block:.75rem; }
.desktop-index li { margin-block:.5rem; }

/* Keep the concept map visible beside app controls, including on phones. */
.top-actions .gpu-map-link { display:inline-flex; align-items:center; min-height:44px; padding:8px 12px; border:1px solid var(--accent); border-radius:6px; color:var(--accent); font-weight:650; }
.top-actions .github-star { display:inline-flex; align-items:center; gap:8px; min-height:44px; padding:8px 12px; border:1px solid var(--line); border-radius:6px; color:var(--ink); font-weight:650; white-space:nowrap; }
.github-star svg { flex:none; }
.github-star:hover { background:var(--accent-soft); border-color:var(--accent); }
@media(min-width:761px) and (max-width:1100px) { .topbar { gap:12px; } .top-actions { gap:8px; } }

@media (hover:hover) { :is(.roadmap,.parallel-roadmap)>a:hover { background:var(--soft); } }

/* Manual reading marks sit with Next, independent of experiment results. */
.lesson-forward { display:flex; flex:1 1 18rem; flex-direction:column; align-items:flex-end; gap:10px; min-width:0; }
.book-pager>.lesson-forward>a,.lesson-pagination>.lesson-forward>a { max-width:100%; justify-content:flex-end; text-align:right; }
.book-pager:has(.lesson-forward)>a,.lesson-pagination:has(.lesson-forward)>a { flex:1 1 14rem; align-self:flex-end; }
.lesson-completion label { display:flex; align-items:center; gap:10px; min-height:44px; padding:8px 12px; border:1px solid var(--line); border-radius:6px; background:var(--panel); cursor:pointer; }
.lesson-completion[data-done="true"] label { background:var(--accent-soft); border-color:var(--accent); }
.lesson-completion input[type="checkbox"] { flex:none; width:20px; height:20px; min-height:20px; margin:0; padding:0; accent-color:var(--accent); }
.lesson-completion p { margin:5px 0 0; max-width:28rem; color:var(--muted); font-size:12px; text-align:right; }
.lesson-link-title { flex:1; min-width:0; }
.lesson-done-tick { flex:none; margin-left:auto; color:var(--accent); font-size:18px; font-weight:750; }
.completion-sr { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
@media(max-width:760px) {
  .lesson-forward { flex-basis:100%; align-items:stretch; }
  .lesson-completion p { text-align:left; }
}

/* Self-hosted type; included in the verified offline release. */
@font-face { font-family:"IBM Plex Mono"; font-style:normal; font-weight:400; font-display:swap; src:url("../assets/fonts/plex-mono-400.woff2") format("woff2"); }
@font-face { font-family:"IBM Plex Mono"; font-style:normal; font-weight:600; font-display:swap; src:url("../assets/fonts/plex-mono-600.woff2") format("woff2"); }
@font-face { font-family:"IBM Plex Sans"; font-style:normal; font-weight:100 700; font-display:swap; src:url("../assets/fonts/plex-sans.woff2") format("woff2"); }

/* Technical field guide: quiet navigation, generous reading measure, purposeful colour. */
body { font-family:"IBM Plex Sans",system-ui,sans-serif; font-size:17px; line-height:1.7; }
h1,h2,h3 { font-weight:600; }
h1 { font-size:clamp(36px,4vw,58px); line-height:1.12; letter-spacing:-.045em; max-width:22ch; text-wrap:balance; }
h2 { letter-spacing:-.025em; }
.topbar { background:var(--panel); padding-inline:clamp(18px,3vw,44px); }
.brand { font-size:22px; letter-spacing:-.03em; font-weight:600; }
.brand-note { letter-spacing:0; }
.top-actions { gap:10px; }
.top-actions button,.top-actions .github-star { border-color:transparent; background:transparent; }
.top-actions button:hover,.top-actions .github-star:hover { border-color:var(--line); background:var(--soft); }
.top-actions .gpu-map-link { background:var(--accent-soft); border-color:transparent; padding-inline:16px; }
#app-status-summary { font-size:11px; }
.sidebar { background:var(--soft); border-right:0; padding:32px 16px; }
.sidebar>.eyebrow { font-family:inherit; font-size:12px; letter-spacing:.035em; }
.sidebar-title { font-size:23px; margin-bottom:26px; letter-spacing:-.03em; }
.sidebar nav a { font-size:14px; line-height:1.5; padding:11px 13px; border-radius:6px; }
.sidebar nav a.current { background:var(--panel); box-shadow:inset 3px 0 var(--accent); }
.sidebar .nav-group { color:var(--muted); font-size:12px; letter-spacing:.02em; text-transform:none; }
.nav-section { border-top-color:var(--line); }
.sidebar-bottom { font-size:12px; }
.eyebrow { font-family:inherit; font-size:13px; font-weight:600; letter-spacing:.025em; }
.intro>p,.book-section>p,.hello-section>p,.hello-start>p,.book-start>p,.chapter-references>p { max-width:68ch; }
button,input,select { border-radius:7px; }
button.primary { padding-inline:20px; font-weight:600; box-shadow:0 2px 0 #00000012; }
button:focus-visible,a:focus-visible { outline-offset:4px; }
:is(.roadmap,.parallel-roadmap)>a { padding:24px 12px; border-radius:6px; }
:is(.roadmap,.parallel-roadmap) h3 { font-size:19px; font-weight:600; letter-spacing:-.02em; }
:is(.roadmap,.parallel-roadmap) p { font-size:15px; max-width:65ch; }
.module-no { font-family:"IBM Plex Mono",monospace; font-size:14px; }
.more-settings { border:0; border-block:1px solid var(--line); border-radius:0; padding:14px 0; background:transparent; }
.reference-task { border-left-width:2px; background:var(--panel); }
@media(max-width:760px) {
 .sidebar { padding:12px 20px; }
 .topbar { gap:8px; padding:12px 16px; }
 .top-actions { gap:4px; }
 .top-actions button,.top-actions .github-star,.top-actions .gpu-map-link { padding:7px 9px; }
 main { padding-top:28px; }
 h1 { font-size:38px; }
 :is(.roadmap,.parallel-roadmap)>a { padding-inline:0; }
}

/* Keep the mobile reading area visible: two rows in natural keyboard order. */
@media(max-width:760px) {
 .topbar { display:grid; grid-template-columns:auto minmax(0,1fr) auto auto; align-items:center; gap:6px; }
 .top-actions { display:contents; }
 .topbar .brand { grid-column:1 / 3; grid-row:1; }
 .topbar #app-status-open { grid-column:3 / 5; grid-row:1; justify-self:end; }
 .topbar #install { grid-column:1; grid-row:2; }
 .topbar .gpu-map-link { grid-column:2; grid-row:2; justify-self:start; }
 .topbar .github-star { grid-column:3; grid-row:2; justify-self:end; }
 .topbar #theme { grid-column:4; grid-row:2; }
 .topbar .github-star span { display:none; }
 .topbar .github-star { min-width:44px; justify-content:center; }
}

/* A verified complete course has a quiet visual confirmation beside its text. */
.course-state { display:flex; align-items:flex-start; gap:10px; }
#course-ready-icon { width:20px; height:20px; margin-top:2px; flex:none; fill:none; stroke:var(--accent); stroke-width:2.5; stroke-linecap:round; stroke-linejoin:round; }
@media (forced-colors:active) { #course-ready-icon { stroke:CanvasText; } }

/* Copyright © 2026 Christopher Snow. Shared course header icon controls. */
header button:is(.lab-header-control, .lab-header-runner) {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex: 0 0 auto !important;
  flex-direction: row !important;
  width: auto !important;
  height: auto !important;
  min-width: 48px !important;
  min-height: 48px !important;
  max-width: none !important;
  padding: 8px 12px !important;
  margin: 0;
  border: 0 !important;
  border-radius: 8px !important;
  background: transparent !important;
  color: inherit !important;
  font-size: max(14px, 1em) !important;
  line-height: 1.4 !important;
  position: relative;
  box-sizing: border-box;
  gap: 8px !important;
  cursor: pointer;
  box-shadow: none !important;
  vertical-align: middle;
}
header button:is(.lab-header-control, .lab-header-runner):hover {
  background: color-mix(in srgb, currentColor 9%, transparent) !important;
}
header button:is(.lab-header-control, .lab-header-runner):active {
  background: color-mix(in srgb, currentColor 16%, transparent) !important;
}
header button:is(.lab-header-control, .lab-header-runner):focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}
header button:is(.lab-header-control, .lab-header-runner):disabled {
  opacity: 0.55;
  cursor: wait;
}
header button.lab-header-control > :not(.lab-header-visual):not(.lab-header-label) {
  display: none !important;
}
.lab-header-label {
  display: inline !important;
  font: inherit;
  white-space: nowrap;
  pointer-events: none;
}
header:has(.lab-header-control),
header:has(.lab-header-control) > div {
  flex-wrap: wrap;
  row-gap: 12px;
}
header:has(.lab-header-control) :is(nav, .top-actions, .global-nav, .header-actions) {
  flex-wrap: wrap;
  min-width: 0;
  max-width: 100%;
  row-gap: 8px;
}
.lab-header-visual {
  display: inline-flex;
  position: relative;
  width: 24px;
  height: 24px;
  flex: none;
  pointer-events: none;
}
.lab-header-visual > svg {
  display: block !important;
  width: 24px !important;
  height: 24px !important;
  fill: currentColor !important;
  stroke: none !important;
}
.lab-header-badge {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  right: -6px;
  bottom: -5px;
  width: 13px;
  height: 13px;
  color: inherit;
  border-radius: 50%;
  background: Canvas;
}
.lab-header-badge > svg {
  display: block;
  width: 13px;
  height: 13px;
  fill: currentColor;
}
.lab-header-badge[data-badge="update"] {
  right: -4px;
  top: -3px;
  bottom: auto;
  width: 8px;
  height: 8px;
  background: currentColor;
  outline: 2px solid Canvas;
}
.header-theme-settings {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
}
@media (forced-colors: active) {
  .lab-header-badge {
    background: Canvas;
    color: ButtonText;
  }
}

/* The terminal icon stays beside the native two-line runner label and status. */
header button.lab-header-runner {
  display: grid !important;
  grid-template-columns: 24px auto;
  grid-template-rows: auto auto;
  column-gap: 8px !important;
  row-gap: 0 !important;
  text-align: left;
}
header button.lab-header-runner > .lab-runner-icon {
  grid-column: 1;
  grid-row: 1 / 3;
  align-self: center;
}
header button.lab-header-runner > .lab-runner-label {
  grid-column: 2;
  grid-row: 1;
  font: inherit;
  white-space: nowrap;
}
header button.lab-header-runner > :is(#runner-summary, #code-runner-summary, #runner-state) {
  grid-column: 2;
  grid-row: 2;
  display: block;
  text-align: left;
  white-space: nowrap;
}
