/* ==========================================================================
   NTpath — styles
   1. Tokens  2. Base  3. Layout  4. Header & search  5. Components
   6. Page-specific  7. Responsive  8. Print
   ========================================================================== */

/* Fonts: self-hosted (SIL Open Font License; see assets/fonts/OFL-*.txt) */
/* Type identity (resources/IDENTITY.md · Type, 2026-11-13): Bricolage Grotesque for titles (optical sizes),
   Newsreader for leads, Atkinson Hyperlegible Next for everything read and every label, Martian Mono only for code:
   commands, code blocks and the console. The wordmark is drawn (outlined SVG), not set in a font. */
@font-face { font-family: "Bricolage Grotesque"; font-style: normal; font-weight: 500 800; font-display: swap; src: url("../fonts/bricolage-grotesque.woff2") format("woff2"); }
@font-face { font-family: "Atkinson Hyperlegible Next"; font-style: normal; font-weight: 400 700; font-display: swap; src: url("../fonts/atkinson-hyperlegible-next.woff2") format("woff2"); }
@font-face { font-family: "Atkinson Hyperlegible Next"; font-style: italic; font-weight: 400 600; font-display: swap; src: url("../fonts/atkinson-hyperlegible-next-italic.woff2") format("woff2"); }
@font-face { font-family: "Newsreader"; font-style: normal; font-weight: 400 500; font-display: swap; src: url("../fonts/newsreader.woff2") format("woff2"); }
@font-face { font-family: "Martian Mono"; font-style: normal; font-weight: 400 700; font-display: swap; src: url("../fonts/martian-mono.woff2") format("woff2"); }

/* 1. Tokens --------------------------------------------------------------- */
/* Palette from the NTpath identity: Night neutrals, Packet blue (the logo and the dark accent),
   Backbone and Fiber blues (the light accent and motion), Signal teal for routing in diagrams.
   See resources/IDENTITY.md. */
:root {
  --night-0: #ffffff;   --night-50: #f4f6fa;  --night-100: #e9edf4; --night-200: #d5dce7;
  --night-300: #cbd5e1; --night-400: #94a3b8; --night-500: #64748b; --night-600: #3a4763;
  --night-700: #26324a; --night-800: #1a2438; --night-900: #121a2b; --night-950: #0b1220;
  --signal-50: #f0fdfa;  --signal-100: #ccfbf1; --signal-200: #99f6e4; --signal-300: #5eead4;
  --signal-400: #2dd4bf; --signal-500: #14b8a6; --signal-600: #0891b2; --signal-700: #0e7490;
  --signal-800: #155e75; --signal-900: #164e63;
  --frost: #e6edf7;
  --packet-300: #7dd3fc;
  --packet: #38bdf8;       /* Packet: the logo accent and the dark view's accent */
  --packet-600: #0284c7;   /* Deep Packet: the logo accent on light grounds */
  --packet-700: #0369a1;   /* Link: "path" in the wordmark on light grounds */
  --backbone: #003399;  /* deep blue: switching and L2 on light grounds */
  --fiber: #3399ff;     /* bright blue: switching and L2 on dark grounds */

  /* Light view: a Mist page with white cards, Night text, Backbone as the accent and Fiber for motion and
     highlights. The logo uses Deep Packet. Fiber is too light for text or focus rings on white (2.9:1). */
  --bg: var(--night-50);          /* Mist page: white surfaces lift off it, as the Night levels do in dark */
  --bg-soft: var(--night-100);
  --surface: var(--night-0);
  --border: var(--night-300);
  --border-strong: var(--night-400);
  --text: var(--night-950);
  --text-soft: var(--night-700);
  --muted: var(--night-600);
  --accent: var(--backbone);
  --accent-hover: color-mix(in srgb, var(--backbone) 78%, black);
  --accent-soft: color-mix(in srgb, var(--fiber) 16%, white);
  --packets: var(--fiber);    /* the moving dashes on rails and network branches */
  --focus: var(--backbone);
  --on-accent: #ffffff;
  --link: var(--backbone);                                        /* Backbone: links on light grounds */
  --link-hover: color-mix(in srgb, var(--backbone) 78%, black);
  --on-ok: #ffffff;
  --on-danger: #ffffff;
  --ccna: var(--night-700);                                        /* exam labels stay neutral, not in the identity colours (Juan) */
  --ccna-soft: var(--night-100);
  --needs-labs: var(--backbone);
  --needs-labs-soft: color-mix(in srgb, var(--fiber) 20%, white);   /* Fiber tint, only ever behind Backbone (Fiber is too light for text here) */
  --ccnp: #4f46e5;
  --ccnp-soft: #eef2ff;
  --ok: #15803d;
  --ok-soft: #f0fdf4;
  --warn: #b45309;
  --danger: #b91c1c;
  /* Study status (Juan, 2026-11-16): In progress is yellow, Needs review orange, apart at a glance in both themes.
     The plain tone fills dots, hatching and bars; the ink is for text, borders and glyphs (4.5:1 on white). */
  --st-progress: #eab308;
  --st-progress-ink: #a16207;
  --st-review: #f97316;
  --st-review-ink: #c2410c;
  --code-bg: var(--night-100);
  --info-bg: color-mix(in srgb, var(--fiber) 12%, white);
  --info-border: color-mix(in srgb, var(--fiber) 50%, white);
  --shadow: 0 1px 2px rgb(11 18 32 / 0.08), 0 2px 8px rgb(11 18 32 / 0.08);
  /* Lit panels (light theme, every boxed panel on every page): lit from the top left, a faint Backbone glow, a soft
     Backbone shadow. The dark theme turns them flat (the same tokens, below). */
  --lit-panel: linear-gradient(160deg, var(--surface) 0%, var(--frost) 100%);
  --lit-glow: radial-gradient(120% 90% at 0% 0%, rgb(0 51 153 / .07), transparent 60%);
  --lit-shadow: 0 1px 2px rgb(0 51 153 / .06), 0 14px 32px -18px rgb(0 51 153 / .28);
  --lit-shadow-soft: 0 1px 2px rgb(0 51 153 / .05), 0 10px 24px -20px rgb(0 51 153 / .25);
  --lit-shadow-hover: 0 2px 4px rgb(0 51 153 / .08), 0 20px 40px -18px rgb(0 51 153 / .36);
  --overline-weight: 600;   /* small capitals need the extra weight on light grounds */
  --smoothing: auto;        /* keep macOS stem darkening for dark text on light */
  --scrim: rgb(11 18 32 / 0.55);

  /* The N mark: same shape in both themes, only these colors swap. */
  --mark-accent: var(--packet-600);
  --mark-line: var(--night-950);
  --mark-gap: var(--night-200);
  --mark-ground: var(--bg);
  --wordmark-accent: var(--packet-700);   /* "path" in the wordmark: the logo is Packet blue */

  --dg-route: var(--signal-700);   /* routers are teal in diagrams (identity), distinct from Backbone switches */
  --dg-switch: var(--backbone);
  --dg-security: #c2410c;
  --dg-end: #475569;
  --dg-cloud: var(--ccnp);
  --dg-services: #0369a1;   /* identity: Services keep Link blue in diagrams, distinct from Backbone switches */
  --ni-tint: 10%;
  --dg-link: var(--night-500);
  /* Interface (port) states: the N mark's ring. Up is green (status) and blinks; down, pending and blocked stay still. */
  --dg-port-up: var(--ok);
  --dg-port-down: var(--danger);
  --dg-port-blocked: var(--warn);
  --dg-vlan-1: #0e7490;
  --dg-vlan-2: #b45309;
  --dg-vlan-3: #be185d;
  --dg-vlan-4: #6d28d9;

  --font-display: "Bricolage Grotesque", "Atkinson Hyperlegible Next", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-serif: "Newsreader", Georgia, "Times New Roman", serif;
  --font: "Atkinson Hyperlegible Next", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "Martian Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  /* The page frame (Juan, 2026-11-14): content spans the header, from the logo to its last control. Reading text fills
     its column in that frame (--measure: the column), in a reading ink one step softer than titles. */
  --measure: 100%;
  --text-read: var(--night-800);
  /* Reading size (Juan, 2026-11-14: reading difficulties, attention): one step above the fluid root size, so long
     reading grows with the window (about 18 px on phones, 20.5 px at 1440 px, 23 px on large screens), 1.7 leading. */
  --read-size: 1.0625rem;
  --read-leading: 1.7;
  --radius: 10px;
  --radius-sm: 6px;
  --header-h: 60px;
  /* The page frame, as postman.com (Juan, 2026-11-15): a centred 1200 px column shared by the header and the content,
     24 px side margins below that (20 px on small phones). */
  --gutter: 24px;
  --maxw: calc(1200px + 2 * var(--gutter));
  /* The menu always spans the whole window (Juan, 2026-11-15): 2 cm side margins on wide screens, 16 px on phones. */
  --header-gutter: clamp(16px, 5.25vw, 2cm);
  color-scheme: light;
  /* The Morning (Juan, 2026-11-15): the light page's ground, the twin of the dark view's Night Ramp. The top is a sky
     wash (Packet 50) with a soft Fiber glow behind the logo and the title, the reading area is Mist as before, and the
     end settles to Frost above the footer. The header takes the sky tint. */
  --page-ground: radial-gradient(70% 520px at 18% 0%, rgb(51 153 255 / .10), transparent 70%),
    linear-gradient(180deg, #f0f9ff 0px, var(--night-50) 720px, var(--night-50) calc(100% - 900px), var(--frost) 100%);
  --header-tint: #f0f9ff;
  /* The foot glow (Juan, 2026-11-15): the top's Fiber glow mirrored at the end of every page, rising from the footer. */
  --page-foot: radial-gradient(70% 520px at 18% 100%, rgb(51 153 255 / .10), transparent 70%);
}

/* No-JS fallback: follow the OS when the theme script did not run (screen only: print is always light). */
@media screen and (prefers-color-scheme: dark) {
  :root:not([data-theme]) { color-scheme: dark; }
}

/* Dark view: Night ground, Frost text, Packet accent (it pairs with the logo, as Backbone leads the light view).
   The Night Ramp (2026-11-04): pages read on Night 900, cards on Night 800, raised parts on Night 700. The top of each
   page has a Packet dawn and the end settles to Night 950 (--bg-end), following the scroll (.sky, app.js initSky). */
/* Screen only (house rule): printed pages and PDFs always use the light theme. */
@media screen {
:root[data-theme="dark"] {
  --page-ground: none;   /* the dark view has its own ground: the Night Ramp (.sky) */
  --page-foot: radial-gradient(70% 55% at 50% 108%, color-mix(in srgb, var(--packet) 13%, transparent) 0%, transparent 70%);   /* the dawn, mirrored */
  --header-tint: var(--bg);
  --bg: var(--night-900);
  --bg-soft: var(--night-700);
  --bg-end: var(--night-950);
  --surface: var(--night-800);
  --border: var(--night-600);
  --border-strong: var(--night-500);
  --text: var(--frost);
  --text-soft: var(--night-300);
  --muted: var(--night-400);
  --accent: var(--packet);
  --packets: var(--packet);
  --focus: var(--packet);
  --wordmark-accent: var(--packet);
  --dg-route: var(--signal-400);
  --accent-hover: var(--packet-300);
  --accent-soft: #0e2a3e;
  --on-accent: var(--night-950);
  --link: var(--packet);
  --link-hover: var(--packet-300);
  --on-ok: #052e16;
  --on-danger: #2b0b0b;
  --ccna: var(--night-200);
  --ccna-soft: var(--night-700);
  --needs-labs: var(--packet);
  --needs-labs-soft: #0e2a3e;
  --ccnp: #a5b4fc;
  --ccnp-soft: #1c1f45;
  --ok: #4ade80;
  --ok-soft: #0f2a1a;
  --warn: #fbbf24;
  --danger: #f87171;
  --st-progress: #facc15;
  --st-progress-ink: #facc15;
  --st-review: #ff8a3d;
  --st-review-ink: #ff8a3d;
  --code-bg: var(--night-950);
  --info-bg: var(--accent-soft);
  --info-border: #1b4560;
  --shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 4px 16px rgb(0 0 0 / 0.25);
  /* Lit panels stay flat on Night: the card colour, no glow, no shadow (the hover keeps the site's shadow). */
  --lit-panel: linear-gradient(var(--surface), var(--surface));
  --lit-glow: linear-gradient(transparent, transparent);
  --lit-shadow: none;
  --lit-shadow-soft: none;
  --lit-shadow-hover: var(--shadow);
  --overline-weight: 500;
  --text-read: var(--night-200);
  --smoothing: antialiased;  /* light text on dark reads best with grayscale smoothing */

  --mark-accent: var(--packet);
  --mark-line: var(--frost);
  --mark-gap: var(--night-700);

  --dg-security: #fb923c;
  --dg-switch: var(--fiber);
  --dg-services: var(--packet);
  --ni-tint: 16%;
  --dg-end: var(--night-400);
  --dg-link: #7b8aa0;
  --dg-vlan-1: #22d3ee;
  --dg-vlan-2: #fbbf24;
  --dg-vlan-3: #f472b6;
  --dg-vlan-4: #a78bfa;
  color-scheme: dark;
}
}

/* Night Ramp (dark view only): two fixed light layers behind the page. Their opacity follows the scroll (--dawn, --rest,
   written by initSky in app.js): a Packet dawn over the first screen, Night 950 over the last. Only opacity changes, so
   nothing repaints. With reduced motion the dawn is painted once at the top and scrolls away with the page. */
.sky { display: none; }
@media screen {
  :root[data-theme="dark"] .sky { display: block; position: fixed; inset: 0; z-index: -1; pointer-events: none; }
  :root[data-theme="dark"] .sky-dawn {
    opacity: var(--dawn, 1);
    background:
      radial-gradient(70% 55% at 50% -8%, color-mix(in srgb, var(--packet) 13%, transparent) 0%, transparent 70%),
      linear-gradient(180deg, var(--night-800) 0%, var(--night-900) 62%);
    -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 55%, transparent 100%);
    mask-image: linear-gradient(180deg, #000 0%, #000 55%, transparent 100%);
  }
  :root[data-theme="dark"] .sky-rest { opacity: calc(var(--rest, 0) * 0.95); background: linear-gradient(180deg, transparent 0%, var(--bg-end) 45%); }
  /* The header is frosted Night; its hairline appears as content slides under it. */
  :root[data-theme="dark"] .site-header {
    background: color-mix(in srgb, var(--night-900) calc(55% + 25% * (1 - var(--dawn, 1))), transparent);
    border-bottom-color: color-mix(in srgb, var(--border) calc(100% * (1 - var(--dawn, 1))), transparent);
    -webkit-backdrop-filter: saturate(150%) blur(20px); backdrop-filter: saturate(150%) blur(20px);
  }
  :root[data-theme="dark"] .site-footer { background: var(--bg-end); }
}
@media screen and (prefers-reduced-motion: reduce) {
  :root[data-theme="dark"] .sky-dawn { position: absolute; bottom: auto; height: 120vh; opacity: 1; }
  :root[data-theme="dark"] .sky-rest { display: none; }
}

/* 2. Base ----------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

/* Fluid size (Juan, 2026-11-14: larger, easier reading everywhere; kept on 2026-11-15): the root size grows with the
   window, 17 px on phones, about 19 px at 1440 px, up to 22 px on large screens. Nearly every size is in rem, so text,
   controls and spacing scale together; the visitor's own browser size still counts (rem in the clamp is the default). */
html { font-size: clamp(1.0625rem, .8rem + .45vw, 1.375rem); }
@media print { html { font-size: 16px; } }
@media (max-width: 480px) { :root { --gutter: 20px; } }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); scrollbar-gutter: stable; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--page-ground, none) var(--bg);
  color: var(--text);
  font: 1rem/1.625 var(--font);
  font-optical-sizing: auto;
  -webkit-font-smoothing: var(--smoothing);
}

/* Type scale (identity): Bricolage Grotesque for titles, Newsreader for leads, Atkinson Hyperlegible Next for
   everything read, sentence case throughout. Tracking tightens with size (+0.5% at 14 px to −2% at 40 px). */
h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 .5em; text-wrap: balance; }
h1, h2 { font-family: var(--font-display); font-weight: 600; }
h1 { font-size: clamp(1.9rem, 1.4rem + 1.6vw, 2.5rem); line-height: 1.15; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.35rem, 1.1rem + .8vw, 1.75rem); letter-spacing: -0.012em; margin-top: 2rem; }
h3 { font-size: 1.15rem; font-weight: 700; letter-spacing: -0.005em; }
/* Reading comfort (Juan, 2026-11-13, size 2026-11-14): study notes, docs and news read at the reading size
   (--read-size, 19 px; 18 on phones) with 1.7 leading, about 70 characters a line (--measure scales with the size), in
   the reading ink, a full line apart between paragraphs. Ragged right, never justified. */
.card-section, .docs-section, .news-section { font-size: var(--read-size); line-height: var(--read-leading); }
.page-head ~ .lead, .card-section > p, .card-section > ul, .card-section > ol, .docs-section > p, .docs-section > ul, .docs-section > ol,
.news-section > p, .news-section > ul, .news-section > ol {
  max-width: var(--measure); color: var(--text-read); line-height: var(--read-leading); text-wrap: pretty; }
:is(.card-section, .docs-section, .news-section) :is(p, li) { line-height: var(--read-leading); }
:is(.card-section, .docs-section, .news-section) p { margin-bottom: 1em; }
:is(.card-section, .docs-section, .news-section) li + li { margin-top: .45em; }

/* Leads (the line under a page title): Newsreader, the reading voice. */
.page-head .lead, .hero .lead, .hero-split .lead, .docs-abstract { font-family: var(--font-serif); font-weight: 400; letter-spacing: -.002em; }
p { margin: 0 0 1rem; }
a { color: var(--link); text-decoration: none; }
a:hover { color: var(--link-hover); text-decoration: underline; }
ul, ol { padding-left: 1.25rem; }
li + li { margin-top: .3rem; }
code, kbd, pre { font-family: var(--mono); font-size: .875em; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
h1:focus { outline: none; }
/* Overline (Label): readout labels, table heads, the exam switch. Capitals, four words at most:
   Atkinson Hyperlegible Next 12/16, +7% tracking: weight 600 on light grounds, 500 on dark. */
.readout-label, .sidebar h2, .settings-section h2, th, .netpaths-src, .meter-label, .live-progress-label, .config-device, .pg-exam a {
  font-family: var(--font); font-weight: var(--overline-weight); font-size: .75rem; line-height: 16px; text-transform: uppercase; letter-spacing: .07em; }
/* Page and section labels (eyebrows): the "Small" style as written, in sentence case, with no marker. */
.eyebrow { font-family: var(--font); font-weight: 600; font-size: .875rem; line-height: 20px; }

.muted { color: var(--muted); }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
.skip-link { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--accent); color: var(--on-accent); padding: 8px 12px; border-radius: var(--radius-sm); }
.skip-link:focus { left: 8px; }

/* 3. Layout --------------------------------------------------------------- */
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
.site-main { flex: 1; padding: 32px 0 64px; position: relative; }
/* The foot glow: the page's top glow mirrored above the footer (--page-foot, both themes), at most 70 % of the screen
   tall and never taller than the page. Behind everything on the page; not in print, NTprompt or capture mode. */
.site-main::after { content: ""; position: absolute; inset: auto 0 0; height: min(70vh, 100%); z-index: -1; pointer-events: none; background: var(--page-foot, none); }
:root:is(.ntprompt-on, .studio-on, [data-capture]) .site-main::after { display: none; }
@media print { .site-main::after { display: none; } }
.site-main:focus { outline: none; }
/* Hidden for the first moments so a fast load never flashes a generic message. */
.loading { color: var(--muted); opacity: 0; animation: loading-in .2s .35s forwards; }
/* A pre-rendered page (tools/build_pages.py) is for search engines and browsers without JavaScript. With JavaScript the app
   draws the same page in its full form a moment later, so the plain copy stays hidden instead of flashing. */
[data-js] main[data-prerendered] > * { visibility: hidden; }
@keyframes loading-in { to { opacity: 1; } }

.with-sidebar {
  display: grid;
  grid-template-columns: 16rem minmax(0, 1fr);   /* the sidebar grows with the text, so topic names keep their lines */
  gap: 3rem;
  align-items: start;
}
.sidebar {
  position: sticky;
  top: calc(var(--header-h) + 24px);
  max-height: calc(100vh - var(--header-h) - 48px);
  overflow-y: auto;
  font-size: .9rem;
}
.sidebar h2 { color: var(--muted); margin: 1.25rem 0 .5rem; }
.sidebar h2:first-child { margin-top: 0; }
.sidebar ul { list-style: none; padding: 0; margin: 0; }
.sidebar li + li { margin-top: 2px; }
.sidebar a {
  display: flex; justify-content: space-between; gap: 8px;
  padding: 6px 10px; border-radius: var(--radius-sm); color: var(--text-soft);
}
.sidebar a:hover { background: var(--bg-soft); text-decoration: none; color: var(--text); }
.sidebar a[aria-current="page"] { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.btn.drawer-btn { display: none; }
.content { min-width: 0; }   /* the content column runs to the frame's right edge (the header's last control) */

/* 4. Header & search ------------------------------------------------------ */
.site-header {
  position: sticky; top: 0; z-index: 50;
  height: var(--header-h);
  background: color-mix(in srgb, var(--header-tint, var(--bg)) 85%, transparent);
  backdrop-filter: saturate(180%) blur(10px);
  -webkit-backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--border);
}
.header-inner { height: 100%; display: flex; align-items: center; gap: 20px; }
.site-header > .container { max-width: none; padding: 0 var(--header-gutter); }   /* the menu: the whole window width */
/* Brand: the N mark is the "N" of the wordmark. Node centers sit on the cap height and baseline of "Tpath". */
.brand { display: flex; align-items: center; font-size: 1.45rem; line-height: 1; color: var(--text); }
.brand:hover { text-decoration: none; color: var(--text); }
.brand-n { height: .99em; width: .99em; flex: none; overflow: visible; margin-right: .02em; }
/* The wordmark is drawn (tools/identity/wordmark.py), not typed: its 72-unit view box holds a 40-unit cap that matches
   the mark's node rows (.99em × 36/49), and both are centred on the cap's middle. */
.brand-word { height: 1.3086em; width: auto; flex: none; overflow: visible; }
.brand-word .wm-caret { display: none; }
.brand-path { color: var(--wordmark-accent); }   /* "NT" the network, "path" the signal */
.mark-gap, .mark-dash, .mark-line { fill: none; stroke-linecap: butt; }
.mark-gap { stroke: var(--mark-gap); }
.mark-dash { stroke: var(--mark-accent); }
.mark-line { stroke: var(--mark-line); }
.mark-ring { fill: var(--mark-ground); stroke: var(--mark-accent); }
.mark-dot { fill: var(--mark-line); }
.primary-nav { display: flex; gap: 4px; }
.primary-nav a[hidden] { display: none; }
.primary-nav a { padding: 6px 12px; border-radius: var(--radius-sm); color: var(--text-soft); font-size: .925rem; font-weight: 500; white-space: nowrap; }
.primary-nav a:hover { background: var(--bg-soft); color: var(--text); text-decoration: none; }
.primary-nav a[aria-current="page"] { color: var(--accent); background: var(--accent-soft); }
/* Certs, like Apple's Store menu (app.js buildNav). Wide screens: a flyout that continues the header (the header turns
   solid and loses its hairline), its items fade in one after another, and the page behind is blurred. A column of
   brands, then one column per exam: its large name, then its own pages. Phones: see the curtain below. */
.nav-certs { display: flex; }
.nav-group {
  display: inline-flex; align-items: center; gap: 4px; padding: 6px 12px; border: 0; border-radius: var(--radius-sm);
  background: none; color: var(--text-soft); font: 500 .925rem var(--font); cursor: pointer;
}
.nav-group svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s; }
.nav-group:hover, .nav-certs.is-open .nav-group { color: var(--text); }
.nav-certs.is-open .nav-group svg { transform: rotate(180deg); }
.nav-certs:has([aria-current="page"]) .nav-group { color: var(--accent); }
.certs-back { display: none; }
.site-header.is-flyout, :root[data-theme] .site-header.is-flyout { background: var(--bg); border-bottom-color: transparent; }
.certs-menu {
  position: absolute; top: 100%; left: 0; right: 0; z-index: 5; max-height: calc(100vh - var(--header-h)); overflow-y: auto;
  background: var(--bg); visibility: hidden; clip-path: inset(0 0 100% 0);
  transition: clip-path .36s cubic-bezier(.4,0,.2,1), visibility 0s linear .36s;
}
.nav-certs.is-open .certs-menu { visibility: visible; clip-path: inset(0); transition: clip-path .36s cubic-bezier(.4,0,.2,1), visibility 0s; }
.certs-inner { display: flex; gap: 56px; max-width: none; margin: 0; padding: 32px var(--header-gutter) 64px; }   /* the Certs flyout continues the menu, full width */
.certs-col { min-width: 0; }
.certs-brands { min-width: 180px; padding-right: 40px; border-right: 1px solid var(--border); }
.certs-panel { display: flex; gap: 56px; min-width: 0; }
.certs-panel[hidden] { display: none; }
.certs-exam { min-width: 200px; }
.certs-exam .certs-head { margin: 2px 0 10px; }
.certs-sub { margin: 14px 0 4px; font-size: .7rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.certs-brand { display: flex; align-items: baseline; gap: 10px; width: 100%; padding: 5px 0; border: 0; background: none; font: 600 .8rem var(--font); color: var(--text-soft); text-align: left; cursor: pointer; }
.certs-brand:hover, .certs-brand[aria-pressed="true"] { color: var(--accent); }
.certs-head { margin: 0 0 14px; font-size: .75rem; font-weight: 500; color: var(--muted); }
.certs-big, .certs-small { list-style: none; margin: 0; padding: 0; }
.certs-big li, .certs-small li { margin: 0; opacity: 0; transform: translateY(-6px); transition: opacity .2s ease, transform .2s ease; }
.nav-certs.is-open .certs-big li, .nav-certs.is-open .certs-small li { opacity: 1; transform: none; transition-delay: calc(80ms + var(--i, 0) * 18ms); }
.primary-nav .certs-big a { display: block; padding: 0 0 2px; font-family: var(--font-display); font-size: 1.6rem; font-weight: 600; letter-spacing: -.01em; line-height: 1.2; color: var(--text); white-space: nowrap; }
.primary-nav .certs-big a:hover { background: none; color: var(--accent); }
.primary-nav .certs-big a[aria-current="page"] { background: none; color: var(--accent); }
.certs-big .certs-code { font-family: var(--font); font-size: .55em; font-weight: 500; color: var(--muted); }
.primary-nav .certs-small a { display: flex; align-items: baseline; gap: 10px; padding: 5px 0; font-size: .8rem; font-weight: 600; color: var(--text-soft); white-space: nowrap; }
.primary-nav .certs-small a:hover { background: none; color: var(--accent); }
.certs-count { font-size: .7rem; font-weight: 400; color: var(--muted); }
.certs-small .is-soon { display: flex; align-items: center; gap: 8px; padding: 5px 0; font-size: .8rem; font-weight: 600; color: var(--muted); white-space: nowrap; }
.certs-scrim {
  position: fixed; inset: var(--header-h) 0 0; z-index: 49; background: color-mix(in srgb, var(--bg) 30%, transparent);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); opacity: 0; transition: opacity .3s ease;
}
.certs-scrim.is-on { opacity: 1; }
.tag-soon { height: 18px; padding: 0 7px; font-size: .66rem; letter-spacing: .02em; text-transform: none; }
@media (prefers-reduced-motion: reduce) {
  .certs-menu, .nav-certs.is-open .certs-menu, .certs-big li, .certs-small li, .nav-certs.is-open .certs-big li, .nav-certs.is-open .certs-small li, .certs-scrim { transition: none; }
}
.primary-nav .menu-close { display: none; }

.search { position: relative; margin-left: auto; width: 160px; transition: width .2s ease-out; }
.search:focus-within { width: 240px; }   /* short at rest, room to type once in use */
@media (prefers-reduced-motion: reduce) { .search { transition: none; } }
.search-input {
  width: 100%; height: 36px; padding: 0 32px 0 12px;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--bg-soft); color: var(--text); font: inherit; font-size: .9rem;
}
.search-input:focus { outline: none; border-color: var(--accent); background: var(--surface); box-shadow: 0 0 0 3px var(--accent-soft); }
.search-input::-webkit-search-cancel-button { display: none; }
.search-results {
  position: absolute; top: calc(100% + 6px); right: 0; width: min(420px, calc(100vw - 32px));
  max-height: 70vh; overflow-y: auto; margin: 0; padding: 6px; list-style: none;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow);
}
.search-results li + li { margin-top: 2px; }
.search-results a { display: block; padding: 8px 10px; border-radius: var(--radius-sm); color: var(--text); }
.search-results a:hover, .search-results [aria-selected="true"] a { background: var(--accent-soft); text-decoration: none; }
.search-results .result-type { font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.search-results .result-title { display: block; font-weight: 500; }
.search-results .result-ctx { display: block; font-size: .8rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search-results .empty { padding: 10px; color: var(--muted); font-size: .9rem; }

.icon-btn {
  display: inline-grid; place-items: center; width: 36px; height: 36px; flex: none;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: transparent; color: var(--text-soft); cursor: pointer;
}
.icon-btn:hover { background: var(--bg-soft); color: var(--text); }
.icon-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.menu-btn { display: none; }
@media screen { [data-theme="dark"] .icon-sun, :root:not([data-theme="dark"]) .icon-moon { display: none; } }

/* 5. Components ----------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 18px;
  border-radius: var(--radius-sm); border: 1px solid var(--border-strong);
  background: var(--surface); color: var(--text); font: inherit; font-size: .925rem; font-weight: 500; cursor: pointer;
}
.btn:hover { text-decoration: none; border-color: var(--accent); color: var(--accent); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn-danger { background: var(--danger); border-color: var(--danger); color: var(--on-danger); }
.btn-danger:hover { background: var(--danger); border-color: var(--danger); color: var(--on-danger); filter: brightness(1.1); }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--on-accent); }
.btn-done { background: var(--ok-soft); border-color: var(--ok); color: var(--ok); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }
.update-notice { position: fixed; z-index: 70; left: 50%; bottom: 16px; display: flex; align-items: center; gap: 12px; padding: 8px 8px 8px 16px; transform: translateX(-50%); border: 1px solid var(--border); border-radius: 999px; background: var(--surface); box-shadow: 0 8px 24px -8px rgb(11 18 32 / .35); font-size: .9rem; white-space: nowrap; }

.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }

.card {
  position: relative; display: flex; flex-direction: column; gap: 8px;
  padding: 20px; border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface); color: var(--text); transition: border-color .15s, box-shadow .15s, transform .15s;
}
a.card:hover { text-decoration: none; color: var(--text); border-color: var(--border-strong); box-shadow: var(--shadow); transform: translateY(-1px); }
.card h3 { margin: 0; }
.card p { margin: 0; color: var(--text-soft); font-size: .925rem; }
.card-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 14px; font: 400 .72rem/1.8 var(--font); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-variant-numeric: tabular-nums; }

.tag {
  display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 999px;
  font-size: .72rem; font-weight: 600; letter-spacing: .02em; white-space: nowrap;
  background: var(--bg-soft); color: var(--text-soft); border: 1px solid var(--border);
}
.tag-ccna { background: var(--ccna-soft); color: var(--ccna); border-color: transparent; }
.tag-ccnp { background: var(--ccnp-soft); color: var(--ccnp); border-color: transparent; }
.tag-beginner { color: var(--ok); }
.tag-intermediate { color: var(--warn); }
.tag-advanced { color: var(--danger); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }

/* Meters are packet segments, like the dashes on the logo's diagonal. */
/* Progress bars: the stacked capsule (meter() in views/shared.js). A slim rounded track; the fill has a soft top
   highlight. Unit progress (.meter-units): ready solid green, in progress hatched amber (as on "The exam to scale"),
   not started empty. Plain progress: the accent fill, green once complete. The percentage rides in a pill at the end
   of the fill; the breakdown is in words under it. Hand-written .meter markup gets the capsule too. */
.meter-label { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 6px; color: var(--muted); }
.meter-bar { position: relative; display: flex; align-items: center; min-height: 22px; }
.meter-bar.is-compact { min-height: 0; }
.meter-bar > .meter { flex: 1; }   /* only beside its pill: in a column (a readout card) a bar keeps its 10 px */
.meter { position: relative; display: flex; flex: none; min-width: 0; height: 10px; border-radius: 999px; background: var(--bg-soft); box-shadow: inset 0 0 0 1px var(--border-strong); overflow: hidden; }
.meter > span { display: block; flex: none; height: 100%; }
.meter > span:first-child { border-radius: 999px; background: linear-gradient(180deg, rgb(255 255 255 / .28), transparent 55%), var(--accent); }
.meter-ok > span:first-child, .meter-units > span:first-child { background: linear-gradient(180deg, rgb(255 255 255 / .28), transparent 55%), var(--ok); }
.meter-units > .meter-fill:not([style*="width:0%"]) + .meter-going { margin-left: -5px; padding-left: 5px; }   /* tucks under the fill's rounded end */
.meter-units > .meter-fill[style*="width:0%"] + .meter-going { border-radius: 999px; }
.meter-going { border-radius: 0 999px 999px 0; background: repeating-linear-gradient(135deg, var(--st-progress) 0 2px, color-mix(in srgb, var(--st-progress) 22%, transparent) 2px 6px); }
.meter-units > .meter-fill { position: relative; z-index: 1; }
.meter-pill { position: absolute; top: 50%; left: clamp(20px, var(--pct), calc(100% - 20px)); z-index: 2; padding: 1px 7px; border: 1px solid var(--border-strong); border-radius: 999px; background: var(--surface); color: var(--accent); font: 600 .72rem/16px var(--font); font-variant-numeric: tabular-nums; white-space: nowrap; box-shadow: 0 2px 6px -2px rgb(11 18 32 / .25); transform: translate(-50%, -50%); }
.meter-ok ~ .meter-pill { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 45%, var(--border-strong)); }
.meter-key { margin: 6px 0 0; color: var(--text-soft); font-size: .82rem; font-variant-numeric: tabular-nums; }
/* Scroll motion (Juan, 2026-11-15): on every page, each block fades and rises 16 px into place as it enters the screen,
   tied to the scroll (it reverses when you scroll back). CSS only, so nothing is ever hidden: browsers without support,
   reduced motion, print and the guide's screenshots show the page as it is. A block inside another moving block does not
   move twice. The whole selector is in :where (no weight), so any block's own animation (a tab fade) wins. Not on the
   Welcome page's build below the fold (its own ordered reveal), live labs, NTprompt or the sticky navigators.
   `backwards`: once a block has entered, the rule lets go, so hover lifts and other transforms keep working. */
@supports (animation-timeline: view()) {
  @media screen and (prefers-reduced-motion: no-preference) {
    :where(:root:not([data-capture], .ntprompt-on, .studio-on) :is(.card-section, .docs-section, .news-section, .panel, .readout, .index-row, .week,
      .phase, .table-scroll, .settings-section, .unit-res-section, .bento-tile, .doc-body > *, .diagram, .gantt, .tp-sec):not(
      :is(.card-section, .docs-section, .news-section, .panel, .readout, .index-row, .week, .phase, .table-scroll,
        .settings-section, .unit-res-section, .bento-tile, .diagram, .gantt, .tp-sec, .landing, .live-page, .docs-nav, .sidebar) *)) {
      animation: rv-in linear backwards; animation-timeline: view(); animation-range: entry 0% entry 30%;
    }
  }
}
@keyframes rv-in { from { opacity: 0; transform: translateY(16px); } }
/* The fill grows in as the bar scrolls into view, where scroll-driven animations exist. */
@supports (animation-timeline: view()) {
  @media screen and (prefers-reduced-motion: no-preference) {
    .meter > span { transform-origin: left center; animation: meter-in linear both; animation-timeline: view(); animation-range: entry 0% cover 30%; }
    .meter-pill { animation: meter-pill-in linear both; animation-timeline: view(); animation-range: entry 20% cover 35%; }
  }
}
@keyframes meter-in { from { transform: scaleX(0); } to { transform: none; } }
@keyframes meter-pill-in { from { opacity: 0; } to { opacity: 1; } }
@media print { .meter, .meter > span { -webkit-print-color-adjust: exact; print-color-adjust: exact; animation: none; } .meter-pill { box-shadow: none; animation: none; } }
/* Domain unit cells (unitCells in views/shared.js): one cell per unit, sorted like a bar, each shaped like its
   status dot so meaning never rests on colour alone. A card names the unit on hover; a click opens it. */
.ucells { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: 3px; }   /* above the row's link */
.ucell { position: relative; display: block; height: 14px; border: 1.5px solid var(--border-strong); border-radius: 3px; background: transparent; transform-origin: left center; }
.ucell-ready { border-color: var(--ok); background: var(--ok); }
.ucell-learning { border-color: var(--st-progress-ink); background: linear-gradient(90deg, var(--st-progress) 50%, transparent 50%); }
.ucell-needs-review { border-color: var(--st-review-ink); background: repeating-linear-gradient(135deg, var(--st-review) 0 1.5px, transparent 1.5px 4px); }
.ucell-needs-labs { border-color: var(--needs-labs); background: radial-gradient(circle, var(--needs-labs) 0 2.2px, var(--needs-labs-soft) 2.6px); }
.ucell-na { border-style: dashed; border-color: var(--muted); opacity: .7; }
.ucell:hover { box-shadow: 0 0 0 2px var(--focus); z-index: 1; }
/* The card exists only while hovered (a hidden one would still widen the page on phones); it fades in from
   @starting-style where supported, and simply appears elsewhere. Outer cells open their card inward. */
.ucell:hover::after { content: attr(data-tip); position: absolute; left: 50%; bottom: calc(100% + 8px); z-index: 5; width: max-content; max-width: min(260px, 70vw); padding: 5px 9px; border-radius: 8px; background: var(--text); color: var(--bg); font: 500 .78rem/1.35 var(--font); white-space: normal; text-align: left; pointer-events: none; opacity: 1; transform: translateX(-50%); transition: opacity .12s; }
.ucell:nth-child(-n+3):hover::after { left: 0; transform: none; }
.ucell:nth-last-child(-n+3):hover::after { left: auto; right: 0; transform: none; }
@starting-style { .ucell:hover::after { opacity: 0; } }
.index-foot { margin: 6px 0 0; overflow: hidden; color: var(--text-soft); font-size: .86rem; font-variant-numeric: tabular-nums; white-space: nowrap; text-overflow: ellipsis; }
@media (max-width: 760px) { .index-foot { white-space: normal; } }
.index-foot a { position: relative; z-index: 1; }
.index-done { color: var(--ok); font-weight: 600; }
/* Cells fill in one after another as the row scrolls into view, where scroll-driven animations exist. */
@supports (animation-timeline: view()) {
  @media screen and (prefers-reduced-motion: no-preference) {
    .ucell { animation: ucell-in linear both; animation-timeline: view(); animation-range: entry calc(var(--i) * 4%) entry calc(35% + var(--i) * 4%); }
  }
}
@keyframes ucell-in { from { opacity: 0; transform: scaleX(.2); } to { opacity: 1; transform: none; } }
@media print { .ucell { animation: none; -webkit-print-color-adjust: exact; print-color-adjust: exact; } .ucell::after { content: none; } }


.page-head { margin-bottom: 28px; }
.page-head .lead { font-size: 1.2rem; line-height: 1.5; color: var(--text-soft); max-width: 680px; }
.eyebrow { color: var(--accent); margin-bottom: 8px; }

.step {
  flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%;
  border: 1px solid var(--border-strong); font-size: .8rem; font-weight: 600; color: var(--muted);
}
.step.is-done { background: var(--ok); border-color: var(--ok); color: var(--on-ok); }

.code-block { position: relative; margin: 0 0 12px; }
.code-block pre, pre.topology {
  margin: 0; padding: 14px 16px; overflow-x: auto;
  background: var(--code-bg); border: 1px solid var(--border); border-radius: var(--radius-sm);
  line-height: 1.55; color: var(--text);
}
.code-block pre { padding-right: 76px; }
.copy-btn {
  position: absolute; top: 8px; right: 8px; height: 28px; padding: 0 10px;
  border: 1px solid var(--border-strong); border-radius: 5px; background: var(--surface);
  color: var(--muted); font: inherit; font-size: .75rem; cursor: pointer;
}
.copy-btn:hover { color: var(--accent); border-color: var(--accent); }

details.disclosure { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 0 14px; }
details.disclosure summary { cursor: pointer; padding: 12px 0; font-weight: 500; }
details.disclosure[open] { padding-bottom: 14px; }

.filters { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; margin-bottom: 20px; }
.field { display: flex; flex-direction: column; gap: 4px; font-size: .8rem; color: var(--muted); font-weight: 500; }
.field :where(input:not([type="checkbox"], [type="radio"], [type="file"], [type="range"]), select, textarea) {
  /* Form fields (Juan, 2026-11-15): every text box and drop-down in a labelled field shares one look, so fields side by
     side line up. :where keeps it weak, so a page's own field rule (sign-in, drills, compact tables) still wins. */
  height: 2.25rem; min-width: 150px; padding: 0 10px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--text); font: inherit; font-size: .9rem; font-weight: 400; font-variant-numeric: tabular-nums;
}
.field textarea { height: auto; padding: 8px 10px; }
.empty-state { padding: 32px; text-align: center; border: 1px dashed var(--border-strong); border-radius: var(--radius); color: var(--muted); }

.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 40px; }
.pager a { display: block; padding: 14px 16px; border: 1px solid var(--border); border-radius: var(--radius); color: var(--text); }
.pager a:hover { border-color: var(--accent); text-decoration: none; }
.pager small { display: block; color: var(--muted); font-size: .75rem; }
.pager .next { text-align: right; grid-column: 2; }
.next-topic { margin: 12px 0 0; text-align: right; font-size: .9rem; }

.site-footer { border-top: 1px solid var(--border); padding: 28px 0; font-size: .875rem; background: var(--bg-soft); }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 20px; }
.footer-inner p { margin: 0; }
.footer-links { display: flex; flex-wrap: wrap; gap: 6px 16px; }
/* The footer's directory, as Apple's: five groups in columns on wide screens; on phones and tablets each group is a
   heading with a chevron that opens its links in place. */
.footer-dir { flex: 1 1 100%; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px 24px; margin: 0 0 22px; padding-bottom: 20px; border-bottom: 1px solid var(--border); }
.fd-head { margin: 0 0 8px; font-size: .82rem; font-weight: 600; letter-spacing: 0; }
.fd-head button { all: unset; display: block; color: var(--text); cursor: default; }
.fd-group ul { list-style: none; margin: 0; padding: 0; }
.fd-group li { margin: 0 0 7px; }
.fd-group a { color: var(--text-soft); text-decoration: none; }
.fd-group a:hover { color: var(--link); text-decoration: underline; }
.fd-group a[aria-current="page"] { color: var(--text); }
.footer-note { margin: 0 0 8px; }
/* The footer's last line: the note, and the theme switch (System, Light, Dark; Juan, 2026-11-14). */
.footer-bottom { display: flex; flex: 1 1 100%; width: 100%; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; }
.footer-bottom .footer-note { margin: 0; }
.theme-switch { position: relative; isolation: isolate; display: inline-flex; padding: 3px; border: 1px solid var(--border-strong); border-radius: 999px; background: var(--surface); }
.theme-switch button { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border: 0; border-radius: 999px; background: none; color: var(--text-soft); font: 500 .85rem var(--font); cursor: pointer; }
.theme-switch button svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.theme-switch button:hover { color: var(--text); }
.theme-switch button { position: relative; transition: color .3s ease; }
.theme-switch button[aria-checked="true"] { background: var(--accent); color: var(--on-accent); }
.theme-switch.seg-ready button[aria-checked="true"] { background: transparent; }
.theme-switch button:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
@media print { .theme-switch { display: none; } }
@media (max-width: 1080px) {
  .footer-dir { grid-template-columns: minmax(0, 1fr); gap: 0; margin-bottom: 18px; padding-bottom: 0; border-bottom: 0; }
  .fd-group { border-bottom: 1px solid var(--border); }
  .fd-head { margin: 0; font-size: 1rem; }
  .fd-head button { display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 48px; box-sizing: border-box; cursor: pointer; font-weight: 500; }
  .fd-head button::after { content: ""; width: 8px; height: 8px; margin-right: 4px; border-right: 1.6px solid var(--text-soft); border-bottom: 1.6px solid var(--text-soft); transform: rotate(45deg) translateY(-2px); transition: transform .2s ease; }
  .fd-group.is-open .fd-head button::after { transform: rotate(-135deg) translateY(-2px); }
  .fd-head button:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
  .fd-group ul { display: none; padding: 2px 0 14px 12px; }
  .fd-group.is-open ul { display: block; }
  .fd-group li { margin: 0; }
  .fd-group a { display: block; padding: 8px 0; font-size: 1rem; }
}
@media (prefers-reduced-motion: reduce) { .fd-head button::after { transition: none; } }
}

/* 6. Page-specific -------------------------------------------------------- */
.hero { padding: 16px 0 16px; max-width: 760px; }   /* Welcome: header one line closer to the top, steps two lines closer */
/* Welcome: the lead spans the page frame; under it the three steps, with the N in a network, seen in perspective,
   beside them (views/herolab.js; Juan, 2026-11-14).
   The mesh floods its link state, then a packet takes the best route, the N; each N node blinks green as it passes.
   On phones it is a short band cropped to the N, after the certs. */
.art-light { display: block; }
.art-dark { display: none; }
@media screen { [data-theme="dark"] .art-light { display: none; } [data-theme="dark"] .art-dark { display: block; } }
.hero + .hero-split { margin-top: -12px; }   /* the lead sits close under the headline, as it did inside .hero */
.hero-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 23rem); gap: 0 3rem; align-items: start; }
.hero-split > .lead { grid-column: 1 / -1; }
.hero-split > .onboard-steps { position: relative; z-index: 1; }   /* the words stay on top of the drawing */
/* The drawing tucks a little behind the steps; the words carry a halo in the page colour (as diagram labels do), so a
   mesh line passing behind them never touches a letter. */
.hero-split > .onboard-steps p { text-shadow: 0 0 3px var(--bg), 0 0 6px var(--bg), 0 0 10px var(--bg); }
.hero-lab { position: relative; z-index: 0; margin: -4rem 0 -12rem -8rem; }   /* and spreads down behind "What you get" */
.hero-split ~ .landing { position: relative; z-index: 1; text-shadow: 0 0 3px var(--bg), 0 0 6px var(--bg), 0 0 10px var(--bg); }
.hero-net { display: block; width: 100%; max-width: 30rem; height: auto; margin-inline: auto; overflow: visible; touch-action: pan-y; }
.hn-soft line { stroke: var(--border-strong); stroke-width: 1; opacity: var(--o); }
.hn-dots circle { fill: var(--border-strong); opacity: var(--o); }
.hn-soft line.is-near, .hn-soft line.is-lsa { stroke: var(--mark-accent); opacity: .6; }
.hn-dots circle.is-near, .hn-dots circle.is-lsa { fill: var(--mark-accent); opacity: 1; }
.hn-stroke { fill: none; stroke: var(--mark-accent); stroke-linecap: round; stroke-linejoin: round; }
.hn-ring { fill: var(--bg); stroke: var(--mark-accent); stroke-width: 2.4; }
.hn-ring.hn-corner { stroke-width: 3; }
.hn-ring.is-hit { fill: var(--mark-accent); stroke: var(--mark-accent); }   /* the logo colour: marketing art, not an interface */
.hn-packet { fill: var(--packets); }
/* Light theme: depth shading. The plane is lit around the N and fades at its rim; near links and dots are darker than
   far ones; the N lifts off the plane on a soft Backbone shadow. Dark keeps the flat glow it has. */
.hn-plane { fill: url(#hn-lit); }
.hn-lit-0 { stop-color: color-mix(in srgb, var(--fiber) 16%, var(--surface)); stop-opacity: 1; }
.hn-lit-1 { stop-color: var(--bg); stop-opacity: 0; }
.hn-soft line { stroke: color-mix(in srgb, var(--night-500) calc(var(--d, 1) * 100%), var(--night-200)); }
.hn-dots circle { fill: color-mix(in srgb, var(--night-600) calc(var(--d, 1) * 100%), var(--night-300)); }
.hn-n, .hn-rings { filter: drop-shadow(0 3px 3px color-mix(in srgb, var(--backbone) 18%, transparent)); }
@media screen {
  :root[data-theme="dark"] .hn-plane { display: none; }
  :root[data-theme="dark"] .hn-soft line { stroke: var(--border-strong); }
  :root[data-theme="dark"] .hn-dots circle { fill: var(--border-strong); }
  :root[data-theme="dark"] .hn-n, :root[data-theme="dark"] .hn-rings { filter: none; }
}
@media screen and (prefers-color-scheme: dark) {
  :root:not([data-theme]) .hn-plane { display: none; }
  :root:not([data-theme]) .hn-soft line { stroke: var(--border-strong); }
  :root:not([data-theme]) .hn-dots circle { fill: var(--border-strong); }
  :root:not([data-theme]) .hn-n, :root:not([data-theme]) .hn-rings { filter: none; }
}
.hn-soft line.is-near, .hn-soft line.is-lsa { stroke: var(--mark-accent); }
.hn-dots circle.is-near, .hn-dots circle.is-lsa { fill: var(--mark-accent); }
@media (max-width: 960px) {
  .hero-split { grid-template-columns: 1fr; gap: 12px; }
  .hero-lab { margin: 0; }
  .hero-net { overflow: hidden; }
}
@media (max-width: 760px) {
  .hero-lab { display: none; }   /* phones: no drawing (views/herolab.js doesn't run it) */
}
/* Welcome intro (js/intro.js): the logo draws and types above the headline, then flies into the header.
   It uses the header logo's own classes, so only the font size differs: the mark is ~.99em tall. */
.hero-intro { margin-bottom: 24px; }
.intro-brand { font-size: clamp(3.2rem, 9.5vw, 7.8rem); width: max-content; }
.intro-brand .mark-ring circle { transform-box: fill-box; transform-origin: center; }
.intro-brand .mark-line { transform-box: fill-box; transform-origin: top; }
/* The typing caret (logo name and headline): a bold bar like a terminal cursor. It is an empty inline box with a
   border, so it never creates a line-break opportunity, and its negative margin cancels its width: typing never
   moves the text. The untyped rest of the headline stays in place, transparent (screen readers still read it). */
.type-caret { border-right: .09em solid var(--accent); margin-right: -.09em; }
.intro-brand .brand-word .wm-caret { display: inline; fill: var(--accent); }
.type-rest { color: transparent; }
.intro-flyer { position: fixed; z-index: 60; margin: 0; transform-origin: 0 0; pointer-events: none; }
.brand.is-intro-pending { visibility: hidden; }
/* Route lines stay undrawn until their stop builds, then draw like the logo's uprights (intro.js adds .is-drawn). */
.intro-play .route > .hop::before, .intro-play .netpaths-src::after { transform: scaleY(0); transform-origin: top; transition: transform .36s cubic-bezier(.2,.7,.2,1); }
.intro-play .netpaths-list > .hop::after { transform: scaleX(0); transform-origin: left; transition: transform .3s cubic-bezier(.2,.7,.2,1); }
.intro-play .is-drawn::before, .intro-play .is-drawn::after { transform: none; }
.hero h1 { font-size: clamp(2.1rem, 1.4rem + 2.8vw, 3.5rem); font-weight: 700; line-height: 1.1; letter-spacing: -0.02em; }
.hero h1 .accent { color: var(--accent); }
.hero .lead, .hero-split .lead { font-size: 1.15rem; color: var(--text-soft); margin-bottom: 20px; }
.hero-split .lead { font-size: clamp(1.15rem, 1rem + .5vw, 1.35rem); line-height: 1.6; margin-bottom: 28px; }   /* Welcome: the lead carries the page */

.track-card { padding: 28px; gap: 12px; }
.track-card h3 { font-size: 1.4rem; }
.track-card .stats { display: flex; gap: 24px; margin-top: 8px; }
.track-card .stats strong { display: block; font-size: 1.3rem; color: var(--text); }
.track-card .stats span { font-size: .8rem; color: var(--muted); }
.track-card.ccna { border-top: 3px solid var(--ccna); }
.track-card.ccnp { border-top: 3px solid var(--ccnp); }

.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin: 48px 0 16px; }
.section-head h2 { margin: 0; }

.mission { margin-top: 56px; padding: 28px; border-radius: var(--radius); background: var(--bg-soft); border: 1px solid var(--border); }
.mission ul { margin: 0; }

.exam-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px; margin: 36px 0 14px; }
.exam-head h2 { margin: 0; }

.topic { padding: 16px 18px; }
.topic h3 { margin-bottom: 4px; }
.topic p { margin-bottom: 8px; font-size: .925rem; color: var(--text-soft); }

.lab-meta { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 4px; }
.lab-section h2 { font-size: 1.15rem; }
.lab-section ol li::marker { color: var(--muted); font-weight: 600; }
.addr-table { max-width: 760px; }
.addr-table th[scope="row"] { font-weight: 600; text-transform: none; letter-spacing: 0; font-size: .92rem; color: var(--text); }
.addr-table td.num-cell { font-family: var(--font); font-size: .85rem; white-space: nowrap; font-variant-numeric: tabular-nums; }
.config-device { margin: 14px 0 6px; color: var(--muted); }
.complete-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 36px; padding: 18px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-soft); }
.complete-bar p { margin: 0; flex: 1; min-width: 200px; font-size: .9rem; color: var(--text-soft); }

.not-found { text-align: center; padding: 64px 0; }
.not-found .code { font-size: 4rem; font-weight: 700; color: var(--border-strong); line-height: 1; }

/* Formal documents (About, Terms & legal): the title sits on the left with the logo, and the body fills the page frame
   (logo to the header's last control) at the reading size, ragged right (Juan, 2026-11-14). */
.doc-head { margin-bottom: 20px; }
.doc-updated { margin: 6px 0 0; color: var(--text-soft); font-size: .875rem; line-height: 20px; text-transform: uppercase; letter-spacing: .06em; }
.doc-rule { height: 0; margin: 0 0 32px; border: 0; border-top: 1px solid var(--border-strong); }
.doc-body { font-size: var(--read-size); line-height: var(--read-leading); }
.doc-body :is(p, li) { color: var(--text-read); }
.doc-body h2 { margin-top: 2rem; }
.doc-body > :first-child { margin-top: 0; }



/* Diagrams (see assets/js/diagram.js). Colour roles come from tokens; meaning never relies on colour alone. */
.diagram { margin: 20px 0; }
.diagram-scroll { position: relative; overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-soft); }
.dg { display: block; width: 100%; height: auto; }
/* A drawing still wider than a narrow screen once fitted (diagram.js fitDiagrams) opens centred; soft shadows on the
   edges say there is more to either side and fade as you reach each end ("local" backgrounds scroll with the content). */
.diagram-scroll.can-scroll {
  background:
    linear-gradient(to right, var(--bg-soft) 30%, transparent) left / 24px 100% no-repeat local,
    linear-gradient(to left, var(--bg-soft) 30%, transparent) right / 24px 100% no-repeat local,
    radial-gradient(farthest-side at 0 50%, color-mix(in srgb, var(--text) 18%, transparent), transparent) left / 12px 100% no-repeat scroll,
    radial-gradient(farthest-side at 100% 50%, color-mix(in srgb, var(--text) 18%, transparent), transparent) right / 12px 100% no-repeat scroll,
    var(--bg-soft);
}
@media print { .diagram-scroll .dg { min-width: 0 !important; width: 100% !important; } }   /* a screen fit never reaches paper */
.diagram figcaption { margin-top: 8px; font-size: .85rem; color: var(--muted); }
.dg-node, .dg-legend-icon { stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
/* Device roles (assets/js/icons.js). The role hues are shared with the NTpath icon pack. */
.dg-route { --role: var(--dg-route); }
.dg-switch { --role: var(--dg-switch); }
.dg-security { --role: var(--dg-security); }
.dg-wireless { --role: var(--dg-cloud); }
.dg-services { --role: var(--dg-services); }
.dg-compute { --role: var(--dg-end); }
.dg-route, .dg-switch, .dg-security, .dg-wireless, .dg-services, .dg-compute { color: var(--role); }
/* Icon parts. --ni-ground is the surface under the icon, so bodies stay opaque over links. */
.ni-b { fill: color-mix(in srgb, currentColor var(--ni-tint), var(--ni-ground, var(--bg-soft))); stroke: currentColor; }
.ni-d, .ni-bd { fill: none; stroke: currentColor; }
.ni-bd { stroke-width: 1.8; }
.ni-s, .ni-bs { fill: currentColor; stroke: none; }
.ni-k { fill: var(--ni-ground, var(--bg-soft)); stroke: currentColor; }
.ni-v { stroke-dasharray: 4.5 3.6; }
.dg-legend-icon .ni-bd { stroke-width: 2.6; }
.dg-label { font: 600 13px var(--font); fill: var(--text); stroke: none; }
.dg-sub { font: 400 10.5px var(--font); fill: var(--muted); stroke: none; font-variant-numeric: tabular-nums; }
.dg-ifc { font: 500 10.5px var(--font); fill: var(--text-soft); font-variant-numeric: tabular-nums; }
.dg-mid { font: 500 11px var(--font); fill: var(--text); }
.dg-halo { paint-order: stroke fill; stroke: var(--bg-soft); stroke-width: 4px; stroke-linejoin: round; }
.dg-link { fill: none; stroke: var(--dg-link); stroke-linecap: round; }
.dg-link-trunk { stroke: var(--dg-switch); }
.dg-link-fiber { stroke: var(--dg-switch); }
.dg-link-mpls { stroke: var(--dg-cloud); }
.dg-link-tunnel { stroke: var(--dg-route); }
.dg-link-wireless { stroke: var(--dg-cloud); }
.dg-group rect { fill: color-mix(in srgb, var(--muted) 7%, transparent); stroke: var(--border-strong); stroke-width: 1.4; stroke-dasharray: 6 5; }
.dg-group-label { font: 600 10.5px var(--font); fill: var(--muted); letter-spacing: .05em; text-transform: uppercase; }
.dg-vlan rect { fill: var(--surface); stroke: var(--v); stroke-width: 1.6; }
.dg-vlan circle { fill: var(--v); }
.dg-vlan text { font: 600 10.5px var(--font); fill: var(--text); }
.dg-vlan-1 { --v: var(--dg-vlan-1); } .dg-vlan-2 { --v: var(--dg-vlan-2); }
.dg-vlan-3 { --v: var(--dg-vlan-3); } .dg-vlan-4 { --v: var(--dg-vlan-4); }
.dg-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; list-style: none; padding: 0; margin: 8px 0 0; font-size: .8rem; color: var(--muted); }
.dg-legend li { display: flex; align-items: center; gap: 6px; margin: 0; }
.dg-legend-icon { width: 22px; height: 22px; stroke-width: 3.2; }
.dg-legend-line { width: 36px; height: 10px; }
/* Interfaces: the N mark's ring where a link touches a device. Meaning is in the mark too (dot, cross, bar). */
.dg-port-ring { fill: var(--bg-soft); stroke: var(--port); stroke-width: 2; }
.dg-port-dot { fill: var(--mark-line); }
.dg-port-mark { fill: none; stroke: var(--port); stroke-width: 1.8; stroke-linecap: round; }
.dg-port-halo { fill: none; stroke: var(--port); stroke-width: 1.6; opacity: 0; transform-box: fill-box; transform-origin: center; }
.dg-port-up { --port: var(--dg-port-up); }
.dg-port-down, .dg-port-pending { --port: var(--dg-port-down); }
.dg-port-blocked { --port: var(--dg-port-blocked); }
.dg-port-down .dg-port-ring { fill: color-mix(in srgb, var(--dg-port-down) 14%, var(--bg-soft)); }
.dg-port-blocked .dg-port-ring { fill: color-mix(in srgb, var(--dg-port-blocked) 14%, var(--bg-soft)); }
.dg-port-pending .dg-port-ring { stroke-dasharray: 2.6 1.6; }   /* not configured yet: an empty, broken red ring */
/* Up blinks like a link LED: 5 times on reading pages (WCAG 2.2.2), until paused in live labs. */
.dg-port-up .dg-port-halo { animation: dg-port-pulse 1.6s ease-out 5; }
.dg-port-up .dg-port-dot { animation: dg-port-blink 1.6s steps(1, end) 5; }
.dg-live .dg-port-up .dg-port-halo, .dg-live .dg-port-up .dg-port-dot { animation-iteration-count: infinite; }
@keyframes dg-port-pulse { 0% { opacity: .75; transform: scale(1); } 100% { opacity: 0; transform: scale(2.3); } }
@keyframes dg-port-blink { 0% { opacity: 1; } 55% { opacity: .25; } }
@media (prefers-reduced-motion: reduce) { .dg-port-halo, .dg-port-dot { animation: none !important; } }
.dg-link-down { stroke: var(--dg-port-down); }
.dg-legend-port { width: 16px; height: 16px; }
/* Traffic flows (diagram.js "flows"): what the feature does to traffic. Allowed = solid line and arrowhead, blocked =
   dotted line ending in an X. Green and red are status colours, and the shape says it too. The numbered badge ties the
   drawing to the text ({flow:n}) and to the key under the figure. */
.dg-flow-allowed { --flow: var(--ok); }
.dg-flow-blocked { --flow: var(--danger); }
.dg-flow-line { fill: none; stroke: var(--flow); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.dg-flow-blocked .dg-flow-line { stroke-dasharray: 1 5; stroke-width: 2.8; }
.dg-flow-head { fill: var(--flow); stroke: none; }
.dg-flow-x { fill: none; stroke: var(--flow); stroke-width: 3; stroke-linecap: round; }
.dg-flow-badge circle { fill: var(--flow); stroke: var(--bg-soft); stroke-width: 2; }
.dg-flow-badge text { font: 700 11px var(--font); fill: #fff; }
.flow-badge { display: inline-grid; place-items: center; min-width: 1.35em; height: 1.35em; padding: 0 .2em; border-radius: 999px; background: var(--text); color: var(--bg); font-size: .78em; font-weight: 700; line-height: 1; vertical-align: .08em; font-variant-numeric: tabular-nums; }
.dg-flows { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 6px; font-size: .88rem; }
.dg-flows li { margin: 0; line-height: 1.45; }
.dg-flows li > .flow-badge, .dg-flows li > .dg-flow-key { margin-right: 6px; vertical-align: -.15em; }
.dg-flows li .flow-badge, .flow-badge.flow-allowed, .flow-badge.flow-blocked { background: var(--flow); color: #fff; }
.flow-badge.flow-allowed { --flow: var(--ok); } .flow-badge.flow-blocked { --flow: var(--danger); }
.dg-flows li strong { color: var(--flow); font-weight: 600; }
.dg-flow-key { display: inline-block; width: 40px; height: 12px; }
@media print { .dg-flow-badge circle, .dg-flow-badge text, .flow-badge, .dg-flow-line, .dg-flow-head, .dg-flow-x { print-color-adjust: exact; -webkit-print-color-adjust: exact; } }
.dg-legend-port .dg-port-halo { display: none; }
.diagram figcaption { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; justify-content: space-between; }


/* Study companion components ------------------------------------------------ */
#exam-nav { display: contents; }
.btn-small { height: 32px; padding: 0 12px; font-size: .85rem; }

/* Status: shape + colour + text, never colour alone */
.st { display: inline-grid; place-items: center; width: 16px; height: 16px; flex: none; border-radius: 50%; border: 2px solid var(--border-strong); font-size: 10px; line-height: 1; font-weight: 700; vertical-align: -3px; }
.st-learning { border-color: var(--st-progress-ink); background: linear-gradient(90deg, var(--st-progress) 50%, transparent 50%); }
.st-needs-review { border-color: var(--st-review-ink); background: color-mix(in srgb, var(--st-review) 12%, var(--surface)); color: var(--st-review-ink); }
.st-needs-review::after { content: "↻"; }
.st-needs-labs { border-color: var(--needs-labs); background: var(--needs-labs-soft); color: var(--needs-labs); }
.st-needs-labs::after { content: "!"; }
.st-ready { border-color: var(--ok); background: var(--ok); color: var(--on-ok); }
.st-ready::after { content: "✓"; }
.st-na { border-style: dashed; border-color: var(--muted); color: var(--muted); }
.st-na::after { content: "–"; }
.pill { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px 0 7px; border-radius: 999px; border: 1px solid var(--border); background: var(--bg-soft); color: var(--text-soft); font-size: .75rem; font-weight: 600; white-space: nowrap; }
.pill-ready { border-color: var(--ok); color: var(--ok); }
.pill-learning { border-color: var(--st-progress-ink); color: var(--st-progress-ink); }
.pill-needs-labs { border-color: var(--needs-labs); color: var(--needs-labs); }
.pill-needs-review { border-color: var(--st-review-ink); color: var(--st-review-ink); }
.pill-na { border-style: dashed; color: var(--muted); }
.tag-kind-hands-on { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }
.tag-ok { color: var(--ok); }
.step-id { flex: none; display: grid; place-items: center; min-width: 38px; height: 28px; padding: 0 6px; border-radius: 7px; border: 1px solid var(--border-strong); font: 600 .78rem var(--font); color: var(--text-soft); background: var(--bg-soft); font-variant-numeric: tabular-nums; }

.panel { padding: 20px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
/* Dashboard: the three cards (topics, practice scores, readiness) side by side and the same size; one per row below
   960px. Each card is a column whose closing hint sits on its bottom edge, so the hints line up. 24px apart. */
.today-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; align-items: stretch; margin-bottom: 24px; }
.today-grid > .panel { display: flex; flex-direction: column; }
.today-grid .panel-foot { margin-top: auto; margin-bottom: 0; padding-top: 8px; }
@media (max-width: 960px) { .today-grid { grid-template-columns: minmax(0, 1fr); } }
.panel h2 { margin-top: 0; font-size: 1.1rem; }
.panel .eyebrow { margin-bottom: 4px; }
.today-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; }
.readiness .big-number { font-family: var(--font-display); font-size: 3.4rem; font-weight: 700; line-height: 1; margin: 4px 0 8px; letter-spacing: -0.03em; }
.readiness .big-number span { font-size: 1.4rem; color: var(--muted); margin-left: 2px; }
.field.inline { flex-direction: row; align-items: center; gap: 8px; }

.notice { padding: 12px 14px; margin: 14px 0; border-radius: var(--radius-sm); border: 1px solid var(--info-border); background: var(--info-bg); font-size: .92rem; }
.notice-warn { border-color: var(--warn); background: color-mix(in srgb, var(--warn) 10%, var(--surface)); }
.notice .btn-row { display: inline-flex; margin-left: 6px; gap: 8px; vertical-align: middle; }

.path-rail { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 14px 0 18px; padding: 10px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); font: 500 .75rem var(--font); text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-variant-numeric: tabular-nums; }
.path-rail-bar { flex: 1 1 120px; min-width: 80px; height: 6px; background: repeating-linear-gradient(90deg, var(--border) 0 9px, transparent 9px 12px); overflow: hidden; }
.path-rail-bar > span { display: block; height: 100%; background: repeating-linear-gradient(90deg, var(--accent) 0 9px, transparent 9px 12px); }

.status-panel { margin: 0 0 24px; padding: 16px 18px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.status-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.status-head h2 { margin: 0; font-size: 1.05rem; }
.status-control { display: inline-flex; flex-wrap: wrap; margin: 12px 0 8px; border: 1px solid var(--border-strong); border-radius: 10px; overflow: hidden; }
.status-btn { border: 0; border-radius: 0; height: 42px; padding: 0 18px; background: var(--surface); }
.status-btn + .status-btn { border-left: 1px solid var(--border-strong); }
.status-btn:hover { background: var(--bg-soft); color: var(--text); border-color: var(--border-strong); }
.status-btn.is-active { background: var(--accent); color: var(--on-accent); }
.status-btn:focus-visible { position: relative; z-index: 1; }

.point-chips { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 12px 0 0; }
.point-chips li { margin: 0; }
.point-chips a, .point-chips span { display: inline-block; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--border); background: var(--bg-soft); font-size: .8rem; color: var(--text-soft); }
.point-chips b { font-family: var(--font); color: var(--accent); font-weight: 600; margin-right: 4px; font-variant-numeric: tabular-nums; }
.point-id { display: inline-block; margin-right: 6px; padding: 1px 8px; border-radius: 6px; background: var(--accent-soft); color: var(--accent); font: 600 .8rem var(--font); vertical-align: 2px; font-variant-numeric: tabular-nums; }

.card-section { margin: 28px 0; max-width: var(--measure); }   /* one column (Juan, 2026-11-14): text, diagrams, tables and boxes fill the frame's column, so every right edge lines up with the header's */
.card-section > h2 { margin-top: 0; font-size: 1.2rem; }
/* Practice labs on a topic (views/unit.js): each lab's "Run it here" and, beside it, its Packet Tracer activity when it
   has one; a topic without labs offers its own activity. */
.hop-run { position: relative; z-index: 1; margin: 8px 0 0; }   /* above the row's full-size link (.hop-link::after), so its buttons get the click */
.pka-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.pka-row .muted { font-size: .85rem; }
.pka-status { margin: 6px 0 0; font-size: .85rem; color: var(--muted); }
.pka-status:empty { display: none; }
.pka-status.is-error { color: var(--danger); }
/* Plan my study, step one (views/plan.js): your study resources for the plan's exam, with how many topics they cover. */
.plan-res { display: grid; gap: 8px; margin: 0 0 20px; }
.plan-res .readout-label { margin: 0; }
.plan-res-value { margin: 0; font-size: 1.05rem; color: var(--text-soft); }
.plan-res-value strong { color: var(--text); }
.plan-res .meter-label { margin: 4px 0 0; font-size: .85rem; }
/* The plan in your calendar (views/plan.js, calendar.js): study-day chips, a start time and a reminder. A chosen day
   is filled and ticked (not colour alone); the summary under it updates as the learner chooses. */
.plan-cal { margin: 0 0 20px; }
.cal-days { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 12px; padding: 0; border: 0; }
.cal-days legend { width: 100%; margin: 0 0 8px; padding: 0; color: var(--text-soft); font-size: .88rem; }
.cal-day { position: relative; margin: 0; }
.cal-day input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.cal-day span { display: inline-flex; align-items: center; gap: 6px; min-width: 64px; justify-content: center; padding: 7px 12px; border: 1.5px solid var(--border-strong); border-radius: 999px; background: var(--surface); color: var(--text-soft); font-weight: 500; font-size: .9rem; transition: background .15s, border-color .15s, color .15s; }
.cal-day input:checked + span { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, var(--surface)); color: var(--text); }
.cal-day input:checked + span::before { content: "✓"; font-weight: 700; color: var(--accent); }
.cal-day input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 2px; }
.cal-fields { align-items: flex-end; margin: 0 0 6px; }
.cal-fields input[type="time"] { min-width: 120px; }
.plan-cal-sum { margin: 8px 0 0; color: var(--text); font-variant-numeric: tabular-nums; }
.plan-cal-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.plan-cal.is-locked .account-prompt { margin-top: 10px; }
.plan-cal-feed { margin: 18px 0 0; padding: 16px 0 0; border-top: 1px solid var(--border); }
.plan-cal-feed .readout-label { margin: 0 0 6px; }
.plan-cal-feed [data-cal-feed-url] { width: 100%; font: 500 .82rem var(--mono); }
.plan-cal-feed.is-locked { color: var(--text-soft); font-size: .9rem; }
@media (prefers-reduced-motion: reduce) { .cal-day span { transition: none; } }
.plan-res-text { margin: 0; color: var(--text-soft); }
.plan-res-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; margin: 4px 0 0; }
.plan-res-lock { text-decoration: none; }
/* Your study resources on a topic (views/unit.js): the chapters that cover it, one row each, and the button that adds
   one (unitresources.js). Free members see the button locked, linking to the plans. */
.unit-res-section .section-title { align-items: center; }
.unit-res-section .section-title h2 { margin: 0; font-size: 1.2rem; }   /* the same size as Practice labs */
.unit-res { list-style: none; margin: 10px 0 0; padding: 0; border-top: 1px solid var(--border); }
.unit-res li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 12px; margin: 0; padding: 8px 0; border-bottom: 1px solid var(--border); }
.unit-res-foot { margin: 8px 0 0; font-size: .9rem; }
.unit-res li .btn-quiet { margin-left: auto; }
.unit-res-locked { display: inline-flex; align-items: center; gap: 8px; color: var(--text-soft); }
.btn-quiet { border-color: transparent; background: none; color: var(--muted); }
.btn-quiet:hover { color: var(--text); border-color: var(--border); }
@media (max-width: 760px) { .unit-res li { flex-direction: column; align-items: flex-start; } }
.table-scroll { position: relative; overflow-x: auto; margin: 0 0 16px; }
table { border-collapse: collapse; width: 100%; font-size: .92rem; }
th, td { text-align: left; vertical-align: top; padding: 8px 12px; border-bottom: 1px solid var(--border); }
th { color: var(--muted); }
/* The strong line sits under the column heads only: row headers (tbody th) share the row's line, so it runs unbroken. */
thead th { border-bottom-color: var(--border-strong); }
td code, p code, li code, summary code { padding: 1px 5px; border-radius: 4px; background: var(--code-bg); }
.code-caption { margin-bottom: 4px; font-size: .8rem; color: var(--muted); }
.callout { margin: 14px 0; padding: 12px 16px; border-left: 4px solid var(--accent); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; background: var(--accent-soft); }
.callout p { margin: 4px 0 0; }
.callout-warn { border-left-color: var(--warn); background: color-mix(in srgb, var(--warn) 10%, var(--surface)); }
.callout-note { border-left-color: var(--ccnp); background: var(--ccnp-soft); }
.steps { counter-reset: s; list-style: none; padding: 0; }
.steps li { position: relative; margin: 10px 0; padding-left: 38px; counter-increment: s; }
.steps li::before { content: counter(s); position: absolute; left: 0; top: 0; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-size: .8rem; font-weight: 700; }
.traps { list-style: none; padding: 0; }
.traps li { margin: 8px 0; padding: 10px 14px 10px 40px; position: relative; border: 1px solid var(--border); border-radius: var(--radius-sm); background: color-mix(in srgb, var(--warn) 6%, var(--surface)); }
.traps li::before { content: "!"; position: absolute; left: 12px; top: 10px; width: 20px; height: 20px; display: grid; place-items: center; border-radius: 50%; background: var(--warn); color: var(--bg); font-weight: 700; font-size: .8rem; }
details.qa { margin: 8px 0; padding: 0 14px; border: 1px solid var(--border); border-radius: var(--radius-sm); }
details.qa summary { cursor: pointer; padding: 12px 0; font-weight: 500; }
details.qa[open] { background: var(--bg-soft); padding-bottom: 6px; }
.unit-chips { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 8px 0; }
.unit-chips li { min-width: 0; margin: 0; max-width: 100%; }
.unit-chip { display: inline-flex; align-items: center; gap: 8px; min-width: 0; max-width: 100%; padding: 6px 12px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--text); font-size: .85rem; }
.unit-chip:hover { border-color: var(--accent); text-decoration: none; color: var(--text); }
.unit-chip span:last-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.attribution { margin-top: 32px; font-size: .82rem; }


/* Coverage map: a mosaic of unit tiles that fill as you progress. The fill's shape carries the status as well as its
   colour (empty · half · hatched · flagged · solid), so it reads in greyscale too. */
/* Coverage map (views/progress.js): the whole exam's capsule and the counts per status, then one lit row per
   domain. The head carries the domain's capsule; the tiles fill the width, each with its status as a fill and a
   corner glyph (meaning never rests on colour) and a card naming the unit on hover. */
/* The summary spans the same width as the domain rows: the capsule, then the six statuses in one row, spread edge to
   edge (three per row on tablets, two on phones). */
.cov-summary-bar { margin: 8px 0 20px; }
.cov-legend { display: grid; grid-template-columns: repeat(6, auto); justify-content: space-between; gap: 10px 20px; list-style: none; padding: 0; margin: 14px 0 0; font-size: .85rem; color: var(--text-soft); }
.cov-legend li { display: flex; align-items: center; gap: 8px; min-width: 0; margin: 0; white-space: nowrap; }
.cov-legend .cov-swatch { flex: none; }
@media (max-width: 1080px) { .cov-legend { grid-template-columns: repeat(3, minmax(0, 1fr)); justify-content: stretch; } }
@media (max-width: 560px) { .cov-legend { grid-template-columns: repeat(2, minmax(0, 1fr)); } .cov-legend li { white-space: normal; } }
.cov-legend b { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.cov-domain { display: grid; grid-template-columns: minmax(220px, 280px) minmax(0, 1fr); gap: 16px 28px; align-items: start; margin: 0 0 16px; padding: 20px 22px; border: 1px solid var(--border); border-radius: var(--radius); }
.cov-dhead { min-width: 0; }
.cov-dhead h3 { display: flex; align-items: baseline; gap: 10px; margin: 0 0 2px; font-size: 1.02rem; line-height: 1.3; }
.cov-dhead h3 a { color: var(--text); }
.cov-dhead h3 a:hover { color: var(--accent); }
.cov-code { flex: none; font: 600 1.45rem/1 var(--font-display); color: var(--accent); letter-spacing: -0.01em; }
.cov-meta { margin: 0 0 10px; color: var(--muted); font-size: .82rem; font-variant-numeric: tabular-nums; }
.cov-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 8px; align-content: start; }
.cov { --tint: var(--border); position: relative; display: inline-grid; place-items: center; height: 44px; border-radius: 10px; border: 1.5px solid var(--border-strong); background: var(--surface); color: var(--text); font-size: .82rem; font-weight: 500; transition: transform .15s, box-shadow .15s; }
a.cov:hover, a.cov:focus-visible { z-index: 2; text-decoration: none; transform: translateY(-2px); box-shadow: var(--lit-shadow-hover, 0 6px 16px -8px rgb(11 18 32 / .35)), 0 0 0 2px var(--accent); }
a.cov:focus-visible { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--focus); outline: none; }
.cov-id { font-family: var(--font); font-variant-numeric: tabular-nums; }
/* The status glyph in the tile's corner. */
a.cov::before { position: absolute; top: 3px; right: 5px; font-size: .68rem; font-weight: 700; line-height: 1; }
a.cov-ready::before { content: "✓"; }
a.cov-learning::before { content: "◐"; color: var(--st-progress-ink); }
a.cov-needs-review::before { content: "↻"; color: var(--st-review-ink); }
a.cov-needs-labs::before { content: "!"; color: var(--needs-labs); }
a.cov-na::before { content: "–"; color: var(--muted); }
.cov-new { border-style: dashed; color: var(--muted); }
.cov-na { border-style: dotted; color: var(--muted); opacity: .55; text-decoration: line-through; }
.cov-learning { --tint: color-mix(in srgb, var(--st-progress) 38%, var(--surface)); border-color: var(--st-progress-ink); background: linear-gradient(to top, var(--tint) 50%, var(--surface) 50%); }
.cov-needs-labs { --tint: color-mix(in srgb, var(--needs-labs) 26%, var(--surface)); border-color: var(--needs-labs); background: repeating-linear-gradient(135deg, var(--tint) 0 5px, var(--surface) 5px 9px); }
.cov-needs-review { --tint: color-mix(in srgb, var(--st-review) 16%, var(--surface)); border-color: var(--st-review-ink); background: var(--tint); box-shadow: inset 0 3px 0 var(--st-review); }
.cov-ready { border-color: var(--ok); background: linear-gradient(180deg, rgb(255 255 255 / .2), transparent 60%), var(--ok); color: var(--on-ok); font-weight: 600; }
.cov-swatch { width: 28px; height: 18px; border-radius: 5px; }
.cov-swatch.cov-needs-review { box-shadow: inset 0 2px 0 var(--st-review-ink); }
/* The card exists only while hovered or focused, so a hidden one never widens the page; it fades in. */
a.cov:is(:hover, :focus-visible)::after { content: attr(data-tip); position: absolute; left: 50%; bottom: calc(100% + 8px); z-index: 5; width: max-content; max-width: min(260px, 70vw); padding: 5px 9px; border-radius: 8px; background: var(--text); color: var(--bg); font: 500 .78rem/1.35 var(--font); text-align: left; text-decoration: none; white-space: normal; pointer-events: none; transform: translateX(-50%); opacity: 1; transition: opacity .12s; }
@starting-style { a.cov:is(:hover, :focus-visible)::after { opacity: 0; } }
/* The tiles of a row rise in one after another as it scrolls into view, where scroll-driven animations exist. */
@supports (animation-timeline: view()) {
  @media screen and (prefers-reduced-motion: no-preference) {
    .cov-grid > .cov { animation: cov-in linear both; animation-timeline: view(); animation-range: entry calc(min(var(--i), 12) * 3%) entry calc(40% + min(var(--i), 12) * 3%); }
  }
}
@keyframes cov-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .cov { transition: none; } a.cov:hover, a.cov:focus-visible { transform: none; } }
/* Progress: cards lift on hover (Juan, 2026-11-15). Panels, charts and the Coverage map's domain rows rise 4 px under the
   pointer (or with keyboard focus inside), their lit shadow deepens and the border warms toward the accent; they rise
   in 420 ms on a long soft ease and settle back a little slower (560 ms), so the motion lands gently. Only transform,
   shadow and border move: nothing around a card shifts. Pointer devices only (no stuck lift on touch); with reduced
   motion the card does not rise, the shadow and border still change. */
@media (hover: hover) and (pointer: fine) {
  .progress-page :is(.panel, .chart, .cov-domain) {
    transition: transform .56s cubic-bezier(.3, .6, .2, 1), box-shadow .56s cubic-bezier(.3, .6, .2, 1), border-color .56s ease;
  }
  .progress-page :is(.panel, .chart, .cov-domain):is(:hover, :focus-within) {
    transform: translateY(-4px);
    box-shadow: var(--lit-shadow-hover);
    border-color: color-mix(in srgb, var(--accent) 22%, var(--border));
    transition-duration: .42s; transition-timing-function: cubic-bezier(.2, .7, .2, 1);
  }
}
@media (prefers-reduced-motion: reduce) {
  .progress-page :is(.panel, .chart, .cov-domain) { transition: none; }
  .progress-page :is(.panel, .chart, .cov-domain):is(:hover, :focus-within) { transform: none; }
}
@media print { .cov-grid > .cov { animation: none; -webkit-print-color-adjust: exact; print-color-adjust: exact; } a.cov::after { content: none; } }
@media (max-width: 760px) {
  .cov-domain { grid-template-columns: minmax(0, 1fr); padding: 16px; }
  .cov-grid { grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); }
}
.cov-summary { display: flex; flex-wrap: wrap; gap: 6px 24px; list-style: none; padding: 0; margin: 0 0 12px; }
.gap { color: var(--danger); font-weight: 600; }
/* Tab bars: an outlined pill glides to the chosen tab (segswitch.js); hover tints the button, never underlines it. */
.tabs { position: relative; isolation: isolate; display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.tabs a { position: relative; padding: 6px 14px; border: 1px solid var(--border); border-radius: 999px; color: var(--text-soft); font-size: .88rem;
  transition: color .3s ease, background-color .25s ease, border-color .25s ease, transform .15s ease; }
.tabs a:hover { text-decoration: none; color: var(--accent); border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); background: color-mix(in srgb, var(--accent) 8%, transparent); }
.tabs a:active { transform: scale(.97); }
.tabs a[aria-current="page"], .tabs a.seg-on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); font-weight: 600; }
.tabs.seg-ready a[aria-current="page"], .tabs.seg-ready a.seg-on { background: transparent; border-color: transparent; }
.tabs.seg-ready a.seg-off { background: transparent; border-color: var(--border); color: var(--text-soft); font-weight: 400; }
.tabs .seg-thumb { position: absolute; z-index: -1; box-sizing: border-box; border: 1px solid var(--accent); border-radius: 999px; background: var(--accent-soft);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 14%, transparent); pointer-events: none; }
.tabs .seg-thumb.seg-glide { transition: left var(--seg-ms, 380ms) cubic-bezier(.3, .8, .25, 1), top var(--seg-ms, 380ms) cubic-bezier(.3, .8, .25, 1),
  width var(--seg-ms, 380ms) cubic-bezier(.3, .8, .25, 1), height var(--seg-ms, 380ms) cubic-bezier(.3, .8, .25, 1); }
@media (prefers-reduced-motion: reduce) { .tabs a, .tabs .seg-thumb.seg-glide { transition: none; } .tabs a:active { transform: none; } }
.restore fieldset { border: 0; padding: 0; margin: 12px 0 0; }
.restore legend { font-size: .8rem; color: var(--muted); font-weight: 500; padding: 0; margin-bottom: 4px; }
.restore label:not(.field) { display: block; margin: 4px 0; font-size: .92rem; }

.plan-form { margin-top: 28px; }
/* The week list never grows wider than its column: a long unit title is cut (or wraps on phones), it never widens the page. */
.weeks { list-style: none; padding: 0; margin: 16px 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.week { min-width: 0; margin: 0; padding: 14px 16px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.week header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.week h3 { margin: 0; font-size: 1rem; }
.week-current { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
/* Phones: a week's units read as a list of full-width rows, each title whole (wrapping), not cut chips side by side. */
@media (max-width: 760px) {
  .week .unit-chips { flex-direction: column; align-items: stretch; }
  .week .unit-chip { display: flex; border-radius: 12px; }
  .week .unit-chip span:last-child { white-space: normal; }
}

@media (max-width: 760px) {
  .status-control { display: flex; width: 100%; }
  .status-btn { flex: 1; padding: 0 8px; }
  .list-item { flex-wrap: wrap; }
  .list-item > .pill { margin-left: 52px; }
  .review-list .btn-row { margin-left: 0; }
}


/* Tracking area: dashboard blocks, tracker table, score log, chapters, charts --------------------- */
.tabs-main { margin: 14px 0 6px; }
/* Tracking pages: one header on every tab (exam switch, title, tabs) that never changes size; only the title and
   the content change, and they fade in when moving between tabs (main[data-swap="pg"], set by app.js). */
.pg-head { margin-bottom: 18px; }
/* The exam switch: a pill glides under the chosen exam (segswitch.js) and the labels fade between colours. */
.pg-exam { position: relative; isolation: isolate; display: inline-flex; flex-wrap: wrap; gap: 2px; margin: 0 0 12px; padding: 3px; border: 1px solid var(--border); border-radius: 999px; }
.pg-exam a { position: relative; padding: 4px 12px; border-radius: 999px; color: var(--text-soft); transition: color .3s ease, background-color .25s ease, transform .15s ease; }
.pg-exam a:hover { color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, transparent); text-decoration: none; }
.pg-exam a:active { transform: scale(.96); }
.pg-exam a[aria-current="true"], .pg-exam a.seg-on { background: var(--accent); color: var(--on-accent); }
.pg-exam.seg-ready a[aria-current="true"], .pg-exam.seg-ready a.seg-on, .pg-exam.seg-ready a.seg-off { background: transparent; }
.pg-exam.seg-ready a.seg-off { color: var(--text-soft); }
.pg-exam .seg-thumb { position: absolute; z-index: -1; border-radius: 999px; background: var(--accent);
  box-shadow: 0 2px 10px color-mix(in srgb, var(--accent) 35%, transparent); pointer-events: none; }
.pg-exam .seg-thumb.seg-glide { transition: left var(--seg-ms, 380ms) cubic-bezier(.3, .8, .25, 1), top var(--seg-ms, 380ms) cubic-bezier(.3, .8, .25, 1),
  width var(--seg-ms, 380ms) cubic-bezier(.3, .8, .25, 1), height var(--seg-ms, 380ms) cubic-bezier(.3, .8, .25, 1); }
@media (prefers-reduced-motion: reduce) { .pg-exam a, .pg-exam .seg-thumb.seg-glide { transition: none; } .pg-exam a:active { transform: none; } }
.pg-title { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.pg-head .tabs-main { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-bottom: 0; }
.pg-head .tabs-main { margin: 10px 0 0; }
.pg-head .tabs-main a { flex: none; }
/* One segmented control (Juan, 2026-11-16): the exam switch, the tracking tabs and the footer's theme switch share one
   form, the exam switch's: a rounded track, borderless options, a filled accent pill under the choice that glides to a
   new one (segswitch.js). The zoom pass, on hover: the option under the pointer zooms in and its neighbours swell a
   little, so moving along the bar reads as a lens passing over it. Pointer devices (and keyboard focus) only; never
   with reduced motion. */
.tabs.tabs-main { display: inline-flex; flex-wrap: nowrap; gap: 2px; max-width: 100%; padding: 3px; border: 1px solid var(--border); border-radius: 999px; }
.tabs.tabs-main a { padding: 5px 14px; border: 0; }
.tabs.tabs-main a:hover { border-color: transparent; background: color-mix(in srgb, var(--accent) 10%, transparent); }
.tabs.tabs-main a[aria-current="page"], .tabs.tabs-main a.seg-on { border: 0; background: var(--accent); color: var(--on-accent); }
.tabs.tabs-main.seg-ready a[aria-current="page"], .tabs.tabs-main.seg-ready a.seg-on { background: transparent; }
.tabs.tabs-main.seg-ready a.seg-off { border: 0; background: transparent; color: var(--text-soft); font-weight: 400; }
:is(.pg-exam, .tabs.tabs-main, .theme-switch) .seg-thumb { position: absolute; z-index: -1; box-sizing: border-box; border: 0; border-radius: 999px; background: var(--accent);
  box-shadow: 0 2px 10px color-mix(in srgb, var(--accent) 35%, transparent); pointer-events: none; }
/* Glass (Juan, 2026-11-16): the track is frosted (translucent, the page blurred behind it, a lit top edge) and the pill
   is glassy accent (a soft highlight on top). Options sit 2 px further apart. Flat in print. */
:is(.pg-exam, .tabs.tabs-main, .theme-switch) {
  gap: 4px; padding: 4px; border-color: color-mix(in srgb, var(--text) 12%, transparent);
  background: linear-gradient(180deg, rgb(255 255 255 / .55), rgb(255 255 255 / .2)), color-mix(in srgb, var(--surface) 55%, transparent);
  -webkit-backdrop-filter: blur(14px) saturate(160%); backdrop-filter: blur(14px) saturate(160%);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .7), inset 0 -1px 0 rgb(0 0 0 / .04), 0 6px 18px -10px rgb(0 51 153 / .35);
}
:is(.pg-exam, .tabs.tabs-main, .theme-switch) .seg-thumb {
  background: linear-gradient(180deg, color-mix(in srgb, white 30%, var(--accent)) 0%, var(--accent) 55%);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .45), inset 0 -1px 0 rgb(0 0 0 / .12), 0 3px 12px color-mix(in srgb, var(--accent) 38%, transparent);
}
@media screen {
  :root[data-theme="dark"] :is(.pg-exam, .tabs.tabs-main, .theme-switch) {
    border-color: rgb(255 255 255 / .12);
    background: linear-gradient(180deg, rgb(255 255 255 / .09), rgb(255 255 255 / .02)), color-mix(in srgb, var(--surface) 55%, transparent);
    box-shadow: inset 0 1px 0 rgb(255 255 255 / .12), 0 8px 20px -12px rgb(0 0 0 / .7);
  }
  :root[data-theme="dark"] :is(.pg-exam, .tabs.tabs-main, .theme-switch) .seg-thumb {
    background: linear-gradient(180deg, color-mix(in srgb, white 22%, var(--accent)) 0%, var(--accent) 60%);
  }
}
@media print {
  :is(.pg-exam, .tabs.tabs-main, .theme-switch) { -webkit-backdrop-filter: none; backdrop-filter: none; background: none; box-shadow: none; }
  :is(.pg-exam, .tabs.tabs-main, .theme-switch) .seg-thumb { box-shadow: none; }
}
.theme-switch .seg-thumb.seg-glide { transition: left 380ms cubic-bezier(.3, .8, .25, 1), width 380ms cubic-bezier(.3, .8, .25, 1); }
/* The strip (Juan, 2026-11-18): the whole track takes one soft tint of the theme colour (--accent at 9 %), so the
   options not chosen read as one continuous strip with no box of their own (their word in a deeper accent ink). An
   option gets its own shape only under the pointer, on keyboard focus or while pressed: its tint deepens and the whole
   option zooms in, shape and word together. The chosen pill stays still. Pointer devices only for the zoom; never
   with reduced motion. The doubled classes outweigh each control's own seg-off rule above. */
:is(.pg-exam.pg-exam.pg-exam, .tabs.tabs-main.tabs-main, .theme-switch.theme-switch.theme-switch) {
  background: linear-gradient(180deg, rgb(255 255 255 / .35), rgb(255 255 255 / 0)), color-mix(in srgb, var(--accent) 12%, var(--surface));
}
@media screen {
  :root[data-theme="dark"] :is(.pg-exam.pg-exam.pg-exam, .tabs.tabs-main.tabs-main, .theme-switch.theme-switch.theme-switch) {
    background: linear-gradient(180deg, rgb(255 255 255 / .06), rgb(255 255 255 / 0)), color-mix(in srgb, var(--accent) 14%, var(--surface));
  }
}
:is(.pg-exam.pg-exam.pg-exam, .tabs.tabs-main.tabs-main, .theme-switch.theme-switch.theme-switch, .tabs.tabs.tabs) > :is(a, button):not([aria-current="page"], [aria-current="true"], [aria-checked="true"], .seg-on) {
  background: transparent; color: color-mix(in srgb, var(--accent) 45%, var(--text));
}
:is(.pg-exam.pg-exam.pg-exam, .tabs.tabs-main.tabs-main, .theme-switch.theme-switch.theme-switch, .tabs.tabs.tabs) > :is(a, button):not([aria-current="page"], [aria-current="true"], [aria-checked="true"], .seg-on):is(:hover, :focus-visible, :active) {
  background: color-mix(in srgb, var(--accent) 18%, transparent); color: var(--text); text-decoration: none;
}
:is(.pg-exam, .tabs.tabs-main, .theme-switch) .seg-label { display: inline-flex; align-items: center; gap: inherit; }
@media (prefers-reduced-motion: no-preference) {
  :is(.pg-exam, .tabs, .theme-switch) > :is(a, button) { transition: color .3s ease, background-color .25s ease, transform .26s cubic-bezier(.2, .7, .2, 1), box-shadow .26s ease; }
  :is(.pg-exam, .tabs, .theme-switch) > :is(a, button):not([aria-current="page"], [aria-current="true"], [aria-checked="true"], .seg-on):focus-visible { transform: scale(1.08); }
}
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  :is(.pg-exam, .tabs, .theme-switch) > :is(a, button):not([aria-current="page"], [aria-current="true"], [aria-checked="true"], .seg-on):hover {
    z-index: 1; transform: scale(1.08); box-shadow: 0 4px 12px -6px color-mix(in srgb, var(--accent) 55%, transparent);
  }
}
@media (prefers-reduced-motion: reduce) { .theme-switch .seg-thumb.seg-glide, .theme-switch button { transition: none; } }
.pg-lead { max-width: 680px; margin: 0 0 20px; color: var(--text-soft); font-size: 1.05rem; }
[data-swap="pg"] .pg-title { animation: pg-title .18s ease-out; }
[data-swap="pg"] .pg-head ~ * { animation: pg-fade .22s ease-out; }
@keyframes pg-title { from { opacity: 0; transform: translateY(4px); } }
@keyframes pg-fade { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { [data-swap="pg"] .pg-title, [data-swap="pg"] .pg-head ~ * { animation: none; } }
.stat-list { display: grid; gap: 0; margin: 0 0 10px; }
.stat-list > div { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--border); }
.stat-list dt { color: var(--text-soft); }
.stat-list dd { margin: 0; font-weight: 650; font-variant-numeric: tabular-nums; }
.stat-inline { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0 28px; }
.exam-date { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin: 18px 0; }
.domain-table th[scope="row"] { font-weight: 500; text-transform: none; letter-spacing: 0; font-size: .92rem; color: var(--text); white-space: nowrap; }
.domain-table .cell-meter { display: flex; align-items: center; gap: 10px; }
.domain-table .cell-meter .pct { min-width: 46px; font-variant-numeric: tabular-nums; font-weight: 600; }
.domain-table .cell-meter .meter-bar { flex: 1; }
.domain-table td .meter-label { display: none; }
.domain-table td { min-width: 120px; }
.chart-grid { align-items: stretch; }
.chart-grid > .chart { display: flex; flex-direction: column; }
.chart-grid > .chart > .chart-data { margin-top: auto; padding-top: 10px; }
.chart { margin: 0; padding: 14px 16px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.chart figcaption { font-weight: 600; margin-bottom: 8px; }
.chart-svg { width: 100%; height: auto; display: block; }
.ch-grid { stroke: var(--border); stroke-width: 1; }
.ch-axis { font: 400 11px var(--font); fill: var(--muted); }
.ch-line { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; }
.ch-target { stroke: var(--ok); stroke-width: 1.6; stroke-dasharray: 6 5; }
.ch-target-label { fill: var(--ok); font-weight: 600; }
.ch-exam { stroke: var(--ccnp); stroke-width: 1.4; stroke-dasharray: 2 4; }
.ch-dot { stroke: var(--surface); stroke-width: 1.5; }
.ch-dot.ch-low, .bar-fill.ch-low, .key.ch-low { fill: var(--danger); background: var(--danger); }
.ch-dot.ch-mid, .bar-fill.ch-mid, .key.ch-mid { fill: var(--warn); background: var(--warn); }
.ch-dot.ch-high, .bar-fill.ch-high, .key.ch-high { fill: var(--ok); background: var(--ok); }
.chart-data { margin-top: 10px; font-size: .85rem; }
.chart-data summary { cursor: pointer; color: var(--accent); }
.bars { list-style: none; padding: 0; margin: 0; display: grid; gap: 7px; }
.bars li { display: grid; grid-template-columns: minmax(110px, 38%) 1fr 62px; align-items: center; gap: 10px; margin: 0; font-size: .82rem; }
.bar-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-soft); }
.bar-track { position: relative; height: 12px; border-radius: 999px; background: var(--bg-soft); border: 1px solid var(--border); overflow: visible; }
.bar-fill { display: block; height: 100%; border-radius: 999px; }
.bar-target { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--text); opacity: .55; }
.bars li.bar-more { display: block; font-size: .78rem; }
.bar-untested .bar-track { border-style: dashed; background: transparent; }
.bar-untested .bar-val { font-weight: 400; color: var(--muted); font-size: .74rem; white-space: nowrap; }
.bar-val { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
/* Preparation trend: a line of facts above the drawing, diamonds for full exams, a dashed pace line to exam day. */
.trend-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 6px 14px; margin: 0 0 10px; }
.trend-facts > div { padding: 6px 0; border-bottom: 1px solid var(--border); }
.trend-facts dt { font-size: .76rem; color: var(--text-soft); }
.trend-facts dd { margin: 2px 0 0; font-weight: 650; font-variant-numeric: tabular-nums; }
.trend-facts dd .muted { display: block; font-weight: 400; font-size: .76rem; }
.ch-high-text { color: var(--ok); }
.ch-mid-text { color: var(--warn); }
.ch-low-text { color: var(--danger); }
.ch-full { stroke: var(--text); stroke-width: 1.4; }
.ch-full.ch-low { fill: var(--danger); }
.ch-full.ch-mid { fill: var(--warn); }
.ch-full.ch-high { fill: var(--ok); }
.ch-pace { stroke: var(--accent); stroke-width: 2; stroke-dasharray: 3 5; stroke-linecap: round; }
.ch-pace-end { fill: var(--surface); stroke: var(--accent); stroke-width: 2; }
.ch-pace-label { fill: var(--accent); font-weight: 600; stroke: var(--surface); stroke-width: 4px; stroke-linejoin: round; paint-order: stroke; }
.chart-key > span { display: inline-flex; align-items: center; gap: 6px; }
.key-line { display: inline-block; width: 18px; height: 0; border-top: 2px solid var(--accent); }
.key-line.key-pace { border-top-style: dotted; }
.key-line.key-target { border-top: 2px dashed var(--ok); }
.key-diamond { display: inline-block; width: 8px; height: 8px; margin: 0 2px; transform: rotate(45deg); border: 1.4px solid var(--text); background: var(--bg-soft); }
/* Chapters at a glance: one segmented bar, a tile per chapter (number and score), then the weakest few by name.
   The card keeps its shape as chapters are added: a tile is 44px, so 40 chapters still fit in a few rows. */
.glance-dist { display: flex; gap: 2px; height: 10px; border-radius: 999px; overflow: hidden; margin: 2px 0 8px; }
.glance-seg { display: block; min-width: 6px; }
.glance-seg.ch-high, .glance-swatch.ch-high { background: var(--ok); }
.glance-seg.ch-mid, .glance-swatch.ch-mid { background: var(--warn); }
.glance-seg.ch-low, .glance-swatch.ch-low { background: var(--danger); }
.gt.ch-high { --lv: var(--ok); }
.gt.ch-mid { --lv: var(--warn); }
.gt.ch-low { --lv: var(--danger); }
.glance-seg.ch-none { background: repeating-linear-gradient(135deg, var(--border-strong) 0 3px, transparent 3px 6px); }
.glance-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; list-style: none; margin: 0 0 12px; padding: 0; font-size: .78rem; color: var(--text-soft); }
.glance-legend li { display: inline-flex; align-items: center; gap: 6px; margin: 0; }
.glance-legend b { color: var(--text); font-variant-numeric: tabular-nums; }
.glance-swatch { display: inline-block; width: 10px; height: 10px; border-radius: 3px; }
.glance-swatch.ch-none { border: 1px dashed var(--border-strong); }
.glance-group h3 { margin: 0 0 6px; font: 600 .74rem var(--font); letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.glance-group + .glance-group { margin-top: 10px; }
.glance-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); gap: 6px; list-style: none; margin: 0; padding: 0; }
.gt { display: grid; place-items: center; align-content: center; gap: 1px; height: 44px; margin: 0; border-radius: 9px; border: 1px solid var(--lv, var(--border)); border-bottom-width: 3px; background: color-mix(in srgb, var(--lv, transparent) 14%, var(--surface)); color: var(--text); font-variant-numeric: tabular-nums; line-height: 1.05; cursor: default; }
.gt-n { font: 500 .66rem var(--font); color: var(--text-soft); }
.gt-v { font: 700 .86rem var(--font); }
.gt.ch-none { background: transparent; border: 1px dashed var(--border-strong); color: var(--muted); }
.glance-focus { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border); }
.glance-focus h3 { margin: 0 0 8px; font-size: .84rem; }
.glance-key { margin: 10px 0 0; font-size: .78rem; }
.chart-key { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; font-size: .78rem; }
.key { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 4px; }

.tracker-summary { margin: 0 0 12px; padding: 4px 16px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.tracker-scroll { max-height: 72vh; overflow: auto; border: 1px solid var(--border); border-radius: var(--radius); }
table.tracker { min-width: 960px; font-size: .88rem; }
table.tracker thead th { position: sticky; top: 0; z-index: 2; background: var(--bg-soft); }
table.tracker td, table.tracker th { padding: 5px 8px; vertical-align: middle; }
table.tracker .c-id { font: 600 .8rem var(--font); white-space: nowrap; color: var(--accent); text-transform: none; letter-spacing: 0; font-variant-numeric: tabular-nums; }
table.tracker tbody th[scope="row"], .chapter-table tbody th[scope="row"], .score-table tbody th[scope="row"] { text-transform: none; letter-spacing: 0; font-size: .88rem; color: inherit; }
table.tracker tr.tr-point .c-topic { padding-left: 24px; color: var(--text-soft); }
table.tracker tr.tr-unit .c-topic { font-weight: 600; }
table.tracker .tr-section th { position: static; background: var(--accent-soft); color: var(--text); text-transform: none; letter-spacing: 0; font-size: .9rem; padding: 9px 10px; }
table.tracker tr[data-row-status="completed"] { box-shadow: inset 3px 0 0 var(--ok); }
table.tracker tr[data-row-status="in_progress"] { box-shadow: inset 3px 0 0 var(--st-progress-ink); }
table.tracker tr[data-row-status="needs_review"] { box-shadow: inset 3px 0 0 var(--st-review-ink); background: color-mix(in srgb, var(--st-review) 5%, transparent); }
table.tracker select, table.tracker input, .score-form input, .score-form select, .item-row input, .resource-head input, .resource-head select, .add-resource input, .add-resource select, .thresholds input, .exam-date input, .filters input[type="search"], .icon-toolbar input[type="search"] {
  height: 32px; padding: 0 8px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); color: var(--text); font: inherit; font-size: .88rem; max-width: 100%;
}
table.tracker input[type="text"] { width: 100%; min-width: 150px; }
table.tracker input[type="date"] { min-width: 132px; }
/* A date nobody entered stays blank (no dd/mm/yyyy placeholder) until the field is used. */
table.tracker input[type="date"].is-empty:not(:focus) { color: transparent; }
table.tracker input[type="date"].is-empty:not(:focus)::-webkit-datetime-edit { color: transparent; }
.sel-status { min-width: 120px; font-weight: 600; }
tr[data-row-status="completed"] .sel-status { color: var(--ok); }
tr[data-row-status="in_progress"] .sel-status { color: var(--st-progress-ink); }
/* Not applicable: left out of everything, so the row steps back (the status says so in words). */
table.tracker tr.tr-na .c-topic, table.tracker tr.tr-na .c-id { color: var(--muted); text-decoration: line-through; text-decoration-thickness: 1px; }
table.tracker tr.tr-na .sel-status { color: var(--muted); }
/* Plan vs actual: a date taken from the plan reads quieter than one the learner typed, and is marked "plan" or "unit". */
table.tracker .c-target { white-space: nowrap; }
table.tracker input[type="date"].is-plan:not(:focus) { color: var(--text-soft); font-style: italic; }
.plan-mark { margin-left: 6px; font-size: .7rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.delta { font-size: .82rem; font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
.delta-on-time { color: var(--ok); }
.delta-late { color: var(--warn); }
.delta-overdue { color: var(--danger); }
.delta-late::before, .delta-overdue::before { content: "⚠ "; }
.delta-on-time::before { content: "✓ "; }
table.tracker tr.tr-overdue { background: color-mix(in srgb, var(--danger) 4%, transparent); }
.tracker-timing .is-overdue dd { color: var(--danger); }
/* Phones: each tracker row becomes a small card with only ID + topic on top and the status (and delta) underneath,
   so nothing scrolls sideways. Dates and notes are edited on wider screens. */
@media (max-width: 760px) {
  .tracker-scroll { max-height: none; overflow: visible; }
  table.tracker, table.tracker tbody { display: block; min-width: 0; }
  table.tracker thead, table.tracker .c-extra { display: none; }
  table.tracker tr.tr-section { display: block; }
  table.tracker tr.tr-section th { display: block; }
  table.tracker tr[data-row] {
    display: grid; grid-template-columns: auto auto minmax(0, 1fr); align-items: center; gap: 6px 10px;
    padding: 10px 12px; border-bottom: 1px solid var(--border);
  }
  table.tracker tr[data-row] > * { padding: 0; border: 0; }
  table.tracker tr[data-row] .c-id { grid-column: 1; align-self: start; padding-top: 1px; }
  table.tracker tr[data-row] .c-topic { grid-column: 2 / -1; line-height: 1.35; }
  table.tracker tr.tr-point .c-topic { padding-left: 0; }
  table.tracker tr.tr-point { padding-left: 24px; }
  table.tracker tr[data-row] .c-status { grid-column: 2; }
  table.tracker tr[data-row] .c-delta { display: block; grid-column: 3; }
  table.tracker select { height: 36px; }
  table.tracker .sel-status { width: 100%; max-width: 180px; }
}
tr[data-row-status="needs_review"] .sel-status { color: var(--st-review-ink); }

.score-form .filters { align-items: flex-start; }
.score-form .field { gap: 4px; }
.wide-field { flex: 1 1 260px; }
.wide-field input, .wide-field select { width: 100%; }
.field-error { color: var(--danger); font-size: .8rem; font-weight: 600; }
.score-preview { display: inline-block; min-width: 70px; height: 32px; line-height: 32px; font-weight: 700; font-size: 1.05rem; color: var(--accent); }
.score-table td, .score-table th, .chapter-table td, .chapter-table th { font-size: .88rem; font-variant-numeric: tabular-nums; }
.row-flag { background: color-mix(in srgb, var(--warn) 8%, transparent); }
.flag { color: var(--warn); cursor: help; }
.row-actions { white-space: nowrap; }
.link-btn { border: 0; background: none; color: var(--accent); font: inherit; cursor: pointer; padding: 0; }
.link-btn:hover { text-decoration: underline; }
td.lv-low { color: var(--danger); font-weight: 700; background: color-mix(in srgb, var(--danger) 9%, transparent); }
td.lv-mid { color: var(--warn); font-weight: 700; background: color-mix(in srgb, var(--warn) 9%, transparent); }
td.lv-high { color: var(--ok); font-weight: 700; background: color-mix(in srgb, var(--ok) 9%, transparent); }
td.lv-none { color: var(--muted); }
.thresholds input { width: 84px; }
.thresholds .muted { align-self: center; }

.resource { margin: 18px 0; }
.resource-head { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; margin-bottom: 14px; }
.grow { flex: 1 1 220px; }
.grow input, .grow select { width: 100%; }
.item-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.item-row .narrow { width: 64px; }
.item-row input[name="group"] { width: 110px; }
.item-row input[name="covers"] { width: 170px; }
.item-row .grow { flex: 1 1 220px; }
.add-item { margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--border-strong); }
.chapter-table td > .item-row { padding: 2px 0; }

.import-preview { margin-top: 18px; padding: 16px; border: 1px solid var(--border-strong); border-radius: var(--radius); background: var(--bg-soft); }
.import-preview h3 { margin-top: 0; }
.issue-list { margin: 6px 0 12px; font-size: .88rem; }
.issue-list li { margin: 4px 0; }

@media (max-width: 760px) {
  .bars li { grid-template-columns: 1fr 52px; }
  .bars .bar-label { grid-column: 1 / -1; }
  .bars .bar-track { grid-column: 1; }
}

/* Per-point status inside study cards (Juan, 2026-11-14): a section's control sits at its start, right under its title
   and above its text, the same place in every section; never pushed to the far edge of the page, away from what it is
   about. */
.section-title { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 16px; }
.section-title h2 { margin-bottom: .5em; }
.card-section .section-title { display: flex; flex-direction: column; align-items: flex-start; gap: 0; }
.card-section .section-title h2 { margin-bottom: .45em; }
.card-section .section-title .point-status { margin: 0 0 1em; }
.point-status { display: inline-flex; align-items: center; gap: 10px; font-size: .95rem; color: var(--text-soft); }
.point-status select { height: 36px; padding: 0 10px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--surface); color: var(--text); font: inherit; font-size: 1rem; }
.point-list { list-style: none; padding: 0; }
.point-list li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 16px; padding: 8px 0; border-bottom: 1px solid var(--border); }

/* Route map --------------------------------------------------------------
   Lists are stops on a route, drawn with the logo's own parts: a rail (the N's uprights) links the stops,
   ring nodes mark them and show status, the stretch in progress carries moving packets (the dashed diagonal),
   details read like router output (.card-meta), and hairlines replace boxes. The rail's centre is 14px in and
   content starts at 40px on every page, so text columns line up everywhere. Like the logo, the rail stops 2px
   short of each ring. */
.route { --rail-x: 14px; --gutter: 40px; position: relative; list-style: none; margin: 0 0 28px; padding: 0; }
.route > .hop { position: relative; margin: 0; padding: 0 0 22px var(--gutter); }
.route > .hop + .hop { margin-top: 0; }
.route > .hop::before { content: ""; position: absolute; left: calc(var(--rail-x) - 1px); top: 22px; bottom: -2px; width: 2px; background: var(--border); transform-origin: top; }
.route > .hop:last-child::before { display: none; }
.route > .hop.is-done::before { background: var(--accent); }
.route > .hop.is-current::before { background: repeating-linear-gradient(to bottom, var(--packets) 0 7px, var(--mark-gap) 7px 11px); animation: packets 1.1s linear infinite; }
@keyframes packets { from { background-position: 0 0; } to { background-position: 0 11px; } }
@media (prefers-reduced-motion: reduce) { .route > .hop.is-current::before { animation: none; } }

/* Nodes: 16px rings centred on the title's first line; 28px numbered stations for steps and phases. */
.route > .hop > .st, .route > .hop > .node { position: absolute; z-index: 1; left: calc(var(--rail-x) - 8px); top: 4px; }
.route > .hop > .st-new { background: var(--bg); }
.node { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--accent); background: radial-gradient(circle, var(--mark-line) 0 2.5px, var(--bg) 3px); }
.route > .hop-station::before { top: 30px; }
.node-lg { position: absolute; z-index: 1; left: calc(var(--rail-x) - 14px); top: 0; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--border-strong); background: var(--bg); font: 600 .8rem var(--font); color: var(--text-soft); font-variant-numeric: tabular-nums; }
.hop.is-done > .node-lg { border-color: var(--ok); background: var(--ok); color: var(--on-ok); }
.hop.is-current > .node-lg { border-color: var(--accent); color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }

/* Stop content. The whole stop is the link's hit area; the title shows the hover. */
.hop h3 { margin: 0; font-size: 1.02rem; line-height: 24px; }
.hop > p { margin: 0; line-height: 28px; }
.hop-link { color: var(--text); }
.hop-link::after { content: ""; position: absolute; inset: 0; }
.hop-link:hover { text-decoration: none; color: var(--text); }
.hop-link:hover h3, .hop-link:hover { color: var(--accent); }
.hop-id { margin-right: .6em; font: 600 .82em var(--font); color: var(--muted); font-variant-numeric: tabular-nums; }
.hop .card-meta { margin-top: 2px; }
.hop-status-ready { color: var(--ok); }
.hop-status-learning { color: var(--st-progress-ink); }
.hop-status-needs-labs { color: var(--needs-labs); }
.hop-status-needs-review { color: var(--st-review-ink); }
.hop-here { color: var(--accent); }
.route-link { font-weight: 600; }
.route-link span, .route-action span { display: inline-block; transition: transform .15s; }
.route-link:hover { text-decoration: none; }
.route-link:hover span, .route-action:hover span { transform: translateX(3px); }
.route-action { display: inline-flex; align-items: center; gap: .35em; margin-top: 8px; padding: 0; border: 0; background: none; font: 600 .95rem var(--font); color: var(--accent); cursor: pointer; }
.route-action:hover { color: var(--accent-hover); }


/* Welcome */
.onboard-steps { margin: .5rem 0 1rem; font-size: 1.125rem; line-height: 1.6; }   /* beside the N: one step larger, easy to read */
.onboard-steps > .hop { padding-bottom: 1.25rem; }
.onboard-steps p { line-height: 1.6; }
/* Welcome steps on hover (Juan, 2026-11-15): the number fills with the theme colour and the text grows 4 % away from it
   (a transform: nothing below moves). 280 ms each way on the soft ease. Pointer devices only; with reduced motion the
   number still fills, the text does not grow. */
@media (hover: hover) and (pointer: fine) {
  .onboard-steps > .hop > .node-lg { transition: background-color .28s cubic-bezier(.2, .7, .2, 1), border-color .28s cubic-bezier(.2, .7, .2, 1), color .28s cubic-bezier(.2, .7, .2, 1), box-shadow .28s cubic-bezier(.2, .7, .2, 1); }
  .onboard-steps > .hop > p { transform-origin: left center; transition: transform .28s cubic-bezier(.2, .7, .2, 1); }
  .onboard-steps > .hop:is(:hover, :focus-within) > .node-lg { border-color: var(--accent); background: var(--accent); color: var(--bg); box-shadow: 0 0 0 4px var(--accent-soft); }
  .onboard-steps > .hop:is(:hover, :focus-within) > p { transform: scale(1.04); }
}
@media (prefers-reduced-motion: reduce) {
  .onboard-steps > .hop > :is(.node-lg, p) { transition: none; }
  .onboard-steps > .hop:is(:hover, :focus-within) > p { transform: none; }
}
/* Welcome: the routes sit a little tighter so the whole page fits one 1280×800 view. */
.hero-split .choose-route .netpaths-list > .hop { padding-bottom: 12px; }
.hero-split .choose-route .netpaths-list .route-action { margin-top: 2px; }
.choose-route { margin: 0 0 8px; }
.choose-route .eyebrow { margin-bottom: 16px; }
.route-exams > .hop { padding-bottom: 30px; }
.route-exams > .hop > .tags { line-height: 24px; margin-bottom: 4px; }
.route-exams h3 { font-size: 1.15rem; line-height: 1.35; }

/* Choose your network path: a source ("you"), a trunk on the rail line, and a branch to each exam. Hover or focus
   lights the path to that exam with a solid branch. */
.netpaths { --branch-x: 60px; --trunk: var(--border); position: relative; max-width: 760px; }
.netpaths-src { position: relative; display: flex; align-items: center; gap: 10px; height: 20px; margin: 0 0 10px; color: var(--muted); }
.netpaths-src .node { margin-left: 6px; }
.netpaths-src::after { content: ""; position: absolute; left: 13px; top: 18px; width: 2px; height: 10px; background: var(--trunk); }
.netpaths-list { margin-bottom: 0; }
.netpaths-list > .hop { --in: var(--border); --out: var(--border); padding-left: calc(var(--branch-x) + 26px); }
.netpaths-list > .hop > .node { left: calc(var(--branch-x) - 8px); }
.netpaths-list > .hop::before { top: 0; bottom: 0; background: linear-gradient(to bottom, var(--in) 0 13px, var(--out) 13px); }
.netpaths-list > .hop:last-child::before { display: block; bottom: auto; height: 13px; }
.netpaths-list > .hop::after { content: ""; position: absolute; left: var(--rail-x); top: 11px; width: calc(var(--branch-x) - var(--rail-x) - 10px); height: 2px; background: var(--border); }
.netpaths-list > .hop:is(:hover, :focus-within) { --in: var(--accent); }
.netpaths-list > .hop:has(~ .hop:is(:hover, :focus-within)) { --in: var(--accent); --out: var(--accent); }
.netpaths:has(.hop:is(:hover, :focus-within)) { --trunk: var(--accent); }
.netpaths-list > .hop:is(:hover, :focus-within)::after { background: var(--accent); }   /* static: no moving packets on the route selector (Juan) */

/* A finished route in the path chooser: solid branch and trunk into it, a ✓ node, the ledger in ok green. */
.netpaths-list > .hop > .st { left: calc(var(--branch-x) - 8px); }
.netpaths-list > .hop.is-complete { --in: var(--ok); }
.netpaths-list > .hop.is-complete::after { animation: none; background: var(--ok); }
.netpaths-list > .hop:has(~ .hop.is-complete) { --out: var(--ok); --in: var(--ok); }
.netpaths:has(.hop.is-complete):not(:has(.hop:is(:hover, :focus-within))) { --trunk: var(--ok); }   /* the path being chosen wins */

/* Today, at 100%: route complete, with a short fully solid rail as its emblem. */
.route-complete { max-width: 760px; margin: 8px 0 32px; padding: 0 0 24px; border-bottom: 1px solid var(--border); }
.route-complete .eyebrow { color: var(--ok); }
.route-complete-emblem { position: relative; display: flex; width: max-content; gap: 28px; margin: 4px 0 12px; }
.route-complete-emblem::before { content: ""; position: absolute; left: 8px; right: 8px; top: 7px; height: 2px; background: var(--ok); }
.route-complete-emblem .st { position: relative; z-index: 1; }
.route-complete > p:not(.eyebrow, .route-complete-emblem) { color: var(--text-soft); }
.route-complete .route-actions { margin-top: 14px !important; }

/* Live labs: the topology, an IOS console per device, and objectives that check themselves (js/live.js). */
.live-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 6px 0 14px; }
/* The topology fills the page; the console floats over it in its own window (js/live.js). */
.live-topo { margin: 8px 0 36px; }
/* The whole drawing fits the visible frame: as wide as the page, never taller than the screen (the SVG keeps
   its aspect ratio and centres in the frame). */
.live-topo .dg { max-width: 100%; max-height: min(calc(100vh - 260px), 520px); min-height: 260px; }
.live-node { cursor: pointer; outline: none; }
.live-node:hover :is(use, image), .live-node:focus-visible :is(use, image) { filter: drop-shadow(0 0 3px var(--accent)); }
.live-node.is-selected :is(use, image) { filter: drop-shadow(0 0 4px var(--accent)) drop-shadow(0 0 1px var(--accent)); }
/* 3D or flat icons in the topology (live.js): a small switch in its corner, desktop only; phones always draw flat.
   On is shown by the knob's place as well as its colour. */
.live-3d { position: absolute; top: 6px; left: 6px; z-index: 2; display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px 3px 5px; border: 1px solid var(--border); border-radius: 999px; background: color-mix(in srgb, var(--surface) 88%, transparent); color: var(--muted); font: 500 .75rem var(--font); cursor: pointer; }
.live-3d:hover { color: var(--text); }
.live-3d:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.live-3d-knob { position: relative; width: 22px; height: 12px; border-radius: 999px; background: var(--border-strong); transition: background .15s; }
.live-3d-knob::after { content: ""; position: absolute; top: 2px; left: 2px; width: 8px; height: 8px; border-radius: 50%; background: var(--surface); transition: transform .15s; }
.live-3d[aria-pressed="true"] { color: var(--text); }
.live-3d[aria-pressed="true"] .live-3d-knob { background: var(--accent); }
.live-3d[aria-pressed="true"] .live-3d-knob::after { transform: translateX(10px); }

/* NTprompt (/ntprompt, sandbox.js): a tool of its own. Its header (the NTprompt> wordmark, the tool's actions, the
   way back to NTpath) replaces NTpath's; the palette and the canvas take the whole width and height of the window. */
html.ntprompt-on .site-header, html.ntprompt-on .site-footer { display: none; }
html.ntprompt-on .site-main { padding-top: 0; margin-top: 0; }
.sb-page { padding: 0 16px 12px; }
.nt-header { position: sticky; top: 0; z-index: 50; display: flex; align-items: center; gap: 10px 18px; margin: 0 -16px 12px; padding: 10px 16px; border-bottom: 1px solid var(--border); background: var(--bg); }
.nt-brand { flex: none; display: flex; font-size: 1.3rem; line-height: 1; color: var(--text); }   /* the drawn NTprompt> (brandMark('prompt')): the ">" is in the logo's colour */
.nt-brand:hover { color: var(--text); text-decoration: none; }
/* Labs: the way into NTprompt (Juan, 2026-11-15). A guide label, then the drawn NTprompt> in a frame of the theme colour,
   with a "_" cursor after the ">" that blinks like a terminal's, for as long as the page is open. The cursor is drawn on
   the wordmark's own 72-unit box, so it sits on its baseline. Solid with reduced motion; no cursor in print. */
.nt-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
/* Labs: the way in sits beside the lead (label over the button), and under it on narrow screens. */
.labs-intro { display: grid; grid-template-columns: minmax(0, 680px) auto; align-items: center; gap: 1.5rem 3rem; }
.labs-intro > .lead { margin: 0; }
.labs-intro > .nt-cta { flex-direction: column; align-items: flex-start; }
@media (max-width: 760px) { .labs-intro { grid-template-columns: minmax(0, 1fr); } .labs-intro > .nt-cta { flex-direction: row; align-items: center; } }
.nt-cta-label { color: var(--muted); font-size: .9rem; font-weight: 500; }
.nt-cta-btn { display: inline-flex; align-items: center; padding: .55rem 1.1rem .55rem .95rem; border: 1.5px solid var(--accent); border-radius: var(--radius-sm); background: var(--surface); color: var(--text); font-size: 1.35rem; line-height: 1; transition: background-color .2s ease, box-shadow .2s ease; }
.nt-cta-btn .brand { font-size: inherit; }
.nt-cta-btn:is(:hover, :focus-visible) { background: var(--accent-soft); box-shadow: var(--lit-shadow-hover); color: var(--text); text-decoration: none; }
.nt-cursor { height: 1.3086em; width: auto; flex: none; overflow: visible; fill: var(--accent); animation: nt-cursor 1.06s steps(1) infinite; }
@keyframes nt-cursor { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .nt-cursor { animation: none; } }
@media print { .nt-cursor { display: none; } }
.nt-end { display: flex; flex: none; align-items: center; gap: 8px; }
.nt-back { white-space: nowrap; }
.sb-topo { margin: 0; }
.sb-bar { display: flex; flex: 1; flex-wrap: wrap; align-items: center; gap: 6px 8px; min-width: 0; margin: 0; }
.sb-bar > * { flex: none; }
.sb-name input { width: 12rem; max-width: 100%; padding: 5px 10px; border: 1px solid var(--border-strong); border-radius: 8px; background: var(--surface); color: var(--text); font: 600 .95rem var(--font-display); }
.sb-open select { max-width: 14rem; padding: 5px 8px; border: 1px solid var(--border-strong); border-radius: 8px; background: var(--surface); color: var(--text); font: 400 .85rem var(--font); }
.sb-danger { color: var(--danger); }
.sb-count { margin-left: auto; color: var(--muted); font-size: .85rem; font-variant-numeric: tabular-nums; }
.sb-count.is-full { color: var(--text); font-weight: 600; }
.sb-work { display: grid; grid-template-columns: 168px minmax(0, 1fr); gap: 12px; min-width: 0; }
.sb-work.is-folded { grid-template-columns: 58px minmax(0, 1fr); }
.sb-palette { position: relative; }
.sb-fold { position: absolute; top: 6px; right: 6px; z-index: 1; display: grid; place-items: center; width: 24px; height: 24px; padding: 0; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); color: var(--muted); font: 600 1rem/1 var(--font); cursor: pointer; transition: transform .15s; }
.sb-fold:hover { color: var(--text); }
.sb-fold:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
.sb-work.is-folded .sb-fold { position: static; margin: 0 auto 4px; transform: rotate(180deg); }
.sb-work.is-folded .sb-group-h, .sb-work.is-folded .sb-item-name { display: none; }
.sb-work.is-folded .sb-palette { padding: 8px 6px; }
.sb-work.is-folded .sb-item { justify-content: center; padding: 5px 0; }
.sb-palette { display: flex; flex-direction: column; gap: 10px; max-height: max(360px, calc(100dvh - 120px)); overflow-y: auto; padding: 10px; border: 1px solid var(--border); border-radius: 14px; background: var(--lit-glow), var(--lit-panel); box-shadow: var(--lit-shadow); }
.sb-group { display: flex; flex-direction: column; gap: 2px; }
.sb-group-h { margin: 0 0 2px 4px; color: var(--muted); font: 600 .7rem var(--font); letter-spacing: .06em; text-transform: uppercase; }
.sb-item { display: flex; align-items: center; gap: 8px; width: 100%; padding: 5px 6px; border: 1px solid transparent; border-radius: 8px; background: none; color: var(--text); font: 500 .85rem var(--font); text-align: left; cursor: grab; }
.sb-item:hover { border-color: var(--border); background: var(--bg-soft); }
.sb-item:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
.sb-item:active { cursor: grabbing; }
.sb-icon { flex: none; width: 28px; height: 28px; --ni-ground: var(--surface); }
.sb-item-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sb-canvas { min-width: 0; overflow: hidden; border: 1px solid var(--border); border-radius: 14px; background: var(--bg-soft); touch-action: none; }
.sb-canvas.is-panning { cursor: grabbing; }
.sb-grid-dot { fill: var(--border-strong); }
/* Zoom controls in the canvas's corner. */
.sb-zoom { position: absolute; left: 10px; bottom: 10px; z-index: 4; display: flex; align-items: center; gap: 2px; padding: 3px; border: 1px solid var(--border); border-radius: 10px; background: color-mix(in srgb, var(--surface) 92%, transparent); box-shadow: 0 4px 14px -8px rgb(11 18 32 / .4); }
.sb-zoom .sb-tool { width: 30px; height: 30px; }
.sb-zoom .sb-tool svg { width: 18px; height: 18px; }
.sb-zoom button:not(.sb-tool) { min-width: 30px; height: 28px; padding: 0 8px; border: 0; border-radius: 7px; background: none; color: var(--text); font: 600 .9rem var(--font); cursor: pointer; }
.sb-zoom button:hover { background: var(--bg-soft); }
.sb-zoom button:focus-visible { outline: 2px solid var(--focus); outline-offset: 0; }
.sb-zoom-level { min-width: 3.4em; color: var(--muted); font: 500 .75rem var(--font); font-variant-numeric: tabular-nums; text-align: center; }
/* Notes and shapes (sandbox.js): shapes sit behind the devices, notes on top. Status colours stay out of them. */
.sb-shape { cursor: move; outline: none; }
.sb-shape :is(rect, ellipse):not(.sb-handle) { fill: color-mix(in srgb, var(--tone) 7%, transparent); stroke: var(--tone); stroke-width: 1.6; stroke-dasharray: 8 5; }
.sb-shape.is-selected :is(rect, ellipse):not(.sb-handle), .sb-shape:focus-visible :is(rect, ellipse):not(.sb-handle) { stroke-width: 2.6; stroke-dasharray: none; }
.sb-shape-label { fill: var(--tone); font: 600 14px var(--font); letter-spacing: .02em; }
.sb-tone-slate { --tone: var(--dg-end); }
.sb-tone-backbone { --tone: var(--dg-switch); }
.sb-tone-indigo { --tone: var(--dg-cloud); }
.sb-tone-orange { --tone: var(--dg-security); }
.sb-handle { fill: var(--surface); stroke: var(--accent); stroke-width: 2; cursor: nwse-resize; }
.sb-note { cursor: move; outline: none; }
.sb-note rect { fill: color-mix(in srgb, var(--fiber) 9%, var(--surface)); stroke: var(--border-strong); stroke-width: 1.2; filter: drop-shadow(0 3px 6px rgb(11 18 32 / .18)); }
.sb-note.is-selected rect, .sb-note:focus-visible rect { stroke: var(--accent); stroke-width: 2; }
.sb-note text { fill: var(--text); font: 400 13px var(--font); }
/* Cables: a wide invisible twin makes each one easy to click; the selected one glows and shows a handle on each end. */
.sb-link-hit { fill: none; stroke: transparent; stroke-width: 16; pointer-events: stroke; cursor: pointer; outline: none; }
.sb-link-hit:focus-visible { stroke: color-mix(in srgb, var(--focus) 35%, transparent); }
.sb-canvas path.dg-link.is-selected { filter: drop-shadow(0 0 3px var(--accent)) drop-shadow(0 0 1px var(--accent)); }
.sb-end { fill: var(--surface); stroke: var(--accent); stroke-width: 2.5; cursor: grab; outline: none; }
.sb-end:hover, .sb-end:focus-visible { fill: var(--accent); }
/* A cable being captured: a lens on its middle (click it to open the capture). */
.sb-cap-badge { cursor: pointer; outline: none; }
.sb-cap-badge > circle:first-child { fill: var(--surface); stroke: var(--border-strong); stroke-width: 1.5; }
.sb-cap-badge.is-on > circle:first-child { stroke: var(--accent); stroke-width: 2.5; }
.sb-cap-badge:focus-visible > circle:first-child { stroke: var(--focus); stroke-width: 3; }
.sb-cap-lens { fill: none; stroke: var(--text); stroke-width: 2; stroke-linecap: round; }
/* The capture panel (sandbox.js renderCapture): Wireshark's packet list, details and bytes, over the canvas. */
.sb-cap { position: absolute; left: 10px; right: 10px; bottom: 54px; z-index: 5; display: grid; grid-template-rows: auto auto minmax(0, 1fr); height: min(46%, 420px); min-height: 220px; border: 1px solid var(--border-strong); border-radius: 12px; background: var(--surface); box-shadow: 0 14px 40px -18px rgb(11 18 32 / .55); overflow: hidden; touch-action: auto; user-select: text; -webkit-user-select: text; }
.sb-cap[hidden] { display: none; }
.sb-cap-head { display: flex; align-items: center; gap: 4px; padding: 4px 6px 4px 12px; border-bottom: 1px solid var(--border); background: var(--bg-soft); }
.sb-cap-title { display: flex; flex: 1; align-items: center; gap: 8px; min-width: 0; overflow: hidden; font: 600 .85rem var(--font); white-space: nowrap; text-overflow: ellipsis; }
.sb-cap-dot { flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--border-strong); }
.sb-cap-dot.is-on { background: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent); }
.sb-cap .sb-tool { width: 30px; height: 30px; }
.sb-cap .sb-tool svg { width: 17px; height: 17px; }
.sb-cap .sb-tool svg.is-fill { fill: currentColor; }
.sb-cap .sb-tool[data-tip]:is(:hover, :focus-visible)::after { top: auto; bottom: calc(100% + 4px); left: auto; right: 0; transform: none; }
.sb-cap-filter input { width: 100%; padding: 5px 12px; border: 0; border-bottom: 1px solid var(--border); background: var(--surface); color: var(--text); font: 400 .82rem var(--mono); outline: none; }
.sb-cap-filter input.is-good { background: color-mix(in srgb, var(--ok) 14%, var(--surface)); }
.sb-cap-filter input.is-bad { background: color-mix(in srgb, var(--danger) 16%, var(--surface)); }
.sb-cap-panes { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); min-height: 0; }
.sb-cap-list { min-height: 0; overflow: auto; outline: none; }
.sb-cap-list:focus-visible { box-shadow: inset 0 0 0 2px var(--focus); }
.sb-cap-table { width: 100%; border-collapse: collapse; font: 400 .74rem/1.35 var(--mono); font-variant-numeric: tabular-nums; }
.sb-cap-table th { position: sticky; top: 0; z-index: 1; padding: 3px 8px; border-bottom: 1px solid var(--border); background: var(--bg-soft); color: var(--muted); font: 600 .7rem var(--font); text-align: left; text-transform: none; letter-spacing: 0; }
.sb-cap-table td { padding: 2px 8px; white-space: nowrap; cursor: default; }
.sb-cap-table td:last-child { white-space: normal; }
.sb-cap-table .sb-p-icmp td { background: color-mix(in srgb, var(--dg-security) 10%, transparent); }
.sb-cap-table :is(.sb-p-tcp, .sb-p-ssh) td { background: color-mix(in srgb, var(--dg-cloud) 10%, transparent); }
.sb-cap-table :is(.sb-p-udp, .sb-p-dns, .sb-p-snmp, .sb-p-syslog, .sb-p-cflow) td { background: color-mix(in srgb, var(--fiber) 11%, transparent); }
.sb-cap-table .sb-p-http td { background: color-mix(in srgb, var(--dg-route) 13%, transparent); }
.sb-cap-table tr.is-sel td { background: var(--accent); color: var(--bg); }
.sb-cap-detail { min-height: 0; overflow: auto; padding: 6px 10px; border-left: 1px solid var(--border); font: 400 .74rem/1.45 var(--mono); }
.sb-cap-detail summary { cursor: pointer; font-weight: 600; }
.sb-cap-detail ul { margin: 2px 0 6px; padding-left: 18px; list-style: none; }
.sb-cap-hex { margin: 8px 0 0; padding: 6px 8px; border-radius: 6px; background: var(--bg-soft); font: 400 .7rem/1.4 var(--mono); white-space: pre; overflow-x: auto; }
.sb-cap-empty { margin: 10px 12px; color: var(--muted); font: 400 .8rem var(--font); }
@media (max-width: 900px) { .sb-cap { bottom: 8px; height: 60%; } .sb-cap-panes { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) minmax(0, 1fr); } .sb-cap-detail { border-left: 0; border-top: 1px solid var(--border); } }
.live-node.is-off :is(use, image) { opacity: .4; }
.live-node.is-off .dg-label { opacity: .6; }
.sb-editor { position: absolute; z-index: 6; padding: 8px 10px; border: 2px solid var(--accent); border-radius: 8px; background: var(--surface); color: var(--text); font: 400 13px/18px var(--font); box-shadow: 0 8px 24px -10px rgb(11 18 32 / .45); }
.sb-editor.is-note { resize: both; }
/* The toolbar's groups: cable for new connections (a segmented control), insert, power. */
.sb-sep { flex: none; width: 1px; height: 22px; background: var(--border); }
/* Icon controls (views/sandbox.js `tool`): the icon says it, the label and tooltip name it. */
.sb-tool { position: relative; display: inline-grid; place-items: center; flex: none; width: 34px; height: 34px; padding: 0; border: 1px solid transparent; border-radius: 8px; background: none; color: var(--text-soft); cursor: pointer; }
.sb-tool svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sb-tool[data-sb-start] svg { fill: currentColor; }
.sb-tool .sb-n { width: 24px; height: 24px; stroke: none; overflow: visible; }   /* the N mark keeps the logo's colours */
.sb-tool:disabled .sb-n { filter: grayscale(1); }
/* The media in the cable menu, each with its line pattern beside its name. */
.sb-menu [data-sb-act^="m:"] { display: flex; align-items: center; gap: 10px; }
.sb-menu [data-sb-act^="m:"]::before { content: ""; flex: none; width: 22px; height: 0; border-top: 2px solid var(--text-soft); }
.sb-menu [data-sb-act="m:fiber"]::before { border-top: 3px dashed var(--dg-switch); }
.sb-menu [data-sb-act="m:mpls"]::before { border-top: 3px dotted var(--dg-cloud); }
.sb-menu [data-sb-act="m:leased"]::before { border-top: 2px dashed var(--text-soft); }
.sb-menu [role="menuitemradio"][aria-checked="true"] { font-weight: 700; }
.sb-menu [role="menuitemradio"][aria-checked="true"]::after { content: "✓"; margin-left: auto; color: var(--accent); }
.sb-tool:hover:not(:disabled) { border-color: var(--border); background: var(--bg-soft); color: var(--text); }
.sb-tool:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
.sb-tool:disabled { opacity: .35; cursor: default; }
.sb-tool.sb-danger { color: var(--danger); }
/* Tooltips: shown at once on hover or keyboard focus (the title attribute waits too long). */
[data-tip] { position: relative; }
.sb-page [data-tip]:is(:hover, :focus-visible)::after { content: attr(data-tip); position: absolute; top: calc(100% + 6px); left: 50%; z-index: 70; padding: 3px 8px; border-radius: 6px; background: var(--text); color: var(--bg); font: 500 .74rem/1.4 var(--font); white-space: nowrap; transform: translateX(-50%); pointer-events: none; }
.sb-zoom [data-tip]:is(:hover, :focus-visible)::after { top: auto; bottom: calc(100% + 6px); }
.sb-seg { display: inline-flex; padding: 2px; border: 1px solid var(--border-strong); border-radius: 9px; background: var(--bg-soft); }
.sb-seg-btn { display: inline-flex; align-items: center; gap: 6px; padding: 9px 8px; border: 0; border-radius: 7px; background: none; color: var(--text-soft); font: 500 .8rem var(--font); cursor: pointer; }
.sb-seg-btn[aria-pressed="true"] { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgb(11 18 32 / .18); }
.sb-seg { background: color-mix(in srgb, var(--accent) 9%, var(--bg-soft)); }
.sb-seg-btn:not([aria-pressed="true"]) { background: transparent; color: color-mix(in srgb, var(--accent) 45%, var(--text)); }
.sb-seg-btn:not([aria-pressed="true"]):is(:hover, :focus-visible, :active) { background: color-mix(in srgb, var(--accent) 18%, transparent); color: var(--text); }
.sb-seg { gap: 2px; }
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .sb-seg-btn { transition: transform .26s cubic-bezier(.2, .7, .2, 1), background-color .25s ease, color .3s ease; }
  .sb-seg-btn:not([aria-pressed="true"]):hover { position: relative; z-index: 1; transform: scale(1.08); }
}
.sb-seg-btn:focus-visible { outline: 2px solid var(--focus); outline-offset: 0; }
.sb-cable-key { width: 18px; height: 0; border-top: 2px solid var(--text-soft); }
.sb-cable-fiber { border-top: 3px dashed var(--dg-switch); }
.sb-cable-mpls { border-top: 3px dotted var(--dg-cloud); }
.sb-wire-fiber { stroke: var(--dg-switch); }
.sb-wire-mpls { stroke: var(--dg-cloud); stroke-dasharray: 12 4 2 4; }
.sb-wire-leased { stroke-dasharray: 9 6; }
.sb-report { max-height: 46vh; margin: 0; padding-left: 18px; overflow-y: auto; font-size: .86rem; }
.sb-report li + li { margin-top: 4px; }
.sb-canvas.is-drop { outline: 2px dashed var(--accent); outline-offset: -4px; }
.sb-canvas.is-moving, .sb-canvas.is-moving .live-node { cursor: grabbing; }
.sb-canvas .diagram { margin: 0; }
.sb-canvas .dg-legend { margin: 0; padding: 4px 10px 8px; }
.sb-canvas .diagram-scroll { border: 0; background: none; }
.sb-canvas .dg { width: 100%; min-width: 0 !important; height: max(340px, calc(100dvh - 160px)); max-height: none; }   /* the canvas fills the window; the drawing keeps its shape, centred */
.sb-canvas .dg-empty { display: block; }
.sb-empty { position: absolute; inset: 0; display: grid; place-items: center; margin: 0; padding: 24px; color: var(--muted); text-align: center; pointer-events: none; }
.sb-msg { margin: 8px 0 0; padding: 8px 12px; border-left: 3px solid var(--accent); border-radius: 6px; background: var(--bg-soft); font-size: .9rem; }
.sb-msg[data-tone="warn"] { border-left-color: var(--warn); }
.sb-menu { position: fixed; z-index: 60; display: flex; flex-direction: column; min-width: 200px; padding: 4px; border: 1px solid var(--border-strong); border-radius: 10px; background: var(--surface); box-shadow: 0 10px 30px -10px rgb(11 18 32 / .35); }
.sb-menu[hidden] { display: none; }
.sb-menu { max-height: min(340px, 60vh); overflow-y: auto; }
.sb-menu.is-ports { min-width: 132px; max-height: min(300px, 50vh); }
.sb-menu.is-ports button { padding: 4px 10px; font: 500 .82rem var(--font); font-variant-numeric: tabular-nums; }
.sb-menu-title { margin: 2px 6px 4px; color: var(--muted); font: 600 .72rem var(--font); letter-spacing: .04em; text-transform: uppercase; }
/* The cable being connected: a dashed line from the source device to the pointer (sandbox.js). */
.sb-wire { position: absolute; inset: 0; z-index: 3; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.sb-wire[hidden] { display: none; }
.sb-wire-line { stroke: var(--accent); stroke-width: 3; stroke-dasharray: 9 6; stroke-linecap: round; }
.sb-wire-start, .sb-wire-end { fill: var(--surface); stroke: var(--accent); stroke-width: 2.5; }
.sb-canvas.is-cabling, .sb-canvas.is-cabling .live-node { cursor: crosshair; }
.sb-menu button { padding: 7px 10px; border: 0; border-radius: 6px; background: none; color: var(--text); font: 500 .88rem var(--font); text-align: left; cursor: pointer; }
.sb-menu button:hover, .sb-menu button:focus-visible { background: var(--bg-soft); outline: none; }
.sb-page { position: relative; }
.sb-dialog { width: min(420px, calc(100vw - 32px)); padding: 0; border: 1px solid var(--border-strong); border-radius: 14px; background: var(--surface); color: var(--text); }
.sb-dialog::backdrop { background: rgb(11 18 32 / .45); }
.sb-form { display: flex; flex-direction: column; gap: 12px; padding: 18px 20px; }
.sb-form h2 { margin: 0; font-size: 1.15rem; }
.sb-form label { display: flex; flex-direction: column; gap: 4px; font-size: .85rem; color: var(--text-soft); }
.sb-form :is(select, input) { padding: 7px 10px; border: 1px solid var(--border-strong); border-radius: 8px; background: var(--bg); color: var(--text); font: 400 .95rem var(--font); }
.sb-form-error { margin: 0; color: var(--danger); font-size: .85rem; }
@media (max-width: 1080px) {
  .nt-header { flex-wrap: wrap; }
  .nt-end { margin-left: auto; }
  .sb-bar { order: 3; flex-basis: 100%; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
}
@media (max-width: 520px) { .nt-back-word { display: none; } }
@media (max-width: 900px) {
  .sb-work, .sb-work.is-folded { grid-template-columns: minmax(0, 1fr); }
  .sb-fold { display: none; }
  .sb-work.is-folded .sb-group-h { display: none; }
  .sb-work.is-folded .sb-item-name { display: block; }
  .sb-palette { flex-direction: row; max-height: none; overflow-x: auto; overflow-y: hidden; padding: 6px; scrollbar-width: thin; }
  .sb-group { flex-direction: row; align-items: center; }
  .sb-group-h { display: none; }
  .sb-item { flex-direction: column; gap: 2px; width: 74px; padding: 4px; font-size: .68rem; text-align: center; }
  .sb-item-name { white-space: normal; line-height: 1.15; }
  .sb-count { margin-left: 0; }
}
/* Split screen: the toolbar and palette scroll in a line above the canvas, which takes what is left. */
html.ntprompt-on.live-split-on .nt-header { position: fixed; left: 0; right: 0; margin: 0; padding: 8px 12px; }
.live-page.is-split .sb-name input { width: 9rem; }
.live-page.is-split .sb-work { flex: 1; display: flex; flex-direction: column; gap: 0; min-height: 0; }
.live-page.is-split .sb-palette { flex: none; border: 0; border-bottom: 1px solid var(--border); border-radius: 0; box-shadow: none; }
.live-page.is-split .sb-canvas { border: 0; border-radius: 0; }
.live-page.is-split .sb-msg { position: absolute; left: 8px; right: 8px; bottom: 8px; z-index: 3; margin: 0; box-shadow: 0 6px 20px -8px rgb(11 18 32 / .4); }
@media (max-width: 760px) { .live-3d { display: none; } }
@media (prefers-reduced-motion: reduce) { .live-3d-knob, .live-3d-knob::after { transition: none; } }
.live-node:focus-visible { outline: 2px solid var(--focus); outline-offset: 4px; }
.dg-link.live-ping { stroke: var(--packets) !important; stroke-dasharray: 7 4; animation: live-ping .6s linear infinite; }
@keyframes live-ping { to { stroke-dashoffset: -11; } }
@media (prefers-reduced-motion: reduce) { .dg-link.live-ping { animation: none; } }
.live-tip { margin: 6px 0 0; font-size: .85rem; }
.live-tabs { display: flex; flex-wrap: wrap; gap: 4px; margin: 0 0 8px; }
.live-tab { display: inline-flex; align-items: baseline; gap: 6px; padding: 5px 10px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); color: var(--text-soft); font: 500 .85rem var(--mono); cursor: pointer; }
.live-tab:hover { border-color: var(--border-strong); color: var(--text); }
.live-tab[aria-selected="true"] { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.live-tab-kind { font-size: .65rem; text-transform: uppercase; letter-spacing: .08em; opacity: .75; }
/* The console is a terminal window in the identity: a Night body in both themes, the bar in Backbone on light
   and Night 800 on dark, Frost text and the mark accent for the prompt and the active device. */
.term { --term-bg: var(--night-950); --term-bar: var(--backbone); --term-tabs: color-mix(in srgb, var(--backbone) 35%, var(--night-950));
  --term-fg: var(--frost); --term-dim: var(--night-300); --term-prompt: var(--packet); --term-line: rgb(0 0 0 / .45);
  overflow: hidden; border: 1px solid var(--night-700); border-radius: 10px; background: var(--term-bg); box-shadow: 0 10px 30px -12px rgb(11 18 32 / .45), 0 2px 6px -2px rgb(11 18 32 / .25); }
@media screen and (prefers-color-scheme: dark) { :root:not([data-theme]) .term { --term-bar: var(--night-800); --term-tabs: var(--night-900); } }
@media screen { :root[data-theme="dark"] .term { --term-bar: var(--night-800); --term-tabs: var(--night-900); } }
.term:focus-within { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--focus), 0 10px 30px -12px rgb(11 18 32 / .45); }
.term-bar { position: relative; display: flex; align-items: center; justify-content: center; height: 34px; padding: 0 12px; background: var(--term-bar); border-bottom: 1px solid var(--term-line); }
.term-dots { position: absolute; left: 12px; top: 50%; display: flex; gap: 8px; transform: translateY(-50%); }
/* Window dots in the theme, not red/amber/green: those colours mean status (interfaces, checks). */
.term-dots i { width: 12px; height: 12px; border-radius: 50%; background: color-mix(in srgb, var(--frost) 30%, transparent); box-shadow: inset 0 0 0 .5px rgb(0 0 0 / .25); }
.term-dots i:nth-child(3) { background: var(--term-prompt); }
.term-title { overflow: hidden; max-width: calc(100% - 140px); color: var(--term-dim); font-size: .8rem; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.term .live-cli { display: block; white-space: normal; max-width: none; height: 380px; padding: 0; overflow-y: auto; overscroll-behavior: contain; border: 0; border-radius: 0; background: var(--term-bg); color: var(--term-fg); font: 500 .82rem/1.4 var(--mono); }
/* Like a real terminal: the prompt follows the last line of output and everything scrolls together. */
.live-cli .cli-prompt { color: var(--term-fg); }
.live-cli .cli-log { padding: 10px 14px 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.live-cli .cli-log:empty { display: none; }
.live-line { margin: 0; padding: 0 14px 10px; }
.live-cli .cli-log:empty + .live-line { padding-top: 10px; }
.live-input-wrap { display: flex; align-items: baseline; gap: 0; cursor: text; }
.live-input { flex: 1; min-width: 0; padding: 0 0 0 .5ch; border: 0; background: transparent; color: var(--term-fg); font: inherit; caret-color: var(--term-fg); caret-shape: block; }
.live-input:focus { outline: none; }
.live-keys { margin: 8px 0 0; font-size: .8rem; color: var(--muted); }
.live-keys kbd { padding: 0 5px; border: 1px solid var(--border-strong); border-radius: 4px; font-size: .75rem; }
.live-objectives > .hop h3 { font-size: 1.05rem; }
.live-hop-count { margin-left: .4em; font: 500 .8rem var(--font); color: var(--muted); font-variant-numeric: tabular-nums; }
.live-objectives > .hop.is-done .live-hop-count { color: var(--ok); }
/* A stop's ring fills clockwise with the share of its checks that pass. */
.route > .hop > .st-part { border-color: var(--st-progress-ink); background: conic-gradient(var(--st-progress) var(--p), var(--bg) 0); }

/* Overall progress: one segment per objective, sized by its checks, filled by what passes. */
.live-progress { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 8px 16px; margin: 4px 0 22px; padding: 12px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.live-progress-label { color: var(--muted); }
.live-meter { display: flex; gap: 4px; height: 8px; }
.live-seg { flex: 1 1 0; min-width: 12px; border-radius: 2px; background: linear-gradient(90deg, var(--warn) var(--p), var(--border) 0); }
.live-seg.is-done { background: var(--ok); }
.live-progress-count { font: 500 .85rem var(--font); font-variant-numeric: tabular-nums; color: var(--text-soft); }
.live-page.is-complete .live-progress-count { color: var(--ok); }
/* The grade: a chip next to the count; ✓ and the words carry the pass, not the colour alone. */
.live-grade { padding: 2px 10px; border: 1px solid var(--border-strong); border-radius: 999px; font: 600 .85rem var(--font); font-variant-numeric: tabular-nums; color: var(--text-soft); white-space: nowrap; }
.live-grade:empty { display: none; }
.live-grade.is-pass { border-color: var(--ok); color: var(--ok); }
.live-grade.is-pass::after { content: " ✓"; }
.lab-grade.is-pass { border-color: var(--ok); color: var(--ok); }
.live-checks { list-style: none; margin: 6px 0 4px; padding: 0; font-size: .9rem; color: var(--text-soft); }
.live-checks li { margin: 2px 0; }
.live-checks .is-pass { color: var(--ok); }
.live-checks .is-pass span[aria-hidden] { font-weight: 700; }
.live-reveal { margin: 4px 0; font-size: .9rem; }
.live-reveal summary { cursor: pointer; color: var(--link); font-weight: 500; }
.live-solution { margin: 6px 0 0; padding: 10px 14px; }
.live-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.live-page.is-complete .live-goals-head h2::after { content: " · all met"; color: var(--ok); font-size: .7em; }
@media (max-width: 960px) {
  .live-progress { grid-template-columns: minmax(0, 1fr); }
}

/* The console window. Placed by js/live.js (left/top/width/height); resized from its corner. */
.live-float { position: fixed; z-index: 45; right: 16px; bottom: 16px; display: flex; flex-direction: column; width: 560px; height: 400px;
  min-width: 360px; min-height: 240px; max-width: calc(100vw - 32px); max-height: calc(100vh - 32px); resize: both; }
.live-float[hidden] { display: none; }
.live-float.is-min { height: auto; min-height: 0; resize: none; }
.live-float.is-min .term-body { display: none; }
.live-float.is-opening { animation: live-win-in .15s ease-out; }
@keyframes live-win-in { from { opacity: 0; transform: translateY(8px) scale(.985); } }
@media (prefers-reduced-motion: reduce) { .live-float.is-opening { animation: none; } }
.live-float .term-bar { flex: none; cursor: move; user-select: none; -webkit-user-select: none; touch-action: none; }
.live-float.is-min .term-bar { cursor: pointer; border-bottom: 0; }
.live-float .term-bar:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
.live-float .term-title { margin: 0; max-width: calc(100% - 200px); font-family: var(--font); font-size: .8rem; font-weight: 500; line-height: 1.2; letter-spacing: 0; color: var(--term-dim); }
.term-actions { position: absolute; right: 8px; top: 50%; display: flex; gap: 2px; transform: translateY(-50%); }
.term-btn { display: grid; place-items: center; width: 28px; height: 24px; padding: 0; border: 0; border-radius: 6px; background: transparent; color: var(--term-dim); font: 500 1rem/1 var(--font); cursor: pointer; }
.term-btn:hover { background: rgb(255 255 255 / .08); color: var(--term-fg); }
.term-btn:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
.term-body { display: flex; flex: 1; flex-direction: column; min-height: 0; }
.live-float .live-tabs { flex: none; flex-wrap: nowrap; gap: 4px; margin: 0; padding: 6px 8px; overflow-x: auto; background: var(--term-tabs); border-bottom: 1px solid var(--term-line); scrollbar-width: none; }
.live-float .live-tab { flex: none; padding: 2px 8px; border-color: rgb(255 255 255 / .12); background: transparent; color: var(--term-dim); font-size: .78rem; }
.live-float .live-tab:hover { border-color: rgb(255 255 255 / .28); color: var(--term-fg); }
.live-float .live-tab[aria-selected="true"] { border-color: var(--term-prompt); background: color-mix(in srgb, var(--term-prompt) 14%, transparent); color: var(--term-prompt); }
.live-float.term .live-cli { flex: 1; height: auto; min-height: 0; }
.live-float .live-keys { flex: none; margin: 0; padding: 4px 12px 6px; border-top: 1px solid rgb(255 255 255 / .06); font: 400 .7rem var(--mono); color: var(--term-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.live-float .live-keys kbd { padding: 0 4px; border-color: rgb(255 255 255 / .2); color: var(--term-fg); font-size: .68rem; }
/* Parts that exist only in the split screen (phones and tablets). */
.live-topo-head, .live-divider, .live-keybar, .live-goals-close, .live-goals-intro { display: none; }
.live-goals-head h2 { margin-top: 0; }
.live-pan { position: relative; touch-action: pan-y; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.live-pan image, .live-pan svg { -webkit-user-drag: none; }
/* Up ports blink in step across redraws: live.js sets the phase from a shared clock on each new drawing. */
.dg-live .dg-port-up .dg-port-halo, .dg-live .dg-port-up .dg-port-dot { animation-delay: var(--blink-phase, 0s); }

/* Split screen: the topology (fitted to its half, no zoom or pan) and the console share the screen under the header; js/live.js sets
   --live-top / --live-h from the visible viewport (so the phone keyboard never covers the input) and --split. */
html.live-split-on, html.live-split-on body { overflow: hidden; overscroll-behavior: none; }
.live-page.is-split > .page-head, .live-page.is-split > .live-progress { display: none; }
.live-page.is-split .live-split { position: fixed; z-index: 40; left: 0; right: 0; top: var(--live-top, 56px); height: var(--live-h, calc(100dvh - 56px));
  display: grid; grid-template-rows: minmax(0, var(--split, 50%)) 14px minmax(0, 1fr); background: var(--bg); }
.live-page.is-split .live-topo { display: flex; flex-direction: column; min-width: 0; min-height: 0; margin: 0; }
.live-page.is-split .live-topo-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 12px; border-bottom: 1px solid var(--border); }
.live-topo-title { overflow: hidden; font: 600 .9rem var(--font-display); white-space: nowrap; text-overflow: ellipsis; }
.live-page.is-split .live-tip { display: none; }
.live-page.is-split .live-pan { flex: 1; min-height: 0; overflow: hidden; touch-action: none; background: var(--bg-soft); }
.live-page.is-split [data-live-diagram] { position: absolute; inset: 0; padding: 8px; }
.live-page.is-split [data-live-diagram] .diagram, .live-page.is-split [data-live-diagram] .diagram-scroll { height: 100%; margin: 0; }
.live-page.is-split [data-live-diagram] .diagram-scroll { overflow: hidden; border: 0; background: none; }
.live-page.is-split [data-live-diagram] .dg { width: 100%; height: 100%; min-width: 0 !important; max-height: none; min-height: 0; }
.live-page.is-split [data-live-diagram] .dg-legend, .live-page.is-split [data-live-diagram] figcaption { display: none; }
.live-page.is-split .live-divider { display: grid; place-items: center; background: var(--bg); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); cursor: row-resize; touch-action: none; }
.live-page.is-split .live-divider::before { content: ""; width: 40px; height: 4px; border-radius: 2px; background: var(--border-strong); }
.live-page.is-split .live-divider:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
/* The console, docked: no window controls, no drag, no resize. */
.live-page.is-split .live-float { position: static; inset: auto; width: auto !important; height: auto !important; min-width: 0; min-height: 0; max-width: none; max-height: none;
  border-width: 0; border-radius: 0; box-shadow: none; resize: none; animation: none; }
.live-page.is-split .live-float[hidden] { display: flex; }
.live-page.is-split .live-float .term-bar { height: 30px; cursor: default; }
.live-page.is-split .term-actions, .live-page.is-split .live-float .live-keys { display: none; }
.live-page.is-split .live-float .term-title { max-width: calc(100% - 90px); }
.live-page.is-split .live-input { font-size: 16px; }   /* 16px or more: iOS does not zoom into the field */
.live-page.is-split .live-float .live-cli { font-size: .8rem; }
.live-page.is-split .live-keybar { display: flex; flex: none; gap: 6px; padding: 6px 8px; overflow-x: auto; border-top: 1px solid rgb(255 255 255 / .08); background: #0f1828; scrollbar-width: none; }
.live-keybar button { flex: none; min-width: 44px; height: 34px; padding: 0 10px; border: 1px solid rgb(255 255 255 / .16); border-radius: 8px; background: rgb(255 255 255 / .05); color: var(--term-fg); font: 500 .85rem var(--mono); touch-action: manipulation; }
.live-keybar button:active { background: color-mix(in srgb, var(--term-prompt) 18%, transparent); border-color: var(--term-prompt); }
/* Live labs: a wireless controller's web page in the lab window (wlcgui.js), in the identity's page colours. */
.live-gui { flex: 1; min-height: 0; overflow: auto; overscroll-behavior: contain; background: var(--surface); color: var(--text); font: 400 .82rem/1.4 var(--font); }
.live-page.is-gui .live-cli, .live-page.is-gui .live-keys, .live-page.is-split.is-gui .live-keybar { display: none; }
.wlc { display: flex; flex-direction: column; min-height: 100%; }
.wlc-top { position: sticky; top: 0; z-index: 1; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 12px; padding: 4px 8px; background: var(--bg-soft); border-bottom: 1px solid var(--border); }
.wlc-menu { display: flex; flex-wrap: wrap; gap: 2px; }
.wlc-menu-btn { padding: 5px 8px; border: 0; border-radius: 6px; background: transparent; color: var(--text-soft); font: 600 .72rem/1 var(--font); letter-spacing: .02em; cursor: pointer; }
.wlc-menu-btn:hover { background: var(--surface); color: var(--text); }
.wlc-menu-btn[aria-current="page"] { background: var(--surface); color: var(--accent); box-shadow: inset 0 -2px 0 var(--accent); }
.wlc-acts { display: flex; gap: 10px; }
.wlc-link { padding: 0; border: 0; background: none; color: var(--link); font: 500 .76rem var(--font); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.wlc-link:hover { color: var(--link-hover); }
.wlc-dirty { color: var(--text-soft); font-weight: 600; text-decoration: none; }
.wlc-page { flex: 1; padding: 8px 12px 12px; }
.wlc-h { margin: 6px 0 8px; font-size: .9rem; font-weight: 650; letter-spacing: 0; }
.wlc-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px; }
.wlc-head .wlc-h { margin-bottom: 6px; }
.wlc-buttons { display: flex; gap: 6px; }
.wlc-btn { padding: 4px 12px; border: 1px solid var(--border-strong); border-radius: 6px; background: var(--surface); color: var(--text); font: 500 .78rem var(--font); cursor: pointer; }
.wlc-btn:hover { border-color: var(--accent); }
.wlc-primary { border-color: var(--accent); background: var(--accent); color: var(--on-accent, #fff); }
.wlc-primary:hover { background: var(--accent-hover); }
.live-gui :focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
.wlc-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
.wlc-card { padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg); }
.wlc-card h3 { margin: 0 0 4px; font-size: .76rem; font-weight: 650; letter-spacing: 0; }
.wlc-card dl { margin: 0; }
.wlc-card dl div { display: flex; justify-content: space-between; gap: 8px; padding: 2px 0; border-top: 1px solid var(--border); }
.wlc-card dt { color: var(--muted); }
.wlc-card dd { margin: 0; font-variant-numeric: tabular-nums; text-align: right; }
.wlc-table-wrap { overflow-x: auto; }
.wlc-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.wlc-table th { padding: 4px 6px; background: var(--bg-soft); color: var(--text-soft); font-size: .72rem; font-weight: 600; text-align: left; white-space: nowrap; }
.wlc-table td { padding: 4px 6px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.wlc-empty, .wlc-note { color: var(--muted); }
.wlc-note { display: block; font-size: .72rem; }
.wlc-field { display: grid; grid-template-columns: minmax(110px, 38%) 1fr; align-items: center; gap: 4px 10px; padding: 4px 0; border-bottom: 1px solid var(--border); }
.wlc-label { color: var(--text-soft); font-weight: 500; }
.wlc-control { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; min-width: 0; }
.wlc-control input:not([type="checkbox"]), .wlc-control select { min-width: 0; max-width: 220px; padding: 3px 6px; border: 1px solid var(--border-strong); border-radius: 5px; background: var(--surface); color: var(--text); font: 400 .8rem var(--font); }
.wlc-check { display: inline-flex; align-items: center; gap: 5px; }
.wlc-group { margin: 8px 0 0; padding: 0 0 0 10px; border: 0; border-left: 2px solid var(--border); }
.wlc-group legend { padding: 0; font-size: .76rem; font-weight: 650; }
.wlc-tabs { display: flex; gap: 2px; margin: 4px 0 6px; border-bottom: 1px solid var(--border); }
.wlc-tab { padding: 5px 12px; border: 1px solid transparent; border-bottom: 0; border-radius: 6px 6px 0 0; background: transparent; color: var(--text-soft); font: 500 .78rem var(--font); cursor: pointer; }
.wlc-tab[aria-selected="true"] { border-color: var(--border); background: var(--bg); color: var(--text); font-weight: 650; margin-bottom: -1px; }
.wlc-subtabs { margin: 0 0 4px; font-size: .74rem; }
.wlc-subtabs .is-on { font-weight: 650; border-bottom: 2px solid var(--accent); }
.wlc-alert, .wlc-msg { margin: 4px 0 8px; padding: 6px 10px; border-left: 3px solid var(--accent); border-radius: 4px; background: var(--bg-soft); }
.wlc-alert::before { content: "Error: "; font-weight: 650; }
.wlc-login { max-width: 340px; margin: 24px auto; padding: 14px 16px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg); }
.wlc-login-title { margin: 0 0 8px; font-weight: 650; }
.wlc-login .wlc-buttons { justify-content: flex-end; margin-top: 10px; }

/* Objectives: a sheet over the workspace. */
.live-page.is-split .live-goals { position: fixed; z-index: 46; left: 0; right: 0; bottom: 0; top: var(--live-top, 56px); margin: 0; padding: 12px 16px 24px; overflow-y: auto; overscroll-behavior: contain;
  background: var(--bg); border-top: 1px solid var(--border); transform: translateY(100%); visibility: hidden; }
.live-page.is-split.goals-open .live-goals { transform: none; visibility: visible; }
/* Slides only when opened or closed (not when the page first takes the split layout). */
.live-page.is-split.goals-anim .live-goals { transition: transform .2s ease-out, visibility 0s linear .2s; }
.live-page.is-split.goals-anim.goals-open .live-goals { transition: transform .2s ease-out; }
.live-page.is-split .live-goals-head { position: sticky; top: -12px; z-index: 2; display: flex; align-items: center; justify-content: space-between; margin: -12px -16px 8px; padding: 10px 16px; background: var(--bg); border-bottom: 1px solid var(--border); }
.live-page.is-split .live-goals-head h2 { margin: 0; font-size: 1.2rem; }
.live-page.is-split .live-goals-close { display: grid; width: 36px; height: 36px; color: var(--text-soft); font-size: 1.4rem; }
.live-page.is-split .live-goals-intro { display: block; margin: 0 0 14px; color: var(--text-soft); font-size: .92rem; }
@media (prefers-reduced-motion: reduce) { .live-page.is-split .live-goals { transition: none; } }
@media (orientation: landscape) {
  .live-page.is-split .live-split { grid-template-rows: none; grid-template-columns: minmax(0, var(--split, 50%)) 14px minmax(0, 1fr); }
  .live-page.is-split .live-divider { border: 0; border-left: 1px solid var(--border); border-right: 1px solid var(--border); cursor: col-resize; }
  .live-page.is-split .live-divider::before { width: 4px; height: 40px; }
}

/* Where a gated control would be: what the tier unlocks, and the next step. A hairline rule, no box. */
.account-prompt { max-width: 640px; margin: 4px 0 8px; padding: 2px 0 2px 16px; border-left: 2px solid var(--accent); }
.account-prompt .eyebrow { margin-bottom: 6px; }
.account-prompt p { margin: 0 0 6px; color: var(--text-soft); }
.account-prompt p:last-child { margin: 0; }
.nav-tag { margin-left: 6px; padding: 1px 5px; border: 1px solid currentColor; border-radius: 4px; font: 500 .62rem var(--font); letter-spacing: .08em; vertical-align: .12em; text-transform: uppercase; opacity: .8; font-variant-numeric: tabular-nums; }
.index-row .lock { color: var(--muted); }

/* Console text: the live lab console and the solutions under each objective. */
.cli { max-width: 760px; margin: 0; padding: 14px 18px; border: 1px solid var(--border); border-left: 3px solid var(--accent); background: var(--code-bg); font: 500 .85rem/1.75 var(--mono); color: var(--text); white-space: pre-wrap; overflow-wrap: anywhere; }
.cli-prompt { color: var(--accent); }

/* Welcome, below the fold: what NTpath gives a new visitor, in the same strip of readouts as Today. */
.landing { margin-top: 56px; }
.landing > h2 { margin: 32px 0 8px; }
.landing-readouts { margin-top: 12px; }
/* The reveal (js/intro.js): the row's lines draw with its boxes, the top one before the first box, the bottom one after
   the last, so a line never shows alone. */
.readouts.rv-lines { position: relative; border-top-color: transparent; border-bottom-color: transparent; }
.readouts.rv-lines::before, .readouts.rv-lines::after { content: ""; position: absolute; left: 0; right: 0; height: 1px; background: var(--border); transform: scaleX(0); transform-origin: left; transition: transform .4s cubic-bezier(.2,.7,.2,1); }
.readouts.rv-lines::before { top: -1px; }
.readouts.rv-lines::after { bottom: -1px; }
.readouts.rv-lines.is-top::before, .readouts.rv-lines.is-bottom::after { transform: none; }
.landing-readouts .weight-strip { margin-bottom: 4px; }
.landing-note { margin-top: 24px; font-size: .85rem; }

/* Today: readouts in a strip of instruments, then excerpts of the route. */
.readouts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 8px 0 36px; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.readout { min-width: 0; padding: 18px 24px 20px; border-left: 1px solid var(--border); }
.readout:first-child { padding-left: 0; border-left: 0; }
.readout p { margin: 0 0 6px; }
.readout-label { color: var(--muted); }
.readout .big-number, .readout-value { margin: 6px 0 10px; font-family: var(--font-display); font-size: 3rem; font-weight: 700; line-height: 1; letter-spacing: -.03em; }
.readout-value.is-text { font-size: 1.35rem; line-height: 1.25; letter-spacing: -.01em; }
.readout-caption { color: var(--text-soft); font-size: .9rem; }
.readout-links { font-size: .9rem; }
.readout .unit-chips { margin: 4px 0 8px; }
.readouts { align-items: stretch; }
/* Each readout is a column: its picture fills the space under the number and its links sit on the bottom edge, so
   the three line up whatever they hold. Up to 1080px the readiness readout takes the full width above the other two. */
.readout { display: flex; flex-direction: column; }
.readout-foot { margin: auto 0 0 !important; padding-top: 14px; }
.readout-foot .route-link, button.route-link { padding: 0; border: 0; background: none; color: var(--link); font: inherit; font-weight: 600; cursor: pointer; }
.readout-value-sub { display: block; margin-top: 4px; font-family: var(--font); font-size: .9rem; font-weight: 500; letter-spacing: 0; color: var(--text-soft); }
.rd-sub { margin: 14px 0 8px !important; color: var(--muted); font-size: .8rem; font-variant-numeric: tabular-nums; }
.readout .hop-id { margin-right: 6px; color: var(--muted); font-variant-numeric: tabular-nums; }

/* Readiness: ring + counts, then the exam to scale (one segment per domain, as wide as its weight). */
.rd-top { display: flex; align-items: center; gap: 20px; margin-top: 8px; }
.rd-ring { position: relative; flex: none; width: 112px; height: 112px; display: grid; place-items: center; }
.rd-ring svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.rd-ring circle { fill: none; stroke-width: 10; }
.rd-ring-track { stroke: var(--bg-soft); }
.rd-ring-fill { stroke: var(--accent); stroke-linecap: round; }
.readout .rd-ring .big-number { margin: 0; font-size: 2.1rem; }
.readiness .rd-ring .big-number span { font-size: 1rem; }
.rd-legend { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: .9rem; color: var(--text-soft); }
.rd-legend li { display: flex; align-items: center; gap: 8px; margin: 0; }
.rd-legend strong { min-width: 2ch; color: var(--text); font-variant-numeric: tabular-nums; text-align: right; }
.weight-strip { list-style: none; display: flex; gap: 4px; margin: 0 0 10px; padding: 0; }
.weight-strip li { flex-basis: 0; min-width: 0; margin: 0; }
.weight-strip a { display: block; color: var(--text-soft); text-decoration: none; }
.weight-strip a:hover .ws-code { color: var(--link); }
.ws-track { display: block; height: 10px; border-radius: 3px; background: var(--bg-soft); overflow: hidden; }
.ws-track > span { display: block; height: 100%; background: var(--accent); }
.ws-track.is-done > span { background: var(--ok); }
.ws-code, .ws-weight { display: block; overflow: hidden; white-space: nowrap; text-overflow: clip; font-size: .75rem; line-height: 1.3; font-variant-numeric: tabular-nums; }
.ws-code { margin-top: 5px; font-weight: 600; color: var(--text); }
.ws-weight { color: var(--muted); }

/* Plan: the bar is what is ready, the tick is where the plan expects you today. */
.plan-bar { position: relative; height: 10px; margin: 8px 0 6px; border-radius: 5px; background: var(--bg-soft); }
.plan-bar-done { position: absolute; inset: 0 auto 0 0; border-radius: 5px; background: var(--accent); }
.plan-bar-mark { position: absolute; top: -4px; bottom: -4px; width: 2px; margin-left: -1px; border-radius: 1px; background: var(--text); }
.plan-bar-key { display: flex; justify-content: space-between; gap: 8px; font-size: .8rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.plan-bar-key strong { color: var(--text); }
.plan-bar-key-mark::before { content: ""; display: inline-block; width: 2px; height: 10px; margin-right: 6px; vertical-align: -1px; background: var(--text); }
.week-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 2px; }
.week-list li { min-width: 0; margin: 0; }
.week-list a { display: flex; align-items: center; gap: 8px; min-height: 32px; padding: 4px 8px; margin: 0 -8px; border-radius: var(--radius-sm); color: var(--text); font-size: .88rem; text-decoration: none; }
.week-list a:hover { background: var(--bg-soft); }
.week-list .hop-id { margin-right: 0; }
.week-list-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.week-more { margin: 4px 0 0 !important; font-size: .85rem; }

/* Reviews: one bar split by urgency, with a key that names each part (never colour alone). */
.review-bar { display: flex; gap: 3px; height: 10px; margin: 6px 0 10px; }
.review-bar span { min-width: 6px; border-radius: 3px; }
.review-key { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 6px; font-size: .88rem; color: var(--text-soft); }
.review-key li { display: flex; align-items: center; gap: 8px; margin: 0; }
.review-key strong { margin-left: auto; color: var(--text); font-variant-numeric: tabular-nums; }
.review-key-swatch { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.review-bar .is-flagged, .is-flagged > .review-key-swatch { background: var(--st-review-ink); }
.review-bar .is-late, .is-late > .review-key-swatch { background: var(--st-review); }
.review-bar .is-week, .is-week > .review-key-swatch { background: color-mix(in srgb, var(--st-review) 45%, var(--bg-soft)); }
.review-bar .is-due, .is-due > .review-key-swatch { background: var(--accent); }
#due-h:focus { outline: none; }

@media (max-width: 1080px) and (min-width: 761px) {
  .readouts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .readouts > .readiness { grid-column: 1 / -1; display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 32px; padding: 18px 0 20px; border-bottom: 1px solid var(--border); }
  .readouts > .readiness > * { grid-column: 2; }
  .readouts > .readiness > .readout-label { grid-column: 1 / -1; }
  .readouts > .readiness > .rd-top { grid-column: 1; grid-row: 2 / span 4; align-self: center; margin: 0; }
  .readouts > .readiness > .rd-sub { margin-top: 0 !important; }
  .readouts > .readout:nth-child(2) { padding-left: 0; border-left: 0; }
}
.route-excerpt { margin: 0 0 36px; }
.route-excerpt > h2 { margin: 0 0 14px; font-size: 1.2rem; }
.route-excerpt .route { margin: 6px 0 0; }
.route-current h2 { margin: 0 0 4px; font-size: 1.3rem; line-height: 24px; }
.route-current h2 a { color: var(--text); }
.route-current h2 a:hover { color: var(--accent); text-decoration: none; }
.route-current .notice { margin: 12px 0 0; }
.route-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 20px; margin: 14px 0 0 !important; line-height: 1.4 !important; }
.hop-near { font-size: .95rem; color: var(--text-soft); }
.hop-near .hop-link { color: var(--text-soft); line-height: 24px; }
.review-list > .hop { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 14px; padding-bottom: 16px; }
.review-list > .hop > a { line-height: 24px; }
.review-list .btn-row { margin-left: auto; gap: 8px; }

/* Index rows (blueprint domains, workbooks): hairline rows, a mono code, details, a segmented meter, an arrow. */
.index { list-style: none; margin: 0 0 28px; padding: 0; border-top: 1px solid var(--border); }
/* A heading over a group of index rows (the labs page: one per exam). Sentence case, the code and count beside it. */
.index-group { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; margin: 36px 0 10px; font-size: 1.2rem; line-height: 1.3; }
.index-group:first-of-type { margin-top: 8px; }
.index-group .muted { font-family: var(--font); font-size: .9rem; font-weight: 500; font-variant-numeric: tabular-nums; }
.index-row { position: relative; display: grid; grid-template-columns: 64px minmax(0, 1fr) minmax(150px, 220px) 20px; gap: 6px 24px; align-items: center; margin: 0; padding: 16px 0; border-bottom: 1px solid var(--border); }
/* The domain code (D1, D2…) in the H2 style (Bricolage 600, same size and tracking), as a big index beside the row. */
.index-code { align-self: center; font: 600 clamp(1.35rem, 1.1rem + .8vw, 1.75rem)/1.1 var(--font-display); letter-spacing: -0.01em; color: var(--accent); font-variant-numeric: tabular-nums; }
/* Workbooks (Labs page): the exam name as a label, in the same small capitals as the details under it. */
.index-code.is-label { align-self: start; font: 600 .72rem/24px var(--font); text-transform: uppercase; letter-spacing: .06em; }
.index-main h3 { margin: 0; font-size: 1.02rem; line-height: 24px; }
.index-main p { margin: 2px 0 0; color: var(--text-soft); font-size: .92rem; }
.index-main .card-meta { margin-top: 4px; }
.index-go { color: var(--muted); transition: transform .15s, color .15s; }
.index-row:hover .index-go { transform: translateX(3px); color: var(--accent); }
.index-row:hover .hop-link { color: var(--accent); }
.index-row.has-cells { grid-template-columns: 64px minmax(0, 1fr) minmax(180px, 260px) 20px; }

/* Study path: one rail through the whole exam. Phases are stations; their units hang from the same rail. */
.route-path > .phase { padding-bottom: 12px; }
.route-path > .phase > header { padding-bottom: 6px; }
.route-path > .phase h2 { margin: 0; font-size: 1.35rem; line-height: 28px; }
.phase-summary { margin: 6px 0 0; color: var(--text-soft); }
/* The exam to scale (domainScale in views/path.js): one bar, each domain as long as its blueprint weight, split into
   ready (solid), in progress (hatched) and not started (empty), with a tick where the plan expects the learner today.
   Phones: one row per domain, each bar as long as its weight against the heaviest domain. */
.dscale { margin: 8px 0 36px; padding: 18px 0 16px; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.dscale-h { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin: 0 0 14px; font-size: 1.2rem; }
.dscale-h .muted { font: 500 .9rem var(--font); font-variant-numeric: tabular-nums; }
.dscale-bar { display: flex; gap: 6px; margin: 0; padding: 0; list-style: none; }
.dscale-seg, .dscale-key li { min-width: 0; margin: 0; }
.dscale-seg { flex: 1 1 0; }
.dscale-seg > a { display: block; color: inherit; text-decoration: none; border-radius: 6px; }
.dscale-seg > a:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
.dscale-track { position: relative; display: flex; height: 22px; border: 1.5px solid var(--border-strong); border-radius: 5px; background: var(--bg-soft); overflow: visible; }
.dscale-ready, .dscale-going { display: block; height: 100%; }
.dscale-ready { background: var(--ok); }
.dscale-track > .dscale-ready:first-child { border-radius: 3px 0 0 3px; }
.dscale-going { background: repeating-linear-gradient(135deg, var(--st-progress) 0 2px, color-mix(in srgb, var(--st-progress) 22%, transparent) 2px 6px); }
.dscale-seg.is-done .dscale-track { border-color: var(--ok); }
.dscale-tick { position: absolute; top: -6px; bottom: -6px; width: 0; margin-left: -1px; border-left: 2.5px solid var(--text); }
.dscale-tick::before { content: ""; position: absolute; top: -1px; left: -5.5px; border: 4.5px solid transparent; border-top: 5px solid var(--text); }
.dscale-code { display: flex; align-items: baseline; gap: 6px; margin-top: 8px; overflow: hidden; font: 600 .95rem var(--font-display); color: var(--accent); white-space: nowrap; }
.dscale-weight { color: var(--muted); font: 500 .78rem var(--font); font-variant-numeric: tabular-nums; }
.dscale-count { display: block; overflow: hidden; color: var(--text-soft); font-size: .82rem; font-variant-numeric: tabular-nums; white-space: nowrap; text-overflow: ellipsis; }
.dscale-seg.is-behind .dscale-count { color: var(--danger); }
.dscale-seg > a:hover .dscale-code { text-decoration: underline; }
.dscale-key { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 14px 0 0; padding: 0; list-style: none; color: var(--text-soft); font-size: .82rem; }
.dscale-key li { display: inline-flex; align-items: center; gap: 6px; }
.dscale-sw { display: inline-block; width: 18px; height: 10px; border: 1.5px solid var(--border-strong); border-radius: 3px; background: var(--bg-soft); }
.dscale-sw.dscale-ready { border-color: var(--ok); background: var(--ok); }
.dscale-sw.dscale-going { border-color: var(--st-progress-ink); }
.dscale-sw-tick { display: inline-block; width: 0; height: 14px; border-left: 2.5px solid var(--text); }
.dscale-sub { margin: 8px 0 0; color: var(--text-soft); font-size: .9rem; }
@media (max-width: 760px) {
  .dscale-bar { flex-direction: column; gap: 12px; }
  .dscale-seg > a { display: grid; grid-template-columns: 74px minmax(0, 1fr); grid-template-areas: "code track" "code count"; gap: 2px 10px; align-items: center; }
  .dscale-track { grid-area: track; width: calc(var(--w) / var(--wmax) * 100%); height: 18px; }
  .dscale-code { grid-area: code; margin: 0; }
  .dscale-count { grid-area: count; }
}
@media print { .dscale-track, .dscale-ready, .dscale-going { -webkit-print-color-adjust: exact; print-color-adjust: exact; } }
.phase-meter { max-width: 420px; margin: 12px 0 4px; }
.phase-upcoming > header h2 { color: var(--text-soft); }
.phase > .route { margin: 18px 0 6px calc(-1 * var(--gutter)); }
.checkpoint { position: relative; margin: 0 0 22px; font-size: .92rem; color: var(--text-soft); }
.checkpoint::before { content: ""; position: absolute; z-index: 1; left: calc(var(--rail-x) - var(--gutter) - 6px); top: .3em; width: 9px; height: 9px; transform: rotate(45deg); border: 2px solid var(--accent); background: var(--bg); }

/* Network icons (Resources › Network icons, Plus). Icons are the diagram sprite, coloured by role. */
.ni-icon { width: 48px; height: 48px; flex: none; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; --ni-ground: var(--surface); }
.ni-3d { width: 72px; height: 72px; flex: none; }   /* the 3D style on the catalog page */
.ni-tile > rect { fill: var(--role); stroke: none; }
.ni-tile > g { color: var(--on-accent); --ni-ground: var(--role); --ni-tint: 16%; stroke-width: 2.9; }
.icon-pack { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; justify-content: space-between; }
.icon-pack h2 { margin: 0 0 4px; font-size: 1.05rem; }
.icon-pack p { margin: 0; }
.icon-pack-actions { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.icon-pack-status { font-size: .85rem; color: var(--muted); min-height: 1.2em; }
.icon-pack-status.is-error { color: var(--danger); }
.icon-toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin: 28px 0 8px; }
.icon-toolbar input[type="search"] { width: 100%; }
.segmented { display: inline-flex; border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; background: var(--surface); }
.segmented a { padding: 7px 14px; font-size: .85rem; font-weight: 600; color: var(--muted); text-decoration: none; }
.segmented a[aria-current="true"] { background: var(--accent); color: var(--on-accent); }
.icon-group-title { display: flex; align-items: center; gap: 8px; font-size: 1rem; margin: 28px 0 12px; }
.icon-group-title .muted { font-weight: 400; font-size: .85rem; }
.role-dot { width: 10px; height: 10px; border-radius: 3px; background: var(--role); }
.icon-grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: 10px; }
.icon-card { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 18px 8px 12px; text-align: center;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.icon-name { font-weight: 600; font-size: .85rem; line-height: 1.25; }
.icon-card code { font-size: .72rem; color: var(--muted); background: none; padding: 0; }
.icon-rules, .icon-links { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 12px 24px; }
.icon-rules li { margin: 0; display: flex; align-items: center; gap: 8px; }
.icon-rules .ni-icon { width: 38px; height: 38px; }
.icon-rules div { display: flex; flex-direction: column; margin-left: 6px; font-size: .9rem; }
.icon-rules span { color: var(--muted); font-size: .85rem; }
.icon-links li { margin: 0; display: flex; align-items: center; gap: 10px; font-size: .9rem; }
.icon-links svg { width: 72px; height: 12px; flex: none; }
.icon-links code { font-size: .75rem; color: var(--muted); background: none; }
.icon-port { width: 28px; height: 28px; flex: none; }
.icon-port .dg-port-halo { display: inline; }
.icon-card[hidden], .icon-group[hidden] { display: none; }
.icons-locked { text-align: center; padding: 36px 24px; }
.icons-preview { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; margin-bottom: 18px; }
.icons-locked p { max-width: 560px; margin: 8px auto; }
h1 .tag-plan { vertical-align: middle; font-size: .8rem; }
.resource-link { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; color: var(--text); text-decoration: none; }
.resource-link:hover { border-color: var(--accent); }
@media (max-width: 640px) { .icon-pack-actions { align-items: stretch; width: 100%; } .icon-grid { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); } }

/* 7. Responsive ----------------------------------------------------------- */
/* The menu folds behind its button wherever the full row would not fit: below 1080px (Spanish and Portuguese labels are
   longer than English, and English already ran out of room below 960px). */
@media (max-width: 1080px) {
  .menu-btn { display: inline-grid; order: 3; }
  /* The menu is a curtain: it slides down over the whole page in the page's own colours (both themes), keeps only the
     options, 2 px larger, and closes with the X in the top right corner. The header is its containing block (its
     backdrop filter), and the header always sits at the top of the screen, so the curtain covers the screen. */
  .primary-nav {
    position: fixed; top: 0; left: 0; z-index: 10; width: 100vw; height: 100vh; height: 100dvh; overflow-y: auto; overscroll-behavior: contain;
    display: flex; flex-direction: column; gap: 2px;
    padding: calc(var(--header-h) + 8px) max(24px, env(safe-area-inset-right, 0px)) 40px max(24px, env(safe-area-inset-left, 0px));
    background: var(--bg); visibility: hidden; transform: translateY(-100%);
    transition: transform .34s cubic-bezier(.2,.7,.2,1), visibility 0s linear .34s;
  }
  .primary-nav.is-open { visibility: visible; transform: none; transition: transform .34s cubic-bezier(.2,.7,.2,1), visibility 0s; }
  .primary-nav a { padding: 11px 12px; font-size: calc(.925rem + 2px); }
  .primary-nav .menu-close { z-index: 6; display: inline-grid; position: absolute; top: calc((var(--header-h) - 36px) / 2); right: max(16px, env(safe-area-inset-right, 0px)); }
  /* Certs on phones, like Apple's: a row with a chevron; tapping it slides its submenu in over the menu, with a back
     chevron in the top left corner and the X kept. */
  .nav-certs { display: block; }
  .primary-nav .nav-group { display: flex; width: 100%; justify-content: space-between; padding: 11px 12px; font-size: calc(.925rem + 2px); color: var(--text-soft); }
  .primary-nav .nav-group svg { width: 14px; height: 14px; transform: rotate(-90deg); }
  .nav-certs.is-open .nav-group svg { transform: rotate(-90deg); }
  .primary-nav > :not(.menu-close, .nav-certs), .nav-group { transition: opacity .25s ease, transform .3s cubic-bezier(.4,0,.2,1); }
  .primary-nav.is-sub > :not(.menu-close, .nav-certs), .primary-nav.is-sub .nav-group { opacity: 0; transform: translateX(-32px); pointer-events: none; }
  .certs-menu {
    position: fixed; top: 0; left: 0; right: auto; width: 100vw; height: 100vh; height: 100dvh; max-height: none; overflow-y: auto;
    padding: calc(var(--header-h) + 8px) max(24px, env(safe-area-inset-right, 0px)) 40px max(24px, env(safe-area-inset-left, 0px));
    background: var(--bg); clip-path: none; visibility: hidden; transform: translateX(100%);
    transition: transform .34s cubic-bezier(.4,0,.2,1), visibility 0s linear .34s;
  }
  .nav-certs.is-open .certs-menu { clip-path: none; visibility: visible; transform: none; transition: transform .34s cubic-bezier(.4,0,.2,1), visibility 0s; }
  .certs-back { display: inline-grid; place-items: center; position: absolute; top: calc((var(--header-h) - 36px) / 2); left: max(16px, env(safe-area-inset-left, 0px)); width: 36px; height: 36px; border: 0; border-radius: var(--radius-sm); background: none; color: var(--text-soft); cursor: pointer; }
  .certs-back svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
  .certs-inner { display: block; max-width: none; padding: 0; }
  .certs-col { padding: 0 12px; }
  .certs-col + .certs-col, .certs-panel .certs-col { margin-top: 28px; }
  .certs-panel { display: block; }
  .certs-brands { padding-right: 12px; border-right: 0; }
  .certs-brand { padding: 8px 0; font-size: calc(.8rem + 2px); }
  .certs-sub { font-size: calc(.7rem + 2px); }
  .certs-head { margin-bottom: 8px; font-size: calc(.75rem + 2px); }
  .primary-nav .certs-big a { padding: 4px 0 8px; font-size: calc(1.6rem + 2px); }
  .primary-nav .certs-small a { padding: 8px 0; font-size: calc(.8rem + 2px); white-space: normal; }
  .certs-count { font-size: calc(.7rem + 2px); }
  .certs-small .is-soon { padding: 8px 0; font-size: calc(.8rem + 2px); }
}
html.menu-open { overflow: hidden; }   /* the page behind the curtain stays put */
@media (prefers-reduced-motion: reduce) { .primary-nav, .primary-nav.is-open, .primary-nav > *, .nav-group, .certs-menu, .nav-certs.is-open .certs-menu { transition: none; } }

@media (max-width: 960px) {
  .search { width: 140px; }
  .search:focus-within { width: 200px; }
  .with-sidebar { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .btn.drawer-btn { display: inline-flex; margin-bottom: 16px; }
  .sidebar {
    position: fixed; z-index: 60; top: 0; left: 0; bottom: 0; width: min(300px, 85vw); max-height: none;
    padding: 20px; background: var(--surface); border-right: 1px solid var(--border); box-shadow: var(--shadow);
    transform: translateX(-100%); transition: transform .2s ease; visibility: hidden;
  }
  .sidebar.is-open { transform: none; visibility: visible; }
  .scrim { position: fixed; inset: 0; z-index: 55; background: var(--scrim); }
}

@media (max-width: 760px) {
  .container { padding: 0 var(--gutter); }   /* 20 px on small phones, 24 px above (Postman) */
  .site-header > .container { padding: 0 16px; }   /* the menu keeps its 16 px phone margins */
  .route { --gutter: 34px; }
  .readouts { grid-template-columns: minmax(0, 1fr); }
  .readout, .readout:first-child { padding: 16px 0; border-left: 0; }
  .readout + .readout { border-top: 1px solid var(--border); }
  .index-row, .index-row.has-cells { grid-template-columns: 44px minmax(0, 1fr) 16px; }
  .index-meter { grid-column: 2 / 3; grid-row: 2; }
  /* The arrow stays in the right-hand column, beside the text, whether or not the row has a meter. */
  .index-row > span:empty { display: none; }
  .index-go { grid-column: 3; grid-row: 1 / span 2; }
  .review-list .btn-row { margin-left: 0; }
  .header-inner { gap: 10px; }
  .search, .search:focus-within { width: auto; flex: 1; min-width: 0; }
  .site-main { padding-top: 20px; }
  .hero { padding: 16px 0 32px; }
  .pager { grid-template-columns: 1fr; }
  .pager .next { grid-column: auto; }
  .track-card { padding: 20px; }
}

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

/* 8. Print (lab sheets) --------------------------------------------------- */
@media print {
  /* Light is already the base in print (dark rules are screen only); these are print's own choices. */
  :root {
    --bg: #fff; --surface: #fff; --text: #000; --text-soft: #222; --muted: #555;
    --border: #ccc; --code-bg: #f5f5f5; --accent: #000;
  }
  .site-header, .site-footer, .sidebar, .settings-nav, .hero-intro, .drawer-btn, .copy-btn, .complete-bar, .pager, .skip-link { display: none !important; }
  .with-sidebar, .settings { display: block; }
  .site-main { padding: 0; }
  .content { max-width: none; }
  pre { white-space: pre-wrap; page-break-inside: avoid; }
  details.disclosure { border: 0; padding: 0; }
  a { color: inherit; }
}

/* Accounts */
.auth-form { display: flex; flex-direction: column; gap: 14px; max-width: 360px; margin: 18px 0; }
.auth-form input:not([type="checkbox"]) { height: 40px; padding: 0 10px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); color: var(--text); font: inherit; font-size: .95rem; }
.auth-form .hint { font-weight: 400; font-size: .8rem; }
.auth-status { min-height: 1.4em; margin: 0; font-size: .9rem; }
.auth-status.is-ok { color: var(--ok, #15803d); }
.auth-status.is-error { color: var(--danger); font-weight: 600; }
.btn-danger { background: var(--danger); border-color: var(--danger); color: var(--on-danger); }
#account-link { white-space: nowrap; }

/* Account and sign-in pages: left-aligned like every other page, with a readable measure. */
.auth-page { max-width: 720px; }
.auth-page .lead { color: var(--text-soft); }
.auth-social { display: flex; flex-direction: column; gap: 10px; max-width: 360px; margin: 18px 0; }
.auth-social p { margin: 0; }
/* Sign-in and create-account: the form on the left, a large OR, the provider buttons on the right. A phone stacks them with the OR as a horizontal rule. */
.auth-split { display: grid; gap: 4px; }
.auth-split .auth-form { margin-bottom: 0; }
.auth-split .auth-social { margin: 8px 0 18px; }
.auth-or { display: flex; align-items: center; gap: 14px; color: var(--muted); font-size: 1.5rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.auth-or::before, .auth-or::after { content: ""; flex: 1; height: 1px; background: var(--border-strong); }
@media (min-width: 761px) {
  .auth-split { grid-template-columns: minmax(0, 340px) 88px minmax(0, 280px); gap: 0; }
  .auth-split .auth-social { align-self: center; margin: 18px 0; }
  .auth-or { flex-direction: column; gap: 12px; }
  .auth-or::before, .auth-or::after { width: 1px; height: auto; }
}
.auth-social .auth-consent { font-size: .8rem; }
/* Provider buttons follow each provider's own look (Google white, GitHub and Apple dark; inverted on the dark theme). */
.btn-social { width: 100%; justify-content: center; }
.btn-social svg { flex: none; }
.btn-google { background: #fff; border-color: #dadce0; color: #3c4043; }
.btn-google:hover { background: #f8f9fa; border-color: #d2d4d7; color: #3c4043; }
.btn-github { background: #24292f; border-color: #24292f; color: #fff; }
.btn-github:hover { background: #32383f; border-color: #32383f; color: #fff; }
.btn-apple { background: #000; border-color: #000; color: #fff; }
.btn-apple:hover { background: #1f1f1f; border-color: #1f1f1f; color: #fff; }
@media screen {
[data-theme="dark"] .btn-google { background: #131314; border-color: #8e918f; color: #e3e3e3; }
[data-theme="dark"] .btn-google:hover { background: #1f1f20; border-color: #a9acaa; color: #e3e3e3; }
[data-theme="dark"] .btn-github { background: #f0f3f6; border-color: #f0f3f6; color: #24292f; }
[data-theme="dark"] .btn-github:hover { background: #fff; border-color: #fff; color: #24292f; }
[data-theme="dark"] .btn-apple { background: #fff; border-color: #fff; color: #000; }
[data-theme="dark"] .btn-apple:hover { background: #e8e8e8; border-color: #e8e8e8; color: #000; }
}
/* Account page: identity header, a section nav, and sections of label / value / action rows (no boxes). */
.account-page { max-width: 1000px; }
.account-identity { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding: 4px 0 24px; margin-bottom: 8px; border-bottom: 1px solid var(--border); }
.avatar { flex: none; display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent); font-size: 1.25rem; font-weight: 600; letter-spacing: .02em; }
.identity-text { flex: 1 1 220px; min-width: 0; }
.identity-text p { margin: 0; }
.identity-name { font-family: var(--font-display); font-size: 1.25rem; font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; }
.identity-email { color: var(--muted); font-size: .9rem; overflow-wrap: anywhere; }
.identity-email strong { color: var(--text-soft); font-weight: 500; }
.identity-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.identity-sync { display: inline-flex; align-items: center; gap: 6px; font-size: .85rem; color: var(--muted); }
.tag-plan { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.tag-warn { color: var(--warn); border-color: currentColor; background: transparent; }
.status-dot { display: inline-block; flex: none; width: 8px; height: 8px; border-radius: 50%; margin-right: 8px; vertical-align: .08em; background: var(--muted); }
.identity-sync .status-dot { margin-right: 0; }
.status-dot.is-ok { background: var(--ok); }
.status-dot.is-accent { background: var(--accent); }
.status-dot.is-warn { background: var(--warn); }
.status-dot.is-danger { background: var(--danger); }

.settings { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 48px; align-items: start; }
.settings-nav { position: sticky; top: calc(var(--header-h) + 24px); padding-top: 24px; font-size: .9rem; }
.settings-nav ul { list-style: none; padding: 0; margin: 0; }
.settings-nav li + li { margin-top: 2px; }
.settings-nav a { display: block; padding: 6px 10px; border-radius: var(--radius-sm); color: var(--text-soft); }
.settings-nav a:hover { background: var(--bg-soft); color: var(--text); text-decoration: none; }
.settings-nav a[aria-current="true"] { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.settings-nav .nav-danger { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border); }
.settings-nav .nav-danger a { color: var(--danger); }
.settings-nav .nav-danger a[aria-current="true"] { background: color-mix(in srgb, var(--danger) 10%, transparent); color: var(--danger); }

.settings-body { max-width: 720px; min-width: 0; }
.settings-section { padding: 24px 0 28px; border-top: 1px solid var(--border); }
.settings-section:first-child { border-top: 0; }
.settings-section h2 { margin: 0 0 8px; color: var(--muted); }
.settings-section > p, .settings-help p { color: var(--text-soft); font-size: .925rem; }
.settings-rows { margin: 0 0 12px; }
/* The value keeps a readable width (Juan, 2026-11-15: "Premium · Monthly" was squeezed to a letter per line beside
   three buttons): the actions column grows to fit its buttons, up to 60 % of the row, and wraps them inside it. */
.setting-row { display: grid; grid-template-columns: 170px minmax(min(12rem, 100%), 1fr) fit-content(60%); gap: 8px 16px; align-items: center; min-height: 52px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.setting-row:last-child { border-bottom: 0; }
.setting-row dt { color: var(--muted); font-size: .9rem; font-weight: 500; }
.setting-row dt label { cursor: pointer; }
.setting-row dd { margin: 0; min-width: 0; overflow-wrap: break-word; }   /* break at spaces; only an overlong word breaks */
.setting-action { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
/* Three buttons or more: the value reads on its own line and the buttons sit under it, left-aligned (as on phones). */
@media (min-width: 521px) {
  .setting-row:has(> .setting-action > :nth-child(3)) { grid-template-columns: 170px minmax(0, 1fr); }
  .setting-row:has(> .setting-action > :nth-child(3)) > .setting-action { grid-column: 2; justify-content: flex-start; }
}
.settings-help { margin: 4px 0 8px; }
.settings-help p:last-child { margin-bottom: 0; }
.settings-note { font-size: .85rem; margin: 8px 0 0; }
.settings-connect { margin: 4px 0 8px; }
.settings-section .auth-status:empty { min-height: 0; }
.inline-form { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 8px; max-width: none; margin: 0; }
.inline-form input { flex: 1 1 200px; height: 36px !important; }
.inline-form .field-error:empty, .inline-form .auth-status:empty { display: none; }
.inline-form .field-error, .inline-form .auth-status { flex-basis: 100%; }

.danger-zone h2 { color: var(--danger); }
.danger-details > summary { list-style: none; width: max-content; }
.danger-details > summary::-webkit-details-marker { display: none; }
.danger-details[open] > summary { margin-bottom: 4px; }
.danger-details .auth-form { margin-top: 12px; }
.btn-danger-outline { border-color: var(--danger); color: var(--danger); background: transparent; }
.btn-danger-outline:hover { border-color: var(--danger); color: var(--danger); background: color-mix(in srgb, var(--danger) 8%, transparent); }

@media (max-width: 960px) {
  .settings { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .settings-nav { top: var(--header-h); z-index: 5; padding: 8px 0; margin: 0 -20px; padding-inline: 20px; background: var(--bg); border-bottom: 1px solid var(--border); }
  .settings-nav ul { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
  .settings-nav li + li { margin-top: 0; }
  .settings-nav a { white-space: nowrap; }
  .settings-nav .nav-danger { margin: 0; padding: 0; border: 0; }
  .settings-section { scroll-margin-top: 52px; }   /* the sticky section bar, on top of the header space the page already keeps */
}
@media (max-width: 520px) {
  .identity-meta { align-items: flex-start; flex-direction: row; flex-wrap: wrap; gap: 8px 12px; width: 100%; }
  .setting-row { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .setting-action { justify-content: flex-start; margin-top: 4px; }
}
.welcome { margin: 0 0 14px; color: var(--text-soft); font-size: 1.05rem; }

/* Cloud sync status in the header, and the plan notice on the progress pages. */
.sync-status { font-size: .8rem; color: var(--muted); white-space: nowrap; text-decoration: none; }
.sync-status:hover { text-decoration: underline; }
.sync-status[data-state="offline"] { color: var(--warn); }
.sync-status[data-state="error"] { color: var(--danger); }
.sync-status[data-state="needs_plan"] { color: var(--accent); }
@media (max-width: 760px) { .sync-status { display: none; } }
.sync-notice { margin: 0 0 16px; padding: 12px 16px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); font-size: .95rem; }

/* Score Log, Chapter Progress and Resources use the standard frame like the other pages, so their tables and forms are sized to the content. */
.score-table, .chapter-table { table-layout: auto; width: 100%; }
.score-table th.num, .score-table td.num, .chapter-table th.num, .chapter-table td.num { text-align: center; padding-left: 6px; padding-right: 6px; white-space: nowrap; }
.score-table th.num { width: 72px; }
.score-table td:first-child, .score-table th:first-child { white-space: nowrap; width: 108px; }
.score-table td:nth-child(3) { width: 120px; }
.score-table td:nth-child(2) { overflow-wrap: anywhere; }
.score-table td.row-actions { width: 1%; }
.chapter-table thead th, .score-table thead th { vertical-align: bottom; }
.chapter-table th.num { width: 86px; font-size: .72rem; letter-spacing: .03em; line-height: 1.25; }
.chapter-table .c-group { width: 96px; }
.chapter-table .c-no { width: 44px; }
.chapter-table .c-dom { width: 112px; }
.chapter-table td.c-topic, .chapter-table th.c-topic { overflow-wrap: anywhere; }
.chapter-table.other-tests thead th:first-child { width: auto; }
.section-head { flex-wrap: wrap; min-width: 0; }
.notice { max-width: 100%; }
.resource-head > .grow { flex: 1 1 280px; min-width: 0; }
.add-resource .filters > .grow { flex: 1 1 280px; min-width: 0; }

.paypal-slot { max-width: 360px; min-height: 48px; margin: 4px 0 8px; }

/* The app's own dialogs (js/dialog.js): the page's colours, not the browser's. */
.app-dialog { border: 0; padding: 0; margin: auto; background: transparent; color: var(--text); width: min(540px, calc(100vw - 32px)); max-width: none; overflow: visible; }
.app-dialog::backdrop { background: var(--scrim); }
/* The session lock hides the page behind it (someone else's progress), not just dims it. */
.app-dialog.is-lock::backdrop { background: var(--bg); }
.app-dialog.is-lock.is-fallback { background: var(--bg); }
.app-dialog.is-fallback { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; width: 100%; background: var(--scrim); }
.app-dialog.is-fallback .dialog-box { width: min(540px, calc(100vw - 32px)); }
.dialog-box { background: var(--surface); border: 1px solid var(--border); border-top: 3px solid var(--accent); border-radius: var(--radius); padding: 22px 24px 20px;
  box-shadow: var(--shadow), 0 18px 48px rgb(0 0 0 / .32); animation: dialog-in .16s ease-out; }
.app-dialog.is-danger .dialog-box { border-top-color: var(--danger); }
.dialog-title { margin: 0 0 12px; font-size: 1.2rem; line-height: 1.3; letter-spacing: 0; text-transform: none; }
.dialog-text { margin: 0 0 10px; color: var(--text-soft); font-size: .98rem; line-height: 1.55; text-align: left; overflow-wrap: anywhere; }
.dialog-note { margin: 14px 0 0; padding: 10px 12px; border-radius: var(--radius-sm); border: 1px solid var(--info-border); background: var(--info-bg); font-size: .92rem; line-height: 1.5; }
.dialog-note[hidden] { display: none; }
/* A small form in a dialog (dialog.js formDialog): one field per row, full width. */
.dialog-form { display: grid; gap: 12px; margin-top: 6px; }
.dialog-form .field { display: grid; gap: 4px; margin: 0; }
.dialog-form .field :is(input, select) { width: 100%; height: 40px; padding: 0 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); color: var(--text); font: inherit; font-size: .95rem; }
.dialog-form .field :is(input, select):focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
.dialog-form [hidden] { display: none; }
.dialog-static { margin: 0; padding: 8px 12px; border-radius: var(--radius-sm); background: var(--bg-soft); color: var(--text-soft); font-size: .9rem; }
.dialog-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; margin-top: 18px; }
.dialog-actions .btn { height: auto; min-height: 40px; padding: 9px 18px; text-align: center; justify-content: center; line-height: 1.3; }
/* The entrance only nudges the box; it never hides it, so a browser that pauses animations still shows the dialog. */
@keyframes dialog-in { from { transform: translateY(8px); } to { transform: none; } }
@media (max-width: 520px) {
  .dialog-box { padding: 20px 18px 18px; }
  .dialog-actions { flex-direction: column-reverse; }
  .dialog-actions .btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) { .dialog-box { animation: none; } }
@media print { .app-dialog { display: none; } }

/* Plans and Premium ----------------------------------------------------------------------------------------- */
/* Display page titles (Bricolage 700, like the Welcome headline): the Guide, the Premium hub and the cheat sheets. */
.page-head.is-display h1 { font-size: clamp(2.1rem, 1.4rem + 2.8vw, 3.5rem); font-weight: 700; line-height: 1.1; letter-spacing: -0.02em; }
/* The lock label (lockTag in views/shared.js): a drawn lock and the plan's name in a hairline pill. It always sits at the
   item's top-right: the Premium tiles' head row, a locked lab on a route, a locked lab's header. */
.lock-tag { display: inline-flex; flex: none; align-items: center; gap: 5px; padding: 2px 9px 2px 7px; border: 1px solid var(--border-strong); border-radius: 999px; font: var(--overline-weight) .7rem/1.5 var(--font); letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; color: var(--muted); }
.lock-glyph { width: 11px; height: 11px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linejoin: round; }
.hop-lock { position: absolute; top: 2px; right: 0; z-index: 1; }
.hop.is-locked .hop-link h3 { padding-right: 140px; }
.head-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.head-row .eyebrow { margin: 0; }
.hop.is-locked .hop-link h3 { color: var(--text-soft); }
.founding-tag { margin-left: 6px; }
.plan-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin: 20px 0 28px; }
.plan-card { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); padding: 20px; display: flex; flex-direction: column; gap: 8px; }
.plan-card.is-featured { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.plan-card h2 { margin: 0; }
.plan-card .price { margin: 4px 0 0; }
.plan-card .amount { font-size: 2rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.plan-card .per { color: var(--muted); margin-left: 4px; }
.plan-card .btn { align-self: flex-start; margin-top: auto; }
.current-plan { margin-top: auto; font-weight: 600; color: var(--ok); }
.plan-table td { text-align: center; }
.plan-table .yes { color: var(--ok); font-weight: 700; }
.plan-table .no { color: var(--muted); }
.pricing-page .segmented a { padding: 6px 14px; border-radius: 999px; text-decoration: none; }
.pricing-page .segmented a.is-active, .subnet-tools .segmented a.is-active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.subnet-tools .segmented { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.subnet-tools .segmented a { padding: 6px 12px; border-radius: 999px; text-decoration: none; }
.offers { border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px; margin: 12px 0; display: grid; gap: 8px; }
.offers legend { font-weight: 600; padding: 0 4px; }
.offer { display: flex; align-items: flex-start; gap: 8px; cursor: pointer; }
.offer input { margin-top: 4px; }
/* Premium hub: a bento of what Premium holds. Same rows in every tile (head with the lock label, title, a real sample,
   foot with the count and "Open"), so labels and actions line up across tiles. Two full rows: 4+2, then 2+2+2. */
.bento { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px; margin: 20px 0 28px; }
.bento-tile { display: flex; flex-direction: column; gap: 10px; min-height: 236px; padding: 18px 20px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); color: var(--text); text-decoration: none; }
.bento-tile:hover { color: var(--text); text-decoration: none; border-color: var(--accent); }
.bento-wide { grid-column: span 4; }
.bento-third { grid-column: span 2; }
.bento-full { grid-column: 1 / -1; min-height: 0; }
.bento-full .bento-preview { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 12px 28px; }
.bento-full .bento-text { flex: 1 1 20rem; }
.bento-config { display: grid; padding: 10px 14px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg); font-family: var(--mono); font-size: .75rem; line-height: 1.6; white-space: pre; overflow: hidden; max-width: 100%; }
.bento-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 22px; }
.bento-num { font: 600 .8rem var(--font); color: var(--accent); letter-spacing: .06em; font-variant-numeric: tabular-nums; }
.bento-tile h2 { margin: 0; font-size: 1.2rem; }
.bento-preview { flex: 1; display: flex; flex-direction: column; gap: 10px; }
.bento-text { color: var(--text-soft); font-size: .92rem; line-height: 1.5; }
.bento-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.bento-chip { padding: 3px 10px; border: 1px solid var(--border); border-radius: 999px; font-size: .82rem; color: var(--text); white-space: nowrap; }
.bento-chip.is-more { color: var(--muted); border-style: dashed; }
.bento-calc { display: flex; flex-direction: column; gap: 2px; padding-left: 12px; border-left: 2px solid var(--accent); font-variant-numeric: tabular-nums; }
.bento-calc-q { font: 700 1.35rem/1.2 var(--font-display); letter-spacing: -0.01em; }
.bento-calc-a { color: var(--text-soft); font-size: .88rem; }
.bento-code { font: 700 2rem/1 var(--font-display); letter-spacing: -0.02em; color: var(--accent); font-variant-numeric: tabular-nums; }
.bento-icons { display: flex; flex-wrap: wrap; gap: 8px; }
.bento-icons .ni-icon { width: 36px; height: 36px; }
.bento-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 10px; border-top: 1px solid var(--border); font: 400 .72rem/1.6 var(--font); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-variant-numeric: tabular-nums; }
.bento-open { color: var(--link); font-weight: 600; }
.bento-open span { display: inline-block; }
.bento-tile:hover .bento-open span, .bento-tile:focus-visible .bento-open span { transform: translateX(3px); }
@media (prefers-reduced-motion: no-preference) { .bento-open span { transition: transform .15s ease; } }
@media (max-width: 900px) { .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); } .bento-wide { grid-column: span 2; } .bento-third { grid-column: span 1; } }
@media (max-width: 600px) { .bento { grid-template-columns: 1fr; } .bento-wide, .bento-third { grid-column: auto; } .bento-tile { min-height: 0; } }
.sheet-list { list-style: none; padding: 0; display: grid; gap: 12px; }
/* Cheat sheet: numbered sections in two ruled columns (premium.js splits them evenly, whole sections only). Headings have
   no top margin, so both columns start on one line. In print a table, code block or item never splits across pages. */
.sheet-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 8px; }
.sheet-col { min-width: 0; }
.sheet-col + .sheet-col { margin-left: 16px; padding-left: 16px; border-left: 1px solid var(--border); }
@media (max-width: 860px) { .sheet-columns { grid-template-columns: 1fr; } .sheet-col + .sheet-col { margin: 0; padding: 0; border: 0; } }
.sheet-section { margin-bottom: 22px; }
.sheet-section h2 { display: flex; align-items: baseline; gap: 10px; margin: 0 0 10px; padding-bottom: 6px; border-bottom: 1px solid var(--border-strong); font-size: 1.05rem; break-after: avoid; }
.sheet-num { color: var(--accent); font-variant-numeric: tabular-nums; letter-spacing: 0; }
.sheet-section li, .sheet-section p, .sheet-section tr, .sheet-section .callout { break-inside: avoid; }
/* Short tables and code blocks never break; a long one may, between rows or lines (a table repeats its header). */
.sheet-section table.is-short, .sheet-section .code-block.is-short { break-inside: avoid; }
.sheet-section table { margin-bottom: 12px; }
.sheet-section th, .sheet-section td { padding: 6px 10px; font-variant-numeric: tabular-nums; }
.sheet-section .code-block { margin-bottom: 12px; }
/* Cheat sheet layout (house rule, see sheetLayout in views/premium.js): a wide section spans both columns; its diagram
   keeps a readable size on screen. A heading stays with its first block, and a diagram with its caption and legend. */
.sheet-section.is-wide { margin-top: 4px; }
.sheet-section.is-wide .diagram { max-width: 760px; margin-inline: auto; }
.sheet-keep, .cheatsheet .diagram { break-inside: avoid; }
/* A split section: text in the first column, its vertical diagram in the second (one column on a phone). */
.sheet-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 16px; align-items: start; }
.sheet-split-figure { padding-left: 16px; border-left: 1px solid var(--border); }
.sheet-split-figure .diagram { margin-top: 0; }
@media (max-width: 860px) { .sheet-split { grid-template-columns: 1fr; } .sheet-split-figure { padding: 0; border: 0; } }
.sheet-traps { break-inside: avoid; margin-top: 6px; padding: 14px 0 0; border-top: 2px solid var(--text); }
.sheet-traps h2 { border-bottom: 0; padding-bottom: 0; }
.sheet-traps ul { columns: 2 380px; column-gap: 32px; margin: 0; }
.print-only { display: none; }
.print-hint { margin: 6px 0 0; font-size: .82rem; }
.tool-form { display: grid; gap: 12px; max-width: 760px; }
.tool-result { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 8px 18px; margin: 4px 0 0; }
.tool-result dt { font-size: .8rem; color: var(--muted); }
.tool-result dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; word-break: break-all; }
.drill-q { font-size: 1.1rem; font-weight: 600; min-height: 1.5em; }
.tool-out.is-ok { color: var(--ok); }
.tool-out.is-error { color: var(--danger); }
.resource-links { display: grid; gap: 8px; }
@media print {
  .site-header, .site-footer, .no-print, .copy-btn { display: none !important; }
  .cheatsheet pre { white-space: pre-wrap; }
}
/* Cheat sheet print: the logo and one meta line on top, "ntpath.net" and the page count below (Chrome and Edge put these
   in the page margins in place of their own date, URL and title; Safari leaves its own off by default). */
@page { margin: 12mm 12mm 14mm;
  @bottom-left { content: "ntpath.net"; font: 7.5pt "Atkinson Hyperlegible Next", sans-serif; color: #666; }
  @bottom-right { content: counter(page) " / " counter(pages); font: 7.5pt "Atkinson Hyperlegible Next", sans-serif; color: #666; }
}
@media print {
  :root { --mark-ground: #fff; --mark-gap: #fff; --border-strong: #999; }
  .cheatsheet { max-width: none; padding: 0; font-size: 9.5pt; }
  .cheatsheet .print-only { display: grid; }
  .cheatsheet .page-head { margin: 0 0 10px; }
  .cheatsheet .page-head .eyebrow, .cheatsheet .page-head .lead { display: none; }
  .cheatsheet .page-head h1 { font-size: 22pt; margin: 0; }
  /* The header in fixed print units and plain boxes, so Safari, Chrome/Edge and Firefox lay it out alike: the logo on the
     left, the meta and owner lines on the right, the last line sitting on the logo's baseline. */
  .sheet-print-head { grid-template-columns: auto 1fr; align-items: end; align-items: last baseline; column-gap: 6mm; padding-bottom: 2.5mm; margin-bottom: 4mm; border-bottom: .5pt solid #999; }
  .sheet-print-head .brand { display: inline-flex; align-items: center; font-size: 16pt; line-height: 1; color: #000; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  .sheet-print-info { display: block; text-align: right; font-size: 8pt; line-height: 1.35; color: #555; letter-spacing: .03em; }
  .sheet-print-info > span { display: block; }
  .sheet-print-owner { color: #777; }
  .sheet-columns { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sheet-col + .sheet-col { margin-left: 4mm; padding-left: 4mm; border-left: .5pt solid #ccc; }
  .sheet-section h2 { font-size: 10.5pt; margin-bottom: 6px; padding-bottom: 3px; }
  .sheet-section { margin-bottom: 12px; }
  .sheet-section th, .sheet-section td { padding: 3px 6px; font-size: 8.5pt; }
  .sheet-section pre, .sheet-section code { font-size: 8pt; }
  .sheet-section .code-block pre { padding: 6px 8px; }
  .sheet-traps ul { columns: 2; column-gap: 8mm; }
  .sheet-foot { display: none; }
  /* Nothing scrolls or clips on paper: a diagram scales into its box, a table wraps inside its column. */
  .cheatsheet .diagram-scroll, .cheatsheet .table-scroll, .cheatsheet pre { overflow: visible; }   /* a scroll box never breaks across pages */
  .cheatsheet .code-block:not(.is-short) pre { break-inside: auto; page-break-inside: auto; }
  .cheatsheet .dg { min-width: 0 !important; }
  .cheatsheet .diagram { margin: 6px 0 10px; }
  .sheet-section.is-wide .diagram { max-width: none; }
  .cheatsheet table { width: 100%; table-layout: auto; }
  .cheatsheet td, .cheatsheet th { overflow-wrap: break-word; }
  .sheet-split { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 4mm; }
  .sheet-split-figure { padding-left: 4mm; border-left: .5pt solid #ccc; }
  .sheet-section.is-wide .dg { max-height: 85mm; }   /* a drawing never takes most of a page */
}
.plan-table tbody th[scope="row"] { text-transform: none; letter-spacing: 0; font-size: .92rem; font-weight: 500; color: var(--text); }
[data-capture] .update-notice { display: none !important; }

/* ---- Guide (#/guide): framed screenshots with numbered rings (the N mark's interface ring) ---- */
/* The outcomes as a path trace: hops on one line, each an N-mark ring. No boxes. Hover lights the hop's segment in Fiber
   and underlines the claim (never colour alone). Three hops a row on tablets, a vertical path on phones. */
.guide-trace { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); row-gap: 28px; margin: 8px 0 44px; padding: 0; list-style: none; }
.guide-trace li { position: relative; margin: 0; }
.guide-trace li::before { content: ""; position: absolute; top: 7px; left: 0; right: 0; height: 2px; background: var(--border-strong); }
.guide-trace li:last-child::before { right: auto; width: 16px; }
.guide-hop { position: relative; display: flex; flex-direction: column; gap: 4px; height: 100%; padding: 30px 20px 4px 0; color: var(--text); text-decoration: none; }
.guide-hop:hover { color: var(--text); text-decoration: none; }
.hop-ring { position: absolute; top: 0; left: 0; width: 16px; height: 16px; box-sizing: border-box; border: 2px solid var(--mark-accent); border-radius: 50%; background: var(--bg); }
.hop-step { color: var(--muted); font-size: .8rem; font-weight: var(--overline-weight); text-transform: uppercase; letter-spacing: .06em; font-variant-numeric: tabular-nums; }
.hop-value { font: 700 clamp(1.3rem, 1rem + .8vw, 1.55rem)/1.15 var(--font-display); letter-spacing: -0.02em; color: var(--accent); font-variant-numeric: tabular-nums; }
.guide-hop strong { font-weight: 600; line-height: 1.3; text-underline-offset: 3px; }
.hop-text { color: var(--text-soft); font-size: .9rem; line-height: 1.45; }
.guide-trace li:has(.guide-hop:hover, .guide-hop:focus-visible)::before { background: var(--packets); }
.guide-hop:hover .hop-ring, .guide-hop:focus-visible .hop-ring { background: var(--mark-accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--mark-accent) 22%, transparent); }
.guide-hop:hover strong, .guide-hop:focus-visible strong { text-decoration: underline; }
@media (prefers-reduced-motion: no-preference) {
  .guide-trace li::before, .hop-ring { transition: background-color .18s ease, box-shadow .18s ease; }
}
@media (max-width: 900px) { .guide-trace { grid-template-columns: repeat(3, minmax(0, 1fr)); } .guide-trace li:nth-child(3n)::before { right: auto; width: 16px; } }
@media (max-width: 600px) {
  .guide-trace { grid-template-columns: 1fr; row-gap: 0; }
  .guide-trace li::before, .guide-trace li:nth-child(3n)::before { top: 0; bottom: 0; left: 7px; right: auto; width: 2px; height: auto; }
  .guide-trace li:first-child::before { top: 8px; }
  .guide-trace li:last-child::before { bottom: auto; height: 8px; }
  .guide-hop { padding: 0 0 22px 32px; }
}
.guide-step { display: grid; grid-template-columns: minmax(240px, 1fr) minmax(0, 2.3fr); gap: 28px; align-items: start; padding: 32px 0; border-top: 1px solid var(--border); scroll-margin-top: 80px; }
.guide-text h2 { margin: 0 0 8px; }
.guide-num { margin: 0 0 4px; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; letter-spacing: .04em; }
.guide-captions { padding-left: 0; list-style: none; counter-reset: none; }
.guide-captions li { position: relative; padding-left: 34px; margin: 8px 0; }
.guide-captions li::before { content: attr(value); position: absolute; left: 0; top: -1px; width: 22px; height: 22px; border: 2px solid var(--mark-accent); border-radius: 50%; display: grid; place-items: center; font-size: .78rem; font-weight: 700; color: var(--text); background: var(--surface); font-variant-numeric: tabular-nums; }
.guide-shot { margin: 0; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); overflow: hidden; }
.guide-bar { display: flex; align-items: center; gap: 12px; padding: 7px 12px; border-bottom: 1px solid var(--border); background: var(--bg-soft); }
.guide-bar .dots { display: inline-flex; gap: 6px; }
.guide-bar .dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--border-strong); }
.guide-url { flex: 1; min-width: 0; padding: 2px 10px; border-radius: 999px; background: var(--surface); color: var(--muted); font-size: .8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.guide-frame { position: relative; line-height: 0; }
.guide-frame img { width: 100%; height: auto; display: block; }
.guide-frame .shot-dark { display: none; }
@media screen {
  :root[data-theme="dark"] .guide-frame .shot-dark { display: block; }
  :root[data-theme="dark"] .guide-frame .shot-light { display: none; }
}
@media screen and (prefers-color-scheme: dark) {
  :root:not([data-theme]) .guide-frame .shot-dark { display: block; }
  :root:not([data-theme]) .guide-frame .shot-light { display: none; }
}
.guide-mark { position: absolute; transform: translate(-50%, -50%); width: 30px; height: 30px; border: 3px solid var(--mark-accent); border-radius: 50%; background: var(--surface); color: var(--text); display: grid; place-items: center; font: 700 .85rem/1 inherit; font-variant-numeric: tabular-nums; box-shadow: 0 0 0 3px color-mix(in srgb, var(--surface) 70%, transparent), var(--shadow); }
.guide-phones .guide-phone-row { display: flex; gap: 24px; flex-wrap: wrap; }
.guide-phone { width: min(260px, 100%); }
.guide-phone .guide-shot { border-radius: 22px; border-width: 6px; border-color: var(--border-strong); }
.guide-phone p { color: var(--text-soft); font-size: .92rem; }
.guide-plans { margin: 32px 0 24px; }
.guide-plans ul { margin: 0 0 12px; padding-left: 1.1em; }
.guide-notes { color: var(--text-soft); font-size: .92rem; }
.guide-notes h2 { font-size: 1rem; }
@media (max-width: 860px) {
  .guide-step { grid-template-columns: 1fr; gap: 16px; padding: 24px 0; }
  .guide-mark { width: 24px; height: 24px; border-width: 2px; font-size: .72rem; }
}

/* Exam news pages (views/news.js): the dates and the weight shift side by side, then the sections. */
.readouts.news-readouts { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); }
/* The move to CCNA v2.0: four readouts in one row (two by two on tablets, stacked on phones). */
.readouts.transition-readouts { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1080px) and (min-width: 761px) {
  .readouts.transition-readouts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .readouts.transition-readouts > .readout:nth-child(3) { padding-left: 0; border-left: 0; border-top: 1px solid var(--border); }
  .readouts.transition-readouts > .readout:nth-child(2) { padding-left: 24px; border-left: 1px solid var(--border); }
  .readouts.transition-readouts > .readout:nth-child(4) { border-top: 1px solid var(--border); }
}
@media (max-width: 760px) { .readouts.transition-readouts { grid-template-columns: minmax(0, 1fr); } }
.transition-group { margin-bottom: 24px; }
.readouts.news-readouts > .readout:nth-child(2) { padding-left: 24px; border-left: 1px solid var(--border); }
.news-countdown .meter { margin: 4px 0 8px; }
.news-countdown .news-next { margin-top: 18px !important; }
.news-weights-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; margin: 10px 0 12px; }
.wbars { list-style: none; margin: 8px 0 0; padding: 0; }
.wbars li { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 10px; margin: 0 0 9px; font-size: .9rem; }
.wbar-n { color: var(--muted); font-variant-numeric: tabular-nums; }
.wbar-pct { font-weight: 600; font-variant-numeric: tabular-nums; }
.wbar { grid-column: 1 / -1; height: 6px; margin-top: 3px; background: var(--bg-soft); }
.wbar > span { display: block; height: 100%; background: var(--accent); }
/* Lit panels on every page (house rule, Juan 2026-11-09): each boxed panel (cards, panels, plan and week boxes,
   charts, tiles) is lit as the Docs bands are in the light theme, and lifts a little more on hover when it is a link.
   Flat in dark (the tokens), and printed flat. A new boxed panel joins this list. */
.card, .panel, .status-panel, .week, .chart, .tracker-summary, .icon-card, .sync-notice, .plan-card, .bento-tile, .hub-labs a, .cov-domain, .gantt, .tp-sec, .st-sec {
  background: var(--lit-glow), var(--lit-panel); box-shadow: var(--lit-shadow);
}
a.card:hover, .bento-tile:hover, .hub-labs a:hover { box-shadow: var(--lit-shadow-hover); }
.plan-card.is-featured { box-shadow: 0 0 0 1px var(--accent), var(--lit-shadow); }
@media print { .card, .panel, .status-panel, .week, .chart, .tracker-summary, .icon-card, .sync-notice, .plan-card, .bento-tile, .hub-labs a, .cov-domain, .gantt, .st-sec { box-shadow: none; } }

/* Docs (/docs): a navigator, a title band, a reading column, topics, in the standard page frame (aligned with the
   logo). The navigator and the band are rounded panels, lit in the light theme, flat in dark. */
.docs-shell { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 40px; align-items: start; }
.docs-nav-toggle { display: none; }
.docs-nav { position: sticky; top: 84px; display: flex; flex-direction: column; height: calc(100dvh - 108px); overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius); background: linear-gradient(180deg, var(--surface), var(--bg-soft)); box-shadow: var(--lit-shadow-soft); }
.docs-nav-scroll { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 18px 12px 12px; }
.docs-nav-home { display: block; padding: 6px 10px; margin-bottom: 10px; color: var(--text); font-weight: 700; text-decoration: none; border-radius: var(--radius-sm); }
.docs-nav-label { margin: 14px 10px 4px; color: var(--muted); font-size: .76rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.docs-nav ul { list-style: none; margin: 0; padding: 0; }
.docs-nav li { margin: 0; }
.docs-nav-item { display: flex; align-items: center; gap: 10px; padding: 6px 10px; border-radius: var(--radius-sm); color: var(--text); font-size: .93rem; text-decoration: none; }
.docs-nav-item:hover, .docs-nav-home:hover { background: color-mix(in srgb, var(--text) 6%, transparent); }
.docs-nav-item[aria-current="page"], .docs-nav-home[aria-current="page"] { background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--link); font-weight: 600; }
.docs-ic { flex: none; width: 22px; height: 22px; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; --ni-ground: var(--surface); }
.docs-nav-sections { margin: 2px 0 6px 42px !important; border-left: 1px solid var(--border); }
.docs-nav-sections a { display: block; padding: 4px 10px; color: var(--text-soft); font-size: .86rem; text-decoration: none; }
.docs-nav-sections a:hover { color: var(--link); }
.docs-nav-empty { margin: 10px; font-size: .9rem; }
.docs-filter { display: flex; align-items: center; gap: 8px; margin: 0; padding: 10px 12px; border-top: 1px solid var(--border); }
.docs-filter svg { width: 16px; height: 16px; flex: none; fill: none; stroke: var(--muted); stroke-width: 1.8; stroke-linecap: round; }
.docs-filter input { flex: 1; min-width: 0; padding: 6px 10px; border: 1px solid var(--border-strong); border-radius: 999px; background: var(--surface); color: var(--text); font: inherit; font-size: .9rem; }
.docs-main { min-width: 0; padding: 0 0 64px; }
.docs-hero { position: relative; padding: 44px 48px 36px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--lit-glow), var(--lit-panel); box-shadow: var(--lit-shadow); }
.docs-hero-ic { width: 48px; height: 48px; margin-bottom: 14px; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; --ni-ground: var(--surface); }
.docs-eyebrow { margin: 0 0 6px; color: var(--text-soft); font-size: .95rem; font-weight: 600; }
.docs-eyebrow a { color: inherit; }
.docs-hero h1, .docs-banner h1 { margin: 0 0 12px; font-size: clamp(2rem, 4vw, 2.9rem); letter-spacing: -.02em; line-height: 1.08; }
.docs-abstract { max-width: 720px; margin: 0; color: var(--text-soft); font-size: 1.2rem; line-height: 1.5; }
.docs-article, .docs-main > .docs-section { max-width: 860px; padding-inline: 0; }
.docs-section { margin: 0; padding-top: 34px; scroll-margin-top: 80px; }
.docs-section > h2 { margin: 0 0 14px; padding-top: 18px; border-top: 1px solid var(--border); font-size: 1.65rem; letter-spacing: -.01em; }
.docs-section > h3 { margin: 22px 0 6px; font-size: 1.15rem; }
.docs-section .diagram { margin: 8px 0 16px; }
.docs-article > .docs-section:first-child > h2, .docs-banner + .docs-section > h2 { border-top: 0; padding-top: 0; }
.docs-topics { list-style: none; margin: 10px 0 0; padding: 0; }
.docs-topics li { display: flex; gap: 14px; align-items: flex-start; margin: 0; padding: 12px 0; }
.docs-topics li + li { border-top: 1px solid color-mix(in srgb, var(--border) 60%, transparent); }
.docs-topics .docs-ic { width: 28px; height: 28px; margin-top: 2px; }
.docs-topics a { color: var(--link); font-weight: 600; font-size: 1.02rem; text-decoration: none; }
.docs-topics a:hover { text-decoration: underline; }
.docs-topics p { margin: 2px 0 0; color: var(--text-soft); font-size: .95rem; }
.docs-topic-group + .docs-topic-group { margin-top: 26px; }
.docs-topic-group > .muted { margin: 0 0 4px; }
/* /docs with no page chosen: a banner of flat network icons. */
.docs-banner { position: relative; overflow: hidden; padding: 64px 48px 56px; color: var(--text); border: 1px solid var(--border); border-radius: var(--radius); background: var(--lit-glow), linear-gradient(135deg, var(--night-50) 0%, var(--frost) 100%); box-shadow: var(--lit-shadow); }
.docs-banner-art { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .45; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; --ni-ground: transparent;
  -webkit-mask-image: linear-gradient(90deg, transparent 35%, #000 75%); mask-image: linear-gradient(90deg, transparent 35%, #000 75%); }
/* The banner moves (Juan, 2026-11-15): the icon grid drifts left one tile (13 × 96 = 1248 units) in a seamless loop,
   and a few icons light up in turn in the logo colour, like packets crossing it. Never with reduced motion or in print. */
@media screen and (prefers-reduced-motion: no-preference) {
  .docs-banner-drift { animation: docs-drift 80s linear infinite; }
  .docs-banner-art [data-pulse] { transform-box: fill-box; transform-origin: center; animation: docs-pulse 9.6s ease-in-out var(--pulse-delay, 0s) infinite both; }
}
@keyframes docs-drift { to { transform: translateX(-1248px); } }
@keyframes docs-pulse {
  0%, 14%, 100% { color: var(--role); filter: none; }
  5% { color: var(--mark-accent); filter: drop-shadow(0 0 6px color-mix(in srgb, var(--mark-accent) 55%, transparent)); }
}
.docs-banner-text { position: relative; max-width: 620px; }
.docs-banner-links { display: flex; flex-wrap: wrap; gap: 10px; margin: 22px 0 0; }
@media screen {
  :root[data-theme="dark"] .docs-banner { background: linear-gradient(135deg, var(--night-950) 0%, var(--backbone) 140%); box-shadow: none; }
  :root[data-theme="dark"] .docs-hero { background: var(--night-900); box-shadow: none; }
  :root[data-theme="dark"] .docs-nav { background: var(--bg-soft); box-shadow: none; }
  :root[data-theme="dark"] .docs-ic { --ni-ground: var(--bg-soft); }
  :root[data-theme="dark"] .docs-hero-ic { --ni-ground: var(--night-900); }
}
@media screen and (prefers-color-scheme: dark) {
  :root:not([data-theme]) .docs-banner { background: linear-gradient(135deg, var(--night-950) 0%, var(--backbone) 140%); box-shadow: none; }
  :root:not([data-theme]) .docs-hero { background: var(--night-900); box-shadow: none; }
  :root:not([data-theme]) .docs-nav { background: var(--bg-soft); box-shadow: none; }
  :root:not([data-theme]) .docs-ic { --ni-ground: var(--bg-soft); }
  :root:not([data-theme]) .docs-hero-ic { --ni-ground: var(--night-900); }
}
@media print { .docs-hero, .docs-banner, .docs-nav { box-shadow: none; } }
/* The guide inside the shell */
.docs-main .guide-trace, .docs-main .guide-step, .docs-main .guide-plans, .docs-main .guide-notes { margin-inline: 0; }
.docs-hero + .guide-trace { margin-top: 36px; }
table.doc-commands caption { caption-side: top; text-align: left; font-weight: 600; padding: 0 0 6px; }
table.doc-commands td:first-child { width: 46%; }
table.doc-commands tr.cmd-mode th { padding: 14px 12px 6px; color: var(--text-soft); font-weight: 600; text-transform: none; letter-spacing: 0; border-bottom: 1px solid var(--border-strong); }
table.doc-commands td:first-child code { white-space: pre-wrap; word-break: break-word; }
@media (max-width: 1080px) {
  .docs-shell { grid-template-columns: minmax(0, 1fr); border-top: 0; }
  .docs-shell { gap: 16px; }
  .docs-nav-toggle { display: flex; align-items: center; gap: 10px; width: 100%; padding: 12px 16px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); color: var(--text); font: inherit; font-weight: 600; cursor: pointer; }
  .docs-nav-toggle svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
  .docs-nav { display: none; position: static; height: auto; max-height: 70dvh; }
  .docs-shell.nav-open .docs-nav { display: flex; }
  .docs-hero, .docs-banner { padding: 32px 16px 26px; }
}
@media (max-width: 760px) {
  .docs-abstract { font-size: 1.05rem; }
  table.doc-commands, table.doc-commands tbody, table.doc-commands tr, table.doc-commands td, table.doc-commands th { display: block; width: auto; }
  table.doc-commands thead { display: none; }
  table.doc-commands tr { padding: 10px 0; border-bottom: 1px solid var(--border); }
  table.doc-commands td { border: 0; padding: 2px 0; }
  table.doc-commands td:first-child { width: auto; }
  table.doc-commands tr.cmd-mode { padding: 12px 0 0; border-bottom: 0; }
  table.doc-commands tr.cmd-mode th { padding: 0 0 6px; }
}
.news-body { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 48px; align-items: start; }
.news-wide { margin: 0 0 40px; }

/* Mind maps (mindmap.js): a Night root tile, branch pills and item cards in the diagram role colours, links that end on
   the N mark's ring. The outline list is the text version; phones show it instead of the drawing. */
.mindmap { margin: 8px 0 24px; }
.mm-svg { display: block; width: 100%; height: auto; font-family: var(--font); }
.mm-root rect { fill: #0b1220; stroke: var(--packet); stroke-width: 2; }
.mm-root text { fill: #e6edf7; font-family: var(--font-display); font-size: 17px; font-weight: 700; letter-spacing: -.01em; }
.mm-trunk { fill: none; stroke: var(--mm); stroke-width: 2.5; }
.mm-link { fill: none; stroke: var(--mm); stroke-width: 1.5; opacity: .85; }
.mm-ring { fill: var(--surface); stroke: var(--mm); stroke-width: 2; }
.mm-branch { fill: color-mix(in srgb, var(--mm) 16%, var(--surface)); stroke: var(--mm); stroke-width: 1.5; }
.mm-branch-text { fill: var(--text); font-size: 13.5px; font-weight: 600; }
.mm-item { fill: var(--surface); stroke: color-mix(in srgb, var(--mm) 55%, var(--border)); stroke-width: 1.2; }
.mm-item-text { fill: var(--text); font-size: 13px; font-weight: 600; }
.mm-detail { fill: var(--text-soft); font-size: 12px; white-space: pre; }
/* The expand/collapse switch above a mind map, and the two drawings it swaps. */
.mm-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 10px; }
.mm-count { color: var(--muted); font-size: .85rem; font-variant-numeric: tabular-nums; }
.mm-stage { position: relative; }
.mm-stage.mm-gliding { overflow: hidden; transition: height .45s cubic-bezier(.32, .72, 0, 1); }
.mindmap.is-open .mm-compact, .mindmap.is-closed .mm-full { display: none; }
.mm-compact { margin: 0 auto; }
.mindmap.is-closed .mm-compact { animation: mm-fade .3s ease-out both; }
.mindmap.is-open .mm-full .mm-trunk, .mindmap.is-open .mm-full .mm-root, .mindmap.is-open .mm-full .mm-branch { animation: mm-fade .25s ease-out both; }
.mindmap.is-open .mm-full .mm-it { animation: mm-card .4s cubic-bezier(.32, .72, 0, 1) both; animation-delay: calc(80ms + var(--i) * 45ms); }
@keyframes mm-fade { from { opacity: 0; } }
@keyframes mm-card { from { opacity: 0; transform: translateX(var(--dx)); } }
.mindmap.is-closed .mm-outline ul { display: none; }
@media (prefers-reduced-motion: reduce) {
  .mm-stage.mm-gliding { transition: none; }
  .mindmap .mm-compact, .mindmap .mm-full .mm-trunk, .mindmap .mm-full .mm-root, .mindmap .mm-full .mm-branch, .mindmap .mm-full .mm-it { animation: none !important; }
}
@media print { .mm-bar { display: none; } .mindmap.is-closed .mm-full { display: block; } .mindmap.is-closed .mm-compact { display: none; } }

/* An on/off switch in the Apple manner, in the identity: an accent track when on (Backbone, Packet on dark), a white knob that slides with a
   soft spring. role="switch" with aria-checked; the label stays as words, so the state never rests on colour alone. */
.np-switch { display: inline-flex; align-items: center; gap: 10px; padding: 4px 4px 4px 12px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--text-soft); font: 500 .875rem var(--font); cursor: pointer; transition: border-color .2s, color .2s; }
.np-switch:hover { border-color: var(--border-strong); color: var(--text); }
.np-switch:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.np-switch-track { position: relative; flex: none; width: 40px; height: 24px; border-radius: 999px; background: var(--border-strong); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--text) 8%, transparent); transition: background .25s ease; }
.np-switch-knob { position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgb(0 0 0 / .25), 0 0 0 .5px rgb(0 0 0 / .06); transition: transform .3s cubic-bezier(.32, .72, 0, 1), width .15s ease; }
.np-switch:active .np-switch-knob { width: 24px; }
.np-switch[aria-checked="true"] { color: var(--text); }
.np-switch[aria-checked="true"] .np-switch-track { background: var(--accent); }
.np-switch[aria-checked="true"] .np-switch-knob { transform: translateX(16px); }
.np-switch[aria-checked="true"]:active .np-switch-knob { transform: translateX(12px); }
@media (prefers-reduced-motion: reduce) { .np-switch-track, .np-switch-knob { transition: none; } }
.mindmap figcaption { margin-top: 8px; color: var(--text-muted, var(--muted)); font-size: .9rem; }
.mm-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.mm-outline, .mm-outline ul { margin: 0; padding-left: 1.1rem; }
.mm-outline > li { margin-top: .6rem; }
@media (max-width: 760px) {
  .mm-svg { display: none; }
  .mm-text { position: static; width: auto; height: auto; overflow: visible; clip: auto; white-space: normal; }
}
@media print { .mm-svg { break-inside: avoid; } }
.news-side { padding-left: 32px; border-left: 1px solid var(--border); }
.news-side .news-section > h2 { font-size: 1.25rem; }
.news-section { margin: 0 0 36px; }
.news-section > h2 { scroll-margin-top: 80px; }
.news-section table td:first-child { font-weight: 500; }
.news-labs { padding-left: 1.1em; }
.news-labs li { margin: 0 0 6px; }
.news-faq details + details { margin-top: 8px; }
@media (max-width: 1080px) {
  .news-body { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .news-side { padding-left: 0; border-left: 0; }
}
@media (max-width: 760px) {
  .readouts.news-readouts { grid-template-columns: minmax(0, 1fr); }
  .readouts.news-readouts > .readout:nth-child(2) { padding-left: 0; border-left: 0; }
  .news-weights-cols { grid-template-columns: minmax(0, 1fr); gap: 16px; }
}

/* The free subnet calculator (views/subnet.js): the calculator and its guide, with the prefix table beside them. */
.subnet-calc { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 500px); gap: 40px; align-items: start; }
.subnet-main > section { margin-top: 32px; }
.subnet-side h2 { margin-top: 0; font-size: 1.25rem; }
.prefix-table { font-size: .9rem; }
.prefix-table td, .prefix-table th { padding-left: 8px; padding-right: 8px; font-variant-numeric: tabular-nums; white-space: nowrap; }
@media (max-width: 1000px) {
  .subnet-calc { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .subnet-side { margin-top: 32px; }
}

/* Subnetting practice (Plus, practice.js): one calm column for new engineers and readers with dyslexia. Sentence case,
   left-aligned, roomy lines, one task on screen, no motion. Right and wrong carry an icon and a word, never colour alone. */
.practice { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; max-width: 760px; font-size: 1.05rem; line-height: 1.7; }
.practice [hidden] { display: none !important; }   /* .btn's display would otherwise show hidden buttons */
.practice p { margin: 0 0 .6em; max-width: 62ch; }
.practice h2 { margin: 0 0 12px; font-size: 1.3rem; line-height: 1.35; }
.practice h3, .practice h4 { margin: 0 0 8px; line-height: 1.35; }
.practice h4 { font-size: 1.05rem; }
.practice .btn { font-size: 1rem; padding: 10px 18px; }
.practice .btn-row { margin-top: 16px; }
.practice input[type="text"], .practice select { font: inherit; font-size: 1.1rem; padding: 10px 12px; border: 2px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); color: var(--text); max-width: 100%; }
.practice input[type="text"] { width: 18ch; font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.practice input[aria-invalid="true"] { border-color: var(--danger); border-style: dashed; }
.practice :focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.practice label, .practice-label { display: block; font-weight: 600; color: var(--text); margin-bottom: 6px; }
.practice-modes { display: flex; flex-wrap: wrap; gap: 8px; }
.practice-modes .btn[aria-pressed="true"] { background: var(--accent-soft); border: 2px solid var(--accent); color: var(--text); font-weight: 700; }
.practice-modes .btn[aria-pressed="true"]::before { content: "✓ "; }
.practice-addr { font-variant-numeric: tabular-nums; font-weight: 700; }
.practice-given { font-size: 1.1rem; }
.practice-grid { border-collapse: collapse; font-variant-numeric: tabular-nums; min-width: 100%; }
.practice-grid th, .practice-grid td { vertical-align: middle; text-transform: none; letter-spacing: normal; font-size: 1.05rem; padding: 10px 14px; border-bottom: 1px solid var(--border); }
.practice-grid thead th { font-weight: 600; color: var(--muted); text-align: center; white-space: nowrap; }
.practice-grid tbody th { text-align: left; font-weight: 600; white-space: nowrap; }
.practice-grid td { text-align: center; font-size: 1.3rem; font-weight: 600; min-width: 3.2em; }
.practice-grid tr.practice-split > * { border-top: 3px double var(--border); }
.practice-grid .is-now { background: var(--accent-soft); border-left: 3px solid var(--accent); border-right: 3px solid var(--accent); color: var(--text); }
.practice-now { display: block; font-size: .85rem; font-weight: 700; color: var(--text); }
.practice-now::before { content: "▼ "; font-size: .7em; }
.practice-cidr { font-weight: 400; color: var(--muted); margin-left: 4px; }
.practice-progress { color: var(--muted); font-weight: 600; }
.practice-panel { padding: 4px 0; }
.practice-ask { margin-top: 16px; }
.practice-hint { padding: 12px 16px; border-left: 4px solid var(--accent); background: var(--accent-soft); border-radius: var(--radius-sm); }
.practice-msg { display: flex; gap: 10px; align-items: baseline; margin: 12px 0 0; padding: 10px 14px; border-radius: var(--radius-sm); border: 2px solid var(--border); }
.practice-msg.is-right { border-color: var(--ok); }
.practice-msg.is-wrong { border-color: var(--danger); border-style: dashed; }
.practice-icon { font-weight: 700; flex: none; width: 1.2em; text-align: center; }
.practice-msg.is-right .practice-icon { color: var(--ok); }
.practice-msg.is-wrong .practice-icon, .practice-msg.is-note .practice-icon { color: var(--danger); }
.practice-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 28px; }
.practice-field-msg .practice-msg { font-size: .98rem; }
.practice-help { color: var(--muted); font-size: .95rem; margin: 0 0 6px; }
.practice-summary { font-weight: 600; margin-top: 16px; }
.practice-summary .practice-icon { color: var(--ok); margin-right: 6px; }
.practice-summary-list { display: grid; gap: 6px; margin: 0 0 12px; }
.practice-summary-list div { display: flex; flex-wrap: wrap; gap: 4px 12px; }
.practice-summary-list dt { min-width: 11em; }
.practice-summary-list dd { margin: 0; }
.practice-solution { margin-top: 24px; }
.practice-solution ol { padding-left: 1.4em; display: grid; gap: 16px; }
.practice-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 16px; }
.practice-row .practice-label { flex-basis: 100%; margin-bottom: 0; }
.practice-mine { margin-top: 20px; }
.practice-mine summary { cursor: pointer; font-weight: 600; padding: 6px 0; }
.practice-mine form { display: grid; gap: 16px; margin-top: 12px; justify-items: start; }
@media (max-width: 640px) {
  .practice { font-size: 1rem; }
  .practice-fields { grid-template-columns: minmax(0, 1fr); }
  .practice-card.panel { padding: 16px 12px; }
  .practice-grid { min-width: 0; width: 100%; }
  .practice-grid th, .practice-grid td { padding: 8px 4px; font-size: .9rem; }
  .practice-grid td { font-size: 1.05rem; min-width: 0; }
  .practice-grid tbody th { white-space: normal; }
  .practice-grid thead th { white-space: normal; }
}

/* Exam hubs (views/exam.js): the exam's labs, then its facts beside the questions. */
.hub-section { margin: 40px 0 0; }
.hub-labs li { margin: 0; }
.hub-labs { list-style: none; margin: 14px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.hub-labs a { display: flex; flex-direction: column; gap: 4px; height: 100%; padding: 14px 16px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); color: var(--text); text-decoration: none; }
.hub-labs a:hover { border-color: var(--accent); }
.hub-labs .muted { font-size: .88rem; }
.hub-about { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: start; }
.hub-about h2 { margin-top: 0; }
.hub-facts { margin: 0 0 12px; }
.hub-facts > div { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--border); }
.hub-facts dt { color: var(--muted); }
.hub-facts dd { margin: 0; }
.hub-about details + details { margin-top: 8px; }
@media (max-width: 860px) {
  .hub-about { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .hub-facts > div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
}

/* A locked cheat sheet (views/premium.js): the free first section beside what the full sheet holds. */
.sheet-preview-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 40px; align-items: start; }
.sheet-preview-side { padding-left: 28px; border-left: 1px solid var(--border); }
.sheet-preview-side h2 { margin-top: 0; font-size: 1.15rem; }
.sheet-preview-list { list-style: none; margin: 0 0 14px; padding: 0; }
.sheet-preview-list li { display: flex; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.sheet-preview-list .sheet-num { min-width: 1.6em; color: var(--muted); font-variant-numeric: tabular-nums; }
@media (max-width: 900px) {
  .sheet-preview-grid { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .sheet-preview-side { padding-left: 0; border-left: 0; }
}

/* Print: a plain page, no Morning gradient (house rule: printed pages are light and flat). */
@media print { body { background: #fff; } }

/* Study timeline (views/gantt.js; Juan, 2026-11-15): the road on My path, this stretch on Today. Each row is a grid:
   its name, the track (bars placed by % of the time range), its words. Domains are heaviest first and thicker with
   their weight (w1–w3); a domain opens to its topics. Shapes carry the meaning, colour only helps: planned is a
   dashed outline, projected a fill, critical a heavy outline, behind the plan a hatched red frame, time to spare a
   thin whisker, done a green tick, revision hatched, checkpoints ◇, the exam ◆ (drag it, or arrow keys). The Today
   line runs down every track (--today). "Critical only" dims the rest. */
.gantt { margin: 32px 0; padding: 20px 22px 16px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.g-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 18px; }
.g-head h2 { margin: 0; }
.g-head .route-link { margin-left: auto; }
.g-lead { margin: 8px 0 18px; color: var(--text-soft); font-size: .95rem; }
.g-certs, .g-domains, .g-topics { margin: 0; padding: 0; list-style: none; }
.g-grid { overflow-x: clip; overflow-clip-margin: 4px; }   /* a ◆ or a label at the end never widens the page */
.g-row { display: grid; grid-template-columns: minmax(0, 15rem) minmax(0, 1fr) minmax(0, 13rem); gap: 0 14px; align-items: center; min-height: 34px; }
.g-label { min-width: 0; overflow: hidden; font-size: .88rem; text-overflow: ellipsis; white-space: nowrap; }
.g-num { color: var(--text-soft); font-weight: 600; font-variant-numeric: tabular-nums; }
.g-end { min-width: 0; color: var(--muted); font-size: .78rem; line-height: 1.35; }
.g-domain > details > summary { list-style: none; cursor: pointer; border-radius: 6px; }
.g-domain > details > summary::-webkit-details-marker { display: none; }
.g-domain > details > summary:hover { background: color-mix(in srgb, var(--accent) 6%, transparent); }
.g-domain > details > summary:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.g-domain summary .g-label::before { content: "›"; display: inline-block; width: 1em; color: var(--muted); transition: transform .2s; }
.g-domain > details[open] .g-label::before { transform: rotate(90deg); }
.g-topic { --gh: 8px; min-height: 26px; }
.g-topic .g-label { padding-left: 1.6em; color: var(--text); font-size: .82rem; }
.g-topic .g-end { font-size: .74rem; }
.w1 { --gh: 8px; }
.w2 { --gh: 12px; }
.w3 { --gh: 16px; }
.g-cert + .g-cert { margin-top: 18px; }
.g-cert-head { --gh: 14px; min-height: 56px; margin-bottom: 4px; border-bottom: 1px solid var(--border); }
.g-cert-head .g-label { white-space: normal; font-size: 1rem; }
.g-sub { display: block; color: var(--muted); font-size: .78rem; }
.g-zone { font-weight: 600; }
.g-zone-green .g-zone { color: var(--ok); }
.g-zone-amber .g-zone { color: var(--warn); }
.g-zone-red .g-zone { color: var(--danger); }
.g-track { position: relative; height: calc(var(--gh, 12px) + 12px); background: linear-gradient(var(--border), var(--border)) center / 100% 1px no-repeat; }
.g-track::before { content: ""; position: absolute; top: -6px; bottom: -6px; left: var(--today, -10px); border-left: 2px solid color-mix(in srgb, var(--accent) 55%, transparent); pointer-events: none; }
.g-track > * { position: absolute; top: 50%; transform: translateY(-50%); }
.g-plan { height: var(--gh); border: 1.5px dashed var(--border-strong); border-radius: 4px; }
.g-fore { height: var(--gh); border: 1.5px solid var(--accent); border-radius: 4px; background: color-mix(in srgb, var(--accent) 38%, transparent); }
.is-critical .g-fore { border: 2.5px solid var(--text); }
.g-behind { height: calc(var(--gh) + 6px); border: 2px solid var(--danger); border-radius: 5px; background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--danger) 35%, transparent) 0 2px, transparent 2px 6px); }
.g-float { height: 2px; background: var(--text-soft); }
.g-float::after { content: ""; position: absolute; right: 0; top: -4px; height: 10px; border-right: 2px solid var(--text-soft); }
.g-done { width: 3px; height: calc(var(--gh) + 6px); margin-left: -1.5px; border-radius: 2px; background: var(--ok); }
.g-done-dot { width: 10px; height: 10px; margin-left: -5px; border-radius: 50%; background: var(--ok); }
.g-study { height: 6px; border-radius: 3px; background: var(--accent); }
.g-review { height: 14px; border: 1px solid var(--accent); border-radius: 3px; background: repeating-linear-gradient(135deg, var(--accent) 0 1.5px, transparent 1.5px 5px); }
.g-check { width: 11px; height: 11px; border: 2px solid var(--text-soft); background: var(--surface); transform: translate(-50%, -50%) rotate(45deg); }
.g-check.is-late { border-color: var(--danger); }
.g-exam-ghost { width: 14px; height: 14px; border: 2px dashed var(--danger); transform: translate(-50%, -50%) rotate(45deg); }
.g-exam { z-index: 2; width: 30px; height: 30px; padding: 0; border: 0; border-radius: 50%; background: none; color: var(--accent); font-size: 1.2rem; line-height: 1; cursor: ew-resize; touch-action: none; transform: translate(-50%, -50%); }
.g-exam:hover, .g-exam.is-moving { color: var(--text); }
.g-exam:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
.g-axis { min-height: 44px; }
.g-axis .g-track { height: 44px; background: none; }
.g-axis .g-track::before { display: none; }
.g-tick { top: 0; bottom: 0; height: 100%; border-left: 1px solid var(--border); transform: none; }
.g-tick > span { position: absolute; top: 3px; left: 5px; color: var(--muted); font-size: .72rem; white-space: nowrap; }
.g-today { top: 0; height: 100%; transform: none; }
.g-today { border-left: 2px solid var(--accent); }
.g-today > span { position: absolute; bottom: 0; left: 4px; color: var(--accent); font-size: .72rem; font-weight: 700; white-space: nowrap; }
/* The card behind a bar, on hover or keyboard focus (as the unit cells'); a mark's own card wins over its track's. */
.gantt [data-tip]:is(:hover, :focus-visible)::after, .g-domain summary:focus-visible .g-track::after {
  content: attr(data-tip); position: absolute; left: 50%; bottom: calc(100% + 8px); z-index: 6; width: max-content; max-width: min(320px, 70vw);
  padding: 5px 9px; border-radius: 8px; background: var(--text); color: var(--bg); font: 500 .78rem/1.35 var(--font); white-space: normal; text-align: left; pointer-events: none; transform: translateX(-50%);
}
.g-track:has([data-tip]:hover)::after { display: none; }
/* "Show the critical path" (Juan, 2026-11-25): the margin dims, the critical bars keep their heavy outline, and each
   cert's critical path analysis shows under the lead (cpBlock). Off: every row as it is, no analysis. */
.gantt:not(.cp-on) .g-cp-all { display: none; }
.gantt.cp-on :is(.g-domain:not(.is-critical), .g-topic:not(.is-critical):not(.is-done)) { opacity: .38; }
.gantt:not(.cp-on) .is-critical .g-fore { border: 1.5px solid var(--accent); }
.g-cp { margin: 4px 0 18px; padding: 14px 16px; border: 1px solid var(--border); border-left: 4px solid var(--text); border-radius: 10px; }
.g-cp h3 { margin: 0 0 6px; font-size: 1.05rem; }
.g-cp-why { margin: 0 0 10px; color: var(--text-soft); font-size: .88rem; line-height: 1.5; }
.g-cp-facts { display: grid; gap: 6px; margin: 0 0 12px; padding: 0; list-style: none; font-size: .9rem; line-height: 1.5; }
.g-cp-facts li { display: grid; grid-template-columns: 9rem minmax(0, 1fr); gap: 12px; }
.g-cp-k { color: var(--muted); font-size: .78rem; font-weight: 700; letter-spacing: .02em; text-transform: uppercase; padding-top: .15em; }
.g-cp strong.is-late { color: var(--danger); }
.g-cp-table { width: 100%; border-collapse: collapse; font-size: .85rem; font-variant-numeric: tabular-nums; }
.g-cp-table :is(th, td) { padding: 6px 8px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
.g-cp-table th { color: var(--muted); font-size: .74rem; font-weight: 700; letter-spacing: .02em; text-transform: uppercase; }
.g-cp-table td:first-child { color: var(--muted); font-weight: 700; }
.g-cp-table tr.is-late td:first-child { color: var(--danger); }
.g-cp-slip { color: var(--danger); font-size: .76rem; font-weight: 700; }
.g-cp-more { display: none; }
/* With the path shown, the recovery's own list of the next critical topics would repeat its table: hidden. */
.gantt.cp-on .g-rc-grid { grid-template-columns: minmax(0, 1fr); }
.gantt.cp-on .g-rc-col + .g-rc-col { display: none; }
.g-cp:has(.g-cp-all-rows[open]) .g-cp-more { display: table-row; }
.g-cp-all-rows { margin-top: 8px; font-size: .85rem; }
.g-cp-all-rows summary { color: var(--link, var(--accent)); cursor: pointer; }
@media (max-width: 760px) {
  .g-cp-facts li { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .g-cp-table :is(th, td):nth-child(3), .g-cp-table :is(th, td):nth-child(4) { display: none; }
}
.g-key { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 16px 0 6px; padding: 0; list-style: none; color: var(--text-soft); font-size: .8rem; }
.g-key li { display: inline-flex; align-items: center; gap: 6px; }
.g-sw { display: inline-block; width: 22px; height: 10px; border-radius: 3px; }
.g-sw-plan { border: 1.5px dashed var(--border-strong); }
.g-sw-fore { border: 1.5px solid var(--accent); background: color-mix(in srgb, var(--accent) 38%, transparent); }
.g-sw-crit { border: 2.5px solid var(--text); background: color-mix(in srgb, var(--accent) 38%, transparent); }
.g-sw-behind { border: 2px solid var(--danger); background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--danger) 35%, transparent) 0 2px, transparent 2px 6px); }
.g-sw-float { height: 2px; background: var(--text-soft); }
.g-sw-done { width: 4px; height: 14px; background: var(--ok); }
.g-sw-review { border: 1px solid var(--accent); background: repeating-linear-gradient(135deg, var(--accent) 0 1.5px, transparent 1.5px 5px); }
.g-sym { color: var(--accent); }
.g-add { margin: -14px 0 32px; color: var(--text-soft); font-size: .9rem; }
/* What is at risk, and how to get back on track (recoveryBlock in views/gantt.js; Juan, 2026-11-25): under the key of a
   late cert (red) or one using its spare time too fast (amber). The risk and its causes beside the critical path's
   next topics, then the measured ways back, the recommended one first. Line-drawn, inside the timeline's panel. */
.g-recover { margin: 18px 0 8px; padding-top: 16px; border-top: 2px solid var(--border); scroll-margin-top: 90px; }
.g-recover.g-zone-red { border-top-color: var(--danger); }
.g-recover.g-zone-amber { border-top-color: var(--warn); }
.g-recover h3 { margin: 0; font-size: 1.15rem; }
/* Folded by default (Juan, 2026-11-25): one line with the verdict and the recommended way back, a chevron to open. */
.g-recover > summary { display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px; padding: 2px 34px 2px 0; position: relative; list-style: none; cursor: pointer; border-radius: 6px; }
.g-recover > summary::-webkit-details-marker { display: none; }
.g-recover > summary:hover h3 { text-decoration: underline; text-underline-offset: 3px; }
.g-recover > summary:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
.g-rc-sum { color: var(--text-soft); font-size: .9rem; }
.g-rc-toggle { position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--border-strong); }
.g-rc-toggle::before { content: ""; position: absolute; left: 7px; top: 5px; width: 6px; height: 6px; border-right: 2px solid var(--text-soft); border-bottom: 2px solid var(--text-soft); transform: rotate(45deg); transition: transform .2s; }
.g-recover[open] .g-rc-toggle::before { top: 8px; transform: rotate(-135deg); }
.g-recover[open] > summary { margin-bottom: 12px; }
@media (prefers-reduced-motion: reduce) { .g-rc-toggle::before { transition: none; } }
.g-recover h4 { margin: 14px 0 6px; color: var(--text-soft); font-size: .8rem; letter-spacing: .02em; text-transform: uppercase; }
.g-recover p, .g-rc-why li { margin: 0; font-size: .92rem; line-height: 1.55; }
.g-rc-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 32px; }
.g-rc-col > h4:first-child { margin-top: 0; }
.g-rc-why { display: grid; gap: 6px; margin: 0; padding-left: 1.1em; }
.g-rc-path { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; counter-reset: rc; }
.g-rc-path li { display: grid; grid-template-columns: 1.6em minmax(0, 1fr); gap: 0 6px; padding: 7px 0; border-bottom: 1px solid var(--border); font-size: .88rem; counter-increment: rc; }
.g-rc-path li::before { content: counter(rc); grid-row: span 2; color: var(--muted); font-weight: 700; font-variant-numeric: tabular-nums; }
.g-rc-path li.is-late::before { content: counter(rc) "!"; color: var(--danger); }
.g-rc-topic { min-width: 0; overflow-wrap: anywhere; }
.g-rc-dates { color: var(--muted); font-size: .8rem; font-variant-numeric: tabular-nums; }
.g-rc-path li.is-late .g-rc-dates strong { color: var(--danger); }
.g-rc-opts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; }
.g-rc-opt { display: flex; flex-direction: column; gap: 6px; min-width: 0; padding: 12px 14px; border: 1px solid var(--border); border-radius: 10px; }
.g-rc-opt.is-rec { border: 2px solid var(--accent); background: color-mix(in srgb, var(--accent) 7%, transparent); }
.g-rc-opt .route-link { margin-top: auto; font-size: .88rem; }
.g-rc-opt-t { font-size: .98rem; }
.g-rc-badge { align-self: flex-start; padding: 1px 8px; border-radius: 999px; background: var(--accent); color: var(--on-accent); font-size: .7rem; font-weight: 700; letter-spacing: .02em; text-transform: uppercase; }
a.g-zone { text-decoration: none; }
a.g-zone:hover { text-decoration: underline; }
@media (max-width: 760px) {
  .gantt { padding: 16px 14px 12px; }
  .g-row { grid-template-columns: minmax(0, 1fr); gap: 2px; padding: 4px 0; }
  .g-axis .g-label, .g-axis .g-end, .g-tick-minor > span { display: none; }
  .g-label { white-space: normal; }
  .g-rc-grid { grid-template-columns: minmax(0, 1fr); }
  .g-rc-grid .g-rc-col + .g-rc-col { margin-top: 14px; }
}
@media print {
  .gantt { break-inside: auto; }
  .gantt :is(.g-fore, .g-behind, .g-done, .g-done-dot, .g-review, .g-study) { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* ---------------------------------------------------------------------------------------------------------------------
   TroublePath (/troublepath, views/troublepath.js; docs/TROUBLEPATH.md; Juan, 2026-11-18). A tool of its own, like
   NTprompt: its header replaces NTpath's. The identity is NTpath's (type, the N mark, lit panels, the frame) with a
   vibrant orange in place of Packet blue, and four backgrounds of its own (Ember, Dune, Graphite, NOC; html
   data-tp-ground, kept in netpath.tp.ground), each in both themes. The orange is TroublePath's brand colour here, so
   statuses inside TroublePath never use orange: priorities are shapes and words (Outage square red, P1 triangle amber,
   P2 circle yellow ink). Dark rules are screen only (print is always light).
   ------------------------------------------------------------------------------------------------------------------ */
html.tp-on {
  --tp-orange: #f97316;
  --accent: #c2410c;              /* 5.2:1 on white: text, links and focus */
  --accent-hover: #9a3412;
  --accent-soft: #ffedd5;
  --focus: #c2410c;
  --link: #c2410c;
  --link-hover: #9a3412;
  --on-accent: #ffffff;
  --packets: var(--tp-orange);
  --mark-accent: var(--tp-orange);
  --wordmark-accent: #ea580c;
  --info-bg: #fff7ed;
  --info-border: #fdba74;
  --lit-glow: radial-gradient(120% 90% at 0% 0%, rgb(249 115 22 / .07), transparent 60%);
  --lit-shadow: 0 1px 2px rgb(124 45 18 / .06), 0 14px 32px -18px rgb(124 45 18 / .26);
  --lit-shadow-hover: 0 2px 4px rgb(124 45 18 / .08), 0 20px 40px -18px rgb(124 45 18 / .34);
  --tp-glow: rgb(249 115 22 / .14);
  --bg: #faf7f5;
  --header-tint: #fff7ed;
  --page-ground: radial-gradient(70% 520px at 18% 0%, var(--tp-glow), transparent 70%),
    linear-gradient(180deg, #fff7ed 0px, var(--bg) 720px, var(--bg) calc(100% - 900px), #fdeee3 100%);
  --page-foot: radial-gradient(70% 520px at 18% 100%, var(--tp-glow), transparent 70%);
}
html.tp-on[data-tp-ground="dune"] {
  --bg: #f8f3ea; --header-tint: #fdf6e3; --tp-glow: rgb(217 160 92 / .16);
  --page-ground: radial-gradient(70% 520px at 80% 0%, var(--tp-glow), transparent 70%),
    linear-gradient(180deg, #fdf6e3 0px, var(--bg) 720px, var(--bg) calc(100% - 900px), #efe4d2 100%);
}
html.tp-on[data-tp-ground="graphite"] {
  --bg: #f4f4f5; --header-tint: #fafafa; --tp-glow: rgb(113 113 122 / .10);
  --page-ground: linear-gradient(180deg, #fafafa 0px, var(--bg) 720px, var(--bg) calc(100% - 900px), #e4e4e7 100%);
}
html.tp-on[data-tp-ground="noc"] {
  --bg: #eef2f7; --header-tint: #f1f5f9; --tp-glow: rgb(249 115 22 / .09);
  --page-ground: radial-gradient(60% 480px at 50% 0%, var(--tp-glow), transparent 70%),
    linear-gradient(180deg, #f1f5f9 0px, var(--bg) 720px, var(--bg) calc(100% - 900px), #dfe6ef 100%);
}
@media screen {
  html.tp-on[data-theme="dark"] {
    --accent: #fb923c; --accent-hover: #fdba74; --accent-soft: #3b1d0c; --focus: #fb923c;
    --link: #fb923c; --link-hover: #fed7aa; --on-accent: #1c0a02;
    --mark-accent: #fb923c; --wordmark-accent: #fb923c; --packets: #fb923c;
    --info-bg: #2a160a; --info-border: #7c3a12;
    --tp-glow: rgb(251 146 60 / .16);
    --bg: #15100d; --bg-soft: #2d211a; --bg-end: #0f0b09; --surface: #211813; --border: #3d2e24; --border-strong: #5a4433;
    --mark-ground: var(--bg); --mark-gap: #3d2e24;
    --header-tint: #1a130f;
    --page-ground: radial-gradient(70% 520px at 18% 0%, var(--tp-glow), transparent 70%),
      linear-gradient(180deg, #1c1410 0px, var(--bg) 720px, var(--bg) calc(100% - 900px), var(--bg-end) 100%);
    --page-foot: radial-gradient(70% 55% at 50% 108%, var(--tp-glow) 0%, transparent 70%);
  }
  html.tp-on[data-theme="dark"][data-tp-ground="dune"] {
    --bg: #1a1611; --bg-soft: #2e271d; --bg-end: #12100c; --surface: #241f18; --border: #3a3226; --border-strong: #574a38; --mark-gap: #3a3226;
    --header-tint: #1f1a14; --tp-glow: rgb(217 160 92 / .14);
    --page-ground: radial-gradient(70% 520px at 80% 0%, var(--tp-glow), transparent 70%), linear-gradient(180deg, #211b14 0px, var(--bg) 720px, var(--bg) calc(100% - 900px), var(--bg-end) 100%);
  }
  html.tp-on[data-theme="dark"][data-tp-ground="graphite"] {
    --bg: #18181b; --bg-soft: #2e2e33; --bg-end: #111113; --surface: #232326; --border: #3f3f46; --border-strong: #52525b; --mark-gap: #3f3f46;
    --header-tint: #1c1c1f; --tp-glow: rgb(161 161 170 / .08);
    --page-ground: linear-gradient(180deg, #1f1f23 0px, var(--bg) 720px, var(--bg) calc(100% - 900px), var(--bg-end) 100%);
  }
  html.tp-on[data-theme="dark"][data-tp-ground="noc"] {
    --bg: var(--night-900); --bg-soft: var(--night-700); --bg-end: var(--night-950); --surface: var(--night-800); --border: var(--night-600); --border-strong: var(--night-500); --mark-gap: var(--night-700);
    --header-tint: var(--night-900); --tp-glow: rgb(251 146 60 / .11);
    --page-ground: radial-gradient(60% 480px at 50% 0%, var(--tp-glow), transparent 70%), linear-gradient(180deg, var(--night-800) 0px, var(--bg) 720px, var(--bg) calc(100% - 900px), var(--bg-end) 100%);
  }
  html.tp-on .sky { display: none; }   /* the Night Ramp is NTpath's: TroublePath paints its own ground */
}
html.tp-on .site-header, html.tp-on .site-footer { display: none; }
html.tp-on .site-main { padding-top: 0; margin-top: 0; }
.tp-page { padding: 0 16px 64px; }
.tp-header { position: sticky; background: var(--header-tint, var(--bg)); }
.tp-brand { font-size: 1.3rem; }
.tp-nav { display: flex; flex: 1; flex-wrap: wrap; gap: 4px; min-width: 0; }
@media (max-width: 760px) {
  .tp-header { flex-wrap: wrap; }
  .tp-header .nt-end { margin-left: auto; }
  .tp-nav { order: 3; flex: 1 1 100%; flex-wrap: nowrap; overflow-x: auto; }
  .tp-nav a { white-space: nowrap; }
}
.tp-nav a { padding: 6px 12px; border-radius: 999px; color: var(--text-soft); font-weight: 500; font-size: .9rem; }
.tp-nav a:hover { color: var(--text); background: var(--bg-soft); text-decoration: none; }
.tp-nav a[aria-current="page"] { color: var(--accent); background: var(--accent-soft); font-weight: 600; }
.tp-look { position: absolute; right: 16px; top: calc(100% + 6px); z-index: 60; width: min(340px, calc(100vw - 32px)); padding: 14px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.tp-look-h { margin: 0 0 6px; color: var(--muted); font-size: .8rem; font-weight: 600; }
.tp-look-h + * { margin-bottom: 12px; }
.tp-look-row { display: flex; gap: 6px; }
.tp-look button { border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); color: var(--text); font: 500 .85rem var(--font); cursor: pointer; }
.tp-look-row button { flex: 1; padding: 6px 8px; }
.tp-look button[aria-checked="true"] { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.tp-look-grounds { display: grid; gap: 6px; }
.tp-look-grounds button { display: flex; align-items: center; gap: 10px; padding: 6px 8px; text-align: left; }
.tp-look-grounds button > span:last-child { display: flex; flex-direction: column; }
.tp-look-grounds .muted { font-size: .75rem; font-weight: 400; }
.tp-swatch { flex: none; width: 34px; height: 24px; border-radius: 6px; border: 1px solid var(--border); }
.tp-swatch-ember { background: radial-gradient(90% 90% at 20% 0%, rgb(249 115 22 / .55), transparent 70%), #fff7ed; }
.tp-swatch-dune { background: radial-gradient(90% 90% at 80% 0%, rgb(217 160 92 / .6), transparent 70%), #f8f3ea; }
.tp-swatch-graphite { background: linear-gradient(180deg, #fafafa, #a1a1aa); }
.tp-swatch-noc { background: radial-gradient(80% 80% at 50% 0%, rgb(251 146 60 / .55), transparent 70%), #121a2b; }

/* The way in from Labs: beside NTprompt's, the drawn TroublePath in a frame of the orange. */
.labs-intro > .lead { grid-row: span 2; }
.labs-intro > .nt-cta.tp-cta { grid-column: 2; }
@media (max-width: 760px) { .labs-intro > .lead { grid-row: auto; } .labs-intro > .nt-cta.tp-cta { grid-column: auto; } }
.tp-cta-btn { --wordmark-accent: #ea580c; --mark-accent: #f97316; border-color: #ea580c; }
.tp-cta-btn:is(:hover, :focus-visible) { background: #fff7ed; }
@media screen { :root[data-theme="dark"] .tp-cta-btn { --wordmark-accent: #fb923c; --mark-accent: #fb923c; border-color: #fb923c; } :root[data-theme="dark"] .tp-cta-btn:is(:hover, :focus-visible) { background: #3b1d0c; } }

/* Pages: a title bar, the readouts, a tab bar (the house segmented control) and bordered sections with a header strip
   holding tables (Juan, 2026-11-18: "a more corporate approach with tabs" in place of cards). */
.tp-pagehead { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 24px; padding: 28px 0 18px; border-bottom: 1px solid var(--border); margin-bottom: 20px; }
.tp-pagehead > div:first-child { flex: 1 1 32rem; min-width: 0; }
.tp-pagehead .eyebrow { margin: 0 0 4px; }
.tp-pagehead-lead { margin: 0; max-width: 56rem; color: var(--text-soft); }
.tp-title { margin: 0 0 8px; font-family: var(--font-display); font-size: clamp(1.6rem, 1.1rem + 1.4vw, 2.3rem); line-height: 1.1; letter-spacing: -.02em; }
.tp-help { margin: 0 0 10px; font-size: .9rem; }
.tp-mono { font-family: var(--mono); font-size: .8rem; }
.tp-readouts { margin-bottom: 18px; }
.tp-readouts .readout-value.is-text { font-size: 1.2rem; }
.tp-prio-counts li { display: inline-flex; align-items: center; gap: 6px; }
.tp-prio-counts { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 16px; margin: 0; padding: 0; list-style: none; font-variant-numeric: tabular-nums; }
.tp-tabbar { margin: 4px 0 14px; overflow-x: auto; scrollbar-width: none; }
.tp-tabbar::-webkit-scrollbar { display: none; }
.tp-tabbar a { flex: none; white-space: nowrap; }
.tp-count { display: inline-block; min-width: 1.5em; margin-left: 2px; padding: 0 6px; border-radius: 999px; background: color-mix(in srgb, currentColor 14%, transparent); font-size: .75em; font-weight: 700; text-align: center; font-variant-numeric: tabular-nums; }
.tp-tabpanel { display: grid; gap: 18px; min-width: 0; }

/* A section: a bordered box with a header strip (title, count, actions) and its body. */
.tp-sec { min-width: 0; margin: 0; padding: 0; border: 1px solid var(--border); border-radius: var(--radius); }   /* not overflow: hidden, so a type-ahead's list can leave it */
.tp-sec-h { border-radius: calc(var(--radius) - 1px) calc(var(--radius) - 1px) 0 0; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; padding: 10px 16px; border-bottom: 1px solid var(--border); background: color-mix(in srgb, var(--accent) 5%, var(--bg-soft)); }
.tp-sec-h h3 { margin: 0; font-size: 1rem; font-weight: 700; }
.tp-sec-act { display: flex; flex-wrap: wrap; gap: 8px; }
.tp-sec-b { padding: 14px 16px; min-width: 0; }
.tp-sec-b > :last-child { margin-bottom: 0; }
.tp-sec-foot { margin: 12px 0 0; font-size: .9rem; }
.tp-sub-h { margin: 14px 0 6px; font-size: .9rem; }
.tp-cols { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 18px; align-items: start; }
@media (max-width: 960px) { .tp-cols { grid-template-columns: minmax(0, 1fr); } }

/* Tables: dense, a header row in small capitals-free labels, rows divided by hairlines, a hover tint. */
.tp-table-wrap { margin: 0; }
.tp-sec-b > .tp-table-wrap:first-child { margin-top: -14px; }
.tp-sec-b > .tp-table-wrap { margin-left: -16px; margin-right: -16px; }
.tp-table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.tp-table th, .tp-table td { padding: 9px 12px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
.tp-table thead th { color: var(--muted); font-size: .78rem; font-weight: 700; white-space: nowrap; background: var(--surface); }
.tp-table tbody tr:last-child > * { border-bottom: 0; }
.tp-table tbody tr:hover { background: color-mix(in srgb, var(--accent) 4%, transparent); }
.tp-table tr.is-alert { box-shadow: inset 3px 0 0 var(--danger); background: color-mix(in srgb, var(--danger) 5%, transparent); }
.tp-table a { font-weight: 600; }
.tp-cell-title { min-width: 14rem; }
.tp-cell-title > :is(strong, a) { display: block; }
.tp-cell-sub { display: block; margin-top: 2px; color: var(--text-soft); font-size: .82rem; }
.tp-cell-sub-col { color: var(--text-soft); }
.tp-cell-act { width: 1%; white-space: nowrap; text-align: right; }
.tp-cell-sla { min-width: 11rem; }
.tp-sla-text { display: block; margin-bottom: 4px; font-size: .8rem; font-variant-numeric: tabular-nums; }
.tp-sla-text.is-over { color: var(--danger); font-weight: 700; }
.tp-num-cell { font-variant-numeric: tabular-nums; white-space: nowrap; }
.tp-num { font-family: var(--mono); font-size: .78rem; font-weight: 600; letter-spacing: .02em; white-space: nowrap; }
.tp-num.is-none { color: var(--muted); }
a.tp-num-link { text-decoration: none; }
.tp-flag-line { display: block; margin-top: 2px; font-size: .82rem; }
.tp-dl th { width: 11rem; color: var(--muted); font-weight: 600; white-space: nowrap; }
.tp-sec-b > .tp-dl:first-child { margin-top: -8px; }
.tp-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.tp-dl .tp-tags { margin-top: 0; }
.is-struck { text-decoration: line-through; color: var(--muted); }
@media (max-width: 760px) { .tp-opt { display: none; } .tp-cell-title { min-width: 10rem; } .tp-dl th { width: auto; } }
.tp-filter { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 0 0 12px; }

/* Priority: shape, word, colour. Status: words in a quiet tag. */
.tp-prio { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px 2px 6px; border: 1.5px solid currentColor; border-radius: 999px; font-size: .8rem; font-weight: 700; line-height: 1.4; white-space: nowrap; }
.tp-prio svg { width: 12px; height: 12px; fill: currentColor; }
.tp-prio-outage { color: var(--danger); }
.tp-prio-p1 { color: var(--warn); }
.tp-prio-p2 { color: var(--st-progress-ink); }
.tp-status { display: inline-block; padding: 1px 8px; border: 1px solid var(--border-strong); border-radius: 999px; color: var(--text-soft); font-size: .8rem; font-weight: 600; }
.tp-status-resolved, .tp-status-closed { color: var(--ok); border-color: currentColor; }
.tp-layer { display: inline-block; min-width: 2.2em; padding: 0 6px; border-radius: 6px; background: var(--accent-soft); color: var(--accent); font-size: .75rem; font-weight: 700; text-align: center; font-variant-numeric: tabular-nums; }
.tp-tag { display: inline-block; padding: 2px 9px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); font-size: .8rem; }
.tp-kind { color: var(--muted); font-size: .8rem; font-weight: 600; }
.tp-flag { color: var(--danger); font-weight: 700; }
.tp-score { margin-left: auto; font-weight: 700; font-variant-numeric: tabular-nums; }

/* The form: a menu of its sections beside it, one section shown at a time. Each section's node fills as it is done:
   green with a tick when complete, red with a ! when a required field is missing, hollow until visited; the word
   under the name says the same, so colour never carries it alone. */
.tp-new { display: grid; grid-template-columns: minmax(0, 200px) minmax(0, 1fr); gap: 22px; align-items: start; }
@media (max-width: 760px) { .tp-new { grid-template-columns: minmax(0, 1fr); } }
.tp-steps { position: sticky; top: 84px; }
.tp-steps ol { position: relative; display: grid; gap: 2px; margin: 0; padding: 0; list-style: none; }
.tp-steps li { position: relative; }
.tp-steps li + li::before { content: ""; position: absolute; left: 21px; top: -10px; height: 18px; border-left: 2px solid var(--border); }
.tp-steps button { display: flex; align-items: flex-start; gap: 10px; width: 100%; padding: 8px 10px; border: 1px solid transparent; border-radius: var(--radius-sm); background: none; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.tp-steps button:hover { background: var(--bg-soft); }
.tp-steps button.is-current { border-color: var(--border); background: var(--surface); box-shadow: var(--lit-shadow); }
.tp-step-txt { display: flex; flex-direction: column; min-width: 0; }
.tp-step-name { font-weight: 600; font-size: .92rem; }
.tp-step-state { color: var(--muted); font-size: .78rem; }
.tp-node { position: relative; flex: none; display: grid; place-items: center; width: 20px; height: 20px; margin-top: 1px; border: 2px solid var(--border-strong); border-radius: 50%; background: var(--surface); color: #fff; font-size: 12px; font-weight: 800; line-height: 1; }
[data-state="current"] .tp-node { border-color: var(--tp-orange); box-shadow: 0 0 0 3px var(--accent-soft); }
[data-state="done"] .tp-node { border-color: var(--ok); background: var(--ok); }
[data-state="done"] .tp-node::after { content: "✓"; }
[data-state="done"] .tp-step-state { color: var(--ok); }
[data-state="error"] .tp-node { border-color: var(--danger); background: var(--danger); }
[data-state="error"] .tp-node::after { content: "!"; }
[data-state="error"] .tp-step-state { color: var(--danger); font-weight: 700; }
[data-state="skipped"] .tp-node { border-style: dashed; }
@media (max-width: 760px) {
  .tp-steps { position: static; }
  .tp-steps ol { display: flex; overflow-x: auto; gap: 4px; padding-bottom: 4px; }
  .tp-steps li { flex: none; }
  .tp-steps li + li::before { display: none; }
  .tp-steps button { padding: 6px 8px; }
}
.tp-form { display: grid; gap: 18px; min-width: 0; }
fieldset.tp-step > legend.tp-sec-h { float: left; box-sizing: border-box; width: 100%; padding: 10px 16px; }
fieldset.tp-step > legend + * { clear: both; }
.tp-step-legend { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; }
.tp-step-n { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--accent); color: var(--on-accent); font-size: .75rem; }
.tp-step .tp-sec-b { display: grid; gap: 12px; }
.tp-step-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-top: 6px; padding-top: 12px; border-top: 1px solid var(--border); }
.tp-step-count { font-size: .82rem; }
/* Fields (ui_basics_rules.md): the label is one line, its words then "Required" on the same line, so fields side by
   side line up. A required field's box has the accent border (the word says it too) until it is filled, then both
   go; a refused one turns red and dashed, with the message under it. */
.tp-on .field > .tp-lab, .tp-on .field > label.tp-lab, .studio-on .field > .st-lab { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; min-height: 1.3em; line-height: 1.3; }
.tp-req, .st-req { color: var(--accent); font-size: .7rem; font-weight: 700; letter-spacing: .02em; text-transform: uppercase; }
:is(.tp-on, .studio-on) .field.is-req :where(input, select, textarea):where(:invalid) { border-color: var(--accent); box-shadow: inset 3px 0 0 var(--accent); }
/* Once a required field is filled, its box goes back to the plain border and "Required" goes away. */
:is(.tp-on, .studio-on) .field.is-req:has(:where(input, select, textarea):valid) :is(.tp-req, .st-req) { display: none; }
.tp-on .field :where(input, select, textarea)[aria-invalid="true"] { border-color: var(--danger); border-style: dashed; box-shadow: inset 3px 0 0 var(--danger); }
.tp-field-bare { display: inline-flex; }
.tp-mono-input { font-family: var(--mono); text-transform: uppercase; letter-spacing: .03em; }
.tp-mono-input::placeholder { text-transform: none; }
.tp-plain { min-width: 0; margin: 0; padding: 0; border: 0; }
.tp-label { margin-bottom: 6px; padding: 0; font-size: .85rem; font-weight: 600; }
.tp-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 600px) { .tp-two { grid-template-columns: minmax(0, 1fr); } }
.tp-prio-pick, .tp-method-pick { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 1240px) { .tp-prio-pick, .tp-method-pick { grid-template-columns: minmax(0, 1fr); } }
.tp-prio-card, .tp-method { position: relative; display: block; cursor: pointer; }
.tp-prio-card input, .tp-method input { position: absolute; opacity: 0; }
.tp-prio-card-in, .tp-method > span { display: flex; flex-direction: column; gap: 6px; height: 100%; padding: 10px 12px; border: 1.5px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); }
.tp-prio-card input:checked + .tp-prio-card-in, .tp-method input:checked + span { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.tp-prio-card input:focus-visible + .tp-prio-card-in, .tp-method input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 2px; }
.tp-prio-card .tp-prio { align-self: flex-start; }
.tp-prio-blurb { font-size: .85rem; color: var(--text-soft); }
.tp-prio-target { margin-top: auto; font-size: .8rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.tp-method .muted { font-size: .82rem; }
.tp-sys-table td { padding: 6px; }
.tp-sys-table :is(input, select) { width: 100%; min-width: 7rem; box-sizing: border-box; padding: 6px 8px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--surface); color: var(--text); font: inherit; }
.tp-sys-table tbody tr:hover { background: none; }
.tp-chip-table { display: grid; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.tp-chip-group { display: grid; grid-template-columns: minmax(0, 7.5rem) minmax(0, 1fr); gap: 6px 12px; align-items: start; padding: 8px 10px; }
.tp-chip-group + .tp-chip-group { border-top: 1px solid var(--border); }
.tp-chip-h { margin: 4px 0 0; color: var(--muted); font-size: .8rem; font-weight: 600; }
.tp-chip-list { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; }
@media (max-width: 600px) { .tp-chip-group { grid-template-columns: minmax(0, 1fr); } }
.tp-chip { position: relative; cursor: pointer; }
.tp-chip input { position: absolute; opacity: 0; }
.tp-chip span { display: inline-block; padding: 3px 10px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--surface); font-size: .82rem; }
.tp-chip input:checked + span { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.tp-chip input:checked + span::before { content: "✓ "; }
.tp-chip input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 2px; }
.tp-mini { margin: 0; padding-left: 1.2em; font-size: .88rem; }
.tp-mini li { margin: 4px 0; }
.tp-approach { margin: 0 0 12px; padding: 10px 12px; border-left: 3px solid var(--tp-orange); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; background: var(--info-bg); font-size: .9rem; }

/* The workspace: a title bar (number, priority, status, title, actions, the time to restore), an alert when another
   open case may be the same incident, then the tabs. */
.tp-casebar { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 24px; align-items: end; padding: 24px 0 14px; margin-bottom: 14px; border-bottom: 1px solid var(--border); }
.tp-casebar .tp-sla { grid-column: 1 / -1; max-width: 46rem; }
@media (max-width: 760px) { .tp-casebar { grid-template-columns: minmax(0, 1fr); } }
.tp-case-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 6px; }
.tp-case-meta .tp-num { font-size: .9rem; padding: 2px 8px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--surface); }
.tp-case-title { margin: 0; font-family: var(--font-display); font-size: clamp(1.4rem, 1rem + 1.2vw, 2rem); line-height: 1.15; letter-spacing: -.015em; }
.tp-case-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.tp-icon { width: 22px; height: 22px; }
.tp-brief { margin: 0 0 14px; }
.tp-alert { display: flex; gap: 12px; align-items: flex-start; margin: 0 0 14px; padding: 10px 14px; border: 1px solid var(--danger); border-left-width: 4px; border-radius: var(--radius-sm); background: color-mix(in srgb, var(--danger) 7%, var(--surface)); }
.tp-alert p { margin: 0; }
.tp-alert-mark { flex: none; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--danger); color: #fff; font-weight: 800; }
.tp-tabs { margin: 0 0 12px; }
.tp-inline { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; margin: 12px 0 0; }
.tp-inline-tight { margin: 0; }
.tp-inline-tight input { width: 12rem; padding: 4px 8px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--surface); color: var(--text); }
.tp-grow { flex: 1 1 14rem; min-width: 0; }
.tp-grow-full { flex-basis: 100%; margin: 0; }

/* Checks */
.tp-check-more { margin: 6px 0 0; font-size: .85rem; }
.tp-check-more summary { cursor: pointer; color: var(--link); font-weight: 600; }
.tp-cmd-os { margin: 8px 0 2px; color: var(--muted); font-size: .75rem; font-weight: 600; }
.tp-cmd { margin: 0; padding: 8px 10px; border-radius: var(--radius-sm); background: var(--code-bg); font: .75rem/1.5 var(--mono); white-space: pre-wrap; overflow-wrap: anywhere; }
.tp-check-act { display: inline-flex; flex-wrap: nowrap; justify-content: flex-end; align-items: center; gap: 6px; }
.tp-btn-pass:is(:hover, :focus-visible) { border-color: var(--ok); color: var(--ok); }
.tp-btn-fail:is(:hover, :focus-visible) { border-color: var(--danger); color: var(--danger); }
.tp-result { font-size: .8rem; font-weight: 700; white-space: nowrap; }
.tp-result-pass { color: var(--ok); }
.tp-result-fail { color: var(--danger); }
.tp-result-na { color: var(--muted); }
.tp-checks tr.is-pass { box-shadow: inset 3px 0 0 var(--ok); }
.tp-checks tr.is-fail { box-shadow: inset 3px 0 0 var(--danger); }
.tp-kind { color: var(--muted); font-size: .8rem; font-weight: 600; white-space: nowrap; }
.tp-flag { color: var(--danger); font-weight: 700; }
.tp-score { font-variant-numeric: tabular-nums; }
.btn.is-on { border-color: var(--ok); color: var(--ok); }
.tp-verdict { font-size: .8rem; font-weight: 700; white-space: nowrap; }
.tp-verdict-ruled-out { color: var(--muted); }
.tp-verdict-confirmed { color: var(--accent); }

/* RCA: the fishbone, 5 Whys, IS / IS NOT */
.tp-fb-wrap { overflow-x: auto; }
.fb { display: block; width: 100%; min-width: 720px; height: auto; font-family: var(--font); }
.fb-spine { stroke: var(--text); stroke-width: 4; fill: none; stroke-linecap: round; }
.fb-tail { stroke: var(--text); stroke-width: 3; fill: none; stroke-linecap: round; }
.fb-bone { stroke: var(--border-strong); stroke-width: 2.5; fill: none; }
.fb-rib { stroke: var(--border-strong); stroke-width: 1.4; fill: none; }
.fb-cat { cursor: pointer; }
.fb-cat rect { fill: var(--accent-soft); stroke: var(--accent); stroke-width: 1.2; }
.fb-cat text { fill: var(--accent); font-size: 13px; font-weight: 700; }
.fb-count { font-variant-numeric: tabular-nums; }
.fb-cat:is(:hover, :focus-visible) rect { fill: var(--surface); stroke-width: 2; }
.fb-cat:focus-visible, .fb-cause:focus-visible { outline: none; }
.fb-cause { cursor: pointer; }
.fb-cause text { fill: var(--text); font-size: 12.5px; }
.fb-cause:is(:hover, :focus-visible) text { fill: var(--accent); text-decoration: underline; }
.fb-cause.is-ruled-out text { fill: var(--muted); text-decoration: line-through; }
.fb-cause.is-ruled-out .fb-rib { stroke-dasharray: 4 3; }
.fb-cause.is-confirmed text { font-weight: 700; }
.fb-cause.is-confirmed .fb-rib { stroke: var(--tp-orange); stroke-width: 3; }
.fb-glyph { font-weight: 700; }
.fb-cause.is-confirmed .fb-glyph { fill: var(--tp-orange); }
.fb-more { fill: var(--muted); font-size: 12px; }
.fb-head path { fill: var(--surface); stroke: var(--tp-orange); stroke-width: 2.5; }
.fb-head text { fill: var(--text); font-size: 14px; font-weight: 600; }
.fb-head .fb-head-label { fill: var(--accent); font-size: 11px; font-weight: 700; letter-spacing: .04em; }
.tp-cause-add { align-items: flex-end; }
.tp-combo { position: relative; display: flex; flex-direction: column; }
.tp-combo-list { position: absolute; left: 0; right: 0; top: 100%; z-index: 40; max-height: 22rem; overflow-y: auto; margin: 4px 0 0; padding: 4px; list-style: none; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--surface); box-shadow: var(--shadow); }
.tp-combo-h { padding: 6px 8px 2px; color: var(--muted); font-size: .75rem; font-weight: 700; }
.tp-combo-list [role="option"] { display: flex; flex-direction: column; gap: 1px; padding: 6px 8px; border-radius: 6px; cursor: pointer; }
.tp-combo-list [role="option"]:hover, .tp-combo-list [aria-selected="true"] { background: var(--accent-soft); }
.tp-combo-list [aria-selected="true"] { outline: 2px solid var(--focus); outline-offset: -2px; }
.tp-co-text { font-size: .88rem; font-weight: 600; }
.tp-co-meta { color: var(--muted); font-size: .75rem; }
.tp-co-new { margin-top: 4px; border-top: 1px dashed var(--border); }
.tp-co-new .tp-co-text { color: var(--accent); }
.tp-likely { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 12px; }
.tp-likely-h { color: var(--muted); font-size: .8rem; font-weight: 700; }
.tp-chip-btn { padding: 3px 10px; border: 1px dashed var(--border-strong); border-radius: var(--radius-sm); background: var(--surface); color: var(--text); font: 500 .8rem var(--font); cursor: pointer; text-align: left; }
.tp-chip-btn:is(:hover, :focus-visible) { border-style: solid; border-color: var(--accent); color: var(--accent); }
.tp-causes tr.is-mine { box-shadow: inset 3px 0 0 var(--tp-orange); }
.tp-fb-text summary { margin: 10px 0 6px; cursor: pointer; color: var(--link); font-weight: 600; }
.tp-fb-list { margin: 0; padding-left: 1.2em; font-size: .9rem; }
.tp-fb-list li.is-ruled-out { text-decoration: line-through; color: var(--muted); }
.tp-fb-list li.is-confirmed { font-weight: 700; }
.tp-why-q { color: var(--muted); font-weight: 600; font-size: .9rem; }
.tp-kt th, .tp-kt td { padding: 6px; border: 1px solid var(--border); }
.tp-kt tbody tr:hover { background: none; }
.tp-kt textarea { width: 100%; min-width: 8rem; box-sizing: border-box; padding: 6px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); color: var(--text); font: inherit; resize: vertical; }

/* Resolution and the timeline. A timeline node is filled by what it records: a check passed green with a tick, failed
   (or the root cause found) red with a cross, other events hollow; the key under the title counts each. */
.tp-res { display: grid; gap: 10px; }
.tp-res-act { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 0; }
.tp-tl-key { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0 0 14px; padding: 0; list-style: none; color: var(--text-soft); font-size: .82rem; font-variant-numeric: tabular-nums; }
.tp-tl-key li { display: inline-flex; align-items: center; gap: 6px; }
.tp-timeline { position: relative; margin: 0; padding: 0; list-style: none; font-size: .88rem; }
.tp-timeline::before { content: ""; position: absolute; left: 9px; top: 6px; bottom: 6px; border-left: 2px solid var(--border); }
.tp-tl-item { position: relative; display: grid; grid-template-columns: 20px minmax(0, 11rem) minmax(0, 1fr); gap: 4px 12px; align-items: start; padding: 5px 0; }
@media (max-width: 600px) { .tp-tl-item { grid-template-columns: 20px minmax(0, 1fr); } .tp-tl-item .tp-tl-text { grid-column: 2; } }
.tp-tl-item time { color: var(--muted); font-variant-numeric: tabular-nums; }
.tp-tl-node { position: relative; display: inline-grid; place-items: center; flex: none; width: 20px; height: 20px; box-sizing: border-box; border: 2px solid var(--border-strong); border-radius: 50%; background: var(--surface); color: #fff; font-size: 11px; font-weight: 800; line-height: 1; }
.is-pass > .tp-tl-node { border-color: var(--ok); background: var(--ok); }
.is-fail > .tp-tl-node { border-color: var(--danger); background: var(--danger); }
.tp-tl-item.is-pass .tp-tl-text { color: var(--ok); font-weight: 600; }
.tp-tl-item.is-fail .tp-tl-text { color: var(--danger); font-weight: 600; }
@media screen { :root[data-theme="dark"] :is(.is-pass, .is-fail) > .tp-tl-node, :root[data-theme="dark"] :is([data-state="done"], [data-state="error"]) .tp-node { color: #111; } }
@media print { .tp-header, .tp-case-actions, .tp-check-act, .tp-inline, .tp-res-act, .tp-tabbar, .tp-steps { display: none; } .tp-sec { break-inside: avoid; } }

/* Premium tools (studio/shell.js; NTconfig, Juan 2026-11-26): a tool's window in place of NTpath's pages. Its header,
   a step menu and the work area use the whole width. Sections with a header strip hold tables, as TroublePath's, in
   NTpath's own colours. Meaning never by colour alone: step nodes and findings carry a shape and a word. */
html.studio-on .site-header, html.studio-on .site-footer { display: none; }
html.studio-on .site-main { padding-top: 0; margin-top: 0; }
.st-page { padding: 0 var(--header-gutter) 40px; }
.st-header { flex-wrap: wrap; margin: 0 calc(var(--header-gutter) * -1) 16px; padding: 10px var(--header-gutter); }
.st-brand { align-items: center; gap: 12px; text-decoration: none; }
.st-tool { padding-left: 12px; border-left: 1px solid var(--border-strong); font-family: var(--font-display); font-size: 1rem; font-weight: 700; white-space: nowrap; }
.st-center { display: flex; flex: 1; flex-wrap: wrap; align-items: center; gap: 8px; min-width: 0; }
.st-center select { max-width: min(18rem, 100%); min-width: 0; height: 2.1rem; padding: 0 8px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--surface); color: var(--text); font: inherit; font-size: .9rem; }
.st-save { color: var(--muted); font-size: .82rem; white-space: nowrap; }
.st-header .nt-end { flex: 0 1 auto; margin-left: auto; flex-wrap: wrap; justify-content: flex-end; min-width: 0; }
.st-theme svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.st-body { display: grid; grid-template-columns: 13rem minmax(0, 1fr); gap: 20px; align-items: start; }
.st-body.is-single { grid-template-columns: minmax(0, 1fr); }
.st-work { min-width: 0; }
.st-steps { position: sticky; top: 76px; display: grid; gap: 12px; }
.st-steps ol { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; }
.st-steps a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid transparent; border-radius: var(--radius); color: var(--text); text-decoration: none; }
.st-steps a:hover { background: var(--accent-soft); color: var(--text); text-decoration: none; }
.st-steps a[aria-current="step"] { border-color: var(--accent); background: var(--accent-soft); }
.st-node { display: grid; place-items: center; flex: none; width: 28px; height: 28px; border: 2px dashed var(--border-strong); border-radius: 50%; font-size: .8rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.st-steps a[data-state="done"] .st-node { border-style: solid; border-color: var(--ok); color: var(--ok); }
.st-steps a[data-state="warn"] .st-node { border-style: double; border-width: 4px; border-color: var(--warn); }
.st-steps a[data-state="error"] .st-node { border-style: solid; border-color: var(--danger); border-radius: 6px; color: var(--danger); }
.st-step-txt { display: grid; min-width: 0; }
.st-step-name { font-weight: 600; font-size: .92rem; }
.st-step-state { color: var(--muted); font-size: .78rem; }
.st-steps a[data-state="error"] .st-step-state { color: var(--danger); font-weight: 600; }
.st-preview-btn { justify-self: stretch; }
.st-pagehead { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 10px 20px; margin-bottom: 14px; }
.st-pagehead h2 { margin: 0 0 2px; }
.st-pagehead p { margin: 0; }
.st-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.st-start { margin: 12px 0 24px; }
.st-tabs { max-width: 100%; margin-bottom: 16px; overflow-x: auto; flex-wrap: nowrap; scrollbar-width: thin; }
.st-tabs > a { white-space: nowrap; }
.st-sec { margin: 0 0 16px; border: 1px solid var(--border); border-radius: var(--radius); background-color: var(--surface); min-width: 0; }
.st-sec-h { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 16px; border-bottom: 1px solid var(--border); }
.st-sec-h h2 { margin: 0; font-size: 1rem; }
.st-sec-act { display: flex; flex-wrap: wrap; gap: 8px; }
.st-sec-b { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; padding: 14px 16px; }
.st-sec-b > p { margin: 0; }
.st-sec-b > .btn { justify-self: start; }
.st-count { display: inline-block; min-width: 1.6em; padding: 0 6px; border: 1px solid var(--border); border-radius: 999px; color: var(--muted); font-size: .75rem; font-weight: 600; text-align: center; }
.st-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr)); gap: 12px 16px; align-items: start; }
.st-help { display: block; color: var(--muted); font-size: .78rem; font-weight: 400; line-height: 1.45; }
.st-page input:is([type="checkbox"], [type="radio"]) { width: 1rem; height: 1rem; accent-color: var(--accent); }
.st-check { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; }
.st-check input { margin-top: .3em; flex: none; }
.st-checks { display: grid; gap: 8px; }
.st-table-wrap { margin: 0 -16px; }
.st-sec-b > .st-table-wrap:first-child { margin-top: -14px; }
.st-sec-b > .st-table-wrap:last-child { margin-bottom: -14px; }
.st-table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.st-table :is(th, td) { padding: 6px 6px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: middle; }
.st-table :is(th, td):first-child { padding-left: 16px; }
.st-table thead th { color: var(--muted); font-size: .76rem; font-weight: 700; white-space: nowrap; }
.st-table tbody tr:last-child > * { border-bottom: 0; }
.st-table tbody tr:hover { background: color-mix(in srgb, var(--accent) 4%, transparent); }
.st-table tr.is-bad { box-shadow: inset 3px 0 0 var(--danger); background: color-mix(in srgb, var(--danger) 6%, transparent); }
.st-table :is(input:not([type="checkbox"]), select) { width: 100%; min-width: 5.5rem; height: 2.1rem; padding: 0 6px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--surface); color: var(--text); font: inherit; font-size: .82rem; }
.st-table :is(.st-wide) { min-width: 9.5rem; }
.st-table .st-remove { padding-inline: 8px; }
.st-table input.st-short { min-width: 3.8rem; width: 5rem; }
.st-table input.st-mono, .st-mono { font-family: var(--mono); font-size: .8rem; }
.st-table :is(input, select):focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
.st-remove { color: var(--muted); }
.st-via { display: grid; gap: 6px; min-width: 14rem; }
.st-units { color: var(--muted); font-size: .78rem; min-width: 10rem; }
.st-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.st-chip { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border: 1px solid var(--border); border-radius: 999px; font-size: .8rem; font-variant-numeric: tabular-nums; cursor: pointer; }
.st-chip:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.st-chip:has(input:disabled) { opacity: .55; cursor: default; }
.st-empty { margin: 0; }
.st-counts { margin: 0; }
.st-sev { white-space: nowrap; font-weight: 700; font-size: .82rem; }
.st-sev.is-error { color: var(--danger); }
.st-sev.is-warn { color: var(--warn); }
.st-sev.is-ok { color: var(--ok); }
.st-draft { color: var(--danger); }
.st-badge { display: inline-block; padding: 0 8px; border: 1px solid var(--border-strong); border-radius: 999px; font-size: .75rem; font-weight: 600; }
.st-badge.is-ok { border-color: var(--ok); color: var(--ok); }
.st-badge.is-part { border-color: var(--warn); color: var(--warn); }
.st-evidence { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; font-size: .88rem; }
.st-output { display: grid; grid-template-columns: 13rem minmax(0, 1fr); gap: 16px; align-items: start; }
.st-devices { position: sticky; top: 76px; }
.st-devices ul { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; max-height: calc(100vh - 96px); overflow: auto; }
.st-devices a { display: grid; padding: 8px 10px; border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text); text-decoration: none; font-size: .85rem; }
.st-devices a:hover { border-color: var(--accent); color: var(--text); text-decoration: none; }
.st-devices a[aria-current="true"] { border-color: var(--accent); background: var(--accent-soft); box-shadow: inset 3px 0 0 var(--accent); }
.st-config { min-width: 0; }
.st-config .code-block pre, .st-drawer .code-block pre { max-height: 65vh; overflow: auto; }
.st-plan h3 { margin: 18px 0 6px; font-size: 1rem; }
.st-plan .st-table-wrap { margin: 8px 0; }
.st-drawer { position: fixed; top: 0; right: 0; bottom: 0; z-index: 60; display: flex; flex-direction: column; width: min(36rem, 100%); border-left: 1px solid var(--border-strong); background: var(--bg); box-shadow: -12px 0 32px rgb(0 0 0 / .18); }
.st-drawer[hidden] { display: none; }
.st-drawer-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.st-drawer-h .field { flex: 1; min-width: 0; margin: 0; }
.st-drawer-b { flex: 1; min-height: 0; padding: 0 16px 16px; overflow: auto; }
.st-drawer .code-block pre { max-height: none; }
.st-intro > h2 { margin-bottom: 6px; }
.st-points { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr)); gap: 0 24px; margin: 16px 0 24px; padding: 0; list-style: none; }
.st-points li { display: grid; align-content: start; gap: 4px; padding: 14px 0; border-top: 1px solid var(--border); }
.st-points span { color: var(--text-soft); font-size: .92rem; }
@media (max-width: 900px) {
  .st-body, .st-output { grid-template-columns: minmax(0, 1fr); }
  .st-steps { position: static; min-width: 0; }
  .st-steps ol { grid-auto-flow: column; grid-auto-columns: max-content; overflow-x: auto; padding-bottom: 4px; }
  .st-devices { position: static; }
  .st-devices ul { grid-auto-flow: column; grid-auto-columns: max-content; overflow-x: auto; max-height: none; padding-bottom: 4px; }
}
@media (max-width: 600px) {
  .st-center { order: 3; flex-basis: 100%; }
  .st-tool { display: none; }
}
@media print {
  .st-header, .st-steps, .st-actions, .st-drawer, .st-tabs, .st-sec-act { display: none !important; }
  .st-body { grid-template-columns: minmax(0, 1fr); }
  .st-sec { border: 0; box-shadow: none; }
  .st-sec-b { padding: 0; }
  .st-table-wrap { margin: 0; overflow: visible; }
}
