/* Barnabas Live — "field-notebook telegraph" aesthetic.
   Warm cream paper, navy ink, one orange accent, faint engineering grid. */

/* The [hidden] attribute must always win. Class rules like .start-gate{display:flex}
   otherwise override the UA [hidden]{display:none}, so toggling `hidden` did nothing
   on the reduced-motion code path and the start gate never disappeared. */
[hidden] { display: none !important; }

:root {
  --cream: #faf7f0;
  --cream-2: #f3eee2;
  --paper-line: rgba(27, 42, 74, 0.06);
  --ink: #1b2a4a;
  --ink-soft: #46537097;
  --ink-mute: #5b678a;
  --orange: #e8743b;
  --orange-soft: #f4a87d;
  --green: #2f7d56;
  --green-soft: #d8ecdf;
  --card: #fffdf8;
  --hair: rgba(27, 42, 74, 0.14);
  --shadow-hard: 6px 6px 0 rgba(27, 42, 74, 0.12);
  --shadow-soft: 0 18px 40px -28px rgba(27, 42, 74, 0.5);
  --r: 14px;
  --display: "Archivo", "Archivo Expanded", ui-sans-serif, system-ui, "Segoe UI", sans-serif;
  --body: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
}

body {
  font-family: var(--body);
  color: var(--ink);
  background-color: var(--cream);
  /* engineering graph paper, very faint */
  background-image:
    linear-gradient(var(--paper-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--paper-line) 1px, transparent 1px),
    radial-gradient(circle at 18% -10%, rgba(232, 116, 59, 0.06), transparent 42%),
    radial-gradient(circle at 96% 6%, rgba(27, 42, 74, 0.05), transparent 38%);
  background-size: 26px 26px, 26px 26px, 100% 100%, 100% 100%;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.page {
  max-width: 1320px;
  margin: 0 auto;
  min-height: 100%;
  padding: clamp(20px, 3vw, 44px) clamp(18px, 3vw, 48px) 96px;
  display: flex;
  flex-direction: column;
}

/* ---------- masthead ---------- */
.masthead {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: baseline;
  gap: 18px;
  padding-bottom: 18px;
  border-bottom: 2px solid var(--ink);
  margin-bottom: clamp(20px, 3vw, 40px);
}
.masthead__brand { display: flex; align-items: center; gap: 12px; }
.masthead__brand .dot {
  width: 13px; height: 13px; border-radius: 50%;
  background: var(--orange);
  box-shadow: 0 0 0 4px rgba(232, 116, 59, 0.18);
}
.masthead__name {
  font-family: var(--display);
  font-weight: 800;
  letter-spacing: -0.02em;
  font-size: clamp(22px, 2.4vw, 30px);
  text-transform: uppercase;
}
.masthead__name em {
  font-style: normal;
  color: var(--orange);
  -webkit-text-stroke: 0;
}
.masthead__tag {
  margin: 0;
  color: var(--ink-mute);
  font-size: clamp(13px, 1.2vw, 15px);
  justify-self: start;
}
.masthead__skip {
  justify-self: end;
  align-self: center;
  font-family: var(--display);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--ink-mute);
  text-decoration: none;
  border-bottom: 2px solid var(--orange);
  padding-bottom: 2px;
  white-space: nowrap;
  transition: color 0.15s ease;
}
.masthead__skip:hover { color: var(--orange); }
.masthead__skip:focus-visible { outline: 3px solid var(--orange-soft); outline-offset: 3px; }
.masthead__fixture {
  margin: 0;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--orange);
  border: 1px dashed var(--orange-soft);
  border-radius: 999px;
  padding: 3px 10px;
  align-self: center;
}

/* ---------- stage ---------- */
.stage {
  display: grid;
  grid-template-columns: minmax(300px, 360px) 1fr;
  gap: clamp(20px, 2.4vw, 40px);
  align-items: start;
  flex: 1;
}
@media (max-width: 900px) {
  .stage { grid-template-columns: 1fr; }
}

/* ---------- inbox ---------- */
.inbox { position: sticky; top: 20px; }
@media (max-width: 900px) { .inbox { position: static; } }

.inbox__head { margin-bottom: 12px; }
.inbox__eyebrow {
  font-family: var(--display);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-mute);
  display: inline-block;
  border-left: 3px solid var(--orange);
  padding-left: 8px;
}
.inbox__label {
  margin: 8px 0 0;
  font-family: var(--display);
  font-weight: 800;
  font-size: 20px;
  letter-spacing: -0.01em;
}

.inbox__card {
  background: var(--card);
  border: 1.5px solid var(--ink);
  border-radius: var(--r);
  box-shadow: var(--shadow-hard);
  padding: 20px 20px 22px;
}
.inbox__card--loading, .inbox__card--error { color: var(--ink-mute); }
.inbox__err { font-size: 12px; color: var(--orange); margin-top: 8px; }

.inbox__row {
  display: flex;
  gap: 12px;
  padding: 7px 0;
  border-bottom: 1px dashed var(--hair);
  font-size: 14px;
}
.inbox__k {
  flex: 0 0 56px;
  font-weight: 700;
  color: var(--ink-mute);
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.08em;
  padding-top: 2px;
}
.inbox__v { font-weight: 600; }
.inbox__body {
  margin: 16px 0 20px;
  line-height: 1.62;
  font-size: 14.5px;
  color: var(--ink);
}

.run-btn {
  width: 100%;
  font-family: var(--display);
  font-weight: 800;
  font-size: 16px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--cream);
  background: var(--orange);
  border: 1.5px solid var(--ink);
  border-radius: 10px;
  padding: 13px 16px;
  cursor: pointer;
  box-shadow: 4px 4px 0 var(--ink);
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.2s ease;
}
.run-btn:hover { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--ink); }
.run-btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.run-btn:disabled { cursor: default; background: var(--ink-mute); transform: none; box-shadow: 2px 2px 0 var(--hair); }
.run-btn.is-running { background: var(--ink); }
.run-btn:focus-visible { outline: 3px solid var(--orange-soft); outline-offset: 3px; }

.inbox__hint { margin: 12px 0 0; font-size: 12px; color: var(--ink-mute); text-align: center; }

/* inbox inquiry picker — subtle prev/next control, only shown when >1 email loaded */
.inbox__picker {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 0 0 12px;
}
.inbox__picker-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px; height: 28px;
  border-radius: 50%;
  border: 1.5px solid var(--hair);
  background: var(--cream);
  color: var(--ink-mute);
  font-size: 14px;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
  padding: 0;
  line-height: 1;
}
.inbox__picker-btn:hover {
  border-color: var(--orange);
  color: var(--orange);
  background: rgba(232, 116, 59, 0.07);
}
.inbox__picker-btn:active {
  background: rgba(232, 116, 59, 0.14);
}
.inbox__picker-btn:focus-visible {
  outline: 3px solid var(--orange-soft);
  outline-offset: 2px;
}
.inbox__picker-label {
  font-family: var(--display);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-mute);
  min-width: 44px;
  text-align: center;
}

/* ---------- the map / flow ---------- */
.map { min-width: 0; }
.map__rail {
  overflow-x: auto;
  overflow-y: visible;
  padding: 6px 4px 24px;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
}
.flow {
  display: flex;
  align-items: stretch;
  gap: 0;
  min-width: min-content;
  padding: 8px 4px;
}

/* connector arrows */
.connector {
  flex: 0 0 64px;
  align-self: center;
  position: relative;
  height: 48px;
}
.connector svg { width: 100%; height: 100%; overflow: visible; }
.connector__line {
  fill: none;
  stroke: var(--ink-soft);
  stroke-width: 2.4;
  stroke-linecap: round;
}
.connector__head {
  fill: none;
  stroke: var(--orange);
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0;
}
.connector.is-drawn .connector__head { opacity: 1; }
/* fallback when DrawSVG unavailable / reduced motion */
@media (prefers-reduced-motion: reduce) {
  .connector__head { opacity: 1; }
}

/* node cards */
.node {
  flex: 0 0 300px;
  scroll-snap-align: center;
  background: var(--card);
  border: 1.5px solid var(--hair);
  border-radius: var(--r);
  padding: 16px 16px 18px;
  min-height: 168px;
  display: flex;
  flex-direction: column;
  position: relative;
  box-shadow: var(--shadow-soft);
  transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}
.node.is-idle { opacity: 0.55; }
.node.is-working { border-color: var(--orange); }
.node.is-done { opacity: 1; border-color: var(--hair); }
.node.is-active {
  border-color: var(--ink);
  box-shadow: var(--shadow-hard);
  transform: translateY(-2px);
}
/* reveal walk: the one box being discussed. Navy, not the old light-orange glow,
   so it stands out hard against the cream background as SAM talks about it. */
.node.is-walking {
  border-color: var(--ink);
  box-shadow: 0 0 0 2px var(--ink), 0 12px 30px rgba(27, 42, 74, 0.34);
  transform: translateY(-3px);
}

.node__head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 12px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--hair);
}
.node__num {
  font-family: var(--display);
  font-weight: 800;
  font-size: 13px;
  color: var(--orange);
  background: rgba(232, 116, 59, 0.1);
  border-radius: 6px;
  padding: 2px 7px;
  letter-spacing: 0.02em;
}
.node__title {
  font-family: var(--display);
  font-weight: 700;
  font-size: 13.5px;
  letter-spacing: 0.01em;
  flex: 1;
}
.node__pulse {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--hair);
  flex: 0 0 auto;
}
.node.is-working .node__pulse { background: var(--orange); }
.node.is-done .node__pulse { background: var(--green); }

/* draws_on source pill — sits under the head, above the body, on every node */
.node__source {
  align-self: flex-start;
  font-family: var(--display);
  font-weight: 700;
  font-size: 9.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-mute);
  background: var(--cream-2);
  border: 1px solid var(--hair);
  border-radius: 999px;
  padding: 3px 9px;
  margin-bottom: 12px;
  transition: color 0.3s ease, border-color 0.3s ease, background 0.3s ease;
}
.node.is-working .node__source {
  color: var(--orange);
  border-color: var(--orange);
  background: rgba(232, 116, 59, 0.08);
}
.node.is-active .node__source {
  color: var(--orange);
  border-color: var(--orange-soft);
  background: rgba(232, 116, 59, 0.08);
}
.node.is-done .node__source {
  color: var(--ink);
  border-color: var(--hair);
  background: var(--cream-2);
}

.node__body { flex: 1; min-height: 0; }
.node.is-idle .node__body::after {
  content: "";
  display: block;
  height: 8px;
  width: 60%;
  margin-top: 6px;
  border-radius: 4px;
  background: repeating-linear-gradient(90deg, var(--hair) 0 8px, transparent 8px 16px);
  opacity: 0.5;
}

/* load_context — the agent's "what I'm working from" memory cards */
.node[data-step="load_context"] { flex-basis: 320px; }
.ctx__intro {
  margin: 0 0 12px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--ink-mute);
}
.ctx__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ctx__src {
  display: flex;
  flex-direction: column;
  gap: 3px;
  border: 1.4px solid var(--hair);
  border-left: 3px solid var(--orange);
  border-radius: 10px;
  padding: 9px 12px;
  background: var(--cream);
}
.ctx__name {
  font-family: var(--display);
  font-weight: 800;
  font-size: 13px;
  letter-spacing: -0.005em;
  color: var(--ink);
}
.ctx__note { font-size: 12px; line-height: 1.4; color: var(--ink-mute); }

/* read_email */
.kv { display: flex; gap: 8px; font-size: 13px; padding: 3px 0; }
.kv__k { color: var(--ink-mute); font-weight: 700; text-transform: uppercase; font-size: 10.5px; letter-spacing: 0.08em; flex: 0 0 50px; padding-top: 2px; }
.kv__v { font-weight: 600; }
.hilites { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 6px; }
.hilites li {
  font-size: 13px;
  line-height: 1.4;
  padding-left: 18px;
  position: relative;
  color: var(--ink);
}
.hilites li::before {
  content: "";
  position: absolute; left: 2px; top: 7px;
  width: 7px; height: 7px;
  background: var(--orange);
  border-radius: 2px;
  transform: rotate(45deg);
}

/* understand */
.read {
  margin: 0;
  font-size: 15px;
  line-height: 1.55;
  font-style: italic;
  color: var(--ink);
  padding-left: 14px;
  border-left: 3px solid var(--orange-soft);
}

/* draft_reply */
.node[data-step="draft_reply"] { flex-basis: 380px; }
.reply {
  font-size: 13.5px;
  line-height: 1.55;
  white-space: normal;
}
.reply p { margin: 0 0 8px; min-height: 1em; }
.reply p:last-child { margin-bottom: 0; }

/* pull_pricing */
.prices { display: grid; gap: 10px; }
.price {
  border: 1.4px solid var(--hair);
  border-radius: 10px;
  padding: 11px 12px;
  background: var(--cream);
}
.price--lead {
  border-color: var(--orange);
  background: rgba(232, 116, 59, 0.07);
  box-shadow: 3px 3px 0 rgba(232, 116, 59, 0.18);
}
.price__tag {
  display: inline-block;
  font-family: var(--display);
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cream);
  background: var(--orange);
  border-radius: 4px;
  padding: 2px 6px;
  margin-bottom: 6px;
}
.price__head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.price__name { font-weight: 700; font-size: 13.5px; line-height: 1.25; }
.price__amt {
  font-family: var(--display);
  font-weight: 800;
  font-size: 15px;
  color: var(--ink);
  white-space: nowrap;
}
.price--lead .price__amt { color: var(--orange); }
.price__why { margin: 6px 0 0; font-size: 12px; line-height: 1.4; color: var(--ink-mute); }

/* offer_time */
.slot {
  border: 1.4px solid var(--hair);
  border-radius: 10px;
  padding: 14px;
  background: var(--cream);
}
.slot__when { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.slot__day { font-family: var(--display); font-weight: 800; font-size: 15px; }
.slot__platform {
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--ink-mute);
  border: 1px solid var(--hair); border-radius: 999px; padding: 2px 9px;
}
.slot__link { font-size: 12px; color: var(--orange); word-break: break-all; text-decoration: none; border-bottom: 1px solid var(--orange-soft); }
.slot__link:hover { color: var(--ink); }

/* await_approval */
.node[data-step="await_approval"].is-active { border-color: var(--orange); }
.approve__summary { margin: 0 0 8px; font-size: 13.5px; line-height: 1.5; }
.approve__note { margin: 0 0 14px; font-size: 12px; color: var(--green); font-weight: 600; }
.approve__btn {
  width: 100%;
  font-family: var(--display);
  font-weight: 800;
  font-size: 14.5px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--cream);
  background: var(--orange);
  border: 1.5px solid var(--ink);
  border-radius: 9px;
  padding: 11px;
  cursor: pointer;
  box-shadow: 3px 3px 0 var(--ink);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.approve__btn:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--ink); }
.approve__btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.approve__btn:disabled { background: var(--ink-mute); cursor: default; box-shadow: none; transform: none; }
.approve__btn:focus-visible { outline: 3px solid var(--orange-soft); outline-offset: 3px; }
.node.is-approved { border-color: var(--green); }

/* sent */
.sent__badges { display: flex; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.badge {
  font-family: var(--display);
  font-weight: 800;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: 999px;
  padding: 4px 11px;
}
.badge--sent { color: var(--green); background: var(--green-soft); border: 1px solid var(--green); }
.badge--booked { color: var(--ink); background: var(--cream-2); border: 1px solid var(--hair); }
.node[data-step="sent"].is-done { border-color: var(--green); }
.sent__msg { margin: 0; font-size: 13.5px; line-height: 1.5; }

/* ---------- caption strip ---------- */
.caption {
  position: fixed;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  max-width: min(760px, 92vw);
  width: max-content;
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--ink);
  color: var(--cream);
  border-radius: 999px;
  padding: 12px 22px;
  box-shadow: 0 16px 36px -16px rgba(27, 42, 74, 0.7);
  z-index: 20;
  transition: opacity 0.3s ease;
}
.caption.is-empty { opacity: 0; pointer-events: none; }
.caption__mark { width: 8px; height: 8px; border-radius: 50%; background: var(--orange); flex: 0 0 auto; box-shadow: 0 0 0 4px rgba(232, 116, 59, 0.25); }
.caption__text { font-size: 14.5px; line-height: 1.35; font-weight: 500; }

/* ---------- footer ---------- */
.footer {
  margin-top: auto;
  padding-top: 30px;
}
.footer__line {
  margin: 0;
  font-size: 13px;
  color: var(--ink-mute);
  border-top: 1px solid var(--hair);
  padding-top: 16px;
}

/* ========================================================================
   INTERVIEW MODE — the live conversation (interview.html / interview.js)
   Same tokens, same field-notebook feel. Left = conversation, right = map.
   ======================================================================== */

/* ---------- conversation column ---------- */
.convo { position: sticky; top: 20px; }
@media (max-width: 900px) { .convo { position: static; } }

.convo__head { margin-bottom: 12px; }
.convo__eyebrow {
  font-family: var(--display);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-mute);
  display: inline-block;
  border-left: 3px solid var(--orange);
  padding-left: 8px;
}

.convo__card {
  background: var(--card);
  border: 1.5px solid var(--ink);
  border-radius: var(--r);
  box-shadow: var(--shadow-hard);
  padding: 22px 20px 20px;
}
.convo__prompt {
  margin: 0 0 20px;
  font-family: var(--display);
  font-weight: 700;
  font-size: 18px;
  line-height: 1.42;
  letter-spacing: -0.01em;
  color: var(--ink);
  min-height: 1.4em;
}

.convo__controls { display: flex; flex-direction: column; align-items: center; gap: 12px; }

/* the big tappable mic button */
.mic-btn {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 124px;
  height: 124px;
  border-radius: 50%;
  background: var(--orange);
  border: 2px solid var(--ink);
  color: var(--cream);
  cursor: pointer;
  box-shadow: 5px 5px 0 var(--ink);
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.2s ease;
}
.mic-btn:hover { transform: translate(-1px, -1px); box-shadow: 6px 6px 0 var(--ink); }
.mic-btn:active { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--ink); }
.mic-btn:focus-visible { outline: 3px solid var(--orange-soft); outline-offset: 4px; }
.mic-btn:disabled { cursor: default; background: var(--ink-mute); box-shadow: 2px 2px 0 var(--hair); transform: none; }
.mic-btn__icon {
  width: 30px; height: 30px;
  display: block;
  color: currentColor;
}
.mic-btn__label {
  font-family: var(--display);
  font-weight: 800;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
/* recording state: navy fill + a slow pulse ring */
.mic-btn.is-recording { background: var(--ink); }
.mic-btn.is-recording::before {
  content: "";
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 2px solid var(--orange);
  animation: micPulse 1.4s ease-out infinite;
}
.mic-btn { position: relative; }
/* invite state: a pulse ring drawing the eye to the button before first use */
.mic-btn.is-invite::before {
  content: "";
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 2px solid var(--orange);
  animation: micPulse 1.6s ease-out infinite;
}
@keyframes micPulse {
  0% { transform: scale(0.92); opacity: 0.8; }
  100% { transform: scale(1.18); opacity: 0; }
}

.convo__hint { margin: 0; font-size: 12px; color: var(--ink-mute); text-align: center; }

/* type-instead break-glass */
.convo__type-toggle {
  display: flex;
  width: fit-content;
  margin: 14px auto 0;
  align-items: center;
  gap: 7px;
  background: var(--card);
  border: 1.5px solid var(--hair);
  border-radius: 999px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  padding: 7px 15px;
  transition: border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}
.convo__type-toggle-icon { width: 16px; height: 16px; flex: none; }
.convo__type-toggle:hover {
  color: var(--orange);
  border-color: var(--orange);
  box-shadow: var(--shadow-soft);
  transform: translateY(-1px);
}
.convo__type-toggle:focus-visible { outline: 3px solid var(--orange-soft); outline-offset: 2px; }

/* Deterministic "build my plan" escape, shown once the reveal walk begins so the
   plan/email is always reachable without waiting on the brain to decide it is done. */
.convo__done-hint {
  margin: 16px auto 0;
  max-width: 360px;
  text-align: center;
  font-size: 13px;
  line-height: 1.45;
  color: var(--ink-mute);
}
.convo__done {
  display: block;
  width: fit-content;
  margin: 8px auto 0;
  background: var(--orange);
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  padding: 10px 22px;
  box-shadow: 3px 3px 0 var(--ink);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.convo__done:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--ink); }
.convo__done:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.convo__done:focus-visible { outline: 3px solid var(--orange-soft); outline-offset: 3px; }

/* Start gate: mandatory name + email before the voice conversation (lead capture). */
.start-gate {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: var(--cream);
  background-image:
    linear-gradient(var(--paper-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--paper-line) 1px, transparent 1px);
  background-size: 26px 26px;
}
.start-gate__card {
  width: 100%;
  max-width: 440px;
  background: var(--card);
  border: 1.5px solid var(--ink);
  border-radius: 14px;
  box-shadow: var(--shadow-hard);
  padding: 30px 28px;
}
.start-gate__title { margin: 0 0 8px; font-size: 25px; line-height: 1.2; color: var(--ink); }
.start-gate__sub { margin: 0 0 22px; font-size: 15px; line-height: 1.5; color: var(--ink-mute); }
.start-gate__form { display: flex; flex-direction: column; }
.start-gate__label { font-size: 12px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-mute); margin: 12px 0 5px; }
.start-gate__input {
  font-size: 16px;
  padding: 11px 14px;
  border: 1.5px solid var(--hair);
  border-radius: 9px;
  background: #fff;
  color: var(--ink);
  transition: border-color 0.2s ease;
}
.start-gate__input:focus { outline: none; border-color: var(--orange); }
.start-gate__error { margin: 12px 0 0; color: #b3261e; font-size: 13px; font-weight: 600; }
.start-gate__btn {
  margin: 20px 0 0;
  background: var(--orange);
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  padding: 13px 22px;
  box-shadow: 3px 3px 0 var(--ink);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.start-gate__btn:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--ink); }
.start-gate__btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.start-gate__btn:disabled { background: var(--ink-mute); cursor: default; box-shadow: none; transform: none; }
.start-gate__btn:focus-visible { outline: 3px solid var(--orange-soft); outline-offset: 3px; }
.start-gate__fine { margin: 16px 0 0; font-size: 12px; color: var(--ink-mute); text-align: center; }
.convo__type { margin-top: 18px; padding-top: 16px; border-top: 1px dashed var(--hair); }
.convo__type-label {
  display: block;
  font-family: var(--display);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-bottom: 8px;
}
.convo__type-row { display: flex; gap: 8px; }
.convo__type-input {
  flex: 1;
  min-width: 0;
  font-family: var(--body);
  font-size: 14px;
  color: var(--ink);
  background: var(--cream);
  border: 1.5px solid var(--hair);
  border-radius: 9px;
  padding: 10px 12px;
}
.convo__type-input:focus { outline: none; border-color: var(--orange); }
.convo__type-send {
  font-family: var(--display);
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--cream);
  background: var(--ink);
  border: 1.5px solid var(--ink);
  border-radius: 9px;
  padding: 0 16px;
  cursor: pointer;
}
.convo__type-send:hover { background: var(--orange); border-color: var(--ink); }
.convo__type-send:focus-visible { outline: 3px solid var(--orange-soft); outline-offset: 2px; }

/* ---------- catalog cards (the open) ---------- */
.catalog { padding: 8px 4px 16px; }
.catalog__intro {
  margin: 0 0 16px;
  font-family: var(--display);
  font-weight: 700;
  font-size: 17px;
  line-height: 1.4;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.catalog__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}
.catalog__card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: left;
  background: var(--card);
  border: 1.5px solid var(--hair);
  border-left: 3px solid var(--orange);
  border-radius: var(--r);
  padding: 14px 16px;
  cursor: pointer;
  box-shadow: var(--shadow-soft);
  transition: transform 0.14s ease, box-shadow 0.14s ease, border-color 0.2s ease;
}
.catalog__card:hover {
  transform: translateY(-2px);
  border-color: var(--ink);
  box-shadow: var(--shadow-hard);
}
.catalog__card:active { transform: translateY(0); }
.catalog__card:focus-visible { outline: 3px solid var(--orange-soft); outline-offset: 3px; }
.catalog__name {
  font-family: var(--display);
  font-weight: 800;
  font-size: 15px;
  letter-spacing: -0.005em;
  color: var(--ink);
}
.catalog__blurb { font-size: 13px; line-height: 1.45; color: var(--ink-mute); }
.catalog__escape { margin: 16px 0 0; font-size: 13px; color: var(--ink-mute); font-style: italic; }

/* ---------- dynamic step nodes (interview map) ---------- */
.node--step { flex-basis: 280px; }
.node--step .node__note { margin: 0; font-size: 13px; line-height: 1.5; color: var(--ink-mute); }
.node__auto {
  display: inline-block;
  font-family: var(--display);
  font-weight: 800;
  font-size: 9.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--cream);
  background: var(--orange);
  border-radius: 4px;
  padding: 3px 8px;
  margin-bottom: 10px;
}
/* automatable steps read orange, the same accent the showcase uses for action */
.node--step.is-auto { border-color: var(--orange); }
.node--step.is-auto .node__num { color: var(--orange); }
.node--step.is-auto .node__pulse { background: var(--orange); }

/* the small correction affordance, tucked at the foot of each step */
.node__edit {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px dashed var(--hair);
}
.node__edit-btn {
  font-family: var(--display);
  font-weight: 700;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-mute);
  background: var(--cream);
  border: 1px solid var(--hair);
  border-radius: 999px;
  padding: 3px 11px;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.node__edit-btn:hover { color: var(--orange); border-color: var(--orange); background: rgba(232, 116, 59, 0.07); }
.node__edit-btn:focus-visible { outline: 2px solid var(--orange-soft); outline-offset: 2px; }

/* ---------- plan panel (approve & send) ---------- */
.plan-panel {
  margin-top: 24px;
  background: var(--card);
  border: 1.5px solid var(--ink);
  border-radius: var(--r);
  box-shadow: var(--shadow-hard);
  padding: 20px;
  max-width: 460px;
}
.plan-panel__msg { margin: 0 0 14px; font-size: 14.5px; line-height: 1.5; color: var(--ink); }

/* ---------- bridge from showcase into interview ---------- */
.bridge {
  margin-top: 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 16px;
  padding: 26px 20px 22px;
  border-top: 2px solid var(--ink);
  background: var(--cream-2, rgba(0,0,0,0.02));
  border-radius: 0 0 12px 12px;
}
.bridge__line {
  margin: 0;
  font-family: var(--display);
  font-weight: 800;
  font-size: 18px;
  line-height: 1.35;
  letter-spacing: -0.01em;
  color: var(--ink);
  max-width: 32ch;
}
.bridge__btn {
  font-family: var(--display);
  font-weight: 800;
  font-size: 15px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--cream);
  background: var(--orange);
  border: 2px solid var(--ink);
  border-radius: 10px;
  padding: 14px 28px;
  text-decoration: none;
  box-shadow: 4px 4px 0 var(--ink);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.bridge__btn:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--ink); }
.bridge__btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.bridge__btn:focus-visible { outline: 3px solid var(--orange-soft); outline-offset: 3px; }

/* ---------- footer disclaimer ---------- */
.footer__disclaimer {
  margin: 8px 0 0;
  font-size: 11.5px;
  color: var(--ink-mute);
  letter-spacing: 0.01em;
}

/* reduced motion: keep it calm and instant */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
  .node.is-idle { opacity: 0.7; }
  .mic-btn.is-recording::before { animation: none; }
}

/* ---- Interview map: serpentine "snake" layout ----
   Scoped to .flow--snake so the live showcase map (plain .flow) is untouched.
   The whole workflow fits on one page: rows read 1>2>3, turn down, then 6<5<4.
   renderWorkflow() in dynamic-map.js sets the grid-column / grid-row on each node
   and arrow; these rules just override the base flex rail and center the arrows. */
.flow.flow--snake {
  display: grid;
  align-items: stretch;
  justify-items: stretch;
  gap: 0;
  min-width: 0;
  width: 100%;
  padding: 10px 8px 14px;
}
.flow--snake .node,
.flow--snake .node--step {
  flex: none;
  width: 100%;
  min-width: 0;
  scroll-snap-align: none;
}
.flow--snake .connector {
  flex: none;
  width: 100%;
  height: 100%;
  min-height: 0;
  align-self: center;
  justify-self: center;
  margin: 0;
}
.flow--snake .connector svg { width: 100%; height: 100%; }
.flow--snake .connector--right,
.flow--snake .connector--left { padding: 0 2px; }
.flow--snake .connector--down { padding: 2px 0; }

@media (max-width: 759px) {
  .flow.flow--snake { padding: 6px 2px 12px; }
}
