/* ==========================================================================
   Zigtal — Value Navigator
   Compact hero with live counts, the Capability Readiness Index explainer,
   the "start here" panel (five ways in + ask), the options picker, the
   value ↔ solution map and the agent console docked to the bottom.
   Behaviour and data live in value-navigator.js; every class is vn- prefixed.
   ========================================================================== */

.page-value-navigator {
  /* Stage colours: value-navigator.js paints the map with var(--s1) … var(--s4) */
  --s1: #818cf8;
  --s2: #a78bfa;
  --s3: #c084fc;
  --s4: #e879f9;

  --vn-violet: #8b5cf6;
  --vn-lilac: #a78bfa;
  --vn-pink: #e879f9;
  --vn-sheen: linear-gradient(rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.01));
}

/* scrollIntoView should stop above the docked console, not underneath it */
html:has(body.page-value-navigator) {
  scroll-padding-bottom: 170px;
}

/* The navigator's buttons are plain until a vn- class (or .btn) styles them */
:where(.vn-hero, .vn-wrap, .vn-dock) button {
  padding: 0;
  border: 0;
  background: none;
  text-align: inherit;
}

.vn-g {
  color: var(--mint);
}

/* Pointer spotlight, as on the homepage framework cards: site.js writes the
   pointer position to --mx / --my on every [data-spotlight] element */
@media (hover: hover) and (pointer: fine) {
  .vn-wrap [data-spotlight] {
    position: relative;
    isolation: isolate;
  }

  .vn-wrap [data-spotlight]::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    border-radius: inherit;
    background: radial-gradient(var(--spot, 380px) circle at var(--mx, 50%) var(--my, 0%), color-mix(in srgb, var(--accent) 22%, transparent), transparent 60%);
    opacity: 0;
    transition: opacity 0.4s;
    pointer-events: none;
  }

  .vn-wrap [data-spotlight]:hover::before {
    opacity: 1;
  }

  .vn-card[data-spotlight] {
    transition: border-color 0.4s;
  }

  .vn-card[data-spotlight]:hover {
    border-color: color-mix(in srgb, var(--accent) 45%, transparent);
  }

  .vn-lens,
  .vn-opt,
  .vn-item {
    --spot: 220px;
  }

  .vn-lens {
    transition: border-color 0.2s, background 0.2s, translate 0.5s var(--ease);
  }

  .vn-lens:hover {
    translate: 0 -4px;
  }
}

/* Ambient orbs drifting behind the page */
.vn-orb {
  position: fixed;
  z-index: -1;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.28;
  pointer-events: none;
  animation: vn-drift 22s ease-in-out infinite alternate;
}

.vn-orb.a { background: #8b5cf6; left: -160px; top: -120px; }
.vn-orb.b { background: #c026d3; right: -200px; top: 30%; opacity: 0.18; animation-delay: -8s; }
.vn-orb.c { background: #3ee6b0; left: 30%; bottom: -260px; opacity: 0.1; animation-delay: -14s; }

@keyframes vn-drift {
  to { transform: translate(80px, 60px) scale(1.15); }
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */
.vn-hero {
  position: relative;
  padding: clamp(2.25rem, 5vw, 3.75rem) 0 clamp(1.5rem, 3vw, 2.25rem);
}

.vn-hero-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem 3rem;
}

.vn-hero-copy {
  display: grid;
  gap: 1.1rem;
  justify-items: start;
  max-width: 720px;
}

.vn-hero-copy .lead {
  max-width: 56ch;
}

.vn-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.vn-stat {
  display: flex;
  align-items: baseline;
  gap: 6px;
  padding: 6px 14px;
  border: 1px solid var(--line-2);
  border-radius: 30px;
  background: rgba(232, 121, 249, 0.08);
  color: var(--text-2);
  font-size: 0.82rem;
  transition: border-color 0.2s, transform 0.2s;
}

.vn-stat:hover {
  border-color: var(--vn-lilac);
  transform: translateY(-2px);
}

.vn-stat b {
  color: var(--mint);
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-variant-numeric: tabular-nums;
}

/* --------------------------------------------------------------------------
   Tool layout
   -------------------------------------------------------------------------- */
.vn-wrap {
  display: flex;
  flex-direction: column;
  gap: 22px;
  font-size: 0.9375rem;
  line-height: 1.5;
}

.vn-wrap :is(h2, h3, h4) {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.vn-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--vn-sheen), var(--panel);
}

.vn-note {
  color: var(--text-3);
  font-size: 13px;
}

.vn-disclaimer {
  max-width: 90ch;
  margin: 4px 0 0;
  color: var(--text-3);
  font-size: 12.5px;
  line-height: 1.5;
}

.vn-sub {
  margin-bottom: 8px;
  color: var(--text-3);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* --------------------------------------------------------------------------
   Capability Readiness Index explainer
   -------------------------------------------------------------------------- */
.vn-cri {
  padding: 2px;
  border-radius: var(--radius-lg);
  background: linear-gradient(120deg, rgba(139, 92, 246, 0.8), rgba(232, 121, 249, 0.8));
}

.vn-cri-in {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: 24px;
  padding: clamp(18px, 3vw, 28px);
  border-radius: 20px;
  background: radial-gradient(120% 140% at 85% 20%, rgba(232, 121, 249, 0.22), transparent 60%), #0b0a1a;
}

.vn-cri-title {
  margin-top: 12px;
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.1;
}

.vn-cri-copy > p {
  max-width: 62ch;
  margin-top: 12px;
  color: var(--text-2);
}

.vn-cri-copy > div:last-child {
  margin-top: 16px;
}

.vn-dcb {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.vn-dcb div {
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
}

.vn-dcb b {
  display: block;
  font-weight: 600;
}

.vn-dcb span {
  color: var(--text-2);
  font-size: 13px;
}

.vn-vizwrap {
  position: relative;
  min-width: 0;
  min-height: 260px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(7, 11, 26, 0.6);
  overflow: hidden;
}

.vn-vizwrap canvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}

.vn-vizcap {
  position: absolute;
  left: 12px;
  bottom: 10px;
  color: var(--text-3);
  font-family: var(--font-mono);
  font-size: 11px;
}

/* --------------------------------------------------------------------------
   Start here: five ways in + ask
   -------------------------------------------------------------------------- */
.vn-start {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: clamp(16px, 2.5vw, 24px);
}

.vn-start-hd {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.vn-start h2 {
  font-size: clamp(22px, 2.8vw, 30px);
}

.vn-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  color: var(--text-2);
  font-size: 14px;
}

.vn-steps span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.vn-steps i {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 22px;
  height: 22px;
  border: 1px solid rgba(139, 92, 246, 0.5);
  border-radius: 50%;
  background: rgba(139, 92, 246, 0.15);
  color: var(--accent-text);
  font-family: var(--font-mono);
  font-size: 12px;
  font-style: normal;
  font-weight: 700;
}

.vn-lenses {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.vn-lens {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line-2);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  text-align: left;
  transition: border-color 0.2s, background 0.2s;
}

.vn-lens:hover {
  border-color: var(--vn-violet);
}

.vn-lens .vn-ic {
  color: var(--accent-text);
  font-family: var(--font-mono);
  font-size: 12px;
}

.vn-lens b {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.vn-lens span:last-child {
  color: var(--text-2);
  font-size: 13px;
}

.vn-lens[aria-selected="true"] {
  border-color: var(--vn-violet);
  background: linear-gradient(160deg, rgba(139, 92, 246, 0.18), rgba(232, 121, 249, 0.18));
  box-shadow: 0 0 26px rgba(139, 92, 246, 0.18);
}

.vn-askrow {
  display: flex;
  gap: 8px;
}

/* 1rem keeps iOS from zooming the page when the field is focused */
.vn-askrow input {
  flex: 1;
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid rgba(139, 92, 246, 0.5);
  border-radius: 10px;
  background: var(--bg);
  color: var(--text);
  font-size: 1rem;
}

.vn-askrow input::placeholder {
  color: var(--text-3);
}

.vn-askrow input:focus {
  border-color: var(--vn-violet);
  outline: none;
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.25);
}

/* --------------------------------------------------------------------------
   Picker: options for the chosen way in
   -------------------------------------------------------------------------- */
.vn-picker {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 18px 20px;
}

.vn-pickhd {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 10px;
}

.vn-pickhd h3 {
  font-size: 18px;
}

.vn-pickhd p {
  color: var(--text-2);
  font-size: 13.5px;
}

.vn-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.vn-chip {
  padding: 7px 14px;
  border: 1px solid var(--line-2);
  background: rgba(255, 255, 255, 0.03);
  border-radius: 30px;
  color: var(--text);
  font-size: 14px;
  transition: border-color 0.2s, background 0.2s;
}

.vn-chip:hover {
  border-color: var(--vn-violet);
}

.vn-chip[aria-pressed="true"] {
  border-color: var(--vn-violet);
  background: rgba(139, 92, 246, 0.18);
}

.vn-gchips .vn-chip i {
  margin-right: 6px;
  color: var(--mint);
  font-style: normal;
}

.vn-gchips .vn-chip small {
  margin-left: 6px;
  color: var(--text-3);
  font-family: var(--font-mono);
  font-size: 11px;
}

.vn-opts {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(250px, 100%), 1fr));
  gap: 8px;
}

.vn-twocol {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px;
}

.vn-optlist {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.vn-opt {
  padding: 11px 13px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.025);
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
  border-radius: 12px;
  text-align: left;
  transition: border-color 0.2s, transform 0.2s, background 0.2s;
}

.vn-opt:hover {
  border-color: var(--vn-violet);
  transform: translateY(-2px);
}

.vn-opt .vn-ic {
  flex: none;
  width: 16px;
  margin-top: 2px;
  font-family: var(--font-mono);
  font-size: 12px;
  text-align: center;
}

.vn-opt .vn-tx {
  min-width: 0;
}

.vn-opt .vn-tx small {
  display: block;
  margin-top: 2px;
  color: var(--text-2);
  font-size: 12.5px;
}

.vn-opt.vl .vn-ic { color: var(--vn-violet); }
.vn-opt.ch .vn-ic { color: var(--amber); }
.vn-opt.ch .vn-tx small { color: var(--text-3); }

.vn-opt.ch.star {
  border-color: rgba(232, 121, 249, 0.55);
  background: linear-gradient(120deg, rgba(232, 121, 249, 0.14), rgba(232, 121, 249, 0.06));
}

.vn-opt.ch.star .vn-ic {
  color: var(--mint);
}

.vn-opt[aria-pressed="true"] {
  border-color: var(--vn-violet);
  background: rgba(139, 92, 246, 0.13);
}

.vn-opt.ch[aria-pressed="true"] {
  border-color: var(--amber);
  background: rgba(255, 181, 71, 0.1);
}

/* Business challenges: question groups + the agent's answer */
.vn-chlay {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  align-items: start;
  gap: 16px;
}

.vn-qgroup {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}

.vn-qgroup .vn-sub {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 4px 0 0;
}

.vn-qgroup .vn-sub i {
  color: var(--mint);
  font-style: normal;
}

.vn-qlist {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr));
  gap: 8px;
}

.vn-ans {
  position: sticky;
  top: calc(var(--header-h) + 16px);
  padding: 2px;
  border-radius: 20px;
  background: linear-gradient(140deg, rgba(232, 121, 249, 0.9), rgba(232, 121, 249, 0.6), rgba(62, 230, 176, 0.6));
}

.vn-ans-in {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 280px;
  padding: 18px;
  border-radius: 18px;
  background: radial-gradient(120% 90% at 100% 0%, rgba(232, 121, 249, 0.25), transparent 60%), #0b0a1a;
}

.vn-ans h4 {
  font-size: 20px;
  line-height: 1.25;
}

.vn-ans p {
  color: var(--text-2);
  font-size: 14.5px;
}

.vn-see {
  padding: 10px 12px;
  border: 1px solid rgba(62, 230, 176, 0.45);
  border-radius: 12px;
  background: rgba(62, 230, 176, 0.07);
  color: var(--text);
  font-size: 14px;
}

.vn-see b {
  display: block;
  margin-bottom: 2px;
  color: var(--mint);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.vn-ans .vn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.vn-ans .vn-lab {
  width: 100%;
  color: var(--text-3);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.vn-pill {
  padding: 5px 11px;
  border: 1px solid var(--line-2);
  background: rgba(255, 255, 255, 0.03);
  border-radius: 20px;
  font-size: 13px;
  transition: border-color 0.2s, background 0.2s;
}

.vn-pill:hover {
  border-color: var(--vn-lilac);
  background: rgba(232, 121, 249, 0.15);
}

.vn-pill.v {
  border-color: rgba(62, 230, 176, 0.45);
  color: var(--mint);
}

.vn-pill.v:hover {
  background: rgba(62, 230, 176, 0.12);
}

.vn-spark {
  display: block;
  width: 100%;
  height: 90px;
}

.vn-empty {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  color: var(--text-3);
  font-size: 14px;
}

.vn-who {
  color: var(--accent-text);
  font-family: var(--font-mono);
  font-size: 11px;
}

/* Quantify: industry value calculator */
.vn-calc {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 18px;
  border: 1px solid rgba(232, 121, 249, 0.55);
  border-radius: 18px;
  background: linear-gradient(160deg, rgba(139, 92, 246, 0.1), rgba(232, 121, 249, 0.1)), var(--panel);
}

.vn-calc[hidden],
.vn-combo[hidden] {
  display: none;
}

.vn-qhd {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.vn-qhd h3 {
  margin-top: 6px;
  font-size: 19px;
}

.vn-kpi {
  margin-top: 4px;
  color: var(--text-2);
  font-size: 14px;
}

.vn-kpi b {
  color: var(--text);
}

.vn-curs {
  display: flex;
  gap: 6px;
}

.vn-qgrid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  align-items: stretch;
  gap: 16px;
}

.vn-qin {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

.vn-qin label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: var(--text-2);
  font-size: 13.5px;
}

.vn-qin input[type="number"] {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--line-3);
  border-radius: 10px;
  background: var(--bg);
  color: var(--text);
  font-size: 1rem;
}

.vn-qin input[type="range"] {
  width: 100%;
  accent-color: #7c5cff;
}

.vn-qout {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line-2);
  border-radius: 16px;
  background: rgba(5, 6, 11, 0.6);
}

.vn-big {
  background: var(--hl-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
}

.vn-cons {
  color: var(--text-2);
  font-size: 14px;
}

.vn-cons b {
  color: var(--mint);
}

.vn-how {
  color: var(--text-3);
  font-family: var(--font-mono);
  font-size: 12px;
}

/* --------------------------------------------------------------------------
   Value ↔ solution map
   -------------------------------------------------------------------------- */
.vn-map {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.vn-maphd {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.vn-maphd h2 {
  font-size: clamp(22px, 2.4vw, 28px);
}

.vn-acts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.vn-acts .btn[aria-pressed="true"] {
  border-color: transparent;
  background: var(--grad-btn);
  color: #fff;
}

.vn-board {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(60px, 12vw, 180px) minmax(0, 1fr);
}

.vn-board svg {
  position: absolute;
  inset: 0;
  width: 100%;
  max-width: none;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

.vn-col {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.vn-colhd {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  padding: 0 4px;
}

.vn-colhd h3 {
  font-size: 18px;
}

.vn-colhd span {
  color: var(--text-2);
  font-size: 13px;
}

.vn-stage {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.vn-stagehd {
  padding: 6px 4px 0;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
}

.vn-item {
  padding: 9px 12px;
  border: 1px solid var(--line);
  background: var(--vn-sheen), var(--panel);
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  border-radius: 12px;
  text-align: left;
  transition: opacity 0.25s, border-color 0.25s, background 0.25s;
}

.vn-item:hover {
  border-color: rgba(139, 92, 246, 0.7);
}

.vn-item .vn-no {
  flex: none;
  width: 24px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
}

.vn-item .vn-nm {
  min-width: 0;
  font-weight: 600;
}

.vn-item .vn-nm small {
  display: block;
  color: var(--text-2);
  font-size: 12px;
  font-weight: 400;
}

.vn-item .vn-tag {
  margin-left: auto;
  color: var(--text-3);
  font-family: var(--font-mono);
  font-size: 11px;
  white-space: nowrap;
}

.vn-item .vn-ai {
  color: var(--accent-text);
}

.vn-item.star {
  border-color: rgba(232, 121, 249, 0.75);
  background: linear-gradient(90deg, rgba(139, 92, 246, 0.1), rgba(232, 121, 249, 0.16));
}

.vn-badge {
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 20px;
  background: var(--grad-btn);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  vertical-align: 2px;
  white-space: nowrap;
}

.vn-badge.ext {
  border: 1px solid var(--vn-pink);
  background: none;
  color: var(--vn-pink);
}

.vn-board.focus .vn-item {
  opacity: 0.25;
}

.vn-board.focus .vn-item.on,
.vn-board.focus .vn-item.drive,
.vn-board.focus .vn-item.enable,
.vn-board.focus .vn-item.found {
  opacity: 1;
}

.vn-item.on {
  border-color: var(--text);
  background: linear-gradient(90deg, rgba(139, 92, 246, 0.24), rgba(232, 121, 249, 0.24));
  box-shadow: 0 0 26px rgba(139, 92, 246, 0.25);
}

.vn-item.drive {
  border-color: var(--vn-violet);
  background: rgba(139, 92, 246, 0.13);
  box-shadow: 0 0 20px rgba(139, 92, 246, 0.18);
}

.vn-item.enable {
  border-style: dashed;
  border-color: rgba(139, 92, 246, 0.65);
}

.vn-item.drive .vn-tag::before { content: "drives"; color: var(--accent-text); }
#sols .vn-item.drive .vn-tag::before { content: "drives · "; }
.vn-item.enable .vn-tag::before { content: "enables"; color: var(--text-2); }
#sols .vn-item.enable .vn-tag::before { content: "enables · "; }

#sols .vn-item.found {
  border-color: rgba(62, 230, 176, 0.7);
  background: linear-gradient(90deg, rgba(62, 230, 176, 0.12), rgba(139, 92, 246, 0.1));
  opacity: 1;
}

#sols .vn-item.found .vn-tag::before {
  content: "foundation · ";
  color: var(--mint);
}

/* Combine mode: values reinforced by several solutions, solutions serving several values */
.vn-item.multi {
  border-color: var(--mint) !important;
  background: linear-gradient(90deg, rgba(62, 230, 176, 0.16), rgba(232, 121, 249, 0.16)) !important;
  box-shadow: 0 0 26px rgba(62, 230, 176, 0.25) !important;
  opacity: 1 !important;
}

#vals .vn-item.multi .vn-tag::before { content: "reinforced ×" attr(data-n); color: var(--mint); }
#sols .vn-item.multi .vn-tag::before { content: "serves ×" attr(data-n) " · "; color: var(--mint); }

/* Links drawn between the two columns */
path.vn-link {
  fill: none;
  stroke-width: 2.2;
}

path.vn-link.drive {
  stroke: url(#gl);
}

path.vn-link.enable {
  stroke: rgba(167, 139, 250, 0.6);
  stroke-dasharray: 6 7;
}

path.vn-link.found {
  stroke: rgba(62, 230, 176, 0.55);
  stroke-width: 1.8;
  stroke-dasharray: 3 6;
}

path.vn-flow {
  fill: none;
  stroke: #fff;
  stroke-width: 2.6;
  stroke-dasharray: 4 60;
  stroke-linecap: round;
  opacity: 0.9;
  animation: vn-flow 1.6s linear infinite;
}

@keyframes vn-flow {
  to { stroke-dashoffset: -64; }
}

.vn-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  color: var(--text-2);
  font-family: var(--font-mono);
  font-size: 12px;
}

.vn-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.vn-legend .vn-g {
  color: var(--mint);
}

.vn-sw {
  width: 22px;
  height: 0;
  border-top: 2px solid var(--vn-violet);
}

.vn-sw.d {
  border-top-style: dashed;
}

/* Combine panel */
.vn-combo {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 16px;
  border: 1px solid rgba(62, 230, 176, 0.45);
  border-radius: 18px;
  background: linear-gradient(120deg, rgba(62, 230, 176, 0.07), rgba(232, 121, 249, 0.1));
}

.vn-combo .vn-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.vn-combo .vn-lab {
  margin-right: 4px;
  color: var(--text-3);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.vn-sel {
  padding: 5px 8px 5px 12px;
  border: 1px solid var(--vn-lilac);
  background: rgba(232, 121, 249, 0.18);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 20px;
  font-size: 13.5px;
}

.vn-sel b {
  font-weight: 600;
}

.vn-sel span {
  color: var(--text-3);
  font-size: 15px;
  line-height: 1;
}

.vn-pre {
  padding: 5px 12px;
  border: 1px dashed var(--line-3);
  border-radius: 20px;
  color: var(--text-2);
  font-size: 13px;
}

.vn-pre:hover,
.vn-sel:hover {
  border-color: var(--mint);
}

.vn-hint {
  color: var(--text-3);
  font-size: 13px;
}

.vn-meter {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.vn-bar {
  display: flex;
  flex: 1;
  min-width: 160px;
  height: 10px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.07);
  overflow: hidden;
}

.vn-bar i {
  display: block;
  height: 100%;
  transition: width 0.5s;
}

.vn-bar i.m { background: var(--mint); }
.vn-bar i.d { background: var(--vn-lilac); }
.vn-bar i.e { background: rgba(167, 139, 250, 0.35); }

.vn-txt {
  color: var(--text-2);
  font-size: 13.5px;
}

.vn-txt b {
  color: var(--mint);
  font-family: var(--font-display);
  font-size: 16px;
}

/* Closing CTA sits a little tighter under the tool */
.vn-cta {
  padding-top: clamp(3rem, 6vw, 5rem);
}

/* --------------------------------------------------------------------------
   Agent console, docked to the bottom of the screen
   Desktop: the agent and the current subject on the left, its reasoning on
   the right. Phones: stacked, folding down to the subject line.
   -------------------------------------------------------------------------- */
.vn-dock {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  padding: 0 max(var(--gutter), env(safe-area-inset-right, 0px)) calc(12px + env(safe-area-inset-bottom, 0px)) max(var(--gutter), env(safe-area-inset-left, 0px));
  pointer-events: none;
  transition: transform 0.45s var(--ease-out), opacity 0.45s;
}

/* Slides away once the footer is on screen */
.vn-dock.is-away {
  opacity: 0;
  transform: translateY(calc(100% + 20px));
}

.vn-console {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "hd" "head" "lines";
  gap: 8px;
  max-width: 1320px;
  margin: 0 auto;
  padding: 12px 16px 14px;
  border: 1px solid transparent;
  border-radius: 18px;
  background:
    linear-gradient(rgba(13, 10, 28, 0.94), rgba(13, 10, 28, 0.94)) padding-box,
    linear-gradient(120deg, rgba(139, 92, 246, 0.85), rgba(232, 121, 249, 0.55) 55%, rgba(62, 230, 176, 0.65)) border-box;
  -webkit-backdrop-filter: blur(18px) saturate(1.3);
  backdrop-filter: blur(18px) saturate(1.3);
  box-shadow: 0 -14px 50px rgba(0, 0, 0, 0.55), 0 0 44px rgba(139, 92, 246, 0.16);
  font-size: 13.5px;
  overflow: hidden;
  pointer-events: auto;
}

.vn-console-hd {
  grid-area: hd;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-width: 0;
}

.vn-agent {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

/* Gradient ring that turns while the agent is typing */
.vn-agent-av {
  position: relative;
  flex: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: conic-gradient(from var(--spin), #8b5cf6, #e879f9, #3ee6b0, #8b5cf6);
  box-shadow: 0 0 18px rgba(139, 92, 246, 0.45);
}

.vn-agent-av::after {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--mint) 0 3px, transparent 3.5px), #0e0b1e;
}

.vn-console.busy .vn-agent-av {
  animation: spin 1.1s linear infinite;
}

.vn-agent-nm {
  color: var(--text);
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.vn-console-meta {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.vn-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  padding: 3px 10px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-2);
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.vn-status i {
  flex: none;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 8px var(--mint);
}

.vn-console.busy .vn-status i {
  background: var(--vn-pink);
  box-shadow: 0 0 8px var(--vn-pink);
  animation: vn-pulse 0.9s steps(1) infinite;
}

.vn-chev {
  display: grid;
  flex: none;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid var(--line-2);
  border-radius: 50%;
  color: var(--text-2);
  transition: border-color 0.2s, color 0.2s;
}

.vn-chev svg {
  width: 14px;
  height: 14px;
  transition: transform 0.3s var(--ease);
}

.vn-console-hd:hover .vn-chev {
  border-color: var(--vn-violet);
  color: #fff;
}

.vn-console.is-collapsed .vn-chev svg {
  transform: rotate(180deg);
}

/* The subject the agent is talking about ('›' / '⊕' lines) */
#chead {
  grid-area: head;
  min-width: 0;
}

#chead:empty {
  display: none;
}

#chead .vn-ln {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: baseline;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.01em;
}

#chead .vn-ln b {
  color: var(--vn-pink);
  font-weight: 700;
}

#chead .vn-ln.warn b {
  color: var(--amber);
}

#chead .vn-ln span {
  color: var(--text);
}

/* The reasoning: a small label, then the text */
#clines {
  grid-area: lines;
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
  max-height: 84px;
  overflow-y: auto;
  /* it keeps scrolled to the newest line, so soften the edge older lines leave under */
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 12px);
  mask-image: linear-gradient(to bottom, transparent 0, #000 12px);
  padding-top: 4px;
  scrollbar-width: thin;
  scrollbar-color: rgba(139, 92, 246, 0.5) transparent;
}

.vn-console.is-collapsed #clines {
  display: none;
}

#clines .vn-ln {
  color: var(--text);
  line-height: 1.45;
}

#clines .vn-ln b {
  margin-right: 8px;
  color: var(--text-3);
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.vn-ln.ok span { color: var(--mint); }
.vn-ln.mut span { color: var(--text-2); }
.vn-ln.acc span { color: var(--accent-text); }
.vn-ln.warn span { color: var(--amber); }

.vn-caret {
  display: inline-block;
  width: 7px;
  height: 13px;
  margin-left: 1px;
  background: var(--accent-text);
  vertical-align: -2px;
  animation: vn-pulse 1s steps(1) infinite;
}

@keyframes vn-pulse {
  50% { opacity: 0.25; }
}

.vn-scan {
  position: absolute;
  left: 0;
  right: 0;
  top: -40px;
  height: 40px;
  background: linear-gradient(180deg, transparent, rgba(139, 92, 246, 0.09));
  pointer-events: none;
}

.vn-console.busy .vn-scan {
  animation: vn-scan 1.4s linear infinite;
}

@keyframes vn-scan {
  to { top: 100%; }
}

@media (min-width: 901px) {
  .vn-console {
    grid-template-columns: minmax(250px, 0.34fr) minmax(0, 1fr);
    grid-template-rows: auto 1fr;
    grid-template-areas: "hd lines" "head lines";
    column-gap: 24px;
    row-gap: 8px;
    padding: 14px 20px;
  }

  #clines {
    max-height: 100px;
    padding-left: 24px;
    border-left: 1px solid var(--line-2);
  }

  #clines .vn-ln {
    display: grid;
    grid-template-columns: 8.75rem minmax(0, 1fr);
    gap: 14px;
  }

  #clines .vn-ln b {
    margin-right: 0;
    padding-top: 2px;
  }

  #clines .vn-ln.no-key {
    grid-template-columns: minmax(0, 1fr);
  }

  /* Folded: one slim bar, agent on the left and the subject beside it */
  .vn-console.is-collapsed {
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-rows: auto;
    grid-template-areas: "hd head";
    align-items: center;
  }

  .vn-console.is-collapsed #chead span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

/* Phone map controls: hidden on desktop, where the drawn links do the job */
.vn-count {
  display: none;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 1000px) {
  .vn-lenses {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* One column. The map becomes two panels joined by a connector: the side the
   visitor picked from leads, and with a selection each panel lists only what
   is linked to it (its header can show everything) */
@media (max-width: 900px) {
  .vn-cri-in,
  .vn-twocol,
  .vn-chlay,
  .vn-qgrid {
    grid-template-columns: minmax(0, 1fr);
  }

  .vn-ans {
    position: static;
  }

  .vn-board {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }

  .vn-board svg,
  .vn-legend span:has(.vn-sw) {
    display: none;
  }

  #vals { order: 1; }
  .vn-mid { order: 2; }
  #sols { order: 3; }
  .vn-board[data-from="sol"] #sols { order: 1; }
  .vn-board[data-from="sol"] #vals { order: 3; }

  .vn-col {
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.02);
  }

  .vn-colhd {
    flex-wrap: wrap;
    align-items: center;
    padding: 0 2px 2px;
  }

  .vn-colhd span {
    margin-left: auto;
  }

  .vn-mid {
    display: grid;
    place-items: center;
    height: 14px;
  }

  .vn-board.focus .vn-mid {
    height: 56px;
    background: linear-gradient(rgba(139, 92, 246, 0.85), rgba(62, 230, 176, 0.85)) center / 2px 100% no-repeat;
  }

  .vn-board.focus .vn-mid::after {
    content: "↓ delivered by";
    padding: 4px 12px;
    border: 1px solid rgba(139, 92, 246, 0.55);
    border-radius: 999px;
    background: #0f0c22;
    color: var(--accent-text);
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }

  .vn-board.focus[data-from="sol"] .vn-mid::after {
    content: "↓ drives";
  }

  .vn-board.focus:not(.show-all):not(.pick-vals) #vals .vn-item:not(.on, .drive, .enable, .multi),
  .vn-board.focus:not(.show-all):not(.pick-sols) #sols .vn-item:not(.on, .drive, .enable, .found, .multi),
  .vn-board.focus:not(.show-all):not(.pick-sols) #sols .vn-stage:not(:has(.on, .drive, .enable, .found, .multi)) {
    display: none;
  }

  .vn-board.focus .vn-count {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border: 1px solid var(--line-2);
    border-radius: 999px;
    color: var(--accent-text);
    font-family: var(--font-mono);
    font-size: 11px;
  }

  .vn-board.focus .vn-count:hover {
    border-color: var(--vn-violet);
  }

  .vn-board.pick-vals #vals .vn-count,
  .vn-board.pick-sols #sols .vn-count {
    display: none;
  }
}

@media (max-width: 560px) {
  .vn-orb {
    width: 340px;
    height: 340px;
  }

  .vn-stat {
    padding: 5px 12px;
  }

  .vn-lenses {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .vn-lens:last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }

  .vn-lens {
    padding: 12px;
  }

  .vn-dcb {
    grid-template-columns: minmax(0, 1fr);
  }

  .vn-vizcap {
    right: 12px;
    font-size: 10px;
  }

  .vn-askrow {
    flex-direction: column;
  }

  .vn-picker {
    padding: 16px 14px;
  }

  .vn-calc,
  .vn-ans-in {
    padding: 14px;
  }

  .vn-col {
    padding: 10px;
  }

  .vn-item .vn-tag {
    white-space: normal;
    text-align: right;
  }

  .vn-console {
    gap: 6px;
    padding: 10px 12px 12px;
    border-radius: 16px;
  }

  .vn-agent-av {
    width: 22px;
    height: 22px;
  }

  .vn-agent-nm {
    font-size: 13px;
  }

  #chead .vn-ln {
    font-size: 14px;
  }

  #chead .vn-ln span {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
  }

  #clines {
    max-height: 58px;
  }

  #clines .vn-ln {
    font-size: 12.5px;
  }
}
