/* set-sail · style.css
   Layout: sticky topnav + sticky left sidebar + scrolling main content with chapters.
   All theme colours come from --cvt-color-* slots. Backdrop image is automatic via cvt-backdrop.css. */

:root {
  --bg: var(--cvt-color-surface, #0a1620);
  --bg-deep: var(--cvt-color-surface-deep, #050b13);
  --panel: color-mix(in srgb, var(--cvt-color-surface-muted, #102536) 80%, transparent);
  --panel-strong: color-mix(in srgb, var(--cvt-color-surface-overlay, #0f1c27) 92%, transparent);
  --panel-soft: color-mix(in srgb, var(--cvt-color-surface-muted, #102536) 50%, transparent);
  --line: var(--cvt-color-border-hairline, rgba(145, 190, 222, 0.22));
  --text: var(--cvt-color-text, #e9f1ff);
  --muted: var(--cvt-color-text-muted, rgba(233, 241, 255, 0.7));
  --accent: var(--cvt-color-accent, #62c7ff);
  --accent-strong: var(--cvt-color-accent-strong, #a7dfff);
  --candle: var(--cvt-color-candle-glow, #f0b46e);
  --radius-xl: 24px;
  --radius-lg: 16px;
  --radius-md: 12px;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
  --shadow-soft: 0 14px 32px rgba(0, 0, 0, 0.28);
  --sans: var(--cvt-font-family, "Manrope", "Segoe UI", sans-serif);
  --serif: var(--cvt-font-serif, "Cinzel", Georgia, serif);
  --mono: var(--cvt-font-mono, "JetBrains Mono", Consolas, monospace);
  --topnav-h: 76px;
  --sidebar-w: 260px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

/* ---------- Bilingual switch ---------- */
html[data-doc-lang="en"] [lang="de"] { display: none !important; }
html[data-doc-lang="de"] [lang="en"] { display: none !important; }

/* SVG-internal text uses .vmg-text-en / .vmg-text-de — same rule */
html[data-doc-lang="en"] .vmg-text-de,
html[data-doc-lang="en"] .seam-label-de { display: none !important; }
html[data-doc-lang="de"] .vmg-text-en,
html[data-doc-lang="de"] .seam-label-en { display: none !important; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--sans);
  color: var(--text);
  /* No body background here — cvt-backdrop.css handles theme-image + overlay via body::before/::after.
     We add a soft tone via background-color so default-theme (no image) still feels rich. */
  background-color: var(--bg-deep);
  line-height: 1.62;
}

a { color: var(--accent-strong); text-decoration: none; transition: color 120ms ease; }
a:hover { color: var(--accent); }

code, kbd {
  font-family: var(--mono);
  font-size: 0.88em;
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent);
  border-radius: 6px;
  padding: 0.06rem 0.42rem;
  white-space: nowrap;
}

/* ============================ TOP NAV ============================ */
.topnav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 60;
  height: var(--topnav-h);
  backdrop-filter: blur(12px);
  background: color-mix(in srgb, var(--bg-deep) 78%, transparent);
  border-bottom: 1px solid var(--line);
  padding: 0 1.4rem;
  display: flex; align-items: center;
  gap: 1.2rem;
}
.brand {
  display: flex; align-items: center; gap: 0.7rem;
  text-decoration: none;
  color: var(--text);
}
.brand-mark {
  font-size: 1.6rem;
  color: var(--candle);
  text-shadow: 0 0 10px color-mix(in srgb, var(--candle) 60%, transparent);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-title { font-family: var(--serif); font-size: 1.05rem; font-weight: 700; color: var(--accent-strong); letter-spacing: 0.02em; }
.brand-subtitle { font-size: 0.74rem; color: var(--muted); margin-top: 0.12rem; }

.topnav-switches {
  margin-left: auto;
  display: flex; gap: 0.55rem; flex-wrap: wrap; align-items: center;
}
.switchgroup {
  display: inline-flex;
  gap: 0.18rem;
  padding: 0.22rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--bg) 64%, transparent);
  border: 1px solid var(--line);
}
.switchgroup button {
  appearance: none; border: 0;
  border-radius: 999px;
  padding: 0.34rem 0.72rem;
  font: 600 0.78rem var(--sans);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  letter-spacing: 0.04em;
  transition: background-color 120ms ease, color 120ms ease;
}
.switchgroup button:hover { color: var(--text); }
.switchgroup button[aria-pressed="true"] {
  background: color-mix(in srgb, var(--accent) 22%, transparent);
  color: var(--accent-strong);
}

/* ============================ LAYOUT ============================ */
.layout {
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
  gap: 0;
  max-width: 1480px;
  margin: 0 auto;
  padding: calc(var(--topnav-h) + 1.4rem) 1.5rem 4rem;
}

@media (max-width: 1080px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar { position: relative !important; top: auto !important; max-height: none !important; margin-bottom: 1rem; }
  .sidebar-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 0.45rem; }
  .sidebar-list li a .hint { display: none; }
}

/* ============================ SIDEBAR ============================ */
.sidebar {
  position: sticky;
  top: calc(var(--topnav-h) + 1.4rem);
  align-self: start;
  max-height: calc(100vh - var(--topnav-h) - 2rem);
  overflow-y: auto;
  padding: 1.1rem 1rem 1.2rem;
  margin-right: 1.4rem;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}
.sidebar-eyebrow {
  margin: 0 0 0.7rem;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.sidebar-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.18rem;
}
.sidebar-list li { margin: 0; }
.sidebar-list li a {
  display: grid;
  grid-template-columns: 28px 1fr;
  grid-template-rows: auto auto;
  gap: 0.05rem 0.6rem;
  padding: 0.55rem 0.6rem 0.55rem 0.45rem;
  border-radius: 10px;
  color: var(--text);
  border-left: 2px solid transparent;
  transition: background-color 120ms ease, border-left-color 150ms ease, color 120ms ease;
}
.sidebar-list li a:hover {
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  color: var(--accent-strong);
}
.sidebar-list li a.is-active {
  background: color-mix(in srgb, var(--candle) 14%, transparent);
  border-left-color: var(--candle);
  color: var(--text);
}
.sidebar-list li a.is-active .step { color: var(--candle); }
.sidebar-list .step {
  grid-row: 1 / -1;
  align-self: center;
  font-family: var(--serif);
  font-weight: 700;
  font-size: 0.95rem;
  text-align: center;
  color: var(--accent);
  letter-spacing: 0.02em;
}
.sidebar-list .lbl { font-size: 0.85rem; font-weight: 600; line-height: 1.2; }
.sidebar-list .hint { font-size: 0.7rem; color: var(--muted); font-style: italic; line-height: 1.2; }

.sidebar-foot {
  margin: 1.1rem 0 0;
  padding-top: 0.85rem;
  border-top: 1px dashed color-mix(in srgb, var(--line) 80%, transparent);
  font-size: 0.74rem;
  color: var(--muted);
  line-height: 1.45;
}
.sidebar-foot strong { color: var(--candle); }

/* ============================ MAIN ============================ */
.main { min-width: 0; display: flex; flex-direction: column; gap: 1.6rem; }

.chapter {
  scroll-margin-top: calc(var(--topnav-h) + 1rem);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  padding: 1.8rem 2rem 2rem;
  box-shadow: var(--shadow-soft);
}
.chapter-head { margin-bottom: 1.4rem; }
.eyebrow {
  margin: 0 0 0.55rem;
  color: var(--muted);
  font-size: 0.74rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

h1, h2, h3, h4 { margin: 0 0 0.6rem; font-family: var(--serif); line-height: 1.18; color: var(--text); }
h1 { font-size: clamp(2rem, 4vw, 3rem); }
h2 { font-size: clamp(1.4rem, 2.6vw, 2rem); }

p { margin: 0 0 0.7rem; }
.lead { color: var(--muted); max-width: 78ch; font-size: 1.02rem; }
.lead em { color: var(--text); font-style: italic; }

/* ============================ HERO / VISION ============================ */
.chapter-hero {
  background: linear-gradient(160deg, var(--panel-strong) 0%, color-mix(in srgb, var(--panel) 78%, transparent) 100%);
  padding: 2.4rem 2.4rem 2.6rem;
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 2rem;
  align-items: center;
}
@media (max-width: 880px) {
  .chapter-hero { grid-template-columns: 1fr; }
  .vision-figure { order: -1; }
}
.vision-h {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(2.2rem, 4.6vw, 3.4rem);
  line-height: 1.06;
  margin: 0 0 1rem;
  letter-spacing: 0.005em;
  color: var(--text);
}
.vision-lead {
  font-size: 1.06rem;
  color: var(--muted);
  max-width: 56ch;
  margin: 0 0 1rem;
}
.vision-lead em { color: var(--text); }
.vision-tag {
  margin: 0;
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  color: var(--candle);
  text-transform: lowercase;
  font-style: italic;
}
.vision-figure {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}
.vision-figure .compass {
  width: min(280px, 80%);
  height: auto;
  filter: drop-shadow(0 0 28px color-mix(in srgb, var(--candle) 40%, transparent));
}
.vision-fig-cap {
  font-size: 0.78rem;
  color: var(--muted);
  font-style: italic;
  letter-spacing: 0.05em;
}

/* ============================ FIGCAP ============================ */
.figcap {
  margin: 0.7rem 0 0;
  font-size: 0.8rem;
  color: var(--muted);
  font-style: italic;
  text-align: center;
}
.figcap a { color: var(--accent-strong); }

/* ============================ VMG CASCADE ============================ */
.vmg {
  margin: 0;
  background: color-mix(in srgb, var(--bg-deep) 50%, transparent);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1rem;
}
.vmg-svg { width: 100%; height: auto; max-height: 480px; display: block; }

/* ============================ ONTOLOGY BAND-STACK ============================ */
.bands {
  margin: 0;
  background: color-mix(in srgb, var(--bg-deep) 50%, transparent);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1rem;
}
.bands-svg { width: 100%; height: auto; max-height: 460px; display: block; }

/* ============================ PICARD WHEEL (cc-bridge style) ============================ */
.picard {
  margin: 0;
  background: radial-gradient(circle at center, color-mix(in srgb, var(--candle) 10%, var(--bg-deep)) 0%, var(--bg-deep) 70%);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.picard-frame {
  position: relative;
  width: min(520px, 100%);
  aspect-ratio: 1 / 1;
}
.phase-helm {
  width: 100%;
  height: 100%;
  overflow: visible;
  filter: drop-shadow(0 0 30px color-mix(in srgb, var(--candle) 28%, transparent));
}
.phase-node {
  cursor: default;
  transition: filter 180ms ease;
}
.phase-node path {
  stroke: var(--bg-deep);
  stroke-width: 18;
  vector-effect: non-scaling-stroke;
}
.phase-node text {
  font-family: var(--serif);
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  fill: var(--bg-deep);
  text-anchor: middle;
  dominant-baseline: middle;
  pointer-events: none;
}
.phase-node.accent-problem path { fill: var(--cvt-color-phase-problem, #c7837b); }
.phase-node.accent-core    path { fill: var(--cvt-color-phase-core, #dac68c); }
.phase-node.accent-doc     path { fill: var(--cvt-color-phase-doc, #82b398); }
.phase-node:hover { filter: brightness(1.12); }

.helm-core {
  position: absolute;
  inset: 50%;
  width: 36%;
  height: 36%;
  display: grid;
  place-items: center;
  text-align: center;
  gap: 0.18rem;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: linear-gradient(180deg, color-mix(in srgb, var(--bg) 88%, white 4%), var(--bg-deep));
  box-shadow:
    inset 0 0 0 12px var(--bg-deep),
    inset 0 0 0 1px color-mix(in srgb, var(--candle) 30%, transparent);
  pointer-events: none;
  padding: 1.1rem;
}
.helm-core-name {
  font-family: var(--serif);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--candle);
  letter-spacing: 0.16em;
}
.helm-core-sub {
  font-size: 0.74rem;
  color: var(--muted);
  letter-spacing: 0.08em;
}
.helm-core-tag {
  font-size: 0.7rem;
  color: var(--muted);
  font-style: italic;
  margin-top: 0.05rem;
}

/* ============================ CONSTELLATION ============================ */
.constellation {
  margin: 0;
  background: radial-gradient(circle at center, color-mix(in srgb, var(--candle) 6%, var(--bg-deep)) 0%, var(--bg-deep) 80%);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1rem;
}
.const-svg { width: 100%; height: auto; max-height: 600px; display: block; }
.const-svg .node { transition: transform 200ms ease, filter 200ms ease; transform-origin: center; transform-box: fill-box; }
.const-svg .node:hover { filter: brightness(1.18); }

/* ============================ GOLDEN PATH ============================ */
.goldenpath {
  margin: 0;
  background: linear-gradient(120deg, color-mix(in srgb, var(--candle) 6%, var(--bg-deep)) 0%, var(--bg-deep) 70%);
  border: 1px solid color-mix(in srgb, var(--candle) 32%, var(--line));
  border-radius: var(--radius-lg);
  padding: 1rem 1.2rem 1.6rem;
}
.gp-svg { width: 100%; height: auto; max-height: 240px; display: block; }

.gp-detail {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 0.55rem;
  counter-reset: gp;
}
.gp-detail li {
  counter-increment: gp;
  position: relative;
  padding: 0.7rem 0.85rem 0.75rem 2.6rem;
  background: var(--panel-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  line-height: 1.5;
}
.gp-detail li::before {
  content: counter(gp);
  position: absolute;
  left: 0.7rem; top: 0.55rem;
  width: 1.6rem; height: 1.6rem;
  border-radius: 50%;
  background: var(--candle);
  color: var(--bg-deep);
  font-family: var(--serif);
  font-weight: 700;
  font-size: 0.92rem;
  display: grid; place-items: center;
}

/* ============================ CONTENT LISTS — captain's question / co-authoring / voyages / companion ============================ */

.concept-list,
.principle-list,
.protocol-list,
.lifecycle-list,
.companion-list {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.55rem;
}
.concept-list li,
.principle-list li,
.companion-list li {
  background: var(--panel-soft);
  border: 1px solid var(--line);
  border-left: 3px solid color-mix(in srgb, var(--accent) 45%, transparent);
  border-radius: var(--radius-md);
  padding: 0.65rem 0.85rem 0.7rem;
  font-size: 0.92rem;
  line-height: 1.55;
}
.concept-list li strong,
.principle-list li strong,
.companion-list li strong { color: var(--accent-strong); }

.protocol-list { counter-reset: pl; }
.protocol-list li {
  position: relative;
  background: var(--panel-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 0.6rem 0.85rem 0.65rem 2.6rem;
  font-size: 0.9rem;
  line-height: 1.5;
  counter-increment: pl;
}
.protocol-list li::before {
  content: counter(pl);
  position: absolute;
  left: 0.7rem; top: 0.55rem;
  width: 1.5rem; height: 1.5rem;
  border-radius: 50%;
  background: color-mix(in srgb, var(--accent) 60%, transparent);
  color: var(--bg-deep);
  font-family: var(--serif);
  font-weight: 700;
  font-size: 0.84rem;
  display: grid; place-items: center;
}
.protocol-list li strong { color: var(--accent-strong); }

.lifecycle-list li {
  background: color-mix(in srgb, var(--candle) 8%, transparent);
  border: 1px solid color-mix(in srgb, var(--candle) 28%, var(--line));
  border-radius: var(--radius-md);
  padding: 0.55rem 0.85rem 0.6rem;
  font-size: 0.9rem;
  line-height: 1.5;
}
.lifecycle-list li strong { color: var(--candle); }

/* ============================ VOYAGES GRID ============================ */
.voyage-grid {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 0.85rem;
}
.voyage {
  background: var(--panel-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 0.95rem 1rem 1rem 2.4rem;
  position: relative;
  font-size: 0.88rem;
  line-height: 1.5;
}
.voyage h3 {
  margin: 0 0 0.3rem;
  font-size: 1rem;
  color: var(--accent-strong);
  font-family: var(--serif);
  line-height: 1.2;
}
.voyage h3 code { font-size: 0.86em; }
.voyage p { margin: 0; color: var(--muted); }
.voyage .voyage-num {
  position: absolute;
  left: 0.7rem; top: 0.85rem;
  width: 1.4rem; height: 1.4rem;
  border-radius: 50%;
  background: color-mix(in srgb, var(--candle) 26%, transparent);
  border: 1px solid color-mix(in srgb, var(--candle) 60%, transparent);
  color: var(--candle);
  font-family: var(--serif);
  font-weight: 700;
  font-size: 0.78rem;
  display: grid; place-items: center;
}

/* ============================ CALLOUTS / VISION CALLBACKS ============================ */
.callout {
  margin: 1rem 0 0;
  background: color-mix(in srgb, var(--accent) 8%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 26%, var(--line));
  border-left: 4px solid var(--accent);
  border-radius: var(--radius-md);
  padding: 0.85rem 1.05rem 0.95rem;
  font-size: 0.92rem;
}
.callout strong { color: var(--accent-strong); }

.vision-callback {
  margin: 1.2rem 0 0;
  font-size: 0.86rem;
  color: var(--muted);
  font-style: italic;
  letter-spacing: 0.01em;
  border-top: 1px dashed color-mix(in srgb, var(--candle) 28%, var(--line));
  padding: 0.8rem 0 0;
}
.vision-callback em { color: var(--candle); font-style: italic; }

/* ============================ ECHO ============================ */
.chapter-echo {
  background: linear-gradient(160deg, var(--panel-strong) 0%, color-mix(in srgb, var(--bg-deep) 82%, transparent) 100%);
  text-align: center;
  padding: 2.4rem 2rem 2.4rem;
}
.chapter-echo .lead { margin-left: auto; margin-right: auto; }

.echo-quote {
  margin: 1.6rem auto 0.7rem;
  max-width: 64ch;
  padding: 0 1rem;
  font-family: var(--serif);
  font-size: clamp(1.15rem, 2.4vw, 1.6rem);
  line-height: 1.4;
  color: var(--text);
  border-left: 0;
  position: relative;
}
.echo-quote::before, .echo-quote::after {
  content: "“";
  font-family: var(--serif);
  font-size: 2.4rem;
  color: var(--candle);
  vertical-align: -0.4rem;
  margin: 0 0.2rem;
}
.echo-quote::after { content: "”"; }

.echo-tag {
  margin: 0.4rem 0 0.8rem;
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  color: var(--candle);
  text-transform: lowercase;
  font-style: italic;
}
.echo-credit {
  max-width: 72ch;
  margin: 1rem auto 0;
  font-size: 0.86rem;
  color: var(--muted);
  line-height: 1.55;
}
.echo-credit strong { color: var(--candle); }
.echo-credit kbd {
  background: color-mix(in srgb, var(--candle) 16%, transparent);
  border: 1px solid color-mix(in srgb, var(--candle) 38%, transparent);
  color: var(--candle);
  font-size: 0.78em;
  padding: 0.06rem 0.5rem;
}

/* ================================================================ library (sidebar cross-links)
   + the reading pages (Volume I, In Principle) — prose devices the tour page never needed */

.sidebar-library {
  margin-top: 1.2rem;
  padding-top: 1rem;
  border-top: 1px dashed var(--line);
}
.library-list {
  list-style: none;
  margin: 0.4rem 0 0;
  padding: 0;
}
.library-list li { margin: 0.35rem 0; }
.library-list a {
  display: block;
  padding: 0.4rem 0.55rem;
  border-radius: 10px;
  font-size: 0.82rem;
  line-height: 1.35;
  color: var(--muted);
  text-decoration: none;
  border: 1px solid transparent;
}
.library-list a:hover {
  color: var(--text);
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  border-color: color-mix(in srgb, var(--accent) 24%, transparent);
}

.page-head h1 {
  margin: 0 0 0.4rem;
  font-family: var(--serif, Georgia, serif);
  font-size: clamp(1.9rem, 3.4vw, 2.6rem);
  line-height: 1.15;
}

.draft-chip {
  display: inline-block;
  margin-left: 0.6rem;
  padding: 0.14rem 0.6rem;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--candle) 42%, transparent);
  color: var(--candle);
  font: 600 0.68rem var(--sans);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  vertical-align: middle;
}

.chapter blockquote {
  margin: 1.2rem 0;
  padding: 0.8rem 1.1rem;
  border-left: 3px solid color-mix(in srgb, var(--candle) 55%, transparent);
  background: color-mix(in srgb, var(--panel, rgba(16,37,54,0.5)) 60%, transparent);
  border-radius: 0 12px 12px 0;
  color: var(--text);
  font-style: italic;
  max-width: 74ch;
}
.chapter blockquote p { margin: 0; }
.chapter blockquote p + p { margin-top: 0.6rem; }

.chapter pre {
  margin: 1.2rem 0;
  padding: 0.9rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: color-mix(in srgb, var(--cvt-color-surface-deep, #06131f) 80%, transparent);
  font-family: var(--mono);
  font-size: 0.84rem;
  line-height: 1.6;
  overflow-x: auto;
  max-width: 74ch;
}
.chapter pre code { background: none; border: 0; padding: 0; }

.truth {
  max-width: 74ch;
  color: var(--candle);
  font-style: italic;
}
.truth strong { color: var(--candle); }

.pivot-note {
  max-width: 74ch;
  margin: 0 0 1.2rem;
  padding: 0.6rem 1rem;
  border: 1px dashed color-mix(in srgb, var(--candle) 45%, transparent);
  border-radius: 12px;
  color: var(--candle);
  font-size: 0.88rem;
  letter-spacing: 0.04em;
}

.chapter .prose p { max-width: 74ch; }
.chapter .prose p + p { margin-top: 0.9rem; }

/* ================================================================ the sea map (sea-map.html)
   — full-screen experimental overview: the pages as islands on the generated map image.
   The stage keeps the image's aspect ratio locked, so the %-positioned tiles stay glued to
   their islands at every window size; the letterbox around it stays deep sea. */

.map-page {
  background: var(--cvt-color-surface-deep, #071120); overflow: hidden;
  display: flex; flex-direction: column; min-height: 100vh;
  /* the fixed top bar is out of flow — reserve its (measured) height so the centered
     stage can never slide underneath it */
  padding-top: var(--topnav-h, 64px);
  box-sizing: border-box;
}
.map-stage {
  position: relative;
  aspect-ratio: 1668 / 942;
  /* breathe: the stage centers vertically in the content area below the top bar,
     with at least 1rem of sea between bar and image */
  width: min(100vw - 2rem, calc((100vh - var(--topnav-h, 64px) - 2rem) * 1668 / 942));
  margin: auto;
  border-radius: 12px;
  background: url("./set-sail-sea-map-dark.png") center / 100% 100% no-repeat;
}
/* the map follows the theme — same island composition in every skin (sea-maps/PROVENANCE.md);
   Default keeps the original artwork */
:root[data-cvt-theme="dark"] .map-stage       { background-image: url("./sea-maps/dark.png"); }
:root[data-cvt-theme="light"] .map-stage      { background-image: url("./sea-maps/light.png"); }
:root[data-cvt-theme="pirate"] .map-stage     { background-image: url("./sea-maps/pirate.png"); }
:root[data-cvt-theme="space"] .map-stage      { background-image: url("./sea-maps/space.png"); }
:root[data-cvt-theme="wotlk"] .map-stage      { background-image: url("./sea-maps/wotlk.png"); }
:root[data-cvt-theme="neon"] .map-stage, :root[data-cvt-theme="neon-glass"] .map-stage             { background-image: url("./sea-maps/neon.png"); }
:root[data-cvt-theme="neon-light"] .map-stage, :root[data-cvt-theme="neon-glass-light"] .map-stage { background-image: url("./sea-maps/neon-light.png"); }
:root[data-cvt-theme="republik"] .map-stage   { background-image: url("./sea-maps/republik.png"); }
:root[data-cvt-theme="film-noir"] .map-stage  { background-image: url("./sea-maps/film-noir.png"); }
:root[data-cvt-theme="signal"] .map-stage     { background-image: url("./sea-maps/signal.png"); }
/* the light-ground maps need dark chips to stay readable — the tiles already are; the legend too */
.isle {
  position: absolute;
  left: var(--x); top: var(--y);
  transform: translate(-50%, -50%);
  display: flex; align-items: center; gap: 0.45rem;
  text-decoration: none;
  z-index: 2;
}
.isle-no {
  display: grid; place-items: center;
  width: 1.7rem; height: 1.7rem; border-radius: 50%;
  background: color-mix(in srgb, var(--cvt-color-candle-glow, #f0b46e) 92%, transparent);
  color: var(--cvt-color-surface-deep, #071120);
  font: 700 0.9rem var(--serif, Georgia, serif);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--cvt-color-candle-glow, #f0b46e) 25%, transparent), 0 2px 10px rgba(0, 0, 0, 0.5);
}
.isle-title {
  padding: 0.32rem 0.75rem; border-radius: 999px;
  background: color-mix(in srgb, var(--cvt-color-surface-deep, #071120) 78%, transparent);
  border: 1px solid color-mix(in srgb, var(--cvt-color-candle-glow, #f0b46e) 45%, transparent);
  color: var(--cvt-color-text, #f3e9d5);
  font: 600 0.95rem var(--serif, Georgia, serif);
  letter-spacing: 0.03em; white-space: nowrap;
  backdrop-filter: blur(3px);
  transition: border-color 120ms ease, background 120ms ease;
}
.isle:hover .isle-title {
  border-color: color-mix(in srgb, var(--cvt-color-candle-glow, #f0b46e) 90%, transparent);
  background: color-mix(in srgb, var(--cvt-color-surface-deep, #0a182a) 92%, transparent);
}
.isle-card {
  position: absolute; top: calc(100% + 0.55rem); left: 50%;
  transform: translateX(-50%);
  width: 19rem; max-width: 42vw;
  padding: 0.7rem 0.9rem; border-radius: 12px;
  background: color-mix(in srgb, var(--cvt-color-surface-deep, #071120) 94%, transparent);
  border: 1px solid color-mix(in srgb, var(--cvt-color-accent, #8cbedc) 35%, transparent);
  color: var(--cvt-color-text, rgba(233, 241, 255, 0.9));
  font-size: 0.84rem; line-height: 1.5;
  opacity: 0; visibility: hidden; transition: opacity 140ms ease;
  pointer-events: none;
}
.isle-card strong { display: block; color: var(--cvt-color-candle-glow, #f0b46e); margin-bottom: 0.25rem; }
.isle:hover .isle-card, .isle:focus-visible .isle-card { opacity: 1; visibility: visible; }
.isle.low .isle-card { top: auto; bottom: calc(100% + 0.55rem); }   /* low islands open upward, staying on the stage */
.map-legend {
  position: absolute; left: 2%; bottom: 3%; z-index: 1;
  max-width: 24rem; padding: 0.8rem 1rem; border-radius: 14px;
  background: color-mix(in srgb, var(--cvt-color-surface-deep, #071120) 82%, transparent);
  border: 1px solid color-mix(in srgb, var(--cvt-color-candle-glow, #f0b46e) 35%, transparent);
  backdrop-filter: blur(4px);
}
.map-legend h1 { margin: 0 0 0.3rem; font: 700 1.15rem var(--serif, Georgia, serif); color: var(--cvt-color-candle-glow, #f0b46e); }
.map-legend p { margin: 0; font-size: 0.82rem; line-height: 1.55; color: var(--cvt-color-text, rgba(233, 241, 255, 0.85)); }
.map-legend strong { color: var(--cvt-color-candle-glow, #f0b46e); }

/* ── voyage figures (voyages 2-4): thin, theme-aware inline SVG illustrations ── */
.voyage-fig { margin: 1.4rem 0 0.4rem; }
.voyage-fig svg { width: 100%; height: auto; max-width: 560px; display: block; color: var(--accent); }
.voyage-fig figcaption { font-size: 0.86rem; color: var(--muted); margin-top: 0.5rem; }

/* ── epigraph (in-principle page head): the public-domain source of the sea we sail ── */
.epigraph { margin: 1.2rem 0 0; padding-left: 0.9rem; border-left: 3px solid color-mix(in srgb, var(--cvt-color-candle-glow, #f0b46e) 60%, transparent); }
.epigraph p { margin: 0; font-style: italic; color: var(--text, var(--cvt-color-text, #e9f1ff)); }
.epigraph cite { display: block; margin-top: 0.25rem; font-size: 0.82rem; font-style: normal; color: var(--muted); }

/* ── card/tile links are READING material first (FW 2026-07-19): dragging across their text
   selects it instead of dragging the link ── */
.isle, .isle-card, .sidebar-list a, .home-card { -webkit-user-drag: none; user-select: text; }

/* First-use glossary notes.
   The term is marked where it first appears, and its definition - read from the
   one glossary at the end of the page - is dropped in directly below, so the
   reader never has to jump to the end and back. Injected by glossary.js. */
.gloss-term {
  border-bottom: 1px dotted color-mix(in srgb, var(--accent) 60%, transparent);
  color: var(--accent-strong);
}

.chapter .prose p.gloss-note {
  max-width: 74ch;
  margin: 0.55rem 0 0;
  padding: 0.5rem 0.9rem;
  border-left: 2px solid color-mix(in srgb, var(--accent) 50%, transparent);
  border-radius: 0 10px 10px 0;
  background: color-mix(in srgb, var(--accent) 7%, transparent);
  font-size: 0.9rem;
}

.gloss-note-term {
  font-weight: 700;
  color: var(--accent-strong);
}

.gloss-note-term::after { content: " \2014"; }
