
/* Otahque V2 reader: documentation layout on the white notebook theme.
   book.css and volume.css sit in the `otahque-base` layer, so these unlayered rules win. */
:root {
  color-scheme: light;
  --v2-ink:#1f2b35; --v2-muted:#53616b; --v2-navy:#17344d; --v2-blue:#245f88;
  --v2-line:#d9e0e4; --v2-soft:#f3f5f6; --v2-tint:#edf3f6; --v2-paper:#fff;
  --v2-rule:rgba(54,104,139,.14); --v2-margin-rule:#efcfd1;
  --v2-amber:#8a5a00; --v2-green:#176345; --v2-surface:#fff; --v2-field:#a7b6bf;
  --v2-placeholder:#66737c; --v2-link-soft:#384854; --v2-ok-soft:#e6f2ec; --v2-track:#e2e8eb;
  --v2-hover-line:#8eaabd; --v2-on-accent:#fff; --v2-code-bg:#eef3f6; --v2-code-ink:#17344d;
  --v2-figure-bg:#fff;
  --v2-sans:Inter, "Segoe UI", Arial, sans-serif; --v2-mono:"DM Mono", Consolas, monospace;
  --v2-side:280px; --v2-rail:220px; --v2-gap:24px; --v2-measure:none;
  --v2-pad:clamp(20px, 3vw, 44px); --v2-top:34px;
  --reading-size:1.125rem;
  --v2-lh:calc(var(--reading-size) * 1.75);
}
html.v2-reader[data-text="small"] { --reading-size:1rem; }
html.v2-reader[data-text="large"] { --reading-size:1.25rem; }
/* Dark notebook: the reader's choice from the header; the white notebook stays the default. */
html.v2-reader[data-theme="dark"] {
  color-scheme:dark;
  --v2-ink:#dde5ea; --v2-muted:#a6b3bc; --v2-navy:#c6dbee; --v2-blue:#93c1ea;
  --v2-line:#323e47; --v2-soft:#12181c; --v2-tint:#23313b; --v2-paper:#1a2126;
  --v2-surface:#1d252b; --v2-rule:rgba(147,193,234,.13); --v2-margin-rule:#5e3d43;
  --v2-amber:#e4b65c; --v2-green:#82cfa3; --v2-field:#56666f; --v2-placeholder:#8b9aa4;
  --v2-link-soft:#c5d0d7; --v2-ok-soft:#1c3a2b; --v2-track:#2d3941; --v2-hover-line:#5f7d92;
  --v2-on-accent:#10181e; --v2-code-bg:#26333c; --v2-code-ink:#d8e8f5; --v2-figure-bg:#eef2f4;
  /* book.css tokens, so its content components follow the dark notebook. */
  --navy:#c6dbee; --blue:#93c1ea; --blue-dark:#b6d6f3; --accent:#93c1ea;
  --ink:#dde5ea; --muted:#a6b3bc; --line:#323e47; --paper:#1a2126; --soft:#23313b;
  --panel:#1d252b; --code-bg:#11171b; --code-ink:#e6edf2;
  --inline-code-fill:#26333c; --inline-code-ink:#cfe3f4; --inline-code-line:#3b4a55;
  --question-ink:#a9cdf0; --question-fill:#1b2a38; --answer-ink:#8fd3b5; --answer-fill:#16281f;
  --exercise-ink:#e8c07e; --exercise-fill:#2a2216; --next-ink:#c9b4ee; --next-fill:#241d31;
  --draft-ink:#f0c27a; --draft-fill:#2b2214; --ok-ink:#8fd3b5; --ok-fill:#16281f;
  --notebook-blue:#93c1ea; --notebook-rule:#2a3a46; --notebook-red:#b9787d;
  --notebook-paper:#1a2126; --notebook-ground:#12181c;
}
html.v2-reader[data-theme="dark"] main.reading { box-shadow:none; }
/* Components whose book.css colours are fixed rather than tokens. */
html.v2-reader[data-theme="dark"] .reading .callout { background-color:var(--v2-tint);
  color:var(--v2-ink); border-top-color:var(--v2-line); border-right-color:var(--v2-line);
  border-bottom-color:var(--v2-line); }
html.v2-reader[data-theme="dark"] .reading .callout :is(p, li, strong) { color:var(--v2-ink); }
html.v2-reader[data-theme="dark"] .reading table :is(th, td) { border-color:var(--v2-line); }
html.v2-reader[data-theme="dark"] .reading table th { background-color:var(--v2-tint);
  color:var(--v2-navy); }
html.v2-reader[data-theme="dark"] .reading :is(table, thead, tbody, tr, td, .table-figure,
  .table-wrap, figure, figure > a) { background-color:transparent; }
html.v2-reader[data-theme="dark"] .reading table td { color:var(--v2-ink); }
html.v2-reader[data-theme="dark"] .reading .code-label { background-color:var(--v2-code-bg);
  color:var(--v2-link-soft); border-color:var(--v2-line); }
html.v2-reader[data-theme="dark"] :is(.contents, .contents-toggle) { background-color:var(--v2-surface);
  border-color:var(--v2-line); }
html.v2-reader[data-theme="dark"] .toc-row.is-open, html.v2-reader[data-theme="dark"] .toc-row:hover {
  background-color:var(--v2-tint); }
html.v2-reader[data-theme="dark"] .reading table tr:nth-child(even) td {
  background-color:rgba(255, 255, 255, .03); }
html.v2-reader[data-theme="dark"] .reading :is(.answer, .answer p:not(.code-label), .answer li, .outcomes li,
  .interview-answer, .interview-answer p) { color:var(--v2-ink); }
html.v2-reader[data-theme="dark"] :is(.eyebrow, .chapter-meta-line, .chapter-number) { color:#d9a3a8; }
html.v2-reader[data-theme="dark"] .reading figcaption { color:var(--v2-muted); }
html.v2-reader[data-theme="dark"] .is-planned .chapter-card-title,
html.v2-reader[data-theme="dark"] .chapter-card-title { color:var(--v2-navy); }
html.v2-reader[data-theme="dark"] .reading-progress { background:var(--v2-surface);
  border-color:var(--v2-line); }
html.v2-reader[data-theme="dark"] .reading-progress-track { background:var(--v2-track); }
html.v2-reader[data-theme="dark"] .reading-progress-label { color:var(--v2-muted); }
html.v2-reader[data-theme="dark"] .volume-state { background:none; }
html.v2-reader[data-theme="dark"] .volume-state.available { color:var(--v2-green); }
html.v2-reader[data-theme="dark"] .volume-state.draft { color:var(--v2-amber); }
html.v2-reader[data-theme="dark"] .volume-state.planned { color:var(--v2-muted); }
html.v2-reader[data-theme="dark"] .volume-start { background:var(--v2-blue);
  color:var(--v2-on-accent); }
/* Diagrams are drawn on white; they sit on a soft light card. */
html.v2-reader[data-theme="dark"] .reading figure img { border-radius:4px;
  background:var(--v2-figure-bg); }
.v2-theme-toggle { display:inline-flex; align-items:center; gap:7px; min-height:34px;
  margin:0; padding:4px 12px; border:1px solid var(--v2-line); border-radius:999px;
  background:var(--v2-surface); color:var(--v2-navy); font:500 13px/1.2 var(--v2-sans);
  cursor:pointer; }
.v2-theme-toggle:hover { border-color:var(--v2-hover-line); background:var(--v2-tint); }
.v2-theme-icon { display:inline-block; width:14px; height:14px; border-radius:50%;
  box-shadow:inset -4px -2px 0 1px currentColor; }
html.v2-reader[data-theme="dark"] .v2-theme-icon { box-shadow:none; background:currentColor;
  outline:2px dotted currentColor; outline-offset:2px; transform:scale(.7); }
html.v2-reader body { background:var(--v2-soft); color:var(--v2-ink); }
html.v2-reader :focus-visible { outline:3px solid var(--v2-blue); outline-offset:2px; }
html.v2-reader.v2-drawer-open { overflow:hidden; }
.v2-sr-only { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0);
  white-space:nowrap; }

/* ---- Global header: its inner edges match the 90% workspace ---- */
html.v2-reader .site-header { box-sizing:border-box; display:flex; align-items:center;
  justify-content:space-between; gap:8px 24px; min-height:54px; margin:0; padding:6px 5%;
  border-bottom:1px solid var(--v2-line); background:var(--v2-surface); color:var(--v2-navy); }
html.v2-reader .site-header .brand { color:var(--v2-navy); font-size:18px; }
html.v2-reader .site-header .brand span { color:var(--v2-muted); }
html.v2-reader .header-links { display:flex; flex-wrap:wrap; gap:4px 22px; margin:0;
  font:500 13px/1.4 var(--v2-sans); }
html.v2-reader .header-links a { display:inline-block; padding:4px 0; color:var(--v2-navy);
  text-decoration:none; border-bottom:1px solid transparent; }
html.v2-reader .header-links a:hover { border-bottom-color:currentColor; }

/* ---- Contextual volume bar ---- */
.v2-context { box-sizing:border-box; display:flex; flex-wrap:wrap; align-items:center;
  justify-content:space-between; gap:8px 24px; width:90%; margin:14px auto 0;
  padding:10px 16px; border:1px solid var(--v2-line); border-radius:6px; background:var(--v2-surface);
  color:var(--v2-muted); font:14px/1.4 var(--v2-sans); }
.v2-context-title { display:flex; flex-wrap:wrap; align-items:baseline; gap:4px 10px; min-width:0; }
.v2-context-kicker { color:var(--v2-muted); font:500 12px/1.4 var(--v2-mono);
  letter-spacing:.06em; text-transform:uppercase; }
.v2-context-title a { color:var(--v2-navy); font-weight:600; text-decoration:none; }
.v2-context-title a:hover { text-decoration:underline; }
.v2-context-meta { display:flex; flex-wrap:wrap; align-items:center; gap:6px 18px; }
.v2-context-meta > a { color:var(--v2-blue); }
.v2-context-progress { display:inline-flex; align-items:center; gap:8px; color:var(--v2-ink); }
.v2-context-bar { display:block; width:96px; height:6px; overflow:hidden; border-radius:3px;
  background:var(--v2-track); }
.v2-context-bar > span { display:block; height:100%; background:var(--v2-green); }

/* ---- Workspace grid: contents column + reading column (90% wide) ---- */
html.v2-reader .book-shell { box-sizing:border-box; display:grid;
  grid-template-columns:var(--v2-side) minmax(0, 1fr); align-items:start; gap:var(--v2-gap);
  width:90%; max-width:none; min-height:0; margin:0 auto; padding:16px 0 56px; }
html.v2-reader .book-shell.home-shell:not(.v2-volume-shell) { display:block; }
html.v2-reader .book-content { grid-column:2; grid-row:1; box-sizing:border-box; width:auto;
  min-width:0; max-width:none; margin:0; padding:0; background:none; transform:none;
  transition:none; }
html.v2-reader .home-shell:not(.v2-volume-shell) > .book-content { grid-column:auto; }

/* ---- Contents column (book pages and volume pages share it) ---- */
html.v2-reader .book-drawer, html.v2-reader .v2-volume-menu { position:sticky; inset:auto; top:var(--v2-top);
  grid-column:1; grid-row:1; z-index:3; box-sizing:border-box; width:auto;
  height:auto; max-height:none; margin:0; padding:0; overflow:visible;
  border:1px solid var(--v2-line); border-radius:6px; background:var(--v2-surface); box-shadow:none;
  color:var(--v2-ink); font:14px/1.45 var(--v2-sans); }
html.v2-reader .book-drawer > summary, html.v2-reader .v2-volume-menu > summary { display:none; }
html.v2-reader .book-navigation, html.v2-reader .v2-volume-menu > nav { display:block;
  box-sizing:border-box; max-height:calc(100vh - var(--v2-top) - 16px); margin:0;
  padding:0 10px 16px; overflow:auto; overscroll-behavior:contain; border:0;
  background:var(--v2-surface); scrollbar-width:thin; }
.v2-drawer-head { display:none; }
.v2-search-wrap { position:sticky; top:0; z-index:2; margin:0 -10px 4px; padding:12px 10px 10px;
  border-bottom:1px solid var(--v2-line); background:var(--v2-surface); }
.v2-search-label { display:block; margin:0 0 6px; color:var(--v2-navy);
  font:600 11px/1.3 var(--v2-sans); letter-spacing:.08em; text-transform:uppercase; }
html.v2-reader .v2-search { box-sizing:border-box; display:block; width:100%; min-height:40px;
  margin:0; padding:8px 12px 8px 34px; border:1px solid var(--v2-field); border-radius:6px;
  background:var(--v2-surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%2353616b' stroke-width='2'%3E%3Ccircle cx='7' cy='7' r='5'/%3E%3Cpath d='m11 11 4 4'/%3E%3C/svg%3E") no-repeat 11px 50%;
  color:var(--v2-ink); font:14px/1.3 var(--v2-sans); }
html.v2-reader .v2-search::placeholder { color:var(--v2-placeholder); }
html.v2-reader .v2-search:focus-visible { border-color:var(--v2-blue); outline-offset:1px; }
.v2-no-results { margin:8px 4px; padding:10px; border-radius:4px; background:var(--v2-tint);
  color:var(--v2-muted); font-size:13px; }
html.v2-reader .book-nav-heading, html.v2-reader .book-nav-resume { display:none; }
html.v2-reader .book-nav-label { margin:14px 6px 6px; color:var(--v2-muted);
  font:600 11px/1.4 var(--v2-sans); letter-spacing:.08em; text-transform:uppercase; }
html.v2-reader .book-navigation ol, html.v2-reader .v2-volume-menu ol { margin:0; padding:0;
  border:0; list-style:none; }
html.v2-reader .book-navigation li, html.v2-reader .v2-volume-menu li { margin:0; }
/* Level 1: parts (stages). */
html.v2-reader .book-nav-stage > summary, html.v2-reader .v2-book-pages > summary,
html.v2-reader .v2-vm-part > h2 { display:flex; align-items:baseline; gap:8px; margin:0;
  padding:9px 6px; border:0; border-radius:4px; color:var(--v2-navy);
  font:700 13px/1.35 var(--v2-sans); list-style:none; cursor:pointer; }
html.v2-reader .v2-vm-part > h2 { cursor:default; padding-top:12px; }
/* Level 2: chapters. */
html.v2-reader .book-nav-chapter > summary, html.v2-reader .v2-vm-chapter > summary {
  display:flex; align-items:flex-start; gap:8px; margin:0; padding:7px 6px; border-radius:4px;
  color:var(--v2-ink); font:500 13.5px/1.4 var(--v2-sans); list-style:none; cursor:pointer; }
html.v2-reader .book-navigation summary::-webkit-details-marker,
html.v2-reader .v2-volume-menu summary::-webkit-details-marker { display:none; }
html.v2-reader :is(.book-nav-stage, .book-nav-chapter, .v2-book-pages, .v2-vm-chapter) > summary::before {
  content:""; flex:none; align-self:center; width:6px; height:6px; margin:0 3px 0 1px;
  border-right:1.5px solid currentColor; border-bottom:1.5px solid currentColor;
  transform:rotate(-45deg); transition:transform .12s ease; opacity:.7; }
html.v2-reader :is(.book-nav-stage, .book-nav-chapter, .v2-book-pages, .v2-vm-chapter)[open] > summary::before {
  transform:rotate(45deg); }
html.v2-reader :is(.book-nav-stage, .book-nav-chapter, .v2-book-pages, .v2-vm-chapter) > summary:hover {
  background:var(--v2-tint); }
html.v2-reader .book-nav-stage > summary small { flex:none; margin-left:auto; color:var(--v2-muted);
  font:500 11px/1 var(--v2-mono); white-space:nowrap; }
html.v2-reader .book-nav-chapter[open] > summary, html.v2-reader .v2-vm-chapter[open] > summary {
  color:var(--v2-navy); font-weight:600; }
html.v2-reader .book-nav-stage > ol { padding:0 0 6px 8px; }
/* Chapter status: a small dot; the word stays available to screen readers and on hover. */
html.v2-reader .book-nav-chapter > summary small { flex:none; align-self:center; margin-left:auto;
  font-size:0; line-height:0; }
html.v2-reader .book-nav-chapter > summary small::after { content:""; display:inline-block;
  width:7px; height:7px; border-radius:50%; background:var(--v2-amber); }
html.v2-reader .book-nav-chapter > summary small.v2-status-available::after { background:var(--v2-green); }
/* Level 3: sections. */
html.v2-reader .book-nav-chapter > ol, html.v2-reader .v2-vm-chapter > ol {
  margin:2px 0 8px 14px; border-left:1px solid var(--v2-line); }
html.v2-reader .book-nav-overview { display:block; margin:2px 0 0 14px; padding:6px 10px;
  border-left:1px solid var(--v2-line); color:var(--v2-blue); font:13px/1.4 var(--v2-sans);
  text-decoration:none; }
html.v2-reader .book-navigation ol a, html.v2-reader .v2-volume-menu ol a,
html.v2-reader .v2-book-pages .book-nav-links a { display:flex; align-items:center;
  justify-content:space-between; gap:8px; margin:0; padding:6px 10px; border-radius:0 4px 4px 0;
  background:none; box-shadow:none; color:var(--v2-link-soft); font:13px/1.4 var(--v2-sans);
  text-decoration:none; }
html.v2-reader .book-navigation ol a:hover, html.v2-reader .v2-volume-menu ol a:hover,
html.v2-reader .book-nav-overview:hover, html.v2-reader .v2-book-pages .book-nav-links a:hover {
  background:var(--v2-tint); color:var(--v2-navy); }
html.v2-reader .book-navigation a[aria-current="page"],
html.v2-reader .book-navigation a[aria-current="location"] { margin-left:-1px; padding-left:8px;
  border-left:3px solid var(--v2-blue); background:var(--v2-tint); box-shadow:none;
  color:var(--v2-navy); font-weight:600; }
html.v2-reader .book-nav-planned { padding:7px 6px; color:var(--v2-muted); font-size:13px; }
html.v2-reader .book-nav-planned small { display:inline; margin:0 0 0 4px; }
.v2-book-pages { margin:12px 0 0; padding:6px 0 0; border-top:1px solid var(--v2-line); }
html.v2-reader .v2-book-pages .book-nav-links { display:grid; gap:0; margin:0; padding:0 0 4px 14px;
  border:0; }
.v2-complete-tick { display:inline-grid; flex:none; width:18px; height:18px; margin-left:6px;
  place-items:center; border-radius:50%; background:var(--v2-ok-soft); color:var(--v2-green);
  font:700 11px/1 var(--v2-sans); }
.v2-is-complete { color:var(--v2-green) !important; }

/* ---- Reading column ---- */
html.v2-reader .chapter-sidebar, html.v2-reader .notebook-page-header,
html.v2-reader .edge-nav { display:none; }
html.v2-reader .reader-layout { display:block; box-sizing:border-box; width:auto; max-width:none;
  margin:0; padding:0; }
html.v2-reader main.reading { position:relative; box-sizing:border-box; grid-column:auto;
  grid-row:auto; justify-self:stretch; width:auto; max-width:none; min-width:0; min-height:0; margin:0;
  padding:clamp(22px, 3vw, 40px) var(--v2-pad) 40px; border:1px solid var(--v2-line);
  border-radius:6px; background:var(--v2-paper); box-shadow:0 1px 2px rgba(24, 42, 54, .04);
  font-size:var(--reading-size); overflow-wrap:anywhere; transform:none; transition:none;
  animation:none; }
/* The notebook's margin line sits just left of the text, which fills the paper. */
html.v2-reader main.reading::before { content:""; position:absolute; z-index:0; inset:0 auto 0
  calc(var(--v2-pad) - 14px);
  width:1px; background:var(--v2-margin-rule); pointer-events:none; }
html.v2-reader main.reading > :not(.reading-progress) { position:relative; z-index:1;
  box-sizing:border-box; max-width:var(--v2-measure); margin-left:auto; margin-right:auto; }
html.v2-reader .reading article { max-width:var(--v2-measure); margin:0 auto;
  font-size:var(--reading-size); }

/* Page head: breadcrumbs, chapter, section tabs. */
.v2-page-head { margin:0 auto 6px; }
.v2-breadcrumbs { display:flex; flex-wrap:wrap; align-items:center; gap:4px 8px; margin:0 0 12px;
  color:var(--v2-muted); font:13px/1.5 var(--v2-sans); }
.v2-breadcrumbs a { color:var(--v2-blue); text-decoration:none; }
.v2-breadcrumbs a:hover { text-decoration:underline; }
.v2-breadcrumbs [aria-current] { color:var(--v2-ink); }
html.v2-reader .v2-chapter-eyebrow { display:inline-block; margin:0 0 10px; padding:0; border:0;
  background:none; color:var(--v2-muted); font:500 12px/1.5 var(--v2-mono);
  letter-spacing:.04em; text-decoration:none; text-transform:uppercase; }
html.v2-reader .v2-chapter-eyebrow:hover { color:var(--v2-navy); text-decoration:underline; }
html.v2-reader .section-path { max-width:none; margin:0 0 18px; padding:0; border:0; }
html.v2-reader .section-path ol { display:flex; justify-content:flex-start; gap:8px; width:100%; min-width:0; margin:0;
  padding:2px 2px 8px; overflow-x:auto; list-style:none; scrollbar-width:thin; }
html.v2-reader .section-path li { flex:0 0 auto; margin:0; }
html.v2-reader .section-path a, html.v2-reader .section-path li > span { display:inline-flex;
  align-items:center; gap:6px; height:auto; min-height:38px; padding:7px 14px;
  border:1px solid var(--v2-line); border-radius:999px; background:var(--v2-surface); box-shadow:none;
  color:var(--v2-navy); font:500 13px/1.3 var(--v2-sans); text-decoration:none;
  white-space:nowrap; }
html.v2-reader .section-path a:hover { border-color:var(--v2-hover-line); background:var(--v2-tint); }
html.v2-reader .section-path .is-current > span { border-color:var(--v2-navy);
  background:var(--v2-navy); color:var(--v2-on-accent); }
html.v2-reader .section-path .section-step-number { display:none; }
/* One page per chapter (30 November 2026): the tabs stay at the top while reading, the
   current section's tab is filled, and a heading reached by a tab clears the tab bar. */
html.v2-reader main.chapter-page .section-path { position:sticky; top:22px; z-index:6;
  margin:0 0 18px; padding:8px 0 0; background:var(--v2-paper); }
html.v2-reader main.chapter-page .section-path .is-current > a { border-color:var(--v2-navy);
  background:var(--v2-navy); color:var(--v2-on-accent); }
html.v2-reader main.chapter-page .chapter-part { margin-top:40px; padding-top:24px;
  border-top:1px solid var(--v2-line); }
html.v2-reader main.chapter-page :is(h1, h2, h3)[id] { scroll-margin-top:110px; }
/* Arriving at a place (a contents link, an old address) jumps there; smooth scrolling is
   kept for moves within the page once it has loaded. */
html.v2-reader:not(.v2-settled) { scroll-behavior:auto; }
html.v2-reader main.chapter-page .section-path { border-bottom:1px solid var(--v2-line); }
html.v2-reader .section-path .section-step-title { padding:0; color:inherit; }

/* Title row, then one metadata line. */
.v2-topic-heading-row { display:flex; flex-wrap:wrap; align-items:center;
  justify-content:space-between; gap:10px 20px; margin:8px 0 6px; }
html.v2-reader .v2-topic-heading-row > :is(h1, h2) { flex:1 1 320px; min-width:0; margin:0; }
.v2-completion-row { display:flex; flex:none; justify-content:flex-end; }
.v2-mark-complete { display:inline-flex; align-items:center; gap:8px; min-height:38px;
  padding:7px 14px; border:1px solid var(--v2-hover-line); border-radius:999px; background:var(--v2-surface);
  color:var(--v2-navy); font:600 13px/1.3 var(--v2-sans); cursor:pointer; }
.v2-mark-complete:hover { border-color:var(--v2-blue); background:var(--v2-tint); }
.v2-mark-complete[aria-pressed="true"] { border-color:var(--v2-green); background:var(--v2-ok-soft);
  color:var(--v2-green); }
.v2-mark-icon { display:grid; width:18px; height:18px; place-items:center;
  border:1.5px solid currentColor; border-radius:50%; font-size:11px; }
.v2-meta-row { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between;
  gap:10px 16px; margin:0 0 24px; padding:0 0 14px; border-bottom:1px solid var(--v2-line);
  color:var(--v2-muted); font:13px/1.5 var(--v2-sans); }
.v2-meta-items { display:flex; flex-wrap:wrap; align-items:center; gap:6px 18px; margin:0;
  padding:0; list-style:none; }
html.v2-reader .v2-meta-items > li { margin:0; padding:0; font:inherit; line-height:1.5;
  background:none; }
html.v2-reader .v2-meta-row .status-pill { display:inline-block; margin:0; padding:2px 8px;
  border:1px solid currentColor; border-radius:999px; background:none;
  font:600 11px/1.4 var(--v2-sans); letter-spacing:.04em; text-transform:uppercase; }
html.v2-reader .v2-meta-row .status-pill.draft { color:var(--v2-amber); }
html.v2-reader .v2-meta-row .status-pill:not(.draft) { color:var(--v2-green); }
html.v2-reader .v2-meta-tools .tool-buttons, html.v2-reader .v2-meta-tools .text-size {
  display:inline-flex; gap:6px; margin:0; padding:0; border:0; }
html.v2-reader .v2-meta-tools .text-size[hidden], html.v2-reader .v2-meta-tools [hidden] { display:none; }
html.v2-reader .v2-meta-tools button { min-width:36px; min-height:32px; margin:0; padding:4px 10px;
  border:1px solid var(--v2-line); border-radius:6px; background:var(--v2-surface); color:var(--v2-navy);
  font:600 12px/1 var(--v2-sans); cursor:pointer; }
html.v2-reader .v2-meta-tools button:hover { border-color:var(--v2-hover-line); background:var(--v2-tint); }
html.v2-reader .reader-tools.v2-emptied { display:none; }

/* Body text on the notebook ruling: each paragraph and list carries its own lines, so the
   text sits on them whatever comes before (figures, code, callouts). */
html.v2-reader .reading article > p:not(.callout__title):not(.code-label):not(.eyebrow):not(.chapter-meta-line),
html.v2-reader .reading article > :is(ul, ol) {
  margin:0 0 calc(var(--v2-lh) * .5); line-height:var(--v2-lh); text-align:left;
  hyphens:auto; -webkit-hyphens:auto;
  background-image:linear-gradient(to bottom, transparent calc(var(--v2-lh) - 1px),
    var(--v2-rule) calc(var(--v2-lh) - 1px), var(--v2-rule) var(--v2-lh));
  background-size:100% var(--v2-lh); background-repeat:repeat-y; }
/* The drop cap would break the first ruled line, so V2 sets the first letter normally. */
html.v2-reader .reading article > p::first-letter { float:none; margin:0; padding:0;
  color:inherit; font:inherit; line-height:inherit; }
html.v2-reader .reading article > :is(ul, ol) > li { margin:0; line-height:var(--v2-lh);
  text-align:left; }
html.v2-reader .reading article > :is(ul, ol) > li > :is(p, ul, ol) { margin:0; }
html.v2-reader .reading article :is(p, li) { text-align:left; }
html.v2-reader .reading article :not(pre) > code { padding:.08em .34em; border-radius:4px;
  font-size:.84em; line-height:1; -webkit-box-decoration-break:clone; box-decoration-break:clone; }
html.v2-reader .reading article :is(pre, .table-wrap, figure, .callout, .exercise, .question,
  .answer, .checkpoint, details, blockquote) { line-height:1.6; }
html.v2-reader .reading pre { max-width:100%; overflow:auto; }
html.v2-reader .reading :is(.table-wrap, figure.table-figure) { max-width:100%; overflow-x:auto; }

/* "On this page": a rail beside the paper on wide screens, a fold above the text otherwise. */
.v2-rail { display:none; }
.v2-otp-inline { margin:0 auto 24px; border:1px solid var(--v2-line); border-radius:6px;
  background:var(--v2-surface); font:14px/1.45 var(--v2-sans); }
.v2-otp-inline > summary { padding:10px 14px; color:var(--v2-navy); font-weight:600;
  cursor:pointer; }
.v2-otp-list { margin:0; padding:0; list-style:none; }
.v2-otp-inline .v2-otp-list { padding:0 14px 12px; }
.v2-otp-list li { margin:0; }
.v2-otp-list a { display:block; padding:5px 0 5px 12px; border-left:2px solid var(--v2-line);
  color:var(--v2-muted); font:13.5px/1.4 var(--v2-sans); text-decoration:none; }
.v2-otp-list .is-h3 a { padding-left:24px; font-size:13px; }
.v2-otp-list a:hover { color:var(--v2-navy); }
.v2-otp-list a[aria-current="true"] { border-left-color:var(--v2-blue); color:var(--v2-navy);
  font-weight:600; }
.v2-rail-title { margin:0 0 8px; color:var(--v2-navy); font:600 11px/1.3 var(--v2-sans);
  letter-spacing:.08em; text-transform:uppercase; }
@media (min-width:1280px) {
  html.v2-reader .reader-layout.v2-has-rail { display:grid;
    grid-template-columns:minmax(0, 1fr) var(--v2-rail); gap:var(--v2-gap); align-items:start; }
  .v2-has-rail .v2-rail { display:block; position:sticky; top:var(--v2-top);
    max-height:calc(100vh - var(--v2-top) - 16px); overflow:auto; padding:14px 14px 16px;
    border:1px solid var(--v2-line); border-radius:6px; background:var(--v2-surface); }
  .v2-has-rail .v2-otp-inline { display:none; }
}

/* Previous / next at the end of each page, and the volume page counter. */
html.v2-reader .chapter-end { display:grid; grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:14px; margin-top:40px; padding:24px 0 0; border-top:1px solid var(--v2-line); }
html.v2-reader .chapter-end a { display:flex; flex-direction:column; align-items:flex-start;
  gap:4px; min-height:64px; margin:0; padding:14px 16px; border:1px solid var(--v2-line);
  border-radius:6px; background:var(--v2-surface); color:var(--v2-navy); font:600 15px/1.35 var(--v2-sans);
  text-align:left; text-decoration:none; }
html.v2-reader .chapter-end a.v2-next { grid-column:2; align-items:flex-end; text-align:right; }
html.v2-reader .chapter-end a:hover { border-color:var(--v2-blue); background:var(--v2-tint); }
.v2-pn-label { color:var(--v2-muted); font:500 12px/1.3 var(--v2-sans); letter-spacing:.06em;
  text-transform:uppercase; }
html.v2-reader .page-number { position:static; display:block; margin-top:14px; padding:0;
  color:var(--v2-muted); font:12px/1.4 var(--v2-mono); text-align:right; }

/* ---- Home shelf ---- */
html.v2-reader .library-page:not(.volume-landing) { box-sizing:border-box; width:100%;
  max-width:none; margin:0; padding:40px 0 58px; }
html.v2-reader .book-home:not(.volume-landing) .volume-shelf { width:100%; max-width:none;
  margin-inline:0; grid-template-columns:repeat(auto-fit, minmax(220px, 1fr)); }
/* Volume cards follow the chapter cards: label and status badge on top, then title and
   description, with count, progress and "Open volume" pinned to the bottom. */
html.v2-reader .volume-cover { min-height:300px; gap:10px; background:var(--v2-surface); }
/* Badge on its own line first (as on chapter cards), then the volume label: the same shape
   at every card width, so nothing wraps differently from card to card. */
.v2-volume-top { display:flex; flex-direction:column; align-items:flex-start; gap:10px; }
.v2-volume-top .v2-badge { order:-1; }
html.v2-reader .volume-cover .volume-state { display:inline-block; margin:0; }
html.v2-reader .volume-cover h2 { margin:4px 0 0; }
.v2-volume-bottom { display:grid; gap:8px; margin-top:auto; padding-top:6px; }
html.v2-reader .v2-volume-bottom .volume-card-meta { margin:0; color:var(--v2-muted); }
html.v2-reader .v2-volume-bottom .volume-progress { margin:0; background:var(--v2-track); }
.v2-open { color:var(--v2-navy); font:600 15px/1.3 var(--v2-sans); }
html.v2-reader .volume-cover:hover .v2-open { text-decoration:underline; }
html.v2-reader .volume-state.planned { color:var(--v2-muted); }
html.v2-reader .volume-shelf .volume-resume { display:none; }
.v2-continue { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between;
  gap:10px 20px; margin:0 0 18px; padding:14px 18px; border:1px solid var(--v2-line);
  border-left:4px solid var(--v2-green); border-radius:6px; background:var(--v2-surface);
  color:var(--v2-ink); text-decoration:none; font:14px/1.4 var(--v2-sans); }
.v2-continue:hover { border-color:var(--v2-hover-line); border-left-color:var(--v2-green);
  background:var(--v2-tint); }
.v2-continue-text { display:flex; flex-wrap:wrap; align-items:baseline; gap:4px 14px; min-width:0; }
.v2-continue-kicker { color:var(--v2-green); font:600 11px/1.3 var(--v2-sans);
  letter-spacing:.08em; text-transform:uppercase; }
.v2-continue-title { color:var(--v2-navy); font-weight:600; font-size:15px; }
.v2-continue-where { color:var(--v2-muted); font-size:13px; }
.v2-continue-go { padding:6px 14px; border-radius:999px; background:var(--v2-navy);
  color:var(--v2-on-accent); font-weight:600; white-space:nowrap; }

/* ---- Volume page: contents column + chapter cards ---- */
html.v2-reader .volume-landing { box-sizing:border-box; width:auto; max-width:none; margin:0;
  padding:0; }
html.v2-reader .volume-landing > .eyebrow { margin:0 0 10px; }
html.v2-reader .volume-landing-cover { margin:0 0 28px; padding:28px clamp(20px, 3vw, 40px);
  border:1px solid var(--v2-line); border-left:6px solid var(--v2-navy); border-radius:6px;
  background:var(--v2-surface); box-shadow:none; }
html.v2-reader .volume-landing #volume-contents { display:block; }
html.v2-reader .volume-landing #volume-contents > h2 { margin:0 0 6px; color:var(--v2-navy);
  font:700 20px/1.3 var(--v2-sans); }
html.v2-reader .volume-contents-part { margin:0 0 22px; }
html.v2-reader .volume-contents-part > h2 { margin:18px 0 10px; padding:0 0 8px;
  border-bottom:1px solid var(--v2-line); color:var(--v2-navy); font:600 16px/1.35 var(--v2-sans); }
.v2-card-grid { display:grid; grid-template-columns:repeat(auto-fill, minmax(300px, 1fr));
  gap:10px; align-items:stretch; }
/* Status row first, title below: the status rows line up across a row whatever the title
   length, and every card in a row shares the tallest card's height. */
.v2-chapter-card { box-sizing:border-box; border:1px solid var(--v2-line); border-radius:6px;
  background:var(--v2-surface); font:14px/1.45 var(--v2-sans); }
.v2-chapter-card > summary, .v2-chapter-card > .v2-card-static { display:grid; gap:8px;
  align-content:start;
  padding:12px 14px; list-style:none; cursor:pointer; }
.v2-chapter-card > .v2-card-static { cursor:default; }
.v2-chapter-card > summary::-webkit-details-marker { display:none; }
.v2-chapter-card > summary:hover { background:var(--v2-tint); }
.v2-card-title { color:var(--v2-navy); font-weight:600; }
.v2-card-meta { display:flex; flex-wrap:wrap; align-items:center; gap:6px 12px;
  color:var(--v2-muted); font-size:12.5px; }
.v2-card-meta .v2-open-hint::after { content:" \25BE"; }
.v2-chapter-card[open] .v2-open-hint::after { content:" \25B4"; }
/* ---- Full chapter index: volume heading, part heading, then the same chapter cards ---- */
.v2-index { margin-top:8px; }
/* Wider minimum than the volume page: the status row stays on one line in every card. */
.v2-index .v2-card-grid { grid-template-columns:repeat(auto-fill, minmax(330px, 1fr)); }
html.v2-reader .v2-index-search { position:static; max-width:560px; margin:0 0 14px; padding:0;
  border:0; background:none; }
html.v2-reader .v2-index-note { margin:0 0 8px; color:var(--v2-muted); font:14px/1.55 var(--v2-sans); }
.v2-index-volume { margin:34px 0 0; }
.v2-index-volume-head { display:flex; flex-wrap:wrap; align-items:center; gap:8px 14px;
  padding:0 0 12px; border-bottom:2px solid var(--v2-navy); }
html.v2-reader .v2-index-volume-head h2 { margin:0; color:var(--v2-navy);
  font:normal 26px/1.2 Georgia, serif; }
.v2-index-volume-head > a { margin-left:auto; color:var(--v2-blue); font:600 14px/1.3 var(--v2-sans); }
html.v2-reader .volume-contents-part > h2 small { margin-left:8px; color:var(--v2-muted);
  font:500 12px/1 var(--v2-mono); }
.v2-card-summary { color:var(--v2-muted); font-size:13.5px; line-height:1.5; }
.v2-card-tag { justify-self:start; padding:1px 8px; border-radius:4px; background:var(--v2-tint);
  color:var(--v2-navy); font:500 12px/1.5 var(--v2-sans); }
:is(.v2-card-meta, .v2-volume-top, .v2-index-volume-head) .v2-badge { box-sizing:border-box; min-width:9.6em; text-align:center; }
.v2-badge { padding:1px 8px; border:1px solid currentColor; border-radius:999px;
  font:600 10.5px/1.5 var(--v2-sans); letter-spacing:.05em; text-transform:uppercase; }
.v2-badge-available { color:var(--v2-green); }
.v2-badge-draft, .v2-badge-pre-release { color:var(--v2-amber); }
.v2-badge-planned { color:var(--v2-muted); }
.v2-chapter-card > ol { margin:0; padding:4px 14px 12px 32px; border-top:1px solid var(--v2-line); }
.v2-chapter-card > ol li { margin:0; padding:3px 0; }
.v2-chapter-card > ol a { color:var(--v2-blue); }

/* ---- Tablet and phone: the contents column becomes an overlay drawer ---- */
.v2-backdrop { position:fixed; inset:0; z-index:60; background:rgba(16, 28, 38, .45); }
@media (max-width:1000px) {
  html.v2-reader .book-shell, html.v2-reader .book-shell.v2-volume-shell { display:block; }
  html.v2-reader .book-drawer, html.v2-reader .v2-volume-menu { position:static; margin:0 0 12px;
    border:0; background:none; }
  html.v2-reader .book-drawer > summary, html.v2-reader .v2-volume-menu > summary {
    position:static; display:inline-flex; align-items:center; gap:8px; width:auto; min-height:44px;
    margin:0; padding:8px 16px; border:1px solid var(--v2-line); border-radius:6px;
    background:var(--v2-surface); box-shadow:none; color:var(--v2-navy); font:600 14px/1.2 var(--v2-sans);
    list-style:none; cursor:pointer; }
  html.v2-reader .book-drawer > summary::-webkit-details-marker,
  html.v2-reader .v2-volume-menu > summary::-webkit-details-marker { display:none; }
  html.v2-reader .book-drawer > summary .drawer-open-label { position:static; width:auto;
    height:auto; overflow:visible; clip:auto; display:inline; }
  html.v2-reader .book-drawer > summary .drawer-close-label { display:none; }
  html.v2-reader .book-drawer[open] .book-navigation, html.v2-reader .v2-volume-menu[open] > nav {
    position:fixed; z-index:61; inset:0 auto 0 0; width:min(88vw, 360px); max-height:none;
    padding:0 12px 24px; border-right:1px solid var(--v2-line);
    box-shadow:0 0 28px rgba(16, 28, 38, .22); }
  .v2-drawer-head { position:sticky; top:0; z-index:3; display:flex; align-items:center;
    justify-content:space-between; gap:12px; margin:0 -12px; padding:12px 12px 10px;
    border-bottom:1px solid var(--v2-line); background:var(--v2-surface); color:var(--v2-navy); }
  .v2-drawer-head strong { font:700 15px/1.3 var(--v2-sans); }
  .v2-drawer-close { min-width:44px; min-height:40px; padding:6px 12px; border:1px solid var(--v2-line);
    border-radius:6px; background:var(--v2-surface); color:var(--v2-navy); font:600 13px/1 var(--v2-sans);
    cursor:pointer; }
  .v2-search-wrap { top:63px; margin-top:0; }
  html.v2-reader .book-content, html.v2-reader .v2-volume-shell > .book-content { grid-column:auto; }
}
@media (max-width:1000px) and (min-width:651px) {
  html.v2-reader .site-header { padding-inline:5%; }
}
@media (max-width:650px) {
  html.v2-reader .site-header { flex-wrap:wrap; padding:8px 5% 6px; }
  html.v2-reader .header-links { width:100%; gap:2px 16px; font-size:12.5px; }
  html.v2-reader .header-links a { display:inline-block; }
  .v2-context { margin-top:10px; padding:10px 12px; }
  html.v2-reader main.reading { padding:20px 18px 32px; }
  html.v2-reader main.reading::before { left:8px; }
  html.v2-reader .chapter-end { grid-template-columns:1fr; }
  html.v2-reader .chapter-end a.v2-next { grid-column:auto; }
  html.v2-reader .book-home:not(.volume-landing) .volume-shelf { grid-template-columns:1fr; }
  .v2-card-grid { grid-template-columns:1fr; }
  html.v2-reader .volume-cover { min-height:0; }
  .v2-completion-row { margin-left:auto; }
}
@media (prefers-reduced-motion:reduce) {
  html.v2-reader * { scroll-behavior:auto !important; transition:none !important; }
}
@media print {
  .v2-context, .v2-rail, .v2-otp-inline, .v2-meta-tools, .v2-completion-row, .v2-backdrop,
  html.v2-reader .book-drawer, html.v2-reader .v2-volume-menu, html.v2-reader .section-path,
  html.v2-reader .chapter-end, html.v2-reader .page-number { display:none !important; }
  html.v2-reader .book-shell { display:block; width:auto; padding:0; }
  html.v2-reader main.reading { padding:0; border:0; box-shadow:none; }
  html.v2-reader main.reading::before { display:none; }
  html.v2-reader .reading article > * { background-image:none !important; }
}
