/* ============================================================
   Telvi — institutional memory infrastructure
   Editorial dark schematic. Flat vector, no nebula glow.
   ============================================================ */

:root {
  --bg: #08090b;
  --bg-2: #0e1013;
  --bg-3: #14171c;
  --panel: #101317;
  --ink: #f2f3f5;
  --muted: rgba(242, 243, 245, 0.66);
  --faint: rgba(242, 243, 245, 0.4);
  --line: rgba(242, 243, 245, 0.11);
  --line-2: rgba(242, 243, 245, 0.055);

  /* engram = amber; the one hero accent */
  --engram: #e3a455;
  --ok: #3fbf9e;
  --warn: #d9594e;

  /* source hues, distinguishable, no brand logos */
  --s-code: #8fa3b8;
  --s-docs: #4a90d9;
  --s-tickets: #7a6fe0;
  --s-chat: #d9598b;
  --s-people: #4fbf9a;

  --max: 1160px;
  --display: "Syne", sans-serif;
  --sans: "Instrument Sans", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --r: 0.5rem;
  --r-lg: 0.875rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

code {
  font-family: var(--mono);
  font-size: 0.88em;
  color: var(--engram);
}

:focus-visible {
  outline: 2px solid var(--engram);
  outline-offset: 3px;
  border-radius: 2px;
}

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  background: var(--ink);
  color: var(--bg);
  padding: 0.5rem 0.8rem;
  border-radius: var(--r);
  font-family: var(--mono);
  font-size: 0.82rem;
  text-decoration: none;
}

.skip:focus {
  top: 1rem;
}

.wrap {
  width: min(100% - 2.5rem, var(--max));
  margin-inline: auto;
}

/* ---------- type primitives ---------- */

.kicker {
  margin: 0 0 0.9rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--engram);
}

.kicker.light {
  color: rgba(8, 9, 11, 0.72);
}

h1 {
  margin: 0 0 1.15rem;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(2.1rem, 5.4vw, 3.65rem);
  line-height: 1.04;
  letter-spacing: -0.022em;
}

h1 em {
  font-style: italic;
  color: var(--engram);
}

h2 {
  margin: 0 0 1rem;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(1.65rem, 3.4vw, 2.45rem);
  line-height: 1.12;
  letter-spacing: -0.018em;
}

h3 {
  margin: 0 0 0.4rem;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.14rem;
  letter-spacing: -0.008em;
}

.sub {
  margin: 0 0 2.4rem;
  max-width: 46rem;
  color: var(--muted);
  font-size: 1.0625rem;
}

.mono-xs {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
}

/* ---------- source dots ---------- */

.src {
  display: inline-block;
  flex: none;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--s-code);
}

.src.code { background: var(--s-code); }
.src.docs { background: var(--s-docs); }
.src.tickets { background: var(--s-tickets); }
.src.chat { background: var(--s-chat); }
.src.people { background: var(--s-people); }

.tag {
  display: inline-block;
  padding: 0.14rem 0.45rem;
  border-radius: 3px;
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.tag-engram {
  background: rgba(227, 164, 85, 0.14);
  color: var(--engram);
  border: 1px solid rgba(227, 164, 85, 0.32);
}

.tag-ok {
  background: rgba(63, 191, 158, 0.12);
  color: var(--ok);
  border: 1px solid rgba(63, 191, 158, 0.28);
}

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.62rem 1.05rem;
  border-radius: var(--r);
  border: 1px solid transparent;
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.02em;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.btn-solid {
  background: var(--ink);
  color: var(--bg);
}

.btn-solid:hover {
  transform: translateY(-1px);
  background: #fff;
}

.btn-line {
  border-color: var(--line);
  color: var(--ink);
  background: transparent;
}

.btn-line:hover {
  border-color: var(--engram);
  color: var(--engram);
}

.btn-lg {
  padding: 0.85rem 1.5rem;
  font-size: 0.88rem;
}

.btn-sm {
  padding: 0.4rem 0.7rem;
  font-size: 0.72rem;
}

/* ---------- header ---------- */

.top {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(8, 9, 11, 0.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line-2);
}

.top-inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  height: 3.9rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.08rem;
  letter-spacing: -0.01em;
}

.brand img {
  width: 1.75rem;
  height: 1.75rem;
}

.nav {
  display: none;
  gap: 1.5rem;
}

.nav a {
  font-family: var(--mono);
  font-size: 0.76rem;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.16s ease;
}

.nav a:hover {
  color: var(--engram);
}

.top .btn {
  margin-left: auto;
}

@media (min-width: 900px) {
  .nav {
    display: flex;
    margin-left: auto;
  }

  .top .btn {
    margin-left: 0;
  }
}

/* ---------- hero ---------- */

.hero {
  padding: clamp(3rem, 7vw, 5rem) 0 0;
  border-bottom: 1px solid var(--line-2);
}

.hero-copy {
  margin-bottom: clamp(2.25rem, 5vw, 3.25rem);
}

.lead {
  margin: 0 0 0.85rem;
  max-width: 38rem;
  color: var(--muted);
  font-size: 1.1rem;
}

.lead-2 {
  margin: 0 0 1.9rem;
  max-width: 38rem;
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--ink);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

/* definitions strip */

.defs {
  margin-top: clamp(3rem, 7vw, 5rem);
  padding: 1.9rem 0 2.2rem;
  border-top: 1px solid var(--line-2);
}

.defs-intro {
  margin: 0 0 1.25rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
}

.defs dl {
  display: grid;
  gap: 1.25rem;
  margin: 0;
}

@media (min-width: 800px) {
  .defs dl {
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
  }
}

.defs dt {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.08rem;
}

.dt-mark {
  width: 0.75rem;
  height: 0.75rem;
  flex: none;
}

.dt-mark.engram {
  background: var(--engram);
  clip-path: polygon(50% 0, 93% 25%, 93% 75%, 50% 100%, 7% 75%, 7% 25%);
}

.dt-mark.cerebrum {
  border: 2px solid var(--engram);
  border-radius: 50%;
}

.dt-mark.telvi {
  border: 2px solid var(--ink);
  border-radius: 2px;
}

.defs dd {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

/* ---------- bands ---------- */

.band {
  padding: clamp(3.5rem, 8vw, 6rem) 0;
  border-bottom: 1px solid var(--line-2);
}

.band-alt {
  background: var(--bg-2);
}

/* ---------- shards ---------- */

.the-question {
  margin: 0 0 1.6rem;
  padding: 0.9rem 1.1rem;
  border: 1px solid var(--line);
  border-left: 3px solid var(--engram);
  border-radius: 0 var(--r) var(--r) 0;
  background: var(--panel);
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.15rem;
}

.the-question .mono-xs {
  display: block;
  margin-bottom: 0.2rem;
}

.shards {
  display: grid;
  gap: 0.75rem;
  margin: 0 0 1.9rem;
  padding: 0;
  list-style: none;
}

@media (min-width: 720px) {
  .shards {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1060px) {
  .shards {
    grid-template-columns: repeat(5, 1fr);
    gap: 0.65rem;
  }
}

.shards li {
  display: flex;
  flex-direction: column;
  padding: 1.05rem 1rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--panel);
}

.shard-src {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.7rem;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.shard-has {
  margin: 0 0 0.6rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px dashed var(--line);
  font-size: 0.92rem;
  font-weight: 500;
}

.shard-missing {
  margin: 0;
  font-size: 0.88rem;
  color: var(--faint);
}

.verdict {
  margin: 0;
  max-width: 44rem;
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(1.1rem, 2.2vw, 1.4rem);
  line-height: 1.35;
  color: var(--muted);
}

.verdict strong {
  color: var(--engram);
}

/* ---------- engram anatomy ---------- */

.anatomy {
  display: grid;
  gap: 1.5rem;
  align-items: start;
}

@media (min-width: 1000px) {
  .anatomy {
    grid-template-columns: 1.35fr 0.65fr;
    gap: 2rem;
  }
}

.anatomy-card {
  border: 1px solid rgba(227, 164, 85, 0.26);
  border-radius: var(--r-lg);
  background: linear-gradient(180deg, #12151a, #0d0f13);
  overflow: hidden;
}

.ac-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 0.85rem 1.15rem;
  border-bottom: 1px solid var(--line);
  background: rgba(227, 164, 85, 0.045);
}

.ac-head > div {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.ac-row {
  padding: 1.05rem 1.15rem;
  border-bottom: 1px solid var(--line-2);
}

.ac-label {
  display: block;
  margin-bottom: 0.35rem;
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--engram);
}

.ac-row > p {
  margin: 0;
  font-size: 1rem;
}

.ac-row:first-of-type > p {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.28rem;
  line-height: 1.25;
}

.ac-ev {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.3rem;
}

.ac-ev li {
  display: grid;
  grid-template-columns: 0.5rem 1fr auto;
  align-items: center;
  gap: 0.6rem;
  padding: 0.45rem 0.6rem;
  border: 1px solid var(--line-2);
  border-radius: 4px;
  background: rgba(242, 243, 245, 0.02);
  font-size: 0.92rem;
  transition: opacity 0.2s ease, border-color 0.2s ease;
}

.ac-ev li em {
  font-style: normal;
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--faint);
}

.ac-ev li.stale {
  border-color: rgba(217, 89, 78, 0.3);
}

.ac-ev li.stale em {
  color: var(--warn);
}

.ac-ev li.dim {
  opacity: 0.24;
}

.ac-foot {
  display: grid;
  gap: 1rem;
  padding: 1.05rem 1.15rem 1.15rem;
}

@media (min-width: 640px) {
  .ac-foot {
    grid-template-columns: repeat(3, 1fr);
  }
}

.ac-foot p {
  margin: 0;
  font-size: 0.92rem;
  color: var(--muted);
}

.anatomy-side {
  padding: 1.25rem 1.2rem;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--panel);
}

.as-title {
  margin: 0 0 0.75rem;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--faint);
}

.src-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 1.15rem;
}

.src-filter button {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.6rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.7rem;
  cursor: pointer;
  transition: border-color 0.16s ease, color 0.16s ease, background 0.16s ease;
}

.src-filter button:hover {
  border-color: rgba(242, 243, 245, 0.3);
  color: var(--ink);
}

.src-filter button[aria-pressed="true"] {
  border-color: var(--engram);
  color: var(--engram);
  background: rgba(227, 164, 85, 0.08);
}

.as-note {
  margin: 0 0 1.15rem;
  padding-top: 1.15rem;
  border-top: 1px dashed var(--line);
  font-size: 0.95rem;
  color: var(--muted);
}

.as-note strong {
  color: var(--ink);
}

.as-props {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.55rem;
}

.as-props li {
  font-size: 0.9rem;
  color: var(--faint);
}

.as-props strong {
  color: var(--ink);
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* ---------- cerebrum stage ---------- */

.stage {
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: #0a0c0f;
  overflow: hidden;
}

.stage-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 0.75rem 1.05rem;
  border-bottom: 1px solid var(--line);
  background: rgba(242, 243, 245, 0.015);
}

.stage-title {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.live-dot {
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 50%;
  background: var(--ok);
  animation: live-pulse 2s ease-in-out infinite;
}

@keyframes live-pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.25;
  }
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.legend li {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--faint);
}

.legend .hex {
  display: inline-block;
  width: 0.7rem;
  height: 0.7rem;
  background: var(--engram);
  clip-path: polygon(50% 0, 93% 25%, 93% 75%, 50% 100%, 7% 75%, 7% 25%);
}

.stage-body {
  display: grid;
}

@media (min-width: 1020px) {
  .stage-body {
    grid-template-columns: 1fr 22.5rem;
  }
}

.canvas-wrap {
  min-width: 0;
  overflow: hidden;
}

#cerebrum-canvas {
  display: block;
  width: 100%;
}

/* live engram panel */

.live {
  display: flex;
  flex-direction: column;
  padding: 1.15rem 1.15rem 1.25rem;
  border-top: 1px solid var(--line);
  background: rgba(242, 243, 245, 0.012);
}

@media (min-width: 1020px) {
  .live {
    border-top: 0;
    border-left: 1px solid var(--line);
  }
}

.live-q {
  margin: 0 0 0.95rem;
  padding-bottom: 0.95rem;
  border-bottom: 1px dashed var(--line);
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.02rem;
  line-height: 1.3;
}

.live-q .mono-xs {
  display: block;
  margin-bottom: 0.25rem;
}

.live-q .mono-xs b {
  font-weight: 500;
  color: var(--engram);
}

.live-steps {
  display: flex;
  gap: 0.35rem;
  margin: 0 0 1rem;
  padding: 0;
  list-style: none;
  min-height: 2.1rem;
}

.live-steps li {
  flex: 1;
  padding: 0.35rem 0.4rem 0.4rem;
  border-top: 2px solid var(--line);
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--faint);
  transition: color 0.25s ease, border-color 0.25s ease;
}

.live-steps li span {
  display: block;
  font-size: 0.72rem;
  color: inherit;
}

.live-steps li.on {
  border-top-color: var(--engram);
  color: var(--engram);
}

.live-steps li.done {
  border-top-color: rgba(227, 164, 85, 0.5);
  color: var(--muted);
}

.live-card {
  min-height: 15rem;
}

.live-card.swap {
  animation: card-in 0.45s var(--ease, ease) both;
}

@keyframes card-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.lc-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.7rem;
}

.lc-claim {
  margin: 0 0 0.75rem;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.16rem;
  line-height: 1.28;
}

.lc-why {
  margin: 0 0 0.9rem;
  padding-left: 0.8rem;
  border-left: 2px solid rgba(227, 164, 85, 0.45);
  font-size: 0.92rem;
  color: var(--muted);
}

.lc-why b {
  display: block;
  margin-bottom: 0.15rem;
  font-family: var(--mono);
  font-size: 0.64rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--engram);
}

.lc-ev {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0;
  padding: 0.9rem 0 0;
  list-style: none;
  border-top: 1px dashed var(--line);
}

.lc-ev li {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.5rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 0.66rem;
  color: var(--muted);
}

.lc-done {
  margin: 0.9rem 0 0;
  padding-top: 0.9rem;
  border-top: 1px dashed var(--line);
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  color: var(--ok);
}

.stage-note {
  margin: 1.15rem 0 0;
  max-width: 44rem;
  font-size: 0.93rem;
  color: var(--faint);
}

/* ---------- ask rows (the gap) ---------- */

.ask-kind {
  display: inline-block;
  align-self: start;
  padding: 0.16rem 0.42rem;
  border: 1px solid rgba(227, 164, 85, 0.35);
  border-radius: 3px;
  background: rgba(227, 164, 85, 0.09);
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--engram);
}

.asks {
  display: grid;
  gap: 0.6rem;
  margin: 0 0 1.9rem;
  padding: 0;
  list-style: none;
}

.asks > li {
  display: grid;
  gap: 0.35rem 1rem;
  align-items: center;
  padding: 1rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--panel);
}

@media (min-width: 900px) {
  .asks > li {
    grid-template-columns: 3.6rem minmax(0, 1.15fr) minmax(0, 1.25fr) 9.5rem;
  }
}

.ask-q {
  margin: 0;
  font-weight: 600;
  font-size: 0.98rem;
}

.ask-where {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
}

.ask-cost {
  margin: 0;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--warn);
}

@media (min-width: 900px) {
  .ask-cost {
    text-align: right;
  }
}

/* ---------- ask cards (queryable) ---------- */

.askgrid {
  display: grid;
  gap: 0.8rem;
}

@media (min-width: 760px) {
  .askgrid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1080px) {
  .askgrid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.askcard {
  display: flex;
  flex-direction: column;
  padding: 1.2rem 1.15rem 1.25rem;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--panel);
}

.askcard .ask-kind {
  margin-bottom: 0.8rem;
}

.askcard h3 {
  margin-bottom: 0.9rem;
  font-size: 1.08rem;
  line-height: 1.3;
}

.hoplist {
  display: grid;
  gap: 0.4rem;
  margin: 0 0 1rem;
  padding: 0;
  list-style: none;
}

.hoplist li {
  display: grid;
  grid-template-columns: 1.5rem 1fr;
  gap: 0.15rem 0.5rem;
  padding: 0.45rem 0.55rem;
  border: 1px solid var(--line-2);
  border-left: 2px solid rgba(227, 164, 85, 0.55);
  border-radius: 0 3px 3px 0;
  background: rgba(242, 243, 245, 0.02);
}

.hoplist i {
  font-style: normal;
  font-family: var(--mono);
  font-size: 0.66rem;
  color: var(--engram);
  padding-top: 0.1rem;
}

.hoplist span {
  font-family: var(--mono);
  font-size: 0.76rem;
  color: var(--ink);
}

.hoplist em {
  grid-column: 2;
  font-style: normal;
  font-size: 0.85rem;
  color: var(--faint);
}

.askcard-body {
  margin: 0 0 1rem;
  font-size: 0.93rem;
  color: var(--muted);
}

.askcard-out {
  margin: auto 0 0;
  padding-top: 0.85rem;
  border-top: 1px dashed var(--line);
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.03em;
  color: var(--faint);
}

.askcard-gap {
  border-color: rgba(63, 191, 158, 0.28);
  background: linear-gradient(180deg, rgba(63, 191, 158, 0.045), var(--panel));
}

.ask-kind-gap {
  border-color: rgba(63, 191, 158, 0.4);
  background: rgba(63, 191, 158, 0.1);
  color: var(--ok);
}

/* ---------- living strip ---------- */

.living {
  margin-top: 1.5rem;
  padding: 1.25rem 1.2rem 1.3rem;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: rgba(242, 243, 245, 0.015);
}

.living-title {
  margin: 0 0 1.1rem;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--faint);
}

.living ul {
  display: grid;
  gap: 0.9rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 860px) {
  .living ul {
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
  }
}

.living li {
  font-size: 0.9rem;
  color: var(--muted);
}

.living li strong {
  display: block;
  margin-bottom: 0.2rem;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

/* ---------- steps ---------- */

.steps {
  display: grid;
  gap: 0.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 780px) {
  .steps {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1080px) {
  .steps {
    grid-template-columns: repeat(4, 1fr);
  }
}

.steps li {
  padding: 1.2rem 1.1rem 1.25rem;
  border: 1px solid var(--line);
  border-top: 2px solid rgba(227, 164, 85, 0.45);
  border-radius: 0 0 var(--r) var(--r);
  background: var(--panel);
}

.step-n {
  display: block;
  margin-bottom: 0.75rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--engram);
}

.steps p {
  margin: 0;
  font-size: 0.93rem;
  color: var(--muted);
}

/* ---------- agents compare ---------- */

.compare {
  display: grid;
  gap: 0.9rem;
  margin-bottom: 1.5rem;
}

@media (min-width: 860px) {
  .compare {
    grid-template-columns: repeat(2, 1fr);
  }
}

.cmp {
  display: flex;
  flex-direction: column;
  padding: 1.25rem 1.2rem 1.3rem;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--panel);
}

.cmp-bad {
  border-color: rgba(217, 89, 78, 0.28);
}

.cmp-good {
  border-color: rgba(63, 191, 158, 0.3);
}

.cmp-tag {
  display: inline-block;
  align-self: flex-start;
  margin-bottom: 0.9rem;
  padding: 0.18rem 0.5rem;
  border-radius: 3px;
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.cmp-bad .cmp-tag {
  background: rgba(217, 89, 78, 0.12);
  color: var(--warn);
}

.cmp-good .cmp-tag {
  background: rgba(63, 191, 158, 0.12);
  color: var(--ok);
}

.cmp-task {
  margin: 0 0 0.75rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px dashed var(--line);
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--ink);
}

.cmp-out {
  margin: 0 0 1.1rem;
  font-size: 0.96rem;
  color: var(--muted);
}

.cmp-verdict {
  margin-top: auto;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.05rem;
}

.cmp-bad .cmp-verdict {
  color: var(--warn);
}

.cmp-good .cmp-verdict {
  color: var(--ok);
}

.agents-note {
  margin: 0;
  max-width: 44rem;
  font-size: 0.95rem;
  color: var(--faint);
}

/* ---------- proof ---------- */

.proof-grid {
  display: grid;
  gap: 0.9rem;
  margin-bottom: 2.25rem;
}

@media (min-width: 940px) {
  .proof-grid {
    grid-template-columns: 1.25fr 0.75fr;
  }
}

.bars-block,
.stat-block {
  padding: 1.3rem 1.25rem 1.4rem;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--panel);
}

.block-title {
  margin: 0 0 1.15rem;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--faint);
}

.bars {
  display: grid;
  gap: 0.55rem;
}

.bar {
  position: relative;
  display: flex;
  align-items: baseline;
  gap: 0.7rem;
  padding: 0.4rem 0.6rem;
  border-radius: 3px;
  overflow: hidden;
}

.bar::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--w);
  background: rgba(217, 89, 78, 0.16);
  border-right: 2px solid rgba(217, 89, 78, 0.55);
}

.bar-ok::before {
  background: rgba(63, 191, 158, 0.16);
  border-right-color: rgba(63, 191, 158, 0.6);
}

.bar strong {
  position: relative;
  font-family: var(--mono);
  font-size: 0.85rem;
  min-width: 2.6rem;
}

.bar span {
  position: relative;
  font-size: 0.9rem;
  color: var(--muted);
}

.block-foot {
  margin: 1.15rem 0 0;
  padding-top: 1.15rem;
  border-top: 1px dashed var(--line);
  font-size: 0.93rem;
  color: var(--muted);
}

.block-foot strong {
  color: var(--warn);
  font-family: var(--mono);
}

.stat-big {
  margin: 0;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(3rem, 8vw, 4.25rem);
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--engram);
}

.stat-big span {
  font-size: 0.45em;
  vertical-align: super;
}

.stat-cap {
  margin: 0.6rem 0 1.1rem;
  font-size: 0.95rem;
  color: var(--muted);
}

.stat-list {
  margin: 0;
  padding: 1.1rem 0 0;
  border-top: 1px dashed var(--line);
  list-style: none;
  display: grid;
  gap: 0.5rem;
}

.stat-list li {
  padding-left: 0.9rem;
  position: relative;
  font-size: 0.9rem;
  color: var(--faint);
}

.stat-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 0.35rem;
  height: 1px;
  background: var(--engram);
}

.metrics {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--line-2);
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
}

@media (min-width: 720px) {
  .metrics {
    grid-template-columns: repeat(6, 1fr);
  }
}

.metrics div {
  padding: 1.05rem 0.9rem;
  background: var(--bg-2);
}

.metrics strong {
  display: block;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
}

.metrics span {
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--faint);
}

.metrics-note {
  margin: 1.1rem 0 0;
  max-width: 42rem;
  font-size: 0.93rem;
  color: var(--faint);
}

/* ---------- contrast ---------- */

.contrast {
  display: grid;
  gap: 0.9rem;
}

@media (min-width: 900px) {
  .contrast {
    grid-template-columns: repeat(3, 1fr);
  }
}

.contrast article {
  display: flex;
  flex-direction: column;
  padding: 1.3rem 1.2rem 1.35rem;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--panel);
}

.contrast article > p {
  margin: 0 0 0.85rem;
  font-size: 0.95rem;
  color: var(--muted);
}

.c-fail,
.c-win {
  margin: auto 0 0 !important;
  padding-top: 0.9rem;
  border-top: 1px dashed var(--line);
  font-size: 0.92rem !important;
}

.c-fail {
  color: var(--warn) !important;
}

.c-win {
  color: var(--ok) !important;
}

.c-us {
  border-color: rgba(227, 164, 85, 0.34);
  background: linear-gradient(180deg, rgba(227, 164, 85, 0.05), var(--panel));
}

.c-us h3 {
  color: var(--engram);
}

/* ---------- future ---------- */

.future {
  display: grid;
  gap: 0.75rem;
}

@media (min-width: 720px) {
  .future {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1040px) {
  .future {
    grid-template-columns: repeat(4, 1fr);
  }
}

.future article {
  padding: 1.15rem 1.05rem 1.2rem;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--panel);
}

.future p {
  margin: 0;
  font-size: 0.92rem;
  color: var(--muted);
}

/* ---------- cta ---------- */

.cta {
  padding: clamp(3.5rem, 8vw, 5.5rem) 0;
  background: var(--engram);
  color: #08090b;
}

.cta-inner {
  max-width: 42rem;
  text-align: center;
}

.cta h2 {
  color: #08090b;
}

.cta > .wrap > p {
  margin: 0 auto 1.6rem;
  max-width: 34rem;
  color: rgba(8, 9, 11, 0.78);
}

.cta .btn-solid {
  background: #08090b;
  color: var(--engram);
}

.cta .btn-solid:hover {
  background: #000;
}

.cta-url {
  margin: 1rem 0 0 !important;
  font-family: var(--mono);
  font-size: 0.78rem;
  color: rgba(8, 9, 11, 0.6) !important;
}

/* ---------- contact ---------- */

.contact-grid {
  display: grid;
  gap: 2rem;
}

@media (min-width: 900px) {
  .contact-grid {
    grid-template-columns: 0.8fr 1.2fr;
  }
}

.contact-list {
  display: grid;
  gap: 1.15rem;
  margin: 0;
}

@media (min-width: 640px) {
  .contact-list {
    grid-template-columns: repeat(2, 1fr);
  }
}

.contact-list dt {
  margin-bottom: 0.25rem;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--engram);
}

.contact-list dd {
  margin: 0;
  font-size: 0.95rem;
  color: var(--muted);
}

.contact-list a {
  text-decoration: none;
  border-bottom: 1px solid var(--line);
}

.contact-list a:hover {
  color: var(--engram);
  border-color: var(--engram);
}

/* ---------- footer ---------- */

.foot {
  padding: 1.75rem 0;
}

.foot-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.foot-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--mono);
  font-size: 0.76rem;
  color: var(--faint);
}

.foot-brand img {
  width: 1.35rem;
  height: 1.35rem;
}

.foot p {
  margin: 0;
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--faint);
}

.foot-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.1rem;
}

.foot-nav a {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
}

.foot-nav a:hover {
  color: var(--engram);
  border-color: var(--engram);
}

/* ---------- document pages (legal, trust) ---------- */

.doc {
  padding: clamp(2.5rem, 6vw, 4rem) 0 clamp(3rem, 7vw, 5rem);
}

.doc-head {
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--line-2);
}

.doc-head h1 {
  max-width: 46rem;
  font-size: clamp(2rem, 4.6vw, 3rem);
}

.doc-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  margin: 0 0 1.5rem;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--faint);
}

.doc-intro {
  margin: 0;
  max-width: 46rem;
  color: var(--muted);
  font-size: 1.05rem;
}

.doc-grid {
  display: grid;
  gap: 2.5rem;
  padding-top: 2.5rem;
}

@media (min-width: 940px) {
  .doc-grid {
    grid-template-columns: 15rem minmax(0, 1fr);
    gap: 3.5rem;
  }
}

/* table of contents */

.toc {
  align-self: start;
}

@media (min-width: 940px) {
  .toc {
    position: sticky;
    top: 5.5rem;
  }
}

.toc-title {
  margin: 0 0 0.85rem;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--engram);
}

.toc ol {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: toc;
  display: grid;
  gap: 0.4rem;
}

.toc li {
  counter-increment: toc;
}

.toc a {
  display: block;
  padding-left: 1.6rem;
  position: relative;
  font-size: 0.88rem;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.16s ease;
}

.toc a::before {
  content: counter(toc, decimal-leading-zero);
  position: absolute;
  left: 0;
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--faint);
}

.toc a:hover {
  color: var(--engram);
}

/* prose */

.prose {
  max-width: 44rem;
}

.prose section + section {
  margin-top: 2.75rem;
}

.prose h2 {
  margin: 0 0 0.9rem;
  font-size: clamp(1.3rem, 2.6vw, 1.6rem);
}

.prose h3 {
  margin: 1.75rem 0 0.5rem;
}

.prose p {
  margin: 0 0 1rem;
  color: var(--muted);
}

.prose strong {
  color: var(--ink);
  font-weight: 600;
}

.prose a {
  color: var(--engram);
  text-decoration: none;
  border-bottom: 1px solid rgba(227, 164, 85, 0.4);
}

.prose a:hover {
  border-bottom-color: var(--engram);
}

.prose ul,
.prose ol {
  margin: 0 0 1.25rem;
  padding-left: 1.2rem;
  display: grid;
  gap: 0.6rem;
  color: var(--muted);
}

.prose li {
  padding-left: 0.2rem;
}

.prose li::marker {
  color: var(--engram);
  font-family: var(--mono);
  font-size: 0.85em;
}

/* callout */

.callout {
  margin: 0 0 1.25rem;
  padding: 1rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--panel);
}

.callout p {
  margin: 0;
  font-size: 0.95rem;
}

/* ---------- demo request dialog ---------- */

.df {
  width: min(100% - 1.5rem, 40rem);
  max-height: min(90vh, 48rem);
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--bg-2);
  color: var(--ink);
  overflow: auto;
  overscroll-behavior: contain;
}

.df::backdrop {
  background: rgba(4, 5, 6, 0.72);
  backdrop-filter: blur(3px);
}

.df[open] {
  animation: df-in 0.22s ease both;
}

@keyframes df-in {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.99);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.df-panel {
  position: relative;
  padding: 1.6rem 1.5rem 1.5rem;
}

.df-close {
  position: absolute;
  top: 0.75rem;
  right: 0.85rem;
  width: 2rem;
  height: 2rem;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: transparent;
  color: var(--muted);
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
  transition: color 0.16s ease, border-color 0.16s ease;
}

.df-close:hover {
  color: var(--ink);
  border-color: rgba(242, 243, 245, 0.3);
}

.df-kicker {
  margin: 0 0 0.5rem;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--engram);
}

.df h2 {
  margin: 0 0 0.5rem;
  padding-right: 2.5rem;
  font-size: clamp(1.35rem, 3.4vw, 1.7rem);
}

.df-sub {
  margin: 0 0 1.4rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.df-grid {
  display: grid;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

@media (min-width: 560px) {
  .df-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.df-field {
  display: grid;
  gap: 0.3rem;
}

.df-field > span {
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--faint);
}

.df-field input,
.df-field textarea {
  width: 100%;
  padding: 0.6rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: #0a0c0f;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 0.95rem;
  transition: border-color 0.16s ease;
}

.df-field textarea {
  resize: vertical;
  min-height: 4.5rem;
}

.df-field input:hover,
.df-field textarea:hover {
  border-color: rgba(242, 243, 245, 0.22);
}

.df-field input:focus,
.df-field textarea:focus {
  outline: none;
  border-color: var(--engram);
}

.df-field input:user-invalid,
.df-field textarea:user-invalid {
  border-color: rgba(217, 89, 78, 0.7);
}

.df-full {
  margin-bottom: 1.1rem;
}

.df-set {
  margin: 0 0 1.1rem;
  padding: 0.9rem 1rem 1rem;
  border: 1px solid var(--line);
  border-radius: var(--r);
  display: grid;
  gap: 0.5rem;
}

.df-set legend {
  padding: 0 0.4rem;
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--faint);
}

@media (min-width: 560px) {
  .df-set {
    grid-template-columns: repeat(2, 1fr);
  }

  .df-set legend {
    grid-column: 1 / -1;
  }
}

.df-check {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: var(--muted);
  cursor: pointer;
}

.df-check input {
  width: 0.95rem;
  height: 0.95rem;
  accent-color: var(--engram);
  flex: none;
}

.df-hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.df-note {
  margin: 0 0 1.2rem;
  font-size: 0.85rem;
  color: var(--faint);
}

.df-note a {
  color: var(--engram);
}

.df-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  justify-content: flex-end;
}

.df-done h3 {
  margin: 0 0 0.5rem;
  font-size: 1.25rem;
}

.df-done p {
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.df-done .df-alt {
  padding-top: 0.9rem;
  border-top: 1px dashed var(--line);
  font-size: 0.9rem;
}

.df-done a {
  color: var(--engram);
}

/* ---------- motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .btn,
  .ac-ev li,
  .live-steps li {
    transition: none;
  }

  .live-dot {
    animation: none;
  }

  .live-card.swap {
    animation: none;
  }

  .df[open] {
    animation: none;
  }
}
