/* ============================================================================
   FORTRESS K3s — Design System
   A standalone, offline-first documentation app.
   Premium "security operations center" aesthetic: deep navy canvas,
   cyan/emerald accents, glassmorphism panels, gradient borders.
   No external fonts or CDNs — everything renders offline.
   ============================================================================ */

/* ----------------------------------------------------------------------------
   1. Theme tokens
   ---------------------------------------------------------------------------- */
:root {
  /* Core palette (dark — default) */
  --bg-0: #070b14;          /* page base */
  --bg-1: #0b1120;          /* panels */
  --bg-2: #111a2e;          /* raised panels */
  --bg-3: #18233d;          /* hover / inputs */
  --bg-grid: rgba(56, 189, 248, 0.045);

  --ink-0: #eaf1ff;         /* primary text */
  --ink-1: #b6c2db;         /* secondary text */
  --ink-2: #8493b0;         /* muted text */
  --ink-3: #5b6883;         /* faint text */

  --line: rgba(148, 173, 214, 0.14);
  --line-strong: rgba(148, 173, 214, 0.26);

  /* Accents */
  --cyan: #38e0f0;
  --cyan-deep: #1aa6c4;
  --emerald: #34e6a8;
  --violet: #8b7bff;
  --amber: #ffc857;
  --rose: #ff6b8b;
  --blue: #4f9bff;

  --accent: var(--cyan);
  --accent-2: var(--emerald);

  /* Glows */
  --glow-cyan: 0 0 0 1px rgba(56,224,240,0.20), 0 8px 30px -8px rgba(56,224,240,0.35);
  --glow-soft: 0 10px 40px -12px rgba(0,0,0,0.7);

  /* Layer colors (defense-in-depth) */
  --l0: #4f9bff;  /* host */
  --l1: #8b7bff;  /* hypervisor / VM */
  --l2: #38e0f0;  /* k3s */
  --l3: #34e6a8;  /* runtime */
  --l4: #ffc857;  /* network */
  --l5: #ff9b6b;  /* storage */
  --l6: #ff6b8b;  /* observability */

  /* Typography */
  --font-sans: "Inter", "Inter var", -apple-system, BlinkMacSystemFont, "Segoe UI",
               Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --font-mono: "JetBrains Mono", "SFMono-Regular", "Cascadia Code", "Fira Code",
               ui-monospace, Menlo, Consolas, "Liberation Mono", monospace;

  --maxw: 1180px;
  --rail: 312px;
  --radius: 16px;
  --radius-sm: 10px;
  --ease: cubic-bezier(0.4, 0.14, 0.18, 1);
}

:root[data-theme="light"] {
  --bg-0: #f6f8fc;
  --bg-1: #ffffff;
  --bg-2: #ffffff;
  --bg-3: #eef2f9;
  --bg-grid: rgba(13, 80, 120, 0.04);
  --ink-0: #0c1426;
  --ink-1: #2c3a55;
  --ink-2: #56657f;
  --ink-3: #8694ad;
  --line: rgba(20, 50, 90, 0.12);
  --line-strong: rgba(20, 50, 90, 0.22);
  --cyan: #0b9fbb;
  --emerald: #0fa978;
  --accent: #0b8fb0;
  --glow-cyan: 0 0 0 1px rgba(11,159,187,0.18), 0 8px 24px -10px rgba(11,159,187,0.35);
  --glow-soft: 0 10px 30px -14px rgba(20,50,90,0.25);
}

/* ----------------------------------------------------------------------------
   2. Reset & base
   ---------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--bg-0);
  color: var(--ink-1);
  line-height: 1.68;
  font-size: 16.5px;
  letter-spacing: 0.005em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* Ambient background: subtle grid + radial aurora */
body::before {
  content: "";
  position: fixed; inset: 0; z-index: -2;
  background:
    radial-gradient(1100px 700px at 78% -8%, rgba(56,224,240,0.10), transparent 60%),
    radial-gradient(900px 600px at 8% 12%, rgba(139,123,255,0.10), transparent 55%),
    radial-gradient(1000px 800px at 50% 120%, rgba(52,230,168,0.08), transparent 60%);
  pointer-events: none;
}
body::after {
  content: "";
  position: fixed; inset: 0; z-index: -1;
  background-image:
    linear-gradient(var(--bg-grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--bg-grid) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(ellipse 100% 100% at 50% 0%, #000 30%, transparent 85%);
  pointer-events: none;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

h1, h2, h3, h4 { color: var(--ink-0); line-height: 1.2; font-weight: 700; letter-spacing: -0.02em; }
h1 { font-size: clamp(2.1rem, 4vw, 3.1rem); margin: 0 0 .4em; }
h2 { font-size: clamp(1.5rem, 2.6vw, 2.05rem); margin: 2.4em 0 .7em; }
h3 { font-size: 1.28rem; margin: 1.9em 0 .55em; color: var(--ink-0); }
h4 { font-size: 1.05rem; margin: 1.5em 0 .4em; color: var(--ink-0); text-transform: none; }
p { margin: 0 0 1.05em; }
strong { color: var(--ink-0); font-weight: 650; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2.4em 0; }
::selection { background: rgba(56,224,240,0.28); color: #fff; }

/* ----------------------------------------------------------------------------
   3. Layout shell
   ---------------------------------------------------------------------------- */
.shell { display: grid; grid-template-columns: var(--rail) 1fr; min-height: 100vh; }

/* Sidebar */
.sidebar {
  position: sticky; top: 0; height: 100vh;
  background: linear-gradient(180deg, var(--bg-1), var(--bg-0));
  border-right: 1px solid var(--line);
  display: flex; flex-direction: column;
  overflow: hidden; z-index: 40;
}
.brand {
  display: flex; align-items: center; gap: .7rem;
  padding: 1.35rem 1.4rem 1.1rem;
  border-bottom: 1px solid var(--line);
}
.brand .mark { width: 38px; height: 38px; flex: 0 0 auto; filter: drop-shadow(0 4px 12px rgba(56,224,240,0.45)); }
.brand .name { font-weight: 800; color: var(--ink-0); letter-spacing: -0.02em; font-size: 1.08rem; line-height: 1.1; }
.brand .name b { color: var(--accent); }
.brand .tag { font-size: .68rem; color: var(--ink-3); letter-spacing: .14em; text-transform: uppercase; margin-top: 2px; }

.nav { overflow-y: auto; padding: .9rem .8rem 2rem; flex: 1; scrollbar-width: thin; scrollbar-color: var(--bg-3) transparent; }
.nav::-webkit-scrollbar { width: 8px; }
.nav::-webkit-scrollbar-thumb { background: var(--bg-3); border-radius: 8px; }
.nav-group { margin-top: 1.1rem; }
.nav-group:first-child { margin-top: .2rem; }
.nav-group > .label {
  font-size: .68rem; letter-spacing: .16em; text-transform: uppercase;
  color: var(--ink-3); padding: .4rem .7rem; font-weight: 700;
}
.nav a {
  display: flex; align-items: center; gap: .6rem;
  padding: .5rem .7rem; margin: 1px 0;
  border-radius: 9px; color: var(--ink-2);
  font-size: .9rem; font-weight: 500;
  text-decoration: none; transition: all .15s var(--ease);
  border: 1px solid transparent;
}
.nav a .dot { width: 7px; height: 7px; border-radius: 50%; flex: 0 0 auto; background: var(--ink-3); transition: all .15s; }
.nav a:hover { background: var(--bg-2); color: var(--ink-0); }
.nav a.active {
  background: linear-gradient(90deg, rgba(56,224,240,0.14), rgba(56,224,240,0.02));
  color: var(--ink-0); border-color: rgba(56,224,240,0.25);
}
.nav a.active .dot { background: var(--accent); box-shadow: 0 0 10px var(--accent); }
.nav a .num { font-family: var(--font-mono); font-size: .72rem; color: var(--ink-3); min-width: 1.4em; }

/* Main column */
.main { min-width: 0; position: relative; }
.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 1rem;
  padding: .7rem 1.4rem;
  background: color-mix(in srgb, var(--bg-0) 78%, transparent);
  backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--line);
}
.topbar .crumbs { font-size: .82rem; color: var(--ink-2); display: flex; align-items: center; gap: .5rem; }
.topbar .crumbs b { color: var(--ink-0); }
.topbar .spacer { flex: 1; }
.iconbtn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 10px;
  background: var(--bg-2); border: 1px solid var(--line); color: var(--ink-1);
  cursor: pointer; transition: all .15s; padding: 0;
}
.iconbtn:hover { background: var(--bg-3); color: var(--accent); border-color: var(--line-strong); }
.iconbtn svg { width: 18px; height: 18px; }

.content { max-width: var(--maxw); margin: 0 auto; padding: 2.6rem clamp(1.1rem, 4vw, 3.2rem) 6rem; }

/* Page transition */
.content > * { animation: rise .5s var(--ease) both; }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* ----------------------------------------------------------------------------
   4. Hero
   ---------------------------------------------------------------------------- */
.hero { position: relative; padding: 1rem 0 1.5rem; }
.eyebrow {
  display: inline-flex; align-items: center; gap: .5rem;
  font-family: var(--font-mono); font-size: .74rem; letter-spacing: .12em;
  text-transform: uppercase; color: var(--accent);
  background: rgba(56,224,240,0.08); border: 1px solid rgba(56,224,240,0.22);
  padding: .35rem .75rem; border-radius: 999px; margin-bottom: 1.2rem;
}
.eyebrow .pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--emerald); box-shadow: 0 0 10px var(--emerald); animation: pulse 2s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .35; } }
.hero h1 { letter-spacing: -0.035em; }
.hero .grad {
  background: linear-gradient(120deg, var(--cyan), var(--emerald) 55%, var(--violet));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.hero .lede { font-size: 1.2rem; color: var(--ink-1); max-width: 62ch; margin-top: .2rem; }

/* Stat / metric strip */
.stat-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px,1fr)); gap: 1rem; margin: 2rem 0; }
.stat { background: var(--bg-1); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.2rem; position: relative; overflow: hidden; }
.stat::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--accent); }
.stat .v { font-size: 1.9rem; font-weight: 800; color: var(--ink-0); font-family: var(--font-mono); letter-spacing: -.02em; }
.stat .k { font-size: .82rem; color: var(--ink-2); margin-top: .15rem; }

/* ----------------------------------------------------------------------------
   5. Cards / panels / grid
   ---------------------------------------------------------------------------- */
.grid { display: grid; gap: 1.1rem; }
.grid.cols-2 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

.card {
  background: linear-gradient(180deg, var(--bg-1), color-mix(in srgb, var(--bg-1) 70%, var(--bg-0)));
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.35rem 1.4rem; position: relative; transition: all .2s var(--ease);
}
.card:hover { border-color: var(--line-strong); transform: translateY(-2px); box-shadow: var(--glow-soft); }
.card .ico { width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center; margin-bottom: .9rem; background: rgba(56,224,240,0.1); color: var(--accent); border: 1px solid rgba(56,224,240,0.2); }
.card .ico svg { width: 22px; height: 22px; }
.card h3 { margin: 0 0 .35rem; font-size: 1.1rem; }
.card p { margin: 0; font-size: .92rem; color: var(--ink-2); }
.card.link { cursor: pointer; }
.card.link::after { content: "→"; position: absolute; top: 1.2rem; right: 1.3rem; color: var(--ink-3); transition: all .2s; }
.card.link:hover::after { color: var(--accent); transform: translateX(4px); }

/* Layer-tinted card variants */
.card[data-l="0"] .ico { background: color-mix(in srgb, var(--l0) 16%, transparent); color: var(--l0); border-color: color-mix(in srgb, var(--l0) 35%, transparent); }
.card[data-l="1"] .ico { background: color-mix(in srgb, var(--l1) 16%, transparent); color: var(--l1); border-color: color-mix(in srgb, var(--l1) 35%, transparent); }
.card[data-l="2"] .ico { background: color-mix(in srgb, var(--l2) 16%, transparent); color: var(--l2); border-color: color-mix(in srgb, var(--l2) 35%, transparent); }
.card[data-l="3"] .ico { background: color-mix(in srgb, var(--l3) 16%, transparent); color: var(--l3); border-color: color-mix(in srgb, var(--l3) 35%, transparent); }
.card[data-l="4"] .ico { background: color-mix(in srgb, var(--l4) 16%, transparent); color: var(--l4); border-color: color-mix(in srgb, var(--l4) 35%, transparent); }
.card[data-l="5"] .ico { background: color-mix(in srgb, var(--l5) 16%, transparent); color: var(--l5); border-color: color-mix(in srgb, var(--l5) 35%, transparent); }
.card[data-l="6"] .ico { background: color-mix(in srgb, var(--l6) 16%, transparent); color: var(--l6); border-color: color-mix(in srgb, var(--l6) 35%, transparent); }

/* Gradient-border feature panel */
.panel { position: relative; border-radius: var(--radius); padding: 1px; background: linear-gradient(135deg, rgba(56,224,240,0.5), rgba(52,230,168,0.2) 40%, transparent 70%); margin: 1.6rem 0; }
.panel > .inner { background: var(--bg-1); border-radius: calc(var(--radius) - 1px); padding: 1.5rem 1.6rem; }

/* ----------------------------------------------------------------------------
   6. Callouts / admonitions
   ---------------------------------------------------------------------------- */
.callout {
  display: grid; grid-template-columns: auto 1fr; gap: .9rem;
  border-radius: var(--radius-sm); padding: 1rem 1.2rem; margin: 1.4rem 0;
  border: 1px solid var(--line); background: var(--bg-1); position: relative;
}
.callout .ci { width: 24px; height: 24px; flex: 0 0 auto; margin-top: 2px; }
.callout .ci svg { width: 24px; height: 24px; }
.callout p:last-child { margin-bottom: 0; }
.callout .ct { font-weight: 700; color: var(--ink-0); display: block; margin-bottom: .15rem; letter-spacing: .01em; }
.callout--danger  { border-color: rgba(255,107,139,0.4); background: linear-gradient(90deg, rgba(255,107,139,0.10), transparent); }
.callout--danger .ci, .callout--danger .ct { color: var(--rose); }
.callout--warn    { border-color: rgba(255,200,87,0.4); background: linear-gradient(90deg, rgba(255,200,87,0.10), transparent); }
.callout--warn .ci, .callout--warn .ct { color: var(--amber); }
.callout--secure  { border-color: rgba(52,230,168,0.4); background: linear-gradient(90deg, rgba(52,230,168,0.10), transparent); }
.callout--secure .ci, .callout--secure .ct { color: var(--emerald); }
.callout--tip     { border-color: rgba(79,155,255,0.4); background: linear-gradient(90deg, rgba(79,155,255,0.10), transparent); }
.callout--tip .ci, .callout--tip .ct { color: var(--blue); }
.callout--note    { border-color: var(--line-strong); }
.callout--note .ci, .callout--note .ct { color: var(--violet); }

/* "Why it matters" plain-English aside for non-tech readers */
.eli5 { border-left: 3px solid var(--violet); background: color-mix(in srgb, var(--violet) 7%, var(--bg-1)); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; padding: .9rem 1.2rem; margin: 1.3rem 0; }
.eli5 .ct { font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--violet); font-weight: 800; }
.eli5 p { margin: .2rem 0 0; color: var(--ink-1); font-size: .96rem; }

/* ----------------------------------------------------------------------------
   7. Code blocks
   ---------------------------------------------------------------------------- */
.code {
  position: relative; margin: 1.3rem 0;
  background: #060a12; border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm); overflow: hidden;
}
:root[data-theme="light"] .code { background: #0c1426; }
.code .code-head {
  display: flex; align-items: center; gap: .6rem;
  padding: .55rem .9rem; border-bottom: 1px solid rgba(148,173,214,0.12);
  background: rgba(255,255,255,0.02);
}
.code .lights { display: flex; gap: 6px; }
.code .lights i { width: 11px; height: 11px; border-radius: 50%; display: block; }
.code .lights i:nth-child(1){ background:#ff5f56; } .code .lights i:nth-child(2){ background:#ffbd2e; } .code .lights i:nth-child(3){ background:#27c93f; }
.code .fname { font-family: var(--font-mono); font-size: .76rem; color: var(--ink-2); margin-left: .3rem; }
.code .copy {
  margin-left: auto; font-size: .73rem; font-family: var(--font-mono);
  color: var(--ink-2); background: transparent; border: 1px solid var(--line);
  border-radius: 7px; padding: .25rem .6rem; cursor: pointer; transition: all .15s;
  display: inline-flex; align-items: center; gap: .35rem;
}
.code .copy:hover { color: var(--accent); border-color: var(--accent); }
.code .copy.done { color: var(--emerald); border-color: var(--emerald); }
.code pre { margin: 0; padding: 1rem 1.1rem; overflow-x: auto; font-family: var(--font-mono); font-size: .855rem; line-height: 1.62; color: #d4e2ff; }
.code pre::-webkit-scrollbar { height: 9px; } .code pre::-webkit-scrollbar-thumb { background: var(--bg-3); border-radius: 8px; }
/* lightweight token tints (applied via JS) */
.tk-c { color: #5b6c8f; font-style: italic; }   /* comment */
.tk-k { color: #7cc4ff; }                         /* keyword */
.tk-s { color: #8be6b0; }                         /* string */
.tk-n { color: #ffc857; }                         /* number */
.tk-f { color: #c2a8ff; }                         /* flag/key */
.tk-p { color: #ff9b8b; }                         /* punctuation-ish/path */

code:not(pre code) {
  font-family: var(--font-mono); font-size: .86em;
  background: var(--bg-3); color: var(--accent-2);
  padding: .12em .4em; border-radius: 6px; border: 1px solid var(--line);
}

/* ----------------------------------------------------------------------------
   8. Tables
   ---------------------------------------------------------------------------- */
.tbl-wrap { overflow-x: auto; margin: 1.4rem 0; border: 1px solid var(--line); border-radius: var(--radius-sm); }
table { width: 100%; border-collapse: collapse; font-size: .9rem; min-width: 520px; }
thead th {
  text-align: left; padding: .8rem 1rem; background: var(--bg-2);
  color: var(--ink-0); font-weight: 700; font-size: .8rem; letter-spacing: .03em;
  text-transform: uppercase; border-bottom: 1px solid var(--line-strong); white-space: nowrap;
}
tbody td { padding: .75rem 1rem; border-bottom: 1px solid var(--line); color: var(--ink-1); vertical-align: top; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: var(--bg-1); }
td .pill, .pill { display: inline-block; font-size: .72rem; font-weight: 700; padding: .15rem .5rem; border-radius: 999px; font-family: var(--font-mono); }
.pill.good { background: rgba(52,230,168,0.15); color: var(--emerald); }
.pill.warn { background: rgba(255,200,87,0.15); color: var(--amber); }
.pill.bad  { background: rgba(255,107,139,0.15); color: var(--rose); }
.pill.info { background: rgba(79,155,255,0.15); color: var(--blue); }

/* ----------------------------------------------------------------------------
   9. Steps / runbook
   ---------------------------------------------------------------------------- */
.steps { counter-reset: step; margin: 1.6rem 0; }
.step { position: relative; padding: 0 0 1.6rem 3.2rem; border-left: 2px solid var(--line); margin-left: 1rem; }
.step:last-child { border-left-color: transparent; padding-bottom: 0; }
.step::before {
  counter-increment: step; content: counter(step);
  position: absolute; left: -1.05rem; top: -.2rem;
  width: 2.1rem; height: 2.1rem; border-radius: 50%;
  background: var(--bg-2); border: 1px solid var(--line-strong);
  color: var(--accent); font-family: var(--font-mono); font-weight: 700;
  display: grid; place-items: center; font-size: .9rem;
  box-shadow: 0 0 0 5px var(--bg-0);
}
.step h3 { margin-top: 0; }

/* Checklist */
.check { list-style: none; padding: 0; margin: 1.2rem 0; }
.check li { display: flex; gap: .7rem; align-items: flex-start; padding: .55rem 0; border-bottom: 1px solid var(--line); }
.check li::before { content: "✓"; color: var(--emerald); font-weight: 800; flex: 0 0 auto; margin-top: 1px; width: 1.3em; height: 1.3em; border-radius: 6px; background: rgba(52,230,168,0.12); display: grid; place-items: center; font-size: .8rem; }

/* ----------------------------------------------------------------------------
   10. Diagrams (SVG containers)
   ---------------------------------------------------------------------------- */
.figure { margin: 2rem 0; }
.figure .frame {
  background: radial-gradient(120% 120% at 50% 0%, var(--bg-1), var(--bg-0));
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.6rem; overflow: hidden;
}
.figure svg { width: 100%; height: auto; display: block; }
.figure figcaption { text-align: center; color: var(--ink-2); font-size: .85rem; margin-top: .9rem; font-style: italic; }
.svg-anim-dash { stroke-dasharray: 6 7; animation: dash 1.4s linear infinite; }
@keyframes dash { to { stroke-dashoffset: -26; } }
.svg-flow { stroke-dasharray: 4 8; animation: dash 2s linear infinite; }

/* ----------------------------------------------------------------------------
   11. Footer / pager
   ---------------------------------------------------------------------------- */
.pager { display: flex; gap: 1rem; margin-top: 3.5rem; padding-top: 1.6rem; border-top: 1px solid var(--line); }
.pager a { flex: 1; display: block; padding: 1rem 1.2rem; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--bg-1); transition: all .2s; text-decoration: none; }
.pager a:hover { border-color: var(--accent); background: var(--bg-2); transform: translateY(-2px); }
.pager .dir { font-size: .74rem; color: var(--ink-3); text-transform: uppercase; letter-spacing: .1em; }
.pager .ttl { color: var(--ink-0); font-weight: 650; margin-top: .15rem; }
.pager a.next { text-align: right; }
.docfoot { margin-top: 3rem; padding-top: 1.4rem; border-top: 1px solid var(--line); color: var(--ink-3); font-size: .82rem; display: flex; justify-content: space-between; flex-wrap: wrap; gap: .6rem; }

/* ----------------------------------------------------------------------------
   12. Misc utilities
   ---------------------------------------------------------------------------- */
/* Chapter subtitle: the first blockquote right after the H1 */
.content > h1 + blockquote { border: 0; margin: -.4rem 0 1.8rem; padding: 0; }
.content > h1 + blockquote p { font-size: 1.22rem; line-height: 1.5; color: var(--ink-2); font-style: normal; }
.content > h1 + blockquote em { font-style: normal; color: var(--ink-2); }
/* Generic blockquote (not an alert) */
blockquote { margin: 1.4rem 0; padding: .6rem 1.2rem; border-left: 3px solid var(--line-strong); color: var(--ink-2); background: var(--bg-1); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
blockquote p:last-child { margin-bottom: 0; }
.content h1 { padding-bottom: .2rem; }
ul, ol { padding-left: 1.4rem; margin: 0 0 1.1rem; }
li { margin: .3rem 0; }
li::marker { color: var(--accent); }
.lead { font-size: 1.15rem; color: var(--ink-1); }
.muted { color: var(--ink-2); }
.mono { font-family: var(--font-mono); }
.tagrow { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1.1rem 0; }
.tag { font-family: var(--font-mono); font-size: .76rem; color: var(--ink-1); background: var(--bg-2); border: 1px solid var(--line); border-radius: 8px; padding: .3rem .65rem; }
.tag b { color: var(--accent); }
.kbd { font-family: var(--font-mono); font-size: .8em; background: var(--bg-3); border: 1px solid var(--line-strong); border-bottom-width: 2px; border-radius: 6px; padding: .1em .45em; color: var(--ink-0); }
.toc-mini { position: fixed; top: 90px; right: max(1rem, calc((100vw - var(--rail) - var(--maxw))/2 - 80px)); width: 200px; font-size: .8rem; }

/* ----------------------------------------------------------------------------
   13. Mobile
   ---------------------------------------------------------------------------- */
.menu-btn { display: none; }
@media (max-width: 1024px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; top: 0; width: min(86vw, 340px); transform: translateX(-100%); transition: transform .3s var(--ease); box-shadow: 30px 0 80px rgba(0,0,0,0.6); }
  .sidebar.open { transform: none; }
  .menu-btn { display: inline-flex; }
  .scrim { position: fixed; inset: 0; background: rgba(0,0,0,0.55); backdrop-filter: blur(2px); z-index: 35; opacity: 0; pointer-events: none; transition: opacity .3s; }
  .scrim.show { opacity: 1; pointer-events: auto; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .content { padding: 1.6rem 1.1rem 4rem; }
  .pager { flex-direction: column; }
}

/* ----------------------------------------------------------------------------
   14. Print
   ---------------------------------------------------------------------------- */
@media print {
  .sidebar, .topbar, .pager, .copy, .menu-btn { display: none !important; }
  .shell { display: block; }
  body { background: #fff; color: #111; }
  body::before, body::after { display: none; }
  .card, .callout, .code, .panel > .inner { break-inside: avoid; }
  a { color: #06c; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}
