  /* Inter, subset to latin and served from this site: no third-party request, no blocking round trip */
  @font-face { font-family: Inter; src: url("/assets/inter-400.c3dd2fcad5.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
  @font-face { font-family: Inter; src: url("/assets/inter-500.f4c6e03156.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
  @font-face { font-family: Inter; src: url("/assets/inter-600.3af1f40437.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
  @font-face { font-family: Inter; src: url("/assets/inter-700.170967abf9.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
  /* Arial stretched to Inter's metrics, so text does not jump when Inter arrives */
  @font-face { font-family: "Inter Fallback"; src: local("Arial"), local("Helvetica"); size-adjust: 107.4%; ascent-override: 90.2%; descent-override: 22.48%; line-gap-override: 0%; }

  /* detect brand palette: dark green for text and interface, red, orange, yellow, and green for the workflow */
  :root {
    --canvas: #ffffff; --canvas-subtle: #f5f7f5; --canvas-inset: #f1f4f1;
    --border: #d4dcd6; --border-muted: #e0e6e1;
    --fg: #16201a; --fg-muted: #546158; --fg-subtle: #5f6b63;
    --accent: #1d6b3a; --accent-fg: #1d6b3a; --accent-subtle: #e3f1e7;
    --success: #1a7f37; --attention: #9a6700; --neutral-muted: rgba(175,184,178,.2);
    --shadow: 0 8px 24px rgba(20,40,28,.14);
    --surface: #ffffff; --surface-2: #f5f7f5; --surface-line: #e4e9e5;
    --r-sm: 8px; --r-md: 12px; --r-lg: 18px; --r-pill: 999px;
    --sage: #2f7d4b; --sage-soft: rgba(47,125,75,.08); --tan: #9c5418; --tan-soft: rgba(232,135,58,.11);
    --l1: #C8414A; --l2: #E8873A; --l3: #3E9E63; --l4: #E3B23C; --warn: #9a6700;
    --brand-red: #A8303A; --brand-orange: #E8873A; --brand-yellow: #EDC24A; --brand-green: #3E9E63; --brand-ink: #141715;
    --brand-word: #1D4A2C; --glow: none; --glow-strong: none;
    --mark: var(--accent); --mark-soft: var(--accent-subtle);
    --bar: #3E9E63; --bar-2: rgba(22,32,26,.16); --loop: rgba(22,32,26,.5); --station-fill: #ffffff;
    --code-bg: var(--canvas-subtle); --row: var(--canvas-subtle); --hair: var(--border); --ink: var(--fg); --ink-2: var(--fg-muted); --ink-3: var(--fg-subtle); --bg: var(--canvas); --side: var(--canvas-subtle);
    --side-w: 296px; --rail-w: 224px; --content-w: 48rem;
    --field-border: #7a877e;   /* 3:1 against the page and the panels, so a form field's edge is visible */
    --lift: 0 6px 18px rgba(20,40,28,.09);
    --ease: cubic-bezier(.2,.7,.2,1);
  }
  :root[data-theme="dark"] {
    --canvas: #121413; --canvas-subtle: #181b19; --canvas-inset: #0e100f;
    --surface: #181b19; --surface-2: #1e2220; --surface-line: #272c29;
    --sage: #62CC86; --sage-soft: rgba(98,204,134,.09); --tan: #F29A52; --tan-soft: rgba(242,154,82,.11);
    --border: #29302b; --border-muted: #1f2421;
    --fg: #e7ece8; --fg-muted: #9aa59d; --fg-subtle: #818c84;
    --accent: #4fb874; --accent-fg: #62cc86; --accent-subtle: rgba(98,204,134,.13);
    --success: #3fb950; --attention: #d29922; --neutral-muted: rgba(110,122,114,.4);
    --shadow: 0 10px 30px rgba(0,0,0,.55);
    --brand-red: #E0575E; --brand-orange: #F29A52; --brand-yellow: #F2CF62; --brand-green: #62CC86;
    --brand-word: #3E9E63; --glow: 0 0 14px rgba(98,204,134,.28); --glow-strong: 0 0 22px rgba(98,204,134,.45);
    --bar: #62CC86; --bar-2: rgba(231,236,232,.20); --loop: rgba(231,236,232,.5); --station-fill: #0e100f;
    --code-bg: var(--canvas-subtle); --row: var(--canvas-subtle); --hair: var(--border); --ink: var(--fg); --ink-2: var(--fg-muted); --ink-3: var(--fg-subtle); --bg: var(--canvas); --side: var(--canvas-inset);
    --field-border: #6c7a71;
    --lift: 0 8px 22px rgba(0,0,0,.45);
  }
  @media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
      --canvas: #121413; --canvas-subtle: #181b19; --canvas-inset: #0e100f;
      --surface: #181b19; --surface-2: #1e2220; --surface-line: #272c29;
      --sage: #62CC86; --sage-soft: rgba(98,204,134,.09); --tan: #F29A52; --tan-soft: rgba(242,154,82,.11);
      --border: #29302b; --border-muted: #1f2421;
      --fg: #e7ece8; --fg-muted: #9aa59d; --fg-subtle: #818c84;
      --accent: #4fb874; --accent-fg: #62cc86; --accent-subtle: rgba(98,204,134,.13);
      --success: #3fb950; --attention: #d29922; --neutral-muted: rgba(110,122,114,.4);
      --shadow: 0 10px 30px rgba(0,0,0,.55);
      --brand-red: #E0575E; --brand-orange: #F29A52; --brand-yellow: #F2CF62; --brand-green: #62CC86;
      --brand-word: #3E9E63; --glow: 0 0 14px rgba(98,204,134,.28); --glow-strong: 0 0 22px rgba(98,204,134,.45);
      --bar: #62CC86; --bar-2: rgba(231,236,232,.20); --loop: rgba(231,236,232,.5); --station-fill: #0e100f;
      --code-bg: var(--canvas-subtle); --row: var(--canvas-subtle); --hair: var(--border); --ink: var(--fg); --ink-2: var(--fg-muted); --ink-3: var(--fg-subtle); --bg: var(--canvas); --side: var(--canvas-inset);
      --field-border: #6c7a71;
      --lift: 0 8px 22px rgba(0,0,0,.45);
    }
  }
  * { box-sizing: border-box; }
  html { background: var(--canvas); color: var(--fg); scroll-behavior: smooth; }
  body { margin: 0; font: 15px/1.6 Inter, "Inter Fallback", -apple-system, "Segoe UI", Helvetica, Arial, sans-serif; -webkit-font-smoothing: antialiased; }
  input:not([type="range"]):not([type="checkbox"]):not([type="radio"]):not([type="color"]), select, textarea { border-color: var(--field-border) !important; }
  a { color: var(--accent-fg); text-decoration: none; }
  a:hover { text-decoration: underline; text-underline-offset: 3px; }
  button { font: inherit; }
  :focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; box-shadow: var(--glow); }
  kbd { font: 11px/1 Inter, sans-serif; color: var(--fg-muted); border: 1px solid var(--border); border-bottom-width: 2px; border-radius: 4px; padding: 3px 5px; background: var(--canvas); }

  /* layout */
  .app { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); min-height: 100vh; }
  .side { position: sticky; top: 0; height: 100vh; overflow-y: auto; background: var(--side); border-right: 1px solid var(--border); padding: 16px 16px 24px; display: flex; flex-direction: column; gap: 14px; scrollbar-width: thin; z-index: 30; }
  .main { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) var(--rail-w); }
  .content { padding: 40px 48px 72px; max-width: calc(var(--content-w) + 96px); width: 100%; justify-self: center; }
  body.wide .main { grid-template-columns: minmax(0, 1fr); }
  body.wide .rail { display: none; }
  body.wide .content { max-width: 1600px; }
  .rail { position: sticky; top: 0; height: 100vh; overflow-y: auto; padding: 44px 20px 24px 8px; font-size: 12.5px; }

  /* top bar and scrim: only on narrow screens, where the sidebar becomes a drawer */
  .topbar { display: none; }
  .scrim { display: none; }

  @media (max-width: 1180px) { .main { grid-template-columns: minmax(0, 1fr); } .rail { display: none; } }
  @media (max-width: 768px) {
    .app { grid-template-columns: minmax(0, 1fr); }
    .side { position: fixed; inset: 0 auto 0 0; width: min(330px, 86vw); transform: translateX(-100%); transition: transform .22s ease; }
    .side.open { transform: none; box-shadow: 0 0 40px rgba(1,4,9,.25); }
    html { scroll-padding-top: 68px; }   /* the sticky top bar would cover a focused control or a jumped-to heading */
    .content h2, .content h3 { scroll-margin-top: 68px; }
    .content { padding: 0 18px 56px; }
    .topbar { display: flex; position: sticky; top: 0; z-index: 20; align-items: center; gap: 10px; margin: 0 -18px 18px; padding: 9px 14px; background: var(--canvas); border-bottom: 1px solid var(--border); }
    .scrim { display: block; position: fixed; inset: 0; background: rgba(1,4,9,.45); opacity: 0; pointer-events: none; transition: opacity .22s; z-index: 25; }
    .scrim.show { opacity: 1; pointer-events: auto; }
  }
  @media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition-duration: 0s !important; animation-duration: 0s !important; animation-iteration-count: 1 !important; }
    html { scroll-behavior: auto; }
    .pager a:hover { transform: none; }
  }

  /* motion: a page settles in as it loads, cards below the fold rise as they scroll into view, and anything clickable answers the pointer.
     Every rule here is cut to nothing by the reduced-motion block above, and the script adds .reveal only when motion is wanted. */
  .content > .page { animation: page-in .4s var(--ease) both; }
  @keyframes page-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
  .reveal { opacity: 0; transform: translateY(14px); transition: opacity .55s var(--ease), transform .55s var(--ease); transition-delay: calc(var(--i, 0) * 70ms); }
  .reveal.in { opacity: 1; transform: none; }
  @media print { .reveal { opacity: 1 !important; transform: none !important; } .content > .page { animation: none; } }
  .pager a, .stat, .dl a, .routes > div, .three > div, .parts a, .paths section, .phases > div, .practices .practice, .page-evidence .card, .lib .item > button.head
    { transition: border-color .2s var(--ease), transform .2s var(--ease), box-shadow .2s var(--ease), background-color .2s; }
  .dl a:hover, .parts a:hover, .practices .practice:hover, .pager a:hover { box-shadow: var(--lift); transform: translateY(-2px); }
  .routes > div:hover, .three > div:hover, .paths section:hover, .stat:hover { border-color: var(--fg-subtle); }
  button, .btn, [role="tab"] { transition: background-color .15s, border-color .15s, color .15s, transform .12s var(--ease), box-shadow .2s; }
  button:active:not(:disabled), .btn:active { transform: scale(.97); }
  nav.tree .items > a, nav.tree details > summary, .rail a, .toc-m a { transition: background-color .15s, color .15s, border-color .15s; }
  nav.tree details[open] > .items, .content details[open] > :not(summary), .toc-m[open] > nav { animation: unfold .22s var(--ease) both; }
  @keyframes unfold { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
  .search .results.show { animation: unfold .18s var(--ease) both; }
  .content h2 a.anchor, .content h3 a.anchor { transition: opacity .15s; }
  .content tbody tr:hover td { background: color-mix(in srgb, var(--accent-subtle) 60%, var(--canvas)); }
  /* a theme switch crossfades for a moment instead of snapping; the class lives for 350ms */
  html.theming, html.theming *, html.theming *::before, html.theming *::after { transition: background-color .3s, color .3s, border-color .3s, fill .3s, stroke .3s !important; }
  /* a thin bar across the top fills as the page is read; it needs a scroll-driven animation, so older browsers simply never show it */
  .progress { position: fixed; top: 0; left: 0; width: 100%; height: 3px; background: var(--accent); transform: scaleX(0); transform-origin: 0 50%; z-index: 70; pointer-events: none; }
  @supports (animation-timeline: scroll()) { .progress { animation: fill-across linear both; animation-timeline: scroll(root); } }
  @keyframes fill-across { from { transform: scaleX(0); } to { transform: scaleX(1); } }
  .totop { position: fixed; right: 18px; bottom: 18px; z-index: 50; width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--border); background: var(--surface); color: var(--fg-muted); box-shadow: var(--shadow); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; opacity: 0; transform: translateY(8px); transition: opacity .25s var(--ease), transform .25s var(--ease), color .15s, border-color .15s; }
  .totop.show { opacity: 1; transform: none; }
  .totop:hover { color: var(--accent-fg); border-color: var(--accent); }
  .totop svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; }
  @media (max-width: 768px) { .totop { right: 14px; bottom: 14px; } }
  @media (prefers-reduced-motion: reduce) { .totop { transition: none; } }

  /* second motion pass: scroll-driven reveals need no script, so they only run where animation-timeline is supported */
  ::selection { background: color-mix(in srgb, var(--brand-green) 35%, transparent); }
  :root[data-theme="dark"] { scrollbar-color: var(--border) var(--canvas); }
  :focus-visible { transition: outline-offset .15s var(--ease); }
  .content p a:not(.btn):not(.anchor), .content li a:not(.btn):not(.anchor), .content td a:not(.btn) { transition: text-decoration-color .15s, text-underline-offset .15s; }
  .content p a:not(.btn):hover, .content li a:not(.btn):hover, .content td a:not(.btn):hover { text-underline-offset: 5px; }
  @supports (animation-timeline: view()) { @media (prefers-reduced-motion: no-preference) {
    /* blocks of content rise as they enter from the bottom of the screen, and are at rest once a fifth of the way in */
    .content .table-wrap, .content .remember, .content .formula, .content pre, .content .dg, .content figure, .content .hint, .content .tpl, .content .poster
      { animation: rise linear both; animation-timeline: view(); animation-range: entry 0% entry 20%; }
    /* rows of a table fade in one after another the first time it is seen */
    .content .table-wrap tbody tr { animation: row-in linear both; animation-timeline: view(); animation-range: entry 0% entry 35%; }
    /* the top bar casts a shadow once the page has scrolled under it */
    .topbar { animation: shade linear both; animation-timeline: scroll(root); animation-range: 0 80px; }
    .content h2 { position: relative; }
    .content h2:not(.as-h3)::after { content: ""; position: absolute; left: 0; bottom: -1px; height: 2px; width: 100%; background: var(--accent); transform: scaleX(0); transform-origin: 0 50%;
      animation: draw-x linear both; animation-timeline: view(); animation-range: entry 0% entry 60%; }
  } }
  @keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
  @keyframes row-in { from { opacity: 0; } to { opacity: 1; } }
  @keyframes shade { from { box-shadow: none; } to { box-shadow: 0 6px 18px rgba(1,4,9,.12); } }
  @keyframes draw-x { from { transform: scaleX(0); } to { transform: scaleX(1); } }
  @media print { .content .table-wrap, .content .remember, .content pre, .content .dg, .content h2::after, .content tbody tr { animation: none !important; opacity: 1 !important; transform: none !important; } }
  .progress { background: linear-gradient(90deg, var(--brand-red), var(--brand-orange), var(--brand-yellow), var(--brand-green)); }
  .theme svg { transition: transform .45s var(--ease); }
  :root[data-theme="dark"] .theme svg { transform: rotate(180deg); }
  /* a sheen crosses a primary button on hover */
  .btn.primary { position: relative; overflow: hidden; }
  .btn.primary::after { content: ""; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 35%, rgba(255,255,255,.28) 50%, transparent 65%); transform: translateX(-120%); }
  .btn.primary:hover::after { animation: sheen .7s var(--ease) forwards; }
  @keyframes sheen { to { transform: translateX(120%); } }
  .pane.on { animation: unfold .25s var(--ease) both; }
  .search .results a { animation: unfold .25s var(--ease) both; }
  .search .results a:nth-child(2) { animation-delay: 30ms; } .search .results a:nth-child(3) { animation-delay: 60ms; } .search .results a:nth-child(4) { animation-delay: 90ms; } .search .results a:nth-child(5) { animation-delay: 120ms; } .search .results a:nth-child(n+6) { animation-delay: 150ms; }
  .content img { animation: fade-in .5s var(--ease) both; }
  @keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
  /* the lifecycle diagram draws itself the first time it scrolls into view: lines first, then each station pops into place.
     The script adds dg-run when motion is wanted; without it the diagram is simply drawn. */
  .dg.dg-run line { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw-line .7s var(--ease) forwards; }
  .dg.dg-run line:nth-of-type(2) { animation-delay: .1s; } .dg.dg-run line:nth-of-type(3) { animation-delay: .2s; } .dg.dg-run line:nth-of-type(4) { animation-delay: .3s; } .dg.dg-run line:nth-of-type(5) { animation-delay: .4s; } .dg.dg-run line:nth-of-type(6) { animation-delay: .5s; } .dg.dg-run line:nth-of-type(7) { animation-delay: .6s; }
  @keyframes draw-line { to { stroke-dashoffset: 0; } }
  .dg.dg-run .st, .dg.dg-run .cond { transform-box: fill-box; transform-origin: center; animation: pop .45s var(--ease) both; }
  .dg.dg-run .pulse { transform-box: fill-box; }
  .dg.dg-run .st:nth-of-type(1) { animation-delay: .05s; } .dg.dg-run .st:nth-of-type(2) { animation-delay: .15s; } .dg.dg-run .st:nth-of-type(3) { animation-delay: .25s; } .dg.dg-run .st:nth-of-type(4) { animation-delay: .35s; }
  .dg.dg-run .st:nth-of-type(5) { animation-delay: .45s; } .dg.dg-run .st:nth-of-type(6) { animation-delay: .55s; } .dg.dg-run .st:nth-of-type(7) { animation-delay: .65s; } .dg.dg-run .st:nth-of-type(8) { animation-delay: .75s; }
  @keyframes pop { from { opacity: 0; transform: scale(.4); } to { opacity: 1; transform: none; } }
  .dg .loop { animation: march 2.4s linear infinite; }
  @keyframes march { to { stroke-dashoffset: -18; } }
  /* a stat card's number settles in each time the tool redraws it */
  .stat b { animation: settle .35s var(--ease) both; }
  @keyframes settle { from { opacity: .3; transform: translateY(4px); } to { opacity: 1; transform: none; } }

  /* third motion pass: moving between pages, switching the theme, following an anchor, and the numbers a tool draws */
  /* a move to another page crossfades the content while the sidebar, the rail, and the progress bar stay where they are */
  @view-transition { navigation: auto; }
  .side { view-transition-name: side; }
  .rail { view-transition-name: rail; }
  .progress { view-transition-name: progress; }
  ::view-transition-old(root), ::view-transition-new(root) { animation-duration: .22s; }
  /* a theme switch spreads out from the Theme button; the script sets the centre and radius, and skips this without motion */
  html.theme-vt .side, html.theme-vt .rail, html.theme-vt .progress { view-transition-name: none; }
  html.theme-vt::view-transition-old(root) { animation: none; mix-blend-mode: normal; }
  html.theme-vt::view-transition-new(root) { animation: theme-reveal .55s var(--ease) both; mix-blend-mode: normal; }
  @keyframes theme-reveal { from { clip-path: circle(0 at var(--vx, 50%) var(--vy, 50%)); } to { clip-path: circle(var(--vr, 150vmax) at var(--vx, 50%) var(--vy, 50%)); } }
  /* the heading an anchor link lands on glows for a moment, so the eye finds it on a long page */
  .content :is(h2, h3, h4):target { animation: target-flash 1.8s var(--ease) both; border-radius: 6px; }
  @keyframes target-flash { 0%, 25% { background-color: color-mix(in srgb, var(--accent) 22%, transparent); box-shadow: 0 0 0 8px color-mix(in srgb, var(--accent) 22%, transparent); }
    100% { background-color: transparent; box-shadow: 0 0 0 8px transparent; } }
  /* a details block opens and closes at a measured pace where the browser can animate its height */
  @supports (interpolate-size: allow-keywords) {
    html { interpolate-size: allow-keywords; }
    .content details::details-content { block-size: 0; overflow-y: clip; transition: block-size .28s var(--ease), content-visibility .28s allow-discrete; }
    .content details[open]::details-content { block-size: auto; }
  }
  /* the back-to-top button wears a ring that fills as the page is read */
  @property --p { syntax: "<number>"; inherits: true; initial-value: 0; }
  .totop::before { content: ""; position: absolute; inset: -4px; border-radius: 50%; padding: 2px; background: conic-gradient(var(--accent) calc(var(--p) * 1%), transparent 0);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); mask-composite: exclude; pointer-events: none; }
  @supports (animation-timeline: scroll()) { .totop { animation: ring linear both; animation-timeline: scroll(root); } }
  @keyframes ring { from { --p: 0; } to { --p: 100; } }
  /* a stat's number counts up to its value: the element's own text is the final value from the first frame, for the live region and the screen reader,
     and the counting digits are drawn over it by the script through --shown */
  .stat b.counting { position: relative; color: transparent; }
  .stat b.counting::after { content: var(--shown, ""); position: absolute; inset: 0; color: var(--fg); }
  /* the lifecycle diagram, once drawn, sends one pulse along the track; each diamond ticks as the pulse passes */
  .dg .pulse { fill: var(--accent); opacity: 0; offset-rotate: 0deg; }
  .dg.dg-run .pulse { animation: travel 2.4s .9s cubic-bezier(.45, 0, .55, 1) both; }
  @keyframes travel { 0% { opacity: 0; offset-distance: 0%; } 6% { opacity: 1; } 94% { opacity: 1; } 100% { opacity: 0; offset-distance: 100%; } }
  .dg.dg-run .cond { animation: pop-cond .45s var(--ease) both, tick .5s var(--ease) both; animation-delay: .5s, calc(.9s + 2.4s * (var(--k, 0) + .5) / 7); }
  @keyframes pop-cond { from { opacity: 0; transform: rotate(45deg) scale(.4); } to { opacity: 1; transform: rotate(45deg) scale(1); } }
  @keyframes tick { 0%, 100% { transform: rotate(45deg) scale(1); } 50% { transform: rotate(45deg) scale(1.5); stroke: var(--accent); fill: var(--accent-subtle); } }
  @media (prefers-reduced-motion: reduce) {
    @view-transition { navigation: none; }
    .content details::details-content { transition: none; }
    .dg .pulse { display: none; }
  }

  .topbar button { display: inline-flex; align-items: center; gap: 7px; background: var(--canvas-subtle); border: 1px solid var(--border); border-radius: 6px; padding: 6px 11px 6px 9px; color: var(--fg); font-size: 14px; font-weight: 500; cursor: pointer; }
  .topbar button:hover { border-color: var(--fg-subtle); }
  .topbar .brand { display: inline-flex; align-items: center; gap: 7px; font-weight: 700; letter-spacing: .09em; font-size: 14px; color: var(--brand-word); }
  .topbar .brand svg { width: 22px; height: 22px; }
  .topbar button svg { stroke: var(--accent-fg); }
  .topbar .crumb { color: var(--fg-muted); font-size: 13px; margin-left: auto; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .topbar .find { padding: 6px 9px; }
  .topbar .find svg { stroke: var(--fg-muted); fill: none; stroke-width: 2; }

  /* sidebar */
  .brand-row { display: flex; align-items: center; gap: 10px; padding: 4px 8px 2px; }
  .brand-row a.wordmark { color: var(--brand-word); font-weight: 700; font-size: 16px; letter-spacing: .09em; display: flex; align-items: center; gap: 9px; }
  .brand-row a.wordmark:hover { text-decoration: none; }
  .brand-row a.sib, .topbar a.sib { font-size: 12px; color: var(--fg-muted); border: 1px solid var(--border); border-radius: 999px; padding: 1px 8px; white-space: nowrap; }
  .brand-row a.sib:hover, .topbar a.sib:hover { color: var(--accent-fg); border-color: var(--accent); text-decoration: none; }
  .brand-row .logo { width: 28px; height: 28px; flex: none; display: block; }
  .brand-row .ver { font-size: 12px; color: var(--fg-muted); border: 1px solid var(--border); border-radius: 999px; padding: 1px 8px; margin-left: auto; }
  .search { position: relative; }
  .search input { width: 100%; padding: 8px 34px 8px 32px; border: 1px solid var(--border); border-radius: var(--r-pill); background: var(--canvas); color: var(--fg); font-size: 14px; }
  .search input::placeholder { color: var(--fg-subtle); }
  .search > svg { position: absolute; left: 10px; top: 9px; width: 15px; height: 15px; stroke: var(--fg-subtle); fill: none; stroke-width: 2; }
  .search kbd { position: absolute; right: 7px; top: 6px; }
  .search .results { position: absolute; left: 0; right: 0; top: 42px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); box-shadow: var(--shadow); max-height: 60vh; overflow-y: auto; z-index: 40; display: none; }
  .search .results.show { display: block; }
  .search .results a { display: block; padding: 8px 12px; color: var(--fg); border-top: 1px solid var(--border-muted); }
  .search .results a:first-child { border-top: 0; }
  .search .results a:hover, .search .results a.active { background: var(--accent-subtle); text-decoration: none; }
  .search .results b { display: block; font-weight: 500; font-size: 13.5px; }
  .search .results small { color: var(--fg-muted); font-size: 12px; }
  .search .results .none, .search .results .count { padding: 8px 12px; color: var(--fg-muted); font-size: 12.5px; }
  .search .results .count { border-bottom: 1px solid var(--border-muted); }
  .search .results a.lib b { color: var(--accent-fg); }
  nav.tree { display: flex; flex-direction: column; gap: 2px; }
  nav.tree .glabel { display: flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--fg-subtle); padding: 12px 8px 4px; }
  nav.tree details.grp > summary { list-style: none; cursor: pointer; border-radius: 6px; }
  nav.tree details.grp > summary::-webkit-details-marker { display: none; }
  nav.tree details.grp > summary:hover { color: var(--fg); }
  nav.tree details.grp[data-here="1"] > summary { color: var(--accent-fg); }
  nav.tree details.grp > summary .chev { width: 11px; height: 11px; stroke: currentColor; fill: none; stroke-width: 2; transition: transform .15s; transform: rotate(-90deg); flex: none; }
  nav.tree details.grp[open] > summary .chev { transform: none; }
  @media (prefers-reduced-motion: reduce) { nav.tree .chev { transition: none; } }
  nav.tree .items { display: flex; flex-direction: column; border-left: 1px solid var(--border-muted); margin-left: 9px; }
  nav.tree .items > a { position: relative; display: flex; align-items: center; gap: 8px; padding: 5px 8px 5px 14px; margin-left: -1px; border-left: 2px solid transparent; border-radius: 0 6px 6px 0; color: var(--fg-muted); font-size: 14px; line-height: 1.4; }
  nav.tree .items > a:hover { background: var(--neutral-muted); color: var(--fg); text-decoration: none; }
  nav.tree .items > a[aria-current="page"] { background: var(--accent-subtle); color: var(--accent-fg); font-weight: 500; border-left-color: var(--accent); }
  nav.tree a.ext::after { content: "↗"; margin-left: auto; color: var(--fg-subtle); font-size: 12px; }
  nav.tree details.sub { margin-left: -1px; }
  nav.tree details.sub > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 6px; padding: 5px 8px 5px 14px; border-left: 2px solid transparent; border-radius: 0 6px 6px 0; color: var(--fg-muted); font-size: 14px; }
  nav.tree details.sub > summary::-webkit-details-marker { display: none; }
  nav.tree details.sub > summary:hover { background: var(--neutral-muted); color: var(--fg); }
  nav.tree details.sub[data-here="1"] > summary { color: var(--fg); font-weight: 500; }
  nav.tree details.sub .chev { width: 12px; height: 12px; stroke: var(--fg-subtle); fill: none; stroke-width: 2; transition: transform .15s; transform: rotate(-90deg); flex: none; }
  nav.tree details.sub[open] > summary .chev { transform: none; }
  nav.tree details.sub .items { margin-left: 20px; }
  nav.tree details.sub .items > a { font-size: 13.5px; }
  .side-foot a { color: inherit; }
  .side-foot { margin-top: auto; padding: 10px 8px 0; font-size: 12px; color: var(--fg-subtle); display: flex; justify-content: space-between; align-items: center; gap: 8px; border-top: 1px solid var(--border-muted); }
  .theme { display: inline-flex; align-items: center; gap: 6px; background: var(--canvas-subtle); border: 1px solid var(--border); border-radius: 6px; padding: 4px 10px; color: var(--fg); cursor: pointer; font-size: 12px; }
  .theme:hover { border-color: var(--fg-subtle); }

  /* content typography, GitHub markdown styling */
  .content a.term { color: inherit; text-decoration: underline dotted; text-decoration-color: var(--fg-subtle); text-underline-offset: 3px; }
  .content a.term:hover { color: var(--accent-fg); text-decoration-color: var(--accent-fg); }
  .content .remember { margin: 18px 0 22px; padding: 14px 18px 12px; border: 1px solid var(--border); border-left: 4px solid var(--sage); border-radius: 0 var(--r-lg) var(--r-lg) 0; background: var(--sage-soft); }
  .content .remember .rt { margin: 0 0 6px; font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--sage); }
  .content .remember ul { margin: 0; padding-left: 18px; }
  .content .remember li { margin: 5px 0; font-size: 14px; line-height: 1.5; }
  .content .remember li::marker { color: var(--sage); }
  .content .eyebrow { font-size: 12px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--sage); margin: 0 0 6px; }
  .content h2 .num, .content h3 .num { color: var(--fg-subtle); font-weight: 500; margin-right: 10px; font-variant-numeric: tabular-nums; }
  .content .formula { font: 14px/1.7 ui-monospace, "SF Mono", Menlo, Consolas, monospace; background: var(--canvas-subtle); border: 1px solid var(--border-muted); border-left: 3px solid var(--sage); border-radius: 0 var(--r-md) var(--r-md) 0; padding: 12px 16px; margin: 0 0 16px; }
  .content h1 { font-size: 2em; line-height: 1.25; font-weight: 600; letter-spacing: -0.01em; margin: 0 0 6px; padding-bottom: .3em; border-bottom: 1px solid var(--border); }
  .content .lead, .content .desc { font-size: 1.06rem; color: var(--fg-muted); margin: 12px 0 10px; max-width: 62ch; }
  .content .meta { font-size: 13px; color: var(--fg-subtle); margin: 0 0 26px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
  .content .meta .label { font-size: 11px; font-weight: 500; color: var(--accent-fg); border: 1px solid currentColor; border-radius: 999px; padding: 1px 8px; }
  .content h2 { font-size: 1.35rem; font-weight: 600; letter-spacing: -0.01em; margin: 40px 0 12px; padding-bottom: .3em; border-bottom: 1px solid var(--border-muted); scroll-margin-top: 24px; }
  .content h3, .content h2.as-h3 { font-size: 1.12rem; font-weight: 600; margin: 26px 0 8px; scroll-margin-top: 24px; }
  .content h2.as-h3 { padding: 0; border: 0; letter-spacing: 0; }
  /* links inside running text carry an underline, so they do not depend on color alone */
  .content p a:not(.btn):not(.anchor), .content li a:not(.btn):not(.anchor), .content dd a:not(.btn), .content td a:not(.btn) { text-decoration: underline; text-decoration-thickness: 1px; text-decoration-color: color-mix(in srgb, currentColor 45%, transparent); text-underline-offset: 3px; }
  .content p a:hover, .content li a:hover, .content dd a:hover, .content td a:hover { text-decoration-color: currentColor; }
  .content h2 a.anchor, .content h3 a.anchor { color: var(--fg-subtle); margin-left: 6px; opacity: 0; font-weight: 400; }
  .content h2:hover a.anchor, .content h3:hover a.anchor { opacity: 1; text-decoration: none; }
  @media (hover: none) { .content h2 a.anchor, .content h3 a.anchor { opacity: .45; } }
  /* the rail's contents, for screens too narrow to show the rail */
  .toc-m { display: none; margin: 0 0 22px; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface); font-size: 14px; }
  .toc-m summary { cursor: pointer; padding: 9px 14px; font-weight: 600; font-size: 13px; }
  .toc-m nav { padding: 2px 14px 10px; display: flex; flex-direction: column; }
  .toc-m a { color: var(--fg-muted); padding: 3px 0; }
  .toc-m a.h3 { padding-left: 14px; font-size: 13px; }
  @media (max-width: 1180px) { .toc-m { display: block; } }
  .content p { margin: 0 0 14px; max-width: 72ch; }
  .content ul, .content ol { padding-left: 1.6em; margin: 0 0 14px; max-width: 72ch; }
  .content li { margin: 4px 0; }
  .content li::marker { color: var(--fg-subtle); }
  .content code { font: 13px/1.5 ui-monospace, "SF Mono", Menlo, Consolas, monospace; background: var(--neutral-muted); padding: 2px 6px; border-radius: 6px; }
  .content pre { background: var(--canvas-subtle); border: 1px solid var(--border-muted); border-radius: var(--r-md); padding: 14px 16px; overflow-x: auto; margin: 0 0 16px; }
  .content pre code { background: none; padding: 0; }
  .content .table-wrap { overflow-x: auto; margin: 0 0 18px; position: relative; }   /* holds a header's visually hidden label inside the scroll box */
  .content table { border-collapse: separate; border-spacing: 0; font-size: 14px; width: max-content; max-width: 100%; border: 1px solid var(--border); border-radius: var(--r-md); overflow: hidden; }
  .content th, .content td { border-bottom: 1px solid var(--border); border-right: 1px solid var(--border); padding: 9px 14px; vertical-align: top; }
  .content th:last-child, .content td:last-child { border-right: 0; }
  .content tbody tr:last-child td { border-bottom: 0; }
  .content th { font-weight: 600; background: var(--canvas-subtle); text-align: left; }
  .content tr:nth-child(2n) td { background: var(--canvas-subtle); }
  .content hr { border: 0; border-top: 1px solid var(--border); margin: 28px 0; }
  .content strong { font-weight: 600; }
  .ov-kept { border: 1px solid var(--border); border-left: 3px solid var(--accent); border-radius: 0 8px 8px 0; padding: 4px 16px 10px; margin: 18px 0 8px; }
  .content .ov-kept h2 { margin: 12px 0 6px; font-size: 16px; border: 0; padding: 0; }
  .ov-kept ul { list-style: none; margin: 0; padding: 0; }
  .ov-kept li { display: flex; flex-wrap: wrap; gap: 2px 12px; padding: 5px 0; border-top: 1px solid var(--border-muted); font-size: 14.5px; }
  .ov-kept li a { font-weight: 600; flex: 0 0 15.5em; }
  .ov-kept li span { color: var(--fg-muted); }
  .ov-kept p { font-size: 13px; color: var(--fg-muted); margin: 10px 0 0; }
  .ov-kept button { font: inherit; font-size: 13px; margin-right: 8px; padding: 3px 10px; border: 1px solid var(--border); border-radius: 6px; background: var(--canvas); color: var(--fg); cursor: pointer; }
  .content .kept { font-size: 13.5px; color: var(--fg-muted); border: 1px solid var(--border); border-left: 3px solid var(--accent); border-radius: 0 6px 6px 0; padding: 6px 10px; margin: 0 0 14px; max-width: 62ch; }
  .content .kept button { font: inherit; font-size: 13px; margin-left: 6px; padding: 2px 9px; border: 1px solid var(--border); border-radius: 6px; background: var(--canvas); color: var(--fg); cursor: pointer; }
  .content .foot { margin-top: 36px; font-size: 13px; color: var(--fg-subtle); }
  .hint { border-left: 3px solid var(--accent); background: var(--accent-subtle); padding: 12px 16px; border-radius: 0 var(--r-md) var(--r-md) 0; margin: 0 0 18px; max-width: 72ch; }
  .hint.warn { border-color: var(--attention); background: rgba(210,153,34,.12); }
  .hint p:last-child { margin-bottom: 0; }

  /* prev / next, GitHub card style */
  .pager { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--border); }
  .pager a { display: block; border: 1px solid var(--border); border-radius: var(--r-md); padding: 14px 18px; color: var(--fg); background: var(--surface); transition: border-color .15s, transform .15s; }
  .pager a:hover { border-color: var(--accent); text-decoration: none; transform: translateY(-1px); }
  .pager a small { display: block; font-size: 12px; color: var(--fg-subtle); margin-bottom: 2px; }
  .pager a.next { text-align: right; }
  .pager a b { font-weight: 500; color: var(--accent-fg); }
  .pager a b::before, .pager a b::after { display: inline-block; transition: transform .2s var(--ease); }
  .pager a.prev b::before { content: "\2190\00a0"; }
  .pager a.next b::after { content: "\00a0\2192"; }
  .pager a.prev:hover b::before { transform: translateX(-3px); }
  .pager a.next:hover b::after { transform: translateX(3px); }
  @media (max-width: 560px) { .pager { grid-template-columns: 1fr; } .pager a.next { text-align: left; } }

  /* right rail */
  .rail span.rail-title { display: block; font-weight: 600; color: var(--fg); font-size: 12px; margin-bottom: 8px; }
  .rail a { display: block; color: var(--fg-muted); padding: 4px 0 4px 10px; border-left: 2px solid var(--border-muted); line-height: 1.4; }
  .rail a.h3 { padding-left: 22px; }
  .rail a.active { color: var(--accent-fg); border-left-color: var(--accent); }
  .rail a:hover { color: var(--fg); text-decoration: none; }


  /* stat cards: a large numeral over a quiet label */
  .stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 18px 0 8px; }
  .stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 16px 18px; }
  .stat b { display: block; font-size: 30px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.05; font-variant-numeric: tabular-nums; }
  .stat span { display: block; font-size: 12.5px; color: var(--fg-muted); margin-top: 6px; }
  .stat.accent b { color: var(--sage); }

  /* progress ring */
  .ring { display: flex; align-items: center; gap: 14px; }
  .ring svg { width: 74px; height: 74px; flex: none; transform: rotate(-90deg); }
  .ring .track { stroke: var(--border); }
  .ring .fill { stroke: var(--sage); stroke-linecap: round; transition: stroke-dasharray .3s; }
  .ring .over .fill, .ring svg.over .fill { stroke: var(--tan); }
  .ring .pct { font-size: 16px; font-weight: 600; fill: var(--fg); transform: rotate(90deg); transform-origin: center; }
  .ring .cap b { display: block; font-size: 15px; font-weight: 600; }
  .ring .cap span { font-size: 13px; color: var(--fg-muted); }

  /* vertical timeline with linked dots */
  .timeline { list-style: none; padding: 0; margin: 14px 0 6px; }
  .timeline li { position: relative; padding: 0 0 18px 34px; }
  .timeline li::before { content: ""; position: absolute; left: 9px; top: 20px; bottom: -2px; width: 1px; background: var(--border); }
  .timeline li:last-child { padding-bottom: 0; }
  .timeline li:last-child::before { display: none; }
  .timeline li::after { content: ""; position: absolute; left: 0; top: 3px; width: 19px; height: 19px; border-radius: 50%; border: 1.5px solid var(--border); background: var(--surface); }
  .timeline li.done::after { border-color: var(--sage); background: var(--sage-soft); }
  .timeline li.now::after { border-color: var(--sage); box-shadow: inset 0 0 0 4px var(--sage); }
  .timeline li b { font-weight: 600; }

  /* pill segmented control */
  .pill-seg { display: inline-flex; flex-wrap: wrap; gap: 4px; background: var(--canvas-subtle); border: 1px solid var(--border); border-radius: var(--r-pill); padding: 3px; max-width: 100%; }
  .pill-seg button { border: 0; background: none; padding: 5px 14px; border-radius: var(--r-pill); font-size: 13px; color: var(--fg-muted); cursor: pointer; }
  .pill-seg button[aria-pressed="true"] { background: var(--sage-soft); color: color-mix(in srgb, var(--sage) 72%, var(--fg)); font-weight: 600; }
  .pill-seg button:hover { color: var(--fg); }

  .skip { position: absolute; left: -9999px; top: 8px; z-index: 60; background: var(--surface); border: 1px solid var(--accent); border-radius: var(--r-md); padding: 8px 14px; }
  .skip:focus { left: 8px; }

  /* the lifecycle poster ships in two themes; show the one that matches */
  .poster img { width: 100%; height: auto; border: 1px solid var(--border); border-radius: var(--r-md); display: block; }
  .poster img.dark { display: none; }
  :root[data-theme="dark"] .poster img.light { display: none; }
  :root[data-theme="dark"] .poster img.dark { display: block; }
  @media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .poster img.light { display: none; }
    :root:not([data-theme="light"]) .poster img.dark { display: block; }
  }

  @media print {
    .side, .rail, .topbar, .pager, .scrim, .skip { display: none !important; }
    .app, .main { display: block; }
    .content { max-width: none; padding: 0; }
    a { color: inherit; text-decoration: none; }
    .content a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 11px; color: #555; }
    .content h2, .content h3 { page-break-after: avoid; }
    table, .verdict, .stat, .levers { page-break-inside: avoid; }
    .poster img.dark { display: none !important; }
    .hero { background: none !important; border: 1px solid #ccc !important; color: #000 !important; }
    .hero h1, .hero .lead { color: #000 !important; }
    .hero .cta, .ribbon .pulse { display: none !important; }
    .hero .flow { background: #141715; border-radius: 12px; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  }

  .content .pair { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 2px 0 14px; padding: 6px 12px; border: 1px solid var(--border); border-radius: var(--r-pill); background: var(--surface); font-size: 13px; }
  .content .pair span { color: var(--fg-muted); }
  .content .pair a { font-weight: 600; }
  .content .pair a, .content .phase-tag a { text-decoration: none !important; }
  .content .pair a::after { content: " \2192"; }
  .page-404 > .logo { display: block; margin: 12px 0 18px; }


/* workflow colors as text: a darker shade of the same hue on the light theme, so small labels keep 4.5:1 on white */
[style*="--c:"] { --c-text: color-mix(in srgb, var(--c) 58%, #000); }
:root[data-theme="dark"] [style*="--c:"] { --c-text: color-mix(in srgb, var(--c) 78%, #fff); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) [style*="--c:"] { --c-text: color-mix(in srgb, var(--c) 78%, #fff); } }
.pring { display: inline-flex; align-items: center; justify-content: center; flex: none; border-radius: 50%; box-sizing: border-box; aspect-ratio: 1;
  color: var(--c); border: 2px solid var(--c); box-shadow: inset 0 0 0 4px var(--canvas), inset 0 0 0 5px color-mix(in srgb, var(--c) 40%, transparent); }
span.pring > svg { width: 48%; height: 48%; max-width: none; margin: 0; display: block; }
.phase-tag .pring { border-width: 1.5px; box-shadow: none !important; }
.phase-tag .pring > svg { width: 60%; height: 60%; }
:root[data-theme="dark"] .pring { box-shadow: inset 0 0 0 4px var(--canvas), inset 0 0 0 5px color-mix(in srgb, var(--c) 40%, transparent), 0 0 18px color-mix(in srgb, var(--c) 45%, transparent); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .pring { box-shadow: inset 0 0 0 4px var(--canvas), inset 0 0 0 5px color-mix(in srgb, var(--c) 40%, transparent), 0 0 18px color-mix(in srgb, var(--c) 45%, transparent); } }

.ribbon { width: 100%; height: auto; display: block; }
.ribbon .ph { font: 700 17px/1 Inter, sans-serif; letter-spacing: .12em; }
.ribbon .st { font: 500 15px/1 Inter, sans-serif; fill: rgba(232,236,233,.66); }
.ribbon a.phl { cursor: pointer; }
.ribbon a.phl:hover .ph, .ribbon a.phl:focus-visible .ph { text-decoration: underline; text-underline-offset: 4px; }
.ribbon a.phl:hover .st, .ribbon a.phl:focus-visible .st { fill: rgba(232,236,233,.92); }
.ribbon a.phl:focus-visible { outline: 2px solid #fff; outline-offset: 4px; }
@media (max-width: 640px) { .ribbon .ph { font-size: 30px; } .ribbon .st { display: none; } }
.ribbon .pulse { animation: rb-pulse 7s linear infinite; }
@keyframes rb-pulse { from { stroke-dashoffset: 1000; } to { stroke-dashoffset: 0; } }
.ribbon .glow { animation: rb-breathe 6s ease-in-out infinite; }
@keyframes rb-breathe { 0%, 100% { opacity: .45; } 50% { opacity: .7; } }
@media (prefers-reduced-motion: reduce) { .ribbon .pulse { display: none; } .ribbon .glow { animation: none; } }

.phase-tag { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 0 0 10px; font-size: 12.5px; color: var(--fg-muted); }
.phase-tag a { display: inline-flex; align-items: center; gap: 7px; color: inherit; }
.phase-tag a:hover { text-decoration: none; }
.phase-tag a:hover b { text-decoration: underline; text-underline-offset: 3px; }
.phase-tag b { font-size: 11.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--c-text, var(--c)); }
.phase-tag .sep { color: var(--fg-subtle); }
.phases { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin: 10px 0 12px; }
@media (max-width: 600px) { .phases { grid-template-columns: 1fr; } }
.phases > div { border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--surface); padding: 16px 18px; border-top: 3px solid var(--c); }
.phases .top { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.phases .k { display: block; font-size: 11.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--c-text, var(--c)); }
.phases .stg { display: block; font-size: 12px; color: var(--fg-subtle); }
.phases b { display: block; font-size: 15px; margin-bottom: 6px; }
.phases p { font-size: 13.5px; color: var(--fg-muted); margin: 0; }

