@import url('https://fonts.googleapis.com/css2?family=DM+Mono:wght@400;500&family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@400;500;600;700;800&display=swap');

:root {
  color-scheme: light;
  --ink: #17212b;
  --muted: #69747e;
  --faint: #98a1a8;
  --paper: #fbfaf7;
  --surface: #ffffff;
  --surface-alt: #f3f3ef;
  --line: #e7e7e1;
  --sidebar: #151d27;
  --sidebar-ink: #e8edf0;
  --sidebar-muted: #9aa8b2;
  --accent: #bd5839;
  --accent-deep: #99432c;
  --accent-soft: #f8ebe5;
  --teal: #537f79;
  --teal-soft: #e7f0ed;
  --gold: #c3954a;
  --shadow: 0 18px 50px rgba(34, 41, 46, .06);
  --sidebar-width: 292px;
  font-family: "DM Sans", "Segoe UI", sans-serif;
  scroll-behavior: smooth;
}

[data-theme="dark"] {
  color-scheme: dark;
  --ink: #e4e9e9;
  --muted: #a3afb4;
  --faint: #7e8d92;
  --paper: #10171b;
  --surface: #182126;
  --surface-alt: #202b30;
  --line: #2a383d;
  --sidebar: #0c1217;
  --sidebar-ink: #e7edee;
  --sidebar-muted: #94a3aa;
  --accent: #e08b6e;
  --accent-deep: #f0a184;
  --accent-soft: #382720;
  --teal: #86b8af;
  --teal-soft: #21332f;
  --gold: #dfb566;
  --shadow: 0 18px 50px rgba(0, 0, 0, .2);
}

* { box-sizing: border-box; }
html { scroll-padding-top: 88px; }
body { margin: 0; background: var(--paper); color: var(--ink); }
a { color: inherit; }
button, input { font: inherit; }
button { color: inherit; }
::selection { color: #fff; background: var(--accent); }

.skip-link {
  position: fixed; z-index: 20; top: 10px; left: 10px;
  padding: 10px 14px; transform: translateY(-160%);
  background: var(--surface); color: var(--ink); border-radius: 6px;
}
.skip-link:focus { transform: translateY(0); }
.reading-progress { position: fixed; z-index: 30; inset: 0 0 auto; height: 3px; background: transparent; }
.reading-progress span { display: block; width: 0; height: 100%; background: var(--accent); transition: width .1s linear; }
.site-shell { min-height: 100vh; }

.sidebar {
  position: fixed; z-index: 12; inset: 0 auto 0 0; display: flex; flex-direction: column;
  width: var(--sidebar-width); padding: 28px 20px 20px; overflow-y: auto;
  background: var(--sidebar); color: var(--sidebar-ink);
}
.brand { display: flex; align-items: center; gap: 12px; padding: 0 7px; text-decoration: none; }
.brand-mark { display: grid; width: 42px; height: 42px; place-items: center; color: #e3a17c; border: 1px solid #3c4650; border-radius: 12px; background: #222c35; }
.brand-mark svg { width: 30px; height: 30px; }
.brand-copy { display: grid; gap: 4px; }
.brand-copy strong { font: 700 16px Manrope, sans-serif; letter-spacing: -.3px; }
.brand-copy small { color: #91a0a9; font: 500 9px "DM Mono", monospace; letter-spacing: 1px; }
.sidebar-intro { margin: 40px 8px 19px; }
.eyebrow, .section-index { font: 500 10px "DM Mono", monospace; letter-spacing: 1.35px; color: #d29674; }
.sidebar-intro p { margin: 9px 0 0; font: 600 17px/1.5 Manrope, sans-serif; letter-spacing: -.2px; }
.search-box { display: flex; align-items: center; height: 41px; padding: 0 10px; gap: 9px; border: 1px solid #34404a; border-radius: 7px; background: #1c2630; }
.search-box svg { width: 16px; height: 16px; fill: none; stroke: #96a4ad; stroke-width: 1.6; flex: 0 0 auto; }
.search-box input { min-width: 0; flex: 1; border: 0; outline: 0; background: transparent; color: #edf2f2; font-size: 11px; }
.search-box input::placeholder { color: #91a0a9; }
.search-box kbd { padding: 2px 6px; color: #9dabb3; border: 1px solid #44515a; border-radius: 4px; font: 10px "DM Mono", monospace; }
.search-status { min-height: 13px; margin: 7px 3px 4px; color: var(--sidebar-muted); font: 10px "DM Mono", monospace; }
.chapter-nav { min-height: 0; flex: 1; overflow-y: auto; scrollbar-color: #3a4650 transparent; scrollbar-width: thin; }
.chapter-nav ul { margin: 0; padding: 0; list-style: none; }
.chapter-nav li { margin: 1px 0; }
.chapter-nav a { position: relative; display: block; padding: 7px 9px 7px 12px; border-radius: 5px; color: var(--sidebar-muted); text-decoration: none; font-size: 11px; line-height: 1.42; transition: background .16s, color .16s; }
.chapter-nav a:hover { background: #202b35; color: #fff; }
.chapter-nav a.active { color: #f0b28f; background: #2b3030; }
.chapter-nav a.active::before { position: absolute; inset: 7px auto 7px 0; width: 2px; border-radius: 3px; background: #d48a65; content: ""; }
.chapter-nav li.nav-part { margin-top: 12px; }
.chapter-nav li.nav-part:first-child { margin-top: 0; }
.chapter-nav li.nav-part > a { color: #d7dfe2; font: 500 10px "DM Mono", monospace; letter-spacing: .55px; text-transform: uppercase; }
.chapter-nav li.nav-chapter > a { padding-left: 20px; }
.empty-search { padding: 8px 11px; color: var(--sidebar-muted); font-size: 11px; }
.sidebar-bottom { margin-top: 14px; padding-top: 15px; border-top: 1px solid #303b44; }
.sidebar-note { display: flex; gap: 10px; padding: 10px 9px 12px; }
.note-icon { color: #e3a17c; }
.sidebar-note p { margin: 0; color: #9fadb4; font-size: 10px; line-height: 1.7; }
.sidebar-note strong { color: #dce3e4; font-weight: 600; }

.main-column { min-height: 100vh; margin-left: var(--sidebar-width); }
.topbar { position: sticky; z-index: 9; top: 0; display: flex; height: 64px; align-items: center; justify-content: space-between; padding: 0 clamp(26px, 5vw, 78px); border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--paper) 92%, transparent); backdrop-filter: blur(14px); }
.breadcrumbs { display: flex; align-items: center; gap: 12px; color: var(--faint); font: 500 9px "DM Mono", monospace; letter-spacing: 1px; }
.breadcrumbs strong { color: var(--muted); font-weight: 500; }
.breadcrumb-slash { color: #c8c8c0; }
.topbar-actions { display: flex; align-items: center; gap: 14px; }
.reading-label { color: var(--muted); font-size: 10px; }
.icon-button { display: grid; width: 34px; height: 34px; place-items: center; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); cursor: pointer; }
.icon-button:hover { border-color: var(--accent); color: var(--accent); }
.icon-button svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.moon-icon, .menu-button { display: none; }
[data-theme="dark"] .sun-icon { display: none; }
[data-theme="dark"] .moon-icon { display: block; }
.menu-button { border: 0; background: transparent; }
.drawer-close { display: none; }

.hero { position: relative; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(260px, .75fr); align-items: center; max-width: 1180px; min-height: 410px; margin: 0 auto; padding: 54px clamp(28px, 6vw, 92px) 25px; overflow: hidden; border-bottom: 1px solid var(--line); }
.hero-copy { position: relative; z-index: 1; max-width: 580px; }
.hero-kicker { display: flex; align-items: center; gap: 10px; color: var(--accent); font: 500 10px "DM Mono", monospace; letter-spacing: 1.35px; }
.kicker-line { width: 27px; height: 1px; background: var(--accent); }
.hero h1 { margin: 20px 0 12px; font: 800 clamp(38px, 5vw, 61px)/1.08 Manrope, sans-serif; letter-spacing: -3.4px; }
.hero h1 span { color: var(--accent); }
.hero-subtitle { max-width: 465px; margin: 0; color: var(--muted); font-size: 15px; line-height: 1.75; }
.hero-meta { display: flex; align-items: center; gap: 9px; margin-top: 23px; color: var(--muted); font-size: 10px; }
.meta-avatar { display: grid; width: 22px; height: 22px; place-items: center; border-radius: 50%; color: #fff; background: var(--teal); font: 500 8px "DM Mono", monospace; }
.hero-meta i { width: 3px; height: 3px; margin: 0 2px; border-radius: 50%; background: #b5b8b2; }
.hero-actions { display: flex; align-items: center; gap: 19px; margin-top: 26px; }
.primary-button { display: inline-flex; min-height: 42px; align-items: center; gap: 16px; padding: 0 15px; border-radius: 5px; background: var(--accent); color: #fff; text-decoration: none; font-size: 11px; font-weight: 600; transition: background .15s, transform .15s; }
.primary-button:hover { transform: translateY(-1px); background: var(--accent-deep); }
.primary-button span { font-size: 16px; }
.text-button { color: var(--muted); text-decoration: none; font-size: 11px; }
.text-button:hover { color: var(--accent); }
.text-button span { padding-left: 4px; }
.hero-art { position: relative; width: 315px; height: 280px; justify-self: center; margin: 0 -18px 0 0; }
.art-orbit { position: absolute; top: 50%; left: 50%; border: 1px solid var(--line); border-radius: 50%; transform: translate(-50%, -50%); }
.orbit-one { width: 190px; height: 190px; }
.orbit-two { width: 270px; height: 270px; border-style: dashed; opacity: .8; }
.art-line { position: absolute; z-index: 1; top: 50%; left: 50%; height: 1px; transform-origin: left center; background: color-mix(in srgb, var(--teal) 52%, var(--line)); }
.art-line-one { width: 91px; transform: rotate(-90deg); }
.art-line-two { width: 91px; transform: rotate(30deg); }
.art-node { position: absolute; z-index: 2; display: flex; flex-direction: column; justify-content: center; gap: 4px; border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow); }
.node-main { top: 50%; left: 50%; width: 105px; height: 105px; align-items: center; border-color: #d8c4b8; border-radius: 50%; transform: translate(-50%, -50%); }
.node-main span, .node-small span { color: var(--accent); font: 500 8px "DM Mono", monospace; letter-spacing: 1px; }
.node-main strong { font: 700 16px Manrope, sans-serif; }
.node-small { width: 82px; height: 57px; align-items: center; border-radius: 9px; }
.node-small strong { font: 600 10px Manrope, sans-serif; }
.node-top { top: 6px; left: calc(50% - 41px); }
.node-right { top: 108px; right: 0; }
.node-bottom { bottom: 3px; left: calc(50% - 41px); }
.art-dot { position: absolute; z-index: 3; width: 7px; height: 7px; border: 2px solid var(--paper); border-radius: 50%; background: var(--teal); }
.dot-one { top: 45px; left: 64px; }.dot-two { top: 195px; right: 50px; background: var(--gold); }.dot-three { right: 69px; bottom: 29px; background: var(--accent); }
.art-caption { position: absolute; right: 2px; bottom: 25px; color: var(--faint); font: 9px/1.55 "DM Mono", monospace; text-align: right; }
.hero-stats { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, 1fr) 1.35fr; gap: 16px; margin-top: 27px; padding: 17px 0 3px; border-top: 1px solid var(--line); }
.hero-stats > div:not(.stat-note) { display: flex; align-items: baseline; gap: 8px; }
.hero-stats strong { font: 700 20px Manrope, sans-serif; letter-spacing: -.8px; }
.hero-stats strong .stat-plus { color: var(--accent); font-size: 14px; }
.hero-stats span { color: var(--muted); font-size: 10px; }
.stat-note { color: var(--faint); font: 9px/1.5 "DM Mono", monospace; text-align: right; }

.quick-start { max-width: 1180px; margin: 0 auto; padding: 37px clamp(28px, 6vw, 92px) 42px; border-bottom: 1px solid var(--line); }
.quick-heading { display: flex; align-items: baseline; gap: 14px; margin-bottom: 19px; }
.section-index { color: var(--teal); }
.quick-heading h2 { margin: 0; font: 700 18px Manrope, sans-serif; letter-spacing: -.5px; }
.quick-card { display: grid; grid-template-columns: 39px 1fr 18px; align-items: center; gap: 13px; min-height: 72px; padding: 11px 13px; border: 1px solid var(--line); border-bottom: 0; background: var(--surface); text-decoration: none; transition: background .15s, padding .15s; }
.quick-card:first-of-type { border-radius: 8px 8px 0 0; }
.quick-card:last-of-type { border-bottom: 1px solid var(--line); border-radius: 0 0 8px 8px; }
.quick-card:hover { position: relative; z-index: 1; padding-left: 17px; background: var(--surface-alt); }
.quick-icon { display: grid; width: 36px; height: 36px; place-items: center; border-radius: 8px; font: 500 10px "DM Mono", monospace; }
.icon-foundation { color: var(--accent); background: var(--accent-soft); }
.icon-pattern { color: #537f79; background: var(--teal-soft); }
.icon-practice { color: #a77a31; background: #f5efdf; }
[data-theme="dark"] .icon-practice { color: var(--gold); background: #352f22; }
.quick-card strong, .quick-card small { display: block; }
.quick-card strong { font: 600 11px Manrope, sans-serif; }
.quick-card small { margin-top: 4px; color: var(--muted); font-size: 10px; }
.quick-arrow { color: var(--faint); font-size: 14px; }
.quick-card:hover .quick-arrow { color: var(--accent); }

.article-wrap { max-width: 930px; margin: 0 auto; padding: 0 clamp(24px, 5vw, 72px); }
.article-topline { display: flex; align-items: center; gap: 13px; padding: 28px 0 5px; color: var(--faint); font: 9px "DM Mono", monospace; letter-spacing: .85px; }
.topline-rule { flex: 1; height: 1px; background: var(--line); }
.prose { padding: 22px 0 60px; font-size: 14px; line-height: 1.8; overflow-wrap: anywhere; }
.prose h1, .prose h2, .prose h3, .prose h4 { color: var(--ink); font-family: Manrope, "Segoe UI", sans-serif; line-height: 1.3; scroll-margin-top: 88px; }
.prose > h1 { margin: 25px 0 16px; padding-top: 22px; font-size: 29px; letter-spacing: -1.2px; }
.prose > h1:first-child { margin-top: 0; padding-top: 0; font-size: 34px; }
.prose h2 { margin: 38px 0 13px; padding-top: 10px; font-size: 22px; letter-spacing: -.7px; }
.prose h3 { margin: 27px 0 8px; font-size: 17px; letter-spacing: -.3px; }
.prose h4 { margin: 22px 0 7px; font-size: 14px; }
.prose p { margin: 11px 0 17px; }
.prose strong { color: var(--ink); font-weight: 700; }
.prose em { color: var(--muted); }
.prose a { color: var(--accent-deep); text-decoration-thickness: 1px; text-underline-offset: 3px; }
.prose a:hover { text-decoration-thickness: 2px; }
.prose ul, .prose ol { margin: 9px 0 20px; padding-left: 23px; }
.prose li { margin: 5px 0; padding-left: 2px; }
.prose li::marker { color: var(--teal); }
.prose blockquote { margin: 20px 0; padding: 13px 18px; border-left: 3px solid var(--accent); border-radius: 0 6px 6px 0; background: var(--accent-soft); color: var(--muted); }
.prose blockquote p { margin: 0; }
.prose hr { height: 1px; margin: 34px 0; border: 0; background: var(--line); }
.prose table { width: 100%; margin: 20px 0 25px; border-collapse: separate; border-spacing: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); font-size: 11px; line-height: 1.65; }
.prose th, .prose td { padding: 9px 11px; border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); text-align: left; vertical-align: top; }
.prose th { background: var(--surface-alt); color: var(--ink); font: 600 10px/1.55 Manrope, sans-serif; }
.prose td:last-child, .prose th:last-child { border-right: 0; }
.prose tr:last-child td { border-bottom: 0; }
.prose code { padding: .12em .36em; border: 1px solid var(--line); border-radius: 4px; background: var(--surface-alt); color: var(--accent-deep); font: .88em "DM Mono", Consolas, monospace; }
.prose pre { position: relative; margin: 17px 0 22px; padding: 17px 18px; overflow: auto; border: 1px solid #283940; border-radius: 8px; background: #172329; color: #e1e9e8; font: 11px/1.75 "DM Mono", Consolas, monospace; tab-size: 2; }
.prose pre code { padding: 0; border: 0; background: transparent; color: inherit; font: inherit; }
.copy-button { position: absolute; top: 9px; right: 9px; padding: 5px 8px; border: 1px solid #3a4b52; border-radius: 5px; background: #1e2d33; color: #bac9c9; cursor: pointer; font: 9px "DM Mono", monospace; }
.copy-button:hover { border-color: #9ab8b2; color: #fff; }
.prose .mermaid { display: flex; justify-content: center; margin: 18px 0 24px; padding: 18px 12px; overflow: auto; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.prose .mermaid svg { max-width: 100%; height: auto; }
.article-footer { display: flex; align-items: center; gap: 14px; padding: 19px 0 25px; border-top: 1px solid var(--line); }
.footer-mark { display: grid; width: 37px; height: 37px; flex: 0 0 auto; place-items: center; border-radius: 50%; background: var(--teal-soft); color: var(--teal); font-size: 22px; }
.article-footer p { flex: 1; margin: 0; color: var(--muted); font-size: 10px; line-height: 1.7; }
.article-footer p strong { color: var(--ink); }
.article-footer a { color: var(--accent-deep); text-decoration: none; font-size: 10px; }
.article-footer a:hover { text-decoration: underline; }
.page-bottom { padding: 0 24px 24px; color: var(--faint); font: 9px "DM Mono", monospace; letter-spacing: 1px; text-align: center; }
.page-bottom span { padding: 0 6px; color: var(--accent); }
.mobile-scrim { display: none; }

@media (min-width: 1450px) {
  .hero { min-height: 440px; }
}
@media (max-width: 1080px) {
  :root { --sidebar-width: 260px; }
  .hero { grid-template-columns: minmax(0, 1.2fr) minmax(220px, .8fr); padding-right: 36px; padding-left: 42px; }
  .hero-art { transform: scale(.86); transform-origin: center; margin-right: -30px; }
  .quick-start { padding-right: 42px; padding-left: 42px; }
  .topbar { padding-right: 42px; padding-left: 42px; }
}
@media (max-width: 760px) {
  :root { --sidebar-width: 290px; }
  .sidebar { z-index: 16; transform: translateX(-101%); transition: transform .22s ease; box-shadow: 12px 0 40px rgba(0,0,0,.2); }
  body.nav-open .sidebar { transform: translateX(0); }
  .mobile-scrim { position: fixed; z-index: 15; inset: 0; background: rgba(8, 14, 18, .5); }
  body.nav-open .mobile-scrim { display: block; }
  .main-column { margin-left: 0; }
  .topbar { height: 58px; padding: 0 18px; }
  .menu-button { display: grid; margin-left: -5px; }
  .drawer-close { position: absolute; top: 28px; right: 18px; display: grid; }
  .breadcrumbs { gap: 7px; font-size: 8px; }
  .reading-label { display: none; }
  .hero { grid-template-columns: 1fr; min-height: unset; padding: 45px 25px 21px; }
  .hero h1 { font-size: clamp(40px, 10vw, 54px); letter-spacing: -2.8px; }
  .hero-subtitle { max-width: 430px; font-size: 14px; }
  .hero-art { position: absolute; top: 53px; right: -78px; width: 230px; height: 230px; opacity: .22; transform: scale(.82); }
  .hero-copy { max-width: 510px; }
  .hero-stats { grid-template-columns: repeat(3, 1fr); gap: 9px; margin-top: 27px; }
  .hero-stats > div:not(.stat-note) { display: grid; gap: 3px; }
  .hero-stats strong { font-size: 18px; }
  .hero-stats span { font-size: 9px; }
  .stat-note { display: none; }
  .quick-start { padding: 29px 20px 32px; }
  .quick-heading { gap: 10px; }
  .quick-heading h2 { font-size: 16px; }
  .quick-card { min-height: 68px; gap: 10px; padding-right: 9px; padding-left: 9px; }
  .quick-card small { max-width: 260px; line-height: 1.5; }
  .article-wrap { padding: 0 20px; }
  .article-topline { gap: 8px; font-size: 8px; }
  .prose { font-size: 13px; }
  .prose > h1:first-child { font-size: 29px; }
  .prose h2 { font-size: 20px; }
  .prose table { display: block; overflow-x: auto; white-space: normal; }
}
@media (max-width: 420px) {
  .breadcrumbs span:first-child { display: none; }
  .hero-meta { flex-wrap: wrap; font-size: 9px; }
  .hero-actions { flex-wrap: wrap; gap: 12px; }
  .primary-button { min-height: 40px; }
  .quick-card small { font-size: 9px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}

/* Reading-first type scale and chapter-sized SPA pages. */
body { font-size: 16px; }
.sidebar { padding: 30px 21px 20px; }
.sidebar-intro p { font-size: 18px; }
.search-box { height: 45px; }
.search-box input { font-size: 13px; }
.chapter-nav a { padding-top: 8px; padding-bottom: 8px; font-size: 12px; }
.chapter-nav li.nav-part > a { font-size: 10px; }
.empty-search { font-size: 12px; }
.topbar { height: 70px; }
.breadcrumbs { font-size: 10px; }
.reading-label { font: 500 10px "DM Mono", monospace; letter-spacing: .65px; }
.icon-button { width: 38px; height: 38px; border-radius: 10px; }
.hero { min-height: 430px; }
.hero-subtitle { font-size: 17px; }
.hero-meta { font-size: 12px; }
.primary-button, .text-button { font-size: 13px; }
.quick-heading h2 { font-size: 20px; }
.quick-card { min-height: 80px; }
.quick-card strong { font-size: 13px; }
.quick-card small { font-size: 12px; }
.article-wrap { max-width: 1010px; }
.article-topline { font-size: 10px; }
.prose { font-size: 17px; line-height: 1.86; }
.prose > h1 { font-size: 34px; }
.prose > h1:first-child { font-size: 40px; }
.prose h2 { margin-top: 35px; font-size: 27px; letter-spacing: -.8px; }
.prose h3 { margin-top: 30px; font-size: 20px; }
.prose h4 { font-size: 17px; }
.prose table { font-size: 13px; }
.prose th { font-size: 12px; }
.prose th, .prose td { padding: 11px 13px; }
.prose pre { padding: 21px 22px; font-size: 13px; line-height: 1.8; }
.prose code { font-size: .9em; }
.prose .mermaid { padding: 24px 18px; }
.guide-page { min-height: min(60vh, 640px); animation: page-arrive .25s ease both; }
.guide-page[hidden], .article-footer[hidden] { display: none !important; }
.hero[hidden], .quick-start[hidden] { display: none !important; }
.guide-page > h1:first-child { margin-top: 0; }
.guide-page > .page-category:first-child { margin: 0 0 12px; color: var(--teal); font: 500 11px "DM Mono", monospace; letter-spacing: 1px; text-transform: uppercase; }
.guide-page > h1:first-child + h2 { margin-top: 8px; }
.page-controls { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 18px; padding: 18px 0 25px; border-top: 1px solid var(--line); }
.page-button { display: flex; min-width: 0; min-height: 62px; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); text-align: left; cursor: pointer; transition: border-color .15s, transform .15s, background .15s; }
.page-button:hover:not(:disabled) { transform: translateY(-2px); border-color: var(--accent); background: var(--surface-alt); }
.page-button:disabled { opacity: .42; cursor: not-allowed; }
.page-button.next-page { justify-content: flex-end; text-align: right; }
.page-button span:not(.page-button-arrow) { display: grid; min-width: 0; gap: 4px; }
.page-button small { color: var(--faint); font: 500 9px "DM Mono", monospace; letter-spacing: .9px; }
.page-button strong { max-width: 210px; overflow: hidden; color: var(--ink); font: 600 12px Manrope, sans-serif; text-overflow: ellipsis; white-space: nowrap; }
.page-button-arrow { display: grid; width: 31px; height: 31px; flex: 0 0 auto; place-items: center; border-radius: 8px; color: var(--accent); background: var(--accent-soft); font-size: 16px; }
.page-count { color: var(--faint); font: 10px "DM Mono", monospace; letter-spacing: .8px; white-space: nowrap; }
.article-footer { padding-top: 23px; }
.article-footer p { font-size: 12px; }
.article-footer a { font-size: 12px; }
.page-bottom { font-size: 10px; }
@keyframes page-arrive {
  from { opacity: .55; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 760px) {
  .topbar { height: 64px; }
  .hero { min-height: unset; }
  .hero-subtitle { font-size: 16px; }
  .hero-meta { font-size: 11px; }
  .primary-button, .text-button { font-size: 12px; }
  .quick-heading h2 { font-size: 18px; }
  .quick-card { min-height: 76px; }
  .quick-card strong { font-size: 12px; }
  .quick-card small { font-size: 11px; }
  .article-topline { font-size: 9px; }
  .prose { font-size: 16px; line-height: 1.82; }
  .prose > h1:first-child { font-size: 34px; }
  .prose h2 { font-size: 23px; }
  .prose h3 { font-size: 18px; }
  .prose table { font-size: 12px; }
  .prose th { font-size: 11px; }
  .prose pre { font-size: 11px; }
  .guide-page { min-height: 45vh; }
  .page-controls { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 8px; }
  .page-button { min-height: 58px; gap: 7px; padding: 8px; }
  .page-button strong { max-width: 100px; font-size: 10px; }
  .page-button-arrow { width: 27px; height: 27px; }
  .page-count { font-size: 9px; }
}
@media (max-width: 420px) {
  .prose { font-size: 15px; }
  .page-button strong { max-width: 76px; }
  .page-button small { font-size: 8px; }
  .article-topline span:last-child { font-size: 7px; }
}

/* Developer workspace theme */
:root {
  color-scheme: dark;
  --ink: #e6edf3;
  --muted: #a0adba;
  --faint: #768493;
  --paper: #0d1117;
  --surface: #111820;
  --surface-alt: #161f29;
  --line: #273442;
  --sidebar: #10161d;
  --sidebar-ink: #dce5ec;
  --sidebar-muted: #9aa8b6;
  --accent: #79c0ff;
  --accent-deep: #a5d6ff;
  --accent-soft: #172a3a;
  --teal: #7ee787;
  --teal-soft: #172c25;
  --gold: #e3b341;
  --shadow: 0 18px 50px rgba(0, 0, 0, .28);
  font-family: "DM Sans", "Segoe UI", sans-serif;
}
[data-theme="dark"] {
  color-scheme: dark;
  --ink: #e6edf3;
  --muted: #a0adba;
  --faint: #768493;
  --paper: #0d1117;
  --surface: #111820;
  --surface-alt: #161f29;
  --line: #273442;
  --sidebar: #10161d;
  --sidebar-ink: #dce5ec;
  --sidebar-muted: #9aa8b6;
  --accent: #79c0ff;
  --accent-deep: #a5d6ff;
  --accent-soft: #172a3a;
  --teal: #7ee787;
  --teal-soft: #172c25;
  --gold: #e3b341;
  --shadow: 0 18px 50px rgba(0, 0, 0, .28);
}
[data-theme="light"] {
  color-scheme: light;
  --ink: #17212b;
  --muted: #657382;
  --faint: #8d99a6;
  --paper: #f5f7fa;
  --surface: #ffffff;
  --surface-alt: #edf2f7;
  --line: #dbe3eb;
  --sidebar: #e9eef4;
  --sidebar-ink: #202b36;
  --sidebar-muted: #596a7b;
  --accent: #0969da;
  --accent-deep: #0550ae;
  --accent-soft: #e6f1fb;
  --teal: #1a7f37;
  --teal-soft: #e6f4ea;
  --gold: #9a6700;
  --shadow: 0 18px 50px rgba(28, 44, 60, .08);
}
body {
  background-color: var(--paper);
  background-image: radial-gradient(color-mix(in srgb, var(--line) 32%, transparent) .7px, transparent .7px);
  background-size: 20px 20px;
}
.sidebar { border-right: 1px solid var(--line); }
.brand-mark { color: var(--teal); border-color: #354451; background: #19242d; border-radius: 9px; }
.brand-copy strong { font-family: "DM Mono", Consolas, monospace; font-size: 15px; letter-spacing: -.7px; }
.brand-copy strong::before { color: var(--teal); content: "> "; }
.brand-copy small { letter-spacing: .45px; }
.sidebar-intro { margin-top: 34px; }
.eyebrow, .section-index { color: var(--teal); }
.status-pulse { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 9px color-mix(in srgb, var(--teal) 70%, transparent); }
.sidebar-intro p { font: 500 14px/1.7 "DM Mono", Consolas, monospace; color: var(--sidebar-muted); }
.search-box { border-radius: 6px; border-color: var(--line); background: var(--paper); }
.search-box:focus-within { border-color: var(--accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 18%, transparent); }
.chapter-nav a { border-radius: 4px; font-family: "DM Mono", Consolas, monospace; }
.chapter-nav a.active { color: var(--teal); background: color-mix(in srgb, var(--teal) 9%, transparent); }
.chapter-nav a.active::before { background: var(--teal); }
.chapter-nav li.nav-part > a { color: var(--accent); }
.sidebar-bottom { border-color: var(--line); }
.sidebar-note strong { color: var(--sidebar-ink); }
.topbar { background: color-mix(in srgb, var(--paper) 91%, transparent); }
.breadcrumbs { font-size: 10px; text-transform: none; letter-spacing: .1px; }
.breadcrumbs span:first-child { color: var(--muted); }
.breadcrumbs strong { color: var(--accent); font-weight: 500; }
.breadcrumb-branch { padding: 3px 7px; border: 1px solid var(--line); border-radius: 4px; color: var(--teal); font: 10px "DM Mono", monospace; }
.icon-button { border-radius: 6px; }
.hero { background-image: linear-gradient(90deg, transparent 49px, color-mix(in srgb, var(--line) 28%, transparent) 50px, transparent 51px); background-size: 52px 52px; }
.hero-kicker { color: var(--teal); }
.hero-prompt { color: var(--teal); font: 700 16px "DM Mono", monospace; }
.hero-version { margin-left: 5px; padding: 3px 6px; border: 1px solid var(--line); border-radius: 4px; color: var(--faint); font-size: 9px; }
.hero h1 { font-family: Manrope, sans-serif; letter-spacing: -2.7px; }
.hero h1 span { color: var(--accent); }
.primary-button { border-radius: 6px; background: #238636; color: #fff; font-family: "DM Mono", Consolas, monospace; }
.primary-button:hover { background: #2ea043; }
.text-button { font-family: "DM Mono", Consolas, monospace; }
.hero-art .art-node { border-radius: 8px; border-color: var(--line); background: var(--surface); }
.node-main { border-radius: 50% !important; }
.quick-start { border-color: var(--line); }
.quick-heading h2 { font-family: "DM Mono", Consolas, monospace; }
.quick-card { border-radius: 5px !important; background: color-mix(in srgb, var(--surface) 92%, transparent); }
.quick-icon { border-radius: 5px; font-weight: 500; }
.article-topline { justify-content: flex-start; padding-top: 25px; padding-bottom: 5px; font-size: 10px; letter-spacing: 0; }
.path-root, .path-separator { color: var(--faint); font-family: "DM Mono", Consolas, monospace; }
.path-current { color: var(--accent); font-family: "DM Mono", Consolas, monospace; }
.path-status { display: inline-flex; align-items: center; gap: 7px; margin-left: auto; padding: 4px 7px; border: 1px solid var(--line); border-radius: 4px; color: var(--faint); font: 9px "DM Mono", monospace; }
.path-status i { width: 6px; height: 6px; border-radius: 50%; background: var(--teal); }
.prose h1, .prose h2, .prose h3, .prose h4 { font-family: Manrope, "Segoe UI", sans-serif; }
.prose h2 { padding-bottom: 9px; border-bottom: 1px solid var(--line); }
.prose h3 { color: var(--accent); }
.prose blockquote { border-left-color: var(--teal); border-radius: 0 5px 5px 0; background: var(--teal-soft); }
.prose table { border-color: var(--line); border-radius: 5px; }
.prose th { background: var(--surface-alt); }
.prose td, .prose th { border-color: var(--line); }
.prose code { border-color: color-mix(in srgb, var(--accent) 20%, var(--line)); border-radius: 4px; background: var(--accent-soft); color: var(--accent-deep); }
.prose pre {
  padding-top: 45px;
  border-color: #303d49;
  border-radius: 7px;
  background: #0b1118;
  box-shadow: inset 0 1px rgba(255,255,255,.025);
}
.prose pre::before {
  position: absolute;
  inset: 0 0 auto;
  display: flex;
  height: 31px;
  align-items: center;
  padding: 0 14px;
  border-bottom: 1px solid #293541;
  background: #131b24;
  color: #8795a3;
  content: "●  ●  ●     " attr(data-language);
  font: 9px "DM Mono", Consolas, monospace;
  letter-spacing: .7px;
}
.copy-button { top: 5px; right: 7px; z-index: 1; border-color: #354451; border-radius: 4px; background: #1b2631; color: #aab8c5; }
.copy-button:hover { border-color: var(--accent); color: var(--accent); }
.prose .mermaid { border-color: var(--line); border-radius: 7px; background: var(--surface); }
.page-category { color: var(--teal) !important; }
.page-button { border-radius: 6px; }
.page-button-arrow { border-radius: 5px; color: var(--accent); background: var(--accent-soft); }
.page-controls { border-color: var(--line); }
.page-bottom { font-family: "DM Mono", Consolas, monospace; }
.page-bottom .status-pulse { margin-right: 7px; }

@media (max-width: 760px) {
  .hero { background-size: 44px 44px; }
  .chapter-nav a { font-size: 12px; }
  .page-button { border-radius: 5px; }
}
