/* =====================================================================
   Shared guide shell — STRUCTURE ONLY
   ---------------------------------------------------------------------
   This file holds no colour and no font. It consumes tokens that a theme
   file defines, so the same structure renders as any design.

   A THEME MUST BE LOADED FIRST — this file alone renders unstyled:

     <link rel="stylesheet" href="theme-google.css">    <!-- or theme-speedkit.css -->
     <link rel="stylesheet" href="shared.css">

   Adding a colour or font literal below re-breaks re-theming silently: the
   Google guide still looks correct, and only the other design shows the bug.
   ../check-theme.sh fails the build on any such literal — run it after edits.
   ===================================================================== */

/* ---------------------------------------------------------------------------
   STRUCTURAL TOKENS — these stay in shared.css when the themes split off.
   Layout is not a design choice a theme gets to make: both designs use the
   same grid, and a theme silently changing --sidebar-w would break the rail
   breakpoints that the navigation modes depend on.
   --------------------------------------------------------------------------- */
:root {
  --sidebar-w:     320px;
  --content-max:   800px;
  --main-max:      1240px;

  /* Tells the browser both schemes are supported, so form controls, native
     scrollbars and the canvas background follow the reader's setting instead
     of staying light under a dark page. Declared here rather than per theme
     because it is true of every theme by construction. */
  color-scheme: light dark;
}


/* ---------------------------------------------------------------------
   2. Reset + Base
   --------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
/* 125% root: 1rem = 20px body text (readability floor — nothing below 13px) */
html { font-size: 125%; scroll-behavior: smooth; scroll-padding-top: 2rem; }
body {
  font-family: var(--font-body);
  background: var(--surface);
  color: var(--grey-900);
  line-height: 1.65;
  font-weight: 400;
  letter-spacing: var(--tracking-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
/* Tracking is a theme decision, not a per-heading one: typefaces differ in
   how tightly they are drawn, so the theme sets it once for all headings. */
h1, h2, h3, h4, h5, h6 { letter-spacing: var(--tracking-heading); }
img { max-width: 100%; display: block; }
button { font: inherit; cursor: pointer; }
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}


/* ---------------------------------------------------------------------
   2b. Scroll-progress bar — pinned to the top of every page, fills left →
       right as the reader scrolls. Injected by shared.js. The fill itself is
       the --progress-fill theme token, not a colour decided here.
   --------------------------------------------------------------------- */
.scroll-progress {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 6px;
  z-index: 200;
  pointer-events: none;
  overflow: hidden;
  /* A visible track, not transparent: at 0% an invisible bar reads as "no bar
     here" rather than "nothing read yet". */
  background: var(--grey-300);
}
.scroll-progress > span {
  display: block;
  height: 100%;
  width: 100%;
  /* The fill is a single theme token, so a theme can be a four-stop brand
     stripe or a solid colour without either one touching this rule. */
  background: var(--progress-fill);
  transform: scaleX(0);
  transform-origin: left center;
  will-change: transform;
}
@media (prefers-reduced-motion: no-preference) {
  .scroll-progress > span {
    transition: transform 60ms linear;
  }
}


/* ---------------------------------------------------------------------
   3. Layout shell — sidebar + main
   --------------------------------------------------------------------- */
.layout {
  display: block;
  min-height: 100vh;
}

/* Top bar (mobile only) holds the hamburger toggle */
.topbar {
  display: none;
  position: sticky;
  top: 0;
  z-index: 80;
  background: var(--surface);
  border-bottom: 1px solid var(--grey-200);
  padding: 0.6rem 1rem;
  align-items: center;
  gap: 0.75rem;
}
.topbar .topbar-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--grey-900);
}

.sidebar-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--surface);
  border: 1px solid var(--grey-200);
  border-radius: var(--radius-sm);
  color: var(--grey-700);
  transition: background 0.15s ease, color 0.15s ease;
}
.sidebar-toggle:hover { background: var(--grey-100); color: var(--grey-900); }
.sidebar-toggle svg { width: 22px; height: 22px; }


/* ---------------------------------------------------------------------
   4. Sidebar
   --------------------------------------------------------------------- */
.sidebar {
  position: fixed;
  left: 0; top: 0;
  width: var(--sidebar-w);
  height: 100vh;
  background: var(--surface-alt);
  border-right: 1px solid var(--grey-200);
  overflow-y: auto;
  padding: 1.75rem 1rem 2rem;
  z-index: 100;
  transition: transform 0.25s ease;
  scrollbar-width: thin;
  scrollbar-color: var(--grey-500) transparent;
}
.sidebar::-webkit-scrollbar { width: 6px; }
.sidebar::-webkit-scrollbar-thumb { background: var(--grey-200); border-radius: 3px; }

.sidebar-header {
  padding: 0 0.5rem 1rem;
  border-bottom: 1px solid var(--grey-200);
  margin-bottom: 1rem;
}
.sidebar-header .eyebrow {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--grey-700);
  font-weight: 500;
  margin-bottom: 0.25rem;
}
.sidebar-header h2 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 500;
  line-height: 1.3;
  color: var(--grey-900);
}

.sidebar-nav { display: flex; flex-direction: column; gap: 1.1rem; }
.sidebar-section h3 {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--grey-700);
  font-weight: 500;
  margin-bottom: 0.35rem;
  padding: 0 0.6rem;
}
.sidebar-section ul { list-style: none; }
.sidebar-section a {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  padding: 0.4rem 0.65rem;
  font-size: 0.875rem;
  color: var(--grey-700);
  text-decoration: none;
  border-radius: var(--radius-sm);
  line-height: 1.35;
  transition: background 0.15s ease, color 0.15s ease;
}
.sidebar-section a:hover {
  background: var(--grey-100);
  color: var(--grey-900);
}
.sidebar-section a .num {
  flex-shrink: 0;
  min-width: 1.25rem;
  font-variant-numeric: tabular-nums;
  color: var(--grey-500);
  font-weight: 500;
  font-size: 0.8rem;
}

/* Active link state — every page marks its own self-link with aria-current="page".
   Using that attribute instead of a per-page list keeps this rule current as
   pages are added or renamed. */
.sidebar a[aria-current="page"] {
  background: var(--blue-bg);
  color: var(--blue-text);
  font-weight: 500;
}
.sidebar a[aria-current="page"] .num {
  color: var(--blue-text);
}

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--scrim);
  z-index: 90;
}
.sidebar-overlay.visible { display: block; }

/* Collapsible chapter groups — the default for every chapter rail; opt out with
   collapseGroups:false in guide.nav.js. Styled to match .sidebar-section h3
   exactly, so collapsing changes the affordance and not the look.

   Guides that style <details>/<summary> in their own content must scope those
   rules to .content, or they will restyle these summaries too. */
.sidebar-group { border: 0; background: none; padding: 0; margin: 0; }
.sidebar-group > summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--grey-700);
  font-weight: 500;
  margin-bottom: 0.35rem;
  padding: 0.3rem 0.6rem;
  border-radius: var(--radius-sm);
}
.sidebar-group > summary::-webkit-details-marker { display: none; }
.sidebar-group > summary::before {
  content: '▸';
  font-size: 0.85em;
  line-height: 1;
  transition: transform 0.15s ease;
}
.sidebar-group[open] > summary::before { transform: rotate(90deg); }
.sidebar-group > summary:hover { background: var(--grey-100); color: var(--grey-900); }

/* Single-rail mode: the left rail carries this page's sections, so its entries
   are scroll-spy anchors rather than page links. Same active look as a current
   page, since it means the same thing — "you are here". */
.sidebar-section a.active {
  background: var(--blue-bg);
  color: var(--blue-text);
  font-weight: 500;
}


/* ---------------------------------------------------------------------
   4b. On-this-page rail (right) — two-rail mode
   ---------------------------------------------------------------------
   A fixed overlay, deliberately NOT in layout flow: .main keeps its
   margin-left/max-width and the progress bar's getMinScale() stays correct.

   It appears only when the viewport can hold sidebar + content + rail without
   squeezing the text column: 320 (sidebar) + 48 (padding) + 800 (content) +
   48 (padding) + 220 (rail) + margin. Below that the rail is hidden and the
   inline .minitoc inside the text column takes over, so the section list is
   never desktop-only.
   --------------------------------------------------------------------- */
.pagetoc { display: none; }
.minitoc {
  display: block;
  margin: 1.5rem 0 2rem;
  padding: 1rem 1.15rem;
  background: var(--surface-alt);
  border: 1px solid var(--grey-200);
  border-radius: var(--radius-md);
}

@media (min-width: 1440px) {
  .pagetoc {
    display: block;
    position: fixed;
    top: 3rem;
    bottom: 1.5rem;
    left: calc(var(--sidebar-w) + 3rem + var(--content-max) + 2rem);
    width: 220px;
    z-index: 30;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--grey-300) transparent;
  }
  .pagetoc::-webkit-scrollbar { width: 6px; }
  .pagetoc::-webkit-scrollbar-thumb { background: var(--grey-300); border-radius: 3px; }
  /* One TOC at a time — the rail replaces the in-column box, never doubles it.
     Matched on .minitoc itself rather than as a child of .content: it only ever
     exists in two-rail mode, and a descendant-scoped rule silently misses when
     the box is nested. */
  .minitoc { display: none; }
}

.pagerail-toc .label,
.minitoc .label {
  display: block;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--grey-700);
  font-weight: 500;
  margin: 0 0 0.4rem 0.75rem;
}
.minitoc .label { margin-left: 0; }
.pagerail-toc ol,
.minitoc ol { list-style: none; margin: 0; padding: 0; }
.pagerail-toc li,
.minitoc li { margin: 0; }
.pagerail-toc a {
  display: block;
  padding: 0.35rem 0.75rem;
  border-left: 3px solid var(--grey-200);
  color: var(--grey-700);
  font-size: 0.875rem;
  line-height: 1.4;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}
.pagerail-toc a:hover { background: var(--grey-100); color: var(--grey-900); }
.pagerail-toc a.active {
  background: var(--blue-bg);
  color: var(--blue-text);
  border-left-color: var(--accent);
  font-weight: 500;
}
/* The negative margin keeps the text optically aligned with the rest of the
   rail while the hover background still has room to breathe around it. */
.minitoc a {
  display: block;
  padding: 0.2rem 0.5rem;
  margin-left: -0.5rem;
  border-radius: var(--radius-sm);
  color: var(--grey-700);
  font-size: 0.95rem;
  transition: background 0.15s ease, color 0.15s ease;
}
.minitoc a:hover { background: var(--grey-100); color: var(--grey-900); }
.minitoc a.active { color: var(--blue-text); font-weight: 500; }

/* Clicked anchors land clear of the top edge (and of the progress stripe).
   Kept well under the spy's 150px threshold so the clicked section is the one
   that highlights. */
.content h2, .content h3 { scroll-margin-top: 1.5rem; }


/* ---------------------------------------------------------------------
   5. Main content
   --------------------------------------------------------------------- */
.main {
  margin-left: var(--sidebar-w);
  max-width: var(--main-max);
  padding: 2.5rem 2.5rem 5rem;
}
.content {
  max-width: var(--content-max);
}
.content.wide {
  max-width: none;
}

@media (min-width: 1080px) {
  .main { padding-left: 3rem; padding-right: 3rem; }
}
@media (max-width: 1079px) {
  .topbar { display: flex; }
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .main { margin-left: 0; padding: 1.5rem 1.25rem 4rem; }
}
@media (max-width: 480px) {
  .main { padding: 1.25rem 1rem 3rem; }
}


/* ---------------------------------------------------------------------
   6. Typography
   --------------------------------------------------------------------- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  color: var(--grey-900);
  line-height: 1.2;
  font-weight: 500;
}
h1 {
  font-size: clamp(2rem, 4.5vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 0.75rem;
}
h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin: 2.5rem 0 0.75rem;
  letter-spacing: -0.005em;
}
h3 {
  font-size: 1.25rem;
  margin: 1.75rem 0 0.5rem;
}
h4 {
  font-size: 1rem;
  font-weight: 500;
  margin: 1.25rem 0 0.4rem;
  color: var(--grey-700);
}

/* A <section> owns the gap above itself, and whatever opens it contributes
   nothing extra. Without the second rule the two margins would compound to 5rem
   for a plain <section><h2>; without the first, a guide that wraps its heading
   in its own block — an icon plus a rule, say — zeroes the h2 margin and the
   heading ends up flush against the previous paragraph, which is how the Munich
   guide shipped. Direct children only, so nesting a section cannot double it. */
.content > section { margin-top: 2.5rem; }
.content > section > :first-child { margin-top: 0; }

p { margin-bottom: 1rem; }
strong { font-weight: 500; color: var(--grey-900); }
ul, ol { margin: 0.5rem 0 1.25rem 1.4rem; }
li { margin-bottom: 0.35rem; }

/* Inline links in prose underline on hover: colour alone is not a sufficient
   affordance (WCAG 1.4.1), so the underline stays where a link sits inside a
   sentence.

   A link that WRAPS BLOCK CONTENT is a different animal — a chapter tile, a
   card, a nav row, a TOC entry. There the whole surface is obviously clickable,
   and underlining every line inside it is noise: the tile in the sales guide
   hovered with its heading, its body copy AND all four sub-items underlined.
   That happened by accident, not by choice — `a:hover` (0,1,1) outranks a
   component's own `.chapter { text-decoration: none }` (0,1,0), so every block
   component had to defensively repeat the reset in its own :hover block, and
   any component that forgot silently got underlined.

   The :has() test makes it structural instead of defensive: if a link contains
   block content it is a block link, and it shows hover through its own surface
   — a background change on rails and rows, elevation on tiles. Components no
   longer need to repeat `text-decoration: none`. */
a { color: var(--accent); text-decoration: none; }

/* The underline is scoped to PROSE, and prose is `.content`. A blanket
   `a:hover { text-decoration: underline }` was the bug: it outranks a
   component's own `text-decoration: none` (0,1,1 beats 0,1,0), so every nav
   control had to re-declare the reset inside its own :hover, and the ones that
   forgot — the chapter tiles, the page rail, the sidebar rows — underlined.
   Scoping it here means navigation cannot opt in by accident: the sidebar and
   .prev-next sit outside .content, and .pagerail-toc is appended to <body>. */
.content a:hover { text-decoration: underline; }

/* Two things inside .content are still not prose links. A link that WRAPS
   BLOCK CONTENT is a tile or a card, where underlining every line inside it is
   noise; and .minitoc is navigation that merely happens to be injected into
   .content (see shared.js). Both show hover as a surface instead — a
   background change on rows and rails, elevation on tiles. */
.content a:has(h1, h2, h3, h4, h5, h6, p, ul, ol, dl, table, figure, div):hover,
.minitoc a:hover,
.subblock-strip a:hover {
  text-decoration: none;
}

/* Glossary cross-reference — subtle dotted underline so it reads as
   "definable term" without competing with normal links. */
a.glossary-link {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px dotted var(--grey-500);
  cursor: help;
}
a.glossary-link:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
  text-decoration: none;
}

hr {
  border: none;
  border-top: 1px solid var(--grey-200);
  margin: 2.5rem 0;
}


/* ---------------------------------------------------------------------
   7. Hero (landing + reusable)
   --------------------------------------------------------------------- */
.hero {
  position: relative;
  padding: 3.5rem 0 2.5rem;
  margin-bottom: 1rem;
}
.hero .eyebrow {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--grey-700);
  font-weight: 500;
  margin-bottom: 0.6rem;
}
.hero h1 { margin-bottom: 1rem; }
.hero .lede {
  font-size: 1.15rem;
  color: var(--grey-700);
  max-width: 640px;
  line-height: 1.55;
  margin-bottom: 1.75rem;
}


/* ---------------------------------------------------------------------
   8. Eyebrow + step badge + duration pill
   --------------------------------------------------------------------- */
.eyebrow {
  display: inline-block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--grey-700);
  font-weight: 500;
}
.step-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--on-accent);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  flex-shrink: 0;
}
.duration-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.65rem;
  background: var(--grey-100);
  color: var(--grey-700);
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 500;
}


/* Step page header — badge + duration pill on one row, title below */
.step-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0.5rem 0 0.85rem;
}
.step-header + h1 {
  margin: 0 0 1.25rem;
  font-size: clamp(1.75rem, 3.6vw, 2.5rem);
  line-height: 1.15;
}
.step-meta { display: none; }
.step-lede {
  font-size: 1.1rem;
  color: var(--grey-700);
  max-width: 640px;
  line-height: 1.55;
  margin-bottom: 1.5rem;
}


/* ---------------------------------------------------------------------
   9. Buttons
   --------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.7rem 1.25rem;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}
.btn:hover { text-decoration: none; }
.btn--primary {
  background: var(--accent);
  color: var(--on-accent);
}
.btn--primary:hover {
  background: var(--accent-hover);
  box-shadow: var(--shadow-card);
}
.btn--ghost {
  background: transparent;
  color: var(--accent);
  border-color: var(--grey-200);
}
.btn--ghost:hover {
  background: var(--grey-100);
  border-color: var(--grey-500);
}


/* ---------------------------------------------------------------------
   10. Callouts
   --------------------------------------------------------------------- */
.callout {
  border-left: 4px solid var(--grey-500);
  background: var(--surface-alt);
  padding: 1rem 1.25rem;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 1.5rem 0;
}
.callout > strong:first-child,
.callout > .callout-title {
  display: block;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1rem;
  margin-bottom: 0.4rem;
  color: var(--grey-900);
}
.callout p:last-child { margin-bottom: 0; }

.callout--info {
  border-left-color: var(--accent);
  background: var(--blue-bg);
}
.callout--info > strong:first-child,
.callout--info > .callout-title { color: var(--blue-text); }

.callout--warning {
  border-left-color: var(--warning);
  background: var(--yellow-bg);
}
.callout--warning > strong:first-child,
.callout--warning > .callout-title { color: var(--yellow-text); }

.callout--tip {
  border-left-color: var(--success);
  background: var(--green-bg);
}
.callout--tip > strong:first-child,
.callout--tip > .callout-title { color: var(--green-text); }

.callout--key {
  border-left: 4px solid var(--accent);
  background: var(--grey-100);
  padding: 1.25rem 1.5rem;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-card);
}
.callout--key > strong:first-child,
.callout--key > .callout-title {
  font-size: 1.1rem;
  color: var(--grey-900);
  margin-bottom: 0.6rem;
}


/* Pulse check — retrieval-practice beat, one per chapter (Adesope 2017,
   g=0.61). Question first, answer hidden behind <details>. */
.callout--pulse {
  border-left-color: var(--warning);
  background: var(--yellow-bg);
}
.callout--pulse > strong:first-child,
.callout--pulse > .callout-title {
  color: var(--yellow-text);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 500;
  margin-bottom: 0.55rem;
}
.callout--pulse details {
  margin-top: 0.75rem;
  border-top: 1px solid var(--warning-rule);
  padding-top: 0.6rem;
}
.callout--pulse summary {
  cursor: pointer;
  font-weight: 500;
  color: var(--blue-text);
  list-style: none;
  font-size: 0.92rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.callout--pulse summary::-webkit-details-marker { display: none; }
.callout--pulse summary::before {
  content: '▸';
  display: inline-block;
  transition: transform 0.15s ease;
}
.callout--pulse details[open] summary::before { transform: rotate(90deg); }
.callout--pulse details > :not(summary) { margin-top: 0.55rem; }
.callout--pulse details p:last-child { margin-bottom: 0; }


/* Pulse quiz — multi-question retrieval set (mirror open + close).
   Used at the start of step 1 and the end of step 7. */
.pulse-quiz {
  display: grid;
  gap: 0.85rem;
  margin: 0.5rem 0 0.25rem;
}
.pulse-quiz .pq-item {
  background: var(--surface);
  border: 1px solid var(--warning-border);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1rem;
}
.pulse-quiz .pq-item > p:first-child {
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--grey-900);
}
.pulse-quiz .pq-item summary {
  cursor: pointer;
  font-weight: 500;
  color: var(--blue-text);
  list-style: none;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.pulse-quiz .pq-item summary::-webkit-details-marker { display: none; }
.pulse-quiz .pq-item summary::before {
  content: '▸';
  display: inline-block;
  transition: transform 0.15s ease;
}
.pulse-quiz .pq-item details[open] summary::before { transform: rotate(90deg); }
.pulse-quiz .pq-item details > :not(summary) { margin-top: 0.5rem; }
.pulse-quiz .pq-item details p:last-child { margin-bottom: 0; }


/* Sub-block marker for a long step page broken into A/B/C parts.
   Used by the setup chapter. */
.subblock {
  margin: 2.75rem 0 0.5rem;
  padding: 0.75rem 1rem;
  background: var(--blue-bg);
  border-left: 4px solid var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  display: flex;
  align-items: baseline;
  gap: 0.85rem;
  flex-wrap: wrap;
}
.subblock .subblock-tag {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--blue-text);
  font-size: 1.05rem;
  letter-spacing: 0.02em;
}
.subblock h2 {
  margin: 0;
  font-size: 1.4rem;
  color: var(--grey-900);
}
.subblock-strip {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin: 1rem 0 1.75rem;
  font-size: 0.85rem;
}
.subblock-strip a,
.subblock-strip span {
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: var(--grey-100);
  color: var(--grey-700);
  text-decoration: none;
  font-weight: 500;
  border: 1px solid transparent;
}
.subblock-strip a:hover {
  background: var(--blue-bg);
  color: var(--blue-text);
  text-decoration: none;
}
.subblock-strip span[aria-current="step"] {
  background: var(--blue-bg);
  color: var(--blue-text);
  border-color: var(--accent);
}


/* ---------------------------------------------------------------------
   11. Code
   --------------------------------------------------------------------- */
code, kbd, samp, pre {
  font-family: var(--font-mono);
  font-size: 0.9em;
}
:not(pre) > code {
  background: var(--grey-100);
  color: var(--grey-900);
  padding: 0.12em 0.4em;
  border-radius: 4px;
  border: 1px solid var(--grey-200);
}
.code-block, pre {
  /* Its own token, not --grey-900. The code block is dark in BOTH colour
     schemes, so it must not ride the neutral ramp — that ramp inverts in dark
     mode, which would turn this white. It is the only place in the shell
     where a dark surface is intentional rather than scheme-dependent. */
  background: var(--code-bg);
  color: var(--code-fg);
  padding: 1rem 1.15rem;
  border-radius: var(--radius-sm);
  overflow-x: auto;
  font-size: 0.85rem;
  line-height: 1.55;
  margin: 1.25rem 0;
  position: relative;
}
.code-block code, pre code {
  background: none;
  border: none;
  padding: 0;
  color: inherit;
  font-size: inherit;
}

/* Copy button — injected by shared.js on every <pre class="code-block">. */
.copy-btn {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.85);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 6px;
  padding: 0.25rem 0.65rem;
  font-size: 0.72rem;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  letter-spacing: 0.02em;
  opacity: 0;
  transition: opacity 0.15s ease, background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.code-block:hover .copy-btn,
.code-block:focus-within .copy-btn,
.copy-btn:focus-visible { opacity: 1; }
.copy-btn:hover {
  background: rgba(255,255,255,0.14);
  border-color: rgba(255,255,255,0.35);
  /* --on-dark, NOT --on-accent. This button sits on the code block, which is
     dark in both schemes, whereas --on-accent inverts to a dark value in dark
     mode to stay legible on the lightened accent. Using it here would paint
     dark text on a dark surface — the hover state vanishes. */
  color: var(--on-dark);
}
.copy-btn--copied,
.copy-btn--copied:hover {
  background: var(--green-bg);
  color: var(--green-text);
  border-color: var(--green-text);
  opacity: 1;
}
@media (hover: none) {
  /* Touch devices: keep the button visible since there's no hover */
  .copy-btn { opacity: 0.85; }
}


/* ---------------------------------------------------------------------
   12. Tables
   --------------------------------------------------------------------- */
.table-wrap { overflow-x: auto; margin: 1.25rem 0 1.75rem; }
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  background: var(--surface);
  border: 1px solid var(--grey-200);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
th {
  background: var(--surface-alt);
  color: var(--grey-900);
  text-align: left;
  padding: 0.7rem 0.9rem;
  font-weight: 500;
  font-size: 0.82rem;
  border-bottom: 1px solid var(--grey-200);
}
td {
  padding: 0.75rem 0.9rem;
  border-bottom: 1px solid var(--grey-200);
  vertical-align: top;
  color: var(--grey-900);
}
tr:last-child td { border-bottom: none; }


/* ---------------------------------------------------------------------
   13. Step grid + step card
   --------------------------------------------------------------------- */
.step-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
  margin: 1.25rem 0 2rem;
}
.step-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--grey-200);
  border-radius: var(--radius-md);
  padding: 1.5rem 1.4rem 1.4rem;
  text-decoration: none;
  color: var(--grey-900);
  box-shadow: var(--shadow-card);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
  position: relative;
  overflow: hidden;
}
.step-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lift);
  border-color: var(--grey-200);
  text-decoration: none;
}
.step-card .step-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}
.step-card .step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--blue-bg);
  color: var(--blue-text);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
}
/* Color-coded variants for non-action blocks */
.step-card .step-num--green,  .agenda .step-num--green  { background: var(--green-bg);  color: var(--green-text); }
.step-card .step-num--red,    .agenda .step-num--red    { background: var(--red-bg);    color: var(--red-text); }
.step-card .step-num--yellow, .agenda .step-num--yellow { background: var(--yellow-bg); color: var(--yellow-text); }

/* Agenda table — replaces the workshop step grid on the home page */
.agenda {
  width: 100%;
  border-collapse: collapse;
  margin: 0.75rem 0 2rem;
}
.agenda tr { border-bottom: 1px solid var(--grey-200); }
.agenda tr:last-child { border-bottom: none; }
.agenda tr[data-href] {
  cursor: pointer;
  transition: background 0.15s ease;
}
.agenda tr[data-href]:hover { background: var(--surface-alt); }
.agenda tr[data-href]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}
.agenda td {
  padding: 1rem 0.85rem;
  vertical-align: top;
}
.agenda td:first-child { padding-left: 0.85rem; }
.agenda td:last-child  { padding-right: 0.85rem; }
.agenda-time {
  width: 6rem;
  white-space: nowrap;
}
.agenda-time .duration-pill {
  display: inline-block;
  background: var(--grey-100);
  color: var(--grey-900);
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.agenda-badge { width: 52px; }
.agenda-badge .step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--blue-bg);
  color: var(--blue-text);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
}
/* Color modifiers — must come after the default to win the cascade */
.agenda-badge .step-num--green  { background: var(--green-bg);  color: var(--green-text); }
.agenda-badge .step-num--red    { background: var(--red-bg);    color: var(--red-text); }
.agenda-badge .step-num--yellow { background: var(--yellow-bg); color: var(--yellow-text); }
.agenda-cell h3 {
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.3;
  margin: 0 0 0.3rem;
}
.agenda-cell h3 a {
  color: var(--grey-900);
  text-decoration: none;
}
.agenda-cell h3 a:hover { color: var(--accent); }
.agenda-cell h3 a::after {
  content: ' →';
  color: var(--accent);
  font-weight: 500;
  opacity: 0;
  transition: opacity 0.15s ease, transform 0.15s ease;
  display: inline-block;
}
.agenda-cell h3 a:hover::after,
.agenda tr[data-href]:hover .agenda-cell h3 a::after,
.agenda tr[data-href]:focus-visible .agenda-cell h3 a::after {
  opacity: 1;
  transform: translateX(2px);
}
.agenda-cell p {
  margin: 0;
  font-size: 0.875rem;
  color: var(--grey-700);
  line-height: 1.5;
}
@media (max-width: 720px) {
  .agenda tr {
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
    gap: 0.4rem 0.85rem;
    padding: 1rem 0;
  }
  .agenda td { padding: 0; display: block; }
  .agenda-badge { grid-column: 1; grid-row: 1; }
  .agenda-time  { grid-column: 1; grid-row: 2; }
  .agenda-cell  { grid-column: 2; grid-row: 1 / span 2; }
}

/* Passive tile — no link, no hover lift, muted CTA */
.step-card--passive {
  cursor: default;
  background: var(--surface-alt);
}
.step-card--passive:hover { transform: none; box-shadow: var(--shadow-card); }
.step-card--passive .step-card-foot { display: none; }
.step-card h3 {
  font-size: 1.1rem;
  margin: 0 0 0.4rem;
  font-weight: 500;
}
.step-card p {
  font-size: 0.9rem;
  color: var(--grey-700);
  margin: 0;
  line-height: 1.55;
}
.step-card .step-card-foot {
  margin-top: 1rem;
  font-size: 0.85rem;
  color: var(--accent);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}
.step-card .step-card-foot::after {
  content: '→';
  transition: transform 0.18s ease;
}
.step-card:hover .step-card-foot::after { transform: translateX(4px); }

/* Featured "start here" tile — bigger than a regular step card */
.featured-tile {
  display: flex;
  flex-direction: column;
  background: var(--featured-bg);
  /* --on-dark throughout this component: --featured-bg is a dark gradient in
     BOTH schemes, so its text must not follow --on-accent's inversion.
     Every foreground here is FULL --on-dark, never a reduced alpha. The
     gradient's light stop is only ~4.5:1 against white, so any alpha below 1
     drops that text under AA — measured 3.70:1 for the eyebrow at .85 and
     4.06:1 for the paragraph at .92, in BOTH schemes. Hierarchy on this tile
     is carried by size, weight and letter-spacing instead of by opacity. */
  color: var(--on-dark);
  border-radius: var(--radius-md);
  padding: 2rem 2rem 1.75rem;
  text-decoration: none;
  margin: 1.5rem 0 2.5rem;
  box-shadow: var(--shadow-card);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.featured-tile:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lift);
  text-decoration: none;
}
.featured-tile .ft-eyebrow {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--on-dark);
  font-weight: 500;
  margin-bottom: 0.5rem;
}
.featured-tile h2 {
  color: var(--on-dark);
  font-size: 1.6rem;
  margin: 0 0 0.5rem;
  font-weight: 500;
}
.featured-tile p {
  color: var(--on-dark);
  font-size: 0.98rem;
  line-height: 1.55;
  margin: 0 0 1rem;
  max-width: 560px;
}
.featured-tile .ft-meta {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  margin-bottom: 1rem;
}
.featured-tile .duration-pill {
  /* A BLACK veil, not a white one. The obvious move — lighten the pill so it
     lifts off the gradient — moves it TOWARDS its own white text: at 20% white
     this measured 3.27:1, worse than the 4.51:1 of the bare gradient behind it.
     Darkening separates the pill from the tile and from its text at once. */
  background: rgba(0, 0, 0, 0.22);
  color: var(--on-dark);
}
.featured-tile .ft-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--on-dark);
}
.featured-tile .ft-cta::after {
  content: '→';
  transition: transform 0.18s ease;
}
.featured-tile:hover .ft-cta::after { transform: translateX(4px); }


/* ---------------------------------------------------------------------
   14. Reference grid
   --------------------------------------------------------------------- */
.ref-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin: 1.25rem 0 2rem;
}
.ref-card {
  display: block;
  background: var(--surface-alt);
  border: 1px solid var(--grey-200);
  border-radius: var(--radius-sm);
  padding: 1.1rem 1.2rem;
  text-decoration: none;
  color: var(--grey-900);
  transition: background 0.15s ease, border-color 0.15s ease;
}
.ref-card:hover {
  background: var(--grey-100);
  border-color: var(--grey-500);
  text-decoration: none;
}
.ref-card h3 {
  font-size: 1rem;
  margin: 0 0 0.25rem;
  font-weight: 500;
}
.ref-card p {
  font-size: 0.875rem;
  color: var(--grey-700);
  margin: 0;
  line-height: 1.5;
}


/* ---------------------------------------------------------------------
   15. Prev / Next footer nav
   --------------------------------------------------------------------- */
.prev-next {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 3rem 0 0;
  border-top: 1px solid var(--grey-200);
  padding-top: 1.5rem;
}
.prev-next a {
  display: flex;
  flex-direction: column;
  padding: 1rem 1.15rem;
  background: var(--surface-alt);
  border: 1px solid var(--grey-200);
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--grey-900);
  transition: background 0.15s ease, border-color 0.15s ease;
}
.prev-next a:hover {
  background: var(--grey-100);
  border-color: var(--grey-500);
  text-decoration: none;
}
.prev-next .pn-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--grey-700);
  font-weight: 500;
  margin-bottom: 0.25rem;
}
.prev-next .pn-title {
  font-weight: 500;
  font-size: 0.95rem;
}
.prev-next .pn-next { text-align: right; }
@media (max-width: 600px) {
  .prev-next { grid-template-columns: 1fr; }
}


/* ---------------------------------------------------------------------
   16. Footer
   --------------------------------------------------------------------- */
.site-footer {
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid var(--grey-200);
  font-size: 0.875rem;
  color: var(--grey-700);
}
.site-footer p { margin-bottom: 0.4rem; }
.site-footer a { color: var(--grey-700); text-decoration: underline; }
.site-footer a:hover { color: var(--accent); }


/* ---------------------------------------------------------------------
   16a. Troubleshooting items — collapsible <details> blocks shared by
        the troubleshooting page and any inline "If something's still off"
        sections on step pages.
   --------------------------------------------------------------------- */
.ts-group { margin-top: 2rem; }
.ts-item {
  background: var(--surface-alt);
  border: 1px solid var(--grey-200);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1.1rem;
  margin: 0.6rem 0;
}
.ts-item[open] { background: var(--surface); box-shadow: var(--shadow-card); }
.ts-item summary {
  cursor: pointer;
  font-weight: 500;
  color: var(--grey-900);
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.ts-item summary::-webkit-details-marker { display: none; }
.ts-item summary::before {
  content: '+';
  display: inline-block;
  width: 1.1rem;
  color: var(--accent);
  font-weight: 700;
}
.ts-item[open] summary::before { content: '\2212'; }
.ts-body { padding-top: 0.6rem; color: var(--grey-900); }
.ts-body p { margin: 0.3rem 0; }
.ts-body p strong { color: var(--grey-700); font-weight: 500; }
.ts-body pre { margin: 0.5rem 0; }


/* ---------------------------------------------------------------------
   16a-2. Resource / index lists — used on the resources page and the
          troubleshooting index page.
   --------------------------------------------------------------------- */
.res-list { list-style: none; margin: 0.75rem 0 1.75rem; padding: 0; }
.res-list li {
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--grey-200);
}
.res-list li:last-child { border-bottom: none; }
.res-list a {
  font-weight: 500;
  color: var(--accent);
}
.res-list .res-note {
  display: block;
  color: var(--grey-700);
  font-size: 0.9rem;
  margin-top: 0.15rem;
}
.res-placeholder {
  color: var(--grey-700);
  font-style: italic;
}


/* ---------------------------------------------------------------------
   16b. Visuals — collapsible screenshot walkthrough block
   --------------------------------------------------------------------- */
.visuals {
  margin: 1.25rem 0 2rem;
  border: 1px solid var(--grey-200);
  border-radius: var(--radius-sm);
  background: var(--surface-alt);
  overflow: hidden;
}
.visuals > summary {
  cursor: pointer;
  padding: 0.85rem 1.1rem;
  font-weight: 500;
  color: var(--grey-900);
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.visuals > summary::-webkit-details-marker { display: none; }
.visuals > summary::before {
  content: '+';
  display: inline-block;
  width: 1.1rem;
  color: var(--accent);
  font-weight: 700;
}
.visuals[open] > summary::before { content: '\2212'; }
.visuals[open] > summary { border-bottom: 1px solid var(--grey-200); }
.visuals-grid {
  padding: 1rem;
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  background: var(--surface);
}
.visuals figure { margin: 0; }
.visuals figure img {
  width: 100%;
  height: auto;
  display: block;
  border: 1px solid var(--grey-200);
  border-radius: var(--radius-sm);
  background: var(--surface);
}
.visuals figcaption {
  font-size: 0.85rem;
  color: var(--grey-700);
  margin-top: 0.4rem;
  line-height: 1.4;
}
.visuals-attribution {
  font-size: 0.8rem;
  color: var(--grey-500);
  padding: 0 1rem 1rem;
  background: var(--surface);
}


/* ---------------------------------------------------------------------
   17. OS / variant tabs
   --------------------------------------------------------------------- */
.tabs {
  margin: 1.5rem 0 2rem;
  border: 1px solid var(--grey-200);
  border-radius: var(--radius-sm);
  background: var(--surface);
  overflow: hidden;
}
.tabs-nav {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--grey-200);
  background: var(--surface-alt);
  overflow-x: auto;
  scrollbar-width: none;
}
.tabs-nav::-webkit-scrollbar { display: none; }
.tab-btn {
  flex: 0 0 auto;
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  padding: 0.85rem 1.25rem;
  font: inherit;
  font-weight: 500;
  color: var(--grey-700);
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.tab-btn:hover {
  color: var(--grey-900);
  background: var(--accent-tint);
}
.tab-btn[aria-selected="true"] {
  color: var(--accent);
  border-bottom-color: var(--accent);
  background: var(--surface);
}
.tab-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}
.tab-panel {
  padding: 1.5rem;
}
.tab-panel[hidden] {
  display: none;
}
.tab-panel > :first-child { margin-top: 0; }
.tab-panel > :last-child { margin-bottom: 0; }


/* ---------------------------------------------------------------------
   18. Media — cards, photos, credits

   Generic picture-carrying components, first written for the Munich travel
   guide and lifted here because photos are a guide-wide capability, not a
   travel-guide quirk. Nothing in this section is domain-specific: a "place"
   card and a "tool" card are the same object with different words in it.

   Attribution is NOT optional decoration. A CC-licensed photo must carry its
   credit, so .credit is styled to stay legible rather than to disappear.
   --------------------------------------------------------------------- */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
  margin: 1.25rem 0 2rem;
}

/* Exactly four cards render 2x2, never 3+1 — an orphan on the second row
   reads as a mistake. Prefer counts of 2, 3, 4 or 6; rework content that
   lands on 5 or 7. */
.cards:has(> .card:nth-child(4):last-child) {
  grid-template-columns: repeat(2, 1fr);
}

.card {
  /* The padding is a variable because .card-photo bleeds to the card edge by
     cancelling it. Hardcoding both is how a photo ends up 2px off after
     someone adjusts the padding. */
  --card-pad: 1.15rem;

  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  background: var(--surface);
  border: 1px solid var(--grey-200);
  border-radius: var(--radius-md);
  padding: var(--card-pad);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}
.card > :first-child { margin-top: 0; }
.card > :last-child  { margin-bottom: 0; }
.card h3 { margin: 0; font-size: 1.25rem; }
.card p  { margin: 0; color: var(--grey-700); }

/* Full-bleed photo at the top of a card: grow by the padding on both sides,
   then pull back by it. Derived from --card-pad, so it cannot drift. */
.card-photo {
  display: block;
  width: calc(100% + 2 * var(--card-pad));
  margin: calc(-1 * var(--card-pad)) calc(-1 * var(--card-pad)) 0.25rem;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  background: var(--grey-100);
}
/* Squarer crop for subjects that a 16:10 letterbox decapitates — plated food,
   objects, portraits. */
.card-photo--square { aspect-ratio: 1 / 1; }

/* A photo inside running prose rather than in a card. */
.photo-inset {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: var(--radius-sm);
  background: var(--grey-100);
  margin: 0.75rem 0 0.35rem;
}

/* Photo attribution. 0.8125rem = 13px, the readability floor for ANY text in
   a guide — the original was 11px, which is unreadable for exactly the people
   most likely to need the licence information. Muted via a colour token, not
   via opacity: opacity would also fade the link underline. */
.credit,
.photo-credit {
  display: block;
  font-size: 0.8125rem;
  line-height: 1.4;
  color: var(--grey-700);
  margin: 0 0 0.5rem;
}
.credit a,
.photo-credit a { color: inherit; }

/* Below the card breakpoint a multi-column grid is unreadable — one column,
   and the 2x2 override above has to be undone or it survives into mobile. */
@media (max-width: 720px) {
  .cards,
  .cards:has(> .card:nth-child(4):last-child) {
    grid-template-columns: 1fr;
  }
}


/* ---------------------------------------------------------------------
   19. Reduced motion
   --------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition: none !important;
    animation: none !important;
    scroll-behavior: auto !important;
  }
}

/* ---------------------------------------------------------------------
   Wizard mode (setup page)
   Activated by JS on body[data-page="01-cloud"]; hides all steps except
   the active one, adds a sticky progress header and Next/Prev controls.
   --------------------------------------------------------------------- */
.wiz-progress {
  display: none;
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--surface);
  padding: 0.75rem 0;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--grey-200);
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
body.wizard-active .wiz-progress { display: flex; }
.wiz-progress-text {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--grey-700);
}

body.wizard-active .wiz-step { display: none; }
body.wizard-active .wiz-step.is-active { display: block; }

.wiz-controls {
  display: none;
  margin-top: 2.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--grey-200);
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
body.wizard-active .wiz-controls { display: flex; }
.wiz-controls .btn[disabled] {
  opacity: 0.4;
  pointer-events: none;
}
.wiz-back {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* ─────────────────────────────────────────────────────────────
   Pulse-check quiz (06-wrapup.html, rendered by quiz.js)
   ───────────────────────────────────────────────────────────── */
.quiz-root { margin: 1.5rem 0 2rem; }
.quiz-form { display: flex; flex-direction: column; gap: 1rem; }
.quiz-q {
  border: 1px solid var(--grey-200);
  border-radius: var(--radius-sm);
  padding: 1.25rem 1.5rem;
  margin: 0;
  background: var(--surface);
}
.quiz-legend {
  font-weight: 500;
  color: var(--grey-900);
  padding: 0 0.4rem;
  font-size: 1rem;
  line-height: 1.45;
}
.quiz-option {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  padding: 0.55rem 0.75rem;
  margin: 0.35rem 0 0;
  border-radius: 6px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background 0.12s ease, border-color 0.12s ease;
}
.quiz-option:hover { background: var(--surface-alt); }
.quiz-option input { margin: 0.25rem 0 0; flex-shrink: 0; }
.quiz-option-text { line-height: 1.45; color: var(--grey-900); }
.quiz-option.quiz-correct {
  background: var(--green-bg);
  border-color: var(--success);
}
.quiz-option.quiz-correct .quiz-option-text { color: var(--green-text); font-weight: 500; }
.quiz-option.quiz-incorrect {
  background: var(--red-bg);
  border-color: var(--danger);
}
.quiz-option.quiz-incorrect .quiz-option-text { color: var(--red-text); }
.quiz-option input:disabled { cursor: default; }
.quiz-option:has(input:disabled) { cursor: default; }
.quiz-result {
  margin-top: 0.85rem;
  padding: 0.75rem 1rem;
  border-left: 3px solid var(--accent);
  background: var(--blue-bg);
  border-radius: 0 6px 6px 0;
  font-size: 0.93rem;
  line-height: 1.5;
  color: var(--grey-900);
}
.quiz-verdict {
  font-weight: 500;
  margin-right: 0.35rem;
}
.quiz-verdict-ok { color: var(--green-text); }
.quiz-verdict-fail { color: var(--red-text); }
.quiz-verdict-skip { color: var(--grey-700); }
.quiz-submit {
  align-self: flex-start;
  margin-top: 0.5rem;
  background: var(--accent);
  color: var(--on-accent);
  border: none;
  padding: 0.7rem 1.4rem;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.98rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.05s ease;
}
.quiz-submit:hover:not(:disabled) { background: var(--accent-hover); }
.quiz-submit:active:not(:disabled) { transform: translateY(1px); }
.quiz-submit:disabled {
  background: var(--grey-200);
  color: var(--grey-700);
  cursor: not-allowed;
}
.quiz-score {
  margin-top: 0.5rem;
  padding: 1rem 1.25rem;
  background: var(--blue-bg);
  border-left: 4px solid var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 1.05rem;
  color: var(--grey-900);
}

/* ─────────────────────────────────────────────────────────────
   Section progress (opt-in: <body data-section-progress>)
   One checkable green circle per <h2> inside .content. Counter at the
   top of .content shows X of Y sections done; state persists in
   localStorage keyed per page.
   ───────────────────────────────────────────────────────────── */
.steps-check-input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 0;
  height: 0;
}
h2.section-progress-h2 {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}
.section-check {
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid var(--grey-500);
  background-color: var(--surface);
  background-position: center;
  background-repeat: no-repeat;
  background-size: 16px 16px;
  cursor: pointer;
  transition: background-color 140ms ease, border-color 140ms ease;
}
.section-check:hover { border-color: var(--success); }
.steps-check-input:focus-visible + .section-check {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.steps-check-input:checked + .section-check {
  background-color: var(--success);
  border-color: var(--success);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='5 12 10 17 19 8'/%3E%3C/svg%3E");
}
h2.section-progress-h2.is-done { color: var(--grey-700); }

.steps-counter {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.7rem 1rem;
  margin: 0 0 1.5rem;
  background: var(--surface-alt);
  border: 1px solid var(--grey-200);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  color: var(--grey-700);
}
.steps-counter-label {
  white-space: nowrap;
  font-weight: 500;
  color: var(--grey-900);
}
.steps-counter-label .steps-counter-done {
  color: var(--green-text);
}
.steps-counter-segments {
  flex: 1;
  display: flex;
  gap: 3px;
  min-width: 0;
}
.steps-counter-segments .seg {
  flex: 1 1 0;
  min-width: 12px;
  height: 12px;
  padding: 0;
  border: 0;
  border-radius: 3px;
  background: var(--grey-200);
  cursor: pointer;
  transition: background-color 140ms ease, transform 80ms ease;
}
.steps-counter-segments .seg:hover {
  transform: translateY(-1px);
}
.steps-counter-segments .seg:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.steps-counter-segments .seg.is-done {
  background: var(--success);
}
.steps-counter-segments .seg.is-passed {
  background: var(--danger);
}
.steps-counter-segments .seg.is-current {
  box-shadow: 0 0 0 2px var(--accent);
}
.steps-counter-reset {
  background: transparent;
  border: 0;
  padding: 0.2rem 0.4rem;
  font: inherit;
  font-size: 0.8rem;
  color: var(--grey-700);
  cursor: pointer;
  border-radius: 4px;
}
.steps-counter-reset:hover {
  color: var(--grey-900);
  background: var(--grey-100);
}
