
@import url('/css/tokens.css');

:root{
  --bg:#050816;
  --bg-soft:#0B1222;
  --sidebar:#0E152A;
  --sidebar-border:#1A2542;
  --card:#111B34;
  --card-border:#1E2D55;
  --text:#E2E8F0;
  --soft:#CBD5E1;
  --nav-text:#C8D4E3;
  --nav-text-dim:#A8B8CC;
  --muted:#94A3B8;
  --muted-2:#8B9CB3;
  --cyan:#38bdf8;
  --cyan-2:#0ea5e9;
  --green:#22C55E;
  --green-hover:#16A34A;
  --border:#1E293B;
  --code-bg:#0F172A;
  --series-sidebar-w:260px;
  --series-toc-w:240px;
  --series-col-gap:18px;
  --series-content-pad:clamp(16px,1.8vw,24px);
  --topbar-h:56px;
}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{margin:0;font-family:Inter,system-ui,-apple-system,Segoe UI,Roboto,sans-serif;background:var(--bg);color:var(--text);line-height:1.6;-webkit-font-smoothing:antialiased;overflow-x:hidden}
a{color:var(--cyan);text-decoration:none}
a:hover{text-decoration:underline}
img{max-width:100%}
.topbar{position:sticky;top:0;z-index:40;height:var(--topbar-h);display:flex;align-items:center;justify-content:space-between;padding:0 16px 0 20px;background:rgba(7,11,24,0.94);backdrop-filter:blur(16px);border-bottom:1px solid rgba(56,189,248,0.1);box-shadow:0 4px 24px rgba(2,6,23,0.25)}
.breadcrumb{display:flex;align-items:center;gap:10px;font-size:13px;color:var(--nav-text-dim);min-width:0}
.breadcrumb b{color:var(--soft);font-weight:600;white-space:nowrap}
.breadcrumb .sep{opacity:.4}
#breadcrumbCurrent {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 320px;
  color: var(--nav-text-dim);
}

.breadcrumb-brand {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.breadcrumb-brand .prompt {
  opacity: 0.7;
}

.chapter-hero-flex{flex:1;min-width:0;width:100%}
.top-actions{display:flex;gap:10px;flex-shrink:0}
.icon-btn{width:38px;height:38px;border-radius:10px;border:1px solid var(--border);background:rgba(255,255,255,0.04);color:var(--muted);display:grid;place-items:center;cursor:pointer;transition:.2s;font-size:16px}
.icon-btn:hover{background:rgba(255,255,255,0.08);color:var(--text);transform:translateY(-1px)}
.menu-btn{display:none !important}
.app{display:flex;min-height:calc(100vh - var(--topbar-h))}
.sidebar{width:var(--series-sidebar-w);flex-shrink:0;background:var(--sidebar);border-right:1px solid var(--sidebar-border);display:flex;flex-direction:column;z-index:36}
@media(min-width:981px){
  .sidebar{position:fixed;top:0;left:0;height:100vh;overflow:auto}
  .topbar{margin-left:var(--series-sidebar-w);width:calc(100% - var(--series-sidebar-w))}
  .app{margin-left:var(--series-sidebar-w)}
}
@media(max-width:980px){
  .sidebar{position:sticky;top:0;height:100vh;overflow:auto}
}
.sidebar::-webkit-scrollbar{width:5px}
.sidebar::-webkit-scrollbar-thumb{background:#1E293B;border-radius:10px}
.brand{padding:18px 16px 14px;border-bottom:1px solid var(--sidebar-border);flex-shrink:0}
@media(min-width:981px){
  .sidebar .brand{min-height:var(--topbar-h);display:flex;flex-direction:column;justify-content:center;padding:0 16px}
}
.brand h2{margin:0;font-size:15px;font-weight:800;letter-spacing:.2px;background:linear-gradient(90deg,var(--cyan),#34D399);-webkit-background-clip:text;-webkit-text-fill-color:transparent}
.brand p{margin:6px 0 0;font-size:12px;color:var(--nav-text-dim);letter-spacing:.3px}
.nav{padding:10px 6px;flex:1;overflow:auto}
.group{margin-bottom:6px}
.group-head{width:100%;display:flex;align-items:center;justify-content:space-between;padding:10px 12px;border-radius:8px;border:0;background:transparent;color:var(--soft);font-size:13.5px;font-weight:700;cursor:pointer;text-align:left;transition:.15s;letter-spacing:.01em}
.group-head:hover{background:rgba(255,255,255,0.06);color:#F1F5F9}
.group-head .chev{transition:.2s;opacity:.75;font-size:14px;color:var(--nav-text-dim)}
.group.open .chev{transform:rotate(90deg)}
.group-items{display:grid;grid-template-rows:0fr;transition:grid-template-rows .25s ease}
.group.open .group-items{grid-template-rows:1fr}
.group-inner{overflow:hidden;padding-bottom:4px}
.item{display:flex;gap:8px;align-items:flex-start;padding:9px 10px 9px 16px;margin:2px 4px;border-radius:8px;font-size:13px;color:var(--nav-text);cursor:pointer;border-left:3px solid transparent;transition:all .2s ease;line-height:1.4}
.item:hover{background:rgba(56,189,248,0.08);color:#F1F5F9;transform:translateX(2px)}
.item.active{background:linear-gradient(90deg,rgba(56,189,248,0.16),rgba(56,189,248,0.04));color:var(--cyan);border-left-color:var(--cyan);font-weight:600;box-shadow:inset 0 1px 0 rgba(255,255,255,0.04)}
.item.completed .num::after{content:"✓";margin-left:4px;color:var(--green);font-size:10px}
.item .num{font-size:11px;color:var(--nav-text-dim);opacity:1;min-width:26px;margin-top:2px;font-weight:700;font-variant-numeric:tabular-nums;letter-spacing:.02em}
.item.active .num{color:var(--cyan)}
.item .item-icon{flex-shrink:0;width:18px;height:18px;margin-top:2px;opacity:.55}
.item.active .item-icon,.item:hover .item-icon{opacity:1}
.sidebar::-webkit-scrollbar-track{background:transparent}
.nav::-webkit-scrollbar{width:4px}
.nav::-webkit-scrollbar-thumb{background:#243049;border-radius:10px}
.sidebar-foot{padding:14px 16px;border-top:1px solid #1A2542;background:rgba(7,11,24,0.55);flex-shrink:0}
.foot-brand{display:flex;align-items:center;gap:10px;text-decoration:none;margin-bottom:6px}
.foot-brand:hover{opacity:.92;text-decoration:none}
.foot-logo-img{width:34px;height:34px;border-radius:9px;object-fit:cover;box-shadow:0 0 0 1px rgba(56,189,248,0.28),0 4px 12px rgba(56,189,248,0.15)}
.foot-name{font-weight:700;font-size:14px;color:#F8FAFC;letter-spacing:.01em}
.foot-copy{font-size:11px;color:#64748B;line-height:1.4}
.sidebar-overlay{position:fixed;inset:0;z-index:35;background:rgba(0,0,0,.55);backdrop-filter:blur(2px);opacity:0;pointer-events:none;transition:.25s}
.sidebar-overlay.show{opacity:1;pointer-events:auto}
.main{flex:1;min-width:0;width:100%;background:radial-gradient(1200px 600px at 20% -10%, rgba(34,211,238,0.08), transparent), radial-gradient(900px 500px at 100% 0%, rgba(99,102,241,0.08), transparent), var(--bg-soft);display:flex;flex-direction:column}
.content-wrap{width:100%;max-width:none;margin:0;padding:28px var(--series-content-pad) 120px;box-sizing:border-box}
.chapter-hero{margin-bottom:24px;padding:22px 24px;border:1px solid rgba(56,189,248,0.12);border-radius:16px;background:linear-gradient(165deg,rgba(17,28,50,0.92),rgba(10,17,31,0.78));box-shadow:0 12px 40px rgba(2,6,23,0.28),inset 0 1px 0 rgba(255,255,255,0.05)}
.chapter-kicker{display:flex;align-items:center;flex-wrap:wrap;gap:8px;margin-bottom:14px;font-size:12px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--nav-text-dim)}
.chapter-kicker-badge{display:inline-flex;align-items:center;padding:5px 10px;border-radius:999px;background:rgba(56,189,248,0.12);border:1px solid rgba(56,189,248,0.28);color:#7dd3fc}
.chapter-kicker-sep{opacity:.45}
.chapter-hero h1{font-size:clamp(30px,3.6vw,40px);line-height:1.14;font-weight:800;letter-spacing:-.025em;margin:0 0 16px;word-break:break-word;background:linear-gradient(135deg,#ffffff 0%,#bfe9ff 60%,#7dd3fc 100%);-webkit-background-clip:text;-webkit-text-fill-color:transparent;background-clip:text}
.chapter-dek{margin:0 0 18px;max-width:68ch;font-size:16.5px;line-height:1.65;color:var(--soft)}
.meta{display:flex;flex-wrap:wrap;gap:10px;font-size:13px;color:var(--nav-text-dim)}
.meta.meta-badges span{display:inline-flex;align-items:center;gap:6px;padding:6px 12px;border-radius:999px;border:1px solid rgba(56,189,248,0.14);background:rgba(15,23,42,0.55);font-weight:600}
.meta i{font-style:normal;opacity:.85}
.hero-series-progress{margin-top:18px;padding-top:16px;border-top:1px solid rgba(56,189,248,0.1)}
.hero-progress-meta{display:flex;justify-content:space-between;gap:12px;margin-bottom:8px;font-size:12px;font-weight:600;color:var(--nav-text-dim)}
.hero-progress-track{height:6px;border-radius:999px;background:rgba(15,23,42,0.8);border:1px solid rgba(56,189,248,0.12);overflow:hidden}
.hero-progress-fill{height:100%;border-radius:999px;background:linear-gradient(90deg,#22c55e,#38bdf8);transition:width .4s ease}
.reading-progress-chapter{position:fixed;top:var(--topbar-h);left:var(--series-sidebar-w);right:0;height:2px;z-index:39;background:transparent;pointer-events:none}
.reading-progress-chapter-bar{height:100%;width:0;background:linear-gradient(90deg,#38bdf8,#60a5fa);transition:width .08s linear}
.article{font-size:17px;color:#CBD5E1;overflow-wrap:break-word;letter-spacing:.01em}
.article > section{margin-bottom:40px}
.article h2{font-size:clamp(22px,2.4vw,26px);font-weight:750;color:#F8FAFC;margin:52px 0 18px;letter-spacing:-.02em;padding-bottom:12px;border-bottom:1px solid rgba(56,189,248,0.12);scroll-margin-top:96px;position:relative}
.article h2::before{content:"";position:absolute;left:0;bottom:-1px;width:48px;height:2px;background:var(--gradient-brand,linear-gradient(90deg,#38bdf8,#60a5fa));border-radius:2px}
.article h3{font-size:19px;font-weight:650;color:#E8F0FA;margin:32px 0 12px;scroll-margin-top:96px;line-height:1.35}
.article h4{font-size:16px;font-weight:600;color:#E2E8F0;margin:22px 0 8px}
.article p{margin:0 0 20px;color:#CBD5E1;line-height:1.78}
.article p + p{margin-top:0}
.article ul,.article ol{padding-left:24px;margin:0 0 22px}
.article li{margin:10px 0;line-height:1.72}
.article li::marker{color:var(--cyan)}
.article strong{color:#F1F5F9;font-weight:650}
.article hr,.section-divider{border:0;height:1px;margin:40px 0;background:linear-gradient(90deg,transparent,rgba(56,189,248,0.22),transparent)}
.table-wrap{overflow-x:auto;margin:24px 0;border-radius:14px;border:1px solid var(--card-border);box-shadow:0 8px 24px rgba(2,6,23,0.2)}
.article table{display:table;width:100%;border-collapse:collapse;margin:0;background:var(--card);white-space:normal}
.article th{background:linear-gradient(180deg,#162040,#121c36);color:#F1F5F9;text-align:left;padding:14px 16px;font-size:13px;font-weight:700;border-bottom:1px solid var(--card-border);letter-spacing:.02em}
.article td{padding:13px 16px;font-size:14.5px;border-bottom:1px solid rgba(255,255,255,0.06);color:#CBD5E1;vertical-align:top;line-height:1.55}
.article tr:last-child td{border-bottom:0}
.article tr:hover td{background:rgba(56,189,248,0.04)}
.article table.comparison-table th:first-child,.article table.table-standard th:first-child{min-width:140px}
.article pre{margin:0;padding:0;background:transparent;border:0;border-radius:0;overflow:visible}
.article code{font-family:'JetBrains Mono',ui-monospace,monospace;background:rgba(56,189,248,0.1);padding:2px 7px;border-radius:6px;font-size:.88em;color:#bae6fd;border:1px solid rgba(56,189,248,0.15)}
.article pre code{background:transparent;padding:0;border:0;color:inherit;font-size:13.5px;word-break:normal}
.inline-toc-hidden{display:none!important}
.callout{border-radius:16px;padding:20px 22px;margin:28px 0;border:1px solid rgba(56,189,248,0.12);background:linear-gradient(165deg,rgba(20,33,58,0.75),rgba(10,17,31,0.55));box-shadow:0 8px 28px rgba(2,6,23,0.22),inset 0 1px 0 rgba(255,255,255,0.05);transition:all .2s ease}
.callout:hover{border-color:rgba(56,189,248,0.24);box-shadow:0 12px 32px rgba(56,189,248,0.08)}
.callout-header{display:flex;align-items:center;gap:10px;margin-bottom:12px}
.callout-icon{display:grid;place-items:center;width:32px;height:32px;border-radius:10px;font-size:15px;flex-shrink:0}
.callout-label{font-size:12px;font-weight:800;letter-spacing:.08em;text-transform:uppercase;color:#F1F5F9}
.callout p:last-child,.callout ul:last-child,.callout ol:last-child{margin-bottom:0}
.callout ul,.callout ol{margin-top:4px}
.callout.note,.callout-note{border-color:rgba(56,189,248,0.22);background:linear-gradient(165deg,rgba(8,47,73,0.35),rgba(10,17,31,0.55))}
.callout.note .callout-icon,.callout-note .callout-icon{background:rgba(56,189,248,0.15);color:#7dd3fc}
.callout.tip,.callout-remember,.callout-tip{border-color:rgba(34,197,94,0.22);background:linear-gradient(165deg,rgba(6,78,59,0.28),rgba(10,17,31,0.55))}
.callout.tip .callout-icon,.callout-remember .callout-icon,.callout-tip .callout-icon{background:rgba(34,197,94,0.15);color:#86efac}
.callout.warning,.callout-mistake{border-color:rgba(239,68,68,0.28);background:linear-gradient(165deg,rgba(127,29,29,0.22),rgba(10,17,31,0.55))}
.callout.warning .callout-icon,.callout-mistake .callout-icon{background:rgba(239,68,68,0.15);color:#fca5a5}
.callout.enterprise,.callout-enterprise{border-color:rgba(245,158,11,0.28);background:linear-gradient(165deg,rgba(120,53,15,0.22),rgba(10,17,31,0.55))}
.callout.enterprise .callout-icon,.callout-enterprise .callout-icon{background:rgba(245,158,11,0.15);color:#fcd34d}
.callout.interview,.callout-interview{border-color:rgba(139,92,246,0.28);background:linear-gradient(165deg,rgba(76,29,149,0.22),rgba(10,17,31,0.55))}
.callout.interview .callout-icon,.callout-interview .callout-icon{background:rgba(139,92,246,0.15);color:#c4b5fd}
.callout.best-practice,.callout-best-practice{border-color:rgba(56,189,248,0.22);background:linear-gradient(165deg,rgba(12,74,110,0.28),rgba(10,17,31,0.55))}
.callout.best-practice .callout-icon,.callout-best-practice .callout-icon{background:rgba(56,189,248,0.15);color:#7dd3fc}
.card-objectives,.card-prerequisites{padding:18px 20px;margin-bottom:24px}
.card-objectives{border-color:rgba(56,189,248,0.24)}
.card-prerequisites{border-color:rgba(148,163,184,0.2)}
.card-takeaways,.card-summary,.card-knowledge{border-color:rgba(34,197,94,0.22)}
.card-quick-facts{border-color:rgba(96,165,250,0.22);background:linear-gradient(165deg,rgba(30,58,138,0.2),rgba(10,17,31,0.55))}
.callout h3{margin:0 0 10px;font-size:12px;font-weight:800;letter-spacing:.06em;text-transform:uppercase;color:#E2E8F0}
.code-terminal{margin:24px 0;border:1px solid #1e293b;border-radius:14px;overflow:hidden;background:#0b1220;box-shadow:0 12px 32px rgba(2,6,23,0.35)}
.code-terminal-header{display:flex;align-items:center;gap:10px;padding:10px 14px;background:linear-gradient(180deg,#141f33,#0f172a);border-bottom:1px solid #1e293b}
.code-terminal-dots{display:flex;gap:6px}
.code-terminal-dots span{width:10px;height:10px;border-radius:50%;background:#334155}
.code-terminal-dots span:nth-child(1){background:#ef4444}
.code-terminal-dots span:nth-child(2){background:#f59e0b}
.code-terminal-dots span:nth-child(3){background:#22c55e}
.code-terminal-title{flex:1;font-size:12px;font-weight:600;color:#94a3b8;font-family:'JetBrains Mono',monospace}
.code-copy-btn{padding:5px 10px;border:1px solid rgba(56,189,248,0.25);border-radius:8px;background:rgba(56,189,248,0.08);color:#7dd3fc;font-size:11px;font-weight:700;cursor:pointer;transition:.15s}
.code-copy-btn:hover{background:rgba(56,189,248,0.16)}
.code-terminal pre{margin:0;padding:18px 20px;overflow:auto;background:#0b1220;font-family:'JetBrains Mono',ui-monospace,monospace;font-size:13.5px;line-height:1.7;color:#e2e8f0;-webkit-overflow-scrolling:touch}
.diagram-block,.diagram-premium{margin:28px 0;padding:0;border:1px solid rgba(56,189,248,0.14);border-radius:14px;background:linear-gradient(165deg,rgba(15,23,42,0.9),rgba(8,15,28,0.85));box-shadow:0 8px 24px rgba(2,6,23,0.25);overflow:hidden}
.diagram-block pre,.diagram-premium pre{margin:0;padding:22px 24px;background:transparent;color:#bae6fd;font-family:'JetBrains Mono',monospace;font-size:13px;line-height:1.55;overflow:auto;text-align:center}
.diagram-block figcaption,.diagram-premium figcaption{padding:12px 16px;border-top:1px solid rgba(56,189,248,0.1);font-size:13px;color:var(--nav-text-dim);text-align:center;font-style:italic}
.diagram-block.timeline pre{text-align:left}
.layout-with-toc{display:grid;grid-template-columns:minmax(0,1fr);gap:var(--series-col-gap);align-items:start;width:100%}
.toc{position:sticky;top:calc(var(--topbar-h) + 14px);width:100%;flex-shrink:0;display:none;max-height:calc(100vh - var(--topbar-h) - 28px);overflow:auto;padding:16px 14px;background:rgba(14,21,42,0.82);border:1px solid rgba(56,189,248,0.14);border-radius:12px;box-shadow:0 4px 20px rgba(2,6,23,0.22);backdrop-filter:blur(12px)}
@media(min-width:1280px){
  .layout-with-toc{grid-template-columns:minmax(0,1fr) var(--series-toc-w);gap:var(--series-col-gap)}
  .toc{display:block}
}
@media(min-width:1600px){
  :root{--series-toc-w:260px;--series-col-gap:20px}
}
.toc h4{font-size:11px;text-transform:uppercase;letter-spacing:.1em;color:var(--nav-text-dim);margin:0 0 12px;font-weight:800}
.toc a{display:flex;align-items:flex-start;gap:7px;padding:6px 0 6px 12px;font-size:13.5px;color:var(--nav-text);border-left:2px solid rgba(51,65,85,0.8);margin-left:1px;line-height:1.45;transition:all .2s ease;text-decoration:none}
.toc a::before{content:"";width:6px;height:6px;margin-top:7px;border-radius:50%;background:#334155;flex-shrink:0;transition:.2s}
.toc a:hover{color:#F1F5F9;border-left-color:rgba(56,189,248,0.45);background:rgba(56,189,248,0.05);border-radius:0 6px 6px 0}
.toc a.active{color:var(--cyan);border-left-color:var(--cyan);font-weight:600;background:rgba(56,189,248,0.1);border-radius:0 6px 6px 0}
.toc a.active::before{background:var(--cyan);box-shadow:0 0 6px rgba(56,189,248,0.45)}
.toc a.visited::before{background:var(--green)}
.toc a.toc-h3{padding-left:20px;font-size:12.5px;opacity:.88}
.toc::-webkit-scrollbar{width:4px}
.toc::-webkit-scrollbar-thumb{background:#243049;border-radius:10px}
.chapter-nav-premium{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin-top:48px;padding-top:28px;border-top:1px solid rgba(56,189,248,0.12)}
.chapter-nav-card{display:grid;gap:6px;padding:18px 20px;border:1px solid rgba(56,189,248,0.14);border-radius:14px;background:linear-gradient(165deg,rgba(15,23,42,0.85),rgba(10,17,31,0.6));text-decoration:none;transition:all .2s ease;box-shadow:0 4px 16px rgba(2,6,23,0.2)}
.chapter-nav-card:hover{border-color:rgba(56,189,248,0.32);transform:translateY(-2px);box-shadow:0 8px 24px rgba(56,189,248,0.1);text-decoration:none}
.chapter-nav-card.next{text-align:right}
.chapter-nav-card .nav-label{font-size:11px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--nav-text-dim)}
.chapter-nav-card .nav-title{font-size:15px;font-weight:700;color:var(--cyan);line-height:1.35}
.chapter-nav-card.empty{visibility:hidden;pointer-events:none}
.continue-learning{margin-top:36px;padding:24px;border:1px solid rgba(56,189,248,0.12);border-radius:16px;background:linear-gradient(165deg,rgba(20,33,58,0.5),rgba(10,17,31,0.4))}
.continue-learning h2{margin:0 0 14px;font-size:16px;font-weight:800;color:#F8FAFC}
.continue-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:10px}
.continue-card{display:grid;gap:4px;padding:14px;border:1px solid rgba(56,189,248,0.12);border-radius:12px;background:rgba(15,23,42,0.55);text-decoration:none;transition:.2s}
.continue-card:hover{border-color:rgba(56,189,248,0.28);transform:translateY(-2px);text-decoration:none}
.continue-card b{color:#F1F5F9;font-size:14px}
.continue-card span{color:var(--nav-text-dim);font-size:12px;line-height:1.4}
.continue-card.quiz{border-color:rgba(250,204,21,0.25)}
.continue-card.quiz b{color:#fde047}
.bottom-bar.visual{position:fixed;left:var(--series-sidebar-w);right:0;bottom:0;z-index:25;display:flex;align-items:center;justify-content:space-between;gap:16px;padding:12px 20px;min-height:60px;background:rgba(7,11,24,0.94);backdrop-filter:blur(16px);border-top:1px solid #1E293B;padding-bottom:calc(12px + env(safe-area-inset-bottom))}
.bottom-bar.visual .progress-left{display:flex;align-items:center;gap:14px;flex:1;min-width:0}
.bottom-bar.visual .dots{display:flex;gap:6px;align-items:center;flex-shrink:0}
.bottom-bar.visual .dots span{width:8px;height:8px;border-radius:999px;background:#1E293B;border:1px solid #23324A;transition:all .2s ease}
.bottom-bar.visual .dots span.done{background:#22C55E;border-color:#16A34A;box-shadow:0 0 8px rgba(34,197,94,.35)}
.bottom-bar.visual .dots span.active{background:#F8FAFC;border-color:#22D3EE;box-shadow:0 0 0 2px rgba(34,211,238,.28);transform:scale(1.22)}
.bottom-bar.visual .progress-wrap{flex:1;max-width:360px;display:flex;align-items:center}
.bottom-bar.visual .progress-track{flex:1;height:6px;background:#0F1A33;border:1px solid #1E293B;border-radius:999px;overflow:hidden}
.bottom-bar.visual .progress-fill{height:100%;background:linear-gradient(90deg,#22C55E 0%,#16A34A 45%,#22D3EE 100%);border-radius:999px;transition:width .45s ease}
.bottom-bar.visual .progress-center{flex:1;text-align:center;font-size:13px;font-weight:600;color:#CBD5E1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;padding:0 12px;min-width:0}
.bottom-bar.visual .progress-right{font-size:12px;font-weight:600;color:#94A3B8;white-space:nowrap;flex-shrink:0}
.search-modal{position:fixed;inset:0;z-index:60;background:rgba(0,0,0,.62);backdrop-filter:blur(10px);display:none;place-items:start center;padding:10vh 16px 20px}
.search-modal.open{display:grid}
.search-box{width:min(640px,100%);background:#0F172A;border:1px solid #1E293B;border-radius:16px;overflow:hidden;box-shadow:0 20px 60px rgba(0,0,0,.5)}
.search-box input{width:100%;height:54px;padding:0 18px;background:#0B1222;border:0;border-bottom:1px solid #1E293B;color:#E2E8F0;font-size:15px;outline:none}
.search-results{max-height:48vh;overflow:auto}
.search-item{padding:14px 18px;border-bottom:1px solid rgba(30,41,59,.5);cursor:pointer;transition:.15s}
.search-item:hover{background:rgba(34,211,238,0.06)}
.search-item b{display:block;font-size:13.5px;color:#F1F5F9;margin-bottom:4px}
.search-item small{font-size:12px;color:#94A3B8;line-height:1.4;display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.search-hint{padding:10px 14px;border-top:1px solid #1E293B;font-size:11px;color:#64748B;background:rgba(7,11,24,.5)}
@media(max-width:980px){
  .menu-btn{display:grid !important}
  .hide-mobile{display:none !important}
  .topbar{margin-left:0;width:100%}
  .app{margin-left:0}
  .sidebar{position:fixed;left:0;top:0;bottom:0;transform:translateX(-100%);transition:transform .28s cubic-bezier(.32,.72,0,1);box-shadow:0 0 0 1px rgba(0,0,0,0), 0 20px 60px rgba(0,0,0,.45);height:100dvh;z-index:45}
  .sidebar.open{transform:translateX(0)}
  .reading-progress-chapter{left:0}
  .bottom-bar.visual{left:0;gap:10px;padding:10px 14px;min-height:64px;flex-wrap:wrap}
  .bottom-bar.visual .progress-left{order:1;flex-basis:100%;justify-content:space-between}
  .bottom-bar.visual .progress-center{order:2;flex-basis:100%;text-align:left;padding:0;font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .bottom-bar.visual .progress-right{display:none}
  .content-wrap{padding:22px 16px 116px}
  .chapter-hero{padding:22px 20px;margin-bottom:28px}
  .chapter-hero h1{font-size:27px;line-height:1.18}
  .chapter-dek{font-size:15px}
  .article h2{font-size:21px;margin:40px 0 14px}
  .article{font-size:16px}
  .article > section{margin-bottom:36px}
  .chapter-nav-premium{grid-template-columns:1fr}
  .chapter-nav-card.next{text-align:left}
  .topbar{padding:0 12px}
  .icon-btn{width:42px;height:42px}
}
@media(max-width:640px){
  .content-wrap{padding:18px 16px 118px}
  .chapter-hero{padding:18px 16px}
  .chapter-hero h1{font-size:24px}
  .meta{font-size:12px;gap:8px}
  .code-terminal pre{font-size:12.5px;padding:14px 16px}
  .search-box input{height:50px;font-size:15px}
  .bottom-bar.visual .dots{gap:5px}
  .bottom-bar.visual .dots span{width:7px;height:7px}
  .callout{padding:16px 18px}
}
html.light{--bg:#F6F8FC;--bg-soft:#FFFFFF;--sidebar:#FFFFFF;--sidebar-border:#E2E8F0;--card:#FFFFFF;--card-border:#E2E8F0;--text:#0F172A;--muted:#475569;--muted-2:#64748B;--border:#E2E8F0;--code-bg:#F1F5F9}
html.light body{background:var(--bg);color:var(--text)}
html.light .topbar{background:rgba(255,255,255,0.88);border-bottom-color:#E2E8F0}
html.light .sidebar{background:#FFFFFF;border-right-color:#E2E8F0}
html.light .brand h2{-webkit-text-fill-color:#0F172A;background:none;color:#0F172A}
html.light .group-head{color:#0F172A}
html.light .group-head:hover{background:#F1F5F9}
html.light .item{color:#64748B}
html.light .item:hover{background:#F1F5F9;color:#0F172A}
html.light .item.active{background:#E0F2FE;color:#0284C7;border-left-color:#0284C7}
html.light .sidebar-foot{background:#FFFFFF;border-top-color:#E2E8F0}
html.light .foot-name{color:#0F172A}
html.light .foot-copy{color:#94A3B8}
html.light .foot-logo-img{box-shadow:0 0 0 1px rgba(2,132,199,0.2)}
html.light .main{background:#F8FAFC}
html.light .chapter-hero h1{color:#0F172A}
html.light .article{color:#334155}
html.light .article h2{color:#0F172A;border-bottom-color:#E2E8F0}
html.light .article h3{color:#0F172A}
html.light .article p{color:#475569}
html.light .article li{color:#475569}
html.light .article table{background:#FFFFFF;border-color:#E2E8F0}
html.light .article th{background:#F1F5F9;color:#334155}
html.light .article td{color:#475569;border-bottom-color:#F1F5F9}
html.light .article pre{background:#0F172A;color:#E2E8F0}
html.light .article code{background:#F1F5F9;color:#0F172A}
html.light .chapter-hero{background:#fff;border-color:#E2E8F0;box-shadow:0 8px 24px rgba(15,23,42,0.06)}
html.light .chapter-kicker-badge{background:#E0F2FE;border-color:#BAE6FD;color:#0284C7}
html.light .chapter-dek{color:#475569}
html.light .meta.meta-badges span{background:#F8FAFC;border-color:#E2E8F0;color:#64748B}
html.light .hero-progress-track{background:#E2E8F0;border-color:#E2E8F0}
html.light .callout{background:#fff;border-color:#E2E8F0;box-shadow:0 4px 16px rgba(15,23,42,0.05)}
html.light .code-terminal{background:#F8FAFC;border-color:#E2E8F0}
html.light .code-terminal-header{background:#F1F5F9;border-bottom-color:#E2E8F0}
html.light .code-terminal pre{background:#0F172A;color:#E2E8F0}
html.light .diagram-block,html.light .diagram-premium{background:#fff;border-color:#E2E8F0}
html.light .diagram-block pre,html.light .diagram-premium pre{color:#0369A1}
html.light .toc{background:#fff;border-color:#E2E8F0;box-shadow:0 4px 16px rgba(15,23,42,0.06)}
html.light .toc a::before{background:#CBD5E1}
html.light .toc a.active::before{background:#0284C7}
html.light .toc a.visited::before{background:#16A34A}
html.light .chapter-nav-card{background:#fff;border-color:#E2E8F0}
html.light .chapter-nav-card .nav-title{color:#0284C7}
html.light .continue-learning{background:#fff;border-color:#E2E8F0}
html.light .continue-card{background:#F8FAFC;border-color:#E2E8F0}
html.light .table-wrap{border-color:#E2E8F0}
html.light .article h2::before{background:linear-gradient(90deg,#0284C7,#38bdf8)}
html.light .item.completed .num::after{color:#16A34A}
html.light .reading-progress-chapter-bar{background:linear-gradient(90deg,#0284C7,#38bdf8)}
html.light .toc a{color:#64748B}
html.light .toc a:hover{color:#0F172A;border-left-color:#CBD5E1}
html.light .toc a.active{color:#0284C7;border-left-color:#0284C7}
html.light .bottom-bar.visual{background:rgba(255,255,255,0.96);border-top-color:#E2E8F0}
html.light .bottom-bar.visual .dots span{background:#E2E8F0;border-color:#CBD5E1}
html.light .bottom-bar.visual .dots span.done{background:#16A34A;border-color:#16A34A}
html.light .bottom-bar.visual .dots span.active{background:#0F172A;border-color:#0F172A;box-shadow:0 0 0 2px rgba(2,132,199,.2)}
html.light .bottom-bar.visual .progress-track{background:#E2E8F0;border-color:#E2E8F0}
html.light .bottom-bar.visual .progress-center{color:#334155}
html.light .bottom-bar.visual .progress-right{color:#64748B}
html.light .icon-btn{background:#FFFFFF;border-color:#E2E8F0;color:#475569}
html.light .search-box{background:#FFFFFF;border-color:#E2E8F0}
html.light .search-box input{background:#FFFFFF;color:#0F172A;border-bottom-color:#E2E8F0}
html.light .search-hint{background:#F8FAFC;border-top-color:#E2E8F0}
html.light .sidebar-overlay{background:rgba(15,23,42,.35)}

/* Series landing page (linux-series/index.html) */
.series-landing {
  max-width: 1100px;
  width: 100%;
  margin: 0 auto;
  padding: 32px clamp(16px, 2vw, 24px) 120px;
  box-sizing: border-box;
}

.series-landing h1 {
  font-size: clamp(28px, 4vw, 40px);
  margin: 0 0 12px;
  letter-spacing: -0.02em;
}

.series-landing .dek {
  color: var(--muted);
  font-size: 17px;
  line-height: 1.6;
  margin: 0 0 28px;
  max-width: 720px;
}

.series-stats {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 36px;
}

.series-stats span {
  font-size: 13px;
  color: var(--muted-2);
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
}

.chapter-grid {
  display: grid;
  gap: 14px;
}

.chapter-card {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 18px 20px;
  border-radius: 14px;
  background: var(--panel);
  border: 1px solid var(--border);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s, transform 0.15s;
}

.chapter-card:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}

.chapter-card .num {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(56, 189, 248, 0.12);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  font-family: 'JetBrains Mono', monospace;
}

.chapter-card h2 {
  font-size: 16px;
  margin: 0 0 4px;
  font-weight: 600;
}

.chapter-card p {
  margin: 0;
  font-size: 13px;
  color: var(--muted-2);
  line-height: 1.5;
}

.chapter-card .meta-row {
  display: flex;
  gap: 10px;
  margin-top: 8px;
  font-size: 12px;
  color: var(--muted-2);
}

.start-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  padding: 12px 22px;
  border-radius: 12px;
  background: var(--accent);
  color: #030712;
  font-weight: 700;
  text-decoration: none;
  font-size: 15px;
}

.series-landing .series-kicker {
  font-size: 13px;
  color: var(--accent);
  font-weight: 600;
  margin: 0 0 8px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.series-landing .chapter-grid {
  margin-top: 36px;
}

.topbar .breadcrumb a {
  color: inherit;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.topbar .breadcrumb .hide-mobile {
  color: #94a3b8;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

.toc a:focus-visible,
.code-copy-btn:focus-visible,
.chapter-nav-card:focus-visible,
.continue-card:focus-visible,
.group-head:focus-visible,
.icon-btn:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}
