:root {
  color-scheme: light;
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'SFMono-Regular', 'Cascadia Code', Consolas, monospace;
  --bg: #ffffff; --bg-secondary: #f6f8fa; --text: #1f2328;
  --text-muted: #656d76; --text-secondary: #656d76; --border: #d0d7de;
  --accent: #2563eb; --accent-subtle: #ddf4ff;
  --ink: var(--text); --muted: var(--text-secondary);
  --rust: #963f25; --rust-soft: #f3e1d6;
  --sage: #3f624a; --sage-soft: #e3eadf;
  --gold: #806019; --gold-soft: #eee5c9;
  --blue: #335773; --blue-soft: #e2eaf0;
}
[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0f172a; --bg-secondary: #1e293b; --text: #f1f5f9;
  --text-muted: #94a3b8; --text-secondary: #94a3b8; --border: #334155;
  --accent: #60a5fa; --accent-subtle: #1f2a38;
  --rust: #f0b092; --rust-soft: #49372e;
  --sage: #b0d1ad; --sage-soft: #364932;
  --gold: #e9ce8b; --gold-soft: #49422d;
  --blue: #b0cde0; --blue-soft: #30414c;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    color-scheme: dark;
    --bg: #0f172a; --bg-secondary: #1e293b; --text: #f1f5f9;
    --text-muted: #94a3b8; --text-secondary: #94a3b8; --border: #334155;
    --accent: #60a5fa; --accent-subtle: #1f2a38;
    --rust: #f0b092; --rust-soft: #49372e;
    --sage: #b0d1ad; --sage-soft: #364932;
    --gold: #e9ce8b; --gold-soft: #49422d;
    --blue: #b0cde0; --blue-soft: #30414c;
  }
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  max-width: 780px; margin: 0 auto; padding: 0 1.5rem 2rem;
  font: 16px/1.7 var(--font-sans); color: var(--text); background: var(--bg);
}
body.kitchen-index { max-width: 680px; font-family: var(--font); }
a { color: var(--accent); overflow-wrap: anywhere; text-underline-offset: .2em; }
a:hover { text-decoration-thickness: 2px; }
button, a, summary { touch-action: manipulation; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
[id] { scroll-margin-top: 2rem; }
.skip { position: absolute; left: 1rem; top: -6rem; padding: .75rem; background: var(--bg); z-index: 10001; }
.skip:focus { top: 1rem; }
.site-header-wrapper { max-width: 680px; margin: 0 auto; padding: 0 1.5rem; }
.kitchen-index .site-header-wrapper { padding: 0; }
.site-header { padding: 3rem 0 2rem; margin-bottom: 2rem; border-bottom: 1px solid var(--border); }
.kitchen-index .site-header { margin-bottom: 3rem; }
.site-nav { display: flex; align-items: center; justify-content: space-between; }
.site-name { font: 700 1.125rem/1.7 var(--font); color: var(--text); text-decoration: none; }
.site-name:hover { color: var(--accent); }
.nav-links { display: flex; gap: 1.5rem; align-items: center; }
.nav-links a { font: 500 .875rem/1.7 -apple-system, sans-serif; color: var(--text-secondary); text-decoration: none; }
.nav-links a:hover, .nav-links a.active { color: var(--text); }
.theme-btn { background: none; border: none; cursor: pointer; color: var(--text-secondary); padding: .25rem; min-width: 44px; min-height: 44px; }
.theme-btn:hover { color: var(--text); }
.theme-btn svg { display: block; margin: auto; }
main, article { min-width: 0; overflow-wrap: anywhere; }
h1, h2, h3 { font-weight: 700; text-wrap: balance; }
h1 { font-size: 1.875rem; line-height: 1.3; margin-bottom: .75rem; }
.kitchen-index h1 { font-size: 2rem; letter-spacing: -.025em; }
h2 { font-size: 1.375rem; line-height: 1.4; margin: 2.5rem 0 .75rem; padding-top: 1rem; border-top: 1px solid var(--border); }
h3 { font-size: 1.125rem; line-height: 1.4; margin: 1.75rem 0 .5rem; }
p { margin-bottom: 1rem; }
.blog-header { padding-bottom: 2rem; margin-bottom: 2rem; border-bottom: 1px solid var(--border); }
.blog-meta { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; font-size: .875rem; color: var(--text-muted); }
.blog-meta .tag { background: var(--accent-subtle); color: var(--accent); padding: .15rem .5rem; border-radius: 3px; font-size: .75rem; font-weight: 600; }
.article-meta { font-size: .875rem; color: var(--text-muted); margin-top: 1rem; }
.eyebrow, .prereqs, .guide-link { font-size: .875rem; color: var(--text-secondary); margin-bottom: 1rem; }
.eyebrow { font-family: var(--font-mono); font-size: .75rem; }
.hero { margin: 1.5rem 0 2rem; overflow: hidden; background: var(--bg-secondary); border: 1px solid var(--border); border-radius: 12px; }
.hero svg { width: 100%; height: auto; aspect-ratio: 1200 / 380; display: block; }
.hero .arrive { animation: arrive .65s ease-out both; transform-box: fill-box; transform-origin: center; }
@keyframes arrive { from { opacity: .3; transform: translateY(9px); } to { opacity: 1; transform: translateY(0); } }
.breadcrumb { font-size: .8125rem; color: var(--text-secondary); margin-bottom: 1.5rem; }
.breadcrumb a { color: var(--text-secondary); text-decoration: none; }
.breadcrumb a:hover { color: var(--accent); }
.intro, .series-desc { font-size: 1rem; line-height: 1.6; color: var(--text-secondary); margin-bottom: 1.5rem; }
.series-status { display: inline-flex; gap: .5rem; padding: .375rem .875rem; margin-bottom: 2rem; border-radius: 6px; font-size: .8125rem; font-weight: 600; color: #166534; background: #f0fdf4; }
[data-theme="dark"] .series-status { color: #bbf7d0; background: #163b27; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .series-status { color: #bbf7d0; background: #163b27; }
}
.course-list { list-style: none; margin: 2rem 0; }
.course-list li { display: flex; align-items: flex-start; gap: 1rem; padding: 1.25rem 0; border-bottom: 1px solid var(--border); }
.course-list li:first-child { border-top: 1px solid var(--border); }
.course-list li > div { flex: 1; min-width: 0; }
.course-list .number { min-width: 2rem; padding-top: .125rem; font: 600 .8125rem/1.7 var(--font-mono); color: var(--text-secondary); }
.course-list h2 { font-size: 1.0625rem; font-weight: 600; margin: 0 0 .25rem; padding: 0; border: 0; }
.course-list h2 a { text-decoration: none; }
.course-list h2 a:hover { text-decoration: underline; }
.course-list p { margin: 0; font-size: .875rem; line-height: 1.5; color: var(--text-secondary); }
.scope, .guide-note { padding: 1.25rem; margin: 1.5rem 0; border: 1px solid var(--border); border-radius: 8px; background: var(--bg-secondary); color: var(--text-secondary); font-size: .9rem; }
.scope p:last-child, .guide-note p:last-child { margin: 0; }
dfn { font-style: normal; font-weight: 700; text-decoration: underline; text-decoration-color: var(--border); text-underline-offset: 5px; }
.lesson-body figure { margin: 2rem 0; padding: 1.25rem; background: var(--bg-secondary); border: 1px solid var(--border); border-radius: 8px; }
.diagram-stage { max-width: 380px; margin: 0 auto; }
.diagram-stage svg { display: block; width: 100%; height: auto; }
.diagram-stage text { font: 18px var(--font); fill: var(--ink); }
.diagram-stage .fine { font-size: 17px; }
:is(.diagram-stage, .hero) .ink { stroke: var(--ink); fill: none; stroke-width: 2; }
:is(.diagram-stage, .hero) .rust { fill: var(--rust-soft); stroke: var(--rust); stroke-width: 2; }
:is(.diagram-stage, .hero) .sage { fill: var(--sage-soft); stroke: var(--sage); stroke-width: 2; }
:is(.diagram-stage, .hero) .gold { fill: var(--gold-soft); stroke: var(--gold); stroke-width: 2; }
:is(.diagram-stage, .hero) .blue { fill: var(--blue-soft); stroke: var(--blue); stroke-width: 2; }
:is(.diagram-stage, .hero) .wire { fill: none; stroke: var(--muted); stroke-width: 2; }
:is(.diagram-stage, .hero) .accent-wire { fill: none; stroke: var(--rust); stroke-width: 4; }
figcaption { margin-top: 1rem; color: var(--text-secondary); font-size: .875rem; line-height: 1.6; }
.flow { list-style: none; margin: .75rem 0; display: grid; gap: 14px; font-size: 1rem; line-height: 1.55; }
.flow li { position: relative; padding: 14px 18px; background: var(--rust-soft); border-radius: 4px; }
.flow li:nth-child(2n) { background: var(--sage-soft); }
.flow li:nth-child(3n) { background: var(--blue-soft); }
.flow li + li::before { content: "\2193"; position: absolute; top: -20px; left: 18px; color: var(--muted); line-height: 20px; }
.flow.choices li + li::before { content: none; }
.flow strong, .flow span { display: block; }
.flow span { margin-top: 4px; }
.lesson-body details, .article-toc-details { margin: 1.5rem 0 2rem; background: var(--bg-secondary); border: 1px solid var(--border); border-radius: 8px; padding: 1rem 1.25rem; }
summary { cursor: pointer; font-size: .875rem; font-weight: 600; }
summary:hover { color: var(--accent); }
.lesson-body details p { margin: 1rem 0 0; }
.article-toc-nav ol { margin: .75rem 0 0 1.25rem; list-style: decimal; }
.article-toc-nav li { margin-bottom: .375rem; font-size: .875rem; line-height: 1.5; }
.article-toc-nav a { color: var(--text-secondary); text-decoration: none; }
.article-toc-nav a:hover { color: var(--accent); }
.chapter-nav { display: flex; gap: 1.5rem; justify-content: space-between; margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--border); font-size: .875rem; }
.chapter-nav a { max-width: 46%; }
.chapter-map { display: flex; flex-wrap: wrap; gap: .5rem; font-size: .875rem; line-height: 1.5; }
.chapter-map a { background: var(--bg-secondary); border: 1px solid var(--border); border-radius: 6px; padding: .5rem .75rem; }
dl { margin: 1.5rem 0; }
dt { font-size: 1rem; font-weight: 600; margin-top: 1.5rem; }
dd { margin: .5rem 0 0; }
dd small { display: block; margin-top: .5rem; color: var(--text-secondary); font-size: .8125rem; }
.site-footer { margin-top: 4rem; padding: 2rem 0; border-top: 1px solid var(--border); text-align: center; font-family: var(--font); }
.footer-links { display: flex; justify-content: center; gap: 1.5rem; margin-bottom: .75rem; }
.site-footer a, .site-footer p { color: var(--text-secondary); font-size: .8125rem; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--text); }
.site-footer p { margin: 0; }
.breadcrumb-bar, .series-banner-link { flex-wrap: wrap; }
.series-banner-title { min-width: 0; }
.page-toolbar { padding: 0 !important; }
.series-prev:empty { display: none; }
@media (max-width: 600px) {
  .site-header-wrapper { padding: 0; }
  .site-nav, .nav-links { flex-wrap: wrap; gap: 1rem; }
  .hero svg { aspect-ratio: 1200 / 520; }
  .lesson-body figure { padding: .85rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
@media print {
  .site-header-wrapper, .hero, .chapter-nav, .skip, .guide-link { display: none; }
  .lesson-body details > p { display: block; }
  figure { break-inside: avoid; }
}
