/* Void Helm — voidhelm.dev.
   Page-level styles for the home page, /context-compiler/ and the 404.
   Anything shared with other Void Helm surfaces lives in
   css/base/components.css; this file is only the site's own layout, plus
   the few overrides of it the site needs (focus ring, micro-text contrast). */

/* ── Document ───────────────────────────────────────────── */
html {
  scroll-behavior: smooth;
  background: var(--helm-bg);
}
body {
  overflow-x: hidden;
}

.vh-page {
  min-height: 100vh;
  background: var(--helm-bg);
  font-family: var(--font-sans);
  color: var(--helm-fg);
}

.vh-defs {
  position: absolute;
  width: 0;
  height: 0;
}

/* ── Focus ──────────────────────────────────────────────────
   One ring for every control on the site: a gap in the page colour, then
   the accent, so it reads on glass, on the solid button and on bare text.
   The design system's own ring (2px at 35% accent) is too faint to find. */
:root {
  --vh-ring: 0 0 0 2px var(--helm-bg), 0 0 0 4px var(--helm-accent);
}
.vh-page a:focus-visible,
.vh-page button:focus-visible,
.helm-btn:focus-visible,
.helm-topnav-link:focus-visible,
.vh-helm-trigger:focus-visible,
.helm-rail-label:focus-visible {
  outline: none;
  box-shadow: var(--vh-ring);
}
:where(.vh-page) a:not(.helm-btn):not(.vh-skip):focus-visible { border-radius: 4px; }

/* Buttons that are links: no underline, and base.css's a:hover accent must
   not turn the solid button's label the colour of its own fill. */
a.helm-btn { text-decoration: none; }
a.helm-btn--solid,
a.helm-btn--solid:hover { color: var(--helm-bg); }

.vh-nowrap { white-space: nowrap; }

/* Skip link: off screen until focused, then a small plate at top left. */
.vh-skip {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  padding: 12px 16px;
  border: 1px solid var(--helm-line-strong);
  border-radius: var(--radius-helm-md, 10px);
  background: var(--helm-bg);
  color: var(--helm-fg);
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: var(--track-label);
  text-decoration: none;
  transform: translateY(calc(-100% - 24px));
}
.vh-skip:focus,
.vh-skip:focus-visible { transform: none; }

/* Headings break into even lines; lead copy avoids a stranded last word. */
h1, h2, h3, .vh-h2, .vh-404-title, .cc-lead { text-wrap: balance; }
.vh-copy, .vh-hero-lead, .vh-404-copy, .vh-card-p, .cc-flow p, .cc-status-grid p, .helm-listrow-desc { text-wrap: pretty; }
.vh-quote, #vhResolveP { text-wrap: balance; }
/* Headings set as eyebrows keep the eyebrow's weight and line. */
h2.helm-eyebrow,
h3.helm-eyebrow { font-weight: 400; line-height: normal; }

/* Status and category chips: 10px and dim ink, never 9px mute. */
.helm-chip--sm { font-size: 10px; }

/* ── Background stack ───────────────────────────────────────
   z0 particle field · z1 scrim (scrubbed by JS) · z2 vignette. */
#vhField {
  position: fixed;
  inset: 0;
  z-index: 0;
  display: block;
  width: 100%;
  height: 100%;
}
#vhScrim {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: var(--helm-bg);
  opacity: 0.62;
  transition: background var(--helm-dur-theme) var(--helm-ease);
}
.vh-vignette {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: radial-gradient(
    120% 85% at 50% 50%,
    rgb(0 0 0 / 0) 34%,
    rgb(0 0 0 / 0.4) 78%,
    rgb(0 0 0 / 0.8) 100%
  );
}

/* ── Shared measure ─────────────────────────────────────── */
.vh-wrap {
  margin: 0 auto;
  width: 100%;
  max-width: 1320px;
  box-sizing: border-box;
  padding: 0 clamp(20px, 4vw, 40px);
}

.vh-main {
  position: relative;
  z-index: 5;
}

/* Mono micro-meta: the recurring uppercase hint line. */
.vh-meta {
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--helm-fg-dim);
}

/* ── Header ─────────────────────────────────────────────── */
.vh-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 30;
}
.vh-header-inner {
  display: flex;
  height: var(--header-h);
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
/* Transparent at the top of the page. Once helm-ui.js sets .is-scrolled, a
   quiet glass plate fades in behind the header, so copy passing underneath
   stops colliding with the lockup and the nav. It is a pseudo-element, so the
   lockup and controls themselves are never blurred. Near-opaque, so a
   display title passing underneath does not ghost through. The plate is only
   the header's own 64px: the void's thoughts sit from about 20% down. */
.vh-header::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  box-sizing: border-box;
  pointer-events: none;
  border-bottom: 1px solid var(--helm-line);
  background: rgb(var(--helm-surface-rgb) / 0.94);
  background: color-mix(in srgb, var(--helm-bg) 94%, transparent);
  -webkit-backdrop-filter: blur(var(--helm-blur));
  backdrop-filter: blur(var(--helm-blur));
  opacity: 0;
  transition: opacity var(--helm-dur-fast) var(--helm-ease);
}
.vh-header.is-scrolled::before { opacity: 1; }
@media (prefers-reduced-motion: reduce) {
  .vh-header::before { transition: none; }
}
.vh-header-tools {
  display: flex;
  align-items: center;
  gap: 18px;
}

/* Primary nav: mono labels, 44px tall to the thumb. Below 760px the
   Context Compiler link goes (the tools section and the palette both reach
   it), leaving Tools, Contact and the Helm trigger. */
.vh-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}
.vh-nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 10px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: var(--track-label);
  white-space: nowrap;
  text-decoration: none;
  color: var(--helm-fg-dim);
  transition: color var(--helm-dur-fast) var(--helm-ease);
}
.vh-nav-link:hover,
.vh-nav-link[aria-current='page'] { color: var(--helm-fg); }
@media (max-width: 759px) {
  .vh-header-tools { gap: 6px; }
  .vh-nav { gap: 0; }
  .vh-nav-link { padding: 0 7px; font-size: 10px; letter-spacing: 0.12em; }
  .vh-nav-link--wide { display: none; }
}

.vh-helm-trigger {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 44px;
  background: none;
  border: none;
  border-radius: 4px;
  padding: 0;
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--helm-fg-dim);
  transition: color var(--helm-dur-fast) var(--helm-ease);
}
.vh-helm-trigger:hover { color: var(--helm-fg); }
/* A narrow window with a keyboard: the key hint goes, the word stays. */
@media (max-width: 479px) {
  .vh-helm-trigger .helm-kbd { display: none; }
}

/* ── HelmMark (brand lockup) ────────────────────────────── */
.helm-mark {
  display: flex;
  align-items: center;
  gap: 10px;
}
/* The header lockup is a link: 44px tall to the thumb, inside the 64px bar.
   It never wraps or shrinks; the nav gives way first. */
a.helm-mark { flex: none; min-height: 44px; border-radius: 4px; }
.helm-mark-word { white-space: nowrap; }
.helm-mark svg { color: var(--helm-accent); }
.helm-mark-word {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: var(--track-wordmark);
  color: var(--helm-fg);
}

/* ── CommandPalette — "the helm" ────────────────────────── */
.helm-cmdk {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}
.helm-cmdk[hidden] { display: none; }
.helm-cmdk-backdrop {
  position: absolute;
  inset: 0;
  border: none;
  cursor: default;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  animation: helm-rise 0.2s ease;
}
.helm-cmdk-dialog {
  position: relative;
  z-index: 10;
  margin-top: 16vh;
  width: 560px;
  max-width: 88vw;
  overflow: hidden;
  border-radius: var(--radius-helm-lg);
  border: 1px solid var(--helm-accent-soft);
  background: rgb(var(--helm-surface-rgb) / 0.97);
  box-shadow: var(--shadow-overlay);
  animation: helm-rise 0.22s var(--helm-ease);
}
.helm-cmdk-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--helm-line);
  padding: 14px 16px;
}
.helm-cmdk-sigil {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--helm-accent);
}
.helm-cmdk-input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: none;
  font-family: var(--font-sans);
  font-size: 14px;
  color: var(--helm-fg);
  outline: none;
}
.helm-cmdk-input::placeholder { color: var(--helm-fg-dim); }
/* Rows are a fixed 44px, so the list can stop on a row boundary: seven
   whole rows (four on a short screen), never a half-cut last one. */
.helm-cmdk-list {
  max-height: calc(7 * 44px);
  overflow-y: auto;
  padding: 8px;
  margin: 0;
  list-style: none;
}
@media (max-height: 560px) {
  .helm-cmdk-dialog { margin-top: 8vh; }
  .helm-cmdk-list { max-height: calc(4 * 44px); }
}
.helm-cmdk-item {
  display: flex;
  width: 100%;
  height: 44px;
  box-sizing: border-box;
  align-items: center;
  gap: 12px;
  border-radius: var(--radius-helm-sm);
  border: none;
  cursor: pointer;
  padding: 0 12px;
  text-align: left;
  background: transparent;
  transition: background 150ms;
}
/* The active row is the palette's focus: fill plus a hairline ring. */
.helm-cmdk-item[data-active='true'] {
  background: var(--helm-accent-bg);
  box-shadow: inset 0 0 0 1px var(--helm-accent-soft);
}
.helm-cmdk-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 20px;
  color: var(--helm-fg);
}
.helm-cmdk-item[data-active='true'] .helm-cmdk-label { color: var(--helm-accent); }
.helm-cmdk-hint {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--helm-fg-dim);
}
.helm-cmdk-empty {
  padding: 24px 12px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--helm-fg-dim);
}

/* ── SectionRail — the "route" motif ────────────────────── */
/* Inset clear of the 64px header, and 48px from the bottom edge, so the
   START and ABOUT labels (centred on the rail's ends) stay fully on screen.
   Only from 1440px: narrower, its labels would sit on the ethos tags and the
   card edges. There, .vh-wrap's side margin leaves it a clear lane. */
.helm-rail {
  pointer-events: none;
  position: fixed;
  right: 16px;
  top: calc(var(--header-h) + 48px);
  z-index: 40;
  height: calc(100vh - var(--header-h) - 96px);
  width: 96px;
}
@media (max-width: 1439px) {
  .helm-rail { display: none; }
}
/* Both are wired by helm-ui.js: without JavaScript they would be dead. */
html:not(.js) .helm-rail,
html:not(.js) .vh-helm-trigger { display: none; }
.helm-rail-inner {
  position: relative;
  margin: 0 auto;
  height: 100%;
}
.helm-rail-track {
  position: absolute;
  right: 11px;
  top: 0;
  height: 100%;
  width: 2px;
  border-radius: 999px;
  background: var(--helm-line);
}
.helm-rail-fill {
  position: absolute;
  left: 0;
  top: 0;
  width: 2px;
  border-radius: 999px;
  background: var(--helm-accent);
  opacity: 0.5;
  transition: height 150ms linear;
}
.helm-rail-marker {
  position: absolute;
  left: 50%;
  height: 10px;
  width: 10px;
  transform: translate(-50%, -50%);
  border-radius: 3px;
  background: var(--helm-accent);
  box-shadow: var(--glow-accent);
  transition: top 150ms linear;
}
.helm-rail-label {
  pointer-events: auto;
  position: absolute;
  right: 24px;
  transform: translateY(-50%);
  white-space: nowrap;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  border-radius: 3px;
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--helm-fg-dim);
  transition: color var(--helm-dur-fast) var(--helm-ease);
}
.helm-rail-label[aria-current='true'] { color: var(--helm-fg); }
.helm-rail-label:hover { color: var(--helm-fg); }

/* ── 00 Hero ────────────────────────────────────────────── */
.vh-hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  /* Top is 12svh, not 16: the lead runs to three lines, and the hint under
     the buttons has to stay inside the first viewport to show on load. */
  padding: 12svh 0 14svh;
}
/* Balanced, so a narrow screen breaks the eyebrow into two even lines
   instead of stranding its last word. */
.vh-hero .helm-eyebrow { text-wrap: balance; }
.vh-hero-lead { text-wrap: pretty; }
.vh-hero-glyph {
  width: clamp(44px, 4.6vw, 60px);
  height: clamp(44px, 4.6vw, 60px);
  color: var(--helm-accent);
  margin-bottom: clamp(28px, 5.5vh, 56px);
}
.vh-hero-title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(40px, 9.4vw, 124px);
  line-height: 0.96;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--helm-fg);
}
.vh-hero-rule {
  border: none;
  border-top: 1px solid var(--helm-line-strong);
  margin: clamp(24px, 4vh, 42px) 0 26px;
  max-width: 760px;
}
.vh-hero-lead {
  margin: 0;
  max-width: 40em;
  font-family: var(--font-sans);
  font-size: var(--text-lead);
  line-height: 1.8;
  color: var(--helm-fg-soft);
}
.vh-hero-actions {
  margin-top: 38px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}
.vh-hero-hint { margin-top: 26px; }
/* The key label can be swapped for the wider "Ctrl K": keep it whole, and let
   the sentence after it wrap evenly on a narrow screen. */
.vh-hero-hint .helm-kbd { flex: none; white-space: nowrap; }
.vh-hero-hint > span:last-child { text-wrap: balance; }

#vhCue {
  position: absolute;
  left: clamp(20px, 4vw, 40px);
  bottom: 32px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.24em;
  color: var(--helm-fg-dim);
}
.vh-cue-tick {
  display: block;
  width: 1px;
  height: 26px;
  background: linear-gradient(var(--helm-accent-soft), transparent);
}

/* ── Section rhythm ─────────────────────────────────────── */
.vh-section { padding: clamp(96px, 14vh, 180px) 0; }
.vh-section--centered {
  min-height: 88svh;
  display: flex;
  align-items: center;
  padding: 14svh 0;
}

.vh-h2 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(28px, 5.2vw, 64px);
  line-height: 1.12;
  letter-spacing: var(--track-display);
  color: var(--helm-fg);
}
.vh-h2--loose { line-height: 1.12; max-width: 20ch; }

.vh-copy {
  margin: 0;
  max-width: 54em;
  font-size: var(--text-body);
  line-height: 1.75;
  color: var(--helm-fg-dim);
}

/* ── Title dust ─────────────────────────────────────────────
   js/title-dust.js assembles [data-assemble] headings out of particles on a
   canvas of their own (.vh-dust-canvas, a child of the heading), then fades
   the real text (.vh-dust-text, which it wraps the heading's nodes in) back
   in. Until the script takes over (it sets [data-dust]) the heading is held
   invisible so it never flashes solid first; the animation is a failsafe
   that shows it anyway if the script never arrives. No JS, no .js class:
   plain text. Reduced motion: plain text, and the script stays out. */
.js [data-assemble] {
  position: relative;
  isolation: isolate;
}
.vh-dust-canvas {
  position: absolute;
  z-index: 1;
  display: block;
  pointer-events: none;
}
@media (prefers-reduced-motion: no-preference) {
  .js:not(.no-dust) [data-assemble]:not([data-dust]) {
    opacity: 0;
    animation: vh-dust-failsafe 0s 3s forwards;
  }
}
@keyframes vh-dust-failsafe { to { opacity: 1; } }
/* Touch: holding a title charges the dust, so the long-press text
   selection and callout would fight it (as on elgemmy.com). */
@media (hover: none) and (pointer: coarse) {
  .js [data-dust] {
    touch-action: pan-y pinch-zoom;
    -webkit-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
    -webkit-tap-highlight-color: transparent;
  }
}

/* ── 02 The void — sticky scroll-scrubbed stage ───────────
   The scrubbed states (stuck stage, absolutely placed thoughts, everything
   at opacity 0 until the loop paints it) live under .js, which an inline
   script in <head> sets before first paint. Without it the stage is a plain
   centred column: the thoughts in DOM order, the resolve line after them. */
.vh-void { padding: 0; }
/* The well heights come from DEPTHS in home.js (applyConfig sets them inline).
   Until it runs, hold the 'deep' defaults so nothing shifts on load; with
   JavaScript off the wells simply size to their content. */
.js #vh-void { height: 950svh; }
.js #vh-return { height: 420svh; }
.js #vhStage {
  position: sticky;
  top: 0;
  height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 clamp(20px, 4vw, 40px);
  overflow: hidden;
}
html:not(.js) #vhStage {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(26px, 4.5vw, 44px);
  padding: clamp(96px, 18svh, 168px) clamp(20px, 4vw, 40px);
  text-align: center;
}
.js .vh-frag {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  will-change: opacity, filter, transform;
}
.vh-frag {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(15px, 2.3vw, 30px);
  letter-spacing: 0.02em;
  max-width: min(72vw, 620px);
  color: var(--helm-fg-soft);
}
.vh-frag-m {
  font-family: var(--font-mono);
  font-size: clamp(10px, 1.1vw, 13px);
  letter-spacing: 0.26em;
  text-transform: uppercase;
  max-width: none;
  color: var(--helm-fg-dim);
}
#vhResolve {
  text-align: center;
  width: min(88vw, 520px);
}
.js #vhResolve {
  position: absolute;
  left: 50%;
  top: 76%;
  transform: translate(-50%, -50%);
  opacity: 0;
  pointer-events: none;
}
/* A little more air than between thoughts, so the line reads as the answer. */
html:not(.js) #vhResolve { margin-top: clamp(20px, 4vw, 40px); }
#vhResolveP {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(19px, 5.2vw, 26px);
  line-height: 1.3;
  letter-spacing: -0.005em;
  color: var(--helm-fg);
}
#vhDepth {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--helm-fg-mute);
}
.js #vhDepth {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 40px;
  opacity: 0;
}
/* A depth readout means nothing on a static page. */
html:not(.js) #vhDepth { display: none; }
#vhDepthVal { color: var(--helm-fg-dim); }

/* ── 03 The return — the panel that irises open ───────────
   As in the void, the stuck stage and the closed, invisible panel are .js
   only. Without it the panel just sits open in the flow, fully written out. */
.vh-return { padding: 0; }
.js .vh-return-sticky {
  position: sticky;
  top: 0;
  height: 100svh;
  overflow: hidden;
}
html:not(.js) .vh-return-sticky { padding: clamp(64px, 12svh, 120px) clamp(20px, 4vw, 40px); }
#vhPanel {
  width: min(92vw, 960px);
  background: rgb(var(--helm-surface-rgb) / 0.55);
  border: 1px solid var(--helm-line);
  border-radius: var(--radius-helm-panel);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--helm-dur-theme) var(--helm-ease);
}
.js #vhPanel {
  position: absolute;
  left: 50%;
  top: 50%;
  height: min(70svh, 620px);
  transform: translate(-50%, -50%);
  opacity: 0;
  clip-path: inset(48% 46% 48% 46% round 18px);
  will-change: clip-path, transform, opacity;
}
html:not(.js) #vhPanel { margin: 0 auto; }
.vh-panel-body {
  width: min(84vw, 640px);
  text-align: center;
  padding: clamp(28px, 5vw, 64px);
}
#vhSEyebrow { margin: 0 0 30px; }
.js #vhSEyebrow { opacity: 0; }
.vh-typed-h {
  margin: 0;
  min-height: 1.1em;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(26px, 4.6vw, 52px);
  line-height: 1.1;
  letter-spacing: var(--track-display);
  color: var(--helm-fg);
}
.vh-typed-caret {
  display: inline-block;
  width: 0.07em;
  height: 0.9em;
  background: var(--helm-accent);
  margin-left: 0.08em;
  vertical-align: -0.06em;
}
/* The heading is written out in the markup; the caret only belongs to typing. */
html:not(.js) .vh-typed-caret { display: none; }
#vhSSub {
  margin: 32px auto 0;
  max-width: 52ch;
  font-size: var(--text-body);
  line-height: 1.75;
  color: var(--helm-fg-dim);
}
.js #vhSSub { opacity: 0; }

/* ── 04 Ethos ───────────────────────────────────────────── */
/* What the tools do on the left, what we do not build on the right. One
   column below 1280px, where the rows need the full width for title,
   description and tag on one line. The divider and the closing line live in
   the rows column, so the summary sits under the four rows it names at every
   width; stacked, "What we do not build" follows as its own block. */
.vh-ethos-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 72px;
}
/* The rows are statements, not links: no pointer, no hover indent, no
   accent on the title. From 768px, where the descriptions show, each row is
   the same four-column grid, so the descriptions share one left edge
   instead of hanging off the end of titles of different lengths. */
.vh-ethos-rows .helm-listrow { cursor: default; }
.vh-ethos-rows .helm-listrow:hover { padding-left: 0; }
.vh-ethos-rows .helm-listrow:hover .helm-listrow-title { color: var(--helm-fg); }
.vh-ethos-rows .helm-listrow-meta { color: var(--helm-fg-dim); }
@media (min-width: 768px) {
  .vh-ethos-rows .helm-listrow {
    display: grid;
    grid-template-columns: 1.5rem minmax(0, 13.5rem) minmax(0, 1fr) 6.5rem;
    column-gap: 24px;
  }
  .vh-ethos-rows .helm-listrow-desc { max-width: 34em; line-height: 1.55; }
  .vh-ethos-rows .helm-listrow-meta { text-align: right; }
}
@media (min-width: 1280px) {
  .vh-ethos-grid {
    grid-template-columns: minmax(0, 1fr) minmax(220px, 300px);
    gap: clamp(56px, 6vw, 96px);
  }
}
.vh-ethos-close { margin: 32px 0 0; text-wrap: pretty; }

.vh-not {
  position: relative;
  width: fit-content;
  padding: 11px 0;
  font-size: 15px;
  color: var(--helm-fg-dim);
}
.vh-strike {
  position: absolute;
  left: 0;
  top: 50%;
  height: 1px;
  width: 100%;
  background: rgb(var(--helm-text-rgb) / 0.35);
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform 0.7s var(--helm-ease);
}
/* staggered so the four strike through in sequence */
#vhNots .vh-not:nth-child(1) .vh-strike { transition-delay: 0.2s; }
#vhNots .vh-not:nth-child(2) .vh-strike { transition-delay: 0.31s; }
#vhNots .vh-not:nth-child(3) .vh-strike { transition-delay: 0.42s; }
#vhNots .vh-not:nth-child(4) .vh-strike { transition-delay: 0.53s; }

/* ── 05 The tools ───────────────────────────────────────── */
.vh-products-h { margin: 0 0 48px; max-width: 22ch; text-wrap: balance; }
/* Three equal columns from 1024px, one below: never a 2 + 1 orphan row.
   Grid rows stretch, so the cards are always the same height. */
.vh-cards {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
}
@media (min-width: 1024px) {
  .vh-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
/* Three columns at their narrowest: a little less side padding keeps the
   status chip and "Product page" on one row, level with the other cards. */
@media (min-width: 1024px) and (max-width: 1199px) {
  .vh-cards .vh-card { padding-left: 24px; padding-right: 24px; }
}
.vh-card {
  position: relative;
  padding: clamp(28px, 3vw, 44px);
  display: flex;
  flex-direction: column;
  gap: 15px;
  min-height: 280px;
}
.vh-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.vh-card-glyph {
  width: 26px;
  height: 26px;
  color: rgb(var(--helm-text-rgb) / 0.75);
}
.vh-card-h {
  margin: 6px 0 0;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(19px, 2vw, 26px);
  letter-spacing: var(--track-display);
  color: var(--helm-fg);
}
.vh-card-p {
  margin: 0;
  max-width: 44ch;
  font-size: 14.5px;
  line-height: 1.7;
  color: var(--helm-fg-dim);
}
/* Every card ends on the same row: status left, optional link right. */
.vh-card-foot {
  margin-top: auto;
  padding-top: 8px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 12px;
}
.vh-status { border-color: var(--helm-line-strong); }
.vh-status::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}
.vh-card-more {
  font-size: 13.5px;
  white-space: nowrap;
  color: var(--helm-fg-soft);
  transition: color var(--helm-dur-fast) var(--helm-ease);
}
/* The product name is the card's one link, stretched over the whole panel. */
.vh-card-link {
  color: inherit;
  text-decoration: none;
}
.vh-card-link::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: var(--radius-helm-panel);
}
.vh-card--link:hover .vh-card-link,
.vh-card--link:hover .vh-card-more { color: var(--helm-fg); }
.vh-page .vh-card-link:focus-visible { box-shadow: none; }
.vh-page .vh-card-link:focus-visible::after { box-shadow: var(--vh-ring); }
.vh-products-close { margin: 30px 0 0; }

/* ── 06 Closing ─────────────────────────────────────────── */
.vh-end {
  min-height: 82svh;
  display: flex;
  align-items: center;
  padding: 10svh 0;
}
.vh-end-rule {
  border: none;
  border-top: 1px solid var(--helm-line-strong);
  margin: 0 0 52px;
}
.vh-quote-fig { margin: 0; }
.vh-quote-block { margin: 0; }
.vh-quote {
  margin: 0;
  max-width: 26ch;
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(24px, 3.4vw, 42px);
  line-height: 1.45;
  color: var(--helm-fg-soft);
}
/* The founder credit, outside the quotation marks: mono micro-meta, set in
   the case it is written in (a lowercase domain). */
.vh-quote-cite {
  margin: 22px 0 0;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--helm-fg-dim);
}
/* 44px to the thumb; the negative margin keeps the line where it was. */
.vh-quote-cite a {
  display: inline-block;
  padding: 14px 4px;
  margin: -14px -4px;
  color: var(--helm-fg-soft);
  text-decoration: underline;
  text-decoration-color: var(--helm-line-strong);
  text-underline-offset: 3px;
  transition: color var(--helm-dur-fast) var(--helm-ease);
}
.vh-quote-cite a:hover { color: var(--helm-fg); }
.vh-end-about { margin: 40px 0 0; max-width: 40em; }
.vh-end-actions {
  margin-top: 32px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}
.vh-end-keys {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--helm-fg-dim);
}

/* ── Touch screens ──────────────────────────────────────────
   No keyboard to steer by, so the key hints go: "Take the helm" still opens
   the palette on tap. That leaves "Scroll to descend" as the hero's scroll
   cue, so the hero counts its padding inside one viewport here and the cue
   lands at the bottom of the first screen, not below it. (Placed after
   .vh-end-keys so it wins at equal specificity.) */
@media (hover: none) and (pointer: coarse) {
  .vh-hero-hint,
  .vh-end-keys { display: none; }
  .vh-hero { box-sizing: border-box; }

  /* The header trigger drops its key and becomes a tappable "Helm" pill,
     outlined like the key box it replaces. 30px to the eye, 46px to the
     thumb: the ::before extends the hit area without growing the pill. */
  .vh-helm-trigger .helm-kbd { display: none; }
  .vh-helm-trigger {
    position: relative;
    height: 30px;
    min-height: 0;
    padding: 0 14px;
    border: 1px solid var(--helm-line-strong);
    border-radius: var(--radius-helm-pill);
    font-size: 10px;
    letter-spacing: 0.22em;
    color: var(--helm-fg-dim);
  }
  .vh-helm-trigger::before {
    content: '';
    position: absolute;
    inset: -8px -6px;
  }
  .vh-helm-trigger:active {
    color: var(--helm-fg);
    border-color: var(--helm-fg-mute);
  }
}
/* 360px: lockup, Tools, Contact and the Helm pill have 320px between the
   gutters. Close the gaps a little so they fit inside them. */
@media (max-width: 399px) {
  .vh-header-inner { gap: 8px; }
  .vh-nav-link { padding: 0 6px; }
}
@media (hover: none) and (pointer: coarse) and (max-width: 399px) {
  .vh-helm-trigger { padding: 0 10px; letter-spacing: 0.16em; }
}
@media (max-width: 349px) {
  .vh-header-inner { gap: 4px; }
  .vh-nav-link { padding: 0 4px; letter-spacing: 0.1em; }
  .helm-mark-word { letter-spacing: 0.2em; }
}

/* ── Footer ─────────────────────────────────────────────────
   Sits after </main>, so it needs its own stacking: the fixed field, scrim
   and vignette are positioned layers and would otherwise paint over it.
   Two rows split by hairlines: brand + link groups, then legal + credit. */
.vh-footer {
  position: relative;
  z-index: 5;
  padding-bottom: max(36px, env(safe-area-inset-bottom));
}
/* By here the scrim has closed to 0.82, but the receded helm ring still
   sits dimly behind the closing section. The footer ground lets the page end
   on flat graphite, rising slowly (a long eased ramp that starts above the
   hairline and only goes solid well inside the footer) so the ring fades out
   instead of being cut into a half circle at a hard edge. */
.vh-footer::before {
  content: '';
  position: absolute;
  inset: -96px 0 0;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(
    to bottom,
    transparent 0,
    color-mix(in srgb, var(--helm-bg) 30%, transparent) 64px,
    color-mix(in srgb, var(--helm-bg) 62%, transparent) 150px,
    color-mix(in srgb, var(--helm-bg) 86%, transparent) 250px,
    var(--helm-bg) 360px
  );
}

.vh-footer-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 40px clamp(48px, 8vw, 128px);
  border-top: 1px solid var(--helm-line);
  padding: clamp(44px, 6vw, 68px) 0 clamp(36px, 4.5vw, 52px);
}
.vh-footer-brand {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.vh-footer-desc {
  margin: 0;
  max-width: 38ch;
  font-size: var(--text-small);
  line-height: 1.7;
  color: var(--helm-fg-dim);
  text-wrap: balance;
}

.vh-footer-nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(120px, auto));
  gap: 32px clamp(48px, 7vw, 104px);
}
.vh-footer-h {
  margin: 0 0 4px;
  font-family: var(--font-mono);
  font-size: var(--text-mono-label);
  font-weight: 400;
  line-height: 20px;   /* the lockup's height, so the two rows share a centre line */
  text-transform: uppercase;
  letter-spacing: var(--track-label);
  color: var(--helm-fg-dim);
}
.vh-footer-list {
  margin: 0;
  padding: 0;
  list-style: none;
}
/* Quiet links: dim at rest, full ink on hover or focus. The side padding is
   pulled back out with a matching negative margin, so the label stays on the
   column edge and only the focus outline gets room to breathe. */
.vh-footer-link,
.vh-footer-credit-link {
  border-radius: 4px;
  color: var(--helm-fg-dim);
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 5px;
  transition: color var(--helm-dur-fast) var(--helm-ease),
    text-decoration-color var(--helm-dur-fast) var(--helm-ease);
}
.vh-footer-link {
  display: inline-block;
  margin: 0 -6px;
  padding: 8px 6px;
  font-size: 14px;
  line-height: 1.4;
}
.vh-footer-link:hover,
.vh-footer-link:focus-visible,
.vh-footer-credit-link:hover,
.vh-footer-credit-link:focus-visible {
  color: var(--helm-fg);
  text-decoration-color: var(--helm-accent-soft);
}
/* External links get a small mono arrow; it is generated, so the label
   itself stays a plain text node, and it is an atomic box, so the underline
   stops at the word. */
.vh-footer-link--ext::after {
  content: '\2197';
  content: '\2197' / '';
  display: inline-block;
  margin-left: 7px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--helm-fg-dim);
  transition: color var(--helm-dur-fast) var(--helm-ease);
}
.vh-footer-link--ext:hover::after,
.vh-footer-link--ext:focus-visible::after { color: var(--helm-fg); }

.vh-footer-base {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 32px;
  border-top: 1px solid var(--helm-line);
  padding-top: 22px;
  font-family: var(--font-mono);
  font-size: var(--text-mono-label);
  line-height: 1.6;
  text-transform: uppercase;
  letter-spacing: var(--track-chip);
  color: var(--helm-fg-dim);
}
.vh-footer-legal,
.vh-footer-credit { margin: 0; }
/* Inline in a line of dim text, so it keeps a resting underline. */
.vh-footer-credit-link {
  padding: 3px 4px;
  margin: 0 -4px;
  color: var(--helm-fg);
  text-decoration-color: var(--helm-fg-mute);
}
.vh-footer-credit-link:hover,
.vh-footer-credit-link:focus-visible { text-decoration-color: var(--helm-fg-dim); }

@media (max-width: 759px) {
  .vh-footer-top {
    grid-template-columns: minmax(0, 1fr);
    gap: 36px;
    padding-top: 40px;
    padding-bottom: 32px;
  }
  .vh-footer-nav {
    grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
    gap: 20px 24px;
  }
  /* Comfortable thumb targets: 44px rows. */
  .vh-footer-link { padding: 12px 6px; }
  .vh-footer-base {
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    padding-top: 18px;
  }
  .vh-footer-credit { line-height: 2.2; }
  .vh-footer-credit-link { padding: 14px 4px; }
}

/* ── Reduced motion ─────────────────────────────────────────
   The scroll choreography is driven by JS, which checks the same query and
   falls back to a static field plus instantly-resolved copy. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .helm-caret { animation: none; }
  .vh-strike { transition: none; transform: scaleX(1); }
}

/* ── 404 ────────────────────────────────────────────────────
   Its own page (404.html), sharing this file's tokens and shell.
   No canvas and no JavaScript — a wrong turn should cost nothing. */
.vh-404 { display: flex; flex-direction: column; }
.vh-404-main {
  position: relative;
  z-index: 5;
  flex: 1;
  display: flex;
  align-items: center;
  padding: 18svh 0 14svh;
}
.vh-404-glyph {
  width: clamp(44px, 4.6vw, 60px);
  height: clamp(44px, 4.6vw, 60px);
  color: var(--helm-accent);
  margin-bottom: clamp(28px, 5.5vh, 56px);
}
.vh-404-eyebrow { margin: 0 0 22px; }
.vh-404-title {
  margin: 0;
  max-width: 16ch;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(34px, 6.4vw, 76px);
  line-height: 1.06;
  letter-spacing: var(--track-display);
  color: var(--helm-fg);
}
.vh-404-rule {
  border: none;
  border-top: 1px solid var(--helm-line-strong);
  margin: clamp(24px, 4vh, 42px) 0 26px;
  max-width: 620px;
}
.vh-404-copy {
  margin: 0;
  max-width: 46em;
  font-family: var(--font-sans);
  font-size: var(--text-lead);
  line-height: 1.8;
  color: var(--helm-fg-soft);
}
.vh-404-actions {
  margin-top: 38px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}
.vh-404-actions .helm-btn { text-decoration: none; }
.vh-404-contact { margin-left: 6px; }

/* ── Context Compiler ───────────────────────────────────────
   /context-compiler/: shared site chrome, with a readable project narrative. */
.cc-main { padding-top: 110px; }
.cc-hero { padding-top: 42px; padding-bottom: 100px; }
.cc-back { margin-bottom: 52px; }
.cc-title { font-family: var(--font-display); font-size: clamp(56px, 8.5vw, 116px); font-weight: 500; letter-spacing: -0.065em; line-height: .98; margin: 28px 0; }
.cc-period { color: var(--helm-fg-mute); }
.cc-lead { font-family: var(--font-display); font-size: clamp(23px, 3vw, 34px); letter-spacing: var(--track-display); margin: 34px 0 20px; }
.cc-hero .vh-copy { max-width: 620px; }
.cc-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-top: 36px; }
.cc-actions .helm-chip { margin-left: 0; }
.cc-section { padding-top: 80px; padding-bottom: 80px; scroll-margin-top: 80px; }
.cc-section::before { content: ''; display: block; height: 1px; background: var(--helm-line); margin-bottom: 48px; }
.cc-section .helm-eyebrow { margin: 0 0 24px; }
.cc-intro { margin: 28px 0 40px; max-width: 660px; }
/* One column until there is room for three real ones: no 2 + 1 row. */
.cc-flow { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; }
.cc-flow li { padding: 32px; }
.cc-flow h3, .cc-status h3 { font-family: var(--font-display); font-size: 21px; font-weight: 500; margin: 20px 0 14px; }
.cc-flow p, .cc-status-grid p { color: var(--helm-fg-dim); font-size: 15px; line-height: 1.75; margin: 0; }
.cc-split { display: grid; grid-template-columns: 1fr 1fr; gap: 0 64px; }
.cc-split::before { grid-column: 1 / -1; }
.cc-detail { padding-top: 40px; }
.cc-detail .vh-copy + .vh-copy { margin-top: 24px; }
.cc-status { padding: clamp(28px, 5vw, 64px); }
.cc-status > .vh-copy { margin-top: 24px; max-width: 640px; }
.cc-status-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; margin: 24px 0 36px; }
.cc-status-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
@media (min-width: 1024px) {
  .cc-flow { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 759px) {
  .cc-main { padding-top: 80px; }
  .cc-hero { padding-bottom: 48px; }
  .cc-back { margin-bottom: 36px; }
  .cc-section { padding-top: 36px; padding-bottom: 36px; }
  .cc-split, .cc-status-grid { grid-template-columns: 1fr; }
  .cc-detail { padding-top: 28px; }
  .cc-status-grid { gap: 16px; }
  .cc-flow li { padding: 26px; }
}

/* Print: every title as text, never a half-formed canvas. */
@media print {
  .vh-dust-text { opacity: 1 !important; }
  .vh-dust-canvas { display: none !important; }
}
