/* Distil documentation — world-class dark design system.
   Class names match the existing pages; only the styling is elevated.
   ----------------------------------------------------------------- */

/* ── Self-hosted Inter (variable, offline) ─────────────────────────── */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/inter.woff2") format("woff2");
}

/* ── Design tokens ─────────────────────────────────────────────────── */
:root {
  --bg:     #06070b;
  --bg2:    #0a0b12;
  --panel:  #0c0e15;
  --panel2: #11141d;
  --line:   #1b2030;
  --line2:  #252c3e;
  --ink:    #f2f3f7;
  --mut:    #9aa1b3;
  --dim:    #5b6177;
  --acc:    #8b7bff;
  --acc2:   #5ad1c9;
  --warn:   #ff8a6b;
  --good:   #5ad19a;
  --grad:   linear-gradient(135deg, #8b7bff 0%, #5ad1c9 100%);
  --card:   linear-gradient(180deg, #12151f 0%, #0b0d15 100%);

  --shadow:  0 18px 50px -28px rgba(0,0,0,.8);
  --shadow2: 0 24px 60px -24px rgba(139,123,255,.28);
  --sidebar-w: 252px;
  --topbar-h:  60px;
  --radius: 16px;
}

/* ── Reset & base ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  background:
    radial-gradient(1100px 560px at 82% -8%, #19143a 0%, transparent 58%),
    radial-gradient(900px 500px at 0% 100%, #0c1830 0%, transparent 55%),
    var(--bg);
  color: var(--ink);
  font: 15px/1.72 "Inter", ui-sans-serif, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
}
/* subtle dot-grid depth layer (matches the SVG diagrams) */
body::before {
  content: ""; position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image: radial-gradient(circle, rgba(255,255,255,.022) 1px, transparent 1.4px);
  background-size: 26px 26px;
  mask-image: radial-gradient(1400px 800px at 70% 0%, #000 35%, transparent 85%);
}
a { color: inherit; text-decoration: none; }
::selection { background: rgba(139,123,255,.32); color: #fff; }
:focus-visible { outline: 2px solid var(--acc); outline-offset: 2px; border-radius: 4px; }

/* custom scrollbars */
* { scrollbar-width: thin; scrollbar-color: var(--line2) transparent; }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-thumb { background: var(--line2); border-radius: 8px; border: 2px solid transparent; background-clip: padding-box; }
*::-webkit-scrollbar-thumb:hover { background: #34405e; }

/* ── Top bar ───────────────────────────────────────────────────────── */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  height: var(--topbar-h);
  display: flex; align-items: center; gap: 18px;
  padding: 0 22px;
  backdrop-filter: blur(14px) saturate(140%);
  background: rgba(6,7,11,.72);
  border-bottom: 1px solid transparent;
  box-shadow: 0 1px 0 rgba(255,255,255,.04), 0 8px 30px -20px rgba(0,0,0,.9);
}
.topbar::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(139,123,255,.45), rgba(90,209,201,.45), transparent);
}
.topbar-logo { font-weight: 800; font-size: 21px; letter-spacing: -.03em; white-space: nowrap; }
.topbar-logo b { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.topbar-pill {
  font-size: 10.5px; color: var(--acc2);
  border: 1px solid var(--line2); border-radius: 999px;
  padding: 4px 11px; background: rgba(90,209,201,.05); white-space: nowrap;
}
.topbar-links { margin-left: auto; display: flex; gap: 20px; color: var(--mut); font-size: 13px; align-items: center; }
.topbar-links a { transition: color .15s; }
.topbar-links a:hover { color: var(--ink); }

/* ── Shell ─────────────────────────────────────────────────────────── */
.shell { display: flex; padding-top: var(--topbar-h); min-height: 100vh; position: relative; z-index: 1; }

/* ── Sidebar ───────────────────────────────────────────────────────── */
.sidebar {
  position: fixed; top: var(--topbar-h); left: 0; bottom: 0;
  width: var(--sidebar-w); overflow-y: auto;
  padding: 22px 14px 48px;
  border-right: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(8,9,14,.6), rgba(6,7,11,.5));
  backdrop-filter: blur(8px);
}
.sidebar-section {
  font-size: 10px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--dim); padding: 20px 12px 8px;
}
.sidebar-section:first-child { padding-top: 4px; }
.sidebar a {
  position: relative; display: block;
  padding: 7px 12px; margin: 1px 0; font-size: 13px;
  color: var(--mut); border-radius: 9px;
  transition: color .15s, background .15s, transform .12s;
}
.sidebar a:hover { color: var(--ink); background: rgba(255,255,255,.035); transform: translateX(2px); }
.sidebar a.active {
  color: var(--ink);
  background: linear-gradient(90deg, rgba(139,123,255,.16), rgba(139,123,255,.04));
  box-shadow: inset 0 0 0 1px rgba(139,123,255,.25);
}
.sidebar a.active::before {
  content: ""; position: absolute; left: -1px; top: 7px; bottom: 7px; width: 3px;
  border-radius: 3px; background: var(--grad); box-shadow: 0 0 10px rgba(139,123,255,.7);
}

/* ── Main content ──────────────────────────────────────────────────── */
.content {
  flex: 1; margin-left: var(--sidebar-w);
  padding: 52px 56px 96px; max-width: 920px;
  animation: rise .5s cubic-bezier(.2,.7,.2,1) both;
}
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.sidebar-toggle {
  display: none; background: none; border: 1px solid var(--line2);
  color: var(--mut); border-radius: 9px; padding: 5px 11px; font-size: 14px; cursor: pointer;
}

/* ── Typography ────────────────────────────────────────────────────── */
h1, h2, h3, h4 { scroll-margin-top: calc(var(--topbar-h) + 18px); }
h1 {
  font-size: clamp(30px, 4.2vw, 46px); line-height: 1.08; letter-spacing: -.035em;
  font-weight: 800; color: var(--ink); margin: 0 0 18px;
}
h1 .g, h2 .g, h3 .g {
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
h2 {
  position: relative; font-size: 23px; letter-spacing: -.02em; font-weight: 750;
  margin: 48px 0 12px; color: var(--ink); padding-left: 15px;
}
h2::before {
  content: ""; position: absolute; left: 0; top: .18em; bottom: .18em; width: 4px;
  border-radius: 4px; background: var(--grad);
}
h2:first-child { margin-top: 0; }
h3 { font-size: 17.5px; font-weight: 700; margin: 30px 0 9px; color: var(--ink); letter-spacing: -.01em; }
p { color: var(--mut); margin: 0 0 15px; }
p strong, p b, li strong, li b { color: var(--ink); font-weight: 650; }
ul, ol { color: var(--mut); padding-left: 22px; margin: 0 0 15px; }
li { margin-bottom: 6px; }
li::marker { color: var(--dim); }

/* prose links (scoped so nav/cards keep their styling) */
.content p a, .content li a, .callout a {
  color: var(--acc2); background: linear-gradient(var(--acc2), var(--acc2)) no-repeat;
  background-size: 0% 1px; background-position: 0 100%;
  transition: background-size .25s, color .15s;
}
.content p a:hover, .content li a:hover, .callout a:hover { background-size: 100% 1px; color: #7fe6df; }

/* ── Inline code ───────────────────────────────────────────────────── */
code {
  font: 12.5px/1 ui-monospace, "SFMono-Regular", Menlo, monospace;
  background: rgba(139,123,255,.08); border: 1px solid var(--line2);
  border-radius: 6px; padding: 1.5px 6px; color: var(--acc2);
  overflow-wrap: anywhere;
}

/* ── Code blocks ───────────────────────────────────────────────────── */
pre {
  position: relative;
  background: linear-gradient(180deg, #0a0c14, #070810);
  border: 1px solid var(--line2); border-radius: 14px;
  padding: 22px 22px 20px; overflow-x: auto;
  font: 13px/1.7 ui-monospace, "SFMono-Regular", Menlo, monospace;
  color: #cdd2df; margin: 14px 0 22px;
  box-shadow: var(--shadow);
}
pre::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(139,123,255,.5), rgba(90,209,201,.5), transparent);
  border-radius: 14px 14px 0 0;
}
pre code { background: none; border: none; padding: 0; font-size: inherit; color: inherit; border-radius: 0; }
.term .c { color: var(--acc2); }
.term .g { color: var(--good); }
.term .w { color: var(--warn); }
.term .d { color: var(--dim); }
.term .a { color: var(--acc); }

/* ── Cards ─────────────────────────────────────────────────────────── */
.card {
  background: var(--card); border: 1px solid var(--line2); border-radius: var(--radius);
  padding: 20px 22px; margin-bottom: 14px; box-shadow: var(--shadow);
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.card:hover { transform: translateY(-3px); border-color: #2f3a5a; box-shadow: var(--shadow), var(--shadow2); }
.card h3 { margin: 0 0 6px; font-size: 16px; }
.card p { font-size: 14px; margin: 0; color: var(--mut); }
.tag {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 10px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: var(--acc2); margin-bottom: 8px;
}
.tag::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--grad); box-shadow: 0 0 8px rgba(90,209,201,.7); }

/* ── Grids ─────────────────────────────────────────────────────────── */
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 14px 0; }

/* ── Tables ────────────────────────────────────────────────────────── */
table {
  width: 100%; border-collapse: separate; border-spacing: 0;
  font-size: 14px; margin: 16px 0 26px;
  border: 1px solid var(--line); border-radius: 12px; overflow: hidden;
  background: rgba(12,14,21,.5);
}
th {
  text-align: left; padding: 11px 14px; background: rgba(255,255,255,.02);
  border-bottom: 1px solid var(--line2);
  color: var(--dim); font-weight: 700; font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em;
}
td { padding: 11px 14px; border-bottom: 1px solid var(--line); color: var(--mut); vertical-align: top; }
tr:last-child td { border-bottom: none; }
tbody tr { transition: background .12s; }
tbody tr:hover { background: rgba(139,123,255,.04); }
td strong, td b { color: var(--ink); }
td code { font-size: 11.5px; }
.badge-pass { color: var(--good); font-weight: 700; }
.badge-fail { color: var(--warn); font-weight: 700; }
.badge-new  { color: var(--acc);  font-weight: 700; }

/* ── Callouts ──────────────────────────────────────────────────────── */
.callout {
  position: relative; background: linear-gradient(180deg, #10142a, #0b0d18);
  border: 1px solid #24294c; border-left: 3px solid var(--acc);
  border-radius: 14px; padding: 18px 20px 18px 22px; margin: 16px 0 24px;
  color: var(--mut); font-size: 14px;
}
.callout b, .callout strong { color: var(--ink); }
.callout.warn { border-left-color: var(--warn); border-color: rgba(255,138,107,.28); }
.callout.good { border-left-color: var(--good); border-color: rgba(90,209,154,.28); }

/* ── Tiers ─────────────────────────────────────────────────────────── */
.tiers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 16px 0 24px; }
.tier {
  background: var(--card); border: 1px solid var(--line2); border-radius: 14px; padding: 18px;
  box-shadow: var(--shadow); transition: transform .18s, border-color .18s;
}
.tier:hover { transform: translateY(-3px); border-color: #2f3a5a; }
.tier .k { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--acc2); font-weight: 700; margin-bottom: 6px; }
.tier h4 { font-size: 15px; margin: 6px 0 5px; color: var(--ink); }
.tier p { color: var(--mut); font-size: 13px; }

/* ── Stat boxes ────────────────────────────────────────────────────── */
.stat-row { display: flex; gap: 14px; margin: 16px 0 26px; flex-wrap: wrap; }
.stat-box {
  flex: 1; min-width: 140px; background: var(--card);
  border: 1px solid var(--line2); border-radius: 14px; padding: 20px;
  box-shadow: var(--shadow); transition: transform .18s, box-shadow .18s;
}
.stat-box:hover { transform: translateY(-3px); }
.stat-box.hl { border-color: #2a2550; box-shadow: var(--shadow), 0 0 0 1px #2a2550, 0 16px 50px -24px rgba(139,123,255,.4); }
.stat-n { font-size: 34px; font-weight: 800; letter-spacing: -.02em; color: var(--ink); }
.stat-n s { font-size: 17px; color: var(--mut); text-decoration: none; font-weight: 600; }
.stat-l { color: var(--mut); font-size: 12px; margin-top: 4px; }

/* ── SVG embeds ────────────────────────────────────────────────────── */
.svg-embed {
  width: 100%; border: 1px solid var(--line2); border-radius: 16px;
  margin: 16px 0 26px; display: block; box-shadow: var(--shadow);
}

/* ── Interactive architecture figure ───────────────────────────────── */
.archfig {
  position: relative; border: 1px solid var(--line2); border-radius: 16px;
  margin: 16px 0 8px; box-shadow: var(--shadow); overflow: hidden; background: #07080d;
}
/* Break the figure out of the narrow content column on wide screens so the
   diagram text stays legible (the column caps at ~808px otherwise). Below 1340px
   there is no right-hand TOC, so the figure can use the whole gutter. */
@media (min-width: 1080px) and (max-width: 1339.98px) {
  .archfig { width: calc(100vw - var(--sidebar-w) - 104px); max-width: 1240px; }
}
/* At >=1340px the fixed .toc appears on the right — keep the figure clear of it.
   The min() caps the right edge well before the TOC's left edge at every width. */
@media (min-width: 1340px) {
  /* Track the .toc's own positioning formula exactly, leaving a 28px gap, so the
     figure's right edge always lands just left of the TOC regardless of width.
     figure-left = sidebar(252) + content-pad(56) = 308; toc box width = 200;
     toc right-offset = max(24, (100vw - 252 - 920)/2 - 220); 1172 = 252 + 920. */
  .archfig {
    width: min(1200px, calc(100vw - 536px - max(24px, calc((100vw - 1172px) / 2 - 220px))));
  }
}
.archfig svg { width: 100%; height: auto; display: block; }
.archfig a { cursor: pointer; }
.archfig a rect, .archfig a text, .archfig a circle { transition: fill .15s ease, stroke .15s ease, opacity .15s ease; }
/* hover: lift the block and brighten its text */
.archfig a:hover rect { stroke: #5ad1c9; stroke-width: 1.8; }
.archfig a:hover text { fill: #ffffff; }
.archfig a:focus { outline: none; }
.archfig a:focus-visible rect { stroke: #8b7bff; stroke-width: 2; }
.archfig-hint {
  font-size: 12px; color: var(--dim); margin: 0 0 26px; padding-left: 2px;
}
.archfig-hint b { color: var(--acc, #5ad1c9); font-weight: 600; }
/* flow animation — lives in the page CSS (not the SVG file), so GitHub's
   SVG sanitizer never sees it; the standalone .svg stays static + safe. */
.archfig .flow { stroke-dasharray: 5 9; animation: archdash 1.1s linear infinite; }
@keyframes archdash { to { stroke-dashoffset: -28; } }
.archfig .rflow { stroke-dasharray: 0.1 9; stroke-linecap: round; animation: archrdash 2.2s linear infinite; }
@keyframes archrdash { to { stroke-dashoffset: -18; } }
.archfig .pulse { animation: archpulse 2.4s ease-in-out infinite; }
@keyframes archpulse { 0%, 100% { opacity: .5; } 50% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .archfig .flow, .archfig .rflow, .archfig .pulse { animation: none; }
}

/* ── Divider, lead, footer ─────────────────────────────────────────── */
hr { border: none; border-top: 1px solid var(--line); margin: 40px 0; }
.lead { font-size: 18px; color: var(--mut); max-width: 720px; margin: 0 0 30px; line-height: 1.6; }
.lead strong, .lead b { color: var(--ink); }
.site-footer { border-top: 1px solid var(--line); padding: 34px 0 26px; margin-top: 64px; color: var(--dim); font-size: 12.5px; }

/* ── Responsive ────────────────────────────────────────────────────── */
/* Wide data tables become horizontally scrollable rather than overflowing the
   viewport — applies on tablets too (benchmark tables have 5–7 columns). */
@media (max-width: 1024px) {
  .content table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .content table th, .content table td { white-space: nowrap; }
}
@media (max-width: 820px) {
  :root { --sidebar-w: 0px; }
  .sidebar { width: 264px; transform: translateX(-100%); transition: transform .24s ease; z-index: 40; }
  .sidebar.open { transform: translateX(0); box-shadow: 6px 0 40px rgba(0,0,0,.7); }
  .content { margin-left: 0; padding: 28px 18px 56px; max-width: 100%; }
  .sidebar-toggle { display: inline-block; }
  .topbar-pill { display: none; }
  .grid2, .tiers { grid-template-columns: 1fr; }
  .content table { font-size: 13px; }
  .content pre { font-size: 12px; padding: 15px 13px; }
  .content h1 { font-size: 27px; }
  .content h2 { font-size: 22px; }
  .lead { font-size: 16px; }
  .copy-btn { opacity: 1; }   /* no hover on touch — keep copy visible */
}
@media (max-width: 480px) {
  .content { padding: 22px 14px 48px; }
  .content h1 { font-size: 24px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto; }
}

/* ── Copy-to-clipboard button on code blocks ───────────────────────── */
pre { /* room for the button */ }
.copy-btn {
  position: absolute; top: 10px; right: 10px;
  display: inline-flex; align-items: center; gap: 5px;
  font: 600 11px/1 "Inter", ui-sans-serif, sans-serif;
  color: var(--mut); background: rgba(255,255,255,.04);
  border: 1px solid var(--line2); border-radius: 8px;
  padding: 5px 9px; cursor: pointer; opacity: 0;
  transition: opacity .15s, color .15s, border-color .15s, background .15s;
}
pre:hover .copy-btn { opacity: 1; }
.copy-btn:hover { color: var(--ink); border-color: #34405e; background: rgba(255,255,255,.07); }
.copy-btn.copied { color: var(--good); border-color: rgba(90,209,154,.4); opacity: 1; }

/* ── "On this page" right-rail TOC ─────────────────────────────────── */
.toc {
  position: fixed; top: calc(var(--topbar-h) + 40px); right: max(24px, calc((100vw - var(--sidebar-w) - 920px) / 2 - 220px));
  width: 200px; max-height: calc(100vh - var(--topbar-h) - 80px); overflow-y: auto;
  padding-left: 14px; border-left: 1px solid var(--line); z-index: 20;
}
.toc-title { font-size: 10px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--dim); margin-bottom: 10px; }
.toc a {
  display: block; padding: 4px 0; font-size: 12.5px; line-height: 1.4;
  color: var(--dim); border-left: 2px solid transparent; padding-left: 12px; margin-left: -14px;
  transition: color .15s, border-color .15s;
}
.toc a.lvl-3 { padding-left: 24px; font-size: 12px; }
.toc a:hover { color: var(--mut); }
.toc a.active { color: var(--acc2); border-left-color: var(--acc2); }
@media (max-width: 1340px) { .toc { display: none; } }

/* ── Learn course: hub, module nav, takeaways, pager ──────────────────────── */
.course-meta { display:flex; align-items:center; gap:10px; flex-wrap:wrap; margin:0 0 18px; }
.course-kicker { font-size:11px; font-weight:700; letter-spacing:.14em; text-transform:uppercase;
  color:var(--acc2); }
.read-pill { font-size:11.5px; color:var(--dim); border:1px solid var(--line2); border-radius:20px;
  padding:3px 11px; background:rgba(255,255,255,.02); }

/* curriculum rail — 3 module chips shown on every course page */
.curriculum { display:flex; gap:10px; flex-wrap:wrap; margin:0 0 30px; padding:0; list-style:none; }
.curriculum a { flex:1; min-width:180px; display:block; text-decoration:none; border:1px solid var(--line);
  border-radius:12px; padding:12px 14px; background:var(--card); transition:transform .18s, border-color .18s; }
.curriculum a:hover { transform:translateY(-2px); border-color:#2f3a5a; }
.curriculum a.active { border-color:#3a3170; box-shadow:0 0 0 1px #2a2550, var(--shadow); }
.curriculum .cn { font-size:10.5px; font-weight:700; letter-spacing:.1em; text-transform:uppercase; color:var(--dim); }
.curriculum a.active .cn { color:var(--acc2); }
.curriculum .ct { display:block; margin-top:3px; font-size:13.5px; font-weight:650; color:var(--ink);
  letter-spacing:-.01em; }

/* hub module cards */
.modules { display:grid; grid-template-columns:repeat(3,1fr); gap:16px; margin:18px 0 30px; }
@media (max-width:900px){ .modules { grid-template-columns:1fr; } }
.mod { position:relative; display:flex; flex-direction:column; text-decoration:none; background:var(--card);
  border:1px solid var(--line2); border-radius:16px; padding:22px; box-shadow:var(--shadow);
  transition:transform .18s, border-color .18s, box-shadow .18s; }
.mod:hover { transform:translateY(-4px); border-color:#2f3a5a; box-shadow:var(--shadow), var(--shadow2); }
.mod .num { display:inline-flex; align-items:center; justify-content:center; width:40px; height:40px;
  border-radius:12px; font-size:18px; font-weight:800; color:#fff; background:var(--grad); margin-bottom:14px;
  box-shadow:0 8px 24px -10px rgba(139,123,255,.7); }
.mod h3 { margin:0 0 6px; font-size:18px; color:var(--ink); }
.mod p { margin:0 0 14px; font-size:13.5px; color:var(--mut); line-height:1.55; }
.mod ul { margin:0 0 16px; padding-left:18px; }
.mod li { font-size:12.5px; color:var(--mut); margin:3px 0; }
.mod .go { margin-top:auto; font-size:13px; font-weight:700; color:var(--acc2); }
.mod .rt { position:absolute; top:22px; right:22px; font-size:11px; color:var(--dim); }

/* key takeaway box */
.takeaway { border:1px solid rgba(90,209,154,.28); border-left:3px solid var(--good);
  background:linear-gradient(180deg,#0c1a14,#0a0f0c); border-radius:14px; padding:16px 20px; margin:24px 0; }
.takeaway b { color:var(--good); letter-spacing:.04em; font-size:11px; text-transform:uppercase; }
.takeaway ul { margin:8px 0 0; padding-left:20px; } .takeaway li { margin:5px 0; color:var(--mut); font-size:13.5px; }

/* what you'll learn */
.learn-goals { border:1px solid var(--line2); border-radius:14px; background:rgba(255,255,255,.015);
  padding:16px 20px; margin:0 0 26px; }
.learn-goals .lg-t { font-size:11px; font-weight:700; letter-spacing:.12em; text-transform:uppercase;
  color:var(--acc); margin-bottom:8px; }
.learn-goals ul { margin:0; padding-left:20px; } .learn-goals li { margin:4px 0; color:var(--mut); font-size:13.5px; }

/* prev / next pager */
.pager { display:flex; gap:14px; margin:42px 0 0; }
.pager a { flex:1; text-decoration:none; border:1px solid var(--line2); border-radius:14px; padding:14px 18px;
  background:var(--card); transition:transform .18s, border-color .18s; }
.pager a:hover { transform:translateY(-2px); border-color:#2f3a5a; }
.pager .dir { font-size:11px; font-weight:700; letter-spacing:.1em; text-transform:uppercase; color:var(--dim); }
.pager .ttl { display:block; margin-top:3px; font-size:14px; font-weight:650; color:var(--ink); }
.pager .nx { text-align:right; }
@media (max-width:640px){ .pager { flex-direction:column; } }

/* "Start here" cue on the Learn entry point */
.sidebar a .nav-badge {
  margin-left: 8px; font-size: 8.5px; font-weight: 800; letter-spacing: .09em;
  text-transform: uppercase; color: #06070b; background: var(--grad);
  padding: 2px 6px; border-radius: 6px; vertical-align: middle; position: relative; top: -1px;
  box-shadow: 0 4px 14px -6px rgba(139,123,255,.8);
}

/* Header ref links — clickable "#" anchor, revealed on hover/focus. */
.hanchor { margin-left: .45em; color: var(--acc2); text-decoration: none; opacity: .45; font-weight: 600; font-size: .72em; transition: opacity .12s; }
.content h2:hover .hanchor, .content h3:hover .hanchor, .hanchor:hover, .hanchor:focus { opacity: 1; text-decoration: underline; }
