/* ════════════════════════════════════════════════════════════
   THE VAULT — visual system
   Deep black. White starlight. Negative space. Calm.
   ════════════════════════════════════════════════════════════ */

:root {
  /* ── THE PALETTE — FULLY MONOCHROME ON THE GRAPH ───────────────────
     Near-black space · white/grey stars · off-white typography ·
     grayscale interface states. The graph itself — nodes, edges, HUD,
     starfield — never shows a hue, hovered or not.

     The Scotty Systems brand colours (orange/navy, from the logo) are
     scoped to #note-panel only (2026-08-19): they appear the moment a
     node is opened, not before. See the --accent override block next
     to #note-panel below.

     Evidence media (screenshots, product shots) keeps its natural
     colour; nothing here recolours an image.

     The canvas holds the same two values as literals (vault.js:
     STRUCT / QUIET). Change them in both places. ── */
  --space-void:    #000000;
  --space-deep:    #040404;
  --space-surface: #0a0a0a;
  --star-core:     #ffffff;
  --star-ice:      #e2e2e2;
  --star-dim:      #767676;
  --hud-surface:   rgba(6, 6, 6, 0.84);
  --hud-border:    rgba(232, 232, 232, 0.14);
  --focus-ring:    #ffffff;
  --travel-white:  #ffffff;

  --accent:       #e2e2e2;   /* off-white on the graph; becomes orange inside #note-panel */
  --accent-soft:  #f2f2f2;
  --accent-deep:  #8f8f8f;   /* grey on the graph; becomes navy inside #note-panel */
  --accent-glow:  rgba(226, 226, 226, 0.30);
  --danger:       #d9d9d9;   /* danger reads as text, not as red */

  --bg:          var(--space-deep);
  --bg-raise:    #0b0b0b;
  --ink:         #f2f2f2;    /* headlines / important labels */
  --ink-mid:     #b6b6b6;    /* body + secondary labels */
  --ink-dim:     #7e7e7e;
  --hairline:    rgba(232, 232, 232, 0.09);
  --serif: 'Fraunces', Georgia, 'Times New Roman', serif;
  --sans:  'Inter', -apple-system, 'Segoe UI', system-ui, sans-serif;
  --ease-vault: cubic-bezier(0.32, 0.72, 0, 1);
  /* docked split ≈ 55 graph / 45 panel — mirrored in vault.js panelW() */
  --panel-w: clamp(420px, 45vw, 860px);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  height: 100%;
  /* deep-space base: a faint fall-off into the void so the canvas floats
     in space rather than sitting on a flat sheet. Blue-black, not black —
     the whole point of V3's ground. */
  background:
    radial-gradient(90% 75% at 50% 42%, var(--space-surface) 0%, var(--space-deep) 52%, var(--space-void) 100%) fixed,
    var(--space-void);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 400;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: rgba(255, 255, 255, 0.24); color: #fff; }

a { color: var(--accent-soft); }

:focus-visible {
  outline: 1.5px solid var(--accent-soft);
  outline-offset: 3px;
  border-radius: 3px;
}

/* ════ GRAPH CANVAS ════ */

#graph {
  position: fixed;
  inset: 0;
  display: block;
  cursor: default;
}

/* The greyscale fail-safe that used to sit here is gone (Stage 2).
   It was the last of three suppressors keeping V2 monochrome — the other
   two were the near-zero region saturations in vault-data.js and the
   hardcoded grey literals in the renderer. Colour now comes from the
   region tokens above, deliberately and per-surface, rather than being
   applied and then filtered back out. */
#graph.is-node   { cursor: pointer; }
#graph.is-space  { cursor: grab; }
#graph.is-panning{ cursor: grabbing; }

/* ════ INTRO ════ */

#intro {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.1rem;
  pointer-events: none;
  z-index: 60;
  text-align: center;
  padding: 0 24px;
  transition: opacity 1.1s ease;
}
#intro.done { opacity: 0; }

/* The opening is one quiet claim, then the name of the thing it is
   about. No job title and no explanation — a visitor should arrive
   slightly unsure, and resolve that by exploring rather than reading.
   Deliberately smaller than the old splash: it should not compete
   with the single point of light behind it. */
.intro-line {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 350;
  font-size: clamp(1.5rem, 3.6vw, 2.5rem);
  line-height: 1.25;
  color: var(--ink);
  text-shadow: 0 0 72px rgba(255, 255, 255, 0.20);
  animation: intro-rise 1.6s var(--ease-vault) both;
}
.intro-sub {
  font-size: 0.74rem;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--ink-dim);
  /* Arrives well after the line, so the eye reads the claim first and
     only then learns what it is pointing at. */
  animation: intro-rise 1.6s 1.1s var(--ease-vault) both;
}
@keyframes intro-rise {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: none; }
}
/* ════ PLAN GATE ════
   The one full-screen moment on the site, and the only place the brand
   colours lead rather than accent. Background stays the same near-black
   as everything else — the navy and orange arrive as light, not as
   panels, so the gate reads as the same world the map lives in. */

#plan-gate {
  --gate-orange: #f79520;
  --gate-navy: #2e368f;

  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 24px;
  overflow-y: auto;
  background:
    radial-gradient(ellipse 80% 60% at 18% 0%, rgba(46, 54, 143, 0.55), transparent 68%),
    radial-gradient(ellipse 70% 55% at 92% 104%, rgba(247, 149, 32, 0.16), transparent 66%),
    #050505;
  transition: opacity 0.6s ease, visibility 0s linear 0.6s;
}
#plan-gate[hidden] { display: none; }
#plan-gate.gate-closing { opacity: 0; visibility: hidden; pointer-events: none; }

.gate-inner {
  width: 100%;
  max-width: 780px;
  margin: auto;
  text-align: center;
  animation: intro-rise 0.9s var(--ease-vault) both;
}
.gate-kicker {
  font-size: 0.62rem;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--gate-orange);
  margin-bottom: 1.4rem;
}
.gate-title {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(2.1rem, 6vw, 3.4rem);
  line-height: 1.05;
  color: #fbfbf9;
  margin: 0 0 0.7rem;
}
.gate-lede {
  font-size: 0.95rem;
  line-height: 1.6;
  color: #a9a9a3;
  max-width: 46ch;
  margin: 0 auto 2.6rem;
}

.gate-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(248px, 1fr));
  gap: 18px;
  text-align: left;
}
.gate-plan {
  display: flex;
  flex-direction: column;
  padding: 28px 26px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.016);
  transition: border-color 0.35s ease, transform 0.35s var(--ease-vault);
}
.gate-plan:hover { border-color: rgba(255, 255, 255, 0.3); transform: translateY(-2px); }
/* Pro is the only card carrying colour — orange edge over a navy ground */
.gate-plan.is-pro {
  border-color: rgba(247, 149, 32, 0.5);
  background:
    linear-gradient(165deg, rgba(46, 54, 143, 0.4), rgba(46, 54, 143, 0.08) 62%),
    rgba(255, 255, 255, 0.016);
}
.gate-plan.is-pro:hover { border-color: var(--gate-orange); }

.gate-plan-name {
  font: 600 9px/1.2 'JetBrains Mono', monospace;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #8a8a85;
  margin: 0 0 18px;
}
.is-pro .gate-plan-name { color: var(--gate-orange); }
.gate-plan-price {
  font: 400 32px/1.15 Inter, sans-serif;
  color: #fbfbf9;
  margin: 0 0 22px;
  letter-spacing: -0.01em;
}
.gate-plan-price small { font-size: 12px; color: #85857f; }
.gate-plan ul {
  list-style: none;
  margin: 0 0 26px;
  padding: 20px 0 0;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
  font-size: 13.5px;
  line-height: 1.5;
  color: #c2c2bd;
}
.gate-plan li { position: relative; padding-left: 16px; margin-bottom: 10px; }
.gate-plan li::before {
  content: '';
  position: absolute;
  left: 0; top: 0.55em;
  width: 4px; height: 4px;
  border-radius: 50%;
  background: #5f5f5b;
}
.is-pro li::before { background: var(--gate-orange); }

.gate-btn {
  margin-top: auto;
  width: 100%;
  padding: 13px 16px;
  border-radius: 999px;
  font: 500 0.68rem/1 Inter, sans-serif;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease, transform 0.3s var(--ease-vault);
}
.gate-btn-ghost {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.32);
  color: #ededea;
}
.gate-btn-ghost:hover { border-color: #fff; background: rgba(255, 255, 255, 0.06); }
.gate-btn-solid {
  background: var(--gate-orange);
  border: 1px solid var(--gate-orange);
  color: #1a1206;
}
.gate-btn-solid:hover { background: #ffa63c; border-color: #ffa63c; transform: translateY(-1px); }

.gate-plan-foot {
  margin: 12px 0 0;
  font-size: 11px;
  line-height: 1.5;
  color: #7c7c78;
}
/* both plan buttons are links now, so they need the anchor reset */
a.gate-btn {
  display: block;
  text-align: center;
  text-decoration: none;
}

.gate-skip {
  margin: 2.4rem auto 0;
  display: block;
  background: none;
  border: 0;
  cursor: pointer;
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #6f6f6b;
  transition: color 0.3s ease;
}
.gate-skip:hover { color: #cfcfca; }

@media (max-width: 560px) {
  .gate-plan { padding: 24px 22px; }
}
@media (prefers-reduced-motion: reduce) {
  .gate-inner { animation: none; }
  .gate-plan:hover, .gate-btn-solid:hover { transform: none; }
}

/* ════ HUD ════ */

#hud-top {
  position: fixed;
  top: 0; left: 0; right: 0;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 22px 26px;
  pointer-events: none;
  z-index: 40;
}

#wordmark {
  pointer-events: auto;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 4px 6px;
  transition: opacity 0.3s ease;
}
#wordmark:hover .wm-name { text-shadow: 0 0 30px rgba(255, 255, 255, 0.45); }
.wm-name {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: 1.18rem;
  color: var(--ink);
  transition: text-shadow 0.4s ease;
}
.wm-sub {
  font-size: 0.6rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--ink-dim);
}

#progress {
  pointer-events: auto;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 7px;
  padding: 4px 2px;
}
#progress-dots {
  display: grid;
  grid-template-columns: repeat(9, 1fr);
  gap: 5px;
}
#progress-dots button {
  width: 5px; height: 5px;
  border-radius: 50%;
  border: none;
  padding: 0;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.14);
  transition: background 0.5s ease, box-shadow 0.5s ease, transform 0.25s ease;
}
#progress-dots button:hover { transform: scale(1.8); background: var(--accent-glow); }
#progress-dots button.lit {
  background: var(--accent-soft);
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.72);
}
#progress-label {
  font-size: 0.62rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-dim);
  transition: color 0.5s ease;
}
#progress.complete #progress-label { color: var(--accent-glow); }

#hud-bottom {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding: 22px 26px;
  pointer-events: none;
  z-index: 40;
}

#btn-index {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(12, 12, 12, 0.72);
  border: 1px solid var(--hairline);
  color: var(--ink-mid);
  font-family: var(--sans);
  font-size: 0.74rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 10px 16px;
  border-radius: 999px;
  cursor: pointer;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: border-color 0.35s ease, color 0.35s ease, box-shadow 0.35s ease;
}
#btn-index:hover {
  color: var(--ink);
  border-color: rgba(255, 255, 255, 0.5);
  box-shadow: 0 0 24px rgba(255, 255, 255, 0.12);
}
.idx-glyph { color: var(--accent-soft); font-size: 0.8rem; }
#btn-index kbd {
  font-family: var(--sans);
  font-size: 0.62rem;
  color: var(--ink-dim);
  border: 1px solid var(--hairline);
  border-radius: 4px;
  padding: 2px 5px;
}

#hint {
  position: absolute;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  color: var(--ink-dim);
  white-space: nowrap;
  transition: opacity 1s ease;
}
#hint.gone, body.note-open #hint { opacity: 0; }

#minimap {
  pointer-events: auto;
  width: 156px;
  height: 110px;
  border-radius: 10px;
  border: 1px solid var(--hairline);
  background: rgba(10, 10, 10, 0.65);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  opacity: 0.55;
  cursor: pointer;
  transition: opacity 0.4s ease, transform 0.65s var(--ease-vault);
}
#minimap:hover { opacity: 1; }
body.note-open #minimap { transform: translateX(calc(-1 * var(--panel-w) + -2px)); }

/* mobile pull — hidden on desktop */
#sheet-pull { display: none; }

/* ════ CONSTELLATIONS LEGEND ════ */

#legend {
  position: fixed;
  left: 26px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 38;
  padding: 16px 18px;
  border: 1px solid var(--hairline);
  border-radius: 14px;
  background: rgba(10, 10, 10, 0.5);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  pointer-events: auto;
  transition: opacity 0.6s ease, transform 0.6s var(--ease-vault);
}
body.note-open #legend, body.os-open #legend, body.index-open #legend {
  opacity: 0;
  pointer-events: none;
  transform: translateY(-50%) translateX(-14px);
}
#legend { max-width: 244px; }
.filter-group + .filter-group {
  margin-top: 14px;
  padding-top: 13px;
  border-top: 1px solid var(--hairline);
}
.legend-head {
  font-size: 0.58rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--ink-dim);
  margin-bottom: 10px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
.legend-axis {
  letter-spacing: 0.06em;
  text-transform: none;
  font-size: 0.6rem;
  opacity: 0.6;
  font-style: italic;
}
#legend-list { list-style: none; display: flex; flex-direction: column; gap: 3px; }
#legend-list li {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 5px 10px;
  padding: 6px 8px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.25s ease, opacity 0.25s ease;
}
#legend-list li:hover { background: rgba(255, 255, 255, 0.04); }
#legend-list li.is-on { background: rgba(255, 255, 255, 0.07); }
#legend-list li.is-off { opacity: 0.4; }
.lg-dot { width: 8px; height: 8px; border-radius: 2px; transform: rotate(45deg); }
.lg-name { font-size: 0.82rem; font-weight: 500; }
.lg-desc {
  grid-column: 2;
  font-size: 0.64rem;
  color: var(--ink-dim);
  letter-spacing: 0.02em;
}

/* ── filter chips: the second + third axes ── */
.chip-row { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--ink);
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, opacity 0.2s ease;
}
.chip:hover { background: rgba(255, 255, 255, 0.05); }
.chip.is-off { opacity: 0.38; }
.chip-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: hsl(var(--ch) 80% 62%);
  box-shadow: 0 0 7px hsl(var(--ch) 85% 55% / 0.8);
}
.chip.is-on {
  border-color: hsl(var(--ch) 80% 60%);
  background: hsl(var(--ch) 80% 55% / 0.18);
}
/* status chips carry the three-state visual language */
.chip-status { width: 7px; height: 7px; border-radius: 50%; box-sizing: border-box; }
.st-completed .chip-status { background: var(--accent); box-shadow: 0 0 7px var(--accent-glow); }
.st-building  .chip-status { background: var(--accent-deep); box-shadow: 0 0 8px var(--accent-glow); animation: chipPulse 1.4s ease-in-out infinite; }
.st-concept   .chip-status { background: transparent; border: 1px dashed #9fb0d8; box-shadow: none; }
.chip.st-completed.is-on { border-color: var(--accent); background: rgba(150, 199, 245, 0.16); }
.chip.st-building.is-on  { border-color: var(--accent-deep); background: rgba(91, 147, 204, 0.16); }
.chip.st-concept.is-on   { border-color: #9fb0d8; background: rgba(159, 176, 216, 0.14); }
@keyframes chipPulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }

#filter-clear {
  margin-top: 13px;
  width: 100%;
  padding: 7px 10px;
  font-size: 0.68rem;
  letter-spacing: 0.05em;
  border: 1px solid var(--hairline);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--ink-dim);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}
#filter-clear:hover { color: var(--ink); background: rgba(255, 255, 255, 0.07); }

@media (max-width: 1100px) { #legend { display: none; } }

/* ════ HOVER PREVIEW ════ */

#preview {
  --na-h: 208;   /* the single icy-blue accent hue — never per-note */
  position: fixed;
  width: 296px;
  z-index: 45;
  pointer-events: none;
  background: linear-gradient(160deg, rgba(18, 18, 18, 0.92), rgba(10, 10, 10, 0.92));
  border: 1px solid hsl(var(--na-h) 0% 62% / 0.22);
  border-radius: 14px;
  padding: 18px 20px 15px;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.55), 0 0 40px rgba(255, 255, 255, 0.05);
  opacity: 0;
  transform: translateY(8px) scale(0.97);
  transition: opacity 0.28s ease, transform 0.28s var(--ease-vault);
}
#preview.show { opacity: 1; transform: none; }

.preview-kicker {
  font-size: 0.58rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: hsl(var(--na-h) 0% 68%);
  margin-bottom: 7px;
}
.preview-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.35rem;
  line-height: 1.15;
  color: var(--ink);
  margin-bottom: 8px;
}
.preview-blurb {
  font-size: 0.8rem;
  line-height: 1.6;
  color: var(--ink-mid);
  margin-bottom: 12px;
}
/* ── the live state card: nodes show state, not just information ── */
.preview-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 7px;
}
.preview-top .preview-kicker { margin-bottom: 0; }
.preview-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.54rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 999px;
  white-space: nowrap;
  flex: none;
  border: 1px solid var(--hairline);
  color: var(--ink-mid);
}
.preview-status .ps-led { width: 6px; height: 6px; border-radius: 50%; box-sizing: border-box; }
.st-completed .ps-led { background: var(--accent); box-shadow: 0 0 6px var(--accent-glow); }
.st-building  .ps-led { background: var(--accent-deep); box-shadow: 0 0 7px var(--accent-glow); animation: chipPulse 1.4s ease-in-out infinite; }
.st-concept   .ps-led { background: transparent; border: 1px dashed #9fb0d8; box-shadow: none; }
.preview-status.st-completed { border-color: rgba(150, 199, 245, 0.4); color: var(--accent-soft); }
.preview-status.st-building  { border-color: rgba(150, 199, 245, 0.45); color: var(--accent-soft); }
.preview-status.st-concept   { border-color: rgba(159, 176, 216, 0.4); color: #c3cef0; }

.preview-state { margin-bottom: 12px; }
.pv-health { display: flex; align-items: center; gap: 9px; margin-bottom: 10px; }
.pv-h-label { font-size: 0.54rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-dim); flex: none; }
.pv-meter { flex: 1; height: 5px; border-radius: 3px; background: rgba(255, 255, 255, 0.08); overflow: hidden; }
.pv-meter i {
  display: block; height: 100%; border-radius: 3px;
  background: hsl(var(--na-h) 0% 60%);
  box-shadow: 0 0 8px hsl(var(--na-h) 0% 55% / 0.7);
  transition: width 0.5s var(--ease-vault);
}
.pv-h-val { font-size: 0.64rem; font-variant-numeric: tabular-nums; color: var(--ink-mid); flex: none; }
.pv-readout { display: grid; grid-template-columns: auto 1fr; gap: 3px 12px; margin: 0; }
.pv-readout dt { font-size: 0.6rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-dim); align-self: baseline; }
.pv-readout dd { font-size: 0.7rem; color: var(--ink-mid); margin: 0; text-align: right; font-variant-numeric: tabular-nums; }

.preview-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
  border-top: 1px solid var(--hairline);
  padding-top: 10px;
  margin-bottom: 10px;
}
.preview-links li {
  font-size: 0.7rem;
  color: var(--ink-dim);
  display: flex;
  align-items: baseline;
  gap: 7px;
}
.preview-links li::before {
  content: '';
  width: 4px; height: 4px;
  border-radius: 50%;
  background: hsl(var(--na-h) 0% 62%);
  flex: none;
  align-self: center;
  box-shadow: 0 0 6px hsl(var(--na-h) 0% 55% / 0.8);
}
.preview-links li em {
  font-style: normal;
  color: var(--ink-mid);
}
.preview-hint {
  font-size: 0.62rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: hsl(var(--na-h) 0% 72%);
  opacity: 0.85;
}

/* ════ NOTE PANEL ════ */

#note-panel {
  --na-h: 208;   /* the single icy-blue accent hue — never per-note */

  /* Scotty Systems brand colours, scoped to the opened node only.
     Every rule elsewhere in this file that reads var(--accent) etc.
     picks these up automatically once it's nested inside #note-panel,
     without needing to duplicate those rules here. */
  --accent:       #f79520;   /* logo orange */
  --accent-soft:  #ffb25c;
  --accent-deep:  #2e368f;   /* logo navy */
  --accent-glow:  rgba(247, 149, 32, 0.32);
  --focus-ring:   #f79520;

  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: var(--panel-w);
  z-index: 50;
  display: flex;
  flex-direction: column;
  background: linear-gradient(200deg, rgba(14, 14, 14, 0.92), rgba(9, 9, 9, 0.95));
  border-left: 1px solid rgba(232, 232, 232, 0.12);
  backdrop-filter: blur(26px);
  -webkit-backdrop-filter: blur(26px);
  transform: translateX(103%);
  visibility: hidden;
  transition: transform 0.7s var(--ease-vault), visibility 0s linear 0.7s;
}
#note-panel::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, hsl(var(--na-h) 0% 55% / 0.75), transparent);
  filter: blur(0.5px);
  transition: background 0.6s ease;
}
body.note-open #note-panel {
  transform: none;
  visibility: visible;
  transition: transform 0.7s var(--ease-vault), visibility 0s;
}

.panel-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--hairline);
  flex: none;
}
.panel-bar button {
  background: none;
  border: none;
  color: var(--ink-dim);
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  padding: 6px 8px;
  border-radius: 6px;
  transition: color 0.3s ease;
  flex: none;
}
.panel-bar button:hover { color: var(--ink); }

#trail {
  flex: 1;
  min-width: 0;
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  color: var(--ink-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
}
#trail .t-sep { color: rgba(255, 255, 255, 0.8); padding: 0 5px; }
#trail .t-here { color: var(--ink-mid); }

#note-scroll {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: clamp(28px, 5vh, 56px) clamp(26px, 4.5vw, 64px) 80px;
  scrollbar-width: thin;
  scrollbar-color: rgba(232, 232, 232, 0.25) transparent;
}
#note-scroll::-webkit-scrollbar { width: 5px; }
#note-scroll::-webkit-scrollbar-thumb { background: rgba(232, 232, 232, 0.22); border-radius: 3px; }
#note-scroll::-webkit-scrollbar-track { background: transparent; }

/* ── note typography ── */

.note { animation: note-in 0.7s 0.12s var(--ease-vault) both; }
@keyframes note-in {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: none; }
}

.note-head { margin-bottom: 2.4rem; }

.note-kicker {
  display: flex;
  align-items: baseline;
  gap: 9px;
  font-size: 0.64rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--ink-dim);
  margin-bottom: 1.1rem;
}
.k-num { color: hsl(var(--na-h) 0% 68%); }
.k-sep { color: rgba(255, 255, 255, 0.18); }

.note h1:focus, .note h1:focus-visible { outline: none; }
.note h1 {
  font-family: var(--serif);
  font-weight: 330;
  font-size: clamp(2.3rem, 4.6vw, 3.3rem);
  line-height: 1.04;
  letter-spacing: -0.015em;
  color: #fff;
  margin-bottom: 0.9rem;
}

.note-lede {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 350;
  font-size: 1.08rem;
  line-height: 1.55;
  color: var(--ink-mid);
}

.note-body {
  font-size: 0.965rem;
  line-height: 1.85;
  color: #CCCCCC;
  max-width: 62ch;
}
.note-body > p { margin-bottom: 1.35rem; }

.note-body h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.42rem;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 2.6rem 0 1.1rem;
  display: flex;
  align-items: center;
  gap: 14px;
}
.note-body h2::before {
  content: '';
  width: 22px;
  height: 1px;
  background: linear-gradient(90deg, hsl(var(--na-h) 0% 55%), transparent);
  flex: none;
}

.note-close-line {
  font-family: var(--serif);
  font-style: italic;
  color: var(--ink-mid);
  border-top: 1px solid var(--hairline);
  padding-top: 1.5rem;
  margin-top: 2.6rem;
}

/* wiki links — the threads between notes */
.wiki {
  color: hsl(var(--na-h) 0% 72%);
  text-decoration: none;
  border-bottom: 1px solid hsl(var(--na-h) 0% 65% / 0.3);
  padding-bottom: 1px;
  transition: border-color 0.3s ease, text-shadow 0.3s ease, color 0.3s ease;
}
.wiki::after {
  content: '';
  display: inline-block;
  width: 4px; height: 4px;
  border-radius: 50%;
  background: hsl(var(--na-h) 0% 55%);
  margin-left: 4px;
  vertical-align: super;
  opacity: 0.7;
  transition: box-shadow 0.3s ease, opacity 0.3s ease;
}
.wiki:hover {
  color: #fff;
  border-color: hsl(var(--na-h) 0% 70%);
  text-shadow: 0 0 18px hsl(var(--na-h) 0% 55% / 0.9);
}
.wiki:hover::after { opacity: 1; box-shadow: 0 0 10px hsl(var(--na-h) 0% 55%); }

.ext {
  color: var(--accent-glow);
  text-decoration: none;
  border-bottom: 1px dashed rgba(226, 226, 226, 0.35);
  transition: color 0.3s ease;
}
.ext:hover { color: #fff; }

/* margin notes — hidden references that surface as you read */
.margin-note {
  margin: 1.8rem 0;
  padding: 0.9rem 1.2rem;
  border-left: 1px solid hsl(var(--na-h) 0% 55% / 0.55);
  background: linear-gradient(90deg, hsl(var(--na-h) 0% 55% / 0.06), transparent 70%);
  opacity: 0;
  transform: translateX(14px);
  transition: opacity 0.9s ease, transform 0.9s var(--ease-vault);
}
.margin-note.seen { opacity: 1; transform: none; }
.margin-note p {
  font-family: var(--serif);
  font-style: italic;
  font-size: 0.9rem;
  line-height: 1.65;
  color: var(--ink-mid);
}
.margin-note .wiki { font-family: var(--sans); font-style: normal; font-size: 0.78rem; letter-spacing: 0.04em; white-space: nowrap; }

/* feature lists */
.feature-list {
  list-style: none;
  margin: 0 0 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.feature-list li {
  padding-left: 22px;
  position: relative;
}
.feature-list li::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 0.72em;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: hsl(var(--na-h) 0% 58% / 0.9);
  box-shadow: 0 0 8px hsl(var(--na-h) 0% 55% / 0.6);
}
.feature-list strong { color: var(--ink); font-weight: 500; }

/* stack chips */
.stack {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 1.5rem;
}
.stack li {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--ink-mid);
  border: 1px solid var(--hairline);
  border-radius: 999px;
  padding: 5px 13px;
  background: rgba(255, 255, 255, 0.02);
}

/* project index (inside Projects note) */
.project-index {
  list-style: none;
  margin: 0 0 1.6rem;
  display: flex;
  flex-direction: column;
}
.project-index a {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 14px 4px;
  border-bottom: 1px solid var(--hairline);
  text-decoration: none;
}
.project-index a::after { display: none; }
.project-index strong {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.15rem;
  color: var(--ink);
  transition: color 0.3s ease, text-shadow 0.3s ease;
}
.project-index span {
  font-size: 0.8rem;
  color: var(--ink-dim);
}
.project-index a:hover strong { color: #fff; text-shadow: 0 0 20px rgba(255, 255, 255, 0.68); }

/* ── stats ── */
.stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--hairline);
  border: 1px solid var(--hairline);
  border-radius: 12px;
  overflow: hidden;
  margin: 2.4rem 0;
}
.stat {
  background: var(--bg-raise);
  padding: 22px 20px 18px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.stat-num {
  font-family: var(--serif);
  font-weight: 300;
  font-size: 2.5rem;
  line-height: 1;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.stat-inf {
  color: hsl(var(--na-h) 0% 72%);
  text-shadow: 0 0 24px hsl(var(--na-h) 0% 55% / 0.7);
  animation: inf-breathe 4s ease-in-out infinite;
}
@keyframes inf-breathe {
  0%, 100% { text-shadow: 0 0 14px rgba(255, 255, 255, 0.3); }
  50%      { text-shadow: 0 0 34px rgba(255, 255, 255, 0.78); }
}
.stat-label {
  font-size: 0.64rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-dim);
}

/* ── sales journey — read-only, live from SCOTTY // OS ── */
.sales-journey {
  margin: 1.6rem 0 2rem;
  padding: 20px 22px;
  border: 1px solid hsl(var(--na-h, 45) 40% 55% / 0.25);
  border-radius: 14px;
  background: radial-gradient(ellipse 90% 80% at 0% 0%, hsl(var(--na-h, 45) 60% 50% / 0.08), transparent);
}
.sj-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.sj-kicker { font-size: 0.6rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-dim); }
.sj-rank { display: inline-flex; align-items: center; gap: 9px; }
.sj-emblem { display: inline-flex; color: hsl(var(--na-h, 45) 85% 65%);
  filter: drop-shadow(0 0 8px hsl(var(--na-h, 45) 85% 55% / 0.6)); }
.sj-rank-name { font-family: var(--serif); font-size: 1rem; color: var(--ink); }
.sj-bar { height: 4px; border-radius: 3px; background: rgba(255, 255, 255, 0.06); overflow: hidden; margin-top: 14px; }
.sj-bar i { display: block; height: 100%; border-radius: 3px;
  background: linear-gradient(90deg, hsl(var(--na-h, 45) 75% 45%), hsl(var(--na-h, 45) 90% 65%));
  transition: width 0.8s var(--ease-vault); }
.sj-xp { font-size: 0.68rem; color: var(--ink-dim); font-family: var(--sans); margin-top: 7px; font-variant-numeric: tabular-nums; }
.sj-counts { display: flex; gap: 28px; margin-top: 16px; flex-wrap: wrap; }
.sj-count { display: flex; flex-direction: column; gap: 3px; }
.sj-num { font-family: var(--serif); font-weight: 300; font-size: 1.7rem; color: var(--ink); font-variant-numeric: tabular-nums; }
.sj-label { font-size: 0.6rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-dim); }
.sj-foot { margin-top: 14px; font-size: 0.66rem; color: var(--ink-dim); font-style: italic; }

@media (max-width: 640px) {
  .sj-counts { gap: 20px; }
}

/* ── contact ── */
.contact-body { max-width: 56ch; }
.contact-statement {
  font-family: var(--serif);
  font-weight: 300;
  font-style: italic;
  font-size: clamp(2.6rem, 5vw, 3.6rem);
  line-height: 1.08;
  color: #fff;
  margin: 1rem 0 2rem;
  text-shadow: 0 0 60px rgba(255, 255, 255, 0.26);
}
.email-row {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin: 2rem 0 1rem;
}
.email-link {
  font-family: var(--serif);
  font-size: 1.35rem;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.6);
  padding-bottom: 3px;
  transition: text-shadow 0.35s ease, border-color 0.35s ease;
}
.email-link:hover { text-shadow: 0 0 26px rgba(255, 255, 255, 0.75); border-color: var(--accent-glow); }
#btn-copy-email {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: var(--accent-glow);
  font-family: var(--sans);
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 8px 16px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.3s ease, box-shadow 0.3s ease;
}
#btn-copy-email:hover { background: rgba(255, 255, 255, 0.16); box-shadow: 0 0 20px rgba(255, 255, 255, 0.2); }
#btn-copy-email.copied { color: #000; background: rgba(255, 255, 255, 0.9); }
.contact-small { font-size: 0.82rem; color: var(--ink-dim); }

/* ── backlinks footer ── */
#backlinks { margin-top: 3.6rem; }
#backlinks h2 {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--ink-dim);
  margin-bottom: 1.1rem;
}
.bl-rule {
  width: 22px;
  height: 1px;
  background: linear-gradient(90deg, var(--accent), transparent);
}
#backlink-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 9px;
}
#backlink-list a {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 12px 14px;
  border: 1px solid var(--hairline);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.015);
  text-decoration: none;
  transition: border-color 0.3s ease, background 0.3s ease, transform 0.3s var(--ease-vault);
}
#backlink-list a::after { display: none; }
#backlink-list a:hover {
  border-color: rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.05);
  transform: translateY(-2px);
}
.bl-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent-soft);
  box-shadow: 0 0 9px rgba(255, 255, 255, 0.7);
  flex: none;
}
.bl-meta { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.bl-name {
  font-size: 0.84rem;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bl-rel {
  font-family: var(--serif);
  font-style: italic;
  font-size: 0.72rem;
  color: var(--ink-dim);
}

/* ════ SKILL CONSTELLATION ════ */

.constellation-wrap { margin: 2rem 0 2.2rem; }
#constellation {
  width: 100%;
  height: auto;
  display: block;
  overflow: visible;
}
.c-edges line {
  stroke: rgba(232, 232, 232, 0.16);
  stroke-width: 1;
  transition: stroke 0.35s ease, stroke-width 0.35s ease, opacity 0.35s ease;
}
.c-edges line.bridge { stroke-dasharray: 3 5; }
.c-edges line.lit {
  stroke: rgba(238, 238, 238, 0.85);
  stroke-width: 1.4;
  filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.75));
}
.c-edges line.dim { opacity: 0.25; }

.skill { cursor: pointer; outline: none; }
.skill .halo {
  fill: rgba(255, 255, 255, 0.07);
  transition: fill 0.35s ease, r 0.35s ease;
}
.skill .dot {
  fill: #E2E2E2;
  transition: fill 0.35s ease;
}
.skill.anchor .dot { fill: var(--accent-glow); }
.skill text {
  fill: var(--ink-dim);
  font-family: var(--sans);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  text-anchor: middle;
  transition: fill 0.35s ease;
  pointer-events: none;
}
.skill.lit .halo, .skill:focus-visible .halo { fill: rgba(255, 255, 255, 0.22); }
.skill.lit .dot,  .skill:focus-visible .dot  { fill: #fff; }
.skill.lit text,  .skill:focus-visible text  { fill: var(--ink); }
.skill.dim { opacity: 0.28; }
.skill.dim text { fill: var(--ink-dim); }

.bob { animation: sk-bob 7s ease-in-out infinite; }
.skill:nth-child(odd)  .bob { animation-duration: 8.5s; animation-delay: -3s; }
.skill:nth-child(3n)   .bob { animation-duration: 9.5s; animation-delay: -6s; }
@keyframes sk-bob {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-5px); }
}

.constellation-wrap figcaption {
  font-family: var(--serif);
  font-style: italic;
  font-size: 0.8rem;
  color: var(--ink-dim);
  text-align: center;
  margin-top: 0.6rem;
}

/* ════ INDEX ════ */

#index-scrim {
  position: fixed;
  inset: 0;
  z-index: 54;
  background: rgba(5, 5, 5, 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity 0.4s ease;
}
#index-scrim.show { opacity: 1; }

#vault-index {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -47%) scale(0.97);
  width: min(560px, calc(100vw - 40px));
  max-height: min(680px, 78vh);
  z-index: 55;
  display: flex;
  flex-direction: column;
  background: linear-gradient(170deg, rgba(16, 16, 16, 0.96), rgba(9, 9, 9, 0.97));
  border: 1px solid rgba(232, 232, 232, 0.14);
  border-radius: 18px;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.6), 0 0 60px rgba(255, 255, 255, 0.045);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.35s ease, transform 0.35s var(--ease-vault), visibility 0s linear 0.35s;
}
#vault-index.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translate(-50%, -50%);
  transition: opacity 0.35s ease, transform 0.35s var(--ease-vault), visibility 0s;
}

.index-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 24px 26px 16px;
  border-bottom: 1px solid var(--hairline);
  flex: none;
}
.index-title {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: 1.35rem;
  color: var(--ink);
}
.index-sub {
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-dim);
  margin-top: 4px;
}
#index-close {
  background: none;
  border: none;
  color: var(--ink-dim);
  font-size: 0.9rem;
  cursor: pointer;
  padding: 6px 9px;
  border-radius: 8px;
  transition: color 0.3s ease;
}
#index-close:hover { color: var(--ink); }

.index-groups {
  overflow-y: auto;
  padding: 12px 16px 20px;
  scrollbar-width: thin;
  scrollbar-color: rgba(232, 232, 232, 0.25) transparent;
}
.index-groups details { border-bottom: 1px solid rgba(255, 255, 255, 0.04); }
.index-groups details:last-child { border-bottom: none; }
.index-groups summary {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 13px 10px;
  cursor: pointer;
  font-size: 0.72rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ink-mid);
  user-select: none;
}
.index-groups summary::-webkit-details-marker { display: none; }
.grp-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  flex: none;
  box-shadow: 0 0 9px rgba(255, 255, 255, 0.62);
}
.grp-dot.core    { background: hsl(210 88% 64%); }
.grp-dot.systems { background: hsl(283 78% 68%); }
.grp-dot.craft   { background: hsl(160 68% 52%); }
.grp-dot.work    { background: hsl(25 88% 60%); }
.grp-dot.story   { background: #A98BFF; }
.grp-count {
  margin-left: auto;
  font-size: 0.66rem;
  color: var(--ink-dim);
  letter-spacing: 0;
}
.index-groups ul { list-style: none; padding: 0 0 10px; }
.index-groups li a {
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding: 9px 12px 9px 28px;
  border-radius: 8px;
  text-decoration: none;
  font-size: 0.92rem;
  color: var(--ink-mid);
  transition: background 0.25s ease, color 0.25s ease;
}
.index-groups li a:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}
.idx-num {
  font-size: 0.64rem;
  color: var(--ink-dim);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.1em;
}
.index-groups li a.visited::after {
  content: '';
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--accent-soft);
  box-shadow: 0 0 7px rgba(255, 255, 255, 0.75);
  margin-left: auto;
  align-self: center;
}

/* ════ MOBILE — a different instrument, not a smaller one ════ */

@media (max-width: 860px), (pointer: coarse) and (max-width: 1024px) {

  :root { --panel-w: 100vw; }

  #hint, #minimap, #btn-index { display: none; }

  #hud-top { padding: 18px 18px; }
  #progress-dots { grid-template-columns: repeat(9, 1fr); gap: 4px; }

  /* the vault index becomes a bottom sheet */
  #sheet-pull {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 7px;
    position: fixed;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    z-index: 52;
    width: min(430px, calc(100vw - 24px));
    padding: 12px 18px calc(14px + env(safe-area-inset-bottom));
    background: linear-gradient(180deg, rgba(15, 15, 15, 0.88), rgba(10, 10, 10, 0.94));
    border: 1px solid rgba(232, 232, 232, 0.14);
    border-bottom: none;
    border-radius: 18px 18px 0 0;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    cursor: pointer;
    transition: transform 0.5s var(--ease-vault), opacity 0.4s ease;
  }
  body.note-open #sheet-pull, body.index-open #sheet-pull { transform: translateX(-50%) translateY(110%); opacity: 0; }
  .pull-bar {
    width: 38px; height: 4px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.18);
  }
  .pull-label {
    font-size: 0.68rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--ink-mid);
  }

  #vault-index {
    top: auto;
    left: 0;
    bottom: 0;
    transform: translateY(103%);
    width: 100vw;
    max-height: 76dvh;
    border-radius: 22px 22px 0 0;
    border-left: none;
    border-right: none;
    border-bottom: none;
  }
  #vault-index.open { transform: none; }

  /* the note panel becomes a full sheet rising from below,
     leaving a sliver of the living graph above it */
  #note-panel {
    top: auto;
    left: 0; right: 0; bottom: 0;
    width: 100vw;
    height: calc(100dvh - 64px);
    border-left: none;
    border-top: 1px solid rgba(232, 232, 232, 0.18);
    border-radius: 20px 20px 0 0;
    transform: translateY(104%);
  }
  #note-panel::before { border-radius: 20px 20px 0 0; }

  #note-scroll { padding: 26px 22px 90px; }
  .note h1 { font-size: 2.1rem; }
  .note-body { font-size: 0.94rem; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  #backlink-list { grid-template-columns: 1fr; }

  /* hover preview becomes a touch card pinned above the sheet-pull */
  #preview {
    left: 50% !important;
    top: auto !important;
    bottom: calc(84px + env(safe-area-inset-bottom));
    transform: translateX(-50%) translateY(10px) scale(0.98);
    width: min(340px, calc(100vw - 28px));
    pointer-events: auto;
  }
  #preview.show { transform: translateX(-50%); }
  .preview-hint { color: var(--accent-glow); }
}

/* ════ MINI-SITES — every note is its own little website ════
   Each note carries --na-h (its accent hue); every component
   below inherits it, so sixteen notes feel like sixteen sites
   that clearly belong to one vault. */

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ── site nav — the note's own navbar ── */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 6;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 4px;
  margin-bottom: 28px;
  background: linear-gradient(180deg, rgba(9, 10, 19, 0.94), rgba(9, 10, 19, 0.78));
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid hsl(var(--na-h) 0% 60% / 0.18);
}
.site-brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 0.94rem;
  color: var(--ink);
  white-space: nowrap;
}
.sb-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex: none;
  background: hsl(var(--na-h) 0% 60%);
  box-shadow: 0 0 12px hsl(var(--na-h) 0% 55%);
}
.site-links {
  display: flex;
  gap: 2px;
  margin-left: auto;
  overflow-x: auto;
  scrollbar-width: none;
}
.site-links::-webkit-scrollbar { display: none; }
.site-links a {
  font-size: 0.61rem;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--ink-dim);
  text-decoration: none;
  padding: 6px 7px;
  border-radius: 6px;
  white-space: nowrap;
  transition: color 0.25s ease;
}
.site-links a:hover { color: var(--ink); }
.site-links a.on { color: hsl(var(--na-h) 0% 72%); }
.site-cta {
  flex: none;
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  color: #fff;
  background: hsl(var(--na-h) 0% 46% / 0.9);
  padding: 8px 14px;
  border-radius: 999px;
  white-space: nowrap;
  box-shadow: 0 0 20px hsl(var(--na-h) 0% 50% / 0.3);
  transition: background 0.3s ease, transform 0.3s var(--ease-vault);
}
.site-cta:hover { background: hsl(var(--na-h) 0% 54%); transform: translateY(-1px); }

/* ── hero ── */
.site-hero { margin-bottom: 2.4rem; }
.site-hero .note-lede { max-width: 56ch; }
.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 1.7rem;
}
.btn-solid, .btn-ghost {
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 12px 21px;
  border-radius: 999px;
  transition: transform 0.3s var(--ease-vault), box-shadow 0.3s ease, background 0.3s ease, color 0.3s ease;
}
.btn-solid {
  color: #fff;
  background: hsl(var(--na-h) 0% 47%);
  box-shadow: 0 8px 32px hsl(var(--na-h) 0% 50% / 0.35);
}
.btn-solid:hover { transform: translateY(-2px); box-shadow: 0 12px 40px hsl(var(--na-h) 0% 50% / 0.5); }
.btn-ghost {
  color: hsl(var(--na-h) 0% 74%);
  border: 1px solid hsl(var(--na-h) 0% 60% / 0.4);
}
.btn-ghost:hover { color: #fff; border-color: hsl(var(--na-h) 0% 65% / 0.8); }

/* ── widget — the "live" showpiece of each mini-site ── */
.widget {
  margin: 0 0 2.6rem;
  padding: 16px 18px 14px;
  border-radius: 16px;
  border: 1px solid hsl(var(--na-h) 0% 60% / 0.22);
  background: linear-gradient(165deg, hsl(var(--na-h) 0% 40% / 0.09), rgba(10, 11, 21, 0.6));
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
.widget-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 14px;
}
.widget-title {
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-mid);
}
.live-dot {
  font-size: 0.6rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: hsl(var(--na-h) 0% 66%);
  white-space: nowrap;
  animation: livepulse 2.2s ease-in-out infinite;
}
@keyframes livepulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.45; } }
.widget-foot {
  margin-top: 13px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 0.74rem;
  color: var(--ink-dim);
}

/* waveform — the receptionist is mid-sentence */
.waveform {
  display: flex;
  align-items: center;
  gap: 3px;
  height: 54px;
  padding: 0 2px;
}
.waveform i {
  flex: 1;
  height: 42%;
  border-radius: 2px;
  background: hsl(var(--na-h) 0% 62% / 0.75);
  animation: wv 1.1s ease-in-out infinite alternate;
}
.waveform i:nth-child(2n)  { animation-delay: -0.2s;  height: 30%; }
.waveform i:nth-child(3n)  { animation-delay: -0.45s; height: 58%; }
.waveform i:nth-child(4n)  { animation-delay: -0.7s;  height: 38%; }
.waveform i:nth-child(5n)  { animation-delay: -0.9s;  height: 22%; }
.waveform i:nth-child(7n)  { animation-delay: -0.6s;  height: 66%; }
@keyframes wv { from { transform: scaleY(0.35); } to { transform: scaleY(1.5); } }

.widget-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 14px 0 4px;
}
.wstat {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 11px 13px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--hairline);
}
.wstat-num {
  font-family: var(--serif);
  font-weight: 300;
  font-size: 1.55rem;
  color: #fff;
  font-variant-numeric: tabular-nums;
}
.wstat-label {
  font-size: 0.58rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-dim);
}

.widget-feed {
  margin-top: 13px;
  border-top: 1px solid var(--hairline);
  padding-top: 11px;
  min-height: 2.1em;
}
.widget-feed p {
  font-size: 0.79rem;
  color: var(--ink-mid);
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.widget-feed p strong { color: var(--ink); font-weight: 500; }
.widget-feed p em { font-style: normal; color: var(--ink-dim); font-size: 0.68rem; margin-left: 6px; }
.widget-feed p.swap { opacity: 0; transform: translateY(6px); }

/* ── card grids ── */
.cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 11px;
  margin: 1.4rem 0 1.8rem;
}
.card {
  padding: 15px 16px;
  border-radius: 12px;
  border: 1px solid var(--hairline);
  background: rgba(255, 255, 255, 0.018);
  transition: border-color 0.3s ease, background 0.3s ease, transform 0.3s var(--ease-vault);
}
.card:hover {
  border-color: hsl(var(--na-h) 0% 60% / 0.45);
  background: hsl(var(--na-h) 0% 50% / 0.05);
  transform: translateY(-2px);
}
.card h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.02rem;
  color: var(--ink);
  margin-bottom: 5px;
}
.card p { font-size: 0.78rem; line-height: 1.6; color: var(--ink-mid); margin: 0; }

/* ── process steps ── */
.steps {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin: 1.5rem 0 1.8rem;
}
.steps li {
  padding: 14px;
  border-radius: 12px;
  border: 1px solid var(--hairline);
  background: rgba(255, 255, 255, 0.015);
}
.step-num {
  display: block;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  font-size: 1.5rem;
  color: hsl(var(--na-h) 0% 68% / 0.85);
  margin-bottom: 6px;
}
.steps h3 { font-size: 0.8rem; font-weight: 600; letter-spacing: 0.05em; color: var(--ink); margin-bottom: 5px; }
.steps p { font-size: 0.71rem; line-height: 1.55; color: var(--ink-dim); margin: 0; }

/* ── anatomy pipeline (AI Automation) ── */
.anatomy {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 9px;
  margin: 1.4rem 0 1.8rem;
}
.anatomy li {
  position: relative;
  padding: 13px 12px;
  border-radius: 11px;
  border: 1px solid var(--hairline);
  background: rgba(255, 255, 255, 0.015);
}
.anatomy li:not(:last-child)::after {
  content: '→';
  position: absolute;
  right: -11px;
  top: 50%;
  transform: translateY(-50%);
  color: hsl(var(--na-h) 0% 65% / 0.7);
  font-size: 0.8rem;
  z-index: 1;
}
.anatomy h3 { font-size: 0.68rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink); margin-bottom: 5px; }
.anatomy p { font-size: 0.67rem; line-height: 1.5; color: var(--ink-dim); margin: 0; }
.anatomy .is-ai {
  border-color: hsl(var(--na-h) 0% 60% / 0.55);
  box-shadow: 0 0 22px hsl(var(--na-h) 0% 55% / 0.14);
}
.anatomy .is-ai h3 { color: hsl(var(--na-h) 0% 72%); }

/* ── call transcript (Voice AI) ── */
.bubbles { display: flex; flex-direction: column; gap: 9px; }
.bubbles p {
  max-width: 80%;
  padding: 9px 13px;
  border-radius: 13px;
  font-size: 0.84rem;
  line-height: 1.5;
  margin: 0;
  opacity: 0;
  animation: bub 0.5s var(--ease-vault) forwards;
}
.bubbles p:nth-child(1) { animation-delay: 0.3s; }
.bubbles p:nth-child(2) { animation-delay: 0.9s; }
.bubbles p:nth-child(3) { animation-delay: 1.5s; }
.bubbles p:nth-child(4) { animation-delay: 2.1s; }
.bubbles p:nth-child(5) { animation-delay: 2.7s; }
.bubbles p:nth-child(6) { animation-delay: 3.3s; }
.bubbles p:nth-child(7) { animation-delay: 4s; }
.b-agent {
  align-self: flex-start;
  background: hsl(var(--na-h) 0% 45% / 0.18);
  border: 1px solid hsl(var(--na-h) 0% 55% / 0.28);
  color: var(--ink);
  border-bottom-left-radius: 4px;
}
.b-caller {
  align-self: flex-end;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--hairline);
  color: var(--ink-mid);
  border-bottom-right-radius: 4px;
}
.b-note {
  align-self: center;
  background: none;
  border: 1px dashed hsl(var(--na-h) 0% 55% / 0.45);
  color: hsl(var(--na-h) 0% 70%);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
}
@keyframes bub { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ── workflow canvas (n8n) ── */
.flow-canvas {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 10px;
  background-image: radial-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 18px 18px;
}
.flow-wires path {
  stroke: hsl(var(--na-h) 0% 62% / 0.5);
  stroke-width: 1.5;
  fill: none;
  stroke-dasharray: 4 6;
  animation: wire 1.2s linear infinite;
}
@keyframes wire { to { stroke-dashoffset: -20; } }
.flow-dots circle {
  fill: hsl(var(--na-h) 0% 70%);
  filter: drop-shadow(0 0 4px hsl(var(--na-h) 0% 60%));
}
.flow-nodes rect {
  fill: rgba(14, 16, 32, 0.92);
  stroke: hsl(var(--na-h) 0% 60% / 0.45);
  stroke-width: 1;
}
.flow-nodes rect.fn-ai { stroke: hsl(264 80% 65% / 0.8); }
.flow-nodes rect.fn-ok { stroke: hsl(152 65% 55% / 0.7); }
.flow-nodes text {
  fill: var(--ink-mid);
  font: 500 11px Inter, sans-serif;
  text-anchor: middle;
}

/* ── kanban (GoHighLevel) ── */
.kcols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.kcol h4 {
  display: flex;
  justify-content: space-between;
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-dim);
  margin-bottom: 9px;
}
.kcol h4 em { font-style: normal; color: hsl(var(--na-h) 0% 66%); }
.kcard {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--hairline);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 0.7rem;
  line-height: 1.45;
  color: var(--ink-mid);
  margin-bottom: 8px;
}
.kcard.hot {
  border-color: hsl(var(--na-h) 0% 60% / 0.7);
  color: var(--ink);
  box-shadow: 0 0 16px hsl(var(--na-h) 0% 55% / 0.18);
  animation: livepulse 2.4s ease-in-out infinite;
}

/* ── code block (Prompt Engineering) ── */
.codeblock pre {
  overflow-x: auto;
  margin: 0;
  padding: 4px 2px 2px;
  scrollbar-width: thin;
}
.codeblock code {
  font-family: 'Cascadia Code', Consolas, 'SF Mono', monospace;
  font-size: 0.76rem;
  line-height: 1.75;
  color: #B9C2DC;
  white-space: pre;
}
.c-key { color: hsl(var(--na-h) 0% 74%); font-weight: 600; }
.c-str { color: #8FBF9F; }

/* ── standards rings (Web Development) ── */
.rings {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.ring { text-align: center; margin: 0; }
.ring svg { width: 74px; height: 74px; transform: rotate(-90deg); }
.ring-bg { fill: none; stroke: rgba(255, 255, 255, 0.07); stroke-width: 5; }
.ring-val {
  fill: none;
  stroke: hsl(var(--na-h) 0% 62%);
  stroke-width: 5;
  stroke-linecap: round;
  stroke-dasharray: 201;
  stroke-dashoffset: 201;
  animation: ringin 1.6s 0.4s var(--ease-vault) forwards;
  filter: drop-shadow(0 0 6px hsl(var(--na-h) 0% 55% / 0.5));
}
@keyframes ringin { to { stroke-dashoffset: 0; } }
.ring-num {
  display: block;
  font-family: var(--serif);
  font-size: 1.02rem;
  color: var(--ink);
  margin-top: 6px;
}
.ring figcaption { font-size: 0.66rem; color: var(--ink-dim); margin-top: 3px; line-height: 1.4; }

/* ── timeline (About) ── */
.years {
  list-style: none;
  margin: 1.2rem 0 1.6rem;
  border-left: 1px solid hsl(var(--na-h) 0% 60% / 0.35);
}
.years li {
  position: relative;
  padding: 0 0 1.4rem 26px;
  font-size: 0.92rem;
  line-height: 1.6;
  color: #CCCCCC;
}
.years li:last-child { padding-bottom: 0.3rem; }
.years li::before {
  content: '';
  position: absolute;
  left: -4px;
  top: 0.45em;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: hsl(var(--na-h) 0% 62%);
  box-shadow: 0 0 10px hsl(var(--na-h) 0% 55% / 0.8);
}
.years span {
  display: block;
  font-size: 0.6rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: hsl(var(--na-h) 0% 70%);
  margin-bottom: 3px;
}

/* ── project cards (Projects) — each wears its own colour ── */
.pcards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin: 0 0 1.9rem;
}
.pcard {
  --na-h: 208;   /* the single icy-blue accent hue — never per-note */
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 18px;
  border-radius: 14px;
  border: 1px solid hsl(var(--na-h) 0% 60% / 0.28);
  background: linear-gradient(160deg, hsl(var(--na-h) 0% 50% / 0.08), rgba(255, 255, 255, 0.01));
  text-decoration: none;
  transition: transform 0.35s var(--ease-vault), border-color 0.35s ease, box-shadow 0.35s ease;
}
.pcard:hover {
  transform: translateY(-3px);
  border-color: hsl(var(--na-h) 0% 62% / 0.6);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.4), 0 0 30px hsl(var(--na-h) 0% 55% / 0.14);
}
.pc-tag {
  font-size: 0.58rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: hsl(var(--na-h) 0% 70%);
}
.pcard h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.25rem;
  color: #fff;
}
.pcard p { font-size: 0.79rem; line-height: 1.6; color: var(--ink-mid); margin: 0; }
.pc-go {
  margin-top: auto;
  padding-top: 8px;
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: hsl(var(--na-h) 0% 70%);
}

/* ── browser frame — live builds inside the vault ── */
.browser {
  margin: 0 0 2.6rem;
  border: 1px solid hsl(var(--na-h) 0% 60% / 0.25);
  border-radius: 14px;
  overflow: hidden;
  background: #0A0B15;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.5), 0 0 40px hsl(var(--na-h) 0% 50% / 0.07);
}
.browser-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 14px;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid var(--hairline);
}
.b-dots { display: flex; gap: 5px; }
.b-dots i {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: hsl(var(--na-h) 0% 58% / 0.4);
}
.b-dots i:first-child { background: hsl(var(--na-h) 0% 60% / 0.8); }
.b-url {
  flex: 1;
  text-align: center;
  font-size: 0.64rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-dim);
}
.browser iframe {
  width: 100%;
  height: 420px;
  border: 0;
  display: block;
  background: #0A0B15;
}
.browser figcaption {
  padding: 9px 14px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 0.78rem;
  color: var(--ink-dim);
  border-top: 1px solid var(--hairline);
}

/* wireframe mock (no live build to embed) */
.wireframe {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-height: 300px;
}
.wireframe i, .wf-title, .wf-line { animation: wfpulse 2.8s ease-in-out infinite; }
@keyframes wfpulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.55; } }
.wf-nav { display: flex; gap: 10px; }
.wf-nav i { height: 8px; width: 52px; border-radius: 4px; background: hsl(var(--na-h) 0% 60% / 0.28); }
.wf-nav i:first-child { width: 84px; background: hsl(var(--na-h) 0% 58% / 0.45); }
.wf-hero { display: flex; flex-direction: column; gap: 9px; padding: 14px 0 4px; }
.wf-title { width: 58%; height: 22px; border-radius: 6px; background: hsl(var(--na-h) 0% 55% / 0.4); }
.wf-line { width: 82%; height: 9px; border-radius: 4px; background: rgba(255, 255, 255, 0.08); }
.wf-line.short { width: 54%; }
.wf-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.wf-cards i {
  height: 74px;
  border-radius: 8px;
  background: hsl(var(--na-h) 0% 50% / 0.16);
  border: 1px solid hsl(var(--na-h) 0% 55% / 0.3);
}
.wf-foot i { display: block; height: 10px; width: 38%; border-radius: 4px; background: rgba(255, 255, 255, 0.07); }

/* ── ranked candidates (Recruitment AI) ── */
.ranking ul { list-style: none; display: flex; flex-direction: column; gap: 13px; }
.ranking li {
  display: grid;
  grid-template-columns: 96px 1fr 34px;
  grid-template-rows: auto auto;
  gap: 3px 12px;
  align-items: center;
}
.rk-name { font-size: 0.78rem; color: var(--ink); white-space: nowrap; }
.rk-bar {
  grid-column: 2;
  height: 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
}
.rk-bar i {
  display: block;
  height: 100%;
  width: var(--s);
  border-radius: 3px;
  background: linear-gradient(90deg, hsl(var(--na-h) 0% 42%), hsl(var(--na-h) 0% 62%));
  transform-origin: left;
  animation: rkin 1.2s 0.35s var(--ease-vault) both;
}
@keyframes rkin { from { transform: scaleX(0); } }
.rk-score {
  font-size: 0.84rem;
  font-weight: 600;
  color: hsl(var(--na-h) 0% 70%);
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.rk-why { grid-column: 1 / -1; font-size: 0.69rem; color: var(--ink-dim); }

/* ── retention curve (Content & Growth) ── */
.retention svg { width: 100%; height: auto; display: block; }
.ret-grid line { stroke: rgba(255, 255, 255, 0.05); stroke-width: 1; }
.ret-line {
  fill: none;
  stroke: hsl(var(--na-h) 0% 60%);
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-dasharray: 640;
  stroke-dashoffset: 640;
  animation: retdraw 2.2s 0.4s ease-out forwards;
  filter: drop-shadow(0 0 6px hsl(var(--na-h) 0% 55% / 0.55));
}
@keyframes retdraw { to { stroke-dashoffset: 0; } }
.ret-pt { fill: #fff; opacity: 0; animation: retpt 0.5s forwards; }
.ret-pt:nth-of-type(1) { animation-delay: 0.6s; }
.ret-pt:nth-of-type(2) { animation-delay: 1.6s; }
.ret-pt:nth-of-type(3) { animation-delay: 2.5s; }
@keyframes retpt { to { opacity: 1; } }
.ret-notes {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 8px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 0.72rem;
  color: var(--ink-dim);
}
.ret-notes span:nth-child(2) { text-align: center; }
.ret-notes span:last-child { text-align: right; }

/* ── contact extras ── */
.contact-avail {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 0.66rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-mid);
  margin: -0.8rem 0 1.6rem;
}
.contact-avail .live-dot { font-size: 0.8rem; }

/* ── evidence tags — every visual documents its own internals ── */
.etags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  margin-top: 14px;
}
.etags-label {
  font-size: 0.54rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-dim);
  margin-right: 2px;
}
.etag {
  --na-h: 208;   /* the single icy-blue accent hue — never per-note */
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.6rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  color: hsl(var(--na-h) 0% 72%);
  border: 1px solid hsl(var(--na-h) 0% 60% / 0.35);
  background: hsl(var(--na-h) 0% 55% / 0.07);
  padding: 5px 11px;
  border-radius: 999px;
  transition: background 0.3s ease, box-shadow 0.3s ease, transform 0.3s var(--ease-vault);
  animation: etagbreathe 3.6s ease-in-out infinite;
}
.etag:nth-child(3) { animation-delay: -1.2s; }
.etag:nth-child(4) { animation-delay: -2.4s; }
@keyframes etagbreathe {
  0%, 100% { box-shadow: 0 0 0 hsl(var(--na-h) 0% 55% / 0); }
  50%      { box-shadow: 0 0 14px hsl(var(--na-h) 0% 55% / 0.22); }
}
.etag::before {
  content: '';
  width: 5px; height: 5px;
  border-radius: 50%;
  background: hsl(var(--na-h) 0% 62%);
  box-shadow: 0 0 7px hsl(var(--na-h) 0% 55%);
}
.etag em {
  font-style: normal;
  font-size: 0.52rem;
  letter-spacing: 0.1em;
  color: var(--ink-dim);
}
.etag:hover {
  background: hsl(var(--na-h) 0% 50% / 0.2);
  transform: translateY(-1px);
  box-shadow: 0 0 20px hsl(var(--na-h) 0% 55% / 0.35);
}

/* ── system chain — the whole loop, demonstrated ── */
.syschain {
  display: flex;
  align-items: center;
  margin: 14px 0 0;
  border-top: 1px solid var(--hairline);
  padding-top: 12px;
}
.syschain span {
  position: relative;
  flex: 1;
  text-align: center;
  font-size: 0.55rem;
  letter-spacing: 0.17em;
  text-transform: uppercase;
  color: var(--ink-dim);
  padding: 4px 2px;
  animation: chainlight 6s linear infinite;
}
.syschain span:nth-child(1) { animation-delay: 0s; }
.syschain span:nth-child(2) { animation-delay: 1.2s; }
.syschain span:nth-child(3) { animation-delay: 2.4s; }
.syschain span:nth-child(4) { animation-delay: 3.6s; }
.syschain span:nth-child(5) { animation-delay: 4.8s; }
.syschain span + span::before {
  content: '→';
  position: absolute;
  left: -6px;
  top: 50%;
  transform: translateY(-50%);
  color: hsl(var(--na-h) 0% 65% / 0.45);
  font-size: 0.7rem;
}
@keyframes chainlight {
  0%, 24%, 100% { color: var(--ink-dim); text-shadow: none; }
  8% { color: #fff; text-shadow: 0 0 16px hsl(var(--na-h) 0% 60%); }
}

/* ── follow the thread — you don't navigate, you follow ideas ── */
#thread { margin-top: 3.4rem; }
.thread-kicker {
  font-size: 0.58rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--ink-dim);
  margin-bottom: 10px;
}
#thread a {
  --na-h: 208;   /* the single icy-blue accent hue — never per-note */
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 24px 64px 24px 26px;
  border: 1px solid hsl(var(--na-h) 0% 60% / 0.3);
  border-radius: 16px;
  background: linear-gradient(120deg, hsl(var(--na-h) 0% 50% / 0.09), transparent 65%);
  text-decoration: none;
  overflow: hidden;
  transition: border-color 0.35s ease, transform 0.35s var(--ease-vault), box-shadow 0.35s ease;
}
#thread { --na-h: 208; }
#thread a { --na-h: inherit; }
#thread a::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, transparent, hsl(var(--na-h) 0% 60%), transparent);
  opacity: 0.8;
}
#thread a::after {
  content: '⟶';
  position: absolute;
  right: 24px;
  top: 50%;
  transform: translateY(-50%);
  color: hsl(var(--na-h) 0% 70%);
  font-size: 1.25rem;
  transition: transform 0.35s var(--ease-vault);
}
#thread a:hover {
  border-color: hsl(var(--na-h) 0% 62% / 0.65);
  transform: translateY(-2px);
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.4), 0 0 34px hsl(var(--na-h) 0% 55% / 0.15);
}
#thread a:hover::after { transform: translate(7px, -50%); }
.thread-label {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 350;
  font-size: 1.4rem;
  line-height: 1.25;
  color: #fff;
}
.thread-to {
  font-size: 0.6rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: hsl(var(--na-h) 0% 70%);
}

/* ── the bottleneck finder — the page writes your email ── */
.finder-q {
  font-size: 0.66rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-mid);
  margin: 18px 0 9px;
}
.finder-q em {
  font-style: italic;
  text-transform: none;
  letter-spacing: 0.02em;
  color: var(--ink-dim);
}
.finder-opts { display: flex; flex-wrap: wrap; gap: 7px; }
.finder-opts button {
  font-family: var(--sans);
  font-size: 0.76rem;
  color: var(--ink-mid);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--hairline);
  border-radius: 999px;
  padding: 8px 15px;
  cursor: pointer;
  transition: color 0.25s ease, border-color 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}
.finder-opts button:hover {
  color: #fff;
  border-color: hsl(var(--na-h) 0% 60% / 0.5);
}
.finder-opts button.sel {
  color: #fff;
  background: hsl(var(--na-h) 0% 48% / 0.25);
  border-color: hsl(var(--na-h) 0% 60% / 0.8);
  box-shadow: 0 0 16px hsl(var(--na-h) 0% 55% / 0.25);
}
#finder textarea {
  width: 100%;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--hairline);
  border-radius: 10px;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 0.85rem;
  line-height: 1.6;
  padding: 10px 13px;
  resize: vertical;
  min-height: 56px;
}
#finder textarea::placeholder { color: var(--ink-dim); }
#finder textarea:focus {
  outline: none;
  border-color: hsl(var(--na-h) 0% 60% / 0.6);
}
.finder-result {
  margin-top: 18px;
  border-top: 1px solid var(--hairline);
  padding-top: 17px;
  animation: note-in 0.5s var(--ease-vault);
}
.fr-line {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 350;
  font-size: 1.08rem;
  line-height: 1.6;
  color: var(--ink);
  margin-bottom: 15px;
}
.fr-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.fr-foot { margin-top: 11px; font-size: 0.68rem; color: var(--ink-dim); }
#finder-copy.copied { color: #fff; }

/* ── viewport demo — responsive, demonstrated ── */
.vp-btns { display: flex; gap: 4px; }
.vp-btns button {
  font-family: var(--sans);
  font-size: 0.58rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-dim);
  background: none;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 5px 11px;
  cursor: pointer;
  transition: color 0.25s ease, border-color 0.25s ease;
}
.vp-btns button:hover { color: var(--ink); }
.vp-btns button.on {
  color: hsl(var(--na-h) 0% 72%);
  border-color: hsl(var(--na-h) 0% 60% / 0.45);
}
.vp-stage {
  display: flex;
  justify-content: center;
  padding: 18px 12px;
  border-radius: 12px;
  background-image: radial-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 16px 16px;
}
.vp-frame {
  width: 100%;
  border: 1px solid hsl(var(--na-h) 0% 60% / 0.35);
  border-radius: 12px;
  background: #0A0B15;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: width 0.65s var(--ease-vault);
}
.vp-frame[data-vp="tablet"] { width: 66%; }
.vp-frame[data-vp="phone"]  { width: 38%; }
.vp-frame[data-vp="tablet"] .wf-cards { grid-template-columns: repeat(2, 1fr); }
.vp-frame[data-vp="phone"]  .wf-cards { grid-template-columns: 1fr; }
.vp-frame[data-vp="phone"]  .wf-nav i:not(:first-child) { display: none; }
.vp-frame[data-vp="phone"]  .wf-title { width: 85%; }

/* ── scroll reveals — the page assembles as curiosity pulls you down ── */
.rv {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.8s ease, transform 0.8s var(--ease-vault);
}
.rv.in { opacity: 1; transform: none; }

/* ════ PHILOSOPHY — a manifesto, not a page ════ */

.principles {
  list-style: none;
  margin: 0 0 2rem;
  display: flex;
  flex-direction: column;
}
.principles li {
  position: relative;
  padding: 2.2rem 0 2.2rem 86px;
  border-top: 1px solid var(--hairline);
}
.principles li:first-child { border-top: none; }
.pr-num {
  position: absolute;
  left: 0;
  top: 1.9rem;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  font-size: 2.6rem;
  line-height: 1;
  color: hsl(var(--na-h) 0% 68% / 0.35);
}
.principles h2 {
  font-family: var(--serif);
  font-weight: 350;
  font-size: clamp(1.5rem, 2.6vw, 1.95rem);
  letter-spacing: -0.01em;
  color: #fff;
  margin-bottom: 0.55rem;
}
.principles p {
  font-size: 0.92rem;
  line-height: 1.75;
  color: var(--ink-mid);
  max-width: 54ch;
  margin-bottom: 0.8rem;
}
.pr-proof {
  font-size: 0.62rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-decoration: none;
  color: hsl(var(--na-h) 0% 72%);
  border-bottom: 1px solid hsl(var(--na-h) 0% 60% / 0.35);
  padding-bottom: 2px;
  transition: color 0.25s ease, border-color 0.25s ease;
}
.pr-proof:hover { color: #fff; border-color: hsl(var(--na-h) 0% 70%); }

/* ════ THE LAB — unfinished on purpose ════ */

.growlist {
  list-style: none;
  margin: 0 0 2rem;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.growlist li {
  position: relative;
  padding: 18px 20px 16px 22px;
  border: 1px dashed hsl(var(--na-h) 0% 55% / 0.35);
  border-radius: 14px;
  background: linear-gradient(140deg, hsl(var(--na-h) 0% 45% / 0.05), transparent 70%);
  transition: border-color 0.3s ease, background 0.3s ease;
}
.growlist li:hover {
  border-style: solid;
  border-color: hsl(var(--na-h) 0% 58% / 0.55);
  background: hsl(var(--na-h) 0% 45% / 0.08);
}
.growlist h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.2rem;
  color: var(--ink);
  margin: 4px 0 5px;
}
.growlist p {
  font-size: 0.83rem;
  line-height: 1.65;
  color: var(--ink-mid);
  max-width: 58ch;
  margin-bottom: 4px;
}
.g-status {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.56rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid;
}
.g-status.on    { color: hsl(190 90% 62%); border-color: hsl(190 75% 50% / 0.5); }
.g-status.build { color: hsl(41 90% 62%);  border-color: hsl(41 70% 50% / 0.5); }
.g-status.done  { color: hsl(210 90% 70%); border-color: hsl(210 70% 55% / 0.5); }
.g-status.form  { color: hsl(25 90% 65%);  border-color: hsl(25 70% 50% / 0.5); animation: ospulse 2.6s infinite; }
.g-status.grow  { color: hsl(105 70% 62%); border-color: hsl(105 55% 48% / 0.5); }

/* ════ SEED NOTES — case studies still forming ════ */

.seed .site-hero h1 { opacity: 0.92; }
.seed-line {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  color: hsl(var(--na-h) 0% 65% / 0.8);
  border: 1px dashed hsl(var(--na-h) 0% 55% / 0.4);
  border-radius: 10px;
  padding: 10px 14px;
  display: inline-block;
  animation: ospulse 3.2s infinite;
}

.grp-dot.mind   { background: hsl(243 62% 72%); }
.grp-dot.future { background: hsl(45 90% 60%); }
.idx-online.forming { color: hsl(25 90% 65%); animation: ospulse 2.6s infinite; }

/* ════ SCOTTY // OS — an application, not a panel ════ */

:root { --os-h: 200; }   /* core intelligence: electric cyan terminal */

#os-app {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(10px, 4vh, 44px);
  background: radial-gradient(120% 100% at 50% 0%, rgba(6, 11, 9, 0.8), rgba(4, 5, 10, 0.93));
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transition: opacity 0.5s ease, visibility 0s linear 0.5s;
}
body.os-open #os-app {
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
  transition: opacity 0.5s ease, visibility 0s;
}

#os-shell {
  position: relative;
  width: min(760px, 100%);
  height: min(660px, 100%);
  display: flex;
  flex-direction: column;
  border: 1px solid hsl(var(--os-h) 60% 50% / 0.35);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(7, 12, 10, 0.92), rgba(5, 6, 12, 0.97));
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.65), 0 0 70px hsl(var(--os-h) 80% 45% / 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  overflow: hidden;
  transform: translateY(16px) scale(0.985);
  transition: transform 0.5s var(--ease-vault);
}
body.os-open #os-shell { transform: none; }

.os-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 16px;
  border-bottom: 1px solid hsl(var(--os-h) 50% 50% / 0.2);
  flex: none;
}
.os-brand {
  font-family: 'JetBrains Mono', Consolas, monospace;
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  color: #E9FFF3;
  display: flex;
  align-items: center;
  gap: 10px;
}
.os-brand em { color: hsl(var(--os-h) 90% 58%); font-style: normal; }
.os-power {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: hsl(var(--os-h) 90% 55%);
  box-shadow: 0 0 12px hsl(var(--os-h) 90% 55%);
  animation: ospulse 2.2s ease-in-out infinite;
}
@keyframes ospulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }
.os-status {
  margin-left: auto;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.56rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: hsl(var(--os-h) 55% 65% / 0.9);
  display: flex;
  align-items: center;
  gap: 7px;
}
.os-status i {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: hsl(var(--os-h) 90% 55%);
  box-shadow: 0 0 8px hsl(var(--os-h) 90% 55%);
}
#os-close {
  background: none;
  border: none;
  color: var(--ink-dim);
  cursor: pointer;
  font-size: 0.85rem;
  padding: 5px 9px;
  border-radius: 6px;
  transition: color 0.25s ease;
}
#os-close:hover { color: #fff; }

#os-log {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 20px 20px 8px;
  display: flex;
  flex-direction: column;
  gap: 13px;
  scrollbar-width: thin;
  scrollbar-color: hsl(var(--os-h) 50% 40% / 0.4) transparent;
}
#os-log::-webkit-scrollbar { width: 5px; }
#os-log::-webkit-scrollbar-thumb { background: hsl(var(--os-h) 50% 40% / 0.35); border-radius: 3px; }

.os-msg { max-width: 90%; font-size: 0.88rem; line-height: 1.7; animation: note-in 0.35s var(--ease-vault); }
.os-msg.ai { align-self: flex-start; color: #CDE8DA; }
.os-msg.ai strong { color: #fff; font-weight: 500; }
.os-msg.user {
  align-self: flex-end;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--hairline);
  padding: 8px 14px;
  border-radius: 12px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
}
.os-msg .caret {
  display: inline-block;
  width: 8px; height: 1.05em;
  background: hsl(var(--os-h) 90% 58%);
  vertical-align: text-bottom;
  margin-left: 3px;
  animation: oscaret 0.9s steps(2) infinite;
}
@keyframes oscaret { 50% { opacity: 0; } }

.os-links { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 10px; }
.os-links a {
  --na-h: 208;   /* the single icy-blue accent hue — never per-note */
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: hsl(var(--na-h) 0% 74%);
  text-decoration: none;
  border: 1px solid hsl(var(--na-h) 0% 60% / 0.4);
  border-radius: 999px;
  padding: 7px 14px;
  background: hsl(var(--na-h) 0% 55% / 0.08);
  transition: background 0.25s ease, box-shadow 0.25s ease, transform 0.25s var(--ease-vault);
}
.os-links a::before {
  content: '';
  width: 5px; height: 5px;
  border-radius: 50%;
  background: hsl(var(--na-h) 0% 62%);
  box-shadow: 0 0 7px hsl(var(--na-h) 0% 55%);
}
.os-links a:hover {
  transform: translateY(-1px);
  background: hsl(var(--na-h) 0% 50% / 0.18);
  box-shadow: 0 0 18px hsl(var(--na-h) 0% 55% / 0.3);
}

#os-chips { display: flex; flex-wrap: wrap; gap: 7px; padding: 8px 20px 4px; flex: none; }
#os-chips button {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  color: hsl(var(--os-h) 40% 70% / 0.85);
  background: none;
  border: 1px dashed hsl(var(--os-h) 50% 50% / 0.35);
  border-radius: 999px;
  padding: 6px 13px;
  cursor: pointer;
  transition: color 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}
#os-chips button:hover {
  color: #fff;
  border-style: solid;
  background: hsl(var(--os-h) 70% 45% / 0.12);
}

#os-form {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 10px 16px 8px;
  padding: 4px 6px 4px 14px;
  border: 1px solid hsl(var(--os-h) 55% 50% / 0.4);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.35);
  flex: none;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
#os-form:focus-within {
  border-color: hsl(var(--os-h) 80% 55% / 0.8);
  box-shadow: 0 0 26px hsl(var(--os-h) 90% 50% / 0.15);
}
.os-glyph { color: hsl(var(--os-h) 90% 58%); font-family: 'JetBrains Mono', monospace; font-weight: 600; font-size: 1rem; }
#os-input {
  flex: 1;
  min-width: 0;
  background: none;
  border: none;
  outline: none;
  color: #EAF6EF;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.88rem;
  padding: 10px 0;
}
#os-input::placeholder { color: hsl(var(--os-h) 18% 45%); }
#os-send {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 600;
  font-size: 0.62rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #06140C;
  background: hsl(var(--os-h) 85% 55%);
  border: none;
  border-radius: 8px;
  padding: 10px 17px;
  cursor: pointer;
  box-shadow: 0 0 18px hsl(var(--os-h) 90% 50% / 0.35);
  transition: background 0.25s ease;
}
#os-send:hover { background: hsl(var(--os-h) 90% 64%); }
.os-foot {
  text-align: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.56rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-dim);
  padding: 0 16px 13px;
  flex: none;
}

#os-boot {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(4, 6, 9, 0.98);
  transition: opacity 0.6s ease;
  pointer-events: none;
}
#os-boot.done { opacity: 0; }
#os-boot pre {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  line-height: 2.1;
  color: hsl(var(--os-h) 45% 62%);
  text-align: left;
}
#os-boot pre .ok { color: hsl(var(--os-h) 90% 60%); }

.grp-dot.os { background: hsl(190 90% 55%); }
.idx-online {
  margin-left: auto;
  font-size: 0.56rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: hsl(190 85% 60%);
}

@media (max-width: 640px) {
  #os-app { padding: 0; }
  #os-shell { border-radius: 0; height: 100%; }
  .os-status { display: none; }
  .os-msg { max-width: 96%; }
}

/* ── mini-site responsiveness ── */
@media (max-width: 860px) {
  .cards, .pcards { grid-template-columns: 1fr; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .anatomy { grid-template-columns: 1fr 1fr; }
  .anatomy li:not(:last-child)::after { display: none; }
  .kcols { grid-template-columns: repeat(3, minmax(140px, 1fr)); overflow-x: auto; }
  .browser iframe { height: 330px; }
  .widget-stats { grid-template-columns: repeat(3, 1fr); gap: 7px; }
  .wstat { padding: 9px 10px; }
  .wstat-num { font-size: 1.25rem; }
  .ranking li { grid-template-columns: 82px 1fr 30px; }
  .site-nav { gap: 10px; }
  .site-brand { font-size: 0.86rem; }
}

/* ══════════════════════════════════════════════════════════════
   LIGHT SAAS WORKSPACE
   A note that feels like entering a different environment. The left
   stays the universe; the right becomes the workspace — Linear /
   Apple / Figma, not a dark AI-agency landing page.
   ══════════════════════════════════════════════════════════════ */
#note-panel.panel-light {
  background: linear-gradient(180deg, #f7f5fc, #eceaf5);
  border-left: 1px solid hsl(var(--na-h) 0% 62% / 0.4);
  color: #47415e;
}
#note-panel.panel-light::before {
  background: linear-gradient(90deg, transparent, hsl(var(--na-h) 0% 55% / 0.9), transparent);
}
.panel-light .panel-bar { border-bottom-color: rgba(30, 20, 55, 0.1); }
.panel-light .panel-bar button { color: #7b7590; }
.panel-light .panel-bar button:hover { color: #191427; }
.panel-light #trail { color: #9a94ac; }
.panel-light #trail .t-sep { color: hsl(var(--na-h) 0% 55%); }
.panel-light #trail .t-here { color: #4a4560; }
.panel-light #note-scroll { scrollbar-color: hsl(var(--na-h) 0% 60% / 0.5) transparent; }
.panel-light #note-scroll::-webkit-scrollbar-thumb { background: hsl(var(--na-h) 0% 60% / 0.4); }

.panel-light .note-kicker { color: #7b7590; }
.panel-light .k-num { color: hsl(var(--na-h) 0% 46%); }
.panel-light .k-sep { color: rgba(30, 20, 55, 0.2); }
.panel-light .note h1 { color: #191427; }
.panel-light .note-lede { color: #544e6a; }
.panel-light .note-body { color: #443f5b; }
.panel-light .note-body h2 { color: #191427; }
.panel-light .note-body h2::before { background: linear-gradient(90deg, hsl(var(--na-h) 0% 52%), transparent); }
.panel-light .note-close-line { color: #6a6482; border-top-color: rgba(30, 20, 55, 0.12); }
.panel-light .note-body strong { color: #2a2440; }

.panel-light .site-nav { background: rgba(247, 245, 252, 0.85); border-bottom: 1px solid rgba(30, 20, 55, 0.08); }
.panel-light .site-brand { color: #191427; }
.panel-light .site-links a { color: #7b7590; }
.panel-light .site-links a:hover { color: #191427; }
.panel-light .site-links a.on { color: hsl(var(--na-h) 0% 48%); }
.panel-light .site-cta { color: #fff; background: hsl(var(--na-h) 0% 52%); }
.panel-light .site-cta:hover { background: hsl(var(--na-h) 0% 46%); }

.panel-light .wiki { color: hsl(var(--na-h) 0% 44%); border-bottom-color: hsl(var(--na-h) 0% 55% / 0.4); }
.panel-light .wiki:hover { color: hsl(var(--na-h) 0% 36%); text-shadow: none; border-color: hsl(var(--na-h) 0% 45%); }
.panel-light .wiki::after { background: hsl(var(--na-h) 0% 55%); box-shadow: none; }

.panel-light .card { background: #fff; border: 1px solid rgba(30, 20, 55, 0.09); box-shadow: 0 1px 3px rgba(25, 15, 50, 0.05); }
.panel-light .card:hover { border-color: hsl(var(--na-h) 0% 60% / 0.5); transform: translateY(-2px); box-shadow: 0 6px 18px rgba(25, 15, 50, 0.1); }
.panel-light .card h3 { color: #191427; }
.panel-light .card h3 a { color: hsl(var(--na-h) 0% 44%); border: none; }
.panel-light .card p { color: #5a5473; }

.panel-light .anatomy li { background: #fff; border-color: rgba(30, 20, 55, 0.09); }
.panel-light .anatomy li h3 { color: #191427; }
.panel-light .anatomy li p { color: #5a5473; }
.panel-light .anatomy li.is-ai { border-color: hsl(var(--na-h) 0% 60% / 0.55); background: hsl(var(--na-h) 0% 97%); }
.panel-light .margin-note { background: linear-gradient(90deg, hsl(var(--na-h) 0% 55% / 0.1), transparent 70%); border-left-color: hsl(var(--na-h) 0% 55%); }
.panel-light .margin-note p { color: #6a6482; }

/* ── Business Systems components ── */
.biz-symptoms {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px 18px;
  margin: 1.2rem 0 1.5rem;
}
.biz-symptoms li { display: flex; align-items: center; gap: 9px; font-size: 0.9rem; color: #544e6a; }
.sym-dot { width: 6px; height: 6px; border-radius: 50%; flex: none; background: hsl(var(--na-h) 0% 58%); box-shadow: 0 0 8px hsl(var(--na-h) 0% 55% / 0.6); }

.sysloop {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(148px, 1fr));
  gap: 10px;
  margin: 1.4rem 0 1.8rem;
}
.sysloop li {
  padding: 14px 15px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid rgba(30, 20, 55, 0.09);
  box-shadow: 0 1px 3px rgba(25, 15, 50, 0.05);
  transition: transform 0.3s var(--ease-vault), box-shadow 0.3s ease;
}
.sysloop li:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(25, 15, 50, 0.09); }
.sysloop .sl-i { font-family: 'JetBrains Mono', monospace; font-size: 0.6rem; letter-spacing: 0.12em; color: hsl(var(--na-h) 0% 52%); }
.sysloop h3 { font-family: var(--serif); font-weight: 500; font-size: 0.98rem; color: #191427; margin: 5px 0 5px; }
.sysloop p { font-size: 0.75rem; line-height: 1.55; color: #5a5473; margin: 0; }

.biz-walk {
  margin: 1.5rem 0;
  padding: 16px 18px;
  border-radius: 12px;
  background: hsl(var(--na-h) 0% 96%);
  border: 1px solid hsl(var(--na-h) 0% 80% / 0.5);
}
.biz-walk p { margin: 0; font-size: 0.9rem; line-height: 1.7; color: #3c3752; }

.beforeafter { display: grid; gap: 12px; margin: 1.4rem 0 1.6rem; }
.ba-case {
  padding: 16px 18px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid rgba(30, 20, 55, 0.09);
  box-shadow: 0 1px 3px rgba(25, 15, 50, 0.05);
}
.ba-case h3 { font-family: var(--serif); font-weight: 500; font-size: 1rem; color: #191427; margin: 0 0 8px; }
.ba-row { display: flex; gap: 12px; align-items: flex-start; padding: 8px 0; }
.ba-row + .ba-row { border-top: 1px dashed rgba(30, 20, 55, 0.1); }
.ba-tag {
  flex: none;
  font-size: 0.54rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 999px;
  font-weight: 600;
  margin-top: 2px;
}
.ba-tag.before { background: #f2e7e7; color: #9a4b4b; }
.ba-tag.after { background: hsl(var(--na-h) 0% 93%); color: hsl(var(--na-h) 0% 38%); }
.ba-row p { margin: 0; font-size: 0.84rem; line-height: 1.55; color: #4a4560; }

/* Widgets stay dark inside the light workspace — deliberate "views
   into the machine", like a terminal embed in a product doc. They
   just need grounding: solid base, crisper edge, softer shadow. */
.panel-light .widget {
  background: linear-gradient(165deg, hsl(var(--na-h) 0% 26% / 0.97), #12101f);
  border: 1px solid hsl(var(--na-h) 0% 45% / 0.4);
  box-shadow: 0 14px 40px rgba(35, 25, 70, 0.22);
}
.panel-light .widget-foot { color: #8e88a5; }
.panel-light .feature-list { color: #443f5b; }
.panel-light .feature-list strong { color: #191427; }
.panel-light .feature-list li::before { background: hsl(var(--na-h) 0% 55%); box-shadow: none; }
.panel-light .stack li { background: #fff; border: 1px solid rgba(30, 20, 55, 0.12); color: #4a4560; }
.panel-light .browser { border-color: rgba(30, 20, 55, 0.12); }

/* ══════════════════════════════════════════════════════════════
   EDITORIAL ANALYTICS WORKSPACE — the growth layer
   Builds on panel-light; warms the whole palette to paper + amber.
   Human + data: Notion warmth, Linear-analytics discipline.
   The !important wins over the inline --na-h set from the node's
   constellation hue — the map stays purple, the workspace turns warm.
   ══════════════════════════════════════════════════════════════ */
/* The editorial theme used to force an amber hue here. One accent only. */
#note-panel.panel-editorial { --na-h: 208 !important; }
#note-panel.panel-editorial {
  background: linear-gradient(180deg, #faf8f2, #f2ede2);
  border-left-color: hsl(35 60% 55% / 0.45);
}
.panel-editorial .note h1,
.panel-editorial .note-body h2,
.panel-editorial .card h3 { color: #241c0f; }
.panel-editorial .note-lede { color: #5d5340; }
.panel-editorial .note-body { color: #4a4232; }
.panel-editorial .note-body strong { color: #2c2314; }
.panel-editorial .note-kicker { color: #8a7d63; }
.panel-editorial .site-nav { background: rgba(250, 248, 242, 0.85); border-bottom-color: rgba(60, 45, 20, 0.09); }
.panel-editorial .site-brand { color: #241c0f; }
.panel-editorial .site-links a { color: #8a7d63; }
.panel-editorial .site-links a:hover { color: #241c0f; }
.panel-editorial .card,
.panel-editorial .sysloop li,
.panel-editorial .ba-case { background: #fffdf8; border-color: rgba(60, 45, 20, 0.1); box-shadow: 0 1px 3px rgba(60, 40, 10, 0.05); }
.panel-editorial .sysloop h3 { color: #241c0f; }
.panel-editorial .sysloop p { color: #5d5340; }
.panel-editorial .biz-symptoms li { color: #5d5340; }
.panel-editorial .biz-walk { background: hsl(35 55% 94%); border-color: hsl(35 50% 75% / 0.6); }
.panel-editorial .biz-walk p { color: #443a26; }
.panel-editorial .margin-note p { color: #77694c; }
.panel-editorial .note-close-line { color: #77694c; border-top-color: rgba(60, 45, 20, 0.14); }

/* the journey every business follows — a horizontal chain of stages */
.growchain {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 1.3rem 0 1.5rem;
}
.growchain span {
  font-family: var(--serif);
  font-size: 0.92rem;
  color: #241c0f;
  padding: 7px 14px;
  border: 1px solid rgba(60, 45, 20, 0.14);
  border-radius: 999px;
  background: #fffdf8;
  box-shadow: 0 1px 2px rgba(60, 40, 10, 0.05);
}
.growchain span:not(:last-child)::after {
  content: '→';
  margin-left: -2px;
  padding-left: 12px;
  color: hsl(35 70% 48%);
  font-family: var(--sans);
  font-size: 0.8rem;
}

/* the customer journey — a vertical editorial timeline */
.journey {
  list-style: none;
  margin: 1.4rem 0 1.8rem;
  padding-left: 22px;
  border-left: 1px solid hsl(35 55% 60% / 0.5);
  display: flex;
  flex-direction: column;
  gap: 15px;
}
.journey li { position: relative; }
.journey li::before {
  content: '';
  position: absolute;
  left: -26.5px;
  top: 0.42em;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: #faf8f2;
  border: 2px solid hsl(35 70% 48%);
}
.journey h3 { font-family: var(--serif); font-weight: 500; font-size: 1rem; color: #241c0f; margin: 0 0 2px; }
.journey p { font-size: 0.82rem; line-height: 1.55; color: #5d5340; margin: 0; }

/* controlled experiments — hypothesis → test → measure → decision */
.exp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  margin: 1.4rem 0 1.6rem;
}
.exp-step {
  padding: 15px 16px;
  border-radius: 12px;
  background: #fffdf8;
  border: 1px solid rgba(60, 45, 20, 0.1);
  border-top: 2px solid hsl(35 70% 50%);
  box-shadow: 0 1px 3px rgba(60, 40, 10, 0.05);
}
.exp-k {
  display: block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.58rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: hsl(35 70% 40%);
  margin-bottom: 7px;
}
.exp-step p { font-size: 0.82rem; line-height: 1.55; color: #4a4232; margin: 0; }

@media (max-width: 640px) {
  .growchain span { font-size: 0.82rem; padding: 6px 11px; }
}

/* ══════════════════════════════════════════════════════════════
   WINDOW MANAGER — the panel is an application window
   dock (default) · minimise · expand · float (draggable over graph)
   ══════════════════════════════════════════════════════════════ */
.panel-win { display: flex; gap: 2px; margin-left: 4px; flex: none; }
.panel-win button {
  width: 30px; height: 26px;
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0;
  font-size: 0.8rem;
  line-height: 1;
}
.win-ic { width: 13px; height: 13px; display: inline-block; position: relative; }
/* minimise — a bar */
.win-min .win-ic::before { content: ''; position: absolute; left: 1px; right: 1px; bottom: 2px; height: 1.5px; background: currentColor; }
/* expand — a square */
.win-max .win-ic::before { content: ''; position: absolute; inset: 1px; border: 1.5px solid currentColor; border-radius: 2px; }
/* float — an offset square */
.win-float .win-ic::before { content: ''; position: absolute; left: 0; top: 0; width: 9px; height: 9px; border: 1.5px solid currentColor; border-radius: 2px; }
.win-float .win-ic::after { content: ''; position: absolute; right: 0; bottom: 0; width: 9px; height: 9px; border: 1.5px solid currentColor; border-radius: 2px; background: var(--panel-bg-solid, #0c0c0c); }
.panel-win button.on { color: hsl(var(--na-h) 0% 68%); }
.panel-light .panel-win button.on { color: hsl(var(--na-h) 0% 48%); }

/* expanded — the workspace takes the room */
body.panel-max #note-panel { width: min(1100px, 92vw); }

/* minimised — collapse to just the title bar, parked top-right */
body.panel-min #note-panel {
  top: 16px; right: 16px; bottom: auto;
  width: 340px;
  height: auto;
  border: 1px solid hsl(var(--na-h) 0% 60% / 0.25);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.5);
}
body.panel-min #note-scroll,
body.panel-min #backlinks,
body.panel-min #thread { display: none; }

/* floating — a draggable application window over the universe */
body.panel-float #note-panel {
  top: var(--float-y, 80px);
  left: var(--float-x, 60px);
  right: auto; bottom: auto;
  width: min(660px, 82vw);
  height: min(76vh, 760px);
  border: 1px solid hsl(var(--na-h) 0% 60% / 0.3);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.6), 0 0 60px hsl(var(--na-h) 0% 40% / 0.12);
  transition: box-shadow 0.3s ease;
}
body.panel-float #note-panel .panel-bar { cursor: grab; }
body.panel-float.panel-dragging #note-panel { transition: none; }
body.panel-float.panel-dragging #note-panel .panel-bar { cursor: grabbing; }
body.panel-float #note-panel::before { border-radius: 16px 16px 0 0; }

@media (max-width: 900px) {
  .panel-win { display: none; }   /* window controls are a desktop affordance */
}

/* ════ REDUCED MOTION ════ */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.15s !important;
  }
  .bob, .stat-inf { animation: none !important; }
}

/* ==========================================================================
   STORY FOCUSED VIEWS
   One monochrome language, with a different rhythm for archives, moments,
   tools, the current product and the distant future.
   ========================================================================== */

.note .hero-title {
  max-width: 12ch;
  margin: 0 0 1rem;
  font-family: var(--sans);
  font-size: clamp(2.8rem, 6vw, 5.25rem);
  font-weight: 650;
  line-height: 0.94;
  letter-spacing: -0.065em;
  text-wrap: balance;
}

.note .hero-lede {
  max-width: 44ch;
  color: var(--ink-mid);
  font-family: var(--sans);
  font-size: clamp(1rem, 1.7vw, 1.18rem);
  font-style: normal;
  line-height: 1.55;
}

.note-body .lead {
  margin-bottom: 1.8rem;
  color: var(--ink);
  font-family: var(--serif);
  font-size: clamp(1.18rem, 2.2vw, 1.55rem);
  font-weight: 360;
  line-height: 1.55;
}

.stack {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin: 2rem 0;
  overflow: hidden;
  border: 1px solid var(--hairline);
  background: var(--hairline);
}

.stack .card {
  min-height: 150px;
  padding: 1.35rem;
  border: 0;
  border-radius: 0;
  background: rgba(255, 255, 255, 0.025);
  box-shadow: none;
}

.stack .card h3,
.spec-col h3,
.cta-block h3 {
  margin: 0 0 0.65rem;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 650;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.stack .card p {
  margin: 0;
  color: var(--ink-mid);
  font-size: 0.88rem;
  line-height: 1.65;
}

.pull {
  margin: 2.4rem 0;
  padding: 0.2rem 0 0.2rem 1.5rem;
  border-left: 1px solid rgba(255, 255, 255, 0.42);
  color: #e1e1df;
  font-family: var(--serif);
  font-size: clamp(1.15rem, 2vw, 1.45rem);
  font-weight: 350;
  line-height: 1.6;
}

.evidence-slot {
  margin: 2rem 0;
}

.evidence-frame {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 210px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    radial-gradient(circle at 50% 42%, #171717 0%, #090909 64%, #050505 100%);
  background-size: 48px 48px, 48px 48px, auto;
}

.evidence-frame::before,
.evidence-frame::after {
  content: '';
  position: absolute;
  background: rgba(255, 255, 255, 0.09);
}

.evidence-frame::before {
  top: 0;
  bottom: 0;
  left: 50%;
  width: 1px;
}

.evidence-frame::after {
  top: 50%;
  right: 0;
  left: 0;
  height: 1px;
}

.evidence-frame span {
  position: relative;
  z-index: 1;
  padding: 0.45rem 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.13);
  background: #080808;
  color: #bdbdb9;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.evidence-slot figcaption {
  padding-top: 0.65rem;
  color: var(--ink-dim);
  font-size: 0.7rem;
  line-height: 1.5;
}

.evidence-slot.wide .evidence-frame {
  min-height: 300px;
}

.archive-grid,
.shop-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 2rem 0;
}

.archive-grid .evidence-slot,
.shop-grid .evidence-slot {
  margin: 0;
}

.archive .evidence-frame {
  aspect-ratio: 4 / 3;
  min-height: 0;
}

.shop .evidence-frame {
  aspect-ratio: 1 / 1;
  min-height: 0;
}

.archive .site-hero {
  padding-bottom: 2.25rem;
  border-bottom: 1px solid var(--hairline);
}

.journey-path {
  position: relative;
  display: grid;
  gap: 0;
  margin: 2rem 0 2.6rem;
  list-style: none;
}

.journey-path::before {
  content: '';
  position: absolute;
  top: 12px;
  bottom: 12px;
  left: 5px;
  width: 1px;
  background: rgba(255, 255, 255, 0.14);
}

.journey-path li {
  position: relative;
  padding: 0 0 1.55rem 1.8rem;
}

.journey-path li::before {
  content: '';
  position: absolute;
  top: 0.5rem;
  left: 1px;
  width: 9px;
  height: 9px;
  border: 1px solid #d9d9d6;
  border-radius: 50%;
  background: #080808;
}

.journey-path a {
  display: grid;
  gap: 0.2rem;
  text-decoration: none;
}

.journey-path strong {
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 600;
}

.journey-path span {
  color: var(--ink-dim);
  font-size: 0.76rem;
}

.moment .site-hero {
  min-height: 36vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  border-bottom: 1px solid var(--hairline);
}

.moment .hero-title {
  max-width: 9ch;
}

.moment .note-body {
  margin-top: 2rem;
  padding-left: 1.35rem;
  border-left: 1px solid rgba(255, 255, 255, 0.14);
}

.tool-list {
  display: grid;
  gap: 10px;
  margin: 2rem 0;
  list-style: none;
}

.tool-list li {
  position: relative;
  display: grid;
  grid-template-columns: 104px 1fr;
  gap: 0.2rem 1rem;
  padding: 1.2rem;
  border: 1px solid var(--hairline);
  background: rgba(255, 255, 255, 0.018);
}

.tool-list .tool-state {
  grid-row: 1 / span 2;
  align-self: start;
  color: var(--ink-dim);
  font-size: 0.58rem;
  font-weight: 650;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.tool-list strong {
  color: var(--ink);
  font-size: 1rem;
}

.tool-list p {
  margin: 0;
  color: var(--ink-mid);
  font-size: 0.78rem;
  line-height: 1.55;
}

.tool-list .is-live {
  border-color: rgba(255, 255, 255, 0.32);
}

.tool-list .is-live .tool-state {
  color: #f0f0f0;
}

.tool-list .is-building {
  border-style: dashed;
}

.tool-list .is-concept,
.tool.is-concept {
  opacity: 0.68;
}

.tool .site-hero,
.product .site-hero {
  padding: 1.25rem 0 2.4rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.tool .live-dot {
  color: #f5f5f2;
  text-shadow: none;
}

.spec-split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin: 2rem 0;
  border: 1px solid var(--hairline);
  background: var(--hairline);
}

.spec-col {
  padding: 1.4rem;
  background: #090909;
}

.spec-list {
  display: grid;
  gap: 0.7rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.spec-list li {
  position: relative;
  padding-left: 1.1rem;
  color: var(--ink-mid);
  font-size: 0.82rem;
  line-height: 1.55;
}

.spec-list li::before {
  content: '';
  position: absolute;
  top: 0.65em;
  left: 0;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #d7d7d4;
}

.cta-block {
  margin-top: 2.5rem;
  padding: clamp(1.4rem, 4vw, 2.2rem);
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: #0b0b0b;
}

.cta-block > p {
  color: var(--ink-mid);
}

.cta-row {
  margin: 1.35rem 0 0.8rem;
}

.cta-foot {
  margin: 0;
  color: var(--ink-dim) !important;
  font-size: 0.68rem;
  line-height: 1.5;
}

.future .site-hero {
  padding-top: clamp(3rem, 10vh, 7rem);
}

.future .hero-title {
  color: #d8d8d5;
  font-family: var(--serif);
  font-weight: 350;
  letter-spacing: -0.04em;
}

.future-list {
  display: grid;
  gap: 1px;
  margin: 2rem 0;
  padding: 1px;
  list-style: none;
  background: var(--hairline);
}

.future-list li {
  padding: 1.15rem 1.25rem;
  background: #080808;
  color: var(--ink-mid);
  font-size: 0.82rem;
  line-height: 1.65;
}

.future.is-concept {
  opacity: 0.7;
}

.idx-note {
  display: block;
  margin-top: 0.18rem;
  color: var(--ink-dim);
  font-size: 0.62rem;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
}

@media (max-width: 680px) {
  .note .hero-title {
    font-size: clamp(2.4rem, 13vw, 4rem);
  }

  .stack,
  .archive-grid,
  .shop-grid,
  .spec-split {
    grid-template-columns: 1fr;
  }

  .tool-list li {
    grid-template-columns: 1fr;
  }

  .tool-list .tool-state {
    grid-row: auto;
  }

  .evidence-slot.wide .evidence-frame {
    min-height: 210px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .rv {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

/* ==========================================================================
   FOCUSED VIEW QUALITY PASS
   The universe remains monochrome. Entering a node introduces one controlled
   colour and one content form specific to that part of the story.
   ========================================================================== */

/* `--scene` used to be a per-note accent: twenty-odd hues across orange,
   purple, gold, pink, lime and teal. That was a second rainbow living
   inside the panels — the same thing the map was rebuilt to escape, just
   one click deeper.

   It is now ONE value for every note: the Scotty Systems logo orange,
   with the logo navy as its deep companion. The variable is kept because
   ~40 rules read it, so retuning it here re-colours every panel component
   at once with no risk of missing one. The map itself stays monochrome —
   brand colour is the reward for opening a node. */
.note {
  --scene: #f79520;
  --scene-rgb: 247, 149, 32;
  --scene-deep: #2e368f;
  --scene-deep-rgb: 46, 54, 143;
}

/* The Plans note is the one deliberate exception: pricing stays black and
   white so the numbers read as plain fact, not as marketing. */
.plans-note {
  --scene: #ededea;
  --scene-rgb: 237, 237, 234;
}

/* Navy is the orange's counterweight. It is too dark to read as text on a
   near-black panel, so it does the structural work instead — the light
   that washes in behind the hero, and the ground under quoted material. */
.note .site-hero {
  position: relative;
}
.note .site-hero::before {
  content: '';
  position: absolute;
  left: -40px; right: -40px; top: -120px;
  height: 260px;
  pointer-events: none;
  z-index: -1;
  background: radial-gradient(ellipse 70% 100% at 12% 0%,
    rgba(var(--scene-deep-rgb, 46, 54, 143), 0.5), transparent 70%);
}
.note .pull {
  border-left-color: var(--scene);
  background: linear-gradient(90deg,
    rgba(var(--scene-deep-rgb, 46, 54, 143), 0.28), transparent 62%);
  padding-top: 0.9rem;
  padding-bottom: 0.9rem;
}
.note .margin-note {
  border-left-color: rgba(var(--scene-rgb), 0.5);
  background: linear-gradient(90deg,
    rgba(var(--scene-deep-rgb, 46, 54, 143), 0.22), transparent 70%);
}

.note .k-cluster,
.note .wiki,
.note .live-dot {
  color: var(--scene);
}

.note .wiki {
  text-decoration-color: rgba(var(--scene-rgb), 0.42);
}

.note .wiki:hover {
  color: #fff;
  text-decoration-color: var(--scene);
}

.note .btn-solid {
  border-color: var(--scene);
  background: var(--scene);
  color: #050505;
}

.note .btn-ghost {
  border-color: rgba(var(--scene-rgb), 0.4);
  color: var(--scene);
}

.note .btn-solid:hover,
.note .btn-ghost:hover {
  border-color: #fff;
  background: #fff;
  color: #050505;
}

.note .evidence-frame {
  border-color: rgba(var(--scene-rgb), 0.22);
  background:
    linear-gradient(rgba(var(--scene-rgb), 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(var(--scene-rgb), 0.055) 1px, transparent 1px),
    radial-gradient(circle at 50% 42%, rgba(var(--scene-rgb), 0.12), #090909 64%);
  background-size: 48px 48px, 48px 48px, auto;
}

.note .evidence-frame span {
  border-color: rgba(var(--scene-rgb), 0.36);
  color: var(--scene);
}

.system-signal {
  display: grid;
  grid-template-columns: 1fr minmax(150px, 0.78fr) 1fr;
  align-items: stretch;
  margin: 2.4rem 0 0;
  border: 1px solid rgba(var(--scene-rgb), 0.2);
  background:
    linear-gradient(90deg, transparent 49.9%, rgba(var(--scene-rgb), 0.12) 50%, transparent 50.1%),
    #080808;
}

.signal-inputs,
.signal-outputs {
  display: grid;
  align-content: center;
  gap: 8px;
  padding: 1.2rem;
}

.signal-inputs span,
.signal-outputs span {
  position: relative;
  padding: 0.7rem 0.8rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--ink-mid);
  font-size: 0.66rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.signal-inputs span::after,
.signal-outputs span::before {
  content: '';
  position: absolute;
  top: 50%;
  width: 16px;
  height: 1px;
  background: rgba(var(--scene-rgb), 0.52);
}

.signal-inputs span::after { right: -17px; }
.signal-outputs span::before { left: -17px; }

.signal-core {
  display: grid;
  place-items: center;
  align-content: center;
  min-height: 230px;
  padding: 1.2rem 0.7rem;
  border-right: 1px solid rgba(var(--scene-rgb), 0.18);
  border-left: 1px solid rgba(var(--scene-rgb), 0.18);
  text-align: center;
}

.signal-core small,
.signal-core span {
  color: var(--ink-dim);
  font-size: 0.57rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.signal-core strong {
  margin: 1rem 0;
  color: #fff;
  font-size: 1rem;
  letter-spacing: 0.12em;
  line-height: 1.15;
  text-shadow: 0 0 28px rgba(var(--scene-rgb), 0.28);
}

.truth-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-bottom: 2rem;
  border: 1px solid rgba(var(--scene-rgb), 0.18);
  border-top: 0;
}

.truth-strip span {
  padding: 0.9rem;
  color: var(--ink-dim);
  font-size: 0.65rem;
  line-height: 1.35;
}

.truth-strip span + span {
  border-left: 1px solid rgba(var(--scene-rgb), 0.14);
}

.truth-strip strong {
  display: block;
  margin-bottom: 0.1rem;
  color: var(--scene);
  font-size: 1.25rem;
}

.identity-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin: 2rem 0;
  border: 1px solid rgba(var(--scene-rgb), 0.23);
  background: linear-gradient(135deg, rgba(var(--scene-rgb), 0.08), transparent 52%);
}

.identity-split > div {
  min-height: 165px;
  padding: 1.4rem;
}

.identity-split > div + div {
  border-left: 1px solid rgba(var(--scene-rgb), 0.18);
}

.identity-split small,
.study-head small,
.console-title small,
.control-room-grid small {
  display: block;
  margin-bottom: 1rem;
  color: var(--scene);
  font-size: 0.58rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.identity-split strong {
  color: #fff;
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 380;
}

.identity-split p {
  margin: 0.5rem 0 0;
  color: var(--ink-dim);
  font-size: 0.74rem;
}

.identity-split .identity-crossing {
  grid-column: 1 / -1;
  margin: 0;
  padding: 0.85rem 1.4rem;
  border-top: 1px solid rgba(var(--scene-rgb), 0.18);
  color: var(--ink-mid);
  font-size: 0.7rem;
  letter-spacing: 0.04em;
}

.retention-study {
  margin: 2rem 0;
  padding: 1.25rem;
  border: 1px solid rgba(var(--scene-rgb), 0.25);
  background: #0a0a0a;
}

.study-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
}

.study-head small { margin-bottom: 0.25rem; }
.study-head strong { color: #fff; font-size: 0.9rem; }

.study-head > span {
  padding: 0.25rem 0.45rem;
  border: 1px solid rgba(var(--scene-rgb), 0.35);
  color: var(--scene);
  font-size: 0.52rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.retention-chart {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 128px;
  margin: 1.3rem 0 0.8rem;
  padding: 0 0 1px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.retention-chart i {
  flex: 1;
  height: var(--v);
  background: linear-gradient(to top, rgba(var(--scene-rgb), 0.18), var(--scene));
  opacity: 0.82;
}

.retention-study > p {
  margin: 0;
  color: var(--ink-dim);
  font-size: 0.62rem;
  line-height: 1.5;
}

.recording-bay {
  display: grid;
  grid-template-columns: auto minmax(150px, 1fr) minmax(130px, 0.8fr);
  align-items: center;
  gap: 1rem;
  margin: 1rem 0 2rem;
  padding: 1rem;
  border: 1px solid rgba(var(--scene-rgb), 0.28);
  background: rgba(var(--scene-rgb), 0.045);
}

.recording-control {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(var(--scene-rgb), 0.35);
  border-radius: 50%;
  color: var(--scene);
  font-size: 0.72rem;
}

.recording-copy {
  display: grid;
  gap: 0.15rem;
}

.recording-copy small {
  color: var(--scene);
  font-size: 0.52rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.recording-copy strong { color: #fff; font-size: 0.82rem; }
.recording-copy span { color: var(--ink-dim); font-size: 0.64rem; line-height: 1.4; }

.audio-wave {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  height: 54px;
}

.audio-wave i {
  width: 3px;
  height: var(--h);
  min-height: 4px;
  background: var(--scene);
  opacity: 0.66;
}

.edit-rhythm {
  display: grid;
  gap: 0.75rem;
  margin: 2rem 0;
  padding: 1.2rem;
  border: 1px solid rgba(var(--scene-rgb), 0.22);
  background: #0a0a0a;
}

.edit-rhythm div {
  display: grid;
  grid-template-columns: 72px 1fr;
  align-items: center;
  gap: 0.8rem;
}

.edit-rhythm span {
  color: var(--ink-dim);
  font-size: 0.58rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.edit-rhythm i {
  display: block;
  width: var(--w);
  height: 5px;
  background: linear-gradient(90deg, var(--scene), rgba(var(--scene-rgb), 0.16));
}

.commerce-console {
  margin: 2rem 0;
  overflow: hidden;
  border: 1px solid rgba(var(--scene-rgb), 0.25);
  background: #0b0b0b;
}

.console-title {
  padding: 1.15rem 1.25rem;
  border-bottom: 1px solid rgba(var(--scene-rgb), 0.16);
}

.console-title small { margin-bottom: 0.25rem; }
.console-title strong { color: #fff; font-size: 0.94rem; }

.commerce-flow {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin: 0;
  padding: 0;
  list-style: none;
}

.commerce-flow li {
  min-width: 0;
  padding: 1rem;
}

.commerce-flow li + li {
  border-left: 1px solid rgba(var(--scene-rgb), 0.14);
}

.commerce-flow li > span {
  display: block;
  margin-bottom: 1.1rem;
  color: var(--ink-dim);
  font-size: 0.56rem;
}

.commerce-flow strong,
.commerce-flow small {
  display: block;
}

.commerce-flow strong { color: #fff; font-size: 0.78rem; }
.commerce-flow small { margin-top: 0.2rem; color: var(--ink-dim); font-size: 0.58rem; }
.commerce-flow .is-ready { box-shadow: inset 0 -2px 0 var(--accent); }
.commerce-flow .is-test { box-shadow: inset 0 -2px 0 var(--scene); }
/* not wired = genuinely blocked, so this is the one legitimate use of red */
.commerce-flow .is-locked { box-shadow: inset 0 -2px 0 var(--danger); }

.commerce-console > p {
  margin: 0;
  padding: 0.85rem 1.25rem;
  border-top: 1px solid rgba(var(--scene-rgb), 0.14);
  color: var(--ink-dim);
  font-size: 0.64rem;
}

.journey-signal {
  display: grid;
  gap: 0.65rem;
  margin: 2rem 0;
  padding: 1.2rem;
  border: 1px solid rgba(var(--scene-rgb), 0.23);
  background: #0a0a0a;
}

.journey-signal > div {
  display: grid;
  grid-template-columns: 110px 1fr;
  align-items: center;
  gap: 0.8rem;
}

.journey-signal span {
  color: var(--ink-dim);
  font-size: 0.58rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.journey-signal i {
  display: block;
  width: var(--level);
  height: 7px;
  background: linear-gradient(90deg, rgba(var(--scene-rgb), 0.18), var(--scene));
}

.journey-signal small {
  padding-top: 0.35rem;
  color: var(--ink-dim);
  font-size: 0.58rem;
}

.build-ratio {
  display: grid;
  grid-template-columns: 132px 1fr;
  gap: 1.4rem;
  align-items: center;
  margin: 2rem 0;
  padding: 1.25rem;
  border: 1px solid rgba(var(--scene-rgb), 0.25);
  background: #0a0a0a;
}

.ratio-ring {
  display: grid;
  place-items: center;
  width: 116px;
  aspect-ratio: 1;
  border-radius: 50%;
  /* status by brightness, not by hue: accent → dimmed accent → inert grey */
  background: conic-gradient(var(--accent) 0 20%, var(--accent-deep) 20% 40%, #303030 40% 100%);
}

.ratio-ring::before {
  content: '';
  grid-area: 1 / 1;
  width: 82px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: #0a0a0a;
}

.ratio-ring span {
  z-index: 1;
  grid-area: 1 / 1;
  color: #fff;
  font-size: 1.5rem;
  font-weight: 650;
}

.build-ratio small { color: var(--scene); font-size: 0.56rem; letter-spacing: 0.15em; text-transform: uppercase; }
.build-ratio strong { display: block; margin: 0.35rem 0 0.8rem; color: #fff; font-size: 0.92rem; }
.build-ratio ul { display: grid; gap: 0.35rem; margin: 0; padding: 0; list-style: none; }
.build-ratio li { color: var(--ink-dim); font-size: 0.64rem; }
.build-ratio li i { display: inline-block; width: 7px; height: 7px; margin-right: 0.45rem; border-radius: 50%; }
.build-ratio li i.live { background: var(--accent); }
.build-ratio li i.building { background: var(--accent-deep); }
.build-ratio li i.concept { background: #454545; }

.workflow-rail,
.skill-lifecycle {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  margin: 2rem 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(var(--scene-rgb), 0.22);
  list-style: none;
}

.workflow-rail li,
.skill-lifecycle li {
  position: relative;
  min-width: 0;
  padding: 1rem 0.75rem;
  background: rgba(var(--scene-rgb), 0.035);
}

.workflow-rail li + li,
.skill-lifecycle li + li {
  border-left: 1px solid rgba(var(--scene-rgb), 0.18);
}

.workflow-rail span,
.skill-lifecycle span {
  display: block;
  margin-bottom: 1rem;
  color: var(--scene);
  font-size: 0.54rem;
}

.workflow-rail strong,
.workflow-rail small,
.skill-lifecycle strong,
.skill-lifecycle small {
  display: block;
}

.workflow-rail strong,
.skill-lifecycle strong { color: #fff; font-size: 0.76rem; }
.workflow-rail small,
.skill-lifecycle small { margin-top: 0.2rem; color: var(--ink-dim); font-size: 0.55rem; }
.workflow-rail .done { box-shadow: inset 0 -2px 0 var(--scene); }

.intel-pipeline {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  margin: 2rem 0;
  border: 1px solid rgba(var(--scene-rgb), 0.24);
}

.intel-pipeline > div {
  min-width: 0;
  padding: 1rem 0.7rem;
}

.intel-pipeline > div + div {
  border-left: 1px solid rgba(var(--scene-rgb), 0.16);
}

.intel-pipeline span,
.intel-pipeline strong {
  display: block;
}

.intel-pipeline span {
  margin-bottom: 1.1rem;
  color: var(--ink-dim);
  font-size: 0.52rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.intel-pipeline strong {
  color: #fff;
  font-size: 0.7rem;
}

.intel-pipeline .is-done { box-shadow: inset 0 -2px 0 var(--accent); }
.intel-pipeline .is-next { box-shadow: inset 0 -2px 0 var(--scene); }
.intel-pipeline .is-blocked { opacity: 0.48; }

.concept-contract {
  margin: 2rem 0;
  padding: 1.25rem;
  border: 1px dashed rgba(var(--scene-rgb), 0.42);
  background: rgba(var(--scene-rgb), 0.04);
}

.concept-contract span,
.concept-contract strong,
.concept-contract small {
  display: block;
}

.concept-contract span {
  margin-bottom: 0.75rem;
  color: var(--scene);
  font-size: 0.54rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.concept-contract strong {
  color: #fff;
  font-family: var(--serif);
  font-size: 1.1rem;
  font-weight: 380;
  line-height: 1.45;
}

.concept-contract small {
  margin-top: 0.75rem;
  color: var(--ink-dim);
  font-size: 0.64rem;
  line-height: 1.5;
}

.local-flow {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  align-items: center;
  gap: 0.6rem;
  margin: 2rem 0;
  padding: 1.1rem;
  border: 1px solid rgba(var(--scene-rgb), 0.25);
  background: #090909;
}

.local-flow > div {
  min-width: 0;
  padding: 0.8rem;
  border: 1px solid rgba(var(--scene-rgb), 0.16);
}

.local-flow small,
.local-flow strong { display: block; }
.local-flow small { color: var(--scene); font-size: 0.52rem; letter-spacing: 0.11em; text-transform: uppercase; }
.local-flow strong { margin-top: 0.35rem; color: #fff; font-size: 0.74rem; }
.local-flow > span { color: var(--scene); }
.local-flow > p { grid-column: 1 / -1; margin: 0; color: var(--ink-dim); font-size: 0.62rem; }

.future-orbit {
  position: relative;
  display: grid;
  place-items: center;
  width: min(360px, 82vw);
  aspect-ratio: 1;
  margin: 2rem auto 2.8rem;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(var(--scene-rgb), 0.13), transparent 62%);
}

.future-orbit > strong {
  color: #fff;
  font-size: 0.78rem;
  letter-spacing: 0.11em;
  line-height: 1.45;
  text-align: center;
  text-transform: uppercase;
}

.future-orbit .orbit {
  position: absolute;
  display: block;
  border: 1px solid rgba(var(--scene-rgb), 0.2);
  border-radius: 50%;
}

.future-orbit .orbit-one { inset: 32%; }
.future-orbit .orbit-two { inset: 18%; }
.future-orbit .orbit-three { inset: 4%; border-style: dashed; }

.future-orbit .orbit span {
  position: absolute;
  top: -0.6rem;
  left: 50%;
  padding: 0.25rem 0.45rem;
  transform: translateX(-50%);
  background: #070707;
  color: var(--scene);
  font-size: 0.52rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.control-room-grid,
.permission-matrix {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  margin: 2rem 0;
  padding: 1px;
  background: rgba(var(--scene-rgb), 0.18);
}

.control-room-grid > div,
.permission-matrix > div {
  min-height: 120px;
  padding: 1.15rem;
  background: #0b0b0b;
}

.control-room-grid small { margin-bottom: 0.8rem; }
.control-room-grid strong { color: #fff; font-size: 0.78rem; line-height: 1.45; }

.permission-matrix span,
.permission-matrix strong {
  display: block;
}

.permission-matrix span {
  margin-bottom: 0.8rem;
  color: var(--scene);
  font-size: 0.54rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.permission-matrix strong {
  color: #fff;
  font-size: 0.76rem;
  font-weight: 550;
}

/* The six small journey moments share type, not scenery. */
#note-cold-calls .site-hero {
  background: repeating-linear-gradient(90deg, transparent 0 27px, rgba(var(--scene-rgb), 0.09) 28px);
}

#note-agency .site-hero {
  background:
    linear-gradient(rgba(var(--scene-rgb), 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(var(--scene-rgb), 0.08) 1px, transparent 1px);
  background-size: 42px 42px;
}

#note-client-web .evidence-frame {
  border-top-width: 26px;
  border-radius: 5px 5px 0 0;
}

#note-recorded .site-hero {
  background: linear-gradient(115deg, rgba(var(--scene-rgb), 0.14), transparent 56%);
}

/* The Archive Wall's title used a pink/cyan chromatic-aberration shadow.
   Both hues are gone; the offset survives as a monochrome ghost, which
   still reads as "something went wrong here" without colour. */
#note-corrupt-edit .hero-title {
  text-shadow: 3px 0 rgba(226, 226, 226, 0.22), -3px 0 rgba(140, 140, 140, 0.18);
}

#note-corrupt-edit .note-body {
  background: repeating-linear-gradient(0deg, transparent 0 20px, rgba(var(--scene-rgb), 0.035) 21px);
}

#note-pivot .site-hero {
  background: linear-gradient(145deg, transparent 0 48%, rgba(var(--scene-rgb), 0.11) 48.2% 50%, transparent 50.2%);
}

@media (max-width: 720px) {
  .system-signal {
    grid-template-columns: 1fr;
  }

  .signal-core {
    min-height: 170px;
    border: 1px solid rgba(var(--scene-rgb), 0.18);
    border-right: 0;
    border-left: 0;
  }

  .signal-inputs span::after,
  .signal-outputs span::before {
    display: none;
  }

  .truth-strip,
  .identity-split,
  .commerce-flow,
  .control-room-grid,
  .permission-matrix {
    grid-template-columns: 1fr;
  }

  .truth-strip span + span,
  .identity-split > div + div,
  .commerce-flow li + li {
    border-top: 1px solid rgba(var(--scene-rgb), 0.14);
    border-left: 0;
  }

  .identity-split .identity-crossing {
    grid-column: auto;
  }

  .recording-bay {
    grid-template-columns: auto 1fr;
  }

  .audio-wave {
    grid-column: 1 / -1;
    justify-content: stretch;
  }

  .audio-wave i { flex: 1; }

  .build-ratio {
    grid-template-columns: 1fr;
  }

  .ratio-ring {
    width: 104px;
  }

  .workflow-rail,
  .skill-lifecycle,
  .intel-pipeline {
    grid-template-columns: 1fr;
  }

  .workflow-rail li + li,
  .skill-lifecycle li + li,
  .intel-pipeline > div + div {
    border-top: 1px solid rgba(var(--scene-rgb), 0.16);
    border-left: 0;
  }

  .local-flow {
    grid-template-columns: 1fr;
  }

  .local-flow > span {
    transform: rotate(90deg);
    text-align: center;
  }

  .local-flow > p {
    grid-column: auto;
  }
}

/* ==========================================================================
   PORTFOLIO-V4-003 — the chronology, outcome rows and panel CTAs
   Monochrome only: hierarchy comes from weight, spacing and fine borders.
   No colour, no gradient, no glow — a loss and a profit differ by their
   sign and their word, never by being red or green.
   ========================================================================== */

/* ── the timeline ──────────────────────────────────────────────────── */

.chrono {
  margin: 2.2rem 0 0;
  padding: 0;
  list-style: none;
}

.chrono-step {
  position: relative;
  padding: 0 0 2.2rem 1.6rem;
  border-left: 1px solid rgba(226, 226, 226, 0.16);
}

/* the marker: a small hollow tick on the spine, filled only for "Now" */
.chrono-step::before {
  content: '';
  position: absolute;
  top: 0.42rem;
  left: -4px;
  width: 7px;
  height: 7px;
  border: 1px solid rgba(226, 226, 226, 0.55);
  border-radius: 50%;
  background: var(--space-deep);
}

.chrono-step:last-child {
  padding-bottom: 0;
  border-left-color: transparent;
}

.chrono-now::before {
  background: #e8e8e8;
  border-color: #e8e8e8;
}

.chrono-when {
  margin: 0 0 0.3rem;
  color: var(--ink-dim);
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.chrono-what {
  margin: 0 0 0.7rem;
  color: #fff;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.15rem, 2.6vw, 1.45rem);
  line-height: 1.2;
}

.chrono-step p {
  margin: 0 0 0.8rem;
  color: var(--ink-mid);
  font-size: 0.94rem;
  line-height: 1.65;
}

.chrono-step p:last-child { margin-bottom: 0; }

.chrono-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 1.1rem;
  font-size: 0.84rem !important;
  color: var(--ink-dim) !important;
}

/* ── side-hustle outcomes ──────────────────────────────────────────── */

.outcome-rows {
  margin: 0 0 1rem;
  padding: 0;
  list-style: none;
  border-top: 1px solid rgba(226, 226, 226, 0.12);
}

.outcome-rows li {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: baseline;
  gap: 0.9rem;
  padding: 0.62rem 0;
  border-bottom: 1px solid rgba(226, 226, 226, 0.12);
}

.oc-what {
  color: var(--ink);
  font-size: 0.9rem;
}

.oc-amount {
  color: #fff;
  font-family: var(--mono, 'JetBrains Mono', ui-monospace, monospace);
  font-size: 0.9rem;
  font-variant-numeric: tabular-nums;
}

/* The word carries the meaning, so the sign and the label do the work a
   colour would have done. A LOSS reads dimmer; a PROFIT reads brighter. */
.oc-tag {
  min-width: 4.4rem;
  padding: 0.16rem 0.45rem;
  border: 1px solid rgba(226, 226, 226, 0.2);
  color: var(--ink-dim);
  font-size: 0.56rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-align: center;
}

/* A profit is the brighter of the two. Driven by an explicit attribute in
   the markup rather than row position, so reordering the list cannot
   silently relabel an outcome. */
.oc-tag[data-kind='profit'] {
  border-color: rgba(255, 255, 255, 0.55);
  color: #fff;
}

/* ── panel calls to action ─────────────────────────────────────────── */

.panel-cta {
  margin: 1.4rem 0 1.8rem;
}

.panel-cta a {
  display: inline-block;
  padding: 0.62rem 1.05rem;
  border: 1px solid rgba(226, 226, 226, 0.34);
  color: #fff;
  font-size: 0.86rem;
  font-weight: 500;
  text-decoration: none;
  transition: border-color 0.2s ease, background 0.2s ease;
}

/* crisp hover only — no glow, no shadow, no scale (V4-002 §A4) */
.panel-cta a:hover,
.panel-cta a:focus-visible {
  border-color: #fff;
  background: rgba(255, 255, 255, 0.06);
  text-decoration: none;
}

.panel-cta a::after { content: none; }

.panel-h2 {
  margin: 2.6rem 0 1rem;
  padding-top: 1.4rem;
  border-top: 1px solid rgba(226, 226, 226, 0.14);
  color: #fff;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.2rem, 3vw, 1.55rem);
}

@media (max-width: 640px) {
  .chrono-step { padding-left: 1.15rem; }
  .outcome-rows li {
    grid-template-columns: 1fr auto;
    row-gap: 0.25rem;
  }
  .oc-tag { grid-column: 2; justify-self: end; }
}
/* Scotty Systems plans */
/* ── PLANS — deliberately black and white ──────────────────────────
   Two plans, so the grid is two columns of equal weight with real air
   between them. No tinted "recommended" card and no colour: the only
   thing separating Free from Pro should be what each one actually
   gives you. */
/* auto-fit rather than a fixed 2-up: the panel is a narrow column, so the
   cards must collapse on the PANEL's width, which a viewport media query
   cannot see. Below ~530px of panel they stack. */
.systems-plan-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(238px, 1fr));
  gap: 24px;
  margin: 40px 0 8px;
}
.systems-plan {
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: transparent;
  padding: 30px 28px;
  transition: border-color 0.4s ease, background 0.4s ease;
}
.systems-plan:hover { border-color: rgba(255, 255, 255, 0.3); background: rgba(255, 255, 255, 0.018); }
.systems-plan-status {
  margin: 0 0 26px;
  font: 600 9px/1.2 'JetBrains Mono', monospace;
  letter-spacing: 0.2em;
  color: #7c7c78;
}
.systems-plan h2 {
  margin: 0;
  font: 400 30px/1.1 Fraunces, Georgia, serif;
  color: #fbfbf9;
}
.systems-plan-price {
  margin: 14px 0 0;
  font: 400 34px/1.15 Inter, sans-serif;
  color: #fbfbf9;
  letter-spacing: -0.01em;
}
.systems-plan-price small {
  font-size: 12px;
  letter-spacing: 0.02em;
  color: #85857f;
}
/* the rule under the price separates "what it costs" from "what you get" */
.systems-plan-inherits,
.systems-plan ul {
  border-top: 1px solid rgba(255, 255, 255, 0.09);
}
.systems-plan-inherits {
  margin: 26px 0 0;
  padding-top: 22px;
  font-size: 12px;
  letter-spacing: 0.02em;
  color: #8d8d88;
}
.systems-plan-inherits + ul { border-top: 0; padding-top: 14px; margin-top: 0; }
.systems-plan ul {
  margin: 26px 0 0;
  padding: 22px 0 0 18px;
  color: #c2c2bd;
  font-size: 14px;
  line-height: 1.5;
}
.systems-plan li { margin-bottom: 11px; }
.systems-plan li::marker { color: #5f5f5b; }
.systems-plan-action { margin: 32px 0 0; padding-top: 32px; }
/* full-width so a long label can never spill past the card edge */
.systems-plan-action .btn-solid {
  display: block;
  text-align: center;
  white-space: nowrap;
  padding: 13px 16px;
}
.systems-plan button {
  margin-top: 32px;
  width: 100%;
  padding: 13px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: transparent;
  color: #777;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 9px;
  cursor: not-allowed;
}
/* push every action row to the same baseline regardless of list length */
.systems-plan-action,
.systems-plan button { margin-top: auto; }
@media (max-width: 900px) {
  .systems-plan-grid { grid-template-columns: 1fr; gap: 18px; }
  .systems-plan { padding: 26px 24px; }
}
