/* Cinch brand layer: loaded after style.css. Ink, bone, and one amber line: the tether. Full brief in BRAND.md.
   Block colors (violet entry, cyan size, amber stop, coral exit) stay for the builder, where they carry meaning. */
:root {
  --bg: #07080a; --s1: #0d0e11; --s2: #131418; --s3: #1b1c21;
  --line: rgba(239, 233, 220, 0.08); --line-2: rgba(239, 233, 220, 0.16);
  --text: #efe9dc; --mute: #a39f94; --dim: #6b685f;
  --tether: #ffb224; --strain: #ff6a3d; --stop: #ffb224; --leash: #ffb224;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1); --ease-out: cubic-bezier(0.16, 1, 0.3, 1); --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --t-fast: 160ms; --t-base: 320ms; --t-slow: 720ms;
  --sp: 0;
}
::selection { background: rgba(255, 178, 36, 0.32); }
:focus-visible { outline: 2px solid var(--tether); outline-offset: 3px; }

/* ---------------------------------------------------------------- top bar */
.topbar { background: rgba(7, 8, 10, 0.82); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border-bottom-color: var(--line); }
.topbar::after { content: ""; position: absolute; left: 0; bottom: -1px; height: 1px; width: 100%; transform-origin: left; transform: scaleX(var(--sp)); background: var(--tether); opacity: 0.9; }
.logo { gap: 12px; font-size: 22px; }
.logo svg { width: 30px; height: 30px; }
.logo .ring { transform-origin: 21px 23px; transition: transform 0.8s var(--ease-out); }
.logo .tail { transform-origin: 30.96px 31.36px; transition: transform 0.55s var(--ease-out); }
.logo .agent { transform-origin: 21px 23px; transition: transform 0.55s var(--ease-out); }
.logo:hover .ring { transform: rotate(-24deg); }
.logo:hover .tail, .logo:hover .handle { transform: translate(2.5px, -2.5px); }
.logo:hover .agent { transform: translate(-1.5px, 1px) scale(1.15); }
.nav { background: rgba(13, 14, 17, 0.7); border-color: var(--line); backdrop-filter: blur(8px); }
.nav a { font-size: 13px; letter-spacing: 0.01em; }
.nav-ind { background: var(--text); }
.net { font-family: var(--mono); font-size: 11px; letter-spacing: 0.04em; text-transform: uppercase; }

/* ---------------------------------------------------------------- controls: the primary action is the tether */
.btn-primary { background: var(--tether); color: #1a1200; font-weight: 600; box-shadow: 0 0 0 0 rgba(255, 178, 36, 0); transition: transform 0.3s var(--ease-out), box-shadow 0.35s, background 0.2s; }
.btn-primary:hover { background: #ffc24d; box-shadow: 0 10px 34px -10px rgba(255, 178, 36, 0.55); }
.btn-primary::after { background: radial-gradient(120px circle at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, 0.45), transparent 70%); }
.btn-primary:active { transform: scale(0.97); }
.btn-ghost { border-color: var(--line-2); background: rgba(239, 233, 220, 0.02); }
.btn-ghost:hover { border-color: rgba(255, 178, 36, 0.55); background: rgba(255, 178, 36, 0.06); }
.btn-lg { border-radius: 999px; padding: 14px 26px; }
.card { background: linear-gradient(180deg, rgba(239, 233, 220, 0.025), rgba(239, 233, 220, 0.008)), var(--s1); border-color: var(--line); }
.sheet { border-color: var(--line-2); }
.sheet h2, .page-head h1 { letter-spacing: -0.04em; }
.foot { border-top: 1px solid var(--line); margin-top: 40px; padding-top: 22px; font-family: var(--mono); font-size: 11px; letter-spacing: 0.02em; }
.foot-brand { color: var(--text); }
.toast { border-color: var(--line-2); }

/* ---------------------------------------------------------------- pages hand over instead of jumping */
::view-transition-old(root) { animation: 220ms var(--ease) both vtOut; }
::view-transition-new(root) { animation: 460ms var(--ease-out) both vtIn; }
@keyframes vtOut { to { opacity: 0; transform: translateY(-6px); } }
@keyframes vtIn { from { opacity: 0; transform: translateY(14px); } }
[data-reveal] { opacity: 0; transform: translateY(22px); transition: opacity var(--t-slow) var(--ease-out), transform var(--t-slow) var(--ease-out); transition-delay: calc(var(--i, 0) * 90ms); }
[data-reveal].in { opacity: 1; transform: none; }

/* ---------------------------------------------------------------- boot: the mark draws itself while prices load */
.boot-card .spin { display: none; }
.boot-card::before { content: ""; width: 56px; height: 56px; margin: 0 auto 6px; background: url("../brand/mark.svg") center / contain no-repeat; animation: bootPulse 1.6s var(--ease-in-out) infinite; }
@keyframes bootPulse { 0%, 100% { opacity: 0.45; transform: scale(0.94) rotate(-8deg); } 50% { opacity: 1; transform: scale(1) rotate(0); } }

/* ---------------------------------------------------------------- home: the framed stage */
.tf-home { display: grid; gap: 132px; padding-top: 6px; overflow-x: clip; }
.tf-frame { position: relative; border: 1px solid var(--line-2); border-radius: 28px; background: radial-gradient(1200px 520px at 74% 54%, rgba(255, 178, 36, 0.06), transparent 60%), rgba(7, 8, 10, 0.5); }
.tf-mk { position: absolute; width: 14px; height: 14px; border: 0 solid var(--tether); opacity: 0.8; pointer-events: none; z-index: 3; }
.tf-mk.mk-tl { top: 14px; left: 14px; border-top-width: 1px; border-left-width: 1px; }
.tf-mk.mk-tr { top: 14px; right: 14px; border-top-width: 1px; border-right-width: 1px; }
.tf-mk.mk-bl { bottom: 14px; left: 14px; border-bottom-width: 1px; border-left-width: 1px; }
.tf-mk.mk-br { bottom: 14px; right: 14px; border-bottom-width: 1px; border-right-width: 1px; }
.tf-hero { min-height: clamp(600px, calc(100svh - 120px), 820px); display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); align-items: center; padding: 56px clamp(24px, 4vw, 64px); overflow: hidden; touch-action: pan-y; }
.tf-scene { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.tf-hero-copy { position: relative; z-index: 2; max-width: 640px; }
.tf-eyebrow { display: inline-flex; align-items: center; gap: 10px; font: 500 11px/1 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--mute); }
.tf-eyebrow-mark { display: inline-flex; }
.tf-h1 { margin-top: 26px; font: 300 clamp(60px, 9.6vw, 148px)/0.9 var(--display); letter-spacing: -0.06em; }
.tf-ln { display: block; overflow: hidden; padding-bottom: 0.08em; margin-bottom: -0.08em; }
.tf-ln > span { display: block; animation: lnUp 1.1s var(--ease-out) both; }
.tf-ln.it > span { animation-delay: 0.14s; font-style: italic; color: var(--tether); }
@keyframes lnUp { from { transform: translateY(105%) rotate(2deg); } to { transform: none; } }
.tf-sub { margin-top: 28px; max-width: 54ch; color: var(--mute); font-size: 17px; line-height: 1.6; }
.tf-cta { display: flex; gap: 12px; margin-top: 32px; flex-wrap: wrap; }
.tf-cta .btn svg { margin-left: 8px; transform: rotate(90deg); }
.tf-trust { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 9px; color: var(--mute); font-size: 14px; }
.tf-trust li { display: flex; align-items: center; gap: 10px; }
.tf-trust svg { width: 16px; height: 16px; color: var(--tether); }
.tf-tele { position: absolute; z-index: 2; right: clamp(20px, 3vw, 44px); bottom: clamp(20px, 3vw, 40px); width: min(250px, 32%); padding: 16px 18px; border: 1px solid var(--line-2); border-radius: 18px; background: rgba(7, 8, 10, 0.72); backdrop-filter: blur(10px); display: grid; gap: 10px; font-size: 13px; color: var(--mute); }
.tf-tele-k { display: flex; align-items: center; gap: 8px; font: 500 10.5px/1 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--text); }
.tf-tele-k i { width: 7px; height: 7px; border-radius: 50%; background: var(--tether); box-shadow: 0 0 0 4px rgba(255, 178, 36, 0.16); animation: blink 2.4s var(--ease-in-out) infinite; }
@keyframes blink { 50% { opacity: 0.35; } }
.tf-tele p { line-height: 1.5; }
.tf-tele-row { display: flex; justify-content: space-between; align-items: baseline; padding-top: 10px; border-top: 1px solid var(--line); }
.tf-n { font: 500 22px/1 var(--mono); color: var(--tether); }
.tf-tele .btn { justify-content: center; }
.tf-tele-note { font: 400 10.5px/1.4 var(--mono); color: var(--dim); }

.tf-ticker { overflow: hidden; border-block: 1px solid var(--line); padding: 16px 0; mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); margin-top: -64px; }
.tf-ticker-track { display: flex; gap: 28px; width: max-content; animation: tick 60s linear infinite; font: 500 12px/1 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--mute); }
.tf-ticker-track span { display: inline-flex; align-items: center; gap: 28px; white-space: nowrap; }
.tf-ticker-track i { width: 5px; height: 5px; transform: rotate(45deg); background: var(--tether); }
@keyframes tick { to { transform: translateX(-50%); } }

.tf-sec { display: grid; gap: 32px; }
.tf-k { font: 500 11px/1 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--tether); }
.tf-h2 { margin-top: 14px; font: 300 clamp(40px, 5.6vw, 84px)/0.98 var(--display); letter-spacing: -0.05em; max-width: 14ch; }
.tf-h2 i, .tf-h2.big i { font-style: italic; color: var(--tether); }
.tf-h2.big { font-size: clamp(44px, 6.4vw, 96px); max-width: 12ch; }
.tf-p { margin-top: 18px; color: var(--mute); font-size: 17px; line-height: 1.6; max-width: 46ch; }
.tf-p.small { font-size: 14px; color: var(--dim); }

.tf-proof { grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); gap: clamp(28px, 5vw, 88px); align-items: center; }
.tf-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 34px; padding-top: 28px; border-top: 1px solid var(--line-2); }
.tf-stat-l { display: flex; align-items: center; gap: 8px; font: 500 11px/1 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--mute); }
.tf-stat { display: block; margin-top: 14px; font: 300 clamp(44px, 5.4vw, 80px)/1 var(--display); letter-spacing: -0.05em; font-variant-numeric: tabular-nums; }
.tf-stat.good { color: var(--tether); }
.tf-stat-d { display: block; margin-top: 8px; font-size: 13px; color: var(--dim); }
.tf-proof-chart { padding: 22px; }
.tf-chart-k { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; font: 500 11px/1 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--mute); }

/* the three chapters: a sticky diagram that changes with the chapter in view */
.tf-how-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr); gap: clamp(28px, 5vw, 96px); align-items: start; }
.tf-how-stick { position: sticky; top: 104px; }
.tf-diagram { aspect-ratio: 1; max-width: 520px; margin-inline: auto; border: 1px solid var(--line-2); border-radius: 28px; padding: 18px; background: radial-gradient(closest-side, rgba(255, 178, 36, 0.07), transparent), var(--s1); }
.tf-diagram svg { width: 100%; height: 100%; display: block; overflow: visible; }
.tf-diagram text { font: 500 9.5px var(--mono); letter-spacing: 0.1em; fill: var(--dim); }
.d-grid path { stroke: var(--line); stroke-width: 1; }
.d-ring { stroke: var(--tether); stroke-width: 2; stroke-dasharray: 100; stroke-dashoffset: 100; transition: stroke-dashoffset 1.4s var(--ease-in-out); transform: rotate(-90deg); transform-origin: 200px 200px; }
.d-ticks path { stroke: var(--line-2); stroke-width: 1; }
.d-ticks, .d-limits { opacity: 0; transition: opacity 0.8s var(--ease-out) 0.4s; }
.d-b rect:first-child { fill: var(--s2); stroke: var(--line-2); }
.d-b text { fill: var(--text); font: 500 11px var(--ui); letter-spacing: 0; }
.d-b { transition: transform 1s var(--ease-out); }
.d-b.b0 { transform: translate(162px, 168px); } .d-b.b1 { transform: translate(238px, 168px); } .d-b.b2 { transform: translate(162px, 218px); } .d-b.b3 { transform: translate(238px, 218px); }
.d-vault rect { fill: var(--bg); stroke: var(--text); stroke-width: 2; }
.d-vault, .d-rope, .d-agent { opacity: 0; transition: opacity 0.7s var(--ease-out) 0.3s; }
.d-rope { stroke: var(--tether); stroke-width: 2.6; }
.tf-diagram[data-ch="1"] .d-ring, .tf-diagram[data-ch="2"] .d-ring { stroke-dashoffset: 0; }
.tf-diagram[data-ch="1"] .d-ticks, .tf-diagram[data-ch="1"] .d-limits, .tf-diagram[data-ch="2"] .d-ticks, .tf-diagram[data-ch="2"] .d-limits { opacity: 1; }
.tf-diagram[data-ch="1"] .d-b.b0, .tf-diagram[data-ch="2"] .d-b.b0 { transform: translate(200px, 64px) scale(0.8); }
.tf-diagram[data-ch="1"] .d-b.b1, .tf-diagram[data-ch="2"] .d-b.b1 { transform: translate(336px, 200px) scale(0.8); }
.tf-diagram[data-ch="1"] .d-b.b2, .tf-diagram[data-ch="2"] .d-b.b2 { transform: translate(200px, 336px) scale(0.8); }
.tf-diagram[data-ch="1"] .d-b.b3, .tf-diagram[data-ch="2"] .d-b.b3 { transform: translate(64px, 200px) scale(0.8); }
.tf-diagram[data-ch="2"] .d-vault, .tf-diagram[data-ch="2"] .d-rope, .tf-diagram[data-ch="2"] .d-agent { opacity: 1; }
.tf-chapters { display: grid; gap: 0; }
.tf-chapter { min-height: 62svh; display: flex; flex-direction: column; justify-content: center; gap: 14px; padding: 8px 0; border-left: 1px solid var(--line); padding-left: clamp(20px, 3vw, 44px); transition: border-color 0.5s, opacity 0.5s; }
.tf-chapter:first-child { min-height: 48svh; }
.tf-ch-n { font: 500 12px/1 var(--mono); letter-spacing: 0.1em; color: var(--c); }
.tf-chapter h3 { font: 300 clamp(32px, 3.6vw, 52px)/1.04 var(--display); letter-spacing: -0.04em; }
.tf-chapter p { color: var(--mute); font-size: 17px; line-height: 1.6; max-width: 40ch; }

.tf-words { grid-template-columns: minmax(0, 0.7fr) minmax(0, 1.3fr); gap: clamp(28px, 5vw, 88px); align-items: start; }
.tf-defs { display: grid; margin: 0; }
.tf-defs > div { display: grid; grid-template-columns: 56px minmax(0, 150px) minmax(0, 1fr); gap: 16px; align-items: baseline; padding: 24px 0; border-top: 1px solid var(--line-2); transition: background 0.4s; }
.tf-defs > div:last-child { border-bottom: 1px solid var(--line-2); }
.tf-defs > div:hover { background: linear-gradient(90deg, rgba(255, 178, 36, 0.05), transparent 70%); }
.tf-def-n { font: 500 11px/1 var(--mono); color: var(--tether); letter-spacing: 0.1em; }
.tf-defs dt { font: 300 clamp(26px, 2.8vw, 38px)/1 var(--display); letter-spacing: -0.035em; }
.tf-defs dd { margin: 0; color: var(--mute); font-size: 16px; line-height: 1.55; max-width: 52ch; }

.tf-close { grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); align-items: end; padding: clamp(32px, 5vw, 72px); gap: 40px; background: radial-gradient(900px 400px at 100% 100%, rgba(255, 178, 36, 0.1), transparent 60%), rgba(7, 8, 10, 0.5); }
.tf-close-cta { display: flex; gap: 12px; flex-wrap: wrap; justify-content: flex-end; }

/* ---------------------------------------------------------------- other pages inherit the same language */
.page-head h1 i { color: var(--tether); }
.display i { font-style: italic; }
.sub { color: var(--mute); }
.tag-demo { font-family: var(--mono); letter-spacing: 0.06em; }

/* ---------------------------------------------------------------- small screens: recomposed, not shrunk */
@media (max-width: 980px) {
  .tf-home { gap: 96px; }
  .tf-hero { grid-template-columns: 1fr; align-items: start; padding: 36px 22px 300px; min-height: 0; }
  .tf-h1 { font-size: clamp(56px, 17vw, 108px); }
  .tf-scene { opacity: 0.5; }
  .tf-tele { left: 18px; right: 18px; width: auto; bottom: 18px; grid-template-columns: 1fr auto; gap: 8px 14px; align-items: center; }
  .tf-tele p, .tf-tele-note { display: none; }
  .tf-tele-k { grid-column: 1; } .tf-tele-row { grid-column: 1; border-top: 0; padding: 0; gap: 12px; justify-content: flex-start; } .tf-tele .btn { grid-column: 2; grid-row: 1 / span 2; }
  .tf-ticker { margin-top: -56px; }
  .tf-proof, .tf-how-grid, .tf-words, .tf-close { grid-template-columns: 1fr; }
  .tf-how-stick { position: relative; top: 0; } .tf-diagram { max-width: 380px; }
  .tf-chapter, .tf-chapter:first-child { min-height: 0; padding: 22px 0 22px 20px; }
  .tf-defs > div { grid-template-columns: 40px 1fr; } .tf-defs dd { grid-column: 2; }
  .tf-close-cta { justify-content: flex-start; }
}
@media (max-width: 560px) { .tf-stats { grid-template-columns: 1fr; } .tf-cta .btn { flex: 1 1 100%; justify-content: center; } }

/* ---------------------------------------------------------------- reduced motion: everything is simply there */
@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1; transform: none; transition: none; }
  .tf-ln > span { animation: none; }
  .tf-ticker-track { animation: none; }
  .tf-tele-k i, .boot-card::before { animation: none; }
  .d-ring, .d-b, .d-ticks, .d-limits, .d-vault, .d-rope, .d-agent { transition: none; }
  ::view-transition-old(root), ::view-transition-new(root) { animation: none; }
}

/* the grain layer is deliberately oversized; clip it so phones never get a sideways scroll */
html, body { overflow-x: clip; }

/* backdrop-filter on the bar would trap the fixed bottom nav inside it on phones, so it is solid there */
@media (max-width: 860px) {
  .topbar { -webkit-backdrop-filter: none; backdrop-filter: none; background: rgba(7, 8, 10, 0.94); }
  .nav { background: rgba(13, 14, 17, 0.94); }
}
.tf-close-cta .btn svg { margin-left: 8px; transform: rotate(90deg); }
.tf-close .tf-p { margin-top: 28px; }

/* ================================================================ FUTURE LAYER: field, instruments, depth ================================================================ */
:root { --signal: #6ee7ff; }
#field { position: fixed; inset: 0; width: 100vw; height: 100vh; height: 100lvh; z-index: -3; pointer-events: none; display: block; background: #07080a; }
html.gl #backdrop { display: none; }
html.gl #vignette { background: radial-gradient(130% 100% at 50% 40%, transparent 60%, rgba(5, 6, 9, 0.5) 100%); }

/* glass stage over the field */
.tf-frame { background: radial-gradient(1100px 520px at 76% 55%, rgba(255, 178, 36, 0.05), transparent 60%), rgba(7, 8, 10, 0.38); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); box-shadow: inset 0 1px 0 rgba(239, 233, 220, 0.06), 0 40px 120px -60px rgba(255, 178, 36, 0.25); }
.tf-hero::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: 1; background: repeating-linear-gradient(0deg, rgba(239, 233, 220, 0.025) 0 1px, transparent 1px 3px); mix-blend-mode: overlay; }
.tf-mk { width: 18px; height: 18px; opacity: 1; }

/* headline: every letter arrives out of blur, in sequence */
.tf-ln { overflow: visible; padding-bottom: 0; margin-bottom: 0; }
.tf-ln > .tf-ch { display: inline-block; white-space: pre; animation: chIn 1.15s var(--ease-out) both; animation-delay: calc(var(--ci) * 42ms + 120ms); }
.tf-ln.it > .tf-ch { animation-name: chIn; font-style: italic; color: var(--tether); text-shadow: 0 0 46px rgba(255, 178, 36, 0.38); animation-delay: calc(var(--ci) * 42ms + 120ms); }
@keyframes chIn { from { opacity: 0; transform: translateY(0.35em) scale(0.96); filter: blur(14px); } 60% { filter: blur(0); } to { opacity: 1; transform: none; filter: none; } }
.tf-h1 { text-shadow: 0 0 80px rgba(239, 233, 220, 0.08); }
.tf-eyebrow { color: var(--signal); }
.tf-eyebrow-mark svg { filter: drop-shadow(0 0 6px rgba(255, 178, 36, 0.6)); }
.tf-k { color: var(--signal); display: inline-flex; align-items: center; gap: 12px; }
.tf-k::before { content: ""; width: 28px; height: 1px; background: currentColor; opacity: 0.7; }
.tf-tele { border-color: rgba(110, 231, 255, 0.22); box-shadow: 0 0 0 1px rgba(110, 231, 255, 0.04), 0 20px 60px -30px rgba(110, 231, 255, 0.25); }
.tf-tele-k i { background: var(--signal); box-shadow: 0 0 0 4px rgba(110, 231, 255, 0.16), 0 0 12px var(--signal); }
.tf-n { text-shadow: 0 0 18px rgba(255, 178, 36, 0.5); }
.tag-demo { color: var(--signal); border-color: rgba(110, 231, 255, 0.3); }

/* spec band */
.tf-specs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-top: -40px; }
.tf-spec, .tf-proof-chart[data-tilt] { position: relative; display: grid; gap: 10px; align-content: start; padding: 24px 24px 22px; border: 1px solid var(--line-2); border-radius: 20px; background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 0%), rgba(110, 231, 255, 0.10), transparent 70%), rgba(7, 8, 10, 0.5); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); transition: transform 0.25s var(--ease-out), border-color 0.3s; transform-style: preserve-3d; will-change: transform; overflow: hidden; }
.tf-spec:hover, .tf-proof-chart[data-tilt]:hover { border-color: rgba(110, 231, 255, 0.4); }
.tf-spec::before { content: ""; position: absolute; top: 12px; right: 12px; width: 8px; height: 8px; border-top: 1px solid var(--signal); border-right: 1px solid var(--signal); opacity: 0.8; }
.tf-spec-n { font: 300 clamp(48px, 5.4vw, 84px)/1 var(--display); letter-spacing: -0.05em; font-variant-numeric: tabular-nums; }
.tf-spec-n b { font-weight: 300; background: linear-gradient(180deg, var(--text), #b9b2a2); -webkit-background-clip: text; background-clip: text; color: transparent; }
.tf-spec-l { font: 500 11px/1.3 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--signal); }
.tf-spec-d { color: var(--mute); font-size: 14px; line-height: 1.5; }

/* HUD */
#hud { position: fixed; inset: 0; z-index: 40; pointer-events: none; font-family: var(--mono); }
.hud-rail { position: fixed; left: 14px; top: 50%; transform: translateY(-50%); display: grid; gap: 14px; pointer-events: auto; }
.hud-rail a { display: flex; align-items: center; gap: 10px; color: var(--dim); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; text-decoration: none; transition: color 0.3s; }
.hud-rail a::before { content: ""; width: 14px; height: 1px; background: currentColor; transition: width 0.4s var(--ease-out), background 0.3s; }
.hud-l { opacity: 0; transform: translateX(-6px); transition: opacity 0.3s, transform 0.4s var(--ease-out); }
.hud-rail a:hover, .hud-rail a.on { color: var(--text); }
.hud-rail a.on::before { width: 30px; background: var(--tether); box-shadow: 0 0 10px var(--tether); }
.hud-rail a.on .hud-l, .hud-rail a:hover .hud-l { opacity: 1; transform: none; }
.hud-rail a.on .hud-n { color: var(--tether); }
.hud-bottom { position: fixed; left: 22px; bottom: 18px; display: flex; align-items: center; gap: 18px; font-size: 10.5px; letter-spacing: 0.08em; color: var(--dim); text-transform: uppercase; }
.hud-prices { display: flex; align-items: center; gap: 16px; }
.hud-prices[hidden] { display: none; }
.hud-dot { width: 6px; height: 6px; border-radius: 50%; background: #4be3ac; box-shadow: 0 0 10px #4be3ac; animation: blink 2.4s var(--ease-in-out) infinite; }
.hud-px { display: inline-flex; gap: 7px; color: var(--mute); font-variant-numeric: tabular-nums; transition: color 0.4s; }
.hud-px b { color: var(--text); font-weight: 500; }
.hud-px.up { color: #4be3ac; } .hud-px.dn { color: #ff5d73; }
.hud-coords { position: fixed; right: 22px; bottom: 18px; font-size: 10.5px; letter-spacing: 0.1em; color: var(--dim); white-space: pre; }
.hud-reticle { position: fixed; left: -17px; top: -17px; width: 34px; height: 34px; z-index: 100; pointer-events: none; opacity: 0; scale: 1; transition: opacity 0.3s, scale 0.35s var(--ease-out), border-color 0.3s; border: 1px solid rgba(239, 233, 220, 0.4); border-radius: 50%; mix-blend-mode: difference; }
.hud-reticle.on { opacity: 1; }
.hud-reticle.act { scale: 1.7; border-color: var(--tether); mix-blend-mode: normal; background: rgba(255, 178, 36, 0.06); }
.hud-reticle.press { scale: 0.7; }
.hud-reticle i { position: absolute; width: 5px; height: 5px; border: 0 solid var(--text); }
.hud-reticle i:nth-child(1) { top: -3px; left: -3px; border-top-width: 1px; border-left-width: 1px; } .hud-reticle i:nth-child(2) { top: -3px; right: -3px; border-top-width: 1px; border-right-width: 1px; }
.hud-reticle i:nth-child(3) { bottom: -3px; left: -3px; border-bottom-width: 1px; border-left-width: 1px; } .hud-reticle i:nth-child(4) { bottom: -3px; right: -3px; border-bottom-width: 1px; border-right-width: 1px; }
.hud-dot-cur { position: fixed; left: -2px; top: -2px; width: 4px; height: 4px; border-radius: 50%; background: var(--tether); z-index: 101; pointer-events: none; }

/* controls get an edge-light that follows the pointer */
.btn-ghost::before { content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; background: radial-gradient(90px circle at var(--mx, 50%) var(--my, 50%), rgba(110, 231, 255, 0.7), transparent 70%); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; opacity: 0; transition: opacity 0.3s; pointer-events: none; }
.btn-ghost:hover::before { opacity: 1; }
.btn-ghost { position: relative; }
.nav a[aria-current="page"] { color: #07080a; }
.tf-chapter { border-left-color: var(--line-2); }
.tf-chapter .tf-ch-n { text-shadow: 0 0 14px currentColor; }
.tf-diagram { border-color: rgba(110, 231, 255, 0.18); box-shadow: 0 40px 120px -70px rgba(110, 231, 255, 0.35); }
.tf-defs > div { border-color: var(--line-2); }
.tf-def-n { color: var(--signal); }

@media (max-width: 1280px) { .hud-rail { display: none; } }
@media (max-width: 980px) { .tf-specs { grid-template-columns: 1fr 1fr; margin-top: -24px; } .hud-bottom, .hud-coords { display: none; } }
@media (max-width: 560px) { .tf-specs { grid-template-columns: 1fr; } }
@media (hover: none) { .hud-reticle, .hud-dot-cur { display: none; } }
@media (prefers-reduced-motion: reduce) {
  .tf-ln > .tf-ch { animation: none; }
  .hud-dot { animation: none; }
}

.hud-n, .hud-l { opacity: 0; transform: translateX(-6px); transition: opacity 0.3s, transform 0.4s var(--ease-out); }
.hud-rail a:hover .hud-n, .hud-rail a:hover .hud-l { opacity: 1; transform: none; }
.hud-rail a.on .hud-l { opacity: 0; }
.hud-rail a:hover { background: rgba(7, 8, 10, 0.85); padding: 4px 10px 4px 0; border-radius: 0 8px 8px 0; }
#hud::before { content: ""; position: fixed; left: 0; right: 0; bottom: 0; height: 76px; background: linear-gradient(to top, rgba(7, 8, 10, 1) 30%, transparent); pointer-events: none; }
@media (max-width: 980px) { #hud::before { display: none; } }
.tf-chapter p, .tf-p, .tf-sub, .tf-defs dd, .tf-trust { text-shadow: 0 0 14px #07080a, 0 0 28px #07080a; }

/* the pointer is just a faint light on the page */
.hud-reticle, .hud-dot-cur { display: none !important; }

/* nine links now: keep the nav inside the screen */
.nav a { padding-left: 13px; padding-right: 13px; flex: none; }
@media (max-width: 860px) { .nav { max-width: calc(100vw - 16px); overflow-x: auto; scrollbar-width: none; } .nav::-webkit-scrollbar { display: none; } .nav a { padding-left: 11px; padding-right: 11px; } }

/* Hero: the interactive leash lab replaces the old caption panel (not a glass surface, so the animation behind never shows through) */
.tf-lab { position: absolute; z-index: 5; right: clamp(20px, 3vw, 44px); bottom: clamp(20px, 3vw, 40px); width: min(340px, 38%); padding: 16px 18px; border: 1px solid rgba(110, 231, 255, 0.22); border-radius: 18px; background: #0a0b0e; box-shadow: 0 20px 60px -30px rgba(110, 231, 255, 0.25); display: grid; gap: 9px; font-size: 13px; color: var(--mute); }
.tf-lab p { line-height: 1.5; margin: 0; }
.tf-lab-k { display: flex; align-items: center; gap: 8px; font: 500 10.5px/1 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--text); }
.tf-lab-k i { width: 7px; height: 7px; border-radius: 50%; background: var(--signal); box-shadow: 0 0 0 4px rgba(110, 231, 255, 0.16), 0 0 12px var(--signal); animation: blink 2.4s var(--ease-in-out) infinite; }
.tf-lab .tag-demo { margin-left: auto; }
.tf-lab-chart { border: 1px solid var(--line); border-radius: 12px; padding: 6px 8px; background: #0b0c0f; }
.tf-lab-legend { display: flex; gap: 14px; font: 400 10.5px/1 var(--mono); color: var(--dim); }
.tf-lab-legend span { display: inline-flex; align-items: center; gap: 6px; }
.tf-lab .field-top { font-size: 12px; }
.tf-lab-row { display: flex; justify-content: space-between; align-items: baseline; padding-top: 8px; border-top: 1px solid var(--line); }
.tf-lab-row em { font-style: normal; color: var(--dim); margin: 0 8px; }
.tf-lab-n { font: 500 18px/1 var(--mono); color: var(--text); } .tf-lab-n.good { color: var(--tether); }
.tf-lab-saves { font: 400 11px/1.4 var(--mono); color: var(--dim); min-height: 2.8em; }
.tf-lab .btn { justify-content: center; }
@media (max-width: 900px) {
  .tf-lab { position: relative; right: auto; bottom: auto; width: auto; margin-top: 28px; }
  .tf-hero { padding-bottom: 22px; }
}
@media (prefers-reduced-motion: reduce) { .tf-lab-k i { animation: none; } }

.tf-loop-cv { display: block; width: 100%; height: 124px; }
.tf-lab-legend .sw { width: 14px; } .tf-lab-legend .sw.amb { border-top-color: var(--tether); } .tf-lab-legend .sw.sig { border-top: 0; height: 7px; width: 7px; border-radius: 50%; background: #6ee7ff; }
.tf-lab-legend { flex-wrap: wrap; row-gap: 6px; } .tf-lab-legend span { white-space: nowrap; }
.tf-loop-call { min-height: 3em; font: 400 11.5px/1.45 var(--mono); color: var(--dim); transition: color 0.25s; }
.tf-loop-call.on { color: #6ee7ff; }
.tf-lab .tf-tele-note { font: 400 10.5px/1.4 var(--mono); color: var(--dim); }

/* One visual in the hero: the replay alone, large, with no card around it */
.tf-lab { top: 50%; bottom: auto; right: clamp(24px, 4vw, 64px); transform: translateY(-50%); width: min(560px, 46%); padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; gap: 14px; }
.tf-lab .tf-lab-chart { border: 0; padding: 0; background: transparent; }
.tf-lab .tf-loop-cv { height: clamp(220px, 34vh, 330px); }
.tf-lab-n { font-size: 26px; }
.tf-lab-row { border-top: 1px solid var(--line); padding-top: 12px; }
.tf-loop-call { min-height: 2.9em; font-size: 12.5px; }
@media (max-width: 900px) {
  .tf-lab { position: relative; top: auto; right: auto; transform: none; width: auto; margin-top: 28px; }
  .tf-lab .tf-loop-cv { height: 200px; }
}
