/* 01-tokens.css */
/* Design tokens, base, typography, buttons. Mirrors the AI Gateway docs (Fluent 2). */
:root {
  --font: "Segoe UI Variable Text", "Segoe UI Variable", "Segoe UI", Aptos, -apple-system, BlinkMacSystemFont, system-ui, "Helvetica Neue", sans-serif;
  --font-display: "Segoe UI Variable Display", "Segoe UI Variable", "Segoe UI", Aptos, -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --mono: "Cascadia Code", "Cascadia Mono", "SF Mono", ui-monospace, Menlo, Consolas, monospace;
  --topbar-h: 56px;
  --radius-s: 4px; --radius: 8px; --radius-l: 12px; --radius-xl: 16px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --grad: linear-gradient(90deg, #0faeff 0%, #7e5be8 55%, #bb45ea 100%);
  --grad-soft: linear-gradient(135deg, rgba(59, 213, 255, .14), rgba(126, 91, 232, .14) 55%, rgba(187, 69, 234, .12));
  /* Fill behind white text: every stop keeps 4.5:1 or more with white. */
  --grad-solid: linear-gradient(90deg, #0b6ec2 0%, #6a3fd6 55%, #9b2bc7 100%);

  --bg: #ffffff; --bg-2: #fafafa; --bg-3: #f5f5f5; --bg-4: #ebebeb; --bg-elev: #ffffff; --bg-glass: rgba(255, 255, 255, .82);
  --fg: #242424; --fg-2: #424242; --fg-3: #616161; --fg-4: #696969;
  --stroke: #e0e0e0; --stroke-2: #ebebeb; --stroke-strong: #d1d1d1;
  --brand: #0f6cbd; --brand-hover: #115ea3; --brand-press: #0f548c; --brand-fg: #0f6cbd; --brand-bg: #ebf3fc; --brand-bg-2: #cfe4fa;
  --on-brand: #ffffff; --brand-solid: #0f6cbd; --brand-solid-hover: #115ea3;
  --violet: #7e5be8; --violet-fg: #5637c9; --violet-bg: #f4f0ff;
  --success: #107c10; --success-solid: #107c10; --success-bg: #f1faf1; --success-stroke: #9fd89f;
  --warning: #bc4b09; --warning-bg: #fff9f5; --warning-stroke: #fdcfb4;
  --danger: #c50f1f; --danger-bg: #fdf3f4; --danger-stroke: #eeacb2;
  --important: #5637c9; --important-bg: #f6f3ff; --important-stroke: #cdbff7;
  --code-bg: #fafafb; --code-head: #f3f3f5; --inline-code: #f0f0f2;
  --shadow-s: 0 1px 2px rgba(0, 0, 0, .06), 0 0 1px rgba(0, 0, 0, .08);
  --shadow: 0 4px 12px rgba(0, 0, 0, .06), 0 0 2px rgba(0, 0, 0, .08);
  --shadow-l: 0 16px 40px rgba(17, 24, 39, .14), 0 0 2px rgba(0, 0, 0, .1);
  --focus: 0 0 0 2px var(--bg), 0 0 0 4px var(--brand);

  --cat-violet: #7e5be8; --cat-azure: #0f6cbd; --cat-cyan: #07789f; --cat-magenta: #c2147c;
  --cat-green: #107c10; --cat-amber: #b35c00; --cat-slate: #546478;

  --dg-bg: #ffffff; --dg-surface: #ffffff; --dg-surface-2: #f7f7f9; --dg-stroke: #d6d6dc; --dg-text: #242424; --dg-muted: #616161;
  --dg-violet: #7e5be8; --dg-azure: #0f6cbd; --dg-cyan: #0a9fd8; --dg-magenta: #c2147c; --dg-green: #107c10; --dg-amber: #c46a00; --dg-red: #c50f1f;
  --dg-gw: #f4f0ff; --dg-gw-stroke: #b9a6f5; --dg-zone: #f6f8fb;

  --hd-glow: #8e5bff;
  color-scheme: light;
}

[data-theme="dark"] {
  --bg: #151518; --bg-2: #1a1a1e; --bg-3: #212126; --bg-4: #2a2a30; --bg-elev: #1f1f24; --bg-glass: rgba(21, 21, 24, .8);
  --fg: #f3f3f5; --fg-2: #d4d4d9; --fg-3: #a9a9b2; --fg-4: #94949d;
  --stroke: #2e2e35; --stroke-2: #26262c; --stroke-strong: #3b3b44;
  --brand: #2f8be0; --brand-hover: #479ef5; --brand-press: #62abf5; --brand-fg: #62abf5; --brand-bg: rgba(71, 158, 245, .12); --brand-bg-2: rgba(71, 158, 245, .24);
  --brand-solid: #115ea3; --brand-solid-hover: #0f6cbd;
  --violet: #a58bff; --violet-fg: #b9a5ff; --violet-bg: rgba(142, 91, 255, .14);
  --success: #54b054; --success-solid: #107c10; --success-bg: rgba(84, 176, 84, .1); --success-stroke: rgba(84, 176, 84, .4);
  --warning: #f2a35e; --warning-bg: rgba(242, 163, 94, .09); --warning-stroke: rgba(242, 163, 94, .38);
  --danger: #f1707b; --danger-bg: rgba(241, 112, 123, .09); --danger-stroke: rgba(241, 112, 123, .4);
  --important: #b9a5ff; --important-bg: rgba(142, 91, 255, .1); --important-stroke: rgba(165, 139, 255, .4);
  --code-bg: #1b1b20; --code-head: #222228; --inline-code: #2a2a31;
  --shadow-s: 0 1px 2px rgba(0, 0, 0, .4), 0 0 1px rgba(0, 0, 0, .5);
  --shadow: 0 6px 16px rgba(0, 0, 0, .35), 0 0 1px rgba(255, 255, 255, .06);
  --shadow-l: 0 20px 48px rgba(0, 0, 0, .55), 0 0 1px rgba(255, 255, 255, .08);

  --cat-violet: #a58bff; --cat-azure: #62abf5; --cat-cyan: #3ccbf4; --cat-magenta: #f472b6;
  --cat-green: #6cc56c; --cat-amber: #f0a33a; --cat-slate: #9eaec2;

  --dg-bg: #151518; --dg-surface: #1f1f24; --dg-surface-2: #26262c; --dg-stroke: #3b3b44; --dg-text: #f3f3f5; --dg-muted: #a9a9b2;
  --dg-violet: #a58bff; --dg-azure: #62abf5; --dg-cyan: #3ccbf4; --dg-magenta: #f472b6; --dg-green: #6cc56c; --dg-amber: #f0a33a; --dg-red: #f1707b;
  --dg-gw: rgba(142, 91, 255, .14); --dg-gw-stroke: rgba(165, 139, 255, .55); --dg-zone: rgba(255, 255, 255, .03);
  --hd-glow: #8e5bff;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--topbar-h) + 72px); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0; background: var(--bg); color: var(--fg); font: 400 16px/1.6 var(--font);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility;
  min-height: 100vh; display: flex; flex-direction: column;
}
body > main, body > .lab-layout { flex: 1 0 auto; }
img, svg, video { max-width: 100%; }
a { color: var(--brand-fg); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 4px; }
button { font: inherit; color: inherit; }
h1, h2, h3, h4 { font-family: var(--font-display); color: var(--fg); letter-spacing: -.01em; }
h1 { font-size: clamp(30px, 4vw, 40px); line-height: 1.15; font-weight: 650; margin: 0 0 12px; letter-spacing: -.02em; }
h2 { font-size: 26px; line-height: 1.25; font-weight: 600; }
h3 { font-size: 19px; line-height: 1.35; font-weight: 600; }
.h3 { font-size: 20px; }
code, kbd, pre, samp { font-family: var(--mono); }
kbd {
  display: inline-block; min-width: 20px; padding: 1px 6px; font-size: 12px; line-height: 18px; text-align: center;
  color: var(--fg-2); background: var(--bg-2); border: 1px solid var(--stroke); border-bottom-width: 2px; border-radius: 5px;
}
::selection { background: color-mix(in srgb, var(--brand) 22%, transparent); }
.i { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }
.i-fill { fill: currentColor; stroke: none; }
.num-quick { display: inline-flex; align-items: center; color: var(--violet-fg, currentColor); }
.num-quick .i { width: 1.3em; height: 1.3em; fill: currentColor; fill-opacity: .18; }
.sr-num .i { width: 16px; height: 16px; }
.muted { color: var(--fg-3); }
.container { width: min(1240px, 100% - 48px); margin-inline: auto; }
.skip-link { position: absolute; left: 12px; top: -48px; z-index: 100; padding: 8px 14px; background: var(--brand-solid); color: var(--on-brand); border-radius: var(--radius); }
.skip-link:focus { top: 8px; }
.eyebrow { margin: 0 0 10px; font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--brand-fg); }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { font-size: 18px; line-height: 1.55; color: var(--fg-2); margin: 0 0 20px; max-width: 760px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 36px; padding: 0 16px;
  font-size: 14px; font-weight: 600; line-height: 1; border-radius: var(--radius); border: 1px solid transparent;
  cursor: pointer; text-decoration: none !important; white-space: nowrap;
  transition: background .15s, border-color .15s, color .15s, box-shadow .15s, transform .15s var(--ease);
}
.btn .i { width: 18px; height: 18px; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--brand-solid); color: var(--on-brand); }
.btn-primary:hover { background: var(--brand-solid-hover); color: var(--on-brand); }
.btn-secondary { background: var(--bg-elev); color: var(--fg); border-color: var(--stroke-strong); }
.btn-secondary:hover { background: var(--bg-3); border-color: var(--fg-4); }
.btn-ghost { background: transparent; color: var(--fg-2); }
.btn-ghost:hover { background: var(--bg-3); color: var(--fg); }
.btn-pill { border-radius: 999px; }
.btn-sm { height: 32px; padding: 0 12px; font-size: 13px; gap: 6px; }
.btn-sm .i { width: 16px; height: 16px; }
.btn-lg { height: 44px; padding: 0 22px; font-size: 15px; }
.icon-btn {
  display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: var(--radius);
  border: 1px solid transparent; background: transparent; color: var(--fg-2); cursor: pointer; flex: none;
}
.icon-btn:hover { background: var(--bg-3); color: var(--fg); text-decoration: none; }
.link-btn { padding: 0; border: 0; background: none; color: var(--brand-fg); font-size: 12px; cursor: pointer; }
.link-btn:hover { text-decoration: underline; }
.link-arrow { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 14px; }
.link-arrow .i { width: 16px; height: 16px; transition: transform .2s var(--ease); }
.link-arrow:hover .i { transform: translateX(3px); }

/* Badges, chips, meta */
.badge {
  display: inline-flex; align-items: center; height: 20px; padding: 0 8px; border-radius: 999px; font-size: 11px; font-weight: 600;
  letter-spacing: .02em; border: 1px solid var(--stroke); color: var(--fg-2); background: var(--bg-elev); white-space: nowrap;
}
.badge-new { color: var(--success); border-color: var(--success-stroke); background: var(--success-bg); }
.badge-preview { color: var(--brand-fg); border-color: var(--brand-bg-2); background: var(--brand-bg); }
.badge-emerging { color: var(--violet-fg); border-color: var(--important-stroke); background: var(--violet-bg); }
.meta { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; color: var(--fg-3); white-space: nowrap; }
.meta .i { width: 16px; height: 16px; }
.level-dots { display: inline-flex; gap: 2px; align-items: flex-end; height: 12px; margin-right: 2px; }
.level-dots i { width: 3px; border-radius: 1px; background: var(--stroke-strong); }
.level-dots i:nth-child(1) { height: 5px; } .level-dots i:nth-child(2) { height: 8px; } .level-dots i:nth-child(3) { height: 11px; }
.level-dots i.on { background: var(--c, var(--brand)); }
.track-chips { display: inline-flex; gap: 4px; flex-wrap: wrap; }
.track-chip {
  display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 6px; border-radius: 6px;
  background: var(--bg-3); color: var(--fg-2); font-size: 12px; font-weight: 500;
}
.track-chip .i { width: 15px; height: 15px; }
.track-chip:not(:has(span)) { width: 24px; justify-content: center; padding: 0; }

/* 02-chrome.css */
/* Top bar, footer, overlays (search, values drawer, lightbox, toast). */
.topbar {
  position: sticky; top: 0; z-index: 50; height: var(--topbar-h);
  background: var(--bg-glass); backdrop-filter: saturate(180%) blur(14px); -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--stroke);
}
.topbar-inner { height: 100%; display: flex; align-items: center; gap: 16px; padding: 0 20px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--fg); font-weight: 600; font-size: 16px; text-decoration: none !important; flex: none; }
.brand-logo { width: 28px; height: 28px; }
.brand-name { letter-spacing: -.01em; }
.brand-badge {
  height: 20px; padding: 0 7px; display: inline-flex; align-items: center; border: 1px solid var(--stroke-strong);
  border-radius: 5px; font-size: 11px; font-weight: 600; color: var(--fg-2); letter-spacing: .02em;
}
.topnav { display: flex; flex: none; align-items: center; gap: 2px; margin-left: 12px; white-space: nowrap; }
.topnav a {
  padding: 6px 10px; border-radius: 6px; color: var(--fg-2); font-size: 14px; font-weight: 500; text-decoration: none;
}
.topnav a:hover { background: var(--bg-3); color: var(--fg); }
.topnav a[aria-current="page"] { color: var(--brand-fg); background: var(--brand-bg); }
.topbar-actions { margin-left: auto; min-width: 0; display: flex; align-items: center; gap: 6px; }
.topbar-actions > * { flex: none; }
.topbar-link { color: var(--fg-2); font-size: 14px; font-weight: 500; padding: 6px 8px; border-radius: 6px; }
.topbar-link:hover { color: var(--fg); background: var(--bg-3); text-decoration: none; }
.search-trigger {
  display: inline-flex; align-items: center; gap: 8px; height: 34px; width: 240px; flex: 0 1 auto; min-width: 0; padding: 0 6px 0 10px; margin-right: 6px;
  background: var(--bg-3); color: var(--fg-3); border: 1px solid var(--stroke); border-radius: var(--radius); cursor: pointer; font-size: 13px;
}
.search-trigger:hover { border-color: var(--stroke-strong); color: var(--fg-2); }
.search-trigger .i { width: 16px; height: 16px; }
.search-trigger span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: left; }
.search-trigger kbd { font-size: 11px; background: var(--bg-elev); }
[data-theme="light"] .theme-sun, [data-theme="dark"] .theme-moon { display: none; }
.theme-sun, .theme-moon { display: inline-grid; }
.nav-toggle { display: none; }

/* Footer */
.footer { margin-top: 64px; border-top: 1px solid var(--stroke); background: var(--bg-2); color: var(--fg-3); font-size: 14px; }
.footer-inner { width: min(1240px, 100% - 48px); margin: 0 auto; padding: 40px 0 24px; display: grid; grid-template-columns: 1.2fr 2fr; gap: 40px; }
.footer-brand p { max-width: 360px; margin: 12px 0 0; line-height: 1.55; }
.footer-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.footer-cols h2 { font-size: 12px; text-transform: uppercase; letter-spacing: .1em; color: var(--fg-2); margin: 4px 0 10px; font-weight: 600; }
.footer-cols a { display: block; color: var(--fg-3); padding: 3px 0; }
.footer-cols a:hover { color: var(--brand-fg); }
.footer-legal { width: min(1240px, 100% - 48px); margin: 0 auto; padding: 16px 0 28px; border-top: 1px solid var(--stroke); display: flex; flex-wrap: wrap; gap: 20px; font-size: 12px; }
.footer-legal a { color: var(--fg-3); }

/* Modal base */
.modal, .drawer, .lightbox { position: fixed; inset: 0; z-index: 100; }
.modal[hidden], .drawer[hidden], .lightbox[hidden] { display: none; }
.modal-scrim, .drawer-scrim { position: absolute; inset: 0; background: rgba(10, 10, 20, .38); backdrop-filter: blur(2px); animation: fade .15s ease-out; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.985); } }
@keyframes slide-in { from { transform: translateX(24px); opacity: 0; } }

/* Search */
.search-modal .modal-card {
  position: relative; width: min(680px, 100% - 32px); margin: 10vh auto 0; max-height: 76vh; display: flex; flex-direction: column;
  background: var(--bg-elev); border: 1px solid var(--stroke); border-radius: var(--radius-l); box-shadow: var(--shadow-l); overflow: hidden;
  animation: pop .18s var(--ease);
}
.search-box { display: flex; align-items: center; gap: 10px; padding: 0 16px; border-bottom: 1px solid var(--stroke); }
.search-box:focus-within { outline: 2px solid var(--brand); outline-offset: -2px; border-radius: var(--radius-l) var(--radius-l) 0 0; }
.search-box .i { color: var(--fg-3); }
.search-box input { flex: 1; height: 56px; border: 0; outline: 0; background: transparent; color: var(--fg); font: 400 17px var(--font); }
.search-results { overflow-y: auto; padding: 8px; }
.search-group { padding: 10px 10px 4px; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .1em; color: var(--fg-4); }
.sr-item { display: flex; gap: 12px; align-items: flex-start; padding: 10px 12px; border-radius: var(--radius); color: var(--fg); text-decoration: none !important; }
.sr-item[aria-selected="true"] { background: var(--brand-bg); }
.sr-item[aria-selected="true"] .sr-title { color: var(--brand-fg); }
.sr-num {
  flex: none; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 8px; background: var(--bg-3);
  font: 600 12px var(--mono); color: var(--fg-2);
}
.sr-body { display: flex; flex-direction: column; min-width: 0; gap: 1px; }
.sr-title { font-weight: 600; font-size: 14.5px; }
.sr-sub { font-size: 12.5px; color: var(--fg-3); }
.sr-snippet { font-size: 13px; color: var(--fg-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sr-item mark { background: none; color: inherit; font-weight: 700; text-decoration: underline 2px color-mix(in srgb, var(--brand) 70%, transparent); text-underline-offset: 3px; }
.search-empty { padding: 40px 16px; text-align: center; color: var(--fg-3); }
.search-foot { display: flex; gap: 16px; padding: 10px 16px; border-top: 1px solid var(--stroke); font-size: 12px; color: var(--fg-3); background: var(--bg-2); }
.search-foot kbd { margin-right: 4px; }

/* Values drawer */
.drawer-card {
  position: absolute; top: 0; right: 0; bottom: 0; width: min(420px, 100%); display: flex; flex-direction: column;
  background: var(--bg-elev); border-left: 1px solid var(--stroke); box-shadow: var(--shadow-l); animation: slide-in .2s var(--ease);
}
.drawer-head { display: flex; align-items: center; gap: 10px; padding: 16px 16px 8px 20px; }
.drawer-head h2 { margin: 0; font-size: 18px; flex: 1; display: flex; align-items: center; gap: 8px; }
.drawer-note { margin: 0 20px 12px; font-size: 13px; color: var(--fg-3); line-height: 1.5; }
.drawer-note strong { color: var(--fg-2); }
.values-form { flex: 1; overflow-y: auto; padding: 4px 20px 20px; display: grid; gap: 14px; align-content: start; }
.field { display: grid; gap: 6px; }
.field > span { font-size: 13px; font-weight: 600; color: var(--fg-2); display: flex; justify-content: space-between; gap: 8px; }
.field > span code { font-size: 11.5px; font-weight: 400; color: var(--fg-4); }
.input, .field input, .field select {
  height: 36px; padding: 0 10px; border-radius: 6px; border: 1px solid var(--stroke-strong); border-bottom-color: var(--fg-4);
  background: var(--bg); color: var(--fg); font: 400 14px var(--font); width: 100%;
}
.field input { font-family: var(--mono); font-size: 13px; }
.input:focus-visible, .field input:focus-visible, .field select:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; border-color: var(--brand); }
.drawer-foot { display: flex; justify-content: space-between; gap: 8px; padding: 14px 20px; border-top: 1px solid var(--stroke); }

/* Lightbox */
.lightbox { display: grid; place-items: center; padding: 32px; background: rgba(10, 10, 16, .82); backdrop-filter: blur(6px); animation: fade .15s; cursor: zoom-out; }
.lightbox img { max-width: min(1600px, 100%); max-height: calc(100vh - 96px); border-radius: var(--radius); box-shadow: var(--shadow-l); background: #fff; animation: pop .2s var(--ease); }
.lightbox-cap { position: absolute; left: 0; right: 0; bottom: 18px; text-align: center; color: #e8e8ee; font-size: 14px; padding: 0 24px; }
.lightbox-close { position: absolute; top: 16px; right: 16px; color: #fff; background: rgba(255, 255, 255, .12); }
.lightbox-close:hover { background: rgba(255, 255, 255, .22); color: #fff; }
.video-theater { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; align-content: center; gap: 14px; padding: 64px 24px 20px; background: rgba(6, 8, 18, .94); backdrop-filter: blur(6px); animation: fade .15s; }
.video-theater[hidden] { display: none; }
.video-theater .video-frame { width: min(100%, calc((100vh - 124px) * 16 / 9)); width: min(100%, calc((100dvh - 124px) * 16 / 9)); animation: pop .2s var(--ease); }
.video-theater video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; border-radius: 12px; background: #000; box-shadow: var(--shadow-l); }
.video-theater .video-expand { display: none; }
.video-theater video::-webkit-media-controls-fullscreen-button { display: none; }
.video-theater-close { position: absolute; top: 16px; right: 16px; color: #fff; background: rgba(255, 255, 255, .12); }
.video-theater-close:hover { background: rgba(255, 255, 255, .22); color: #fff; }
.video-theater-cap { margin: 0; color: #c9cbe0; font-size: 14px; text-align: center; }

/* Toast */
.toast {
  position: fixed; left: 50%; bottom: 28px; z-index: 120; transform: translate(-50%, 16px); opacity: 0; pointer-events: none;
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 999px; font-size: 14px; font-weight: 500;
  background: var(--fg); color: var(--bg); box-shadow: var(--shadow-l); transition: opacity .2s, transform .25s var(--ease);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast .i { width: 18px; height: 18px; }

/* 03-home.css */
/* Home page: hero, sections, tracks, paths, use cases, categories, anatomy, resources. */
.hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--stroke); }
.hero-bg {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(700px 380px at 82% 30%, rgba(142, 91, 255, .16), transparent 70%),
    radial-gradient(520px 320px at 62% 85%, rgba(15, 175, 255, .12), transparent 70%),
    radial-gradient(600px 300px at 0% 0%, rgba(15, 108, 189, .06), transparent 70%);
}
.hero-inner { position: relative; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 48px; align-items: center; padding: 72px 0 64px; }
.hero h1 { font-size: clamp(36px, 5.2vw, 58px); line-height: 1.05; letter-spacing: -.03em; font-weight: 700; margin-bottom: 18px; }
.hero-lead { font-size: 19px; line-height: 1.55; color: var(--fg-2); max-width: 580px; margin: 0 0 28px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 36px; }
.hero-stats { display: flex; gap: 32px; margin: 0; flex-wrap: wrap; }
.hero-stats div { display: flex; flex-direction: column-reverse; }
.hero-stats dt { font-size: 13px; color: var(--fg-3); }
.hero-stats dd { margin: 0; font: 650 28px/1.1 var(--font-display); letter-spacing: -.02em; color: var(--fg); }
.hero-visual { position: relative; }
/* Hero architecture map: the product's architecture picture, with the product's own icons (Fluent UI and the provider
   marks). Every part links to the lab that teaches it; with JavaScript, selecting a part previews that lab. */
.hero-inner.hx-hero { grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 32px; }
.hx { --hx-gap: 20px; --hx-arrow: var(--fg-3); --hx-wire: color-mix(in srgb, var(--fg-3) 70%, transparent); --hx-g1: #0f6cbd; --hx-g2: #115ea3; position: relative; font-size: 12.5px; line-height: 1.3; color: var(--fg-2); }
[data-theme="dark"] .hx { --hx-g1: #479ef5; --hx-g2: #2886de; }
.hx::before { content: ""; position: absolute; inset: 18% 22%; border-radius: 50%; background: radial-gradient(closest-side, color-mix(in srgb, var(--hd-glow) 26%, transparent), transparent); filter: blur(12px); pointer-events: none; }
.hx-defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.hx-g1 { stop-color: var(--hx-g1); } .hx-g2 { stop-color: var(--hx-g2); }
.hx-grid { position: relative; display: grid; grid-template-columns: minmax(0, 158fr) minmax(0, 386fr) minmax(0, 152fr); grid-template-areas: "ctl ctl ctl" "wl gw be" "obs obs obs"; gap: var(--hx-gap); }
.hx-ctl { grid-area: ctl; } .hx-wl { grid-area: wl; } .hx-gw { grid-area: gw; } .hx-be { grid-area: be; } .hx-obs { grid-area: obs; }
.hx-title { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 500; color: var(--fg-3); }
.hx-band { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; }
.hx-band-items { display: flex; flex-wrap: wrap; justify-content: center; gap: 0 2px; }
.hx-band .hx-link { gap: 6px; padding: 5px 7px; font-size: 12px; }
.hx-link { position: relative; display: inline-flex; align-items: center; gap: 8px; min-width: 0; padding: 6px 8px; border-radius: 8px; color: var(--fg); font-weight: 500; text-decoration: none; transition: background-color .15s var(--ease), color .15s var(--ease), box-shadow .2s var(--ease); }
a.hx-link:is(:hover, :focus-visible) { background: var(--brand-bg); color: var(--brand-fg); text-decoration: none; }
.hx-text { min-width: 0; }
.hx-mark { display: inline-flex; flex: none; color: var(--fg-2); transition: color .15s var(--ease); }
.hx-ico { width: 20px; height: 20px; flex: none; }
/* As in the product, the capability icons are filled with the brand gradient. */
.hx-cap .hx-mark, .hxp-head-cap .hx-mark { fill: url(#hx-grad); }
:is(.hx-cap, .hxp-head-cap) .hx-ico, :is(.hx-cap, .hxp-head-cap) .hx-ico path { fill: inherit; }
a.hx-link:is(:hover, :focus-visible) .hx-mark { color: var(--brand-fg); }
.hx-num { flex: none; padding: 2px 4px; border-radius: 4px; background: var(--brand-bg); font: 650 10px/1 var(--font); font-variant-numeric: tabular-nums; letter-spacing: .02em; color: var(--brand-fg); }
:is(a.hx-link, a.hx-group):is(:hover, :focus-visible, [aria-expanded="true"]) .hx-num { background: var(--bg-elev); }
.hx-lbl { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.hx-lab { font: 600 10.5px/1.25 var(--font); font-variant-numeric: tabular-nums; letter-spacing: .02em; color: var(--brand-fg); }
.hx-card { position: relative; display: flex; flex-direction: column; gap: 8px; padding: 14px 8px 12px; border: 1px solid var(--stroke); border-radius: 16px; background: var(--bg-elev); box-shadow: var(--shadow); }
.hx-card > .hx-title { padding: 0 8px; }
.hx-wl-items { display: flex; flex: 1; flex-direction: column; justify-content: space-around; }
.hx-gw { padding: 14px 8px 12px; box-shadow: var(--shadow-l); }
.hx-gw-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 8px; }
.hx-gw-title { padding-inline: 6px; font: 650 14.5px/1.2 var(--font-display); white-space: nowrap; }
.hx-gw-title img { width: 22px; height: 22px; flex: none; }
.hx-pill { flex: none; gap: 6px; padding: 3px 6px 3px 10px; border: 1px solid var(--stroke-strong); border-radius: 999px; font-size: 11px; font-weight: 500; color: var(--fg-2); white-space: nowrap; }
.hx-caps { display: grid; flex: 1; grid-template-columns: repeat(2, minmax(0, 1fr)); align-content: space-around; gap: 2px; }
.hx-cap { display: flex; padding: 7px 6px; }
.hx-be { gap: 2px; padding: 8px; }
.hx-group { display: flex; flex-direction: column; gap: 7px; padding: 6px 8px 8px; border-radius: 10px; color: inherit; text-decoration: none; transition: background-color .15s var(--ease); }
a.hx-group:is(:hover, :focus-visible) { background: var(--brand-bg); text-decoration: none; }
a.hx-group:is(:hover, :focus-visible, [aria-expanded="true"]) .hx-title { color: var(--brand-fg); }
.hx-tiles { display: flex; flex-wrap: wrap; gap: 4px; max-width: calc(3 * 28px + 2 * 4px); }
.hx-tile { display: inline-grid; place-items: center; width: 28px; height: 28px; overflow: hidden; border-radius: 8px; background: var(--bg-2); color: var(--fg-2); }
.hx-tile .hx-ico, .hx-brand { width: 16px; height: 16px; }
.hx-brand { object-fit: contain; }
.hx-tile[data-brand="openai"] .hx-brand { width: 30px; height: 30px; } /* the product's OpenAI mark carries its own padding */
/* OpenAI, Google Gemini, and TypeSafe AI ship a mark for each theme, as in the product. */
.hx-brand-dark, [data-theme="dark"] .hx-brand-light { display: none; }
[data-theme="dark"] .hx-brand-dark { display: block; }
.hx-soon { padding: 1px 6px; white-space: nowrap; border: 1px solid var(--stroke-strong); border-radius: 5px; font-size: 10px; color: var(--fg-3); }
.hx-group-soon .hx-tile { opacity: .55; }
.hx-group-soon .hx-title { flex-wrap: wrap; }
.hx [aria-expanded="true"] { background: var(--brand-bg); color: var(--brand-fg); box-shadow: inset 0 0 0 1px var(--brand-bg-2); }
.hx-hint { margin: 18px 0 0; text-align: center; font-size: 12px; color: var(--fg-3); }

/* Wires: workloads → gateway → backends, controls → gateway → observability. */
/* Each wire spans the gap, and its arrowhead's tip touches the next card, above the cards' shadows. The line and the
   arrowhead share one 10px box with whole-pixel sizes, so the browser snaps them together and the arrow stays centered. */
.hx-wire { --hx-head: 7px; position: absolute; z-index: 1; pointer-events: none; }
.hx-wire-l, .hx-wire-r { top: calc(50% - 5px); width: var(--hx-gap); height: 10px; background: repeating-linear-gradient(90deg, var(--hx-wire) 0 4px, transparent 4px 7px) 0 50% / calc(100% - var(--hx-head)) 2px no-repeat; }
.hx-wire-l { right: calc(100% + 1px); } .hx-wire-r { left: calc(100% + 1px); }
.hx-wire-t, .hx-wire-b { left: calc(50% - 5px); width: 10px; height: var(--hx-gap); background: repeating-linear-gradient(180deg, var(--hx-wire) 0 4px, transparent 4px 7px) 50% 0 / 2px calc(100% - var(--hx-head)) no-repeat; }
.hx-wire-t { bottom: calc(100% + 1px); } .hx-wire-b { top: calc(100% + 1px); }
.hx-wire::after { content: ""; position: absolute; border-style: solid; border-color: transparent; }
.hx-wire-l::after, .hx-wire-r::after { top: 0; right: 0; border-width: 5px 0 5px var(--hx-head); border-left-color: var(--hx-arrow); }
.hx-wire-t::after, .hx-wire-b::after { bottom: 0; left: 0; border-width: var(--hx-head) 5px 0; border-top-color: var(--hx-arrow); }
@keyframes dash { to { stroke-dashoffset: -22; } }

/* Hero preview: the lab behind a part of the map, in the top layer next to the part. A bottom sheet on phones. */
.hxp {
  --c: var(--cat-violet);
  position: fixed; inset: auto; top: 0; left: 0; margin: 0; padding: 0; width: min(380px, calc(100vw - 24px)); overflow: visible;
  border: 1px solid var(--stroke); border-radius: 14px; background: var(--bg-elev); color: var(--fg-2); font-size: 14px; line-height: 1.5;
  box-shadow: 0 18px 48px rgba(17, 24, 39, .16), 0 2px 6px rgba(17, 24, 39, .06);
}
[data-theme="dark"] .hxp { box-shadow: 0 18px 48px rgba(0, 0, 0, .55), 0 2px 6px rgba(0, 0, 0, .3); }
.hxp:popover-open { animation: hxp-in .24s cubic-bezier(.16, 1, .3, 1); }
.hxp[data-side="top"] { --hxp-dy: -6px; } .hxp[data-side="left"] { --hxp-dx: -6px; --hxp-dy: 0; } .hxp[data-side="right"] { --hxp-dx: 6px; --hxp-dy: 0; }
@keyframes hxp-in { from { opacity: 0; transform: translate(var(--hxp-dx, 0), var(--hxp-dy, 6px)) scale(.98); } }
.hxp:focus { outline: none; }
.hxp:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.hxp-arrow { position: absolute; z-index: 1; width: 12px; height: 12px; border: 1px solid var(--stroke); background: var(--bg-elev); transform: rotate(45deg); }
.hxp[data-side="bottom"] .hxp-arrow { top: -7px; left: calc(var(--ax) - 6px); border-right: 0; border-bottom: 0; }
.hxp[data-side="top"] .hxp-arrow { bottom: -7px; left: calc(var(--ax) - 6px); border-left: 0; border-top: 0; background: var(--bg-2); }
.hxp[data-side="right"] .hxp-arrow { left: -7px; top: calc(var(--ay) - 6px); border-top: 0; border-right: 0; }
.hxp[data-side="left"] .hxp-arrow { right: -7px; top: calc(var(--ay) - 6px); border-bottom: 0; border-left: 0; }
.hxp-in { max-height: var(--hxp-max, calc(100vh - 24px)); overflow: auto; overscroll-behavior: contain; border-radius: inherit; }
.hxp-head { display: flex; align-items: center; gap: 8px; padding: 8px 8px 8px 14px; border-bottom: 1px solid var(--stroke); }
.hxp-head .hx-mark { color: var(--fg-2); }
.hxp-head .hx-ico { width: 18px; height: 18px; }
.hxp-part { flex: 1; min-width: 0; font-size: 13px; font-weight: 600; color: var(--fg); }
.hxp-part span { font-weight: 400; color: var(--fg-3); }
.hxp-close { flex: none; width: 30px; height: 30px; }
.hxp-art { display: block; margin: 12px 12px 0; aspect-ratio: 2 / 1; overflow: hidden; border: 1px solid var(--stroke); border-radius: 10px; background: var(--bg-2); }
.hxp-art svg { display: block; width: 100%; height: 100%; }
.hxp-art.is-loading { background: linear-gradient(100deg, var(--bg-2) 30%, var(--bg-3) 50%, var(--bg-2) 70%) 0 0 / 300% 100%; animation: hxp-shimmer 1.4s linear infinite; }
@keyframes hxp-shimmer { from { background-position: 100% 0; } to { background-position: 0 0; } }
.hxp-body { padding: 14px 16px 16px; }
.hxp-title { margin: 0 0 6px; font: 650 16.5px/1.3 var(--font-display); letter-spacing: -.01em; color: var(--fg); text-wrap: balance; }
.hxp-title a { color: inherit; }
.hxp-title a:hover { color: var(--brand-fg); text-decoration: none; }
.hxp-sum { display: -webkit-box; margin: 0 0 12px; overflow: hidden; font-size: 13.5px; color: var(--fg-2); -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; }
.hxp-facts { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin: 0 0 14px; }
.hxp-facts .lab-card-num { font-size: 12px; }
.hxp-facts .badge { margin-left: -6px; }
.hxp-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.hxp-progress { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; color: var(--fg-3); }
.hxp-progress.done { color: var(--success); font-weight: 600; }
.hxp-progress .i { width: 15px; height: 15px; }
.hxp-rel { padding: 12px 16px 14px; border-top: 1px solid var(--stroke); background: var(--bg-2); }
.hxp-rel h4 { margin: 0 0 6px; font-size: 12px; font-weight: 600; color: var(--fg-3); }
.hxp-rel ul { display: grid; gap: 2px; margin: 0; padding: 0; list-style: none; }
.hxp-rel a { display: flex; align-items: center; gap: 10px; margin: 0 -8px; padding: 6px 8px; border-radius: 8px; color: var(--fg); font-size: 13px; font-weight: 500; }
.hxp-rel a:is(:hover, :focus-visible) { background: var(--bg-3); text-decoration: none; }
.hxp-rel a > .i { width: 15px; height: 15px; margin-left: auto; color: var(--fg-3); flex: none; }
.hxp-rel b { flex: none; min-width: 28px; padding: 2px 5px; border: 1px solid var(--stroke); border-radius: 6px; background: var(--bg-elev); font: 600 11px/1.3 var(--mono); text-align: center; color: var(--c); }
.hxp-rel b .num-quick .i { width: 13px; height: 13px; }
.hxp[data-side="sheet"] { inset: auto 0 0 0; width: 100%; max-width: none; border-width: 1px 0 0; border-radius: 18px 18px 0 0; }
.hxp[data-side="sheet"] .hxp-arrow { display: none; }
.hxp[data-side="sheet"] .hxp-in { max-height: 86vh; }
.hxp[data-side="sheet"]:popover-open { --hxp-dy: 28px; }
.hxp[data-side="sheet"]::backdrop { background: rgba(0, 0, 0, .36); }
@media (max-height: 700px) { .hxp:not([data-side="sheet"]) .hxp-art { display: none; } }

/* Sections */
.section { padding: 80px 0; }
.section-tinted { background: var(--bg-2); border-block: 1px solid var(--stroke); }
.section-head { max-width: 760px; margin-bottom: 36px; }
.section-head h2 { font-size: clamp(26px, 3vw, 34px); margin: 0 0 10px; letter-spacing: -.02em; }
.section-head p { margin: 0; color: var(--fg-2); font-size: 17px; }
.section-head-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; max-width: none; }

/* Quick start band */
.qs-band { padding: 56px 0 8px; }
.qs-card {
  position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 40px; align-items: center;
  padding: 36px 40px; border-radius: var(--radius-xl); background: var(--bg-elev); border: 1px solid var(--stroke);
  box-shadow: var(--shadow); overflow: hidden;
}
.qs-card::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(520px 260px at 0% 0%, color-mix(in srgb, var(--violet) 12%, transparent), transparent 70%);
}
.qs-copy { position: relative; }
.qs-copy .eyebrow { display: inline-flex; align-items: center; gap: 6px; color: var(--violet-fg); }
.qs-copy .eyebrow .i { width: 16px; height: 16px; }
.qs-copy h2 { font-size: clamp(24px, 2.6vw, 30px); letter-spacing: -.02em; margin: 0 0 10px; }
.qs-copy > p { margin: 0 0 20px; color: var(--fg-2); font-size: 16px; max-width: 520px; }
.qs-steps { list-style: none; margin: 0 0 24px; padding: 0; display: grid; gap: 8px; }
.qs-steps li {
  display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 12px; align-items: center;
  padding: 10px 14px; border-radius: var(--radius-l); background: var(--bg-2); border: 1px solid var(--stroke-2); font-size: 15px; color: var(--fg-2);
}
.qs-steps strong { color: var(--fg); }
.qs-step-num {
  width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%;
  background: var(--violet-bg); color: var(--violet-fg); font: 650 13px/1 var(--font-display);
}
.qs-cta { display: flex; flex-wrap: wrap; gap: 10px; }
.qs-terminal { position: relative; margin: 0; border-radius: var(--radius-l); overflow: hidden; background: #111116; border: 1px solid #2a2a31; box-shadow: var(--shadow-l); }
.qs-terminal-bar { display: flex; align-items: center; gap: 6px; padding: 10px 14px; background: #1b1b21; border-bottom: 1px solid #2a2a31; }
.qs-terminal-bar span { width: 10px; height: 10px; border-radius: 50%; background: #3a3a42; }
.qs-terminal-bar b { margin-left: 8px; font-size: 12px; font-weight: 600; color: #a9a9b2; }
.qs-terminal pre { margin: 0; padding: 16px 18px; overflow-x: auto; font-size: 13px; line-height: 1.6; color: #e6e6ea; background: none; border: 0; }
.qs-terminal code { display: block; font-family: var(--mono); background: none; padding: 0; color: inherit; white-space: normal; }
.qs-line { display: block; white-space: pre-wrap; }
.qs-hang { padding-left: 6ch; text-indent: -6ch; }
.qs-st { padding-left: 3ch; text-indent: -3ch; }
.qs-url { overflow-wrap: anywhere; }
.qs-gap { margin-top: 1.6em; }
.qs-nb { white-space: nowrap; }
.qs-prompt { color: #62abf5; }
.qs-hl { color: #c7b8ff; }
.qs-ok { color: #6ccb5f; font-weight: 600; }
.qs-err { color: #ff7b72; font-weight: 600; }
.qs-terminal figcaption { padding: 0 18px 12px; font-size: 12px; color: #84848d; }

/* Tracks */
.track-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.track-card {
  position: relative; padding: 28px; border-radius: var(--radius-l); background: var(--bg-elev); border: 1px solid var(--stroke);
  box-shadow: var(--shadow-s); overflow: hidden;
}
.track-card h3 { margin: 16px 0 8px; font-size: 20px; }
.track-card p { margin: 0 0 16px; color: var(--fg-2); font-size: 15px; }
.track-card-icon {
  width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px;
  background: color-mix(in srgb, var(--c, var(--brand)) 12%, transparent); color: var(--c, var(--brand));
}
.track-card-icon .i { width: 24px; height: 24px; }
.feature-row { list-style: none; margin: 28px 0 0; padding: 18px 22px; display: grid; grid-template-columns: repeat(4, auto); justify-content: space-between; gap: 12px 28px; border: 1px dashed var(--stroke-strong); border-radius: var(--radius-l); }
.feature-row li { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; color: var(--fg-2); }
.feature-row li .i { width: 18px; height: 18px; color: var(--success); margin-top: 2px; }

/* Learning paths */
.path-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
.path-card {
  display: flex; flex-direction: column; padding: 24px; border-radius: var(--radius-l); background: var(--bg-elev);
  border: 1px solid var(--stroke); box-shadow: var(--shadow-s); transition: border-color .2s, box-shadow .2s, transform .2s var(--ease);
}
.path-card:hover { border-color: var(--stroke-strong); box-shadow: var(--shadow); }
.path-card-head { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 14px; }
.path-card-head h3 { margin: 0 0 2px; font-size: 18px; }
.path-icon { flex: none; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 10px; background: var(--grad-soft); color: var(--violet-fg); }
.path-persona { margin: 0; font-size: 13px; color: var(--fg-3); }
.path-card > p { margin: 0 0 16px; font-size: 14.5px; color: var(--fg-2); }
.path-steps { list-style: none; margin: 0 0 18px; padding: 0; display: grid; gap: 2px; counter-reset: p; }
.path-steps li a {
  display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 6px; color: var(--fg-2); font-size: 14px; text-decoration: none;
}
.path-steps li a:hover { background: var(--bg-3); color: var(--fg); }
.path-num { flex: none; width: 26px; font: 600 11.5px var(--mono); color: var(--fg-4); }
.path-title { flex: 1; min-width: 0; }
.path-check { flex: none; width: 18px; height: 18px; color: var(--success); opacity: 0; transition: opacity .2s; }
.path-steps li.done .path-check { opacity: 1; }
.path-steps li.done .path-title { color: var(--fg-3); }
.path-card-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 14px; border-top: 1px solid var(--stroke-2); }

/* Use cases */
.usecase-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.usecase-col-title { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; font-size: 15px; font-weight: 600; color: var(--fg-2); text-transform: uppercase; letter-spacing: .08em; }
.dot { width: 8px; height: 8px; border-radius: 50%; }
.dot-core { background: var(--cat-azure); }
.dot-emerging { background: var(--cat-violet); box-shadow: 0 0 0 4px color-mix(in srgb, var(--cat-violet) 20%, transparent); }
.usecase-col { display: flex; flex-direction: column; gap: 12px; }
.usecase-col .usecase-col-title { margin-bottom: 4px; }
.usecase {
  display: flex; gap: 14px; padding: 16px; border-radius: var(--radius-l); background: var(--bg-elev); border: 1px solid var(--stroke);
  color: var(--fg); text-decoration: none !important; transition: border-color .2s, transform .2s var(--ease), box-shadow .2s;
}
a.usecase:hover { border-color: var(--c, var(--brand)); box-shadow: var(--shadow); transform: translateY(-1px); }
.usecase.core { --c: var(--cat-azure); } .usecase.emerging { --c: var(--cat-violet); }
.usecase-icon { flex: none; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 10px; color: var(--c); background: color-mix(in srgb, var(--c) 12%, transparent); }
.usecase-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.usecase-title { font-weight: 600; font-size: 15px; }
.usecase-text { font-size: 14px; color: var(--fg-3); line-height: 1.5; }
.usecase-lab { margin-top: 4px; font-size: 12.5px; font-weight: 600; color: var(--c); display: inline-flex; gap: 4px; align-items: center; }
.usecase-lab .i { width: 14px; height: 14px; }

/* Categories */
.cat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.cat-grid + .section-head { margin-top: 64px; margin-bottom: 24px; }
.home .lab-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cat-tile {
  display: flex; flex-direction: column; gap: 6px; padding: 18px; border-radius: var(--radius-l); border: 1px solid var(--stroke);
  background: var(--bg-elev); color: var(--fg); text-decoration: none !important; transition: border-color .2s, box-shadow .2s, transform .2s var(--ease);
}
.cat-tile:hover { border-color: var(--c); box-shadow: var(--shadow); transform: translateY(-2px); }
.cat-tile-icon { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 10px; color: var(--c); background: color-mix(in srgb, var(--c) 12%, transparent); margin-bottom: 4px; }
.cat-tile-title { font-weight: 600; font-size: 15px; }
.cat-tile-desc { font-size: 13px; color: var(--fg-3); line-height: 1.45; flex: 1; }
.cat-tile-count { font-size: 12px; font-weight: 600; color: var(--c); }

/* Lab cards */
.lab-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 18px; }
.lab-card {
  position: relative; display: flex; flex-direction: column; border-radius: var(--radius-l); background: var(--bg-elev); border: 1px solid var(--stroke);
  color: var(--fg); text-decoration: none !important; overflow: hidden; box-shadow: var(--shadow-s);
  transition: border-color .2s, box-shadow .2s, transform .2s var(--ease);
}
.lab-card:hover { border-color: color-mix(in srgb, var(--c) 60%, var(--stroke)); box-shadow: var(--shadow); transform: translateY(-2px); }
.lab-card-top { display: flex; align-items: center; gap: 10px; padding: 16px 18px 0; }
.lab-card-top .badge { margin-left: auto; }
.lab-card { isolation: isolate; }
.lab-card::before { content: ""; position: absolute; z-index: -1; inset: 0 0 auto; height: 72px; background: linear-gradient(180deg, color-mix(in srgb, var(--c) 9%, transparent), transparent); pointer-events: none; }
.lab-card-num { font: 600 12px var(--mono); color: var(--c); letter-spacing: .04em; }
.lab-card-icon { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px; color: var(--c); background: color-mix(in srgb, var(--c) 13%, var(--bg-elev)); border: 1px solid color-mix(in srgb, var(--c) 22%, transparent); }
.lab-card-progress { position: absolute; left: 0; right: 0; top: 0; height: 3px; overflow: hidden; }
.lab-card-progress::after { content: ""; position: absolute; inset: 0; background: var(--c); transform: scaleX(var(--p, 0)); transform-origin: left; transition: transform .4s var(--ease); }
.lab-card-body { flex: 1; display: flex; flex-direction: column; gap: 6px; padding: 12px 18px 16px; }
.lab-card-cat { font-size: 12px; font-weight: 600; color: var(--c); }
.lab-card-title { margin: 0; font-size: 17px; line-height: 1.3; font-weight: 600; letter-spacing: -.01em; }
.lab-card-summary { margin: 0; font-size: 14px; color: var(--fg-3); line-height: 1.5; }
.lab-card-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 14px; margin-top: auto; padding-top: 10px; }
.lab-card.done .lab-card-num::after { content: " · Completed"; color: var(--success); font-family: var(--font); font-weight: 600; }

/* Anatomy */
#anatomy { overflow-x: clip; }
.anatomy { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 56px; align-items: center; }
.anatomy-list { list-style: none; margin: 24px 0 32px; padding: 0; display: grid; gap: 18px; }
.anatomy-list li { display: flex; gap: 14px; }
.anatomy-list h3 { margin: 0 0 3px; font-size: 16px; }
.anatomy-list p { margin: 0; font-size: 14.5px; color: var(--fg-3); }
.anatomy-n { flex: none; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: var(--grad-solid); color: #fff; font: 650 13px var(--font); }
.anatomy-visual { position: relative; }
.anatomy-visual::before { content: ""; position: absolute; inset: 8% -4% -6% 6%; background: var(--grad-soft); border-radius: 28px; filter: blur(20px); z-index: 0; }

.mock { position: relative; z-index: 1; border-radius: var(--radius-l); border: 1px solid var(--stroke); background: var(--bg-elev); box-shadow: var(--shadow-l); overflow: hidden; font-size: 13px; }
.mock-bar { display: flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; background: var(--bg-3); border-bottom: 1px solid var(--stroke); }
.mock-bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--stroke-strong); }
.mock-bar span { margin-left: 10px; font: 12px var(--mono); color: var(--fg-3); }
.mock-body { padding: 18px; display: grid; gap: 12px; }
.mock-tabs { display: inline-flex; gap: 2px; padding: 3px; background: var(--bg-3); border-radius: 8px; width: max-content; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.mock-tabs span { padding: 4px 10px; border-radius: 6px; color: var(--fg-3); font-weight: 500; font-size: 12px; }
.mock-tabs span.on { background: var(--bg-elev); color: var(--fg); box-shadow: var(--shadow-s); }
.mock-step { display: grid; grid-template-columns: 26px 1fr; gap: 10px; }
.mock-n { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; border: 1.5px solid var(--stroke-strong); font-weight: 600; font-size: 11.5px; color: var(--fg-3); }
.mock-step.done .mock-n { background: var(--success-solid); border-color: var(--success-solid); color: #fff; }
.mock-path { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; font-weight: 600; color: var(--fg-2); }
.mock-path em { font-style: normal; color: var(--fg-4); }
.mock-line { height: 8px; border-radius: 4px; background: var(--bg-4); margin-top: 8px; }
.mock-line.w70 { width: 70%; } .mock-line.w90 { width: 90%; } .mock-line.w50 { width: 50%; }
.mock-check { margin-top: 10px; display: flex; gap: 8px; align-items: center; padding: 8px 10px; border-radius: 8px; background: var(--success-bg); color: var(--success); border: 1px solid var(--success-stroke); font-weight: 600; font-size: 12.5px; }
.mock-check .i { width: 16px; height: 16px; }
.mock-code { margin-top: 8px; padding: 10px 12px; border-radius: 8px; background: var(--code-bg); border: 1px solid var(--stroke); font: 12px/1.6 var(--mono); color: var(--fg-2); white-space: pre; overflow: hidden; }
.mock-code .c1 { color: var(--cat-violet); } .mock-code .c2 { color: var(--cat-azure); } .mock-code .c3 { color: var(--cat-green); }

/* Resources */
.resource-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.resource {
  position: relative; display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 14px; align-items: start; padding: 18px 44px 18px 18px;
  border-radius: var(--radius-l); border: 1px solid var(--stroke); background: var(--bg-elev); color: var(--fg); text-decoration: none !important;
  transition: border-color .2s, box-shadow .2s;
}
.resource:hover { border-color: var(--brand); box-shadow: var(--shadow); }
.resource-icon { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 10px; background: var(--brand-bg); color: var(--brand-fg); }
.resource > span:not(.resource-icon) { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.resource b { font-size: 15px; font-weight: 600; color: var(--fg); }
.resource b + span { font-size: 13.5px; color: var(--fg-3); line-height: 1.45; }
.resource > .i { position: absolute; top: 18px; right: 16px; width: 16px; height: 16px; color: var(--fg-4); transition: color .2s; }
.resource:hover > .i { color: var(--brand); }

/* 04-catalog-lab.css */
/* Catalog page and lab page layout (sidebar, header, overview, TOC, pager). */
.lab-card-icon { order: -1; }

.page-hero { position: relative; overflow: hidden; padding: 40px 0 32px; border-bottom: 1px solid var(--stroke); }
.page-hero-bg { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(640px 260px at 88% 0%, rgba(142, 91, 255, .13), transparent 70%), radial-gradient(520px 240px at 60% 120%, rgba(15, 175, 255, .1), transparent 70%); }
.page-hero .container { position: relative; }
.page-hero h1 { margin-top: 10px; }
.breadcrumb { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-size: 13px; color: var(--fg-3); }
.breadcrumb a { color: var(--fg-3); }
.breadcrumb a:hover { color: var(--brand-fg); }
.breadcrumb span[aria-current] { color: var(--fg-2); }
.catalog-search {
  display: flex; align-items: center; gap: 10px; max-width: 640px; height: 46px; padding: 0 14px; border-radius: var(--radius-l);
  background: var(--bg-elev); border: 1px solid var(--stroke-strong); box-shadow: var(--shadow-s);
}
.catalog-search:focus-within { border-color: var(--brand); outline: 2px solid var(--brand); outline-offset: 1px; }
.catalog-search .i { color: var(--fg-3); }
.catalog-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--fg); font: 400 15.5px var(--font); }
.catalog-count { font-size: 13px; color: var(--fg-3); white-space: nowrap; }
.catalog-body { display: grid; grid-template-columns: 248px minmax(0, 1fr); gap: 36px; padding-top: 32px; }
.filters { position: sticky; top: calc(var(--topbar-h) + 20px); align-self: start; display: grid; gap: 22px; max-height: calc(100vh - var(--topbar-h) - 40px); overflow-y: auto; padding-bottom: 12px; }
.filter-group h2 { margin: 0 0 8px; font-size: 12px; text-transform: uppercase; letter-spacing: .1em; color: var(--fg-3); font-weight: 600; }
.chip-col { display: grid; gap: 2px; }
.chip-row { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px; min-height: 32px; padding: 4px 10px; border-radius: 8px; cursor: pointer;
  border: 1px solid transparent; background: transparent; color: var(--fg-2); font-size: 14px; text-align: left;
  transition: background .15s, border-color .15s, color .15s;
}
.chip-row .chip { border-color: var(--stroke); background: var(--bg-elev); font-size: 13px; min-height: 30px; }
.chip:hover { background: var(--bg-3); color: var(--fg); }
.chip .i { width: 16px; height: 16px; }
.chip[aria-pressed="true"] { background: var(--brand-bg); color: var(--brand-fg); border-color: var(--brand-bg-2); font-weight: 600; }
.cat-dot { width: 10px; height: 10px; border-radius: 3px; background: var(--c); flex: none; }
.chip-count { margin-left: auto; font-size: 12px; color: var(--fg-4); font-weight: 500; }
.chip-col .chip { width: 100%; }
.catalog-results { min-width: 0; }
.lab-card[hidden] { display: none; }
.empty { display: grid; justify-items: center; gap: 6px; padding: 64px 20px; text-align: center; color: var(--fg-3); border: 1px dashed var(--stroke-strong); border-radius: var(--radius-l); }
.empty[hidden] { display: none; }
.empty > .i { width: 32px; height: 32px; color: var(--fg-4); }
.empty h2 { margin: 6px 0 0; font-size: 18px; }
.empty p { margin: 0 0 10px; }

/* Lab layout */
.lab-layout {
  display: grid; grid-template-columns: 276px minmax(0, 1fr) 252px; gap: 0; width: 100%; max-width: 1520px; margin: 0 auto;
}
.read-progress { position: fixed; top: var(--topbar-h); left: 0; right: 0; height: 2px; z-index: 49; pointer-events: none; }
.read-progress span { display: block; height: 100%; background: var(--grad); transform: scaleX(var(--read, 0)); transform-origin: left; }
.sidebar { position: sticky; top: var(--topbar-h); height: calc(100vh - var(--topbar-h)); border-right: 1px solid var(--stroke); background: var(--bg); }
.sidebar-inner { height: 100%; overflow-y: auto; padding: 20px 14px 40px 20px; scrollbar-width: thin; }
.side-back { display: inline-flex; align-items: center; gap: 6px; padding: 6px 8px; margin: 0 0 10px -8px; border-radius: 6px; font-size: 13.5px; font-weight: 600; color: var(--fg-2); }
.side-back .i { width: 16px; height: 16px; }
.side-back:hover { background: var(--bg-3); text-decoration: none; color: var(--fg); }
.path-banner { margin: 0 0 16px; padding: 12px; border-radius: var(--radius); background: var(--grad-soft); border: 1px solid var(--important-stroke); font-size: 13px; }
.path-banner[hidden] { display: none; }
.path-banner strong { display: flex; align-items: center; gap: 6px; font-size: 13.5px; color: var(--fg); }
.path-banner strong .i { width: 16px; height: 16px; color: var(--violet-fg); }
.path-banner p { margin: 4px 0 8px; color: var(--fg-3); }
.path-banner-bar { height: 4px; border-radius: 2px; background: var(--bg-4); overflow: hidden; }
.path-banner-bar span { display: block; height: 100%; background: var(--grad); transform: scaleX(var(--p, 0)); transform-origin: left; transition: transform .4s var(--ease); }
.path-banner-nav { display: flex; justify-content: space-between; gap: 8px; margin-top: 8px; font-weight: 600; }
.side-group { margin-bottom: 14px; }
.side-group h2 { display: flex; align-items: center; gap: 8px; margin: 0 0 4px; padding: 6px 8px 4px; font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .09em; color: var(--fg-3); }
.side-group h2::before { content: ""; width: 8px; height: 8px; border-radius: 2px; background: var(--c); }
.side-group ul, .prereq-list { list-style: none; margin: 0; padding: 0; }
.side-group a, .prereq-list a {
  display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 6px; color: var(--fg-2); font-size: 14px; line-height: 1.35; text-decoration: none;
}
.side-group a:hover, .prereq-list a:hover { background: var(--bg-3); color: var(--fg); }
.side-group a[aria-current="page"] { background: var(--brand-bg); color: var(--brand-fg); font-weight: 600; }
.side-group a.in-path:not([aria-current]) .side-num { color: var(--violet-fg); }
.side-num { flex: none; width: 22px; font: 500 11.5px var(--mono); color: var(--fg-4); }
[aria-current="page"] .side-num { color: var(--brand-fg); }
.side-title { flex: 1; min-width: 0; }
.side-state { flex: none; width: 14px; height: 14px; border-radius: 50%; border: 1.5px solid transparent; }
.side-state.partial { border-color: var(--brand); border-right-color: transparent; transform: rotate(45deg); }
.side-state.done { background: var(--success-solid) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4.5 8.2l2.2 2.2 4.8-4.9' fill='none' stroke='white' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/12px no-repeat; border-color: var(--success); }
.sidebar-scrim { display: none; }

.lab-main { min-width: 0; padding: 28px 56px 40px; max-width: 900px; width: 100%; justify-self: center; }
.lab-header { padding: 18px 0 24px; border-bottom: 1px solid var(--stroke); margin-bottom: 28px; }
.lab-eyebrow { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; font-size: 13px; font-weight: 600; color: var(--c); }
.lab-eyebrow-icon { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 8px; background: color-mix(in srgb, var(--c) 13%, transparent); }
.lab-eyebrow-icon .i { width: 18px; height: 18px; }
.lab-header h1 { font-size: clamp(30px, 3.6vw, 40px); }
.lab-header .lead { margin-bottom: 18px; }
.lab-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 18px; }
.meta-pill { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px; border-radius: 999px; border: 1px solid var(--stroke); background: var(--bg-elev); font-size: 13px; color: var(--fg-2); }
.meta-pill .i { width: 16px; height: 16px; color: var(--fg-3); }
.meta-tracks { height: auto; min-height: 30px; padding: 3px 4px; border-radius: 15px; }
.meta-tracks .track-chip { background: transparent; height: 22px; }
.meta-updated { font-size: 13px; color: var(--fg-4); margin-left: 4px; }
.lab-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.lab-actions .btn-secondary { margin-right: 4px; }

.lab-overview { display: grid; grid-template-columns: 1.3fr 1fr; gap: 16px; margin-bottom: 36px; }
.overview-col { padding: 20px 22px; border-radius: var(--radius-l); border: 1px solid var(--stroke); background: var(--bg-2); }
.overview-col h2 { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; font-size: 15px; font-weight: 600; }
.overview-col h2 .i { width: 18px; height: 18px; color: var(--c); }
.objectives { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.objectives li { display: flex; gap: 10px; font-size: 14.5px; line-height: 1.5; color: var(--fg-2); }
.objectives .i { width: 18px; height: 18px; margin-top: 2px; color: var(--success); }
.prereq-list { display: grid; gap: 2px; margin: 0 -8px 10px; }
.prereq-list a { font-size: 14px; }
.overview-col .muted { margin: 0 0 10px; font-size: 14px; }
.overview-tracks { margin: 0; font-size: 13px; color: var(--fg-3); }
.overview-tracks span { color: var(--fg-2); font-weight: 500; }

.lab-complete {
  display: flex; align-items: center; gap: 18px; margin: 56px 0 24px; padding: 22px 24px; border-radius: var(--radius-l);
  background: var(--grad-soft); border: 1px solid var(--important-stroke);
}
.lab-complete h2 { margin: 0 0 2px; font-size: 18px; }
.lab-complete p { margin: 0; font-size: 14px; color: var(--fg-3); }
.lab-complete > div:nth-child(2) { flex: 1; }
.lab-complete-icon { width: 46px; height: 46px; flex: none; display: grid; place-items: center; border-radius: 12px; background: var(--bg-elev); color: var(--violet-fg); box-shadow: var(--shadow-s); }
.lab-complete-icon .i { width: 24px; height: 24px; }
.lab-complete.done { background: var(--success-bg); border-color: var(--success-stroke); }
.lab-complete.done .lab-complete-icon { color: var(--success); }
.lab-complete.done [data-complete-lab] { background: var(--success-solid); }

.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 24px 0; }
.pager-link { display: flex; flex-direction: column; gap: 4px; padding: 16px 18px; border-radius: var(--radius-l); border: 1px solid var(--stroke); color: var(--fg); text-decoration: none !important; transition: border-color .2s, box-shadow .2s; }
.pager-link:hover { border-color: var(--brand); box-shadow: var(--shadow-s); }
.pager-link.next { text-align: right; align-items: flex-end; }
.pager-dir { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--fg-3); }
.pager-dir .i { width: 16px; height: 16px; }
.pager-title { font-weight: 600; color: var(--brand-fg); }
.feedback { font-size: 14px; color: var(--fg-3); }
.feedback a { text-decoration: underline; text-underline-offset: 2px; text-decoration-thickness: 1px; }

/* TOC */
.toc { position: sticky; top: var(--topbar-h); height: calc(100vh - var(--topbar-h)); }
.toc-inner { height: 100%; overflow-y: auto; padding: 28px 20px 40px 8px; scrollbar-width: thin; }
.toc-progress { display: flex; align-items: center; gap: 12px; padding: 12px; margin-bottom: 20px; border-radius: var(--radius); border: 1px solid var(--stroke); background: var(--bg-2); }
.toc-progress > div { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; }
.toc-progress-label { font-size: 13px; font-weight: 600; color: var(--fg-2); }
.ring { width: 40px; height: 40px; transform: rotate(-90deg); flex: none; }
.ring circle { fill: none; stroke-width: 4; stroke: var(--bg-4); }
.ring .ring-fill { stroke: var(--success); stroke-linecap: round; stroke-dasharray: 100; stroke-dashoffset: calc(100 - var(--p, 0) * 100); transition: stroke-dashoffset .5s var(--ease); }
.toc h2 { margin: 0 0 8px; font-size: 12px; text-transform: uppercase; letter-spacing: .1em; color: var(--fg-3); font-weight: 600; }
.toc-list { list-style: none; margin: 0 0 20px; padding: 0; border-left: 1px solid var(--stroke); }
.toc-list a { display: block; margin-left: -1px; padding: 5px 0 5px 12px; border-left: 2px solid transparent; font-size: 13.5px; line-height: 1.4; color: var(--fg-3); }
.toc-list a:hover { color: var(--fg); text-decoration: none; }
.toc-list a.active { color: var(--brand-fg); border-left-color: var(--brand); font-weight: 600; }
.toc-help { display: grid; gap: 2px; padding-top: 14px; border-top: 1px solid var(--stroke); }
.toc-tool { display: flex; align-items: center; gap: 8px; padding: 6px 8px; margin-left: -8px; border: 0; background: none; border-radius: 6px; font-size: 13.5px; color: var(--fg-2); cursor: pointer; text-align: left; }
.toc-tool .i { width: 16px; height: 16px; color: var(--fg-3); }
.toc-tool:hover { background: var(--bg-3); color: var(--fg); text-decoration: none; }

.notfound { display: grid; place-items: center; padding: 120px 24px; text-align: center; }
.notfound-inner { max-width: 560px; }
.notfound .hero-cta { justify-content: center; }
.notfound .lead { margin-inline: auto; }

/* 05-prose.css */
/* Lab prose and markdown components: callouts, figures, tables, steps, tracks, code. */
.prose { font-size: 16px; line-height: 1.7; color: var(--fg-2); }
.prose > :first-child { margin-top: 0; }
.prose h2 { margin: 56px 0 14px; padding-top: 4px; font-size: 26px; color: var(--fg); scroll-margin-top: calc(var(--topbar-h) + 72px); }
.prose h3 { margin: 32px 0 10px; font-size: 19px; color: var(--fg); scroll-margin-top: calc(var(--topbar-h) + 72px); }
.prose h4 { margin: 24px 0 8px; font-size: 16px; color: var(--fg); }
.prose p { margin: 0 0 16px; }
.prose ul, .prose ol { margin: 0 0 16px; padding-left: 24px; }
.prose li { margin: 4px 0; }
.prose li::marker { color: var(--fg-4); }
.prose ol > li::marker { font-weight: 600; color: var(--fg-3); }
.prose strong { color: var(--fg); font-weight: 600; }
.prose a { text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--brand-fg) 35%, transparent); text-underline-offset: 3px; }
.prose a:hover { text-decoration-color: var(--brand-fg); }
.prose a.ext::after {
  content: ""; display: inline-block; width: .7em; height: .7em; margin-left: 3px; vertical-align: .05em; background: currentColor; opacity: .6;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M11 3.5h5.5V9M16.5 3.5 9 11M14 12v4.5H3.5V6H8'/%3E%3C/svg%3E") center/contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M11 3.5h5.5V9M16.5 3.5 9 11M14 12v4.5H3.5V6H8'/%3E%3C/svg%3E") center/contain no-repeat;
}
.prose hr { border: 0; border-top: 1px solid var(--stroke); margin: 40px 0; }
.prose blockquote { margin: 0 0 16px; padding: 4px 16px; border-left: 2px solid var(--stroke-strong); color: var(--fg-3); }
.prose :not(pre) > code {
  padding: 1.5px 6px; border-radius: 5px; background: var(--inline-code); color: var(--fg); font-size: .86em; border: 1px solid var(--stroke-2);
  overflow-wrap: anywhere;
}
.prose a code { color: inherit; }
.prose details { margin: 0 0 16px; border: 1px solid var(--stroke); border-radius: var(--radius); background: var(--bg-2); }
.prose summary { padding: 10px 14px; font-weight: 600; color: var(--fg); cursor: pointer; list-style: none; display: flex; align-items: center; gap: 8px; }
.prose summary::-webkit-details-marker { display: none; }
.prose summary::before { content: ""; width: 8px; height: 8px; border-right: 2px solid var(--fg-3); border-bottom: 2px solid var(--fg-3); transform: rotate(-45deg); transition: transform .2s var(--ease); margin-right: 4px; }
.prose details[open] > summary::before { transform: rotate(45deg); }
.prose details > :not(summary) { margin-inline: 16px; }
.prose details > :last-child { margin-bottom: 14px; }
.prose h2, .prose h3, .prose h4 { position: relative; }
.anchor { position: absolute; left: -1.05em; width: 1em; color: var(--fg-4); opacity: 0; text-decoration: none !important; font-weight: 400; transition: opacity .15s; }
.step-head .anchor { display: none; }
@media (max-width: 900px) { .anchor { display: none; } }
h2:hover > .anchor, h3:hover > .anchor, h4:hover > .anchor, .anchor:focus { opacity: 1; }
.anchor:hover { color: var(--brand-fg); }

/* Placeholders */
.ph { color: var(--violet-fg); background: var(--violet-bg); border-radius: 4px; padding: 0 3px; font-style: normal; }
.ph.filled { color: var(--success); background: var(--success-bg); }
.shiki .ph { background: color-mix(in srgb, var(--violet) 16%, transparent); color: var(--violet-fg) !important; }
.shiki .ph.filled { background: color-mix(in srgb, var(--success) 16%, transparent); color: var(--success) !important; }

/* UI paths (Portal > Blade > Button) */
.uipath { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 2px 4px; vertical-align: baseline; }
.uipath-item { padding: 1px 7px; border-radius: 5px; background: var(--bg-3); border: 1px solid var(--stroke); color: var(--fg); font-weight: 600; font-size: .9em; white-space: nowrap; }
.uipath-sep { color: var(--fg-4); font-size: .85em; }

/* Callouts */
.callout { --cc: var(--brand-fg); --cb: var(--brand-bg); --cs: var(--brand-bg-2); margin: 0 0 20px; padding: 14px 18px; border-radius: var(--radius); background: var(--cb); border: 1px solid var(--cs); font-size: 15px; }
.callout-title { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; font-weight: 600; color: var(--cc); font-size: 14.5px; }
.callout-title svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.callout > :last-child { margin-bottom: 0; }
.callout p { margin-bottom: 8px; }
.callout-tip { --cc: var(--success); --cb: var(--success-bg); --cs: var(--success-stroke); }
.callout-important { --cc: var(--important); --cb: var(--important-bg); --cs: var(--important-stroke); }
.callout-warning { --cc: var(--warning); --cb: var(--warning-bg); --cs: var(--warning-stroke); }
.callout-caution { --cc: var(--danger); --cb: var(--danger-bg); --cs: var(--danger-stroke); }
.callout-checkpoint { --cc: var(--success); --cb: var(--bg-elev); --cs: var(--success-stroke); border-style: dashed; border-width: 1.5px; }
.callout-checkpoint .callout-title svg { color: var(--success); }

/* Figures */
.figure { margin: 24px 0 28px; }
.figure img, .figure video { display: block; width: 100%; height: auto; border-radius: var(--radius-l); border: 1px solid var(--stroke); box-shadow: var(--shadow); background: var(--bg-elev); }
.figure-svg { padding: 20px; border-radius: var(--radius-l); border: 1px solid var(--stroke); background: var(--dg-bg); overflow-x: auto; }
.figure-svg svg { display: block; width: 100%; height: auto; min-width: 560px; }
.figure-svg img { border: 0; box-shadow: none; }
/* Diagram flows stop after about 4 s (WCAG 2.2.2) and run again while the reader hovers the diagram. */
:is(.figure-svg, .hxp-art):hover .dg-flow { animation-iteration-count: infinite; }
.figure-video video { aspect-ratio: 16 / 9; background: #070b1f; cursor: pointer; }
.video-frame { position: relative; }
.video-frame video::-webkit-media-controls-fullscreen-button { display: none; }
.video-expand { position: absolute; top: 12px; right: 12px; display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px 0 10px; border: 1px solid rgba(255, 255, 255, .2); border-radius: 999px; background: rgba(6, 8, 18, .64); color: #fff; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; backdrop-filter: blur(6px); opacity: 0; transition: opacity .15s, background .15s; }
.video-expand .i { width: 16px; height: 16px; }
.video-frame:hover .video-expand, .video-frame:not(.is-playing) .video-expand, .video-expand:focus-visible { opacity: 1; }
.video-expand:hover { background: rgba(6, 8, 18, .86); }
.video-holder { border-radius: var(--radius-l); border: 1px solid var(--stroke); background: var(--bg-elev); }
@media (hover: none) { .video-expand { opacity: 1; } }
.figure-video { scroll-margin-top: calc(var(--topbar-h) + 24px); }
.prose .transcript { margin: 12px 0 0; text-align: left; }
.prose .transcript > p { font-size: 14.5px; color: var(--fg-2); }
.prose .transcript-dl { font-size: 13.5px; }
.figure figcaption { margin-top: 10px; font-size: 13.5px; color: var(--fg-3); text-align: center; line-height: 1.5; }
.zoom { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; border-radius: var(--radius-l); }
.zoom:hover img { box-shadow: var(--shadow-l); }
.prose img:not(.figure img) { max-width: 100%; border-radius: var(--radius); }

/* Tables */
.table-wrap { margin: 0 0 20px; overflow-x: auto; border: 1px solid var(--stroke); border-radius: var(--radius); }
.table-wrap table { width: 100%; border-collapse: collapse; font-size: 14.5px; line-height: 1.5; }
.table-wrap th { text-align: left; font-weight: 600; color: var(--fg); background: var(--bg-2); white-space: nowrap; }
.table-wrap th, .table-wrap td { padding: 10px 14px; border-bottom: 1px solid var(--stroke); vertical-align: top; }
.table-wrap tr:last-child td { border-bottom: 0; }
.table-wrap tbody tr:hover { background: var(--bg-2); }

/* Steps */
.steps { counter-reset: none; margin: 0 0 8px; }
.step { position: relative; display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 16px; }
.step-rail { position: relative; display: flex; justify-content: center; }
.step-rail::after { content: ""; position: absolute; top: 40px; bottom: 6px; width: 2px; border-radius: 1px; background: var(--stroke); }
.step:last-child .step-rail::after { bottom: 24px; background: linear-gradient(var(--stroke), transparent); }
.step-num {
  position: relative; z-index: 1; width: 32px; height: 32px; margin-top: 2px; display: grid; place-items: center; border-radius: 50%;
  background: var(--bg-elev); border: 1.5px solid var(--stroke-strong); color: var(--fg-2); font: 650 13.5px var(--font); transition: background .25s, border-color .25s, color .25s;
}
.step.done .step-num { background: var(--success-solid); border-color: var(--success-solid); color: transparent; }
.step.done .step-num::after {
  content: ""; position: absolute; inset: 0; background: #fff;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 10.3 2.7 2.7 5.3-5.6'/%3E%3C/svg%3E") center/18px no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 10.3 2.7 2.7 5.3-5.6'/%3E%3C/svg%3E") center/18px no-repeat;
}
.step.done .step-rail::after { background: color-mix(in srgb, var(--success) 45%, var(--stroke)); }
.step-main { min-width: 0; padding-bottom: 28px; }
.step-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.step-head h3 { margin: 5px 0 0; font-size: 18px; line-height: 1.4; }
.step-btns { flex: none; display: flex; align-items: center; gap: 6px; }
.step-check {
  flex: none; display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px 0 8px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--stroke-strong); background: var(--bg-elev); color: var(--fg-3); font-size: 12.5px; font-weight: 600; transition: all .2s;
}
.step-check svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.step-check:hover { border-color: var(--success); color: var(--success); }
.step-check[aria-pressed="true"] { background: var(--success-bg); border-color: var(--success-stroke); color: var(--success); }
.step-body > :last-child { margin-bottom: 0; }
.step-body > .figure:first-child { margin-top: 8px; }

/* Tracks */
.tracks { margin: 8px 0 32px; }
.track-bar {
  position: sticky; top: var(--topbar-h); z-index: 20; display: flex; align-items: center; gap: 14px; margin: 0 -12px 24px; padding: 10px 12px;
  background: var(--bg-glass); backdrop-filter: saturate(180%) blur(12px); -webkit-backdrop-filter: saturate(180%) blur(12px); border-bottom: 1px solid var(--stroke);
}
.track-bar-label { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--fg-3); white-space: nowrap; }
.track-tabs { display: inline-flex; gap: 2px; padding: 3px; border-radius: 10px; background: var(--bg-3); border: 1px solid var(--stroke); overflow-x: auto; scrollbar-width: none; }
.track-tab {
  display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 12px; border: 0; border-radius: 7px; background: transparent;
  color: var(--fg-3); font-size: 13.5px; font-weight: 600; cursor: pointer; white-space: nowrap; transition: background .15s, color .15s, box-shadow .15s;
}
.track-tab svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.track-tab:hover { color: var(--fg); }
.track-tab[aria-selected="true"] { background: var(--bg-elev); color: var(--brand-fg); box-shadow: var(--shadow-s), inset 0 0 0 1px var(--brand); }
.track-panel[hidden] { display: none; }
.track-panel { animation: fade .2s ease-out; }

/* Code blocks */
.code { position: relative; margin: 0 0 20px; border-radius: var(--radius); border: 1px solid var(--stroke); background: var(--code-bg); overflow: hidden; }
.code-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 38px; padding: 0 6px 0 14px; background: var(--code-head); border-bottom: 1px solid var(--stroke); }
.code-title { display: inline-flex; align-items: center; gap: 6px; font: 500 12.5px var(--mono); color: var(--fg-3); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.code-title svg { width: 14px; height: 14px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.5; }
.code-actions { display: inline-flex; gap: 2px; flex: none; }
.code-btn {
  display: inline-flex; align-items: center; gap: 5px; height: 28px; padding: 0 8px; border-radius: 6px; border: 0; background: transparent;
  color: var(--fg-3); font: 600 12px var(--font); cursor: pointer; text-decoration: none !important;
}
.code-btn svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.code-btn:hover { background: var(--bg-4); color: var(--fg); }
.code-btn.copied { color: var(--success); }
.code pre, .prose pre { margin: 0; padding: 14px 16px; overflow-x: auto; font: 13.5px/1.65 var(--mono); tab-size: 2; background: transparent !important; }
.prose > pre:not(.mermaid), .step-body > pre:not(.mermaid) { margin: 0 0 20px; border: 1px solid var(--stroke); border-radius: var(--radius); background: var(--code-bg) !important; }
.shiki, .shiki span { color: var(--shiki-light); }
[data-theme="dark"] .shiki, [data-theme="dark"] .shiki span { color: var(--shiki-dark); }
.shiki code { counter-reset: line; display: block; min-width: max-content; }
.code-collapsible:not(.expanded) pre { max-height: 360px; overflow: hidden; }
.code-collapsible:not(.expanded)::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 96px; background: linear-gradient(transparent, var(--code-bg) 75%); pointer-events: none; }
.code-expand {
  position: absolute; z-index: 1; left: 50%; bottom: 12px; transform: translateX(-50%); height: 30px; padding: 0 14px; border-radius: 999px;
  border: 1px solid var(--stroke-strong); background: var(--bg-elev); color: var(--fg-2); font-size: 12.5px; font-weight: 600; cursor: pointer; box-shadow: var(--shadow-s);
}
.code-expand:hover { color: var(--fg); border-color: var(--fg-4); }
.code-collapsible.expanded .code-expand { position: static; transform: none; display: block; margin: 0 auto 12px; }
.code-tablist { display: flex; align-self: stretch; gap: 0; margin-left: -14px; overflow-x: auto; scrollbar-width: none; }
.code-tab {
  position: relative; padding: 0 14px; border: 0; background: transparent; color: var(--fg-3); font: 500 12.5px var(--mono); cursor: pointer; white-space: nowrap;
}
.code-tab:hover { color: var(--fg); }
.code-tab[aria-selected="true"] { color: var(--fg); background: var(--code-bg); }
.code-tab[aria-selected="true"]::after { content: ""; position: absolute; left: 10px; right: 10px; top: 0; height: 2px; background: var(--brand); border-radius: 0 0 2px 2px; }
.code-panel[hidden] { display: none; }

/* Mermaid */
pre.mermaid { margin: 0 0 20px; padding: 20px; border-radius: var(--radius-l); border: 1px solid var(--stroke); background: var(--bg-2) !important; text-align: center; font: 13px var(--mono); color: var(--fg-3); white-space: pre; overflow-x: auto; }
pre.mermaid[data-processed] { white-space: normal; color: inherit; }
pre.mermaid svg { max-width: 100%; height: auto; }

/* 06-widgets.css */
/* Interactive widgets (wd-*). Simulations that make policy behaviour tangible. */
.widget { margin: 24px 0 28px; }
.widget:empty { min-height: 120px; border-radius: var(--radius-l); border: 1px dashed var(--stroke-strong); background: var(--bg-2); }
.wd {
  position: relative; border-radius: var(--radius-l); border: 1px solid var(--stroke); background: var(--bg-elev);
  box-shadow: var(--shadow-s); overflow: hidden; font-size: 14px; color: var(--fg-2); container-type: inline-size;
}
.wd::before { content: ""; position: absolute; inset: 0 0 auto; height: 120px; background: var(--grad-soft); opacity: .7; pointer-events: none; -webkit-mask-image: linear-gradient(#000, transparent); mask-image: linear-gradient(#000, transparent); }
.wd > * { position: relative; }
.wd-head { display: flex; align-items: flex-start; gap: 12px; padding: 16px 18px 12px; }
.wd-head-icon { flex: none; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 9px; background: var(--bg-elev); color: var(--violet-fg); border: 1px solid var(--important-stroke); }
.wd-head-icon .i { width: 18px; height: 18px; }
.wd-kicker { display: block; font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--violet-fg); }
.wd .wd-title { margin: 2px 0 4px; font-size: 16.5px; line-height: 1.3; font-weight: 600; color: var(--fg); font-family: var(--font-display); }
.wd .wd-desc { margin: 0; font-size: 13.5px; color: var(--fg-3); line-height: 1.5; }
.wd-controls { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 16px; padding: 4px 18px 14px; border-bottom: 1px solid var(--stroke); }
.wd-field { display: grid; gap: 4px; font-size: 12px; font-weight: 600; color: var(--fg-3); }
.wd-field input, .wd-field select {
  height: 32px; padding: 0 8px; border-radius: 6px; border: 1px solid var(--stroke-strong); border-bottom-color: var(--fg-4); background: var(--bg); color: var(--fg); font: 500 13.5px var(--font); min-width: 0;
}
.wd-field input[type="number"] { width: 110px; font-family: var(--mono); }
.wd-field input[type="text"] { width: 100%; font-family: var(--mono); font-size: 13px; }
.wd-field input:focus-visible, .wd-field select:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; border-color: var(--brand); }
.wd-field.grow { flex: 1 1 220px; }
.wd-seg { display: inline-flex; flex-wrap: wrap; max-width: 100%; padding: 2px; border-radius: 8px; background: var(--bg-3); border: 1px solid var(--stroke); }
.wd-seg button { height: 28px; padding: 0 10px; border: 0; border-radius: 6px; background: transparent; color: var(--fg-3); font-size: 12.5px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.wd-seg button[aria-pressed="true"] { background: var(--bg-elev); color: var(--brand-fg); box-shadow: var(--shadow-s), inset 0 0 0 1px var(--brand); }
.wd-body { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); }
.wd-pane { padding: 14px 18px 16px; min-width: 0; }
.wd-pane + .wd-pane { border-left: 1px solid var(--stroke); background: var(--bg-2); }
.wd-pane-title { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0 0 10px; font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--fg-3); }

/* Quota simulator */
.wd-window { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; font-size: 12.5px; color: var(--fg-3); }
.wd-window-bar { flex: 1; height: 4px; border-radius: 2px; background: var(--bg-4); overflow: hidden; }
.wd-window-bar span { display: block; height: 100%; background: var(--fg-4); transform: scaleX(var(--p, 0)); transform-origin: left; }
.wd-window b { font-weight: 600; color: var(--fg-2); font-variant-numeric: tabular-nums; }
.wd-callers { display: grid; gap: 8px; }
.wd-caller { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; align-items: center; padding: 10px 12px; border-radius: var(--radius); border: 1px solid var(--stroke); background: var(--bg-elev); transition: border-color .2s; }
.wd-caller.blocked { border-color: var(--danger-stroke); }
.wd-caller-name { display: flex; align-items: center; gap: 8px; min-width: 0; font-weight: 600; color: var(--fg); font-size: 13.5px; }
.wd-avatar { flex: none; width: 24px; height: 24px; border-radius: 7px; display: grid; place-items: center; font-size: 11px; font-weight: 700; color: #fff; background: var(--av, var(--brand)); }
.wd-caller-id { font: 500 11.5px var(--mono); color: var(--fg-4); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wd-caller .btn { grid-row: span 2; }
.wd-meter { grid-column: 1; display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--fg-3); font-variant-numeric: tabular-nums; }
.wd-meter-bar { flex: 1; height: 6px; border-radius: 3px; background: var(--bg-4); overflow: hidden; }
.wd-meter-bar span { display: block; height: 100%; border-radius: 3px; background: var(--success); transform: scaleX(var(--p, 0)); transform-origin: left; transition: transform .35s var(--ease), background .2s; }
.wd-meter.warn .wd-meter-bar span { background: var(--warning); }
.wd-meter.full .wd-meter-bar span { background: var(--danger); }
.wd-tag { display: inline-flex; align-items: center; height: 18px; padding: 0 6px; border-radius: 4px; font-size: 10.5px; font-weight: 700; letter-spacing: .02em; background: var(--bg-3); color: var(--fg-3); white-space: nowrap; }
.wd-tag.ov { background: var(--violet-bg); color: var(--violet-fg); }
.wd-shared { margin: 0 0 10px; padding: 8px 10px; border-radius: 6px; background: var(--brand-bg); color: var(--brand-fg); font-size: 12.5px; }

/* Response log */
.wd-log { display: grid; gap: 6px; max-height: 300px; overflow-y: auto; align-content: start; min-height: 120px; scrollbar-width: thin; }
.wd-log-empty { margin: 24px 0; text-align: center; color: var(--fg-4); font-size: 13px; }
.wd-log-row { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 2px 10px; padding: 8px 10px; border-radius: 8px; background: var(--bg-elev); border: 1px solid var(--stroke); animation: pop .22s var(--ease); }
.wd-code { grid-row: span 2; align-self: start; min-width: 42px; height: 22px; display: grid; place-items: center; border-radius: 5px; font: 700 12px var(--mono); }
.s200 { background: var(--success-bg); color: var(--success); border: 1px solid var(--success-stroke); }
.s429, .s400 { background: var(--warning-bg); color: var(--warning); border: 1px solid var(--warning-stroke); }
.s403, .s401 { background: var(--danger-bg); color: var(--danger); border: 1px solid var(--danger-stroke); }
.wd-log-msg { font-size: 13px; color: var(--fg); font-weight: 500; }
.wd-log-msg small { color: var(--fg-4); font-weight: 400; }
.wd-log-hdr { font: 11.5px/1.5 var(--mono); color: var(--fg-3); overflow-wrap: anywhere; }
.wd-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; padding: 10px 18px; border-top: 1px solid var(--stroke); font-size: 12.5px; color: var(--fg-3); background: var(--bg-elev); }
.wd-foot .i { width: 15px; height: 15px; vertical-align: -3px; margin-right: 4px; color: var(--fg-4); }

/* Request lifecycle */
.wd-scenarios { display: flex; flex-wrap: wrap; gap: 6px; padding: 4px 18px 14px; border-bottom: 1px solid var(--stroke); }
.wd-scenario {
  display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 11px; border-radius: 999px; border: 1px solid var(--stroke-strong);
  background: var(--bg-elev); color: var(--fg-2); font-size: 12.5px; font-weight: 600; cursor: pointer; transition: all .15s;
}
.wd-scenario:hover { border-color: var(--fg-4); color: var(--fg); }
.wd-scenario[aria-pressed="true"] { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.wd-scenario .wd-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--dc, var(--success)); }
.wd-pipe { display: flex; align-items: stretch; gap: 0; padding: 22px 18px 10px; overflow-x: auto; scrollbar-width: thin; }
.wd-stage { position: relative; flex: 1 1 0; min-width: 60px; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.wd-stage::before { content: ""; position: absolute; top: 19px; left: -50%; right: 50%; height: 2px; background: var(--stroke); z-index: 0; }
.wd-stage:first-child::before { display: none; }
.wd-stage.reached::before { background: var(--brand); transition: background .2s; }
.wd-stage.fail::before { background: var(--danger); }
.wd-node {
  position: relative; z-index: 1; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; background: var(--bg-elev);
  border: 1.5px solid var(--stroke-strong); color: var(--fg-3); transition: all .25s var(--ease);
}
.wd-node .i { width: 19px; height: 19px; }
.wd-stage.gw .wd-node { border-style: dashed; }
.wd-stage.active .wd-node { border-color: var(--brand); color: var(--brand-fg); transform: scale(1.1); box-shadow: 0 0 0 5px color-mix(in srgb, var(--brand) 16%, transparent); }
.wd-stage.pass .wd-node { border-color: var(--success); border-style: solid; color: var(--success); background: var(--success-bg); }
.wd-stage.fail .wd-node { border-color: var(--danger); border-style: solid; color: var(--danger); background: var(--danger-bg); transform: scale(1.08); }
.wd-stage.skip { opacity: .38; }
.wd-stage.focus .wd-node { box-shadow: 0 0 0 4px color-mix(in srgb, var(--violet) 22%, transparent); }
.wd-stage-label { font-size: 11.5px; font-weight: 600; line-height: 1.25; color: var(--fg-2); max-width: 96px; }
.wd-stage-sub { font: 10.5px var(--mono); color: var(--fg-4); margin-top: -5px; }
@container (max-width: 900px) { .wd-stage-sub { display: none; } .wd-stage-label { font-size: 11px; } }
.wd-zone { display: flex; justify-content: center; gap: 8px; padding: 0 18px 12px; font-size: 11.5px; color: var(--fg-4); }
.wd-zone span { display: inline-flex; align-items: center; gap: 6px; }
.wd-zone i { width: 14px; height: 10px; border-radius: 3px; border: 1.5px dashed var(--stroke-strong); }
.wd-result { margin: 0 18px 16px; padding: 12px 14px; border-radius: var(--radius); border: 1px solid var(--stroke); background: var(--bg-2); display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 12px; align-items: start; min-height: 64px; }
.wd-result p { margin: 0; font-size: 13.5px; color: var(--fg-2); }
.wd-result p strong { color: var(--fg); }
.wd-result .wd-code { margin-top: 1px; }
.wd-result .wd-lab { font-size: 12.5px; font-weight: 600; }

/* Alias retarget */
.wd-alias { display: grid; grid-template-columns: minmax(0, 1fr) 112px minmax(0, 1fr); align-items: center; gap: 0; padding: 20px 18px; }
.wd-client pre { margin: 0; padding: 12px 14px; border-radius: var(--radius); border: 1px solid var(--stroke); background: var(--code-bg); font: 12.5px/1.6 var(--mono); color: var(--fg-2); overflow-x: auto; }
.wd-client pre b { color: var(--violet-fg); font-weight: 600; }
.wd-client-cap { margin-top: 8px; font-size: 12px; color: var(--fg-3); display: flex; align-items: center; gap: 6px; }
.wd-client-cap .i { width: 14px; height: 14px; color: var(--success); }
.wd-alias-hub { position: relative; display: grid; place-items: center; height: 100%; min-height: 160px; }
.wd-alias-hub svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.wd-alias-hub path { fill: none; stroke: var(--stroke-strong); stroke-width: 1.5; transition: stroke .3s, opacity .3s; }
.wd-alias-hub path.on { stroke: var(--violet); stroke-width: 2; stroke-dasharray: 5 5; animation: dash 1s linear 4; }
.wd-alias-chip { position: relative; z-index: 1; padding: 8px 12px; border-radius: 10px; background: var(--violet-bg); border: 1.5px solid var(--important-stroke); color: var(--violet-fg); font: 700 13px var(--mono); text-align: center; line-height: 1.3; }
.wd-alias-chip small { display: block; font: 600 10px var(--font); letter-spacing: .08em; text-transform: uppercase; opacity: .8; }
.wd-targets { display: grid; gap: 8px; }
.wd-target {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: var(--radius); border: 1px solid var(--stroke); background: var(--bg-elev);
  cursor: pointer; text-align: left; color: var(--fg-2); transition: border-color .2s, background .2s, opacity .2s;
}
.wd-target:hover { border-color: var(--fg-4); }
.wd-target[aria-pressed="true"] { border-color: var(--violet); background: var(--violet-bg); color: var(--fg); }
.wd-target[aria-pressed="false"] { opacity: .75; }
.wd-target img { width: 22px; height: 22px; border-radius: 5px; flex: none; }
.wd-target b { display: block; font-size: 13px; color: var(--fg); }
.wd-target span { font: 11.5px var(--mono); color: var(--fg-3); }

/* Alias routing */
.wr { padding: 14px 18px 16px; display: grid; gap: 14px; }
.wr-table { display: grid; border: 1px solid var(--stroke); border-radius: var(--radius); overflow: hidden; background: var(--bg-elev); }
.wr-row { display: grid; grid-template-columns: minmax(0, 1.5fr) 76px 76px minmax(0, 1.25fr); align-items: center; gap: 10px; padding: 8px 12px; border-top: 1px solid var(--stroke); transition: background .2s; }
.wr-head { border-top: 0; padding-block: 7px; background: var(--bg-2); font-size: 11.5px; font-weight: 700; letter-spacing: .04em; color: var(--fg-3); }
.wr-row.active { background: color-mix(in srgb, var(--c) 7%, transparent); }
.wr-model { display: flex; align-items: center; gap: 8px; min-width: 0; }
.wr-model i { flex: none; width: 4px; align-self: stretch; border-radius: 2px; background: var(--c); }
.wr-model img { flex: none; border-radius: 5px; }
.wr-model > span { min-width: 0; }
.wr-model b { display: block; font: 600 13px var(--mono); color: var(--fg); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wr-model small { display: block; font-size: 11.5px; color: var(--fg-3); }
.wr-row input { width: 100%; height: 30px; padding: 0 6px 0 8px; border-radius: 6px; border: 1px solid var(--stroke-strong); border-bottom-color: var(--fg-4); background: var(--bg); color: var(--fg); font: 500 13px var(--mono); }
.wr-row input:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; border-color: var(--brand); }
.wr-row input[aria-invalid="true"] { border-color: var(--danger); background: var(--danger-bg); }
.wr-share { display: grid; grid-template-columns: minmax(40px, 1fr) auto; align-items: center; gap: 2px 8px; min-width: 0; }
.wr-bar { height: 6px; border-radius: 3px; background: var(--bg-4); overflow: hidden; }
.wr-bar span { display: block; height: 100%; border-radius: 3px; background: var(--c); transform: scaleX(var(--p, 0)); transform-origin: left; transition: transform .35s var(--ease); }
.wr-row:not(.active) .wr-bar span { opacity: .45; }
.wr-share b { font: 600 12.5px var(--mono); color: var(--fg); text-align: right; min-width: 44px; }
.wr-share em { grid-column: 1 / -1; font: 600 11px var(--font); font-style: normal; color: var(--fg-3); }
.wr-row.active .wr-share em { color: var(--success); }
.wr-err { margin: -4px 0 0; font-size: 12.5px; font-weight: 600; color: var(--danger); }
.wr-run { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px 20px; align-items: end; }
.wr-run .wd-pane-title { text-transform: none; letter-spacing: 0; font-size: 12.5px; }
.wr-run .wd-pane-title code { font-size: 12px; }
.wr-dots { display: grid; grid-template-columns: repeat(20, minmax(0, 1fr)); gap: 5px; }
.wr-dots span { aspect-ratio: 1; max-width: 22px; border-radius: 50%; border: 1.5px dashed var(--stroke-strong); transition: background .2s, border-color .2s, transform .2s var(--ease); }
.wr-dots span.on { background: var(--c); border: 1.5px solid var(--c); transform: scale(1.04); }
.wr-tally { display: grid; gap: 4px; font-size: 12.5px; color: var(--fg-2); min-width: 170px; }
.wr-tally span { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; align-items: center; gap: 8px; }
.wr-tally i { width: 10px; height: 10px; border-radius: 50%; background: var(--c); }
.wr-tally b { font: 600 12.5px var(--mono); color: var(--fg); font-variant-numeric: tabular-nums; }
.wr-invalid .wr-dots span { opacity: .4; }

/* Tool patterns */
.wd-tools { display: grid; gap: 4px; }
.wd-tool { display: grid; grid-template-columns: 18px minmax(0, 1fr); align-items: start; gap: 2px 8px; padding: 6px 10px; border-radius: 6px; font: 12.5px var(--mono); color: var(--fg); background: var(--bg-elev); border: 1px solid var(--stroke); transition: opacity .2s, background .2s; }
.wd-tool .i { width: 16px; height: 16px; grid-row: span 2; margin-top: 1px; }
.wd-tool.ok .i { color: var(--success); }
.wd-tool.blocked { background: var(--danger-bg); border-color: var(--danger-stroke); }
.wd-tool.blocked .i { color: var(--danger); }
.wd-tool.blocked .wd-tool-name { text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--danger) 60%, transparent); color: var(--fg-3); }
.wd-tool.hidden-tool { opacity: .55; }
.wd-tool.hidden-tool .i { color: var(--fg-4); }
.wd-tool-name { overflow-wrap: anywhere; }
.wd-tool-why { grid-column: 2; font: 600 11px var(--font); color: var(--fg-3); }
.wd-tool.blocked .wd-tool-why { color: var(--danger); }
.wd-summary { display: flex; gap: 14px; margin-top: 10px; font-size: 12.5px; color: var(--fg-3); }
.wd-summary b { color: var(--fg); font-variant-numeric: tabular-nums; }

/* Policy layers */
.wd-layers { display: grid; gap: 8px; }
.wd-layer { border-radius: var(--radius); border: 1px solid var(--stroke); background: var(--bg-elev); padding: 10px 12px; transition: border-color .25s, opacity .25s, background .25s; }
.wd-layer.off { opacity: .45; }
.wd-layer.on { border-color: color-mix(in srgb, var(--lc) 55%, var(--stroke)); background: color-mix(in srgb, var(--lc) 6%, var(--bg-elev)); }
.wd-layer-head { display: flex; align-items: center; gap: 8px; font-weight: 600; color: var(--fg); font-size: 13.5px; }
.wd-layer-head .i { width: 17px; height: 17px; color: var(--lc); }
.wd-layer-head small { margin-left: auto; font-weight: 500; color: var(--fg-4); font-size: 11.5px; }
.wd-pols { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.wd-pol { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 8px; border-radius: 6px; font-size: 12px; font-weight: 600; background: var(--bg-3); color: var(--fg-2); border: 1px solid var(--stroke); }
.wd-layer.on .wd-pol { background: var(--bg-elev); border-color: color-mix(in srgb, var(--lc) 35%, var(--stroke)); }
.wd-pol .i { width: 13px; height: 13px; }
.wd-eval { display: grid; gap: 6px; counter-reset: ev; }
.wd-eval-row { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 6px; background: var(--bg-elev); border: 1px solid var(--stroke); font-size: 13px; animation: pop .2s var(--ease) both; }
.wd-eval-row::before { counter-increment: ev; content: counter(ev); width: 20px; height: 20px; flex: none; display: grid; place-items: center; border-radius: 50%; background: var(--bg-3); font-size: 11px; font-weight: 700; color: var(--fg-3); }
.wd-eval-row small { margin-left: auto; font-size: 11.5px; color: var(--fg-4); white-space: nowrap; }
.wd-note { margin: 10px 0 0; font-size: 12.5px; color: var(--fg-3); line-height: 1.5; }

/* Streaming usage */
.wd-field code { font-size: 11.5px; }
.ws-status { display: inline-flex; align-items: center; gap: 6px; font: 600 11.5px var(--mono); letter-spacing: 0; text-transform: none; color: var(--fg-3); }
.ws-status .wd-code { min-width: 36px; height: 20px; font-size: 11px; }
.ws-req { display: block; margin: 0 0 8px; padding: 6px 9px; border-radius: 6px; background: var(--bg-3); font: 11.5px/1.5 var(--mono); color: var(--fg-2); overflow-wrap: anywhere; }
.ws-sse { margin: 0; height: 188px; overflow: auto; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--stroke); background: var(--code-bg); font: 11.5px/1.6 var(--mono); color: var(--fg-3); white-space: pre; scrollbar-width: thin; }
.ws-sse:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
.ws-l { display: block; width: max-content; min-width: 100%; animation: fade .18s var(--ease); }
.ws-k-hint { width: auto; color: var(--fg-4); font-family: var(--font); white-space: normal; animation: none; }
.ws-k-filter { color: var(--warning); }
.ws-k-role, .ws-k-delta { color: var(--fg-2); }
.ws-k-usage { color: var(--success); background: var(--success-bg); border-radius: 3px; padding: 0 3px; margin: 0 -3px; }
.ws-k-done { color: var(--brand-fg); font-weight: 600; }
.ws-k-hdr { color: var(--fg-3); }
.ws-k-err { color: var(--warning); font-weight: 600; }
.ws-reply { margin-top: 10px; }
.ws-label { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--fg-4); }
.ws-reply p { margin: 2px 0 0; min-height: 42px; font-size: 13.5px; line-height: 1.5; color: var(--fg); }
.ws-none { color: var(--fg-4); font-style: italic; }
.ws-reply.live p::after { content: ""; display: inline-block; width: 7px; height: 14px; margin-left: 1px; vertical-align: -2px; background: var(--brand); animation: ws-caret 1s steps(2) infinite; }
@keyframes ws-caret { 50% { opacity: 0; } }
p.ws-usage { display: flex; align-items: flex-start; gap: 8px; min-height: 20px; margin: 10px 0 0; padding: 0; background: none; font-size: 12.5px; line-height: 1.5; color: var(--fg-3); }
p.ws-usage .i { flex: none; width: 16px; height: 16px; margin-top: 1px; }
p.ws-usage.yes, p.ws-usage.no, p.ws-usage.err { padding: 8px 10px; border-radius: 8px; border: 1px solid var(--stroke); background: var(--bg-elev); color: var(--fg-2); }
p.ws-usage.yes { border-color: var(--success-stroke); background: var(--success-bg); }
p.ws-usage.yes .i { color: var(--success); }
p.ws-usage.no .i { color: var(--fg-4); }
p.ws-usage.err { border-color: var(--warning-stroke); background: var(--warning-bg); }
p.ws-usage b { color: var(--fg); font-variant-numeric: tabular-nums; }
.ws-limit { display: grid; gap: 8px; margin-bottom: 12px; padding: 10px 12px; border-radius: var(--radius); border: 1px solid var(--stroke); background: var(--bg-elev); }
.ws-limit-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 10px; font-size: 12.5px; color: var(--fg-3); }
.ws-limit-head code { font-size: 12px; }
.ws-limit .wd-window { margin: 0; }
.ws-actions { display: inline-flex; flex-wrap: wrap; gap: 8px; }
.ws-busy [data-burst] { opacity: .5; }

/* 07-responsive.css */
/* Responsive, print, reduced motion. */
@media (max-width: 1280px) {
  .lab-layout { grid-template-columns: 260px minmax(0, 1fr); }
  .toc { display: none; }
  .lab-main { padding-inline: 48px; }
  .search-trigger { width: 200px; }
  .topbar-link { display: none; }
}
@media (max-width: 1100px) {
  .hero-inner { grid-template-columns: minmax(0, 1fr); gap: 24px; padding-top: 56px; }
  .hero-inner.hx-hero { grid-template-columns: minmax(0, 1fr); gap: 36px; }
  .hero-visual { max-width: 620px; margin: 0 auto; width: 100%; }
  .hx-hero .hero-visual { max-width: 760px; }
  .track-grid { grid-template-columns: repeat(2, 1fr); }
  .qs-card { grid-template-columns: minmax(0, 1fr); gap: 28px; padding: 28px; }
  .cat-grid, .resource-grid, .home .lab-grid, .feature-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .feature-row { justify-content: stretch; }
  .anatomy { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .topnav { display: none; }
}
@media (max-width: 900px) {
  .search-trigger kbd { display: none; }
  .nav-toggle { display: inline-grid; margin-left: -8px; }
  .lab-layout { display: block; }
  .sidebar {
    position: fixed; z-index: 60; top: var(--topbar-h); left: 0; bottom: 0; height: auto; width: min(320px, 86vw);
    transform: translateX(-100%); transition: transform .25s var(--ease); box-shadow: var(--shadow-l); visibility: hidden;
  }
  body.nav-open .sidebar { transform: none; visibility: visible; }
  body.nav-open .sidebar-scrim { display: block; position: fixed; inset: var(--topbar-h) 0 0; z-index: 55; background: rgba(10, 10, 20, .36); }
  body.nav-open { overflow: hidden; }
  .lab-main { padding: 20px 20px 32px; max-width: none; }
  .catalog-body { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .filters { position: static; max-height: none; overflow: visible; display: flex; flex-wrap: nowrap; gap: 14px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: thin; }
  .filter-group { flex: none; }
  .filter-group .chip-col { display: flex; flex-wrap: nowrap; gap: 6px; }
  .filter-group .chip-col .chip { width: auto; border-color: var(--stroke); background: var(--bg-elev); white-space: nowrap; }
  .filter-group .chip-row { flex-wrap: nowrap; }
  .filter-group .chip-row .chip { white-space: nowrap; }
  .chip[aria-pressed="true"] { background: var(--brand-bg) !important; }
  #filters-clear { align-self: flex-end; flex: none; }
  .usecase-cols { grid-template-columns: minmax(0, 1fr); }
  .wd-body { grid-template-columns: minmax(0, 1fr); }
  .wd-pane + .wd-pane { border-left: 0; border-top: 1px solid var(--stroke); }
  .wd-alias { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .wd-alias-hub { min-height: 60px; }
  .wd-alias-hub svg { display: none; }
  .wr-run { grid-template-columns: minmax(0, 1fr); }
  .wr-dots { grid-template-columns: repeat(10, minmax(0, 1fr)); }
  .wr-dots span { max-width: 26px; }
  .footer-inner { grid-template-columns: minmax(0, 1fr); gap: 28px; }
}
@media (max-width: 720px) {
  body { font-size: 15.5px; }
  .container { width: calc(100% - 32px); }
  .topbar-inner { padding: 0 12px; gap: 8px; }
  .hide-sm { display: none !important; }
  .search-trigger { flex: none; width: 36px; padding: 0; justify-content: center; margin-right: 0; background: transparent; border-color: transparent; }
  .search-trigger kbd { display: none; }
  .search-trigger span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .section { padding: 56px 0; }
  .hero h1 { font-size: 38px; }
  .hero-lead { font-size: 17px; }
  .hero-stats { gap: 20px; }
  .hero-stats dd { font-size: 24px; }
  .section-head-row { flex-direction: column; align-items: flex-start; }
  .lab-overview { grid-template-columns: minmax(0, 1fr); }
  .pager { grid-template-columns: minmax(0, 1fr); }
  .lab-complete { flex-direction: column; align-items: flex-start; }
  .prose h2 { font-size: 23px; margin-top: 44px; }
  .step { grid-template-columns: 30px minmax(0, 1fr); gap: 12px; }
  .step-num { width: 28px; height: 28px; font-size: 12.5px; }
  .step-rail::after { top: 34px; }
  .step-head { flex-direction: column; gap: 8px; }
  .step-head h3 { margin-top: 3px; }
  .track-bar { margin-inline: -20px; padding-inline: 20px; gap: 10px; }
  .track-bar-label { display: none; }
  .track-tabs { max-width: 100%; }
  .track-tab { padding: 0 10px; }
  .figure-svg { padding: 10px; }
  .footer-cols { grid-template-columns: repeat(2, 1fr); }
  .lab-actions .btn-ghost span, .lab-actions .btn-ghost { font-size: 12.5px; }
  .hx { --hx-gap: 22px; }
  .hx-grid { grid-template-columns: minmax(0, 1fr); grid-template-areas: "ctl" "wl" "gw" "be" "obs"; }
  .hx-wire-l, .hx-wire-r { display: none; }
  .hx-wl, .hx-be { padding: 10px; }
  .hx-wl-items { flex-direction: row; flex-wrap: wrap; justify-content: flex-start; }
  .hx-be { flex-direction: row; flex-wrap: wrap; }
  .hx-be .hx-group { flex: 1 1 140px; }
  .hx-cap { padding: 7px 6px; gap: 7px; }
}
@media (max-width: 520px) {
  .hide-xs { display: none !important; }
  .cat-grid, .resource-grid, .feature-row { grid-template-columns: minmax(0, 1fr); }
  .path-grid, .track-grid { grid-template-columns: minmax(0, 1fr); }
  .track-grid { gap: 10px; }
  .qs-band { padding-top: 40px; }
  .qs-card { padding: 20px 18px; border-radius: var(--radius-l); }
  .qs-terminal pre { font-size: 11.5px; padding: 14px; }
  .track-card { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 2px 14px; padding: 16px 18px; }
  .track-card-icon { grid-row: span 2; width: 40px; height: 40px; }
  .track-card h3 { margin: 0; font-size: 17px; }
  .track-card p { margin: 0; font-size: 14px; }
  .lab-grid, .home .lab-grid { grid-template-columns: minmax(0, 1fr); }
  .hero-cta .btn { flex: 1 1 auto; }
  .brand-badge, .brand-azure { display: none; }
  .wd-caller { grid-template-columns: minmax(0, 1fr); }
  .wd-caller .btn { grid-row: auto; justify-self: start; }
  .wr-row { grid-template-columns: minmax(0, 1fr) 64px 64px; gap: 8px; }
  .wr-share { grid-column: 1 / -1; }
  .wr-head span:last-child { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .wd-alias-hub path.on, .ws-reply.live p::after { animation: none !important; }
  [class*="dg-flow"] { animation: none !important; }
}

@media print {
  .topbar, .sidebar, .toc, .footer, .lab-actions, .track-bar, .pager, .lab-complete, .feedback, .read-progress, .step-btns, .code-actions, .widget { display: none !important; }
  .lab-layout { display: block; }
  .lab-main { padding: 0; max-width: none; }
  .track-panel[hidden] { display: block !important; }
  .code-collapsible pre { max-height: none !important; }
  .code-collapsible::after, .code-expand { display: none !important; }
  body { background: #fff; color: #000; }
}

/* 08-releases.css */
/* Release notes timeline and the home "What's new" pill. */
.hero-news { display: inline-flex; align-items: center; gap: 10px; max-width: 100%; margin: 0 0 18px; padding: 4px 14px 4px 4px; border: 1px solid var(--stroke); border-radius: 999px; background: var(--bg-glass); box-shadow: var(--shadow-s); color: var(--fg-2); font-size: 13.5px; line-height: 1.3; transition: border-color .2s var(--ease), box-shadow .2s var(--ease); }
.hero-news:hover { border-color: var(--brand-bg-2); box-shadow: var(--shadow); color: var(--fg); text-decoration: none; }
.hero-news-tag { flex: none; padding: 3px 9px; border-radius: 999px; background: var(--grad-solid); color: #fff; font-size: 12px; font-weight: 600; letter-spacing: .02em; }
.hero-news-text { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.hero-news .i { flex: none; width: 14px; height: 14px; color: var(--brand-fg); transition: transform .2s var(--ease); }
.hero-news:hover .i { transform: translateX(2px); }
@media (max-width: 520px) {
  .hero-news { align-items: flex-start; border-radius: 16px; padding: 4px 12px 6px 4px; }
  .hero-news-text { white-space: normal; padding-top: 3px; }
  .hero-news .i { margin-top: 4px; }
}

.releases .hero-cta { margin-top: 20px; }
.rn-body { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 56px; padding: 40px 0 96px; }
.rn-nav { position: sticky; top: calc(var(--topbar-h) + 28px); align-self: start; max-height: calc(100vh - var(--topbar-h) - 56px); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.rn-nav h2 { margin: 0 0 10px; color: var(--fg-3); font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; }
.rn-nav-list { margin: 0; padding: 0; border-left: 1px solid var(--stroke); list-style: none; }
.rn-nav-list a { display: grid; gap: 1px; margin-left: -1px; padding: 7px 0 7px 14px; border-left: 2px solid transparent; color: var(--fg-3); font-size: 13.5px; line-height: 1.35; }
.rn-nav-list a:hover { color: var(--fg); text-decoration: none; }
.rn-nav-list a.active { border-left-color: var(--brand); color: var(--fg); }
.rn-nav-list time { color: var(--fg-4); font-size: 12px; font-variant-numeric: tabular-nums; }
.rn-nav-list a.active time { color: var(--brand-fg); font-weight: 600; }
.rn-hero-latest { max-width: 100%; min-width: 0; }
.rn-hero-latest > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rn-latest { justify-self: start; margin-top: 4px; padding: 1px 7px; border-radius: 999px; background: var(--brand-bg); color: var(--brand-fg); font-size: 11px; font-weight: 600; }

.rn-prose { max-width: 860px; }
.rn-prose > p:first-child { margin-top: 0; }
.release { position: relative; margin-left: 7px; padding: 0 0 40px 34px; border-left: 2px solid var(--stroke); }
.release:last-of-type { border-image: linear-gradient(var(--stroke) 60%, transparent) 1; }
.release > h2 { margin: 0 0 4px; padding-top: 0; color: var(--brand-fg); font-size: 14px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.release + .release > h2, .release-extra + .release > h2 { padding-top: 8px; }
.release > h2::before { content: ""; position: absolute; top: 50%; left: -43px; width: 14px; height: 14px; margin-top: -7px; border: 3px solid var(--brand); border-radius: 50%; background: var(--bg); }
.release + .release > h2::before { margin-top: -3px; }
.release:first-of-type > h2::before { border: 0; background: var(--grad); box-shadow: 0 0 0 4px var(--bg), 0 0 0 7px color-mix(in srgb, var(--violet) 25%, transparent); }
.release:first-of-type > h2::after { content: "Latest"; margin-left: 10px; padding: 2px 8px; border-radius: 999px; background: var(--grad-solid); color: #fff; font-size: 11px; letter-spacing: .04em; vertical-align: 2px; }
.release > h3:first-of-type { margin: 2px 0 10px; font-family: var(--font-display); font-size: 25px; line-height: 1.25; letter-spacing: -.01em; }
.release > h4 { margin: 26px 0 8px; color: var(--fg-2); font-size: 15px; }
.release table { font-size: 14px; }
.release table td:first-child { width: 42%; }
.release table th:last-child, .release table td:last-child { width: 1%; white-space: nowrap; }
.release-extra { margin-top: 16px; padding-top: 8px; border-top: 1px solid var(--stroke); }
.release-extra > h2 { margin-top: 24px; font-size: 20px; }

/* Troubleshooting page: a filter, one section of symptom, cause, and fix rows per lab. */
.rn-nav-num { display: inline-block; min-width: 22px; margin-right: 6px; color: var(--fg-4); font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; }
.rn-nav-list a.active .rn-nav-num { color: var(--brand-fg); }
.rn-nav-list li[hidden] { display: none; }
.ts-filter { position: sticky; top: calc(var(--topbar-h) + 12px); z-index: 5; display: flex; align-items: center; gap: 12px; margin: 0 0 8px; padding: 8px 8px 8px 14px; border: 1px solid var(--stroke); border-radius: var(--radius); background: color-mix(in srgb, var(--bg) 94%, transparent); box-shadow: var(--shadow-s); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.ts-filter:focus-within { border-color: var(--brand); box-shadow: var(--shadow); outline: 2px solid var(--brand); outline-offset: 1px; }
.ts-filter-box { display: flex; flex: 1; align-items: center; gap: 10px; min-width: 0; color: var(--fg-3); }
.ts-filter-box .i { flex: none; width: 18px; height: 18px; }
.ts-filter input { flex: 1; min-width: 0; padding: 6px 0; border: 0; outline: 0; background: transparent; color: var(--fg); font: inherit; font-size: 15px; }
.ts-filter input::placeholder { color: var(--fg-4); }
.ts-count { flex: none; padding: 3px 10px; border-radius: 999px; background: var(--bg-2); color: var(--fg-3); font-size: 12.5px; font-weight: 600; font-variant-numeric: tabular-nums; }
.ts-empty { margin: 24px 0; padding: 20px; border: 1px dashed var(--stroke); border-radius: var(--radius); color: var(--fg-3); text-align: center; }
.ts-section[hidden], .ts-section tr[hidden] { display: none; }
.ts-section > h2 { margin-top: 48px; }
.ts-section > h2 + p { margin: -6px 0 14px; color: var(--fg-3); font-size: 14px; }
.ts-section table { font-size: 14px; }
.ts-section th:first-child, .ts-section td:first-child { width: 34%; }
.ts-section td:first-child code { overflow-wrap: anywhere; }

@media (max-width: 900px) {
  .rn-body { grid-template-columns: minmax(0, 1fr); gap: 0; padding-top: 24px; }
  .rn-nav { display: none; }
  .ts-filter { top: calc(var(--topbar-h) + 8px); }
  .ts-section th:first-child, .ts-section td:first-child { width: auto; }
}
@media (max-width: 700px) {
  /* One card per error: the symptom, then the labeled cause and fix. */
  .ts-section .table-wrap { overflow: visible; border: 0; border-radius: 0; }
  .ts-section table, .ts-section tbody, .ts-section tr, .ts-section td { display: block; }
  .ts-section thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .ts-section tr { margin: 0 0 12px; padding: 14px 16px; border: 1px solid var(--stroke); border-radius: var(--radius); }
  .ts-section tbody tr:hover { background: none; }
  .ts-section td, .ts-section tr:last-child td { padding: 0; border: 0; }
  .ts-section td + td { margin-top: 10px; }
  .ts-section td:first-child { color: var(--fg); font-weight: 600; }
  .ts-section td:nth-child(2)::before, .ts-section td:nth-child(3)::before { display: block; margin-bottom: 2px; color: var(--fg-4); font-size: 11.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
  .ts-section td:nth-child(2)::before { content: "Likely cause"; }
  .ts-section td:nth-child(3)::before { content: "Fix"; }
  .release { margin-left: 5px; padding-left: 24px; }
  .release > h2::before { left: -33px; }
  .release > h3:first-of-type { font-size: 21px; }
  .release table td:first-child { width: auto; }
  .release table td:last-child { white-space: normal; }
}

/* 09-setup.css */
/* Setup guide: the lab checklists, the side panel, the /setup/ page marks, the badges, and the toast action. */

/* A lab's "One-time setup" checklist (<!-- setup: … -->) */
.setup-check { margin: 0 0 24px; border: 1px solid var(--stroke); border-radius: var(--radius-l); background: var(--bg-2); overflow: hidden; }
.setup-check svg { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.setup-check .btn-sm svg { width: 16px; height: 16px; }
.setup-check-head { display: flex; align-items: flex-start; gap: 12px; padding: 14px 14px 8px 16px; }
.setup-check-icon { flex: none; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 9px; background: var(--brand-bg); color: var(--brand-fg); }
.setup-check-head p { flex: 1; min-width: 0; margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 2px 10px; line-height: 1.45; }
.setup-check-head strong { font-size: 15.5px; }
.setup-check-count { font-size: 12px; font-weight: 600; line-height: 1.6; color: var(--brand-fg); background: var(--brand-bg); padding: 0 8px; border-radius: 999px; }
.setup-check-count:empty { display: none; }
.setup-check-sub { flex-basis: 100%; font-size: 13.5px; color: var(--fg-3); }
.setup-check-list { list-style: none; margin: 0 !important; padding: 0 8px 8px !important; display: grid; gap: 1px; }
.setup-check-list li {
  display: flex; align-items: flex-start; gap: 12px; margin: 0; padding: 8px 10px; border-radius: var(--radius);
  transition: opacity .2s, transform .22s var(--ease), background .15s;
}
.setup-check-list li:hover { background: var(--bg-3); }
.setup-check-list li.leaving { opacity: 0; transform: translateX(14px); }
.setup-check-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.4; }
.setup-check-text a { font-weight: 600; font-size: 14.5px; }
.setup-check-when { font-size: 13px; color: var(--fg-3); }
.setup-check-done { margin: 0 !important; display: flex; align-items: center; gap: 10px; padding: 10px 16px; font-size: 14px; color: var(--fg-2); }
.setup-check-done svg { color: var(--success); }
.setup-check-done .link-btn { margin-left: auto; font-size: 13.5px; font-weight: 600; }
.setup-check.all-done { background: var(--success-bg); border-color: var(--success-stroke); }
.setup-check.all-done .setup-check-head { display: none; }

/* The round tick, in the checklists and the panel */
.setup-tick {
  flex: none; width: 22px; height: 22px; margin-top: 1px; padding: 0; display: grid; place-items: center; border-radius: 50%;
  border: 1.5px solid var(--fg-4); background: var(--bg-elev); color: transparent; cursor: pointer;
  transition: background .15s, border-color .15s, color .15s, transform .15s var(--ease);
}
.setup-tick svg, .setup-tick .i { width: 14px; height: 14px; stroke-width: 2.2; }
.setup-tick:hover { border-color: var(--success); color: var(--success); }
.setup-tick:active { transform: scale(.92); }
.setup-tick[aria-pressed="true"] { background: var(--success-solid); border-color: var(--success-solid); color: #fff; }

/* Badges and pills: "3 left", "4 of 7 done" */
.setup-badge {
  display: inline-flex; align-items: center; margin-left: auto; padding: 0 7px; border-radius: 999px; font-size: 11px; font-weight: 600;
  line-height: 18px; background: var(--brand-bg); color: var(--brand-fg); white-space: nowrap;
}
.btn .setup-badge { margin-left: 2px; }
.setup-badge.done { padding: 0 3px; background: var(--success-bg); color: var(--success); }
.setup-badge .i { width: 12px !important; height: 12px !important; stroke-width: 2.4; }
.setup-pill {
  display: inline-flex; align-items: center; gap: 4px; padding: 0 9px; border-radius: 999px; font-size: 12px; font-weight: 600;
  line-height: 22px; background: var(--brand-bg); color: var(--brand-fg); white-space: nowrap;
}
.setup-pill.done { background: var(--success-bg); color: var(--success); }
.setup-pill .i { width: 14px; height: 14px; stroke-width: 2.2; }
.setup-pill-hero { height: 32px; padding: 0 12px; font-size: 13px; }

/* The side panel */
.setup-drawer .drawer-card { width: min(600px, 100%); }
.setup-drawer .drawer-head h2 { flex: 0 1 auto; }
.setup-drawer .drawer-head .icon-btn { margin-left: auto; }
.setup-meter { height: 4px; margin: 4px 20px 12px; border-radius: 2px; background: var(--bg-4); overflow: hidden; }
.setup-meter span { display: block; height: 100%; transform: scaleX(var(--p, 0)); transform-origin: left; background: var(--grad); transition: transform .35s var(--ease); }
.setup-rows { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 2px 14px 18px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; align-content: start; }
.setup-row { border: 1px solid var(--stroke); border-radius: var(--radius-l); background: var(--bg-elev); scroll-margin-top: 4px; transition: border-color .15s, box-shadow .15s; }
.setup-row.open { border-color: var(--stroke-strong); box-shadow: var(--shadow-s); }
.setup-row.ref { background: var(--bg-2); }
.setup-row-head { display: flex; align-items: center; gap: 6px; padding: 6px 8px 6px 12px; }
.setup-ref-icon { flex: none; width: 22px; display: grid; place-items: center; color: var(--fg-4); }
.setup-ref-icon .i { width: 18px; height: 18px; }
.setup-row-toggle {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; padding: 6px 6px; border: 0; border-radius: var(--radius);
  background: none; color: var(--fg); font: inherit; text-align: left; cursor: pointer;
}
.setup-row-toggle:hover { background: var(--bg-3); }
.setup-row-text { flex: 1; min-width: 0; display: grid; gap: 1px; }
.setup-row-title { font-weight: 600; font-size: 14.5px; line-height: 1.35; }
.setup-row-title code, .setup-row-when code { font-size: .9em; }
.setup-row-when { font-size: 12.5px; line-height: 1.4; color: var(--fg-3); }
.setup-row-toggle > .i { width: 16px; height: 16px; color: var(--fg-4); transition: transform .2s var(--ease); }
.setup-row.open .setup-row-toggle > .i { transform: rotate(90deg); }
.setup-row.done .setup-row-title { color: var(--fg-3); }
.setup-row-body { padding: 0 16px 14px; border-top: 1px solid var(--stroke-2); }
.setup-row-content.prose { font-size: 14.5px; line-height: 1.6; }
.setup-row-content.prose > :first-child { margin-top: 14px; }
.setup-row-content.prose h3 { margin: 22px 0 8px; font-size: 16px; }
.setup-row-content.prose p, .setup-row-content.prose ul, .setup-row-content.prose ol { margin-bottom: 12px; }
.setup-row-content .code { margin-bottom: 14px; }
.setup-loading { color: var(--fg-4); }
.setup-row-actions { display: flex; justify-content: flex-end; padding-top: 2px; }
.setup-row-actions .btn-secondary { color: var(--success); border-color: var(--success-stroke); background: var(--success-bg); }
.setup-help { display: flex; align-items: center; gap: 8px; margin: 6px 6px 0; font-size: 13px; color: var(--fg-3); }
.setup-help .i { width: 16px; height: 16px; color: var(--fg-4); }
.setup-foot-end { display: flex; gap: 8px; }

/* The /setup/ page: a "Mark as done" bar under each task heading, and done marks in the nav */
.setup-mark { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin: -2px 0 18px; }
.setup-mark-when { font-size: 13.5px; color: var(--fg-3); }
.setup-mark [aria-pressed="true"] { background: var(--success-bg); border-color: var(--success-stroke); color: var(--success); }
.rn-nav-list a.setup-done > span::after { content: " ✓"; color: var(--success); font-weight: 700; }

/* Toast with an action, such as Undo */
.toast.has-action { pointer-events: auto; padding-right: 8px; }
.toast-action {
  margin-left: 6px; padding: 4px 12px; border: 0; border-radius: 999px; cursor: pointer;
  background: color-mix(in srgb, var(--bg) 18%, transparent); color: var(--bg); font: 600 13px var(--font);
}
.toast-action:hover { background: color-mix(in srgb, var(--bg) 28%, transparent); }

@media (max-width: 720px) {
  .setup-check-head { flex-wrap: wrap; }
  .setup-check-head .btn { margin-left: 46px; }
  .setup-rows { padding: 2px 10px 14px; }
  .setup-row-body { padding: 0 12px 12px; }
  .setup-drawer .drawer-foot { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) {
  .setup-check-list li, .setup-meter span, .setup-row-toggle > .i { transition: none; }
}
@media print {
  .setup-tick, .setup-check-head .btn, .setup-mark { display: none !important; }
}

/* 10-ts-panel.css */
/* A step's Troubleshoot button, next to Done: it opens the step's known errors in the Troubleshooting panel. */
.step-ts {
  flex: none; display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 6px 0 8px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--stroke-strong); background: var(--bg-elev); color: var(--fg-3); font-size: 12.5px; font-weight: 600; transition: all .2s;
}
.step-ts svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.step-ts b {
  min-width: 18px; height: 18px; padding: 0 5px; display: grid; place-items: center; border-radius: 999px; background: var(--bg-3);
  color: var(--fg-3); font-size: 11px; font-weight: 650; font-variant-numeric: tabular-nums; transition: inherit;
}
.step-ts:hover, .step-ts[aria-expanded="true"] { border-color: var(--warning-stroke); background: var(--warning-bg); color: var(--warning); }
.step-ts:hover b { background: color-mix(in srgb, var(--warning) 16%, transparent); color: var(--warning); }

/* Troubleshooting panel: the Troubleshooting page's sections in a side panel, with each error as a card. */
.ts-drawer .ts-panel-filter {
  position: static; margin: 0 14px 12px; padding: 6px 6px 6px 12px; background: var(--bg); box-shadow: none;
  backdrop-filter: none; -webkit-backdrop-filter: none;
}
.ts-drawer .ts-panel-filter input { font-size: 14.5px; }
.ts-row[hidden] { display: none; }
.ts-row .setup-row-head { padding-left: 8px; }
.ts-row-num, .ts-row-icon {
  flex: none; width: 30px; height: 26px; display: grid; place-items: center; border-radius: 7px; background: var(--bg-3);
  color: var(--fg-3); font: 600 12px var(--mono);
}
.ts-row-icon .i { width: 16px; height: 16px; }
.ts-row.here { border-color: var(--brand-bg-2); }
.ts-row.here .ts-row-num, .ts-row.here .ts-row-icon { background: var(--brand-bg); color: var(--brand-fg); }
.ts-here {
  flex: none; padding: 0 8px; border-radius: 999px; background: var(--brand-bg); color: var(--brand-fg); font-size: 11.5px;
  font-weight: 600; line-height: 20px; white-space: nowrap;
}
.ts-row-content.prose > p:first-child { margin: 12px 0 10px; font-size: 13.5px; color: var(--fg-3); }
/* The current lab's section doesn't need its link back to the lab. */
.ts-row.here .ts-row-content.prose > p:first-child { display: none; }
.ts-row.here .ts-row-content.prose > .table-wrap:nth-child(2) { margin-top: 14px; }

/* One card per error: the symptom, then the labeled cause and fix. */
.ts-row-content .table-wrap { margin: 0; overflow: visible; border: 0; border-radius: 0; }
.ts-row-content table, .ts-row-content tbody, .ts-row-content tr, .ts-row-content td { display: block; }
.ts-row-content table { font-size: 14px; }
.ts-row-content thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.ts-row-content tr { margin: 0 0 10px; padding: 12px 14px; border: 1px solid var(--stroke); border-radius: var(--radius); background: var(--bg); }
.ts-row-content tr[hidden] { display: none; }
.ts-row-content tbody tr:hover { background: var(--bg); }
.ts-row-content td, .ts-row-content tr:last-child td { padding: 0; border: 0; }
.ts-row-content td + td { margin-top: 8px; }
.ts-row-content td:first-child { color: var(--fg); font-weight: 600; }
.ts-row-content td:first-child code { overflow-wrap: anywhere; }
.ts-row-content td:nth-child(2)::before, .ts-row-content td:nth-child(3)::before {
  display: block; margin-bottom: 2px; color: var(--fg-4); font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
}
.ts-row-content td:nth-child(2)::before { content: "Likely cause"; }
.ts-row-content td:nth-child(3)::before { content: "Fix"; }
.ts-drawer .ts-empty { margin: 4px 0; }

/* The step whose Troubleshoot button opened the panel. */
.ts-step-bar[hidden] { display: none; }
.ts-step-bar { display: flex; align-items: center; gap: 8px; margin: 0 14px 10px; min-width: 0; }
.ts-step-chip {
  display: inline-flex; align-items: center; gap: 8px; min-width: 0; padding: 4px 12px 4px 4px; border-radius: 999px;
  border: 1px solid var(--warning-stroke); background: var(--warning-bg); color: var(--fg); font-size: 13px; font-weight: 600;
}
.ts-step-kicker {
  flex: none; padding: 0 8px; border-radius: 999px; background: color-mix(in srgb, var(--warning) 12%, transparent); color: color-mix(in srgb, var(--warning) 80%, var(--fg));
  font-size: 10.5px; font-weight: 700; letter-spacing: .06em; line-height: 20px; text-transform: uppercase;
}
.ts-step-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ts-step-all {
  flex: none; margin-left: auto; padding: 4px 8px; border: 0; border-radius: var(--radius-s); background: none; color: var(--brand-fg);
  font: inherit; font-size: 13px; font-weight: 600; cursor: pointer;
}
.ts-step-all:hover { background: var(--brand-bg); }

/* The steps where readers see an error, under its symptom, on the page and in the panel. */
.ts-where { display: block; margin-top: 4px; color: var(--fg-3); font-size: 12.5px; font-weight: 500; line-height: 1.5; }
.ts-where-label {
  margin-right: 4px; color: var(--fg-4); font-size: 10.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
}
.ts-where a { color: inherit; text-decoration: underline; text-decoration-color: var(--stroke-strong); text-underline-offset: 2px; }
.ts-where a:hover { color: var(--brand-fg); text-decoration-color: currentColor; }

@media (max-width: 720px) {
  .ts-drawer .ts-panel-filter { margin: 0 10px 10px; }
  .ts-step-bar { margin: 0 10px 8px; }
  .ts-row-content tr { padding: 10px 12px; }
}
