/* Depth workspace: editorial layout, restrained surfaces, shared reading/editor rhythm. */
:root{--paper:#faf9f6;--subtle:#f1f0eb;--ink:#252b28;--muted:#69716b;--line:#dedfd7;--accent:#2c6155;--tint:#eaf0eb;--radius:5px;font-family:"IBM Plex Sans",-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}
body{font-size:16px}::selection{background:#dce9df}h1{font-family:"Source Serif 4",Georgia,serif;font-weight:400;letter-spacing:-.035em}h2,h3,h4{letter-spacing:-.02em}.primary:hover{background:#234c43}.secondary{border-color:var(--line);color:var(--ink);background:#fff}.primary,.secondary{min-height:40px;padding:10px 16px}.eyebrow{font-size:10px;letter-spacing:.12em}.site-header{height:68px;max-width:none;padding:0 max(28px,calc((100vw - 1280px)/2));background:var(--paper)}.wordmark{font-family:"Source Serif 4",Georgia,serif;font-size:29px;font-weight:600}.site-header nav{gap:25px}.site-header nav a{font-size:13px}.site-header nav a[aria-current=page]{box-shadow:none;color:var(--accent);font-weight:650}.site-header nav a[aria-current=page]:after{content:"";display:block;width:4px;height:4px;background:var(--accent);border-radius:50%;margin:4px auto -8px}.notebook-banner{max-width:1280px;margin:auto;font-size:11px;padding:7px 0;border:0}.site-footer{max-width:1280px;padding:22px 0;font-size:11px}.course-overview{max-width:1200px;padding:50px 32px 80px}.course-heading{max-width:800px;margin:0 0 36px}.course-heading h1{font-size:48px;margin-bottom:16px}.course-heading .lede{font-size:17px;line-height:1.7;max-width:610px}.course-meta{display:flex;gap:22px;flex-wrap:wrap;font-size:11px;margin:20px 0 0}.course-meta span+span:before{content:"·";margin-right:22px;color:#92998f}.guide-workspace{display:grid;grid-template-columns:minmax(0,1fr) 280px;gap:64px;border-top:1px solid var(--line);padding-top:30px}.contents-heading{display:flex;align-items:center;justify-content:space-between;margin-bottom:30px}.contents-heading h2{font-size:20px;margin:0}.contents-heading>span{font-size:11px;color:var(--muted)}.contents-group>.eyebrow{display:flex;gap:12px;align-items:center;margin:0 0 6px}.contents-group>.eyebrow span{font-family:"JetBrains Mono",ui-monospace,monospace;color:#90998e}.contents-group{margin-bottom:34px}.chapter-row{padding:19px 0;grid-template-columns:24px minmax(0,1fr) 65px;gap:15px}.chapter-row strong{font-size:15px;font-weight:570;line-height:1.5}.chapter-row>span:nth-child(2)>span{font-size:12px;line-height:1.6;margin-top:6px}.chapter-number{font-family:"JetBrains Mono",ui-monospace,monospace;font-size:11px}.reading-time{font-size:10px}.reading-time>span{display:inline-block;margin-left:7px;color:var(--accent)}.study-sidebar{align-self:start;position:sticky;top:28px}.resume-panel{padding:24px;background:var(--tint);border-radius:5px}.resume-panel h2{font-family:"Source Serif 4",Georgia,serif;font-weight:400;font-size:25px;margin:0 0 12px}.resume-panel p:not(.eyebrow){font-size:12px;line-height:1.75;color:var(--muted)}.resume-panel .primary{width:100%;font-size:12px}.study-links{margin-top:24px}.study-links a{display:block;padding:18px 0;border-bottom:1px solid var(--line);text-decoration:none;color:var(--ink)}.study-links strong{display:flex;justify-content:space-between;font-weight:550;font-size:13px}.study-links small{display:block;font-size:11px;color:var(--muted);margin-top:4px}.study-note{font-size:11px;color:var(--muted);line-height:1.8;margin-top:22px}
.reader-shell{max-width:1400px;grid-template-columns:238px minmax(0,1fr)}.reader-sidebar{background:transparent}.chapter-nav{padding:30px 22px}.guide-name{font-size:13px}.nav-group a{border-radius:4px}.chapter-main{max-width:850px;padding:38px 52px 70px;margin:0 auto;width:100%}.chapter-header h1{font-size:42px;max-width:700px}.chapter-deck{font-size:18px;color:var(--muted)}.chapter-objectives{background:var(--subtle);border:0;border-radius:4px;padding:20px 24px}.on-this-page{border-color:var(--line)}.teaching-section{padding-top:12px}.teaching-section>h2,.worked-example h2{font-size:25px;font-weight:560}.teaching-section>.rich-content{font-size:16px;line-height:1.85}.code-example{border:1px solid var(--line);border-radius:5px;overflow:hidden}.code-example figcaption{background:#edeFE9;font-size:10px;letter-spacing:.03em}pre{background:#f2f3ee;font-size:12px;line-height:1.8}.comparison th,.comparison td{font-size:13px}.chapter-takeaway{background:var(--tint);border-color:var(--accent)}.case-study{border-radius:4px}.case-study>summary{padding:20px}.visual-model{background:#f1f4ef;border-color:#d7dfd4;border-radius:5px}.visual-title h3{font-size:25px;font-weight:500}.flow-node.is-active,.decision-branch>button[aria-pressed=true]{border-color:var(--accent);background:var(--tint)}.chart-bar.selected,.mobile-chart-track .selected{fill:var(--accent);background:var(--accent)}.chapter-tutor{border-radius:6px;box-shadow:none}.tutor-launcher{font-size:12px;box-shadow:0 2px 8px #253b3010}.narrow,.practice-page{padding-top:42px}.narrow h1,.practice-heading h1{font-size:42px}.practice-heading{margin-bottom:32px}.practice-card{background:#fff;padding:24px}.practice-card h3{font-size:20px}.practice-card p{font-size:13px}
.admin-page{max-width:1400px;padding-top:26px}.editor-top h1{font-family:inherit;font-size:26px;font-weight:570;letter-spacing:-.025em;margin-bottom:8px}.editor-top .eyebrow{font-size:10px;margin-bottom:8px}.editor-top p{font-size:13px}.editor-toolbar{padding:12px 0;background:var(--paper)}.editor-layout{grid-template-columns:220px minmax(0,1fr);gap:32px}.editor-outline button{font-size:12px;padding:9px 12px}.editor-fields:not(.rich-focus-mode){background:#fff;padding:28px;border:1px solid var(--line);border-radius:5px;max-width:none}.editor-fields h2{font-size:22px}.editor-fields>.meta{font-size:12px}.editor-field>span{font-size:11px}.editor-field input,.editor-field textarea{font-size:14px;padding:10px 12px}.rich-toolbar{box-shadow:none;background:var(--paper);border-color:var(--line)}.rich-toolbar button[aria-pressed=true]{background:var(--tint);border-color:#acc2b6;color:var(--accent)}[data-rich-toolbar]{top:96px;margin:18px 0 26px}.tiptap{font-size:16px;line-height:1.85;min-height:160px}.rich-field-active{border-color:#92b1a3!important}.editor-status{font-size:12px;margin:12px 0 22px}.rich-focus-mode{background:#fff!important}.rich-focus-mode [data-rich-toolbar]{top:-26px}
@media(min-width:1281px){.reader-shell.has-tutor{max-width:1600px;grid-template-columns:210px minmax(0,1fr) 350px}.has-tutor .chapter-main{padding:32px 36px;max-width:800px}}
@media(max-width:1000px){.guide-workspace{gap:32px;grid-template-columns:minmax(0,1fr) 240px}.chapter-main{padding:32px}.site-footer{margin:0 28px}.notebook-banner{padding:7px 28px}}
@media(max-width:900px){.reader-shell{display:block}.chapter-nav{padding:16px 24px}.editor-layout{grid-template-columns:1fr;gap:18px}.editor-fields:not(.rich-focus-mode){padding:20px}.editor-outline{max-height:150px}.study-sidebar{position:static}[data-rich-toolbar]{top:0}.editor-fields.rich-focus-mode{padding:18px}.rich-focus-mode [data-rich-toolbar]{top:-18px}}
@media(max-width:650px){.site-header{height:auto;min-height:94px;padding:12px 20px;gap:8px}.site-header nav{width:100%;gap:20px;overflow-x:auto;white-space:nowrap;scrollbar-width:thin}.site-header nav a{font-size:12px;padding:6px 0}.notebook-banner{padding:7px 20px;font-size:10px}.course-overview{padding:28px 20px 48px}.course-heading h1{font-size:37px}.course-heading .lede{font-size:15px}.course-meta{gap:10px;font-size:10px}.course-meta span+span:before{margin-right:10px}.guide-workspace{display:flex;flex-direction:column;gap:28px;padding-top:24px}.study-sidebar{order:-1;width:100%}.resume-panel{padding:18px}.resume-panel h2{font-size:23px}.resume-panel>p:not(.eyebrow){display:none}.resume-panel .primary{width:auto;margin-top:5px}.study-links,.study-note{display:none}.contents-heading{margin-bottom:26px}.chapter-row{grid-template-columns:20px minmax(0,1fr) 44px;gap:10px;padding:18px 0}.chapter-row strong{font-size:14px}.reading-time>span{display:none}.chapter-main{padding:28px 20px 48px}.chapter-header h1{font-size:34px}.chapter-deck{font-size:16px}.chapter-objectives{padding:18px}.teaching-section>h2{font-size:23px}.narrow h1,.practice-heading h1{font-size:36px}.admin-page{padding:22px 14px 50px}.editor-fields:not(.rich-focus-mode){padding:16px}.editor-actions{gap:6px}.editor-actions button{padding:9px 10px;font-size:12px}.editor-top h1{font-size:25px}.editor-top>a{font-size:12px;margin:0 0 16px}.site-footer{margin:0 20px;flex-direction:column;gap:8px}.rich-focus-mode [data-rich-toolbar]{top:-18px}}

/* Adapted from Lovable's Depth design handoff: palette, reading type, code surfaces and section rail. */
:root {
  --paper: oklch(0.982 0.006 85);
  --ink: oklch(0.24 0.008 70);
  --muted: oklch(0.47 0.01 70);
  --subtle: oklch(0.955 0.008 85);
  --accent: oklch(0.44 0.065 172);
  --tint: oklch(0.94 0.022 170);
  --line: oklch(0.885 0.01 80);
  --code-surface: oklch(0.255 0.01 70);
  --code-text: oklch(0.93 0.008 85);
  --radius: 6px;
}
body { font-family: "IBM Plex Sans", system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.site-header { height: 58px; }
.wordmark { font-size: 26px; }
.site-header nav a[aria-current=page] { border-bottom: 2px solid var(--accent); padding-bottom: 6px; }
.site-header nav a[aria-current=page]:after { display: none; }
.course-heading h1 { font-size: 42px; }
.course-heading .lede { font-family: "Source Serif 4", Georgia, serif; font-size: 19px; }
.contents-group>.eyebrow { border-bottom: 1px solid var(--ink); padding-bottom: 10px; }
.chapter-row>span:nth-child(2)>span { font-size: 13px; }
.chapter-row .reading-time { grid-column: auto; margin: 0; text-align: right; }
.nav-group li a[aria-current=page] { background: var(--tint); }
.teaching-section>.rich-content, .worked-example>.rich-content, .tiptap {
  font-family: "Source Serif 4", Georgia, serif; font-size: 18px; line-height: 1.65;
}
.teaching-section>.rich-content>p { line-height: 1.65; }
.teaching-section>h2 { padding-top: 24px; border-top: 1px solid var(--line); font-size: 23px; }
.tiptap h1, .tiptap h2, .tiptap h3 { font-family: "IBM Plex Sans", system-ui, sans-serif; }
pre, code { font-family: "JetBrains Mono", ui-monospace, monospace; }
pre, .tiptap pre { background: var(--code-surface); color: var(--code-text); font-size: 13px; line-height: 1.7; }
pre code { background: transparent; color: inherit; border: 0; }
.code-example figcaption { background: var(--code-surface); color: #c8cec8; border-color: #4a4e49; }
.section-rail { display: none; }
.notebook-page h2 { font-size: 22px; font-weight: 550; }
.notebook-page .lede { font-size: 17px; line-height: 1.65; }
.sync-card { padding: 12px 16px; }
@media(min-width:1281px) {
  .reader-shell:not(.has-tutor) { grid-template-columns: 210px minmax(0,1fr) 200px; }
  .section-rail { display: block; position: sticky; top: 30px; padding: 38px 20px 24px 0; }
  .section-rail a { display: block; padding: 8px 0 8px 14px; border-left: 1px solid var(--line); font-size: 12px; line-height: 1.5; color: var(--muted); text-decoration: none; }
  .section-rail a:hover, .section-rail a:focus-visible { color: var(--accent); border-color: var(--accent); }
  .section-rail .section-notes { margin-top: 16px; }
  .has-tutor .section-rail { display: none; }
  .reader-shell:not(.has-tutor) .on-this-page { display: none; }
  .chapter-main { padding-left: 40px; padding-right: 40px; }
}
@media(max-width:650px) {
  .site-header { height: auto; }
  .course-heading h1 { font-size: 35px; }
  .course-heading .lede { font-size: 17px; }
  .chapter-row>span:nth-child(2)>span { font-size: 12px; }
  .teaching-section>.rich-content, .tiptap { font-size: 17px; }
  pre, .tiptap pre { font-size: 12px; }
}

/* The library is the multi-topic entry point; a guide owns its chapter index. */
.topic-library { max-width: 1200px; min-height: calc(100dvh - 180px); margin: auto; padding: 50px 32px 70px; }
.library-intro { max-width: 690px; margin-bottom: 36px; }
.library-intro h1 { font-size: 42px; margin: 0 0 16px; }
.library-intro .lede { font-family: "Source Serif 4", Georgia, serif; font-size: 19px; line-height: 1.7; }
.library-resume { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 20px 24px; margin: 0 0 38px; background: var(--tint); border-radius: var(--radius); }
.library-resume .eyebrow { margin: 0 0 7px; }
.library-resume h2 { margin: 0; font-size: 17px; font-weight: 550; }
.library-resume .secondary { white-space: nowrap; background: transparent; border-color: #a8bcb2; font-size: 13px; }
.library-section-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding-bottom: 15px; border-bottom: 1px solid var(--ink); }
.library-section-heading h2 { margin: 0; font-size: 20px; font-weight: 550; }
.library-section-heading>span { font-size: 12px; color: var(--muted); }
.library-guide { display: grid; grid-template-columns: 32px minmax(0,1fr) auto; align-items: start; gap: 24px; padding: 34px 0; border-bottom: 1px solid var(--line); }
.library-guide-number { font-family: "JetBrains Mono", monospace; color: var(--muted); font-size: 11px; padding-top: 3px; }
.library-guide-body .eyebrow { margin: 0 0 12px; }
.library-guide-body h3 { font-family: "Source Serif 4", Georgia, serif; font-size: 30px; font-weight: 400; margin: 0 0 12px; }
.library-guide-body h3 a { color: var(--ink); text-decoration: none; }
.library-guide-body h3 a:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 4px; }
.library-guide-body>p:not(.eyebrow) { max-width: 650px; color: var(--muted); font-size: 15px; line-height: 1.7; margin: 0 0 20px; }
.library-guide-meta { display: flex; flex-wrap: wrap; gap: 10px 22px; font-size: 12px; color: var(--muted); }
.library-guide-action { align-self: center; font-size: 13px; white-space: nowrap; }
.library-footnote { color: var(--muted); font-size: 13px; max-width: 620px; line-height: 1.7; margin: 28px 0 0 56px; }
.library-back { display: inline-block; margin-bottom: 26px; font-size: 12px; }
@media(max-width:650px) {
  .topic-library { padding: 28px 20px 48px; }
  .library-intro h1 { font-size: 35px; }
  .library-intro .lede { font-size: 17px; }
  .library-resume { display: block; padding: 18px; }
  .library-resume .secondary { display: inline-flex; margin-top: 16px; }
  .library-guide { grid-template-columns: 20px minmax(0,1fr); gap: 16px; padding: 26px 0; }
  .library-guide-body h3 { font-size: 27px; }
  .library-guide-action { grid-column: 2; justify-self: start; }
  .library-guide-meta { gap: 8px 16px; }
  .library-footnote { margin-left: 0; }
}

/* Reading and visual views belong to the same guide. */
.visual-guide-return{display:inline-block;margin:0 0 28px 22px;font-size:12px;color:var(--accent);text-decoration:none}.visual-guide-sidebar{display:block;font-size:11px;color:var(--accent);text-decoration:none;margin-top:10px}.visual-guide-return:hover,.visual-guide-sidebar:hover{text-decoration:underline;text-underline-offset:4px}
