/* ============================================================================
   UntangleTabs — "The Instrument"
   A machined, high-key studio world. One signal colour. Engineered, not glassy.
   ========================================================================== */

/* --- Tokens --------------------------------------------------------------- */
:root {
  --font-display: 'Archivo', 'Helvetica Neue', Arial, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  /* Light — "Studio" */
  --canvas: #E7E8EB;
  --canvas-2: #DFE1E4;
  --surface: #FFFFFF;
  --ink: #17181C;
  --ink-2: #53575F;
  --metal: #9DA1A9;
  --line: rgba(23, 24, 28, 0.12);
  --line-2: rgba(23, 24, 28, 0.22);
  --signal: #F0531C;
  --signal-ink: #1A0E06;
  --lcd: #111318;
  --lcd-ink: #EDE7E1;
  --hair: rgba(255, 255, 255, 0.7);

  --bezel-1: #F3F4F6;
  --bezel-2: #D7D9DE;
  --bezel-3: #C4C7CD;
  --screen-well: #C9CCD2;

  --r-xl: 26px;
  --r-lg: 18px;
  --r: 13px;
  --r-sm: 9px;
  --pill: 999px;

  --shadow-lift: 0 1px 0 rgba(255,255,255,.6), 0 22px 50px -28px rgba(20,22,28,.55);
  --shadow-card: 0 1px 0 rgba(255,255,255,.5), 0 16px 40px -30px rgba(20,22,28,.5);

  --maxw: 1200px;
  --gutter: clamp(20px, 5vw, 64px);
}

:root[data-theme="dark"] {
  /* Dark — "After hours bench" (warm-neutral graphite, deliberately not cobalt) */
  --canvas: #131417;
  --canvas-2: #0F1013;
  --surface: #1E2025;
  --ink: #ECEDEF;
  --ink-2: #9EA3AB;
  --metal: #464B54;
  --line: rgba(255, 255, 255, 0.10);
  --line-2: rgba(255, 255, 255, 0.20);
  --signal: #FF6A38;
  --signal-ink: #1A0E06;
  --lcd: #0B0C0F;
  --lcd-ink: #F0EAE3;
  --hair: rgba(255, 255, 255, 0.06);

  --bezel-1: #2A2D33;
  --bezel-2: #202329;
  --bezel-3: #17191E;
  --screen-well: #0E0F12;

  --shadow-lift: 0 1px 0 rgba(255,255,255,.05), 0 30px 60px -30px rgba(0,0,0,.8);
  --shadow-card: 0 1px 0 rgba(255,255,255,.04), 0 20px 46px -34px rgba(0,0,0,.75);
}

/* --- Reset ---------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  font-family: var(--font-display);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--canvas);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; color: inherit; }
::selection { background: var(--signal); color: var(--signal-ink); }

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

.skip {
  position: fixed; left: 16px; top: -60px; z-index: 200;
  background: var(--ink); color: var(--canvas);
  padding: 10px 16px; border-radius: 8px; font-family: var(--font-mono);
  font-size: 0.875rem; transition: top .18s ease;
}
.skip:focus { top: 16px; }

/* --- Type primitives ------------------------------------------------------ */
.headline {
  font-weight: 800;
  letter-spacing: -0.022em;
  line-height: 0.98;
  font-size: clamp(2.15rem, 4.6vw, 3.7rem);
  text-wrap: balance;
}
.headline--hero {
  font-weight: 900;
  letter-spacing: -0.032em;
  line-height: 0.9;
  font-size: clamp(3rem, 8.2vw, 6.6rem);
}
.headline--big {
  font-size: clamp(2.5rem, 6.2vw, 5rem);
  line-height: 0.96;
  letter-spacing: -0.028em;
}
.headline em { font-style: normal; color: var(--signal); }

.eyebrow {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.875rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-2);
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.eyebrow--center { justify-content: center; }
.index {
  color: var(--signal);
  font-weight: 600;
}
.eyebrow__tick {
  width: 26px; height: 2px; background: var(--signal); border-radius: 2px;
  display: inline-block;
}

.lede {
  font-size: clamp(1.125rem, 1.5vw, 1.34rem);
  line-height: 1.5;
  color: var(--ink);
  font-weight: 400;
}
.measure { max-width: 60ch; }

.planned-pill {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-2);
  border: 1px solid var(--line-2);
  border-radius: var(--pill);
  padding: 3px 9px;
  vertical-align: middle;
  white-space: nowrap;
}

/* --- Buttons -------------------------------------------------------------- */
.btn {
  --bh: 52px;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: var(--bh); padding: 0 22px;
  border-radius: var(--r);
  font-weight: 600; font-size: 1rem; letter-spacing: -0.01em;
  border: 1px solid transparent; cursor: pointer;
  transition: transform .16s ease, background .18s ease, box-shadow .18s ease, border-color .18s ease;
  white-space: nowrap;
}
.btn--lg { --bh: 58px; padding: 0 28px; font-size: 1.0625rem; }
.btn--block { display: flex; width: 100%; }
.btn:active { transform: translateY(1px); }

.btn--signal {
  background: var(--signal); color: var(--signal-ink);
  box-shadow: 0 1px 0 rgba(255,255,255,.25) inset, 0 12px 24px -14px var(--signal);
}
.btn--signal:hover { box-shadow: 0 1px 0 rgba(255,255,255,.35) inset, 0 16px 30px -12px var(--signal); transform: translateY(-1px); }

.btn--ghost {
  background: transparent; color: var(--ink);
  border-color: var(--line-2);
}
.btn--ghost:hover { border-color: var(--ink); background: color-mix(in srgb, var(--ink) 5%, transparent); }

.btn--link {
  height: auto; padding: 6px 2px; background: none; color: var(--ink-2);
  font-weight: 500; font-family: var(--font-mono); font-size: 0.9rem; letter-spacing: .02em;
}
.btn--link:hover { color: var(--signal); }

/* --- Navigation ----------------------------------------------------------- */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--canvas) 82%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav__inner {
  max-width: var(--maxw); margin: 0 auto;
  padding: 14px var(--gutter);
  display: flex; align-items: center; gap: 24px;
}
.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--ink); }
.brand__mark { color: var(--ink); display: inline-flex; }
.brand__word { font-weight: 800; font-size: 1.22rem; letter-spacing: -0.02em; }
.brand__word b { font-weight: 500; color: var(--ink-2); }

.nav__links { display: flex; gap: 26px; margin-left: 14px; }
.nav__links a {
  font-size: 0.98rem; color: var(--ink-2); font-weight: 500;
  padding: 6px 0; position: relative;
}
.nav__links a:hover { color: var(--ink); }
.nav__actions { margin-left: auto; display: flex; align-items: center; gap: 14px; }

.theme-toggle {
  display: inline-flex; align-items: center; gap: 9px;
  background: transparent; border: 1px solid var(--line-2);
  border-radius: var(--pill); height: 40px; padding: 0 14px 0 12px;
  font-family: var(--font-mono); font-size: 0.875rem; letter-spacing: .08em;
  text-transform: uppercase; color: var(--ink-2); cursor: pointer;
  transition: border-color .18s ease, color .18s ease;
}
.theme-toggle:hover { color: var(--ink); border-color: var(--ink); }
.theme-toggle__dot {
  width: 14px; height: 14px; border-radius: 50%;
  background: radial-gradient(circle at 32% 30%, var(--signal), color-mix(in srgb, var(--signal) 55%, #000) 100%);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--signal) 22%, transparent);
}

.nav__menu {
  display: none; flex-direction: column; gap: 5px; justify-content: center;
  width: 44px; height: 44px; background: transparent; border: 1px solid var(--line-2);
  border-radius: 10px; cursor: pointer; align-items: center; margin-left: auto;
}
.nav__menu span { width: 20px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform .2s ease; }
.nav__mobile { display: none; }

/* --- Section scaffold ----------------------------------------------------- */
.section { padding: clamp(72px, 11vw, 150px) 0; position: relative; }
.section__inner { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
.section .eyebrow { margin-bottom: 22px; }
.section .headline + .lede { margin-top: 26px; }

/* --- Hero ----------------------------------------------------------------- */
.hero {
  padding: clamp(26px, 4vw, 60px) 0 clamp(56px, 8vw, 112px);
  position: relative;
  background:
    radial-gradient(120% 80% at 78% 8%, color-mix(in srgb, var(--signal) 8%, transparent), transparent 46%),
    radial-gradient(100% 70% at 12% 0%, var(--surface), transparent 55%);
}
.hero__grid {
  max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter);
  display: grid; grid-template-columns: 1.02fr 1.15fr; gap: clamp(28px, 4vw, 64px);
  align-items: center;
}
.hero__copy { max-width: 560px; }
.hero .eyebrow { margin-bottom: 26px; }
.headline--hero { margin-bottom: 0; }
.hero .lede { margin-top: 28px; }

.thread-word { position: relative; white-space: nowrap; }
.thread-word__line {
  position: absolute; left: 0; right: 0; bottom: -0.12em; width: 100%; height: 0.42em;
  overflow: visible;
}
.thread-word__line path { stroke-dasharray: 340; stroke-dashoffset: 0; }

.hero__cta { margin-top: 34px; display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.hero__trust {
  margin-top: 26px; font-size: 0.95rem; color: var(--ink-2);
  display: flex; align-items: center; gap: 10px;
}
.hero__trust .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--signal); flex: none; }

/* --- The Instrument ------------------------------------------------------- */
.hero__stage {
  position: relative;
  display: flex; justify-content: center;
  perspective: 1600px;
}
.instrument {
  position: relative;
  width: min(100%, 508px);
  transform: rotateX(3deg) rotateY(-4deg);
  transform-style: preserve-3d;
}
.instrument__lip {
  position: absolute; inset: auto 4% -14px 4%; height: 30px;
  background: linear-gradient(var(--bezel-3), var(--canvas-2));
  border-radius: 0 0 var(--r-xl) var(--r-xl);
  filter: blur(.3px); transform: translateZ(-14px);
}
.instrument__bezel {
  position: relative;
  background: linear-gradient(158deg, var(--bezel-1), var(--bezel-2) 62%, var(--bezel-3));
  border: 1px solid var(--line-2);
  border-radius: var(--r-xl);
  padding: 20px;
  box-shadow:
    inset 0 1px 0 var(--hair),
    inset 0 0 0 1px rgba(255,255,255,.03),
    var(--shadow-lift);
}
.instrument__screws { position: absolute; inset: 12px; pointer-events: none; }
.instrument__screws i {
  position: absolute; width: 9px; height: 9px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, var(--bezel-1), var(--bezel-3));
  box-shadow: inset 0 0 0 1px var(--line-2), inset 0 1px 1px rgba(0,0,0,.25);
}
.instrument__screws i:nth-child(1) { left: 4px; top: 4px; }
.instrument__screws i:nth-child(2) { right: 4px; top: 4px; }
.instrument__screws i:nth-child(3) { left: 4px; bottom: 4px; }
.instrument__screws i:nth-child(4) { right: 4px; bottom: 4px; }

.instrument__screen {
  background: var(--screen-well);
  border-radius: var(--r-lg);
  padding: 10px;
  box-shadow: inset 0 2px 6px rgba(0,0,0,.28), inset 0 0 0 1px rgba(0,0,0,.12);
}

/* --- Product panel (prelaunch prototype) ---------------------------------- */
.panel {
  background: var(--surface); color: var(--ink);
  border-radius: var(--r); overflow: hidden;
  box-shadow: 0 1px 0 var(--hair);
  border: 1px solid var(--line);
}
.panel__head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 15px 16px 13px;
  border-bottom: 1px solid var(--line);
}
.panel__title { font-weight: 700; font-size: 1.02rem; display: flex; align-items: center; gap: 10px; }
.panel__scope {
  font-family: var(--font-mono); font-size: 0.875rem; letter-spacing: .04em;
  color: var(--ink-2); border: 1px solid var(--line-2); padding: 2px 8px; border-radius: var(--pill);
  text-transform: uppercase;
}
.panel__count { font-family: var(--font-mono); font-weight: 600; font-size: 1.5rem; letter-spacing: -.02em; }

.panel__search {
  margin: 12px; display: flex; align-items: center; gap: 10px;
  background: var(--canvas); border: 1px solid var(--line); border-radius: 10px;
  padding: 0 12px; height: 44px;
}
.panel__searchicon { width: 18px; height: 18px; color: var(--ink-2); flex: none; }
.panel__input { flex: 1; border: none; background: none; outline: none; font-size: 0.95rem; }
.panel__input::placeholder { color: var(--ink-2); }
.panel__kbd {
  font-family: var(--font-mono); font-size: 0.875rem; color: var(--ink-2);
  border: 1px solid var(--line-2); border-radius: 6px; padding: 2px 7px; background: var(--surface);
}

.panel__list { list-style: none; padding: 0 8px; display: flex; flex-direction: column; gap: 2px; }
.tab {
  display: grid; grid-template-columns: 26px 1fr auto; align-items: center; gap: 11px;
  padding: 9px 10px; border-radius: 9px;
  transition: background .5s ease, opacity .5s ease, transform .5s ease, height .5s ease;
}
.tab:hover { background: var(--canvas); }
.tab__fav {
  width: 26px; height: 26px; border-radius: 7px;
  background: linear-gradient(var(--bezel-1), var(--bezel-3));
  border: 1px solid var(--line);
  display: grid; place-items: center;
  font-family: var(--font-mono); font-size: 0.875rem; font-weight: 600; color: var(--ink-2);
}
.tab__fav--on { background: var(--signal); color: var(--signal-ink); border-color: transparent; }
.tab__body { min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.tab__title { font-size: 1rem; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tab__domain { font-family: var(--font-mono); font-size: 0.875rem; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tab__badge {
  font-family: var(--font-mono); font-size: 0.875rem; letter-spacing: .04em; text-transform: uppercase;
  color: var(--ink-2); border: 1px solid var(--line-2); padding: 2px 7px; border-radius: var(--pill);
}
.tab--pinned .tab__badge { color: var(--ink-2); }
.tab--active {
  background: color-mix(in srgb, var(--signal) 10%, var(--surface));
  box-shadow: inset 3px 0 0 var(--signal);
}
.tab__badge--now { color: var(--signal); border-color: color-mix(in srgb, var(--signal) 50%, transparent); }

.panel__more {
  font-family: var(--font-mono); font-size: 0.875rem; color: var(--ink-2);
  padding: 8px 18px 4px; letter-spacing: .02em;
}
.panel__actions {
  display: grid; grid-template-columns: 1fr 1.25fr; gap: 8px;
  padding: 12px; border-top: 1px solid var(--line); margin-top: 6px;
}
.pbtn {
  height: 46px; border-radius: 10px; font-weight: 600; font-size: 0.95rem; cursor: pointer;
  border: 1px solid transparent; transition: transform .14s ease, box-shadow .16s ease, background .16s ease;
}
.pbtn:active { transform: translateY(1px); }
.pbtn--ghost { background: var(--canvas); border-color: var(--line-2); color: var(--ink); }
.pbtn--ghost:hover { border-color: var(--ink); }
.pbtn--signal { background: var(--signal); color: var(--signal-ink); box-shadow: 0 10px 22px -14px var(--signal); }
.pbtn--signal:hover { box-shadow: 0 14px 26px -12px var(--signal); }

/* Status readout — the machine confirms the save (LCD material) */
.readout {
  margin-top: 14px;
  display: flex; align-items: center; gap: 12px;
  background: var(--lcd); color: var(--lcd-ink);
  border-radius: var(--r); padding: 13px 16px;
  box-shadow: inset 0 1px 2px rgba(0,0,0,.5), inset 0 0 0 1px rgba(255,255,255,.04);
  font-family: var(--font-mono);
}
.readout__lamp {
  width: 9px; height: 9px; border-radius: 50%; background: var(--signal); flex: none;
  box-shadow: 0 0 10px 1px var(--signal);
  animation: pulse 2.4s ease-in-out infinite;
}
.readout__text { font-size: 0.875rem; letter-spacing: .06em; flex: 1; }
.readout__undo {
  background: transparent; border: 1px solid rgba(255,255,255,.24); color: var(--lcd-ink);
  border-radius: 8px; padding: 6px 13px; font-family: var(--font-mono); font-size: 0.875rem;
  letter-spacing: .04em; cursor: pointer; text-transform: uppercase;
}
.readout__undo:hover { border-color: var(--signal); color: var(--signal); }

.instrument__plate {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: 12px 4px 2px;
  font-family: var(--font-mono); font-size: 0.875rem; letter-spacing: .16em;
  text-transform: uppercase; color: var(--ink-2);
}
.instrument__proto { color: var(--signal); border: 1px solid color-mix(in srgb, var(--signal) 45%, transparent); padding: 2px 8px; border-radius: var(--pill); }

/* Instrument legend (datasheet caption under the device) */
.instrument__legend {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 22px;
  margin: 20px 0 0;
  font-family: var(--font-mono); font-size: 0.875rem; letter-spacing: .02em;
  color: var(--ink-2);
}
.instrument__legend span { position: relative; padding-left: 17px; white-space: nowrap; }
.instrument__legend span::before {
  content: ""; position: absolute; left: 0; top: 50%;
  width: 7px; height: 7px; border-left: 2px solid var(--signal); border-top: 2px solid var(--signal);
  transform: translateY(-50%) rotate(45deg);
}

@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .45; } }

/* --- 02 Proof ------------------------------------------------------------- */
.section--proof { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.proof__head { max-width: 720px; }
.evidence {
  list-style: none; padding: 0; margin: clamp(38px, 5vw, 60px) 0 0;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px;
  background: var(--line); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden;
}
.evi { background: var(--surface); padding: 22px 20px; display: flex; flex-direction: column; gap: 10px; }
.evi__status {
  align-self: flex-start; font-family: var(--font-mono); font-size: 0.875rem; letter-spacing: .12em;
  color: var(--signal); border: 1px solid color-mix(in srgb, var(--signal) 40%, transparent);
  padding: 3px 9px; border-radius: var(--pill);
}
.evi__name { font-weight: 700; font-size: 1.06rem; letter-spacing: -.01em; }
.evi__note { color: var(--ink-2); font-size: 0.92rem; line-height: 1.45; }
.proof__foot { margin-top: 26px; color: var(--ink-2); max-width: 68ch; font-size: 0.98rem; }

/* --- 03 Recognition ------------------------------------------------------- */
.section--recognition { background: var(--canvas); }
.recognition { text-align: left; }
.recognition .headline--big { margin-top: 20px; }
.recognition__body {
  margin-top: 40px; display: grid; grid-template-columns: repeat(2, minmax(0, 30ch));
  gap: 26px 56px; color: var(--ink);
}
.recognition__body p { font-size: 1.12rem; line-height: 1.55; }

/* --- 04 Two actions ------------------------------------------------------- */
.actions-split {
  margin-top: clamp(40px, 5vw, 64px);
  display: grid; grid-template-columns: 1fr 1fr; gap: clamp(16px, 2.4vw, 28px);
}
.control {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: clamp(26px, 3vw, 40px); box-shadow: var(--shadow-card);
  position: relative; overflow: hidden;
}
.control--signal { border-color: color-mix(in srgb, var(--signal) 34%, var(--line)); }
.control--signal::after {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: var(--signal);
}
.control__key {
  width: 58px; height: 58px; border-radius: 15px; display: grid; place-items: center;
  background: linear-gradient(var(--bezel-1), var(--bezel-3)); border: 1px solid var(--line-2);
  color: var(--signal); margin-bottom: 24px; box-shadow: inset 0 1px 0 var(--hair);
}
.control__key--ghost { color: var(--ink); }
.control__key svg { width: 28px; height: 28px; }
.control__name { font-size: 1.5rem; font-weight: 800; letter-spacing: -.02em; margin-bottom: 12px; }
.control__copy { color: var(--ink-2); font-size: 1.02rem; line-height: 1.55; max-width: 44ch; }

/* --- 05 Current search ---------------------------------------------------- */
.search-block { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: clamp(30px, 5vw, 72px); align-items: center; }
.search-demo {
  margin-top: 34px; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 20px; box-shadow: var(--shadow-card);
}
.search-demo__field {
  display: flex; align-items: center; gap: 2px; background: var(--canvas);
  border: 1px solid var(--line-2); border-radius: 10px; padding: 12px 15px; height: 48px;
  font-family: var(--font-mono); font-size: 1rem;
}
.search-demo__caret { width: 2px; height: 20px; background: var(--signal); animation: blink 1.1s steps(1) infinite; }
.search-demo__result {
  margin-top: 12px; display: grid; grid-template-columns: 26px 1fr auto; align-items: center; gap: 12px;
  padding: 13px 14px; border-radius: 11px;
  background: color-mix(in srgb, var(--signal) 9%, var(--surface));
  box-shadow: inset 3px 0 0 var(--signal);
}
.search-demo__there { font-family: var(--font-mono); font-size: 0.875rem; color: var(--signal); letter-spacing: .02em; }
.search-demo__caption { margin-top: 16px; color: var(--ink-2); font-size: 0.92rem; line-height: 1.5; }

.search-block__aside { display: flex; justify-content: center; }
.minipanel {
  width: 100%; max-width: 320px; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 16px; display: flex; flex-direction: column; gap: 10px;
  box-shadow: var(--shadow-card);
}
.minipanel__row { display: flex; align-items: center; gap: 12px; height: 38px; }
.minipanel__row span:first-child { width: 24px; height: 24px; border-radius: 6px; background: var(--canvas-2); flex: none; }
.minipanel__row span:last-child { height: 9px; border-radius: 5px; background: var(--canvas-2); flex: 1; }
.minipanel__row--dim { opacity: .4; }
.minipanel__row--hit span:first-child { background: var(--signal); }
.minipanel__row--hit span:last-child { background: color-mix(in srgb, var(--signal) 40%, var(--canvas-2)); }
.minipanel__row--hit { box-shadow: inset 3px 0 0 var(--signal); border-radius: 8px; padding-left: 8px; margin-left: -8px; }

/* --- 06 Retrieval --------------------------------------------------------- */
.tiers { margin-top: clamp(36px, 4vw, 52px); display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.tier-note { border: 1px solid var(--line); border-radius: var(--r); padding: 22px; background: var(--surface); }
.tier-note--planned { border-style: dashed; }
.tier-note__k { display: flex; align-items: center; gap: 8px; font-weight: 700; margin-bottom: 10px; font-size: 1.05rem; }
.tier-note__k i { font-style: normal; font-family: var(--font-mono); font-size: 0.875rem; text-transform: uppercase; letter-spacing: .1em; color: var(--signal); border: 1px solid color-mix(in srgb, var(--signal) 40%, transparent); border-radius: var(--pill); padding: 2px 7px; }
.tier-note p { color: var(--ink-2); font-size: 0.95rem; line-height: 1.5; }
.query-examples { list-style: none; padding: 0; margin: 26px 0 0; display: flex; flex-wrap: wrap; gap: 12px; }
.query-examples li {
  display: inline-flex; align-items: center; gap: 10px; font-size: 1.02rem; color: var(--ink);
  border: 1px solid var(--line); border-radius: var(--pill); padding: 9px 16px 9px 10px; background: var(--surface);
}
.query-examples__tag { font-family: var(--font-mono); font-size: 0.875rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); background: var(--canvas); border-radius: var(--pill); padding: 3px 8px; }

/* --- 07 Organisation ------------------------------------------------------ */
.section--org { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.org { display: grid; grid-template-columns: 1fr 0.95fr; gap: clamp(30px, 5vw, 72px); align-items: center; }
.org__states { display: flex; flex-direction: column; gap: 12px; }
.orgstate { border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px; background: var(--canvas); }
.orgstate__tag { font-family: var(--font-mono); font-size: 0.875rem; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-2); display: block; margin-bottom: 12px; }
.orgstate--accepted { border-color: color-mix(in srgb, var(--signal) 35%, var(--line)); }
.orgstate__bars { display: flex; gap: 8px; }
.orgstate__bars i { height: 26px; flex: 1; border-radius: 6px; background: var(--canvas-2); border: 1px solid var(--line); }
.orgstate__bars--grouped i:nth-child(1), .orgstate__bars--grouped i:nth-child(2) { background: color-mix(in srgb, var(--ink) 8%, var(--canvas-2)); }
.orgstate__bars--grouped i:nth-child(4), .orgstate__bars--grouped i:nth-child(5) { transform: translateY(-3px); }
.orgstate__bars--on i:nth-child(1), .orgstate__bars--on i:nth-child(2) { background: color-mix(in srgb, var(--signal) 26%, var(--canvas)); border-color: color-mix(in srgb, var(--signal) 40%, transparent); }

/* --- 08 Fork / permissions ------------------------------------------------ */
.fork { margin-top: clamp(36px, 4vw, 52px); display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.fork__side { border: 1px solid var(--line); border-radius: var(--r-lg); padding: clamp(24px, 3vw, 36px); background: var(--surface); }
.fork__name { font-size: 1.3rem; font-weight: 800; letter-spacing: -.02em; margin-bottom: 14px; display: flex; align-items: center; gap: 12px; }
.fork__side p { color: var(--ink-2); line-height: 1.6; }
.permissions { margin-top: 24px; border: 1px solid var(--line); border-left: 3px solid var(--signal); border-radius: var(--r); padding: 24px clamp(22px, 3vw, 32px); background: var(--surface); }
.permissions__title { font-weight: 700; margin-bottom: 14px; font-size: 1.05rem; }
.permissions ul { margin: 0 0 14px; padding-left: 20px; color: var(--ink-2); display: flex; flex-direction: column; gap: 8px; line-height: 1.5; }
.permissions__foot { color: var(--ink-2); font-size: 0.92rem; line-height: 1.55; }

/* --- 09 AI ---------------------------------------------------------------- */
.section--ai { background: var(--canvas); }
.ai .lede { margin-top: 26px; }
.ai__stamp { margin-top: 26px; display: inline-flex; align-items: center; gap: 12px; color: var(--ink-2); font-family: var(--font-mono); font-size: 0.9rem; }

/* --- 10 Pricing ----------------------------------------------------------- */
.section--pricing { background: var(--surface); border-top: 1px solid var(--line); }
.pricing { margin-top: clamp(40px, 5vw, 60px); display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; align-items: start; }
.tier { border: 1px solid var(--line); border-radius: var(--r-lg); padding: clamp(24px, 2.6vw, 34px); background: var(--canvas); position: relative; }
.tier--featured { background: var(--surface); border-color: color-mix(in srgb, var(--signal) 40%, var(--line)); box-shadow: var(--shadow-card); transform: translateY(-8px); }
.tier__flag { position: absolute; top: -12px; left: clamp(24px, 2.6vw, 34px); font-family: var(--font-mono); font-size: 0.875rem; letter-spacing: .1em; text-transform: uppercase; color: var(--signal-ink); background: var(--signal); padding: 4px 11px; border-radius: var(--pill); }
.tier__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.tier__name { font-size: 1.3rem; font-weight: 800; letter-spacing: -.02em; display: flex; align-items: center; gap: 9px; }
.price { font-family: var(--font-mono); display: flex; align-items: baseline; gap: 2px; }
.price b { font-size: 1.8rem; font-weight: 600; letter-spacing: -.02em; }
.price span { color: var(--ink-2); font-size: 0.9rem; }
.tier__for { color: var(--ink-2); font-size: 0.95rem; line-height: 1.5; min-height: 3em; margin-bottom: 20px; }
.tier__list { list-style: none; padding: 0; margin: 0 0 26px; display: flex; flex-direction: column; gap: 11px; }
.tier__list li { position: relative; padding-left: 26px; font-size: 0.98rem; line-height: 1.4; }
.tier__list li::before { content: ""; position: absolute; left: 0; top: 7px; width: 12px; height: 8px; border-left: 2px solid var(--signal); border-bottom: 2px solid var(--signal); transform: rotate(-45deg); }
.pricing__foot { margin-top: 30px; color: var(--ink-2); font-size: 0.95rem; line-height: 1.6; max-width: 84ch; }

/* --- 11 FAQ --------------------------------------------------------------- */
.section--faq { background: var(--canvas); }
.faq { display: grid; grid-template-columns: 0.7fr 1.3fr; gap: clamp(30px, 5vw, 64px); align-items: start; }
.faq__head { position: sticky; top: 96px; }
.faq__list { display: flex; flex-direction: column; }
.faq details { border-top: 1px solid var(--line-2); }
.faq details:last-child { border-bottom: 1px solid var(--line-2); }
.faq summary {
  list-style: none; cursor: pointer; padding: 22px 44px 22px 0; position: relative;
  font-weight: 600; font-size: 1.16rem; letter-spacing: -.01em; line-height: 1.35;
}
.faq summary::-webkit-details-marker { display: none; }
.faq__plus { position: absolute; right: 4px; top: 26px; width: 16px; height: 16px; }
.faq__plus::before, .faq__plus::after { content: ""; position: absolute; background: var(--signal); border-radius: 2px; transition: transform .22s ease, opacity .22s ease; }
.faq__plus::before { left: 7px; top: 0; width: 2px; height: 16px; }
.faq__plus::after { top: 7px; left: 0; height: 2px; width: 16px; }
.faq details[open] .faq__plus::before { transform: rotate(90deg); opacity: 0; }
.faq details p { padding: 0 44px 24px 0; color: var(--ink-2); font-size: 1.02rem; line-height: 1.6; max-width: 62ch; }

/* --- 12 Final / signup ---------------------------------------------------- */
.section--final {
  background:
    radial-gradient(80% 120% at 50% 0%, color-mix(in srgb, var(--signal) 10%, transparent), transparent 55%),
    var(--canvas);
  border-top: 1px solid var(--line); text-align: center;
}
.final { display: flex; flex-direction: column; align-items: center; }
.final .eyebrow { margin-bottom: 30px; }
.final__copy { margin-top: 26px; font-size: 1.2rem; color: var(--ink-2); }
.signup { margin-top: 40px; width: 100%; max-width: 560px; }
.signup__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.signup__row { display: flex; gap: 10px; }
.signup__input {
  flex: 1; height: 58px; border-radius: var(--r); border: 1px solid var(--line-2);
  background: var(--surface); padding: 0 18px; font-size: 1.05rem;
}
.signup__input::placeholder { color: var(--ink-2); }
.signup__micro { margin-top: 16px; font-family: var(--font-mono); font-size: 0.875rem; color: var(--ink-2); letter-spacing: .01em; }
.signup__micro--ok { color: var(--signal); }

/* --- Footer --------------------------------------------------------------- */
.footer { background: var(--surface); border-top: 1px solid var(--line); padding: clamp(48px, 6vw, 72px) 0 30px; }
.footer__inner { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.footer__brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); }
.footer__line { color: var(--ink-2); font-size: 1.02rem; }
.footer__nav { margin-left: auto; display: flex; gap: 22px; }
.footer__nav a { color: var(--ink-2); font-size: 0.96rem; }
.footer__nav a:hover { color: var(--signal); }
.footer__base { max-width: var(--maxw); margin: 30px auto 0; padding: 22px var(--gutter) 0; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 16px; font-family: var(--font-mono); font-size: 0.875rem; letter-spacing: .04em; color: var(--ink-2); text-transform: uppercase; flex-wrap: wrap; }
.footer__proto { color: var(--signal); }

/* --- Motion / reveal ------------------------------------------------------ */
@keyframes blink { 50% { opacity: 0; } }
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s cubic-bezier(.2,.7,.2,1), transform .7s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }

/* Untangle demonstration */
.tab.is-clearing { opacity: 0; transform: translateX(14px); height: 0; padding-top: 0; padding-bottom: 0; overflow: hidden; }
.panel.is-cleared .panel__more { opacity: 0; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .readout__lamp, .search-demo__caret { animation: none; }
  .tab, .btn, .pbtn { transition: none; }
  * { scroll-behavior: auto !important; }
}

/* --- Responsive: tablet --------------------------------------------------- */
@media (max-width: 1000px) {
  .nav__links { display: none; }
  .nav__cta { display: none; }
  .nav__menu { display: flex; }
  .nav__actions { margin-left: auto; }
  .theme-toggle { display: none; }

  .hero__grid { grid-template-columns: 1fr; gap: 48px; }
  .hero__stage { order: 2; }
  .hero__copy { order: 1; max-width: 640px; }
  .instrument { transform: none; width: min(100%, 520px); }

  .search-block, .org, .faq { grid-template-columns: 1fr; }
  .search-block__aside { display: none; }
  .faq__head { position: static; }
  .recognition__body { grid-template-columns: 1fr; }

  .evidence { grid-template-columns: 1fr 1fr; }
  .actions-split, .fork { grid-template-columns: 1fr; }
  .tiers { grid-template-columns: 1fr; }
  .pricing { grid-template-columns: 1fr; }
  .tier--featured { transform: none; }
}

/* --- Mobile menu open ----------------------------------------------------- */
.nav__mobile.is-open {
  display: flex; flex-direction: column; gap: 4px;
  padding: 10px var(--gutter) 22px; border-top: 1px solid var(--line);
  background: var(--canvas);
}
.nav__mobile.is-open a { padding: 14px 0; font-size: 1.1rem; font-weight: 600; border-bottom: 1px solid var(--line); }
.nav__mobile.is-open a.btn { border-bottom: none; margin-top: 12px; color: var(--signal-ink); }

/* --- Responsive: phone (390 and down) ------------------------------------- */
@media (max-width: 560px) {
  :root { --gutter: 20px; }
  .section { padding: 64px 0; }
  .hero { padding: 30px 0 60px; }
  .hero__cta { gap: 14px; }
  .hero__cta .btn--signal { width: 100%; }
  .evidence { grid-template-columns: 1fr; }
  .instrument__bezel { padding: 14px; }
  .panel__actions { grid-template-columns: 1fr 1.3fr; }
  .signup__row { flex-direction: column; }
  .signup__input { width: 100%; }
  .footer__inner { flex-direction: column; align-items: flex-start; gap: 16px; }
  .footer__nav { margin-left: 0; flex-wrap: wrap; }
  .recognition__body p { font-size: 1.05rem; }
  .instrument { width: 100%; }
  .instrument__legend { display: none; }
}

/* Print / no-JS graceful: reveal always visible if JS absent */
.no-js .reveal { opacity: 1; transform: none; }
