/* Nexa SD-WAN Test Lab — site styles. No external dependencies; fonts are bundled.
   Spacing follows one 8-point scale (--sp-*). Cards use one radius (16 px), nested surfaces 12 px. */

@font-face { font-family: "Inter"; src: url("../fonts/inter-var.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("../fonts/jetbrains-mono-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("../fonts/jetbrains-mono-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-display: swap; }

/* ------------------------------------------------------------------ tokens */
:root {
  --bg: #ffffff;
  --bg-soft: #f5f7fb;
  --bg-band: #eef2f9;
  --surface: #ffffff;
  --surface-2: #f8fafd;
  --surface-3: #eff3f9;
  --ink: #0b1330;
  --text: #25304d;
  --muted: #5b6784;
  --faint: #5d6b88;                 /* 5.35:1 on white (was #8792ab, 3.12:1) */
  --line: #e1e6ef;
  --line-strong: #c9d1df;
  --accent: #ff5c35;                /* decorative accent: lines, rings, highlights */
  --accent-hover: #f0461e;
  --accent-strong: #cc3e17;         /* fills behind white text: buttons, solid badges (4.92:1) */
  --accent-strong-hover: #b3350f;
  --on-accent-strong: #ffffff;
  --accent-ink: #c43a15;            /* accent-coloured text */
  --accent-soft: #fff0eb;
  --link: #1f45c7;
  --focus: #2b6bff;
  --ok: #08704a; --ok-soft: #e1f5ec; --on-ok: #ffffff;
  --warn: #a35f00; --warn-soft: #fff3db;
  --bad: #c52a2a; --bad-soft: #fde8e8;
  --info: #2556c9; --info-soft: #e7eefd;
  --pending: #5b6784; --pending-soft: #eceff5;
  --planned: #6a4fd1; --planned-soft: #efeafd;
  --site1: #d8531b; --site1-ink: #b8440f; --site1-soft: #fde9df;
  --site2: #d98a0a; --site2-ink: #9e5d00; --site2-soft: #fdf0d5;
  --site3: #0f7b6c; --site3-ink: #0f7b6c; --site3-soft: #d8efeb;
  --oci: #1f5bd6; --oci-ink: #1f5bd6; --oci-soft: #e2ebfc;
  --s1-fill: #b8440f; --oci-fill: #1f5bd6; --on-band: #ffffff;   /* solid band cells with text on them */
  --common: #5b6784; --common-soft: #e6e9f0;
  --tunnel: #8a3ffc; --tunnel-soft: #efe5ff;
  --code-bg: #f3f5fa;
  --code-ink: #1f2944;
  --term-bg: #0d1428;
  --term-bar: #161f3b;
  --term-ink: #d7deef;
  --term-dim: #8a96b6;
  --term-prompt: #7ee0b5;
  --shadow-sm: 0 1px 2px rgba(11, 19, 48, .06);
  --shadow: 0 1px 2px rgba(11, 19, 48, .05), 0 6px 24px -8px rgba(11, 19, 48, .12);
  --shadow-lg: 0 2px 4px rgba(11, 19, 48, .05), 0 24px 48px -16px rgba(11, 19, 48, .22);
  --radius: 16px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --sp-1: 8px; --sp-2: 16px; --sp-3: 24px; --sp-4: 32px; --sp-5: 40px; --sp-6: 48px; --sp-8: 64px; --sp-10: 80px;
  --block: var(--sp-3);             /* space around code, terminals, tables, callouts, tabs */
  --block-lg: var(--sp-4);          /* space around widgets, diagrams, figures */
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --measure: 70ch;
  --header-h: 64px;
  --wrap: 1440px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0a0f1f; --bg-soft: #0e1428; --bg-band: #111934; --surface: #121a33; --surface-2: #162040; --surface-3: #1b2649;
    --ink: #f2f5fd; --text: #d3daea; --muted: #9ba7c3; --faint: #8290b1; --line: #243056; --line-strong: #3a4a78;
    --accent: #ff7650; --accent-hover: #ff8c6c; --accent-strong: #ff7650; --accent-strong-hover: #ff8c6c; --on-accent-strong: #1a0a04;
    --accent-ink: #ff9b7d; --accent-soft: #3a1a12;
    --link: #8fb0ff; --focus: #7aa2ff;
    --ok: #43d49a; --ok-soft: #0f3024; --on-ok: #04150e; --warn: #f5b84b; --warn-soft: #3a2a0c; --bad: #ff7b7b; --bad-soft: #3d1414;
    --info: #8fb0ff; --info-soft: #16244a; --pending: #a3aec8; --pending-soft: #1e2847; --planned: #b9a6ff; --planned-soft: #251d4a;
    --site1: #ff8a55; --site1-ink: #ff8a55; --site1-soft: #3b2014; --site2: #ffbf52; --site2-ink: #ffbf52; --site2-soft: #3a2c10;
    --site3: #4fd1bd; --site3-ink: #4fd1bd; --site3-soft: #0f302b; --oci: #7ea6ff; --oci-ink: #7ea6ff; --oci-soft: #16244a;
    --s1-fill: #ff8a55; --oci-fill: #7ea6ff; --on-band: #0a0f1f;
    --common: #a3aec8; --common-soft: #1e2847; --tunnel: #c29bff; --tunnel-soft: #2a1a4a;
    --code-bg: #0d1428; --code-ink: #d7deef; --term-bg: #070b18; --term-bar: #111933;
    --shadow-sm: 0 1px 2px rgba(0,0,0,.4); --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px -8px rgba(0,0,0,.5);
    --shadow-lg: 0 2px 4px rgba(0,0,0,.4), 0 24px 48px -16px rgba(0,0,0,.6);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0a0f1f; --bg-soft: #0e1428; --bg-band: #111934; --surface: #121a33; --surface-2: #162040; --surface-3: #1b2649;
  --ink: #f2f5fd; --text: #d3daea; --muted: #9ba7c3; --faint: #8290b1; --line: #243056; --line-strong: #3a4a78;
  --accent: #ff7650; --accent-hover: #ff8c6c; --accent-strong: #ff7650; --accent-strong-hover: #ff8c6c; --on-accent-strong: #1a0a04;
  --accent-ink: #ff9b7d; --accent-soft: #3a1a12;
  --link: #8fb0ff; --focus: #7aa2ff;
  --ok: #43d49a; --ok-soft: #0f3024; --on-ok: #04150e; --warn: #f5b84b; --warn-soft: #3a2a0c; --bad: #ff7b7b; --bad-soft: #3d1414;
  --info: #8fb0ff; --info-soft: #16244a; --pending: #a3aec8; --pending-soft: #1e2847; --planned: #b9a6ff; --planned-soft: #251d4a;
  --site1: #ff8a55; --site1-ink: #ff8a55; --site1-soft: #3b2014; --site2: #ffbf52; --site2-ink: #ffbf52; --site2-soft: #3a2c10;
  --site3: #4fd1bd; --site3-ink: #4fd1bd; --site3-soft: #0f302b; --oci: #7ea6ff; --oci-ink: #7ea6ff; --oci-soft: #16244a;
  --s1-fill: #ff8a55; --oci-fill: #7ea6ff; --on-band: #0a0f1f;
  --common: #a3aec8; --common-soft: #1e2847; --tunnel: #c29bff; --tunnel-soft: #2a1a4a;
  --code-bg: #0d1428; --code-ink: #d7deef; --term-bg: #070b18; --term-bar: #111933;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.4); --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px -8px rgba(0,0,0,.5);
  --shadow-lg: 0 2px 4px rgba(0,0,0,.4), 0 24px 48px -16px rgba(0,0,0,.6);
  color-scheme: dark;
}

/* ------------------------------------------------------------------ base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
html.lb-open { overflow: hidden; }
body {
  margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); font-size: 16.5px; line-height: 1.65;
  font-feature-settings: "cv11", "ss01", "ss03"; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img, svg { max-width: 100%; }
a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
button { font: inherit; color: inherit; }
h1, h2, h3, h4 { color: var(--ink); line-height: 1.2; letter-spacing: -0.02em; font-weight: 700; }
code, kbd, pre { font-family: var(--mono); font-size: .9em; font-variant-numeric: tabular-nums; }
kbd { background: var(--surface-3); border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 6px; padding: 0 .4em; font-size: .78em; }
hr { border: 0; border-top: 1px solid var(--line); margin: var(--sp-6) 0; }
::selection { background: color-mix(in srgb, var(--accent) 28%, transparent); }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -48px; background: var(--ink); color: var(--bg); padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { top: 12px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--sp-3); }
.wrap-wide { max-width: 1520px; }
main:focus { outline: none; }
.ic { width: 20px; height: 20px; flex: none; vertical-align: -4px; }
.ic-sm { width: 16px; height: 16px; vertical-align: -3px; }
.ic-lg { width: 36px; height: 36px; }
[hidden] { display: none !important; }
.mono { font-family: var(--mono); font-size: .88em; }

/* ------------------------------------------------------------------ buttons */
.btn {
  display: inline-flex; align-items: center; gap: .5em; border: 1px solid transparent; border-radius: 999px;
  background: var(--ink); color: var(--bg); padding: .62em 1.2em; font-weight: 600; font-size: .95rem; line-height: 1.2;
  text-decoration: none; cursor: pointer; transition: background .15s, transform .15s, box-shadow .15s, border-color .15s; white-space: nowrap;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); box-shadow: var(--shadow); }
.btn:active { transform: none; }
.btn-sm { padding: .45em .95em; font-size: .88rem; }
.btn-lg { padding: .85em 1.5em; font-size: 1rem; }
.btn-accent { background: var(--accent-strong); color: var(--on-accent-strong); }
.btn-accent:hover { background: var(--accent-strong-hover); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn-ghost:hover { background: var(--surface-2); box-shadow: none; }
.btn-onDark { background: rgba(255,255,255,.08); color: #fff; border-color: rgba(255,255,255,.28); }
.btn-onDark:hover { background: rgba(255,255,255,.16); }
.btn[disabled] { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }
.btn.is-done { background: var(--ok); color: var(--on-ok); }
.linkish { background: none; border: 0; padding: 0; color: inherit; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

/* ------------------------------------------------------------------ header */
.site-header {
  position: sticky; top: 0; z-index: 50; height: var(--header-h);
  background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: saturate(1.6) blur(14px);
  -webkit-backdrop-filter: saturate(1.6) blur(14px); border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 20px; height: 100%; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-size: 1rem; white-space: nowrap; }
.brand:hover { text-decoration: none; }
.brand-mark { width: 32px; height: 32px; }
.bm-bg { fill: var(--ink); }
.bm-n { fill: none; stroke: var(--bg); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.bm-dot { fill: var(--accent); }
.brand-text { font-weight: 500; letter-spacing: -0.01em; }
.brand-text strong { font-weight: 800; }
.site-nav { flex: 1; }
.nav-list { list-style: none; display: flex; gap: 4px; margin: 0; padding: 0; align-items: center; }
.nav-list > li > a, .menu-btn {
  display: inline-flex; align-items: center; gap: 4px; padding: 8px 12px; border-radius: 999px; color: var(--text);
  text-decoration: none; font-weight: 550; font-size: .95rem; background: none; border: 0; cursor: pointer;
}
.nav-list > li > a:hover, .menu-btn:hover { background: var(--surface-3); color: var(--ink); }
.nav-list > li > a[aria-current], .menu-btn[data-current] { color: var(--ink); background: var(--surface-3); }
.menu-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; }
.has-menu { position: relative; }
.mega {
  position: absolute; top: calc(100% + 10px); left: -120px; display: grid; grid-template-columns: repeat(3, minmax(190px, 1fr));
  gap: 8px 28px; padding: 22px 26px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); width: min(780px, 92vw);
}
.mega-h { margin: 0 0 6px; font-size: .75rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.mega ul { list-style: none; margin: 0 0 10px; padding: 0; }
.mega a { display: block; padding: 4px 0; color: var(--ink); text-decoration: none; font-size: .95rem; }
.mega a:hover { color: var(--accent-ink); }
.header-tools { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.search-btn {
  display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: var(--surface-2); color: var(--muted);
  border-radius: 999px; padding: 6px 8px 6px 12px; cursor: pointer; min-width: 180px; font-size: .9rem;
}
.search-btn:hover { border-color: var(--line-strong); color: var(--ink); }
.search-btn kbd { margin-left: auto; }
.theme-btn { border: 1px solid var(--line); background: var(--surface-2); border-radius: 999px; width: 38px; height: 38px; display: grid; place-items: center; cursor: pointer; color: var(--ink); }
.theme-btn .ic { fill: none; stroke: currentColor; stroke-width: 1.8; }
.theme-btn .theme-light, .theme-btn .theme-dark { display: none; }
:root[data-theme="light"] .theme-btn .theme-auto, :root[data-theme="dark"] .theme-btn .theme-auto { display: none; }
:root[data-theme="light"] .theme-btn .theme-light { display: block; }
:root[data-theme="dark"] .theme-btn .theme-dark { display: block; }
.nav-toggle { display: none; background: none; border: 1px solid var(--line); border-radius: 10px; width: 40px; height: 40px; cursor: pointer; }
.nav-toggle svg { width: 22px; height: 22px; fill: none; stroke: var(--ink); stroke-width: 2; stroke-linecap: round; }

/* ------------------------------------------------------------------ home hero */
.home-hero { position: relative; background: #0b1330; color: #dfe6f7; overflow: hidden; padding: 72px 0 0; isolation: isolate; }
:root[data-theme="dark"] .home-hero { background: #070b18; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .home-hero { background: #070b18; } }
.hero-bg {
  position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(900px 500px at 85% -10%, rgba(255, 92, 53, .28), transparent 60%),
    radial-gradient(800px 480px at 10% 110%, rgba(84, 132, 255, .30), transparent 60%),
    linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px) 0 0 / 44px 44px,
    linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px) 0 0 / 44px 44px;
  mask-image: linear-gradient(#000 70%, transparent);
}
.hero-grid { display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr); gap: var(--sp-6); align-items: center; }
.hero-chip { display: inline-flex; align-items: center; gap: 10px; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.14); padding: 6px 14px; border-radius: 999px; font-size: .88rem; margin: 0 0 22px; color: #e8edfb; }
.dot-live { width: 8px; height: 8px; border-radius: 50%; background: #3fe0a0; box-shadow: 0 0 0 4px rgba(63,224,160,.18); }
.home-hero h1 { color: #fff; font-size: clamp(2.2rem, 4.4vw, 3.5rem); letter-spacing: -0.035em; margin: 0 0 20px; line-height: 1.06; max-width: 16ch; }
.hero-lead { font-size: 1.15rem; color: #b8c3e0; max-width: 56ch; margin: 0 0 30px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-visual { position: relative; }
.hv { width: 100%; height: auto; display: block; overflow: visible; }
.hv-panel rect { stroke-width: 1.2; }
.hv-site rect { fill: rgba(255,138,85,.05); stroke: rgba(255,138,85,.42); }
.hv-oci rect { fill: rgba(126,166,255,.06); stroke: rgba(126,166,255,.45); }
.hv-h { fill: #fff; font: 700 13px var(--font); letter-spacing: .12em; }
.hv-s { fill: #9fb0d8; font: 500 12px var(--font); }
.hv-node rect { fill: rgba(255,255,255,.07); stroke: rgba(255,255,255,.24); stroke-width: 1.2; }
.hv-node text { fill: #eef2fc; font: 650 14px var(--font); }
.hv-node .hv-m, .hv-m { fill: #aab7da; font: 500 12px var(--mono); }
.hv-vyos rect { stroke: #ff7a52; fill: rgba(255,92,53,.14); stroke-width: 1.6; }
.hv-drg rect { stroke: #7ea6ff; fill: rgba(126,166,255,.16); stroke-width: 1.6; }
.hv-node .hv-strong { font-size: 16px; font-weight: 750; fill: #fff; }
.hv-vcn rect { fill: rgba(126,166,255,.05); stroke: rgba(126,166,255,.38); stroke-dasharray: 5 4; }
.hv-vcn .hv-s { font-weight: 700; letter-spacing: .1em; font-size: 11.5px; }
.hv-chip rect { fill: rgba(255,255,255,.06); stroke: rgba(255,255,255,.18); }
.hv-chip text { fill: #d7def3; font: 600 12.5px var(--mono); }
.hv-link { fill: none; stroke: rgba(255,255,255,.34); stroke-width: 1.6; }
.hv-tun { fill: none; stroke: #ff7a52; stroke-width: 4; stroke-linecap: round; }
.hv-tun2 { stroke: #ffa57f; opacity: .85; }
.hv-lab { fill: #ffc6b3; font: 650 12.5px var(--font); }
.hv-lab2 { fill: #c7d3f5; font: 650 12px var(--font); letter-spacing: .08em; }
.hv-route { fill: none; stroke: none; }
.hv-pkt { fill: #fff; }
.hv-back { fill: #9dbbff; }
.hv-static { display: none; }
.hero-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; margin-top: 56px; border-top: 1px solid rgba(255,255,255,.12); }
.hero-stats > div { padding: 22px 20px 26px 0; }
.hero-stats > div + div { padding-left: 20px; border-left: 1px solid rgba(255,255,255,.12); }
.hero-stats strong { display: block; color: #fff; font-size: 1.9rem; letter-spacing: -0.03em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.hero-stats span { color: #a9b5d4; font-size: .92rem; }

/* ------------------------------------------------------------------ bands and section heads */
.band { padding: var(--sp-10) 0; }
.band-soft { background: var(--bg-soft); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { max-width: 760px; margin-bottom: var(--sp-4); }
.section-head h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); margin: 6px 0 12px; letter-spacing: -0.03em; }
.section-head-sm { margin-bottom: var(--sp-3); }
.section-head-sm h3 { font-size: 1.35rem; margin: 0 0 6px; }
.section-lead { color: var(--muted); font-size: 1.08rem; margin: 0; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; margin: 0; font-size: .8rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--accent-ink); }
.eyebrow .ic { width: 16px; height: 16px; }
.home-prose { margin-bottom: var(--sp-4); }
.home-topology { margin-top: var(--sp-8); }
.preview-band { margin-top: var(--sp-6); padding: var(--sp-4); border-radius: calc(var(--radius) + 4px); border: 1px dashed color-mix(in srgb, var(--planned) 40%, var(--line)); background: color-mix(in srgb, var(--planned-soft) 35%, transparent); }
.resume-card { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2); flex-wrap: wrap; margin: 0 0 var(--sp-5); padding: var(--sp-2) var(--sp-3); border-radius: var(--radius); border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--line)); background: linear-gradient(120deg, var(--accent-soft), var(--surface) 70%); box-shadow: var(--shadow-sm); animation: rise .3s ease; }
.rc-copy { display: flex; gap: 12px; align-items: center; min-width: 0; }
.rc-copy > .ic { color: var(--accent-ink); width: 24px; height: 24px; }
.rc-h { margin: 0; font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-ink); }
.rc-t { margin: 0; font-weight: 700; color: var(--ink); font-size: 1.05rem; }

/* ------------------------------------------------------------------ page hero */
.page-hero { background: var(--bg-soft); border-bottom: 1px solid var(--line); padding: 36px 0 34px; position: relative; overflow: hidden; }
.page-hero::after {
  content: ""; position: absolute; right: -120px; top: -160px; width: 520px; height: 420px; pointer-events: none;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--accent) 16%, transparent), transparent);
}
.page-hero > .wrap { position: relative; z-index: 1; }
.page-hero h1 { font-size: clamp(1.9rem, 3.6vw, 2.8rem); margin: 10px 0 10px; letter-spacing: -0.03em; max-width: 26ch; }
.page-hero .lead { font-size: 1.12rem; color: var(--muted); max-width: 70ch; margin: 0; }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; padding: 0; font-size: .88rem; color: var(--muted); }
.crumbs li + li::before { content: "/"; margin-right: 6px; color: var(--faint); }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--ink); text-decoration: underline; }
.lesson-meta { display: flex; flex-wrap: wrap; gap: 8px 18px; color: var(--muted); font-size: .92rem; margin-top: 12px; }
.lesson-meta > span { display: inline-flex; align-items: center; gap: 6px; }
.lesson-state:not(:empty) { color: var(--ok); font-weight: 650; }
.module-hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: var(--sp-6); align-items: center; }
.module-hero .hero-actions { margin-top: 22px; }
.module-aside { display: grid; gap: var(--sp-2); }
.module-art { border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); padding: 6px; box-shadow: var(--shadow-sm); }
.module-illustration { display: block; width: 100%; height: auto; }
.module-progress-card { display: flex; align-items: center; gap: var(--sp-2); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--sp-2) 20px; box-shadow: var(--shadow-sm); }
.mpc-h { margin: 0; font-size: .76rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.mpc-num { margin: 2px 0 2px; font-size: 1rem; color: var(--ink); }
.mpc-num .mpc-done { font-size: 1.5rem; font-weight: 800; letter-spacing: -0.03em; }
.mpc-sub { margin: 0; font-size: .84rem; color: var(--muted); }
.reading-progress { position: sticky; top: var(--header-h); z-index: 40; height: 3px; margin-bottom: -3px; pointer-events: none; }
.reading-progress span { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), #ff9a5c); transform: scaleX(0); transform-origin: 0 50%; }
/* the compact "In this section" menu used on explore pages instead of a sidebar */
.section-menu { margin-top: var(--sp-2); max-width: 720px; }
.section-menu > summary { display: inline-flex; align-items: center; gap: 8px; list-style: none; cursor: pointer; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); font-weight: 600; font-size: .9rem; }
.section-menu > summary::-webkit-details-marker { display: none; }
.section-menu > summary svg:last-child { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; transition: transform .15s; }
.section-menu[open] > summary svg:last-child { transform: rotate(180deg); }
.section-menu-body { margin-top: 10px; padding: 10px; border-radius: var(--radius-md); border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow); }
.section-menu-body .side-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 2px 8px; }

/* ------------------------------------------------------------------ layout */
.layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--sp-6); padding-top: var(--sp-5); padding-bottom: var(--sp-10); }
.layout.has-toc { grid-template-columns: minmax(0, 1fr) 220px; }
.layout.has-sidebar { grid-template-columns: 250px minmax(0, 1fr); gap: var(--sp-5); }
.layout.has-sidebar.has-toc { grid-template-columns: 250px minmax(0, 1fr) 210px; }
.content { min-width: 0; }
.sidebar { position: sticky; top: calc(var(--header-h) + 24px); align-self: start; max-height: calc(100vh - var(--header-h) - 48px); overflow: auto; padding-right: 4px; }
.sidebar-toggle { display: none; }
.side-module { margin: 0 0 14px; }
.side-module a { display: flex; gap: 10px; align-items: center; font-weight: 700; color: var(--ink); text-decoration: none; line-height: 1.3; }
.side-module a > span { display: flex; flex-direction: column; }
.side-count { font-size: .78rem; font-weight: 600; color: var(--muted); }
.side-h { margin: 18px 0 6px; font-size: .74rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--faint); }
.side-list { list-style: none; margin: 0; padding: 0; }
.side-list a { display: flex; gap: 8px; align-items: flex-start; padding: 6px 10px; border-radius: 8px; color: var(--text); text-decoration: none; font-size: .92rem; line-height: 1.4; }
.side-list a:hover { background: var(--surface-3); color: var(--ink); }
.side-list a[aria-current] { background: var(--accent-soft); color: var(--accent-ink); font-weight: 650; }
.side-group { margin: 12px 0 4px 10px; font-size: .78rem; font-weight: 650; color: var(--muted); }
.tick { flex: none; width: 16px; height: 16px; margin-top: 2px; border-radius: 50%; border: 1.5px solid var(--line-strong); display: inline-grid; place-items: center; transition: background .2s, border-color .2s; }
.is-complete .tick, [data-done="true"] .tick { background: var(--ok); border-color: var(--ok); }
.is-complete .tick::after, [data-done="true"] .tick::after { content: ""; width: 7px; height: 4px; border: 2px solid var(--on-ok); border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px, -1px); }
.toc { position: sticky; top: calc(var(--header-h) + 24px); align-self: start; font-size: .88rem; max-height: calc(100vh - var(--header-h) - 48px); overflow: auto; }
.toc-h { margin: 0 0 8px; font-size: .74rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--faint); }
.toc ul { list-style: none; margin: 0; padding: 0 0 0 12px; border-left: 1px solid var(--line); }
.toc ul ul { border: 0; padding-left: 12px; }
.toc a { display: block; padding: 4px 0; color: var(--muted); text-decoration: none; line-height: 1.35; }
.toc a:hover { color: var(--ink); }
.toc a.is-active { color: var(--accent-ink); font-weight: 650; }
/* progress ring (module cards, module page, sidebar) */
.ring { flex: none; transform: rotate(-90deg); overflow: visible; }
.ring-track { fill: none; stroke: var(--surface-3); stroke-width: 5; }
.ring-fill { fill: none; stroke: var(--accent); stroke-width: 5; stroke-linecap: round; transition: stroke-dasharray .6s ease; }
.ring-fill[stroke-dasharray^="0 "] { stroke-opacity: 0; }   /* no dot at 0% */
.is-finished .ring-fill { stroke: var(--ok); }

/* ------------------------------------------------------------------ prose: text at ~70ch, wide blocks use the full column */
.prose { max-width: none; }
.prose > :first-child { margin-top: 0; }
.prose > :is(p, ul, ol, dl, h2, h3, h4, h5, blockquote, .intro, .plain-list, .lesson-list, .preview-banner),
.prose :is(.tab-pane, .deep-dive, .more-body, .steps) > :is(p, ul, ol, dl, h3, h4, blockquote) { max-width: var(--measure); }
.prose > :is(.callout, .objectives, .steps) { max-width: calc(var(--measure) + 64px); }
.scenario :is(.scn-body, .hint, .scn-answer) > :is(p, ul, ol), .task > :is(p, ol, ul), .q-explain > p { max-width: var(--measure); }
.prose :where(h2) { font-size: 1.85rem; margin: var(--sp-6) 0 var(--sp-2); padding-top: 4px; letter-spacing: -0.025em; }
.prose :where(h3) { font-size: 1.35rem; margin: var(--sp-4) 0 10px; }
.prose > h4, .prose :is(.tab-pane, .deep-dive, .more-body) > h4 { font-size: 1.1rem; margin: var(--sp-3) 0 6px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.prose :where(p, ul, ol, dl) { margin: 0 0 var(--sp-2); }   /* :where keeps these below component rules */
.prose :where(li) { margin: .3rem 0; }
.prose :where(li > ul, li > ol) { margin: .3rem 0; }
.prose :where(strong) { color: var(--ink); font-weight: 650; }
.prose :not(pre) > code { background: var(--code-bg); color: var(--code-ink); border: 1px solid var(--line); padding: .08em .38em; border-radius: 6px; font-size: .86em; overflow-wrap: anywhere; }
.prose a code { color: inherit; }
.prose :where(blockquote) { margin: var(--block) 0; padding: .2rem 1.2rem; border-left: 3px solid var(--accent); color: var(--muted); }
.prose :where(dt) { font-weight: 650; color: var(--ink); }
.prose :where(dd) { margin: 0 0 .8rem 1rem; }
.prose :where(img) { border-radius: var(--radius-md); border: 1px solid var(--line); height: auto; }
.prose :where(figure) { margin: var(--block-lg) 0; }
.prose :where(figcaption) { color: var(--muted); font-size: .9rem; margin-top: 10px; }
.intro { font-size: 1.1rem; color: var(--muted); }
.plain-list { padding-left: 1.2rem; }

/* ------------------------------------------------------------------ callouts */
.callout { display: flex; gap: 14px; margin: var(--block) 0; padding: var(--sp-2) 20px; border-radius: var(--radius-md); border: 1px solid var(--line); background: var(--surface-2); }
.callout > .ic { margin-top: 3px; color: var(--muted); }
.callout > div { min-width: 0; }
.callout-title { margin: 0 0 .3rem !important; font-weight: 700; color: var(--ink); }
.callout div > :last-child { margin-bottom: 0; }
.callout-note { background: var(--info-soft); border-color: color-mix(in srgb, var(--info) 30%, transparent); }
.callout-note > .ic { color: var(--info); }
.callout-tip { background: var(--ok-soft); border-color: color-mix(in srgb, var(--ok) 30%, transparent); }
.callout-tip > .ic { color: var(--ok); }
.callout-warn { background: var(--warn-soft); border-color: color-mix(in srgb, var(--warn) 35%, transparent); }
.callout-warn > .ic { color: var(--warn); }
.callout-danger { background: var(--bad-soft); border-color: color-mix(in srgb, var(--bad) 35%, transparent); }
.callout-danger > .ic { color: var(--bad); }
.callout-key { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 35%, transparent); }
.callout-key > .ic { color: var(--accent-ink); }
.callout-status { background: var(--planned-soft); border-color: color-mix(in srgb, var(--planned) 30%, transparent); }
.callout-status > .ic { color: var(--planned); }

/* ------------------------------------------------------------------ code */
.code { margin: var(--block) 0; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--code-bg); overflow: hidden; }
.code-head { display: flex; align-items: center; justify-content: space-between; padding: 6px 8px 6px 16px; border-bottom: 1px solid var(--line); font-size: .76rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); background: color-mix(in srgb, var(--code-bg) 70%, var(--surface-3)); }
/* scroll shadows: a fade appears at an edge only while there is more content that way */
.code pre, .term-scroll, .table-wrap, .bm-scroll, .w-pre:not(.wrap) {
  background-repeat: no-repeat; background-attachment: local, local, scroll, scroll;
  background-size: 32px 100%, 32px 100%, 14px 100%, 14px 100%; background-position: left center, right center, left center, right center;
}
.code pre {
  margin: 0; padding: var(--sp-2); overflow-x: auto; color: var(--code-ink); font-size: .86rem; line-height: 1.6; tab-size: 2;
  background-image: linear-gradient(90deg, var(--code-bg) 40%, transparent), linear-gradient(270deg, var(--code-bg) 40%, transparent),
    linear-gradient(90deg, rgba(11,19,48,.14), transparent), linear-gradient(270deg, rgba(11,19,48,.14), transparent);
  background-color: var(--code-bg);
}
.copy { border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 8px; padding: 3px 10px; font-size: .78rem; font-weight: 600; cursor: pointer; letter-spacing: 0; text-transform: none; white-space: nowrap; }
.copy:hover { border-color: var(--line-strong); }
.copy.is-copied { background: var(--ok); color: var(--on-ok); border-color: var(--ok); }
.tk-c { color: var(--faint); font-style: italic; }
.tk-s { color: #b0400f; }
.tk-k { color: #1f45c7; font-weight: 600; }
:root[data-theme="dark"] .tk-s { color: #ffb38f; }
:root[data-theme="dark"] .tk-k { color: #9ab8ff; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .tk-s { color: #ffb38f; } :root:not([data-theme="light"]) .tk-k { color: #9ab8ff; } }

/* terminal frames: captured output, illustrative output and command blocks */
.terminal { margin: var(--block) 0; border-radius: var(--radius-md); overflow: hidden; background: var(--term-bg); box-shadow: var(--shadow); border: 1px solid #1f2a4a; }
.term-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 8px 10px 8px 12px; background: linear-gradient(#1a2340, var(--term-bar)); border-bottom: 1px solid #0a1022; min-width: 0; }
.dots { display: inline-flex; gap: 6px; flex: none; }
.dots i { width: 11px; height: 11px; border-radius: 50%; background: #ff5f57; display: block; }
.dots i:nth-child(2) { background: #febc2e; }
.dots i:nth-child(3) { background: #28c840; }
.term-title { color: #a9b4d2; font: 600 .8rem var(--mono); flex: 1 1 150px; min-width: 0; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.term-badge { flex: none; font: 700 .66rem var(--font); letter-spacing: .07em; text-transform: uppercase; border-radius: 999px; padding: 3px 9px; background: #2b3659; color: #dfe6f7; white-space: nowrap; }
.terminal.is-captured .term-badge { background: #62e0a9; color: #06251a; }
.terminal.is-illustrative .term-badge { background: #3b4668; color: #e3e9fa; }
.terminal.is-commands .term-badge { background: #26305a; color: #c9d3ee; }
.term-bar .copy { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.16); color: #e3e9fa; }
.term-bar .copy:hover { background: rgba(255,255,255,.12); }
.term-scroll {
  overflow-x: auto; background-color: var(--term-bg);
  background-image: linear-gradient(90deg, var(--term-bg) 40%, transparent), linear-gradient(270deg, var(--term-bg) 40%, transparent),
    linear-gradient(90deg, rgba(126,166,255,.22), transparent), linear-gradient(270deg, rgba(126,166,255,.22), transparent);
}
.term-body { margin: 0; padding: var(--sp-2) 18px; color: var(--term-ink); font: .82rem/1.6 var(--mono); white-space: pre; width: max-content; min-width: 100%; background: transparent; }
.term-body:focus-visible { outline-offset: -3px; }
.t-prompt { color: var(--term-prompt); font-weight: 600; }
.t-cmd { color: #fff; font-weight: 600; }
.t-note { color: var(--term-dim); font-style: italic; }
.terminal figcaption { margin: 0 !important; padding: 9px 16px; font-size: .82rem; color: #9aa6c6; background: #0b1124; border-top: 1px solid #172042; }
.terminal.is-captured figcaption { color: #a8ecca; }

/* ------------------------------------------------------------------ tables */
.table-wrap {
  overflow-x: auto; margin: var(--block) 0; border: 1px solid var(--line); border-radius: var(--radius-md); -webkit-overflow-scrolling: touch;
  background-color: var(--surface);
  background-image: linear-gradient(90deg, var(--surface) 40%, transparent), linear-gradient(270deg, var(--surface) 40%, transparent),
    linear-gradient(90deg, rgba(11,19,48,.12), transparent), linear-gradient(270deg, rgba(11,19,48,.12), transparent);
}
table { width: 100%; border-collapse: collapse; font-size: .92rem; line-height: 1.5; font-variant-numeric: tabular-nums; }
th, td { text-align: left; vertical-align: top; padding: 10px 14px; border-bottom: 1px solid var(--line); }
thead th { background: var(--surface-2); font-size: .76rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
tbody tr:last-child > * { border-bottom: 0; }
tbody tr:hover > td, tbody tr:hover > th { background: color-mix(in srgb, var(--surface-3) 60%, transparent); }
.zebra tbody tr:nth-child(even) > * { background: color-mix(in srgb, var(--surface-2) 80%, var(--surface-3)); }
.zebra tbody tr:hover > * { background: var(--surface-3); }
td code, th code { white-space: nowrap; }

/* pills */
.pill { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 999px; font-size: .76rem; font-weight: 650; white-space: nowrap; background: var(--pending-soft); color: var(--pending); text-transform: none; letter-spacing: 0; }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill-built, .pill-pass { background: var(--ok-soft); color: var(--ok); }
.pill-partial { background: var(--warn-soft); color: var(--warn); }
.pill-planned { background: var(--planned-soft); color: var(--planned); }
.pill-avoid, .pill-fail { background: var(--bad-soft); color: var(--bad); }
.pill-spare { background: var(--surface-3); color: var(--faint); }

/* ------------------------------------------------------------------ tabs */
.tabs { margin: var(--block) 0; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); overflow: hidden; }
.tab-list { display: flex; gap: 2px; padding: 6px 6px 0; background: var(--surface-2); border-bottom: 1px solid var(--line); overflow-x: auto; }
.tab { border: 0; background: none; padding: 9px 16px 10px; border-radius: 8px 8px 0 0; font-weight: 600; font-size: .9rem; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; white-space: nowrap; }
.tab:hover { color: var(--ink); }
.tab[aria-selected="true"] { color: var(--ink); background: var(--surface); border-bottom-color: var(--accent); }
.tab-pane { padding: 4px 20px 8px; }
.tab-pane > :is(.code, .terminal):first-child { margin-top: var(--sp-2); }
.tab-pane > :is(.code, .terminal):last-child { margin-bottom: var(--sp-2); }

/* ------------------------------------------------------------------ screenshots */
.shot { margin: var(--block-lg) 0; border: 1px solid var(--line); border-radius: var(--radius-md); overflow: hidden; background: var(--surface); box-shadow: var(--shadow); }
.shot-chrome { display: flex; align-items: center; gap: 12px; padding: 9px 12px; background: var(--surface-2); border-bottom: 1px solid var(--line); }
.shot-url { flex: 1; min-width: 0; font-size: .78rem; color: var(--muted); background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 3px 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.shot-img { display: block; }
.shot-img img { display: block; width: 100%; height: auto; border: 0; border-radius: 0; cursor: zoom-in; }
.shot-ph { display: grid; place-items: center; gap: 6px; text-align: center; padding: 48px 20px; min-height: 240px; color: var(--muted);
  background: repeating-linear-gradient(135deg, var(--surface-2) 0 14px, var(--surface) 14px 28px); }
.shot-ph .ic { color: var(--faint); }
.shot-label { font-weight: 700; color: var(--ink); }
.shot-ph code { font-size: .82rem; }
.shot-path { font-size: .84rem; }
.shot figcaption { margin: 0 !important; padding: 10px 16px; border-top: 1px solid var(--line); font-size: .88rem; color: var(--muted); }

/* ------------------------------------------------------------------ cards */
.cards { display: grid; gap: 20px; margin: var(--block) 0; }
.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.card { position: relative; display: flex; flex-direction: column; padding: var(--sp-3) var(--sp-3) 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--text); text-decoration: none; transition: border-color .15s, transform .15s, box-shadow .15s; }
.card h3 { margin: 14px 0 6px; font-size: 1.12rem; }
.card p { margin: 0 0 .6rem; font-size: .95rem; color: var(--muted); }
.card-link:hover { text-decoration: none; border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.card-ic { width: 40px; height: 40px; padding: 9px; border-radius: 12px; background: var(--accent-soft); color: var(--accent-ink); }
.card-eyebrow { margin-top: 10px; font-size: .74rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }
.card-more { margin-top: auto; padding-top: 8px; display: inline-flex; align-items: center; gap: 6px; font-weight: 650; color: var(--accent-ink); font-size: .92rem; }
.card-compact { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 0 14px; padding: var(--sp-2) 18px; }
.card-compact h3 { margin: 0; flex: 1; }
.card-compact p { flex-basis: 100%; margin: 8px 0 0; }
.explore-grid { margin-bottom: 20px; }
.explore-feature { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: var(--sp-4); align-items: center; padding: var(--sp-4); margin: 0 0 var(--block);
  background: linear-gradient(120deg, var(--surface) 30%, color-mix(in srgb, var(--oci-soft) 60%, var(--surface))); }
.explore-feature h3 { font-size: 1.45rem; margin-top: 16px; }
.explore-feature p { font-size: 1.02rem; max-width: 46ch; }
.ef-copy { display: flex; flex-direction: column; align-items: flex-start; }
.ef-art { border-radius: var(--radius-md); overflow: hidden; border: 1px solid var(--line); background: var(--surface); }
.ef-art svg { display: block; width: 100%; height: auto; }

/* ------------------------------------------------------------------ modules (learning paths) */
/* Card internals sit on a subgrid, so the description, progress, lesson list and button line up across a row. */
.paths { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.paths-live { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.paths-live > .path-card { grid-column: span 2; }
.paths-live > .path-card:nth-child(-n+2) { grid-column: span 3; }
.paths-preview { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.path-card {
  position: relative; display: grid; grid-row: span 6; grid-template-rows: subgrid; row-gap: 0; align-content: start;
  padding: var(--sp-3); border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); transition: box-shadow .15s, border-color .15s, transform .15s;
}
@supports not (grid-template-rows: subgrid) { .path-card { display: flex; flex-direction: column; } .path-foot { margin-top: auto; } }
.path-card:hover { box-shadow: var(--shadow-lg); border-color: var(--line-strong); }
.path-card h3 { margin: 16px 0 8px; font-size: 1.28rem; }
.path-card h3 a { color: var(--ink); text-decoration: none; }
.path-card h3 a::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius); }
.path-card .btn, .path-card .path-lessons a { position: relative; z-index: 1; }
.path-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.path-ic { width: 46px; height: 46px; padding: 11px; border-radius: 14px; background: var(--ink); color: var(--bg); }
.paths-live > .path-card:nth-child(2) .path-ic { background: var(--oci); color: #fff; }
.paths-live > .path-card:nth-child(3) .path-ic { background: var(--accent-strong); color: #fff; }
.paths-live > .path-card:nth-child(4) .path-ic { background: var(--site3); color: #fff; }
.paths-live > .path-card:nth-child(5) .path-ic { background: var(--tunnel); color: #fff; }
:root[data-theme="dark"] .paths-live .path-ic { color: #0a0f1f !important; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .paths-live .path-ic { color: #0a0f1f !important; } }
.path-level { font-size: .74rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); background: var(--surface-3); border-radius: 999px; padding: 4px 10px; }
.path-desc p { margin: 0 0 var(--sp-2); color: var(--muted); font-size: .96rem; }
.path-status { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px dashed var(--line); }
.path-status p { margin: 0; }
.path-progress { font-size: .9rem; font-weight: 650; color: var(--ink); }
.path-meta { font-size: .84rem; color: var(--faint); }
.path-lessons { list-style: none; margin: 0 0 var(--sp-2); padding: 10px 0 0; border-top: 1px dashed var(--line); font-size: .9rem; }
.path-lessons a { display: flex; gap: 8px; align-items: flex-start; padding: 4px 0; color: var(--text); text-decoration: none; line-height: 1.4; }
.path-lessons a:hover { color: var(--accent-ink); }
.path-lessons .more-lessons a { color: var(--accent-ink); font-weight: 650; gap: 6px; align-items: center; }
.path-foot { align-self: end; padding-top: 4px; }
.path-card.is-started .path-go { background: var(--accent-strong); color: var(--on-accent-strong); }
.path-card.is-soon { background: repeating-linear-gradient(135deg, var(--surface) 0 16px, var(--surface-2) 16px 32px); border-style: dashed; box-shadow: none; }
.path-card.is-soon .path-ic { background: var(--surface-3); color: var(--muted); }
.soon-note { margin: 0; }
.paths-compact .path-card { padding: 20px; }
.path-card.is-preview { border: 1.5px dashed color-mix(in srgb, var(--planned) 55%, var(--line)); background: linear-gradient(180deg, color-mix(in srgb, var(--planned-soft) 55%, var(--surface)), var(--surface) 42%); box-shadow: none; }
.path-card.is-preview .path-ic { background: var(--planned); color: #fff; }
:root[data-theme="dark"] .path-card.is-preview .path-ic { color: #0a0f1f; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .path-card.is-preview .path-ic { color: #0a0f1f; } }
.path-card.is-preview .path-level { background: var(--planned-soft); color: var(--planned); }
.path-card.is-preview .ring-fill { stroke: var(--planned); }
.preview-note { display: flex; gap: 6px; align-items: flex-start; margin: 0 0 10px !important; font-size: .84rem !important; font-weight: 650; color: var(--planned) !important; }
.preview-note .ic { margin-top: 2px; }
.preview-banner { display: flex; gap: 10px; align-items: flex-start; margin: var(--sp-2) 0 0; padding: 12px 16px; border-radius: var(--radius-md); background: var(--planned-soft); border: 1px dashed color-mix(in srgb, var(--planned) 55%, transparent); color: var(--text); font-size: .95rem; max-width: 760px; }
.preview-banner .ic { color: var(--planned); margin-top: 2px; }
.prose .preview-banner { margin: 0 0 var(--sp-3); }

/* lesson list on module pages */
.lesson-list { list-style: none; padding: 0; margin: var(--sp-2) 0 var(--sp-4); display: grid; gap: 10px; }
.prose > .lesson-list { max-width: none; }
.lesson-group { margin: 18px 0 2px; font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }
.lesson-row a { display: grid; grid-template-columns: 40px 1fr auto 20px; gap: var(--sp-2); align-items: center; padding: var(--sp-2) 18px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); text-decoration: none; color: var(--text); transition: border-color .15s, box-shadow .15s; }
.lesson-row a:hover { border-color: var(--line-strong); box-shadow: var(--shadow); }
.lr-num { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--surface-3); color: var(--ink); font-weight: 750; font-variant-numeric: tabular-nums; }
.lr-body strong { display: block; color: var(--ink); font-size: 1.04rem; }
.lr-body span { font-size: .9rem; color: var(--muted); }
.lr-meta { font-size: .84rem; color: var(--faint); white-space: nowrap; display: inline-flex; align-items: center; gap: 4px; }
.lesson-row.is-complete .lr-num { background: var(--ok-soft); color: var(--ok); }

/* objectives, key terms, completion */
.objectives { margin: 0 0 var(--sp-4); padding: 18px 22px; border-radius: var(--radius-md); background: var(--surface-2); border: 1px solid var(--line); }
.prose .objectives-h { display: flex; align-items: center; gap: 8px; font-size: .82rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-ink); margin: 0 0 8px; padding: 0; }
.objectives ul { margin: 0; padding-left: 1.2rem; }
.key-terms { margin-top: var(--sp-6); }
.key-terms dl { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; margin: 0; }
.key-terms dl > div { border: 1px solid var(--line); border-radius: var(--radius-md); padding: 12px 14px; background: var(--surface); }
.key-terms dt { margin: 0 0 4px; }
.key-terms dd { margin: 0; font-size: .92rem; }
.kt-eq { display: block; margin-top: 6px; font-size: .8rem; color: var(--faint); }
.complete-bar { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin: var(--sp-6) 0 var(--sp-2); padding: 20px 22px; border-radius: var(--radius); border: 1px solid var(--line); background: linear-gradient(135deg, var(--surface-2), var(--surface)); }
.complete-title { margin: 0 !important; font-weight: 700; color: var(--ink); }
.complete-sub { margin: 2px 0 0 !important; color: var(--muted); font-size: .9rem; }

/* pager */
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: var(--sp-6); }
.pager a { display: flex; flex-direction: column; padding: 14px 18px; border: 1px solid var(--line); border-radius: var(--radius-md); text-decoration: none; background: var(--surface); transition: border-color .15s; }
.pager a:hover { border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }
.pager span { font-size: .8rem; color: var(--muted); }
.pager strong { color: var(--ink); }
.pager-next { text-align: right; grid-column: 2; }

/* ------------------------------------------------------------------ quiz */
.quiz { margin: var(--sp-2) 0 var(--sp-4); display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; }
.quiz-intro { margin: 0; color: var(--muted); }
.q { margin: 0; padding: 20px 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-sm); min-width: 0; transition: border-color .25s, box-shadow .25s; }
.q.is-right { border-color: color-mix(in srgb, var(--ok) 55%, var(--line)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 12%, transparent); }
.q.is-wrong { border-color: color-mix(in srgb, var(--bad) 45%, var(--line)); }
.q-head { display: flex; gap: 10px; align-items: center; margin-bottom: 8px; flex-wrap: wrap; }
.q-num { font-weight: 750; color: var(--ink); }
.q-kind, .q-diff { font-size: .74rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); background: var(--surface-3); border-radius: 999px; padding: 2px 9px; }
.q-diff-stretch { background: var(--planned-soft); color: var(--planned); }
.q-diff-intro { background: var(--ok-soft); color: var(--ok); }
.q-text { display: block; width: 100%; padding: 0; color: var(--ink); font-size: 1.04rem; font-weight: 550; margin-bottom: 12px; }
.q-prompt { display: block; }
.q > legend.q-text { float: left; width: 100%; }
.q > legend.q-text ~ * { clear: both; }
.q-text .q-head { font-size: .95rem; font-weight: 400; }
.opts { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.opt label { display: flex; gap: 12px; align-items: flex-start; padding: 11px 14px; border: 1px solid var(--line); border-radius: var(--radius-md); cursor: pointer; transition: border-color .2s, background-color .2s; }
.opt label:hover { border-color: var(--line-strong); background: var(--surface-2); }
.opt input { margin-top: 4px; accent-color: var(--accent-strong); width: 17px; height: 17px; flex: none; }
.opt input:checked + span { color: var(--ink); font-weight: 600; }
.opt.is-right label { border-color: var(--ok); background: var(--ok-soft); }
.opt.is-wrong label { border-color: var(--bad); background: var(--bad-soft); }
.opt.is-missed label { border-color: var(--ok); border-style: dashed; }
.why { margin: 6px 4px 4px 40px; font-size: .92rem; color: var(--text); animation: rise .25s ease; }
.why strong { color: var(--ink); }
.q-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 14px; }
.q-result { font-weight: 650; }
.q-result.ok { color: var(--ok); }
.q-result.no { color: var(--bad); }
.q-explain { margin-top: 12px; padding: 12px 16px; border-radius: var(--radius-md); background: var(--surface-2); border-left: 3px solid var(--accent); font-size: .95rem; animation: rise .25s ease; }
.q-explain > :last-child { margin-bottom: 0; }
.q-revisit { display: flex; gap: 6px; align-items: baseline; margin: 10px 0 0 !important; padding-top: 10px; border-top: 1px dashed var(--line); font-size: .92rem; font-weight: 600; color: var(--ink); }
.q-revisit::before { content: "↺"; color: var(--accent-ink); font-weight: 700; }
.order-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; counter-reset: ord; }
.ord { display: flex; gap: 12px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); counter-increment: ord; transition: border-color .2s, background-color .2s; }
.ord::before { content: counter(ord); width: 26px; height: 26px; flex: none; border-radius: 8px; display: grid; place-items: center; background: var(--surface-3); color: var(--ink); font-weight: 700; font-size: .85rem; }
.ord-text { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.ord-btns { display: flex; gap: 4px; }
.ord-btns button { width: 32px; height: 32px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); cursor: pointer; font-size: 1rem; }
.ord-btns button:hover:not([disabled]) { border-color: var(--line-strong); background: var(--surface-3); }
.ord-btns button[disabled] { opacity: .35; cursor: default; }
.ord.is-right { border-color: var(--ok); background: var(--ok-soft); }
.ord.is-wrong { border-color: var(--bad); background: var(--bad-soft); }
.ord.moved { animation: flash .5s ease; }
@keyframes flash { from { background: var(--accent-soft); } to { background: var(--surface); } }
.match { display: grid; gap: 10px; }
.match-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 12px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-md); transition: border-color .2s, background-color .2s; }
.match-row.is-right { border-color: var(--ok); background: var(--ok-soft); }
.match-row.is-wrong { border-color: var(--bad); background: var(--bad-soft); }
.match-left { font-weight: 600; color: var(--ink); }
.match-fix { grid-column: 1 / -1; font-size: .86rem; color: var(--ok); font-weight: 600; }
/* form controls: selects get a drawn chevron so they match the rest of the quiz and widget controls */
.match select, .field select, .field input, .w-select, .w-input {
  width: 100%; font: inherit; font-size: .92rem; color: var(--ink); background-color: var(--surface); border: 1px solid var(--line-strong); border-radius: 10px; padding: 9px 12px; min-height: 40px;
  transition: border-color .15s, box-shadow .15s;
}
.match select, .field select, select.w-select {
  appearance: none; -webkit-appearance: none; padding-right: 36px; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 19px) 52%, calc(100% - 14px) 52%; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat;
}
.match select:hover, .field select:hover, .w-select:hover, .field input:hover, .w-input:hover { border-color: var(--muted); }
.match select:focus-visible, .field select:focus-visible, .field input:focus-visible, .w-select:focus-visible, .w-input:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; border-color: var(--focus); }
.match select:disabled { opacity: .85; cursor: default; }
.quiz-review { padding: var(--sp-2) 20px; border-radius: var(--radius); border: 1px solid color-mix(in srgb, var(--warn) 40%, var(--line)); background: var(--warn-soft); animation: rise .3s ease; }
.qr-h { margin: 0 0 6px; font-weight: 750; color: var(--ink); }
.quiz-review ol { margin: 0; padding-left: 1.3rem; display: grid; gap: 2px; }
.quiz-review li { font-size: .94rem; }
.quiz-review li.ok { color: var(--ok); }
.quiz-review li.no a { font-weight: 650; }
.quiz-done { display: flex; gap: 14px; align-items: center; padding: var(--sp-2) 20px; border-radius: var(--radius); background: var(--ok-soft); color: var(--ok); border: 1px solid color-mix(in srgb, var(--ok) 40%, transparent); }
.quiz-done strong { color: var(--ink); }
.qd-tick .ic { width: 36px; height: 36px; display: block; }
.quiz-done.is-new { animation: pop .45s cubic-bezier(.2, .9, .3, 1.2); }
.quiz-done.is-new .qd-tick path { stroke-dasharray: 16; stroke-dashoffset: 16; animation: draw .45s .2s ease forwards; }
@keyframes pop { from { transform: scale(.96); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes draw { to { stroke-dashoffset: 0; } }
.quiz-score { font-size: .9rem; color: var(--muted); }
details.practice { margin-top: 8px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-2); }
details.practice > summary { cursor: pointer; list-style: none; display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 10px; row-gap: 2px; padding: var(--sp-2) 20px; }
details.practice > summary::-webkit-details-marker { display: none; }
details.practice > summary::before { content: "▸"; grid-row: 1 / span 2; color: var(--faint); line-height: 1.5; }
details.practice > summary > * { grid-column: 2; }
details.practice[open] > summary::before { content: "▾"; }
.practice-title { font-weight: 750; color: var(--ink); }
.practice-sub { font-size: .88rem; color: var(--muted); }
.practice-body { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--sp-2); padding: 4px var(--sp-2) var(--sp-2); }
.practice-tally { margin: 0; font-size: .9rem; color: var(--muted); }

/* ------------------------------------------------------------------ scenarios */
.scenarios { display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px; margin: var(--block) 0; }
.scenario { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow: hidden; box-shadow: var(--shadow-sm); transition: border-color .2s; scroll-margin-top: calc(var(--header-h) + 16px); }
.scenario.is-solved { border-color: color-mix(in srgb, var(--ok) 50%, var(--line)); }
.scenario header { padding: 20px var(--sp-3) 0; }
.scenario h3 { margin: 10px 0 0; font-size: 1.25rem; }
.scenario.is-solved h3::after { content: " ✓"; color: var(--ok); }
.scn-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; }
.scn-module, .scn-level { display: inline-flex; align-items: center; font-size: .72rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; border-radius: 999px; padding: 3px 10px; }
.scn-module { background: var(--surface-3); color: var(--muted); }
.scn-level { background: var(--accent-soft); color: var(--accent-ink); }
.scn-level-beginner, .scn-level-intro, .scn-level-core { background: var(--ok-soft); color: var(--ok); }
.scn-level-intermediate { background: var(--info-soft); color: var(--info); }
.scn-level-advanced, .scn-level-stretch { background: var(--planned-soft); color: var(--planned); }
.scn-level-troubleshooting { background: var(--warn-soft); color: var(--warn); }
.scn-level-design, .scn-level-addressing { background: var(--oci-soft); color: var(--oci-ink); }
.scn-level-preview { background: transparent; color: var(--planned); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--planned) 55%, transparent); }
.scn-body { padding: 10px var(--sp-3) 0; }
.scn-body > :last-child { margin-bottom: 0; }
.hints { display: grid; gap: 10px; padding: 14px var(--sp-3) 0; }
.hint, .scn-answer { padding: 14px 16px; border-radius: var(--radius-md); background: var(--surface-2); border: 1px solid var(--line); animation: rise .25s ease; }
.hint > :last-child, .scn-answer > :last-child { margin-bottom: 0; }
.scn-answer { margin: 14px var(--sp-3) 0; background: var(--ok-soft); border-color: color-mix(in srgb, var(--ok) 35%, transparent); }
.hint-n { display: block; font-size: .74rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.scn-answer .hint-n { color: var(--ok); }
.scn-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 18px var(--sp-3) 22px; }
.scn-solved[aria-pressed="true"] { background: var(--ok-soft); color: var(--ok); border-color: color-mix(in srgb, var(--ok) 55%, transparent); }
.scn-state { font-size: .88rem; color: var(--muted); }
.chip-n { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; font: 700 .72rem var(--mono); background: var(--surface-3); color: var(--muted); }
.chip[aria-pressed="true"] .chip-n { background: color-mix(in srgb, var(--bg) 22%, transparent); color: inherit; }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* tasks */
.tasks { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; margin: var(--block) 0; }
.task { border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; background: var(--surface); }
.task h3 { margin: 0 0 8px; }
.task-goal { color: var(--muted); }
.task-steps { margin: 10px 0 14px; }
.task-foot { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.task-good, .task-trap { display: flex; gap: 10px; padding: 12px 14px; border-radius: var(--radius-md); font-size: .92rem; }
.task-good { background: var(--ok-soft); } .task-good > .ic { color: var(--ok); }
.task-trap { background: var(--warn-soft); } .task-trap > .ic { color: var(--warn); }
.task-foot p { margin: .2rem 0 0; }

/* ------------------------------------------------------------------ filter bars, data tables, glossary */
.filterbar { display: grid; gap: 12px; margin: var(--sp-2) 0 10px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--surface); font-size: .86rem; font-weight: 600; cursor: pointer; color: var(--text); transition: background .15s, color .15s, border-color .15s; }
.chip:hover { border-color: var(--muted); }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.filter-fields { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.field { display: grid; gap: 4px; font-size: .78rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); min-width: 150px; }
.field > select, .field > input { text-transform: none; letter-spacing: 0; font-weight: 400; }
.field-grow { flex: 1; min-width: 200px; }
.filter-count { margin: 0; font-size: .86rem; color: var(--muted); }
.band-dot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 8px; vertical-align: 0; background: var(--common); }
.band-s1 { background: var(--site1); } .band-s2 { background: var(--site2); } .band-s3 { background: var(--site3); }
.band-oci { background: var(--oci); } .band-tunnel { background: var(--tunnel); } .band-underlay { background: var(--faint); } .band-common { background: var(--common); }
.data-table td:nth-child(5) { min-width: 260px; }
.addr-table tr.is-hl > td { background: var(--accent-soft); }
.addr-table td:first-child, .addr-table td:nth-child(2) { white-space: nowrap; }
.addr-table td code { white-space: normal; }   /* ranges like "1.0/24 – 3.0/24, 6.0/24 – 9.0/24" wrap at their spaces */
.test-table .t-exp { display: inline-flex; align-items: center; gap: 8px; border: 0; background: none; padding: 0; cursor: pointer; font-weight: 750; color: var(--ink); }
.test-table .t-exp::before { content: "▸"; color: var(--faint); transition: transform .15s; display: inline-block; }
.test-table .t-exp[aria-expanded="true"]::before { transform: rotate(90deg); }
.t-id { font-family: var(--mono); }
.t-det > td { background: var(--surface-2); }
.t-dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 28px; margin: 4px 0; }
.t-dl dt { font-size: .74rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.t-dl dd { margin: 2px 0 0; }
.t-row:target .t-sum > * { background: var(--accent-soft); }
.tsum-row { display: flex; flex-wrap: wrap; gap: 12px; margin: var(--sp-2) 0; }
.tsum { display: flex; align-items: baseline; gap: 8px; padding: 12px 18px; border-radius: var(--radius-md); border: 1px solid var(--line); background: var(--surface); cursor: pointer; }
.tsum strong { font-size: 1.6rem; letter-spacing: -0.03em; color: var(--ink); font-variant-numeric: tabular-nums; }
.tsum span { font-size: .86rem; color: var(--muted); font-weight: 600; }
.tsum[aria-pressed="true"] { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.tsum-pass strong { color: var(--ok); } .tsum-partial strong { color: var(--warn); } .tsum-planned strong { color: var(--planned); } .tsum-pending strong { color: var(--muted); }
.glossary th[scope="row"] { color: var(--ink); white-space: nowrap; }
.glossary tr { scroll-margin-top: 48px; }   /* on top of the page scroll-padding: clears the sticky A-Z bar */
.az-bar { position: sticky; top: var(--header-h); z-index: 6; display: flex; flex-wrap: wrap; gap: 4px; margin: 0 0 var(--sp-2); padding: 10px 0; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.az-bar a, .az-bar span { display: inline-grid; place-items: center; min-width: 30px; height: 30px; padding: 0 4px; border-radius: 8px; font-weight: 700; font-size: .85rem; }
.az-bar a { color: var(--ink); background: var(--surface-2); border: 1px solid var(--line); text-decoration: none; }
.az-bar a:hover { border-color: var(--accent); color: var(--accent-ink); }
.az-bar span { color: var(--faint); opacity: .5; }

/* status + phases */
.status-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--sp-2); }
.status-card { display: flex; gap: 14px; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.status-card p { margin: 0; font-size: .93rem; color: var(--muted); }
.status-card .sc-h { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-weight: 700; color: var(--ink); font-size: 1.02rem; margin-bottom: 6px; }
.status-card.is-pending { border-style: dashed; }
.status-card.is-pending .card-ic { background: var(--pending-soft); color: var(--pending); }
.status-card.is-built .card-ic { background: var(--ok-soft); color: var(--ok); }
.tests-card { margin-top: 18px; padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.tests-card .sc-h { font-weight: 700; color: var(--ink); margin: 0 0 12px; }
.test-bar { display: flex; height: 14px; border-radius: 999px; overflow: hidden; gap: 3px; background: var(--surface-3); }
.test-bar span, .test-legend i { display: block; }
.tb-pass { background: var(--ok); } .tb-partial { background: var(--warn); } .tb-pending { background: var(--line-strong); }
.test-legend { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 24px; padding: 0; margin: 14px 0 16px; font-size: .92rem; color: var(--muted); }
.test-legend li { display: flex; gap: 8px; align-items: center; }
.test-legend i { width: 12px; height: 12px; border-radius: 4px; }
.test-legend strong { color: var(--ink); }
.phases { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin: var(--block) 0; }
.phase-card { position: relative; padding: 26px var(--sp-3) 22px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); overflow: hidden; }
.phase-card::before { content: ""; position: absolute; inset: 0 0 auto; height: 4px; background: var(--accent); }
.phase-card.is-planned::before { background: repeating-linear-gradient(90deg, var(--planned) 0 10px, transparent 10px 16px); }
.phase-num { position: absolute; right: 18px; top: 8px; font-size: 4.2rem; font-weight: 800; letter-spacing: -0.06em; color: var(--surface-3); line-height: 1; }
.phase-when { margin: 0; font-size: .76rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-ink); position: relative; }
.phase-card.is-planned .phase-when { color: var(--planned); }
.phase-card h3 { margin: 8px 0 8px; position: relative; }
.phase-card p { margin: 0 0 10px; font-size: .95rem; color: var(--muted); position: relative; }
.phase-foot { font-weight: 650; color: var(--ink) !important; }

/* reference grid on home */
.ref-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px 36px; }
.ref-h { display: flex; gap: 8px; align-items: center; margin: 0 0 8px; font-weight: 700; color: var(--ink); }
.ref-col ul { list-style: none; margin: 0; padding: 0; }
.ref-col a { display: block; padding: 4px 0; color: var(--text); text-decoration: none; }
.ref-col a:hover { color: var(--accent-ink); text-decoration: underline; }

/* details, steps, deep dives */
details.more { margin: var(--block) 0; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); }
details.more > summary { cursor: pointer; padding: 12px 16px; font-weight: 650; color: var(--ink); }
details.more[open] > summary { border-bottom: 1px solid var(--line); }
.more-body { padding: 4px var(--sp-2) 8px; }
.steps ol { counter-reset: step; list-style: none; padding-left: 0; }
.steps ol > li { counter-increment: step; position: relative; padding-left: 44px; margin: 0 0 var(--sp-2); }
.steps ol > li::before { content: counter(step); position: absolute; left: 0; top: -1px; width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; background: var(--ink); color: var(--bg); font-weight: 700; font-size: .88rem; }
.deep-dive { margin: 10px 0 var(--sp-4); padding: 18px 22px 8px; border-radius: var(--radius); border: 1px solid color-mix(in srgb, var(--oci) 30%, var(--line)); background: linear-gradient(180deg, color-mix(in srgb, var(--oci-soft) 60%, var(--surface)), var(--surface) 70%); }
.prose .deep-dive-label { display: inline-flex; align-items: center; gap: 6px; margin: 0 0 10px; font-size: .74rem; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; color: var(--oci-ink); }
.deep-dive > :last-child { margin-bottom: 12px; }

/* ------------------------------------------------------------------ diagrams (.dg), zoom button, lightbox */
figure.diagram { position: relative; margin: var(--block-lg) 0; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow-x: auto; }
figure.diagram > svg { display: block; width: 100%; height: auto; min-width: 580px; }
figure.diagram figcaption { margin-top: 10px; padding-right: 110px; }
.dg { font-family: var(--font); }
.dg-frame { fill: var(--surface-2); stroke: var(--line-strong); stroke-width: 1.5; }
.dg-frame-oci { fill: color-mix(in srgb, var(--oci-soft) 55%, var(--surface)); stroke: color-mix(in srgb, var(--oci) 55%, transparent); stroke-width: 1.5; }
.dg-frame-site { fill: color-mix(in srgb, var(--site1-soft) 55%, var(--surface)); stroke: color-mix(in srgb, var(--site1) 55%, transparent); stroke-width: 1.5; }
.dg-node { fill: var(--surface); stroke: var(--line-strong); stroke-width: 1.5; filter: drop-shadow(0 1px 1.5px rgba(11,19,48,.08)); }
.dg-node-accent { fill: var(--accent-soft); stroke: var(--accent); stroke-width: 1.8; }
.dg-node-muted { fill: var(--surface-3); stroke: var(--line); stroke-width: 1.2; }
.dg-planned { stroke-dasharray: 6 4; stroke: var(--planned); fill: color-mix(in srgb, var(--planned-soft) 60%, var(--surface)); }
.dg-line { fill: none; stroke: var(--muted); stroke-width: 1.6; }
.dg-line-accent { fill: none; stroke: var(--accent); stroke-width: 2.6; }
.dg-line-dashed { fill: none; stroke: var(--muted); stroke-width: 1.5; stroke-dasharray: 5 4; }
.dg-arrowhead { fill: var(--muted); stroke: none; }
.dg-t { fill: var(--ink); font-size: 14px; font-family: var(--font); }
.dg-t-s { fill: var(--muted); font-size: 12.5px; font-family: var(--font); }
.dg-t-b { font-weight: 700; }
.dg-t-mono { font-family: var(--mono); font-size: 12.5px; fill: var(--muted); }
.dg-t-accent { fill: var(--accent-ink); }
.zoomable { position: relative; }
.zoom-btn { position: absolute; top: 10px; right: 10px; z-index: 2; display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px; border: 1px solid var(--line-strong); background: color-mix(in srgb, var(--surface) 92%, transparent); color: var(--ink); font-size: .8rem; font-weight: 650; cursor: pointer; box-shadow: var(--shadow-sm); backdrop-filter: blur(6px); opacity: .92; transition: opacity .15s, border-color .15s; }
.zoom-btn:hover { opacity: 1; border-color: var(--accent); }
.zoom-btn svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
figure.diagram > .zoom-btn { top: auto; bottom: 10px; }                 /* in the caption row, clear of the drawing */
figure.diagram.zoomable:not(:has(figcaption)) { padding-bottom: 52px; }
.shot-img.zoomable > .zoom-btn { top: 12px; right: 12px; }
.prose figure.zoomable:not(.diagram):has(> figcaption) > .zoom-btn { top: auto; bottom: -6px; right: 0; }   /* beside the caption */
.prose figure.zoomable:not(.diagram) > figcaption { padding-right: 112px; }
.prose figure > a > img { cursor: zoom-in; }
.lightbox { position: fixed; inset: 0; z-index: 95; display: grid; place-items: center; padding: var(--sp-3); background: rgba(8, 12, 28, .72); backdrop-filter: blur(3px); animation: fade .15s ease; }
.lb-panel { display: flex; flex-direction: column; width: min(1440px, 100%); max-height: calc(100vh - 48px); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-lg); overflow: hidden; }
.lb-bar { display: flex; align-items: center; gap: 12px; padding: 10px 12px 10px 18px; border-bottom: 1px solid var(--line); }
.lb-cap { flex: 1; margin: 0; font-size: .92rem; color: var(--muted); min-width: 0; }
.lb-zoom[hidden] { display: none; }
.lb-zoom, .lb-close { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line-strong); background: var(--surface-2); color: var(--ink); border-radius: 999px; padding: 5px 12px; font-weight: 650; font-size: .86rem; cursor: pointer; }
.lb-body { overflow: auto; padding: var(--sp-2); background: var(--bg-soft); }
.lb-body > svg.lb-media { display: block; width: 100%; min-width: 880px; height: auto; background: var(--surface); border-radius: var(--radius-md); padding: 12px; }
.lb-body > img.lb-media { display: block; max-width: none; width: auto; height: auto; border-radius: var(--radius-md); cursor: zoom-out; }
.lb-body > img.lb-media.is-fit { width: 100%; min-width: 880px; cursor: zoom-in; }
.lb-body > .oc { margin: 0 auto; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* ------------------------------------------------------------------ widgets: shared */
.widget, .topology, .console-tour { margin: var(--block-lg) 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); overflow: clip; }
.widget { container: widget / inline-size; }
.w-head { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; justify-content: space-between; padding: var(--sp-2) 20px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.w-head > div:first-child { min-width: 0; }
.w-title { margin: 0; font-size: 1.05rem; font-weight: 750; color: var(--ink); display: flex; align-items: center; gap: 8px; }
.w-title .ic { color: var(--accent-ink); }
.w-sub { margin: 2px 0 0; font-size: .88rem; color: var(--muted); }
.w-body { padding: 18px 20px 20px; }
.w-controls { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.seg { display: inline-flex; padding: 3px; border-radius: 999px; background: var(--surface-3); border: 1px solid var(--line); gap: 2px; max-width: 100%; }
.seg button { border: 0; background: none; padding: 6px 12px; border-radius: 999px; font-size: .86rem; font-weight: 600; color: var(--muted); cursor: pointer; white-space: nowrap; }
.seg button:hover { color: var(--ink); }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }
/* B6: on narrow widgets the scenario selector becomes full-width stacked buttons */
@container widget (max-width: 560px) {
  .w-head .w-controls { width: 100%; }
  .w-head .seg { display: grid; grid-template-columns: minmax(0, 1fr); width: 100%; border-radius: var(--radius-md); padding: 4px; }
  .w-head .seg button { border-radius: 9px; text-align: left; padding: 9px 12px; white-space: normal; }
}
.toggle { display: inline-flex; align-items: center; gap: 8px; font-size: .9rem; font-weight: 600; color: var(--text); cursor: pointer; user-select: none; }
.toggle.is-static { cursor: default; }
.toggle input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.toggle .sw { width: 38px; height: 22px; border-radius: 999px; background: var(--line-strong); position: relative; transition: background .15s; flex: none; }
.toggle .sw::after { content: ""; position: absolute; left: 3px; top: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 2px rgba(0,0,0,.3); }
.toggle input:checked + .sw, .toggle .sw.is-on { background: var(--accent-strong); }
.toggle input:checked + .sw::after, .toggle .sw.is-on::after { transform: translateX(16px); }
.toggle .sw.is-on { background: var(--ok); }
.toggle input:focus-visible + .sw { outline: 3px solid var(--focus); outline-offset: 2px; }
.toggle.t-bad input:checked + .sw { background: var(--bad); }
.toggle.t-ok input:checked + .sw { background: var(--ok); }
.w-note { font-size: .88rem; color: var(--muted); margin: 12px 0 0; max-width: var(--measure); }
.w-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; }
.verdict { display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px; border-radius: 999px; font-weight: 700; font-size: .88rem; }
.verdict.ok { background: var(--ok-soft); color: var(--ok); }
.verdict.no { background: var(--bad-soft); color: var(--bad); }
.verdict.warn { background: var(--warn-soft); color: var(--warn); }
.w-kv { display: grid; grid-template-columns: max-content 1fr; gap: 4px 14px; margin: 0; font-size: .92rem; }
.w-kv dt { color: var(--muted); font-weight: 600; }
.w-kv dd { margin: 0; color: var(--ink); overflow-wrap: anywhere; }
.w-pre { margin: 10px 0 0; padding: 10px 12px; border-radius: 10px; background-color: var(--code-bg); border: 1px solid var(--line); font: .8rem/1.55 var(--mono); color: var(--code-ink); overflow-x: auto; white-space: pre; }
.w-pre:not(.wrap) { background-image: linear-gradient(90deg, var(--code-bg) 40%, transparent), linear-gradient(270deg, var(--code-bg) 40%, transparent),
    linear-gradient(90deg, rgba(11,19,48,.14), transparent), linear-gradient(270deg, rgba(11,19,48,.14), transparent); }
.w-pre.wrap { white-space: pre-wrap; overflow-wrap: anywhere; }   /* B3: never clip rule text inside narrow panels */

/* packet walk */
.pw-layout { display: grid; grid-template-columns: minmax(0, 1fr); }
.pw-stage { padding: 12px; background: var(--bg-soft); border-bottom: 1px solid var(--line); min-width: 0; }
@container widget (min-width: 1000px) {
  .pw-layout { grid-template-columns: minmax(0, 1.35fr) minmax(320px, 1fr); }
  .pw-stage { border-bottom: 0; border-right: 1px solid var(--line); display: flex; align-items: center; }
}
.pw-svg { width: 100%; height: auto; display: block; }
.widget.is-vertical .pw-svg { max-width: 460px; margin: 0 auto; }
.pw-zone { stroke-width: 1.4; stroke-dasharray: 5 4; }
.pw-zone-site { stroke: color-mix(in srgb, var(--site1) 70%, transparent); fill: color-mix(in srgb, var(--site1-soft) 35%, transparent); }
.pw-zone-net { stroke: var(--line-strong); fill: color-mix(in srgb, var(--surface-3) 45%, transparent); }
.pw-zone-oci { stroke: color-mix(in srgb, var(--oci) 70%, transparent); fill: color-mix(in srgb, var(--oci-soft) 35%, transparent); }
.pw-zone-t { font: 700 12.5px var(--font); letter-spacing: .1em; }
.pw-zone-t.site { fill: var(--site1-ink); } .pw-zone-t.oci { fill: var(--oci-ink); } .pw-zone-t.net { fill: var(--muted); }
.pw-node rect { fill: var(--surface); stroke: var(--line-strong); stroke-width: 1.5; transition: fill .2s, stroke .2s; }
.pw-node text { fill: var(--ink); font: 650 15px var(--font); }
.pw-node .pw-sub { fill: var(--muted); font: 500 12.5px var(--mono); }
.pw-node.is-active rect { fill: var(--accent-soft); stroke: var(--accent); stroke-width: 2.5; }
.pw-node.is-done rect { stroke: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.pw-node.is-blocked rect { fill: var(--bad-soft); stroke: var(--bad); stroke-width: 2.5; }
.pw-link { fill: none; stroke: var(--line-strong); stroke-width: 2; }
.pw-link.is-lit { stroke: var(--accent); stroke-width: 3; }
.pw-link.is-tunnel { stroke-dasharray: 7 5; }
.pw-pill rect { fill: var(--surface); stroke: var(--accent); stroke-width: 1.5; }
.pw-pill text { fill: var(--accent-ink); font: 700 12.5px var(--font); }
.pw-pkt { fill: var(--accent); stroke: #fff; stroke-width: 2; filter: drop-shadow(0 2px 4px rgba(0,0,0,.25)); }
.pw-pkt.is-return { fill: var(--oci); }
.pw-pkt.is-dropped { fill: var(--bad); }
.pw-panel { padding: 18px 20px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.pw-step-n { font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-ink); margin: 0; }
.pw-panel h4 { margin: 0; font-size: 1.15rem; }
.pw-panel p { margin: 0; font-size: .95rem; }
.pw-decides { border-radius: var(--radius-md); border: 1px solid var(--line); background: var(--surface-2); padding: 12px 14px; }
.pw-decides h5 { margin: 0 0 4px; font-size: .74rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.pw-nav { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: auto; padding-top: 8px; }
.pw-progress { display: flex; gap: 4px; flex: 1; min-width: 100px; }
.pw-progress i { flex: 1; height: 5px; border-radius: 999px; background: var(--surface-3); transition: background .2s; }
.pw-progress i.on { background: var(--accent); }
.pw-progress i.back { background: var(--oci); }
.pw-progress i.drop { background: var(--bad); }

/* BGP explainer */
.bgp-cols { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-2); }
.bgp-side { border: 1px solid var(--line); border-radius: var(--radius-md); overflow: hidden; }
.bgp-side h4 { margin: 0; padding: 12px 14px; font-size: .98rem; background: var(--surface-2); border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.bgp-side h4 span { font-weight: 500; color: var(--muted); font-size: .85rem; }
.bgp-side h5 { margin: 12px 14px 6px; font-size: .74rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.rt { list-style: none; margin: 0 0 10px; padding: 0 10px; display: grid; gap: 6px; }
.rt li { display: grid; grid-template-columns: minmax(120px, max-content) 1fr; gap: 4px 12px; align-items: baseline; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line); font-size: .88rem; background: var(--surface); }
.rt li .pfx { font-family: var(--mono); font-weight: 600; color: var(--ink); }
.rt li .why { margin: 0; font-size: .84rem; color: var(--muted); animation: none; }
.rt li.acc { border-color: color-mix(in srgb, var(--ok) 45%, var(--line)); }
.rt li.acc .pfx::before { content: "✓ "; color: var(--ok); }
.rt li.rej { background: var(--surface-2); border-style: dashed; }
.rt li.rej .pfx { text-decoration: line-through; color: var(--faint); }
.rt li.rej .pfx::before { content: "✕ "; color: var(--bad); text-decoration: none; display: inline-block; }
.rt li.bad { border-color: var(--bad); background: var(--bad-soft); }
.rt li.bad .pfx::before { content: "! "; color: var(--bad); }
.rt li.win { border-color: var(--accent); box-shadow: inset 3px 0 0 var(--accent); }
.bgp-mistakes, .bgp-alerts { display: grid; gap: 10px; }
.bgp-lookup { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.bgp-lookup .field { min-width: 200px; }
.bgp-result { margin-top: 10px; padding: 12px 14px; border-radius: var(--radius-md); background: var(--surface-2); border: 1px solid var(--line); font-size: .93rem; }
.bgp-alert { padding: 12px 14px; border-radius: var(--radius-md); background: var(--bad-soft); color: var(--text); border: 1px solid color-mix(in srgb, var(--bad) 40%, transparent); font-size: .92rem; }
.bgp-alert strong { color: var(--bad); }

/* failover: diagram, then one full-width tabbed terminal (B8) */
.fo-stage { background: var(--bg-soft); border-bottom: 1px solid var(--line); padding: 10px 12px 6px; }
.fo-svg { width: 100%; height: auto; display: block; max-height: 330px; margin: 0 auto; }
.widget.is-vertical .fo-svg { max-height: none; max-width: 440px; }
.fo-box rect { fill: var(--surface); stroke: var(--line-strong); stroke-width: 1.5; }
.fo-box text { fill: var(--ink); font: 700 15px var(--font); }
.fo-box .sub { fill: var(--muted); font: 500 12.5px var(--mono); }
.fo-tun { fill: none; stroke-width: 5; stroke-linecap: round; transition: stroke .3s, opacity .3s; }
.fo-tun.up { stroke: var(--ok); }
.fo-tun.down { stroke: var(--bad); stroke-dasharray: 3 9; opacity: .6; }
.fo-tlabel { font: 650 13px var(--font); fill: var(--muted); }
.fo-dot { stroke: #fff; stroke-width: 1.5; }
.fo-ret { fill: var(--oci); stroke: #fff; stroke-width: 1.5; }
.fo-key { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 8px 4px 4px; font-size: .84rem; color: var(--muted); }
.fo-key span { display: inline-flex; align-items: center; gap: 6px; }
.fo-key i { width: 11px; height: 11px; border-radius: 50%; background: var(--accent); display: inline-block; }
.fo-key i.sq { border-radius: 2px; background: var(--oci); }
.fo-term { border: 1px solid var(--line); border-radius: var(--radius-md); overflow: hidden; background: var(--term-bg); }
.fo-term > .tab-list { background: var(--surface-2); }
.fo-term .terminal { margin: 0; border: 0; border-radius: 0; box-shadow: none; }
.fo-term .term-body { min-height: 13.5em; }

/* rules evaluator */
.rv-form { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.rv-out { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: var(--sp-2); }
.rv-list { border: 1px solid var(--line); border-radius: var(--radius-md); overflow: hidden; }
.rv-list h5 { margin: 0; padding: 10px 14px; font-size: .8rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); background: var(--surface-2); border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; gap: 8px; }
.rv-list ol { list-style: none; margin: 0; padding: 8px; display: grid; gap: 6px; }
.rv-list li { padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line); font-size: .86rem; }
.rv-list li.hit { border-color: var(--ok); background: var(--ok-soft); }
.rv-list li.miss { color: var(--muted); }
.rv-list li .mono { color: var(--ink); }
.rv-verdict { margin-top: var(--sp-2); padding: 14px 16px; border-radius: var(--radius-md); display: flex; gap: 12px; align-items: flex-start; }
.rv-verdict.ok { background: var(--ok-soft); } .rv-verdict.no { background: var(--bad-soft); }
.rv-verdict p { margin: 0; }
.rv-verdict strong { color: var(--ink); }

/* cidr helper */
.ch-input { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; }
.ch-input .field { flex: 1; min-width: 220px; }
.ch-examples { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.ch-examples button { border: 1px solid var(--line); background: var(--surface-2); border-radius: 999px; padding: 3px 10px; font: 600 .8rem var(--mono); cursor: pointer; color: var(--ink); }
.ch-examples button:hover { border-color: var(--accent); }
.ch-out { margin-top: var(--sp-2); display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.ch-card { border: 1px solid var(--line); border-radius: var(--radius-md); padding: 14px 16px; min-width: 0; }
.ch-card h5 { margin: 0 0 8px; font-size: .74rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.ch-bar { display: flex; gap: 2px; margin: 12px 0 4px; }
.ch-bar i { flex: 1; height: 26px; border-radius: 3px; background: var(--surface-3); position: relative; }
.ch-bar i.s1 { background: var(--site1-soft); } .ch-bar i.s2 { background: var(--site2-soft); } .ch-bar i.s3 { background: var(--site3-soft); }
.ch-bar i.oci { background: var(--oci-soft); } .ch-bar i.common { background: var(--common-soft); }
.ch-bar i.hit { background: var(--accent); }
.ch-bar i.gap { margin-left: 6px; }
.ch-scale { display: flex; justify-content: space-between; font: .74rem var(--mono); color: var(--faint); }

/* band map (B9): one row per band of ten /24s; the octet is the label, the use is in the tooltip and detail line */
.bandmap { margin: var(--block-lg) 0; padding: 18px 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.bm-title { margin: 0 0 12px; font-size: .92rem; color: var(--muted); }
.bm-scroll {
  overflow-x: auto; padding: 2px 2px 6px; background-color: var(--surface);
  background-image: linear-gradient(90deg, var(--surface) 40%, transparent), linear-gradient(270deg, var(--surface) 40%, transparent),
    linear-gradient(90deg, rgba(11,19,48,.12), transparent), linear-gradient(270deg, rgba(11,19,48,.12), transparent);
}
.bm-grid { display: grid; gap: 6px; min-width: 600px; }
.bm-row { display: grid; grid-template-columns: 118px repeat(10, minmax(0, 1fr)); gap: 5px; align-items: stretch; }
.bm-h { margin: 0; display: flex; flex-direction: column; justify-content: center; font-size: .86rem; font-weight: 700; line-height: 1.25; color: var(--muted); }
.bm-h span { font: 500 .76rem var(--mono); color: var(--muted); }
.bm-h-s1 { color: var(--site1-ink); } .bm-h-s2 { color: var(--site2-ink); } .bm-h-s3 { color: var(--site3-ink); } .bm-h-oci { color: var(--oci-ink); } .bm-h-common { color: var(--ink); }
.bm-cell { min-width: 0; height: 46px; display: grid; place-items: center; padding: 0; border-radius: 8px; border: 1px solid var(--line); background: var(--surface-2); color: var(--muted); cursor: pointer; font: 700 1.02rem var(--mono); font-variant-numeric: tabular-nums; transition: transform .12s, box-shadow .12s; }
.bm-cell.bm-p1.bm-s1 { background: var(--s1-fill); color: var(--on-band); border-color: transparent; }
.bm-cell.bm-p1.bm-oci { background: var(--oci-fill); color: var(--on-band); border-color: transparent; }
.bm-cell.bm-p1.bm-common { background: var(--common); color: var(--on-band); border-color: transparent; }
.bm-cell.bm-later.bm-s1 { background: var(--site1-soft); border-color: color-mix(in srgb, var(--site1) 60%, transparent); color: var(--ink); }
.bm-cell.bm-later.bm-s2 { background: var(--site2-soft); border-color: color-mix(in srgb, var(--site2) 60%, transparent); color: var(--ink); }
.bm-cell.bm-later.bm-s3 { background: var(--site3-soft); border-color: color-mix(in srgb, var(--site3) 60%, transparent); color: var(--ink); }
.bm-cell.bm-later.bm-oci { background: var(--oci-soft); border-color: color-mix(in srgb, var(--oci) 60%, transparent); color: var(--ink); }
.bm-cell.bm-later.bm-common { background: var(--common-soft); border-color: color-mix(in srgb, var(--common) 60%, transparent); color: var(--ink); }
.bm-cell.bm-avoid { border-style: dashed; border-color: var(--bad); color: var(--bad); background: repeating-linear-gradient(135deg, var(--surface-2) 0 5px, var(--bad-soft) 5px 10px); }
.bm-cell.bm-none { background: transparent; border-style: dotted; }
.bm-cell:hover, .bm-cell:focus-visible, .bm-cell.is-sel { outline: 2px solid var(--accent); outline-offset: 1px; transform: translateY(-1px); box-shadow: var(--shadow); position: relative; z-index: 1; }
.bm-legend { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 12px; font-size: .86rem; color: var(--muted); }
.bm-legend span { display: inline-flex; gap: 6px; align-items: center; }
.bm-key { width: 14px; height: 14px; border-radius: 4px; border: 1px solid var(--line-strong); display: inline-block; }
.bm-key.bm-p1 { background: var(--s1-fill); border-color: var(--s1-fill); } .bm-key.bm-later { background: var(--site1-soft); border-color: var(--site1); }
.bm-key.bm-spare { background: var(--surface-2); }
.bm-key.bm-avoid { border: 1px dashed var(--bad); background: var(--bad-soft); }
.bm-detail { margin: 12px 0 0; padding: 10px 14px; border-radius: 10px; background: var(--surface-2); font-size: .95rem; color: var(--ink); min-height: 2.6em; }

/* ------------------------------------------------------------------ topology (B7)
   Wide containers: the wide drawing with the inspector docked on the right. Medium: the tall drawing with the
   inspector beside it. Narrow: the tall drawing, inspector underneath. The inspector never covers the diagram. */
.topology { container-type: inline-size; }
.topo-head { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.topo-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: .84rem; color: var(--muted); }
.topo-legend span { display: inline-flex; align-items: center; gap: 6px; }
.topo-legend i { width: 18px; height: 12px; border-radius: 3px; border: 1.5px solid var(--muted); background: var(--surface); display: inline-block; }
.topo-legend i.lg-pending { border-style: dashed; background: var(--surface-3); }
.topo-legend i.lg-planned { border: 1.5px dashed var(--planned); background: var(--planned-soft); }
.topo-legend i.lg-tunnel { border: 0; height: 5px; border-radius: 3px; background: var(--accent); }
.topo-body { display: grid; grid-template-columns: minmax(0, 1fr); }
.topo-stage { position: relative; min-width: 0; padding: 6px; background: var(--bg-soft); border-bottom: 1px solid var(--line); }
.topo-svg { display: block; width: 100%; height: auto; }
.topo-h { display: none; }
.topo-v { max-width: 460px; margin: 0 auto; }
@container (min-width: 720px) {
  .topo-body { grid-template-columns: minmax(0, 450px) minmax(260px, 1fr); }
  .topo-stage { padding: 10px; border-bottom: 0; border-right: 1px solid var(--line); }
  .tp-panel { position: sticky; top: calc(var(--header-h) + 12px); align-self: start; max-height: calc(100vh - var(--header-h) - 24px); overflow: auto; }
}
@container (min-width: 1180px) {
  .topo-body { grid-template-columns: minmax(0, 1fr) 340px; }
  .topo-h { display: block; }
  .topo-v { display: none; }
}
.topology.is-expanded { position: fixed; inset: 12px; z-index: 96; margin: 0; overflow: auto; box-shadow: 0 0 0 100vmax rgba(8, 12, 28, .66); }
.topology.is-expanded .topo-head { position: sticky; top: 0; z-index: 2; }
.topology.is-expanded .tp-panel { top: 64px; max-height: calc(100vh - 100px); }
.tp-el { cursor: pointer; }
.tp-el:focus { outline: none; }
.tp-r { transition: fill .15s, stroke .15s, stroke-width .15s; }
.tp-node .tp-r { fill: var(--surface); stroke: var(--muted); stroke-width: 1.4; filter: drop-shadow(0 1px 1.5px rgba(11,19,48,.08)); }
.tp-node.tp-vlan .tp-r { fill: color-mix(in srgb, var(--site1-soft) 70%, var(--surface)); stroke: color-mix(in srgb, var(--site1) 55%, var(--line)); }
.tp-node.tp-wan .tp-r { fill: var(--surface-2); stroke: var(--line-strong); }
.tp-node.tp-vyos .tp-r { fill: var(--accent-soft); stroke: var(--accent); stroke-width: 2; }
.tp-node.tp-drg .tp-r { fill: var(--oci-soft); stroke: var(--oci); stroke-width: 2; }
.tp-node.st-pending .tp-r { fill: var(--surface-3); stroke: var(--muted); stroke-dasharray: 5 4; filter: none; }
.tp-el.st-planned .tp-r { fill: color-mix(in srgb, var(--planned-soft) 75%, var(--surface)); stroke: var(--planned); stroke-dasharray: 6 4; filter: none; }
.tp-frame .tp-r { stroke-width: 1.5; }
.tp-frame.tp-site .tp-r { fill: color-mix(in srgb, var(--site1-soft) 38%, transparent); stroke: color-mix(in srgb, var(--site1) 60%, transparent); }
.tp-frame.tp-oci .tp-r { fill: color-mix(in srgb, var(--oci-soft) 38%, transparent); stroke: color-mix(in srgb, var(--oci) 60%, transparent); }
.tp-frame.tp-hyp .tp-r { fill: color-mix(in srgb, var(--surface) 55%, transparent); stroke: var(--muted); stroke-dasharray: 4 4; }
.tp-frame.tp-vcn .tp-r { fill: var(--surface); stroke: var(--oci); }
.tp-frame.tp-subnet .tp-r { fill: color-mix(in srgb, var(--oci-soft) 45%, var(--surface)); stroke: color-mix(in srgb, var(--oci) 40%, var(--line)); }
.tp-frame.st-planned .tp-r { fill: color-mix(in srgb, var(--planned-soft) 45%, transparent); }
.tp-frame.tp-s2 .tp-r { stroke: color-mix(in srgb, var(--site2) 75%, transparent); fill: color-mix(in srgb, var(--site2-soft) 40%, transparent); }
.tp-frame.tp-s3 .tp-r { stroke: color-mix(in srgb, var(--site3) 75%, transparent); fill: color-mix(in srgb, var(--site3-soft) 40%, transparent); }
.tp-ft { font-family: var(--font); font-weight: 750; letter-spacing: .06em; fill: var(--muted); pointer-events: none; }
.tp-site > .tp-ft { fill: var(--site1-ink); }
.tp-oci > .tp-ft, .tp-vcn > .tp-ft, .tp-subnet > .tp-ft { fill: var(--oci-ink); }
.tp-frame.st-planned > .tp-ft { fill: var(--planned); }
.tp-frame.tp-s2 > .tp-ft { fill: var(--site2-ink); } .tp-frame.tp-s3 > .tp-ft { fill: var(--site3-ink); }
.tp-fs { font-family: var(--mono); font-weight: 500; fill: var(--muted); pointer-events: none; }
.tp-t { fill: var(--ink); font-family: var(--font); font-weight: 650; pointer-events: none; }
.tp-s { fill: var(--muted); font-family: var(--mono); font-weight: 500; pointer-events: none; }
.tp-el.st-planned .tp-t { fill: var(--planned); }
.tp-ic { color: var(--muted); fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; }
.tp-vyos .tp-ic { color: var(--accent-ink); }
.tp-drg .tp-ic { color: var(--oci-ink); }
.st-planned .tp-ic { color: var(--planned); }
.tp-el:hover > .tp-r { stroke: var(--accent); stroke-width: 2.2; }
.tp-el:focus-visible > .tp-r { stroke: var(--focus); stroke-width: 3; }
.tp-el.is-sel > .tp-r { stroke: var(--accent); stroke-width: 3; stroke-dasharray: none; }
.tp-node.is-sel > .tp-r { fill: var(--accent-soft); }
.tp-link { fill: none; stroke: color-mix(in srgb, var(--muted) 75%, transparent); stroke-width: 1.6; stroke-linecap: round; pointer-events: none; }
.tp-link.planned { stroke: var(--planned); stroke-dasharray: 6 5; }
.tp-zone { fill: color-mix(in srgb, var(--surface-3) 35%, transparent); stroke: var(--line-strong); stroke-width: 1.3; stroke-dasharray: 4 5; }
.tp-zt { fill: var(--muted); font: 750 12px var(--font); letter-spacing: .14em; }
.tp-cloud { fill: var(--surface); stroke: var(--line-strong); stroke-width: 2.4; }
.tp-note { fill: var(--muted); font: 600 12px var(--mono); }
.tp-tun { fill: none; stroke: var(--accent); stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; transition: stroke-width .15s; }
.tp-flow { fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-dasharray: 1.5 13; opacity: .9; pointer-events: none; animation: tpflow 1.2s linear infinite; }
@keyframes tpflow { to { stroke-dashoffset: -14.5; } }
.tp-hit { fill: none; stroke: transparent; stroke-width: 24; pointer-events: stroke; }
.tp-tunnel:hover .tp-tun, .tp-tunnel.is-sel .tp-tun { stroke-width: 8; }
.tp-tunnel:focus-visible .tp-tun { stroke: var(--focus); stroke-width: 7; }
.tp-tunnel.st-planned .tp-tun { stroke: var(--planned); stroke-dasharray: 8 6; stroke-width: 3; }
.tp-tunnel.st-planned .tp-flow { display: none; }
.tp-pill rect, .tp-pill circle { fill: var(--surface); stroke: var(--accent); stroke-width: 1.6; }
.tp-pill text { fill: var(--accent-ink); font: 750 12.5px var(--font); pointer-events: none; }
.tp-tunnel.st-planned .tp-pill rect { stroke: var(--planned); }
.tp-tunnel.st-planned .tp-pill text { fill: var(--planned); }
.tp-tunnel.is-sel .tp-pill rect, .tp-tunnel.is-sel .tp-pill circle { fill: var(--accent-soft); }
.tp-layer { transition: opacity .25s; }
.tp-layer.is-off { opacity: 0; pointer-events: none; visibility: hidden; }
.tp-panel { padding: 18px 20px; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.tp-panel h4 { margin: 0; font-size: 1.2rem; text-transform: none; letter-spacing: -0.01em; color: var(--ink); }
.tp-panel .tp-kind { margin: 0; font-size: .76rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-ink); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.tp-panel p { margin: 0; font-size: .95rem; }
.tp-panel .w-pre { font-size: .78rem; }
.tp-tests { display: flex; flex-wrap: wrap; gap: 6px; }
.tp-tests a { font: 600 .8rem var(--mono); padding: 3px 9px; border-radius: 999px; background: var(--surface-3); text-decoration: none; color: var(--ink); }
.tp-tests a:hover { background: var(--accent-soft); color: var(--accent-ink); }
.tp-links { display: flex; flex-direction: column; gap: 4px; font-size: .92rem; }
.tp-back { align-self: flex-start; }
.tp-empty { color: var(--muted); }
.tp-empty h4 { color: var(--ink); margin-bottom: 6px; }
.tp-empty ul { margin: 10px 0 0; padding-left: 1.1rem; }
.topo-text { margin: 0; border: 0; border-top: 1px solid var(--line); border-radius: 0; }

/* ------------------------------------------------------------------ console tour (replica) */
.console-tour { container-type: inline-size; }
.ct-head { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.ct-steps { display: flex; gap: 6px; flex-wrap: wrap; }
.ct-steps button { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 4px 11px; font-size: .82rem; font-weight: 650; color: var(--muted); cursor: pointer; }
.ct-steps button[aria-current="step"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.ct-steps button.done { border-color: var(--ok); color: var(--ok); }
.ct-steps button.done[aria-current="step"] { color: var(--bg); }
.ct-note { margin: 0; padding: 8px 18px; font-size: .85rem; color: var(--text); background: var(--warn-soft); border-bottom: 1px solid var(--line); }
.ct-crumb { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; padding: 10px 18px; font-size: .86rem; color: var(--muted); border-bottom: 1px solid var(--line); }
.ct-crumb span + span::before { content: "›"; margin: 0 6px; color: var(--faint); }
.ct-crumb span:last-child { color: var(--ink); font-weight: 650; }
.ct-main { display: grid; grid-template-columns: minmax(0, 1fr); }
.ct-stage { position: relative; padding: 12px; background: var(--bg-soft); border-bottom: 1px solid var(--line); min-width: 0; overflow: hidden; }
@container (min-width: 1040px) {
  /* replica left, explanations right; the replica stays in view while the explanations scroll */
  .ct-main { grid-template-columns: minmax(0, 1fr) 340px; background: linear-gradient(90deg, var(--bg-soft) calc(100% - 340px), var(--surface) calc(100% - 340px)); }
  .ct-stage { border-bottom: 0; position: sticky; top: calc(var(--header-h) + 8px); align-self: start; }
  .ct-side { border-left: 1px solid var(--line); }
}
.oc-fit { position: relative; overflow: hidden; }
.oc-fit > .oc { transform-origin: 0 0; }
.ct-side { padding: var(--sp-2) 18px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.ct-side h4 { margin: 0; font-size: 1.1rem; text-transform: none; letter-spacing: -0.01em; color: var(--ink); }
.ct-side p { margin: 0; font-size: .93rem; }
.ct-card { border-radius: var(--radius-md); border: 1px solid var(--line); padding: 14px; background: var(--surface); animation: rise .2s ease; }
.ct-card-n { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--accent-strong); color: var(--on-accent-strong); font: 700 .8rem var(--font); margin-right: 8px; flex: none; }
.ct-card h5 { margin: 0 0 6px; font-size: 1rem; display: flex; align-items: center; color: var(--ink); }
.ct-card .ct-tip { margin-top: 10px; padding: 10px 12px; border-radius: 10px; background: var(--accent-soft); font-size: .9rem; }
.ct-card .ct-eq { margin-top: 8px; font-size: .86rem; color: var(--muted); }
.ct-card > :last-child { margin-bottom: 0; }
.ct-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.ct-list button { width: 100%; text-align: left; display: flex; gap: 8px; align-items: center; border: 1px solid transparent; background: none; border-radius: 10px; padding: 6px 8px; cursor: pointer; font-size: .9rem; color: var(--text); }
.ct-list button:hover, .ct-list button[aria-pressed="true"] { background: var(--surface-3); color: var(--ink); }
.ct-list button[aria-pressed="true"] { border-color: var(--line-strong); }
.ct-list .ct-card-n { width: 20px; height: 20px; font-size: .72rem; margin: 0; }
.ct-list button.seen .ct-card-n { background: var(--ok); color: var(--on-ok); }
.ct-offmap { margin-left: auto; font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--faint); white-space: nowrap; }
.ct-side-actions { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 4px; }
.ct-nav { display: flex; gap: 8px; justify-content: space-between; align-items: center; padding: 12px 18px; border-top: 1px solid var(--line); background: var(--surface-2); flex-wrap: wrap; }
.ct-check { border-radius: var(--radius-md); border: 1px dashed var(--line-strong); padding: 14px; }
.ct-check h5 { margin: 0 0 8px; font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.ct-check .opts { gap: 6px; }
.ct-check .opt label { padding: 8px 10px; font-size: .9rem; }
.ct-view { margin-left: auto; }
.ct-finish { align-self: flex-start; }
.console-tour.is-multi { padding: 0; }
.ct-picker { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: flex-end; padding: var(--sp-2) 18px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.ct-picker .field { min-width: min(420px, 100%); }
.ct-picker .w-sub { margin: 0 0 8px; }
.console-tour-inner { display: block; }
/* the replica itself: a stylised cloud console, not a copy. Drawn at 1120 px and scaled to fit (B4). */
.oc { --oc-bar: #312d2a; --oc-bar-ink: #f5f3f0; --oc-red: #c74634; --oc-bg: #f7f5f2; --oc-panel: #ffffff; --oc-line: #dedad5; --oc-ink: #1f1c1a; --oc-muted: #6b6560; --oc-link: #2b6aa1; --oc-side: #fbfaf8;
  position: relative; border-radius: 12px; overflow: hidden; border: 1px solid var(--oc-line); background: var(--oc-bg); color: var(--oc-ink); font: 13px/1.45 var(--font); box-shadow: var(--shadow); }
:root[data-theme="dark"] .oc { --oc-bar: #1b1917; --oc-bg: #22201e; --oc-panel: #2a2826; --oc-line: #3d3935; --oc-ink: #efebe6; --oc-muted: #aaa39c; --oc-link: #7fb4e6; --oc-side: #252321; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .oc { --oc-bar: #1b1917; --oc-bg: #22201e; --oc-panel: #2a2826; --oc-line: #3d3935; --oc-ink: #efebe6; --oc-muted: #aaa39c; --oc-link: #7fb4e6; --oc-side: #252321; } }
.oc-top { display: flex; align-items: center; gap: 12px; height: 44px; padding: 0 12px; background: var(--oc-bar); color: var(--oc-bar-ink); }
.oc-burger { width: 18px; height: 12px; border-top: 2px solid currentColor; border-bottom: 2px solid currentColor; position: relative; }
.oc-burger::after { content: ""; position: absolute; left: 0; right: 0; top: 3px; border-top: 2px solid currentColor; }
.oc-logo { font-weight: 800; letter-spacing: .02em; font-size: 13px; }
.oc-logo b { color: #ff8a73; }
.oc-search { flex: 1; max-width: 360px; height: 28px; border-radius: 6px; background: rgba(255,255,255,.1); display: flex; align-items: center; padding: 0 10px; color: rgba(255,255,255,.72); font-size: 12px; }
.oc-region { margin-left: auto; display: flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 6px; background: rgba(255,255,255,.08); font-size: 12px; }
.oc-icons { display: flex; gap: 10px; }
.oc-icons i { width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid rgba(255,255,255,.5); display: block; }
.oc-shell { font: 700 11px var(--mono); padding: 3px 7px; border-radius: 5px; border: 1px solid rgba(255,255,255,.3); color: rgba(255,255,255,.85); }
.oc-body { display: grid; grid-template-columns: 200px 1fr; min-height: 380px; }
.oc-side { background: var(--oc-side); border-right: 1px solid var(--oc-line); padding: 12px 0; }
.oc-side-h { padding: 0 14px 8px; font-weight: 700; font-size: 12px; color: var(--oc-muted); text-transform: uppercase; letter-spacing: .05em; }
.oc-side a, .oc-side span.oc-mi { display: block; padding: 6px 14px; color: var(--oc-ink); text-decoration: none; font-size: 12.5px; border-left: 3px solid transparent; }
.oc-side .oc-mi.is-on { border-left-color: var(--oc-red); background: color-mix(in srgb, var(--oc-red) 8%, transparent); font-weight: 650; }
.oc-scope { margin: 14px 14px 0; padding-top: 12px; border-top: 1px solid var(--oc-line); }
.oc-scope label { display: block; font-size: 11px; color: var(--oc-muted); margin-bottom: 4px; }
.oc-scope .oc-select { border: 1px solid var(--oc-line); border-radius: 5px; padding: 5px 8px; background: var(--oc-panel); font-size: 12px; }
.oc-main { padding: 16px 20px 20px; min-width: 0; }
.oc-bc { font-size: 11.5px; color: var(--oc-link); margin-bottom: 6px; }
.oc-h1 { font-size: 20px; font-weight: 700; margin: 0 0 4px; letter-spacing: -0.01em; }
.oc-sub { color: var(--oc-muted); font-size: 12px; margin: 0 0 12px; }
.oc-state { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: #2e7d32; font-weight: 650; }
.oc-state::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #2e7d32; }
.oc-tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--oc-line); margin: 10px 0 12px; }
.oc-tab { padding: 8px 12px; font-size: 12.5px; color: var(--oc-muted); border-bottom: 2px solid transparent; white-space: nowrap; }
.oc-tab.is-on { color: var(--oc-ink); border-bottom-color: var(--oc-red); font-weight: 650; }
.oc-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.oc-btn { border: 1px solid var(--oc-line); background: var(--oc-panel); border-radius: 5px; padding: 5px 12px; font-size: 12px; font-weight: 600; }
.oc-btn.primary { background: #2b6aa1; color: #fff; border-color: #2b6aa1; }
.oc-table { width: 100%; border-collapse: collapse; background: var(--oc-panel); border: 1px solid var(--oc-line); border-radius: 6px; font-size: 12px; }
.oc-table th { text-transform: none; letter-spacing: 0; font-size: 11.5px; color: var(--oc-muted); background: var(--oc-side); padding: 8px 10px; white-space: nowrap; }
.oc-table td { padding: 8px 10px; border-top: 1px solid var(--oc-line); border-bottom: 0; color: var(--oc-ink); }
.oc-table td:first-child { color: var(--oc-link); font-weight: 600; }
.oc-table tr:hover > td { background: transparent; }
.oc-form { display: grid; gap: 12px; max-width: 520px; background: var(--oc-panel); border: 1px solid var(--oc-line); border-radius: 8px; padding: 16px; }
.oc-field label { display: block; font-size: 12px; font-weight: 650; margin-bottom: 4px; }
.oc-field .oc-input { border: 1px solid var(--oc-line); border-radius: 5px; padding: 6px 10px; background: var(--oc-bg); color: var(--oc-muted); font-size: 12px; }
.oc-wizard { display: flex; gap: 0; margin-bottom: 12px; }
.oc-wstep { flex: 1; padding: 8px 10px; border-bottom: 3px solid var(--oc-line); font-size: 12px; color: var(--oc-muted); }
.oc-wstep.is-on { border-bottom-color: var(--oc-red); color: var(--oc-ink); font-weight: 650; }
.oc-info { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 20px; background: var(--oc-panel); border: 1px solid var(--oc-line); border-radius: 8px; padding: 12px 14px; margin-bottom: 8px; }
.oc-info div { display: flex; gap: 6px; font-size: 12px; }
.oc-info dt { color: var(--oc-muted); } .oc-info dd { margin: 0; font-weight: 600; }
.oc .sk { display: block; height: 8px; width: 60%; border-radius: 4px; background: var(--oc-line); }
.oc-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.oc-fields div { flex-direction: column; gap: 4px; }
[data-hs] { position: relative; }
/* hotspot markers: counter-scaled (--inv) so they stay a tappable size when the replica is shrunk */
.hs {
  position: absolute; z-index: 3; width: 26px; height: 26px; margin: -13px 0 0 -13px; border-radius: 50%; border: 2px solid #fff;
  background: var(--accent-strong); color: var(--on-accent-strong); font: 800 12px/22px var(--font); text-align: center; cursor: pointer; padding: 0;
  scale: var(--inv, 1); box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 60%, transparent), 0 2px 6px rgba(0,0,0,.3); animation: pulse 2.2s infinite;
}
.hs:hover, .hs[aria-pressed="true"] { background: var(--ink); color: var(--bg); animation: none; transform: scale(1.12); }
.hs.seen { background: var(--ok); color: var(--on-ok); animation: none; }
.hs.seen[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.hs-target { box-shadow: inset 0 0 0 2px var(--accent) !important; border-radius: 5px; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 55%, transparent), 0 2px 6px rgba(0,0,0,.3); } 70% { box-shadow: 0 0 0 12px transparent, 0 2px 6px rgba(0,0,0,.3); } 100% { box-shadow: 0 0 0 0 transparent, 0 2px 6px rgba(0,0,0,.3); } }
.ct-shot { position: relative; }
.ct-shot img { display: block; width: 100%; height: auto; border-radius: 10px; border: 1px solid var(--line); }
.ct-calib { position: absolute; left: 8px; bottom: 8px; background: rgba(0,0,0,.75); color: #fff; font: 12px var(--mono); padding: 4px 8px; border-radius: 6px; }

/* ------------------------------------------------------------------ search dialog */
.search-dialog { position: fixed; inset: 0; z-index: 90; background: rgba(8, 12, 28, .55); backdrop-filter: blur(4px); display: grid; align-items: start; justify-items: center; padding: 10vh 16px 16px; }
.search-panel { width: min(720px, 100%); background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow-lg); overflow: hidden; }
.search-field { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.search-field input { flex: 1; min-width: 0; border: 0; background: none; font: inherit; font-size: 1.1rem; color: var(--ink); outline: none; }
.search-close { border: 1px solid var(--line); background: var(--surface-2); border-radius: 8px; padding: 3px 8px; font-size: .78rem; cursor: pointer; }
.search-results { list-style: none; margin: 0; padding: 8px; max-height: 60vh; overflow: auto; }
.search-results li a { display: block; padding: 10px 12px; border-radius: 10px; text-decoration: none; color: var(--text); }
.search-results li a:hover, .search-results li[aria-selected="true"] a { background: var(--surface-3); }
.sr-t { display: flex; gap: 8px; align-items: baseline; color: var(--ink); font-weight: 650; }
.sr-k { font-size: .7rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--accent-ink); }
.sr-x { display: block; font-size: .86rem; color: var(--muted); margin-top: 2px; }
.sr-x mark { background: var(--accent-soft); color: var(--ink); border-radius: 3px; padding: 0 2px; }
.search-empty { padding: 18px; color: var(--muted); }
.search-foot { margin: 0; padding: 10px 16px; border-top: 1px solid var(--line); font-size: .82rem; color: var(--muted); }

/* ------------------------------------------------------------------ footer */
.site-footer { background: #0b1330; color: #b4bfdb; padding: 56px 0 44px; margin-top: 0; }
:root[data-theme="dark"] .site-footer { background: #060a16; border-top: 1px solid var(--line); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .site-footer { background: #060a16; border-top: 1px solid var(--line); } }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 36px; }
.footer-title { margin: 0 0 8px; color: #fff; font-size: 1.1rem; }
.footer-brand p { margin: 0 0 8px; max-width: 42ch; }
.footer-meta { font-size: .84rem; color: #8f9bbd; }
.footer-h { margin: 0 0 10px; color: #fff; font-weight: 700; font-size: .92rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin: 0 0 6px; }
.site-footer a, .site-footer .linkish { color: #b4bfdb; text-decoration: none; font-size: .92rem; }
.site-footer a:hover, .site-footer .linkish:hover { color: #fff; text-decoration: underline; }
.footer-tag { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: #9aa6c6; }

/* ------------------------------------------------------------------ responsive */
/* below 1360 px a lesson drops its right-hand contents list, so diagrams and widgets keep a wide centre column */
@media (max-width: 1360px) {
  .layout.has-sidebar.has-toc { grid-template-columns: 240px minmax(0, 1fr); }
  .layout.has-sidebar .toc { display: none; }
}
@media (max-width: 1180px) {
  .paths-live { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .paths-live > .path-card, .paths-live > .path-card:nth-child(-n+2) { grid-column: span 1; }
  .paths-live > .path-card:first-child { grid-column: 1 / -1; }
}
@media (max-width: 980px) {
  .nav-toggle { display: inline-grid; place-items: center; order: 3; }
  .site-nav { position: fixed; inset: var(--header-h) 0 auto 0; background: var(--bg); border-bottom: 1px solid var(--line); padding: 12px 16px 18px; display: none; max-height: calc(100vh - var(--header-h)); overflow: auto; box-shadow: var(--shadow-lg); }
  .site-nav.is-open { display: block; }
  .nav-list { flex-direction: column; align-items: stretch; }
  .nav-list > li > a, .menu-btn { width: 100%; padding: 12px; }
  .mega { position: static; box-shadow: none; border: 0; padding: 4px 12px; grid-template-columns: 1fr 1fr; width: auto; }
  .header-tools { margin-left: auto; }
  .search-btn { min-width: 0; }
  .search-label, .search-btn kbd { display: none; }
  .layout, .layout.has-toc, .layout.has-sidebar, .layout.has-sidebar.has-toc { grid-template-columns: minmax(0, 1fr); gap: var(--sp-3); padding-top: var(--sp-3); }
  .toc { display: none; }
  .sidebar { position: static; max-height: none; overflow: visible; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); }
  .sidebar-toggle { display: flex; width: 100%; justify-content: space-between; align-items: center; padding: 12px 16px; background: none; border: 0; font-weight: 700; color: var(--ink); cursor: pointer; }
  .sidebar-toggle svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; }
  .sidebar-inner { display: none; padding: 0 12px 12px; }
  .sidebar.is-open .sidebar-inner { display: block; }
  .hero-grid, .module-hero-grid { grid-template-columns: minmax(0, 1fr); }
  .hero-visual { max-width: 620px; }
  .module-aside { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; max-width: 720px; }
  .paths, .cols-3, .status-grid, .phases, .ref-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .explore-feature { grid-template-columns: minmax(0, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .rv-form { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 680px) {
  body { font-size: 16px; }
  .wrap { padding: 0 var(--sp-2); }
  .brand-text { font-size: .92rem; }
  .brand-text strong + * { display: none; }
  .home-hero { padding-top: 44px; }
  .hero-visual { display: none; }
  .hero-stats { grid-template-columns: 1fr 1fr; margin-top: 40px; }
  .hero-stats > div:nth-child(3) { padding-left: 0; border-left: 0; }
  .hero-stats > div { border-top: 1px solid rgba(255,255,255,.12); }
  .band { padding: 56px 0; }
  .preview-band { padding: var(--sp-2); }
  .paths, .paths-live, .paths-preview, .cols-2, .cols-3, .cols-4, .status-grid, .phases, .ref-grid, .footer-grid, .bgp-cols, .rv-out, .ch-out, .task-foot, .t-dl, .module-aside { grid-template-columns: minmax(0, 1fr); }
  .paths-live > .path-card:first-child { grid-column: auto; }
  .explore-feature { padding: var(--sp-3); }
  .lesson-row a { grid-template-columns: 34px 1fr 18px; }
  .lr-meta { display: none; }
  .match-row { grid-template-columns: minmax(0, 1fr); }
  .pager { grid-template-columns: 1fr; }
  .pager-next { grid-column: 1; }
  .why { margin-left: 8px; }
  .page-hero { padding: 26px 0; }
  .prose h2 { font-size: 1.55rem; }
  .prose h3 { font-size: 1.22rem; }
  .ct-view { margin-left: 0; }
  .mega { grid-template-columns: 1fr; }
  .w-head, .w-body, .pw-panel, .tp-panel, .ct-side { padding-left: var(--sp-2); padding-right: var(--sp-2); }
  .pw-stage, .fo-stage, .ct-stage { padding: 6px; }
  .tab-pane { padding: 4px 12px 8px; }
  figure.diagram { padding: 10px; }
  figure.diagram figcaption { padding-right: 0; }
  .bandmap { padding: 14px; }
  .az-bar { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }   /* one scrollable row on phones */
  .lightbox { padding: 8px; }
  .lb-panel { max-height: calc(100vh - 16px); }
}

/* ------------------------------------------------------------------ motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .hv-anim { display: none; }
  .hv-static { display: inline; }
  .hs { animation: none; }
  .tp-flow { display: none; }
}

/* ------------------------------------------------------------------ print: lessons and the test plan */
@media print {
  :root, :root[data-theme="dark"], :root:not([data-theme="light"]) {
    --bg: #fff; --bg-soft: #fff; --surface: #fff; --surface-2: #f6f7f9; --surface-3: #eceff4; --ink: #000; --text: #111; --muted: #444; --faint: #555;
    --line: #c8ccd4; --line-strong: #9aa1ad; --code-bg: #f6f7f9; --code-ink: #111; --term-bg: #fff; --term-ink: #111; --accent-soft: #fff3ef; --ok-soft: #eef8f3;
    color-scheme: light;
  }
  @page { margin: 16mm 14mm; }
  body { font-size: 10.5pt; background: #fff; color: #111; }
  .site-header, .site-footer, .sidebar, .toc, .pager, .complete-bar, .copy, .search-dialog, .w-controls, .reading-progress, .section-menu, .zoom-btn,
  .resume-card, .hero-actions, .skip, .topo-expand, .ct-nav, .ct-side-actions, .pw-nav, .q-actions, .scn-actions, .quiz-review, .filterbar, .az-bar,
  .tsum-row, .lightbox, .hero-visual, .tp-panel, .topo-text, .ct-picker { display: none !important; }
  .layout, .layout.has-sidebar, .layout.has-toc, .layout.has-sidebar.has-toc { display: block; padding: 0; }
  .wrap { max-width: none; padding: 0; }
  .page-hero, .home-hero { background: none !important; border: 0; padding: 0 0 12pt; color: #111; }
  .page-hero::after, .hero-bg { display: none; }
  .home-hero h1, .hero-stats strong { color: #000; }
  .hero-lead, .hero-stats span, .hero-chip { color: #333; }
  .prose > * { max-width: none !important; }
  a { color: inherit; text-decoration: underline; }
  .prose a[href]:not([href^="#"]):not(.card)::after { content: " (" attr(href) ")"; font-size: .8em; color: #555; overflow-wrap: anywhere; }
  .terminal, .term-scroll, .code, .code pre, .w-pre { background: #fff !important; box-shadow: none; border: 1px solid #bbb; }
  .term-bar { background: #eee !important; border-bottom: 1px solid #bbb; }
  .term-title { color: #333; }
  .term-body, .t-cmd, .t-prompt { color: #111 !important; }
  .t-note, .terminal figcaption { color: #444 !important; background: #fff; }
  .term-body, .code pre { white-space: pre-wrap; overflow: visible; overflow-wrap: anywhere; width: auto; }
  .table-wrap { overflow: visible; background: none; }
  figure, .terminal, .code, .callout, .q, .scenario, .widget, .topology, .phase-card, tr, .deep-dive { break-inside: avoid; }
  h2, h3, h4 { break-after: avoid; }
  .tab-pane[hidden], .hint[hidden], .scn-answer[hidden] { display: block !important; }
  .t-det[hidden] { display: table-row !important; }
  tbody.t-row[hidden] { display: table-row-group !important; }
  .tab-list { display: none; }
  .topo-body { display: block; }
  .topo-h { display: block !important; }
  .topo-v { display: none !important; }
  .tp-flow { display: none; }
  figure.diagram > svg { min-width: 0; }
}

/* ------------------------------------------------------------------ SIPA widget (zones reuse the packet-walk look) */
.sipa-z-dev { stroke: var(--line-strong); fill: color-mix(in srgb, var(--surface-3) 45%, transparent); }
.sipa-z-zs { stroke: color-mix(in srgb, var(--oci) 70%, transparent); fill: color-mix(in srgb, var(--oci-soft) 35%, transparent); }
.sipa-z-you { stroke: color-mix(in srgb, var(--site1) 70%, transparent); fill: color-mix(in srgb, var(--site1-soft) 35%, transparent); }
.sipa-z-saas { stroke: color-mix(in srgb, var(--site3) 70%, transparent); fill: color-mix(in srgb, var(--site3-soft) 35%, transparent); }
.sipa-t-dev { fill: var(--muted); } .sipa-t-zs { fill: var(--oci-ink); } .sipa-t-you { fill: var(--site1-ink); } .sipa-t-saas { fill: var(--site3-ink); }
.sipa-zone.is-unused { opacity: .35; }
.sipa-zone.is-unused rect { stroke-dasharray: 6 5; }
