/* VocaMac — Voca family workbench.
   Warm paper, deep ink, one green accent. Flat fills only; no gradients.

   Colour rules of the house:
   - Text tokens (--muted, --faint) clear 4.5:1 on every surface they land on.
   - Anything that outlines a control (--line-control) clears 3:1, so a button
     never depends on a hairline nobody can see.
   - --focus is redefined by dark surfaces instead of being one fixed colour. */

:root {
  --paper: #f4f1e8;
  --paper-deep: #ebe5d8;
  --paper-bright: #fffdf7;
  --ink: #14231c;
  --muted: #58625c;
  --faint: #5f6861;
  --faint-inverse: #94a89f;
  --line: #c9c8bd;
  --line-dark: #9ea59f;
  --line-control: #5c7d71;
  --brand: #0f6b57;
  --teal: var(--brand);
  --brand-dark: #0b493d;
  --brand-soft: #cfe9dc;
  --brand-softer: #e5f2eb;
  --dark-ink: #0b1a15;
  --sun: #e9b949;
  --red: #de6a57;
  --focus: var(--brand-dark);
  --veil-08: rgba(207, 233, 220, 0.08);
  --veil-14: rgba(207, 233, 220, 0.14);
  --veil-30: rgba(207, 233, 220, 0.3);
  --veil-45: rgba(207, 233, 220, 0.45);
  /* HQ display stack, plus Windows faces. The old Apple display name is
     gone: Windows does not ship it, and a hole in Helvetica Neue italic
     used to dump headings into Times New Roman. Segoe UI and Arial close
     that hole. */
  --display: "Avenir Next", "Helvetica Neue", ui-sans-serif, system-ui, "Segoe UI", Arial, sans-serif;
  --body: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Monaco, Consolas, monospace;
  --shell: min(1180px, calc(100% - 2rem));
  --radius-sm: 0.45rem;
  --radius-md: 1rem;
  --radius-lg: 1.4rem;
  --ease: cubic-bezier(0.22, 0.8, 0.24, 1);
  --shadow-paper: 0 1px 0 rgba(20, 35, 28, 0.04), 0 2px 8px rgba(20, 35, 28, 0.05);
  --shadow-lift: 0 6px 18px rgba(20, 35, 28, 0.09), 0 1px 3px rgba(20, 35, 28, 0.06);
  --shadow-window: 0 12px 32px rgba(20, 35, 28, 0.12), 0 2px 6px rgba(20, 35, 28, 0.06);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  background: var(--paper);
}

body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  color: var(--ink);
  background: var(--paper) url("/brand/paper-dots.svg") repeat;
  font-family: var(--body);
  font-size: 1rem;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }

.icon { display: block; flex: none; }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 2px;
}

.shell { width: var(--shell); margin-inline: auto; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 0.6rem;
  left: 0.75rem;
  padding: 0.7rem 1rem;
  color: var(--paper-bright);
  background: var(--brand-dark);
  border-radius: var(--radius-sm);
  font-weight: 600;
  text-decoration: none;
  transform: translateY(-180%);
  transition: transform 160ms var(--ease);
}

.skip-link:focus { transform: translateY(0); }

/* ---------- Typography ---------- */

h1, h2, h3, h4 {
  margin: 0;
  font-family: var(--display);
  font-weight: 760;
  line-height: 1.08;
  letter-spacing: -0.065em;
}

/* em does not keep the heading stack when the user-agent italic face is
   missing. Repeat the Windows-safe list so Chrome cannot fall to Times. */
h1 em, h2 em, h3 em, h4 em {
  font-family: var(--display);
}

p { margin: 0; }

.section-tag {
  display: inline-block;
  margin-bottom: 1.1rem;
  padding: 0.3rem 0.6rem;
  color: var(--brand-dark);
  background: var(--brand-softer);
  border: 1px solid var(--brand-soft);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.section-title {
  max-width: 20ch;
  font-size: clamp(2.2rem, 6vw, 4.7rem);
  font-weight: 760;
  letter-spacing: -0.065em;
  line-height: 1.06;
}

.section-lede {
  max-width: 62ch;
  margin-top: 1.1rem;
  color: var(--muted);
  font-size: 1.0625rem;
}

.section-head { margin-bottom: 3rem; }

section { padding: 5.5rem 0; }

/* The header is sticky, so an in-page jump has to stop short of it or the
   section tag and title land underneath the nav. */
section[id] { scroll-margin-top: 4.6rem; }

/* Alternating paper weights give the long page a rhythm. */
.models-section, .install-section { background: var(--paper-deep); }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  gap: 0.5rem;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.85rem 1.5rem;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-family: var(--body);
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition:
    transform 170ms var(--ease),
    box-shadow 170ms var(--ease),
    color 170ms var(--ease),
    background-color 170ms var(--ease),
    border-color 170ms var(--ease);
}

.btn-arrow {
  display: inline-block;
  transition: transform 200ms var(--ease);
}

.btn:hover .btn-arrow,
a:hover > .btn-arrow { transform: translateX(3px); }

.btn:hover .btn-arrow-down,
a:hover > .btn-arrow-down { transform: translateY(3px); }

.btn:hover .btn-arrow-back,
a:hover > .btn-arrow-back { transform: translateX(-3px); }

.btn-primary {
  color: var(--paper-bright);
  background: var(--brand);
  border-color: var(--brand-dark);
}

.btn-primary:hover {
  background: var(--brand-dark);
  box-shadow: var(--shadow-lift);
  transform: translateY(-2px);
}

/* The secondary button used to be a near-white slab, which glared against the
   warm paper and leaned on a 2.5:1 hairline. It now borrows the surface it
   sits on and outlines itself in a brand tint that actually clears 3:1. */
.btn-secondary {
  color: var(--ink);
  background: transparent;
  border-color: var(--line-control);
}

.btn-secondary:hover {
  color: var(--brand-dark);
  background: var(--brand-softer);
  border-color: var(--brand);
  box-shadow: var(--shadow-paper);
  transform: translateY(-2px);
}

.btn-primary:active, .btn-secondary:active {
  box-shadow: none;
  transform: translateY(0) scale(0.985);
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  z-index: 50;
  top: 0;
  border-bottom: 1px solid transparent;
  background: var(--paper);
  transition: border-color 220ms var(--ease), box-shadow 220ms var(--ease);
}

.site-header.is-scrolled {
  border-bottom-color: var(--line);
  box-shadow: 0 6px 18px rgba(20, 35, 28, 0.05);
}

.header-inner {
  display: flex;
  gap: 1rem;
  align-items: center;
  min-height: 4.4rem;
}

.brand {
  display: inline-flex;
  gap: 0.55rem;
  align-items: center;
  font-family: var(--display);
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.brand img {
  width: 28px;
  height: 28px;
  transition: transform 320ms var(--ease);
}

.brand:hover img { transform: rotate(-8deg) scale(1.06); }

.nav-links {
  display: flex;
  gap: 1.6rem;
  margin: 0 0 0 auto;
  padding: 0;
  list-style: none;
}

.nav-links a {
  position: relative;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  transition: color 160ms var(--ease);
}

.nav-links a::after {
  position: absolute;
  right: 0;
  bottom: -0.35rem;
  left: 0;
  height: 2px;
  background: var(--brand);
  border-radius: 2px;
  content: "";
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 220ms var(--ease);
}

.nav-links a:hover { color: var(--brand-dark); }
.nav-links a:hover::after { transform: scaleX(1); }

.header-cta { margin-left: 1.4rem; padding: 0.6rem 1.1rem; font-size: 0.92rem; }

.nav-toggle {
  display: none;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-left: auto;
  color: var(--ink);
  background: var(--paper-bright);
  border: 1px solid var(--line-control);
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.nav-toggle-bars {
  display: grid;
  gap: 4px;
  width: 18px;
}

.nav-toggle-bars i {
  display: block;
  height: 2px;
  background: currentcolor;
  border-radius: 2px;
  transition: transform 240ms var(--ease), opacity 160ms var(--ease);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bars i:first-child { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars i:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars i:last-child { transform: translateY(-6px) rotate(-45deg); }

.mobile-nav { display: none; }

/* ---------- Hero ---------- */

.hero { padding: 4.5rem 0 5rem; }

.hero-inner {
  display: grid;
  gap: 3.5rem;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  align-items: center;
}

.hero h1 {
  max-width: 15ch;
  font-size: clamp(3.7rem, 10vw, 7.4rem);
  font-weight: 780;
  letter-spacing: -0.075em;
  line-height: 0.92;
}

.hero h1 em {
  color: var(--teal);
  font-family: var(--display);
  font-style: normal;
}

.hero-lede {
  max-width: 52ch;
  margin-top: 1.4rem;
  color: var(--muted);
  font-size: 1.15rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 2.1rem;
}

.hero-proof {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  margin-top: 2.1rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  color: var(--faint);
  font-family: var(--mono);
  font-size: 0.78rem;
}

.hero-proof span { white-space: nowrap; }

.hero-proof span + span {
  padding-left: 1rem;
  border-left: 1px solid var(--line);
}

/* ---------- macOS window chrome ---------- */

.window {
  overflow: hidden;
  background: var(--paper-bright);
  border: 1px solid var(--line-dark);
  border-radius: 11px;
  box-shadow: var(--shadow-window);
}

.window-bar {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  padding: 0.6rem 0.85rem;
  background: var(--paper-deep);
  border-bottom: 1px solid var(--line);
}

.window-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
}

.window-dot-red { background: #ec6a5e; }
.window-dot-yellow { background: #f4bf50; }
.window-dot-green { background: #61c454; }

.window-title {
  margin-left: 0.4rem;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 0.72rem;
}

/* Hero-only. A grid with one gap keeps the panel's rhythm in a single place
   instead of every child bringing its own margin. */
.window-body {
  display: grid;
  gap: 1.3rem;
  padding: 1.5rem 1.6rem 1.6rem;
}

/* ---------- Hero workbench ---------- */

.workbench { display: grid; gap: 1rem; }

.workbench-header {
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
}

.workbench-header strong {
  display: block;
  font-family: var(--display);
  font-size: 1.05rem;
}

.workbench-hint {
  display: block;
  margin-top: 0.25rem;
  color: var(--muted);
  font-size: 0.82rem;
}

.status-badge {
  display: inline-flex;
  gap: 0.45rem;
  align-items: center;
  padding: 0.35rem 0.6rem;
  color: var(--brand-dark);
  background: var(--brand-softer);
  border: 1px solid var(--brand-soft);
  border-radius: var(--radius-sm);
  font-family: var(--mono);
  font-size: 0.68rem;
  text-transform: uppercase;
}

.status-badge i {
  position: relative;
  width: 6px;
  height: 6px;
  background: var(--brand);
  border-radius: 50%;
}

.status-badge i::after {
  position: absolute;
  inset: -3px;
  border: 1px solid var(--brand);
  border-radius: 50%;
  content: "";
  animation: halo 2.4s var(--ease) infinite;
}

.menubar {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  padding: 0.45rem 0.9rem;
  color: var(--paper-bright);
  background: var(--dark-ink);
  border-radius: 8px;
  font-family: var(--mono);
  font-size: 0.74rem;
}

.menubar-mark {
  width: 15px;
  height: 15px;
  filter: brightness(0) invert(1);
}

.menubar-status {
  display: inline-flex;
  gap: 0.55rem;
  align-items: center;
  margin-left: auto;
  color: var(--brand-soft);
}

.rec-dot {
  position: relative;
  width: 7px;
  height: 7px;
  background: var(--red);
  border-radius: 50%;
}

.rec-dot::after {
  position: absolute;
  inset: -3px;
  border: 1px solid var(--red);
  border-radius: 50%;
  content: "";
  animation: halo 1.8s var(--ease) infinite;
}

@keyframes halo {
  0% { opacity: 0.85; transform: scale(0.55); }
  70%, 100% { opacity: 0; transform: scale(1.7); }
}

/* Fewer, further-apart bars read as a level meter; packed tight they read as
   a picket fence. */
.waveform {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 54px;
}

.waveform i {
  display: block;
  flex: none;
  width: 4px;
  height: 30%;
  background: var(--brand);
  border-radius: 2px;
  animation: wave 1.15s var(--ease) infinite alternate;
  --amp: 78%;
}

/* Varied amplitudes and offsets so the meter reads like speech, not a metronome. */
.waveform i:nth-child(3n) { --amp: 52%; }
.waveform i:nth-child(4n) { --amp: 96%; }
.waveform i:nth-child(5n) { --amp: 36%; }
.waveform i:nth-child(7n) { --amp: 88%; }
.waveform i:nth-child(6n+1) { animation-delay: -0.12s; }
.waveform i:nth-child(6n+2) { animation-delay: -0.47s; }
.waveform i:nth-child(6n+3) { animation-delay: -0.83s; }
.waveform i:nth-child(6n+4) { animation-delay: -0.29s; }
.waveform i:nth-child(6n+5) { animation-delay: -0.66s; }
.waveform i:nth-child(6n+6) { animation-delay: -1.01s; }

@keyframes wave {
  from { height: 16%; }
  to { height: var(--amp); }
}

/* Inline flow, not flex: as a flex item the caret parked at the end of the
   first line instead of following the last word once the text wrapped. */
.editor-line {
  min-height: 4rem;
  padding: 1.05rem 1.15rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  line-height: 1.5;
}

/* Words land one after another, the way a transcript actually arrives. */
.editor-text span {
  display: inline-block;
  opacity: 0;
  animation: word-in 380ms var(--ease) forwards;
}

.editor-text span:first-child { animation-delay: 0.35s; }
.editor-text span:nth-child(2) { animation-delay: 0.47s; }
.editor-text span:nth-child(3) { animation-delay: 0.59s; }
.editor-text span:nth-child(4) { animation-delay: 0.71s; }
.editor-text span:nth-child(5) { animation-delay: 0.83s; }
.editor-text span:nth-child(6) { animation-delay: 0.95s; }
.editor-text span:nth-child(7) { animation-delay: 1.07s; }
.editor-text span:nth-child(8) { animation-delay: 1.19s; }
.editor-text span:nth-child(9) { animation-delay: 1.31s; }

@keyframes word-in {
  from { opacity: 0; transform: translateY(0.3em); }
  to { opacity: 1; transform: none; }
}

.caret {
  display: inline-block;
  width: 2px;
  height: 1.15em;
  margin-left: 2px;
  background: var(--brand);
  transform: translateY(0.18em);
  animation: blink 1.05s steps(2, start) infinite;
}

@keyframes blink { 50% { opacity: 0; } }

.workbench-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.chip {
  padding: 0.28rem 0.55rem;
  color: var(--brand-dark);
  background: var(--brand-softer);
  border: 1px solid var(--brand-soft);
  border-radius: var(--radius-sm);
  font-family: var(--mono);
  font-size: 0.7rem;
}

/* ---------- Card icon tile ---------- */

.card-icon {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 1.1rem;
  color: var(--brand-dark);
  background: var(--brand-softer);
  border: 1px solid var(--brand-soft);
  border-radius: 13px;
  transition: transform 260ms var(--ease), color 260ms var(--ease), background-color 260ms var(--ease);
}

.card-icon .icon { width: 22px; height: 22px; }

.step:hover .card-icon,
.config-item:hover .card-icon,
.install-card:hover .card-icon,
.feature-entry:hover .card-icon {
  color: var(--paper-bright);
  background: var(--brand);
  transform: translateY(-2px) rotate(-4deg);
}

/* ---------- Steps ---------- */

.steps {
  display: grid;
  gap: 1.4rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  counter-reset: step;
}

.step {
  padding: 1.6rem;
  background: var(--paper-bright);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-paper);
  transition: transform 240ms var(--ease), border-color 240ms var(--ease), box-shadow 240ms var(--ease);
}

.step:hover, .config-item:hover, .install-card:hover {
  border-color: var(--brand-soft);
  box-shadow: var(--shadow-lift);
  transform: translateY(-3px);
}

.step-index {
  display: block;
  margin-bottom: 0.9rem;
  color: var(--brand);
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
}

.step h3 { margin-bottom: 0.55rem; font-size: 1.2rem; }
.step p { color: var(--muted); font-size: 0.97rem; }

.step-note {
  margin-top: 1rem;
  padding-top: 0.9rem;
  border-top: 1px dashed var(--line);
  color: var(--faint);
  font-family: var(--mono);
  font-size: 0.74rem;
}

/* ---------- Models ---------- */

.models-layout {
  display: grid;
  gap: 3rem;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  align-items: start;
}

/* The rounded frame lives on the scroll container: a collapsed table cannot
   clip its own corners, so the old radius on the table never rendered. */
.table-scroll {
  overflow-x: auto;
  background: var(--paper-bright);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}

.table-scroll + .table-scroll { margin-top: 1.25rem; }

.model-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.94rem;
}

.model-table caption {
  padding: 0.85rem 0.9rem;
  color: var(--faint);
  border-bottom: 1px solid var(--line);
  font-size: 0.85rem;
  text-align: left;
}

.model-table th, .model-table td {
  padding: 0.7rem 0.9rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.model-table thead th {
  color: var(--muted);
  background: var(--paper-deep);
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.model-table tbody tr { transition: background-color 160ms var(--ease); }
.model-table tbody tr:hover { background: var(--brand-softer); }

.model-table tbody tr:last-child th,
.model-table tbody tr:last-child td { border-bottom: 0; }

.model-table tbody th { font-weight: 600; }
.model-table td { color: var(--muted); font-family: var(--mono); font-size: 0.85rem; white-space: nowrap; }
.model-table .model-note { font-family: var(--body); font-size: 0.9rem; white-space: normal; }

.note {
  padding: 1.15rem 1.3rem;
  background: var(--paper-bright);
  border: 1px solid var(--line);
  border-left: 3px solid var(--brand);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-paper);
}

.note + .note { margin-top: 1rem; }

.note h3 {
  margin-bottom: 0.45rem;
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.note p { color: var(--muted); font-size: 0.95rem; }
.note-nightly { border-left-color: #a3781a; }

/* ---------- Proof / screenshots ---------- */

.proof-grid {
  display: grid;
  gap: 1.8rem;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.section-link { margin-top: 1.6rem; }

.section-link a,
.text-link {
  display: inline-flex;
  gap: 0.35rem;
  align-items: center;
  color: var(--brand-dark);
  font-weight: 600;
  text-decoration: none;
}

.section-link a:hover,
.text-link:hover { text-decoration: underline; text-underline-offset: 0.18em; }

.shot {
  overflow: hidden;
  background: var(--paper-bright);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-paper);
  transition: transform 260ms var(--ease), border-color 260ms var(--ease), box-shadow 260ms var(--ease);
}

.shot:hover {
  border-color: var(--brand-soft);
  box-shadow: var(--shadow-window);
  transform: translateY(-3px);
}

.shot img {
  width: 100%;
  border-bottom: 1px solid var(--line);
  background: var(--paper-deep);
  transition: transform 500ms var(--ease);
}

.shot:hover img { transform: scale(1.025); }

.shot figcaption {
  padding: 1rem 1.15rem;
  color: var(--muted);
  font-size: 0.93rem;
}

.shot figcaption strong {
  display: block;
  margin-bottom: 0.2rem;
  color: var(--ink);
  font-family: var(--display);
  font-size: 1.02rem;
}

/* ---------- Privacy route ---------- */

.privacy {
  color: var(--paper-bright);
  background: var(--dark-ink);
  --focus: var(--sun);
}

.privacy .section-title, .privacy h3 { color: var(--paper-bright); }
.privacy .section-lede { color: var(--brand-soft); }

.privacy .section-tag {
  color: var(--brand-soft);
  background: var(--veil-08);
  border-color: var(--veil-30);
}

.route {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: stretch;
  margin: 0 0 1.1rem;
  padding: 1.6rem;
  background: var(--veil-08);
  border: 1px solid var(--veil-30);
  border-radius: var(--radius-md);
  list-style: none;
}

.route-step {
  display: flex;
  flex: 1 1 190px;
  gap: 0.5rem;
  align-items: center;
}

.route-node {
  display: grid;
  flex: 1 1 auto;
  gap: 0.3rem;
  height: 100%;
  padding: 0.95rem 1rem;
  align-content: start;
  color: var(--brand-soft);
  background: var(--veil-08);
  border: 1px solid var(--veil-30);
  border-radius: var(--radius-sm);
  transition: border-color 240ms var(--ease), background-color 240ms var(--ease), transform 240ms var(--ease);
}

.route-node:hover {
  background: var(--veil-14);
  border-color: var(--veil-45);
  transform: translateY(-2px);
}

.route-icon { color: var(--brand-soft); }
.route-icon .icon { width: 20px; height: 20px; }

.route-name {
  color: var(--paper-bright);
  font-family: var(--mono);
  font-size: 0.79rem;
  line-height: 1.35;
}

.route-sub { color: var(--brand-soft); font-size: 0.72rem; line-height: 1.35; opacity: 0.8; }

.route-link { flex: none; color: var(--brand-soft); fill: none; }
.route-track { stroke: currentcolor; stroke-width: 1.4; opacity: 0.3; }

.route-head {
  stroke: currentcolor;
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.5;
}

/* A pulse walks each hop, so the diagram reads as a live path. */
.route-pulse {
  stroke: currentcolor;
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-dasharray: 7 57;
  animation: route-pulse 2.6s linear infinite;
}

.route-step:nth-child(2) .route-pulse { animation-delay: 0.55s; }
.route-step:nth-child(3) .route-pulse { animation-delay: 1.1s; }

@keyframes route-pulse {
  from { stroke-dashoffset: 64; }
  to { stroke-dashoffset: 0; }
}

.route-negative {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
  margin-bottom: 3rem;
  padding: 1rem 1.25rem;
  color: var(--brand-soft);
  background: var(--veil-08);
  border: 1px dashed var(--veil-30);
  border-radius: var(--radius-md);
  font-size: 0.95rem;
}

.route-negative strong { color: var(--paper-bright); }
.route-negative-icon { flex: none; color: var(--sun); }

.boundaries {
  display: grid;
  gap: 1.3rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.boundary {
  padding: 1.35rem;
  background: var(--veil-08);
  border: 1px solid var(--veil-30);
  border-radius: var(--radius-md);
  transition: border-color 240ms var(--ease), background-color 240ms var(--ease), transform 240ms var(--ease);
}

.boundary:hover {
  background: var(--veil-14);
  border-color: var(--veil-45);
  transform: translateY(-3px);
}

.boundary .card-icon {
  color: var(--brand-soft);
  background: var(--veil-08);
  border-color: var(--veil-30);
}

.boundary:hover .card-icon {
  color: var(--dark-ink);
  background: var(--brand-soft);
  transform: translateY(-2px) rotate(-4deg);
}

.boundary h3 {
  margin-bottom: 0.5rem;
  font-family: var(--mono);
  font-size: 0.76rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.boundary p { color: var(--brand-soft); font-size: 0.94rem; opacity: 0.92; }

/* ---------- Configuration ---------- */

.config-grid {
  display: grid;
  gap: 1.2rem;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.config-item {
  padding: 1.3rem;
  background: var(--paper-bright);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  transition: transform 240ms var(--ease), border-color 240ms var(--ease), box-shadow 240ms var(--ease);
}

.config-item h3 { margin-bottom: 0.4rem; font-size: 1.05rem; }
.config-item p { color: var(--muted); font-size: 0.93rem; }

.config-item a {
  display: inline-flex;
  gap: 0.3rem;
  align-items: center;
  margin-top: 0.6rem;
  color: var(--brand-dark);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
}

.config-item a:hover { text-decoration: underline; text-underline-offset: 0.18em; }

/* ---------- Install ---------- */

.install-grid {
  display: grid;
  gap: 1.8rem;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  align-items: start;
}

.install-card {
  padding: 1.8rem;
  background: var(--paper-bright);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-paper);
}

.install-card h3 { margin-bottom: 0.5rem; font-size: 1.35rem; }
.install-card > p { color: var(--muted); font-size: 0.96rem; }

.install-card-primary { border-color: var(--brand); }

.install-card .card-icon { display: grid; margin-bottom: 0.95rem; }
.install-card .btn { margin-top: 1.2rem; }

.install-detail {
  margin-top: 0.85rem;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 0.76rem;
}

.install-card .text-link { display: inline-flex; margin-top: 0.75rem; }

.install-label {
  display: inline-block;
  margin-bottom: 0.8rem;
  color: var(--brand-dark);
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* The copy button is pinned to the block, and only the <pre> scrolls, so the
   button neither slides out of view nor sits on top of a long command. */
.code-block {
  position: relative;
  margin: 1.1rem 0;
  color: var(--paper-bright);
  background: var(--dark-ink);
  border-radius: var(--radius-sm);
  --focus: var(--sun);
}

.code-block pre {
  margin: 0;
  padding: 1rem 4.4rem 1rem 1.1rem;
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 0.85rem;
  line-height: 1.8;
}

.code-block .prompt { color: var(--faint-inverse); user-select: none; }

.copy-btn {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  min-width: 44px;
  min-height: 44px;
  padding: 0.3rem 0.6rem;
  color: var(--brand-soft);
  background: var(--veil-14);
  border: 1px solid var(--veil-30);
  border-radius: 5px;
  font-family: var(--mono);
  font-size: 0.7rem;
  cursor: pointer;
  transition: color 160ms var(--ease), background-color 160ms var(--ease), border-color 160ms var(--ease), transform 160ms var(--ease);
}

.copy-btn:hover { background: var(--veil-30); }
.copy-btn:active { transform: scale(0.94); }

.copy-btn.is-copied {
  color: var(--dark-ink);
  background: var(--brand-soft);
  border-color: var(--brand-soft);
  animation: pop 260ms var(--ease);
}

@keyframes pop {
  0% { transform: scale(0.9); }
  60% { transform: scale(1.06); }
  100% { transform: scale(1); }
}

.install-steps { margin: 1.1rem 0 0; padding-left: 1.2rem; color: var(--muted); font-size: 0.96rem; }
.install-steps li { margin-bottom: 0.4rem; }

.requirements {
  display: grid;
  gap: 0.9rem;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  margin-top: 2.2rem;
  padding: 1.5rem;
  background: var(--paper-bright);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}

.requirement dt {
  color: var(--faint);
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.requirement dd { margin: 0.3rem 0 0; font-size: 0.95rem; font-weight: 500; }

details.source-install {
  margin-top: 1.8rem;
  padding: 1.2rem 1.5rem;
  background: var(--paper-bright);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}

details.source-install summary {
  font-family: var(--display);
  font-size: 1.05rem;
  font-weight: 600;
  cursor: pointer;
}

/* ---------- Open source ---------- */

.oss-layout {
  display: grid;
  gap: 3rem;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
}

.family-link {
  display: inline-flex;
  gap: 0.6rem;
  align-items: center;
  padding: 0.9rem 1.3rem;
  background: var(--paper-bright);
  border: 1px solid var(--line-control);
  border-radius: var(--radius-sm);
  font-weight: 600;
  text-decoration: none;
  transition: transform 200ms var(--ease), border-color 200ms var(--ease), box-shadow 200ms var(--ease);
}

.family-link:hover {
  border-color: var(--brand);
  box-shadow: var(--shadow-lift);
  transform: translateY(-2px);
}

.family-link img { width: 22px; height: 22px; }

.oss-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.4rem;
  margin-top: 1.6rem;
}

.oss-links a {
  display: inline-flex;
  gap: 0.3rem;
  align-items: center;
  color: var(--brand-dark);
  font-weight: 600;
}

/* ---------- FAQ ---------- */

.faq { max-width: 820px; }

.faq details {
  padding: 1.25rem 1.4rem;
  background: var(--paper-bright);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  transition: border-color 200ms var(--ease);
}

.faq details:hover, .faq details[open] { border-color: var(--brand-soft); }

.faq details + details { margin-top: 0.85rem; }

.faq summary {
  position: relative;
  padding-right: 2.4rem;
  font-family: var(--display);
  font-size: 1.08rem;
  font-weight: 600;
  list-style: none;
  cursor: pointer;
}

.faq summary::-webkit-details-marker { display: none; }

/* Two bars that cross into a plus, then fold into a minus when the answer opens. */
.faq summary::before, .faq summary::after {
  position: absolute;
  top: 0.62em;
  right: 0.4rem;
  width: 14px;
  height: 2px;
  background: var(--brand);
  border-radius: 2px;
  content: "";
  transition: transform 260ms var(--ease);
}

.faq summary::after { transform: rotate(90deg); }
.faq details[open] summary::after { transform: rotate(180deg); }

.faq details p {
  margin-top: 0.9rem;
  color: var(--muted);
  font-size: 0.98rem;
}

.faq details[open] p { animation: answer-in 300ms var(--ease); }

@keyframes answer-in {
  from { opacity: 0; transform: translateY(-5px); }
  to { opacity: 1; transform: none; }
}

/* ---------- Final CTA ---------- */

.final-cta { padding: 5rem 0; text-align: center; background: var(--paper-deep); }
.final-cta h2 { margin-inline: auto; max-width: 18ch; font-size: clamp(2rem, 4.4vw, 3rem); }
.final-cta p { margin: 1.1rem auto 0; max-width: 54ch; color: var(--muted); }

.final-cta .hero-actions { justify-content: center; }

.final-cta .hero-proof { justify-content: center; border-top: 0; }

/* ---------- Footer ---------- */

.site-footer {
  padding: 3.5rem 0 2.5rem;
  border-top: 1px solid var(--line);
}

.footer-inner {
  display: grid;
  gap: 2.5rem;
  grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr));
}

.footer-brand p { margin-top: 0.8rem; max-width: 34ch; color: var(--muted); font-size: 0.92rem; }

.footer-col h2 {
  margin-bottom: 0.85rem;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.footer-col ul { margin: 0; padding: 0; list-style: none; }
.footer-col li + li { margin-top: 0.5rem; }

.footer-col a {
  color: var(--muted);
  font-size: 0.93rem;
  text-decoration: none;
  transition: color 160ms var(--ease);
}

.footer-col a:hover { color: var(--brand-dark); }

.footer-base {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.5rem;
  justify-content: space-between;
  margin-top: 3rem;
  padding-top: 1.6rem;
  border-top: 1px solid var(--line);
  color: var(--faint);
  font-size: 0.87rem;
}

/* ---------- Interior pages ---------- */

.page-hero { padding: 3.5rem 0 2.5rem; border-bottom: 1px solid var(--line); }

.page-hero-head {
  display: flex;
  gap: 1.4rem;
  align-items: flex-start;
}

.page-hero-icon {
  display: grid;
  flex: none;
  place-items: center;
  width: 60px;
  height: 60px;
  margin-top: 0.35rem;
  color: var(--brand-dark);
  background: var(--brand-softer);
  border: 1px solid var(--brand-soft);
  border-radius: 17px;
}

.page-hero-icon .icon { width: 28px; height: 28px; }

/* Block-level: the tag that follows is an inline-block, so an inline back link
   ended up sharing its line. */
.back-link {
  display: flex;
  gap: 0.35rem;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  margin-bottom: 1.4rem;
  color: var(--brand-dark);
  font-family: var(--mono);
  font-size: 0.82rem;
  text-decoration: none;
}

.back-link:hover { text-decoration: underline; text-underline-offset: 0.18em; }

.page-hero h1 { max-width: 22ch; font-size: clamp(2.4rem, 5vw, 3.6rem); }
.page-hero p { max-width: 60ch; margin-top: 1rem; color: var(--muted); }

/* Article + sticky contents. The measure used to sit alone against a third of
   a page of empty paper; the outline now does the work that space was doing. */
.doc-layout {
  display: grid;
  gap: 3rem;
  grid-template-columns: minmax(0, 1fr) 15rem;
  align-items: start;
}

.doc-aside { padding: 3.5rem 0; }

.doc-aside-inner {
  position: sticky;
  top: 5.6rem;
  padding: 1.25rem 1.35rem;
  background: var(--paper-bright);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-paper);
}

.doc-aside-title {
  margin-bottom: 0.7rem;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.doc-aside-link { margin-top: 1.1rem; font-size: 0.9rem; }

#TableOfContents ul { margin: 0; padding: 0; list-style: none; }
#TableOfContents ul ul { padding-left: 0.7rem; }
#TableOfContents li + li { margin-top: 0.15rem; }

#TableOfContents a {
  display: block;
  padding: 0.25rem 0 0.25rem 0.7rem;
  color: var(--muted);
  border-left: 2px solid var(--line);
  font-size: 0.88rem;
  line-height: 1.35;
  text-decoration: none;
  transition: color 180ms var(--ease), border-color 180ms var(--ease);
}

#TableOfContents a:hover { color: var(--brand-dark); border-left-color: var(--brand-soft); }

#TableOfContents a.is-current {
  color: var(--brand-dark);
  border-left-color: var(--brand);
  font-weight: 600;
}

.prose { max-width: 44rem; margin-inline: auto; padding: 3.5rem 0; }
.doc-layout .prose { margin-inline: 0; }
.prose h2 { margin: 2.4rem 0 0.9rem; font-size: 1.6rem; scroll-margin-top: 6rem; }
.prose h3 { margin: 1.8rem 0 0.7rem; font-size: 1.25rem; scroll-margin-top: 6rem; }
.prose p, .prose li { color: var(--muted); }
.prose p { margin-bottom: 1.1rem; }
.prose ul, .prose ol { margin-bottom: 1.1rem; padding-left: 1.3rem; }
.prose li { margin-bottom: 0.45rem; }

/* Scoped away from .btn: the bare `.prose a` rule used to out-specify
   .btn-primary and paint the call to action dark green on green. */
.prose a:not(.btn) { color: var(--brand-dark); font-weight: 500; }
.prose strong { color: var(--ink); }

.prose code {
  padding: 0.15rem 0.4rem;
  background: var(--paper-deep);
  border: 1px solid var(--line);
  border-radius: 4px;
  font-family: var(--mono);
  font-size: 0.87em;
}

.prose pre {
  padding: 1.1rem;
  overflow-x: auto;
  color: var(--paper-bright);
  background: var(--dark-ink);
  border-radius: var(--radius-sm);
}

.prose pre code { padding: 0; color: inherit; background: none; border: 0; }

.prose blockquote {
  margin: 1.4rem 0;
  padding: 0.9rem 1.2rem;
  color: var(--muted);
  background: var(--paper-bright);
  border-left: 3px solid var(--brand);
  border-radius: var(--radius-sm);
}

.prose img { margin: 1.4rem 0; border: 1px solid var(--line); border-radius: var(--radius-sm); }

.prose table {
  width: 100%;
  margin-bottom: 1.4rem;
  background: var(--paper-bright);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  border-collapse: collapse;
  font-size: 0.94rem;
}

.prose th, .prose td { padding: 0.65rem 0.85rem; border-bottom: 1px solid var(--line); text-align: left; }
.prose thead th { color: var(--muted); background: var(--paper-deep); font-family: var(--mono); font-size: 0.75rem; text-transform: uppercase; }

.feature-index {
  display: grid;
  gap: 1.2rem;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  padding: 3.5rem 0;
}

.feature-entry {
  display: block;
  padding: 1.4rem;
  background: var(--paper-bright);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: transform 220ms var(--ease), border-color 220ms var(--ease), box-shadow 220ms var(--ease);
}

.feature-entry:hover {
  border-color: var(--brand-soft);
  box-shadow: var(--shadow-lift);
  transform: translateY(-3px);
}

.feature-entry h2 { margin-bottom: 0.4rem; font-size: 1.15rem; }
.feature-entry p { color: var(--muted); font-size: 0.93rem; }

.feature-entry-more {
  display: inline-flex;
  gap: 0.3rem;
  align-items: center;
  margin-top: 0.9rem;
  color: var(--brand-dark);
  font-family: var(--mono);
  font-size: 0.76rem;
}

.feature-cta {
  display: flex;
  gap: 1.2rem;
  align-items: center;
  justify-content: space-between;
  margin-top: 3rem;
  padding-top: 1.6rem;
  border-top: 1px solid var(--line);
}

.feature-cta p { margin: 0; color: var(--ink); font-family: var(--display); font-size: 1.15rem; }

.gallery {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  padding: 3.5rem 0;
}

.not-found { padding: 6rem 0; text-align: center; }
.not-found h1 { font-size: clamp(3rem, 9vw, 5.5rem); }
.not-found p { margin: 1rem auto 2rem; max-width: 44ch; color: var(--muted); }
.not-found .hero-actions { justify-content: center; }

/* ---------- Optional reveal enhancement ---------- */

.js-reveal .reveal {
  opacity: 0;
  transform: translateY(16px);
  transition:
    opacity 520ms var(--ease) var(--reveal-delay, 0ms),
    transform 520ms var(--ease) var(--reveal-delay, 0ms);
}

.js-reveal .reveal.is-visible { opacity: 1; transform: none; }

/* Siblings arrive in sequence rather than all at once. */
.reveal:nth-child(2) { --reveal-delay: 70ms; }
.reveal:nth-child(3) { --reveal-delay: 140ms; }
.reveal:nth-child(4) { --reveal-delay: 210ms; }
.reveal:nth-child(5) { --reveal-delay: 70ms; }
.reveal:nth-child(6) { --reveal-delay: 140ms; }

/* ---------- Responsive ---------- */

@media (max-width: 1180px) {
  .hero-inner { gap: 2.5rem; }
  .models-layout { gap: 2rem; }
  .doc-layout { gap: 2rem; grid-template-columns: minmax(0, 1fr) 13rem; }
}

@media (max-width: 980px) {
  .doc-layout { grid-template-columns: minmax(0, 1fr); }
  .doc-aside { padding: 0 0 1rem; }
  .doc-aside-inner { position: static; }
  .prose { padding-top: 2.5rem; }
}

@media (max-width: 920px) {
  section { padding: 4rem 0; }

  .nav-links, .header-cta { display: none; }
  .nav-toggle { display: grid; }

  .mobile-nav {
    display: block;
    padding: 0 0 1.2rem;
    border-top: 1px solid var(--line);
    animation: nav-in 220ms var(--ease);
  }

  .mobile-nav[hidden] { display: none; }

  .mobile-nav ul { margin: 0; padding: 0.6rem 0 0; list-style: none; }

  /* Scoped to the list: this rule used to catch the trailing .btn too and
     reset it to a left-aligned, unpadded block. */
  .mobile-nav ul a {
    display: block;
    padding: 0.85rem 0;
    border-bottom: 1px solid var(--line);
    font-weight: 500;
    text-decoration: none;
  }

  .mobile-nav .btn { width: 100%; margin-top: 1rem; }

  .hero-inner, .models-layout, .oss-layout { grid-template-columns: minmax(0, 1fr); }
  .hero h1 { max-width: 100%; }
  .steps { grid-template-columns: minmax(0, 1fr); }
  .footer-inner { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .page-hero-icon { width: 48px; height: 48px; border-radius: 14px; }
  .page-hero-icon .icon { width: 24px; height: 24px; }
}

@keyframes nav-in {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: none; }
}

/* Stacked hops need a vertical connector. Turn the real one on its side rather
   than hiding it behind a static line, or the pulse stops travelling on a
   phone. The 56x24 box overhangs 16px top and bottom once rotated, which is
   exactly what the margin absorbs. */
@media (max-width: 760px) {
  .route { flex-direction: column; }
  .route-step { flex: 0 0 auto; flex-direction: column; align-items: stretch; }
  .route-node { height: auto; }

  .route-link {
    align-self: center;
    margin: 16px 0;
    transform: rotate(90deg);
  }
}

@media (max-width: 640px) {
  body { font-size: 1rem; }

  .hero { padding: 3rem 0 3.5rem; }
  .hero-actions .btn { width: 100%; }
  .hero-proof { gap: 0.35rem 1.1rem; font-size: 0.72rem; }

  /* Wrapping puts a rule at the start of a line, so drop it on small screens. */
  .hero-proof span + span { padding-left: 0; border-left: 0; }
  .install-card, .step { padding: 1.3rem; }
  .footer-inner { grid-template-columns: minmax(0, 1fr); gap: 2rem; }
  .route { padding: 1.1rem; }
  .final-cta .btn { width: 100%; }
  .feature-cta { align-items: stretch; flex-direction: column; }
  .page-hero-head { gap: 1rem; flex-direction: column; }
  .install-card .btn { width: 100%; }
}

/* 42 bars crowd a phone-width panel back into a solid block, so drop every
   other one. The survivors keep their original nth-child amplitude and delay. */
@media (max-width: 520px) {
  .waveform { height: 46px; }
  .waveform i:nth-child(2n) { display: none; }
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }

  .waveform i { height: 55%; }
  .editor-text span { opacity: 1; }
  .js-reveal .reveal { opacity: 1; transform: none; }
}

@media print {
  .site-header, .mobile-nav, .copy-btn, .doc-aside { display: none; }
  body { background: #fff; }

  /* Printing never scrolls, so reveal targets must not stay hidden. */
  .js-reveal .reveal { opacity: 1; transform: none; }
}
