/* ── Product page: pillar animations ───────────────────────────── */

/* Hero */
.page-hero { padding: 80px 0 56px; }
.page-hero .eyebrow { display: block; margin-bottom: 24px; }
.page-hero h1 { max-width: 20ch; margin: 0 0 28px; }
.page-hero p {
  font-size: clamp(18px, 1.4vw, 22px);
  color: var(--ink-2);
  max-width: 62ch;
  line-height: 1.5;
  margin: 0;
}

/* Sticky step nav */
.step-nav {
  position: sticky;
  top: 72px;
  z-index: 20;
  background: var(--bg);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.step-nav-row {
  display: flex;
  gap: 48px;
  padding: 18px 0;
  font-size: 14px;
}
.step-nav a {
  color: var(--ink-3);
  display: flex;
  align-items: center;
  gap: 10px;
  transition: color 0.2s;
}
.step-nav a:hover, .step-nav a.active { color: var(--ink); }
.step-nav .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--line-2);
}
.step-nav a.active .dot { background: var(--accent); }

/* Step sections */
.step {
  padding: 120px 0;
  border-bottom: 1px solid var(--line);
  scroll-margin-top: 140px;
}
.step-head {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 80px;
  margin-bottom: 64px;
  align-items: start;
}
@media (max-width: 900px) { .step-head { grid-template-columns: 1fr; gap: 24px; } }
.step-index {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 13px;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: 18px;
}
.step-title {
  font-family: 'Georgia', serif;
  font-size: clamp(40px, 5.5vw, 80px);
  letter-spacing: -0.025em;
  line-height: 1.0;
  margin: 0;
}
.step-desc {
  font-size: clamp(18px, 1.3vw, 22px);
  color: var(--ink-2);
  line-height: 1.55;
  max-width: 56ch;
  margin: 0 0 28px;
}
.step-points {
  display: grid;
  gap: 16px;
  margin-top: 24px;
  padding: 0;
}
.step-points li {
  list-style: none;
  display: flex;
  gap: 14px;
  font-size: 15px;
  color: var(--ink-2);
  line-height: 1.5;
  padding-left: 0;
}
.step-points .bullet {
  flex-shrink: 0;
  width: 18px; height: 18px;
  border-radius: 50%;
  border: 1px solid var(--line-2);
  display: grid; place-items: center;
  margin-top: 2px;
}
.step-points .bullet::after {
  content: "";
  width: 6px; height: 6px;
  background: var(--accent);
  border-radius: 50%;
}

/* Canvas chrome (shared across pillars) */
.step-canvas {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 32px;
  min-height: 560px;
  position: relative;
  overflow: hidden;
}
.step-canvas .chrome {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 24px;
}
.chrome-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--line-2); }
.chrome-title {
  flex: 1;
  text-align: center;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  color: var(--ink-3);
  letter-spacing: 0.06em;
}
.pill {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 99px;
  border: 1px solid var(--line-2);
  color: var(--ink-3);
  letter-spacing: 0.06em;
}
.pill.live {
  color: var(--ok);
  border-color: color-mix(in oklab, var(--ok) 40%, var(--line-2));
}
.pill.live::before {
  content: "●";
  margin-right: 5px;
  animation: pill-blink 1.6s ease-in-out infinite;
}
@keyframes pill-blink { 50% { opacity: 0.45; } }

@media (prefers-reduced-motion: reduce) {
  .pill.live::before { animation: none; }
}

/* ════════════════════════════════════════════════════════════════ */
/* PILLAR 1 · CREATE YOUR STUDY                                     */
/* ════════════════════════════════════════════════════════════════ */

.p1-stage {
  position: relative;
  height: 620px;
}
@media (max-width: 900px) {
  .p1-stage { height: 720px; }
}
@media (max-width: 640px) {
  .p1-stage { height: 820px; }
}
.p1-stage > .layer {
  position: absolute; inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.45s ease;
}
.p1-stage > .layer.active { opacity: 1; pointer-events: auto; }

/* Chat layer — fixed-height shell so staggered bubble reveal never shifts
   the card or the page below it. Bubbles anchor to the bottom so newly
   revealed turns slide up into fixed space rather than growing the stage. */
.chat {
  display: flex; flex-direction: column;
  justify-content: flex-end;
  gap: 16px;
  position: absolute;
  inset: 0;
  overflow: hidden;
}

/* Staggered reveal: bubbles start hidden and animate in when .on is added.
   Because .chat is bottom-aligned and fixed-height, revealing a new turn
   slides the stack upward inside the panel instead of pushing the page. */
.chat-bubble.turn:not(.on) {
  opacity: 0;
  transform: translateY(10px);
  max-height: 0;
  padding-top: 0;
  padding-bottom: 0;
  margin-top: -16px; /* cancel the flex gap so it takes zero vertical space */
  border-width: 0;
  pointer-events: none;
}
.chat-bubble.turn.on {
  opacity: 1;
  transform: translateY(0);
  max-height: 520px;
}
.chat-bubble {
  max-width: 82%;
  padding: 14px 18px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.55;
  overflow: hidden;
  will-change: opacity, transform, max-height;
}

/* Staggered turn reveal: hidden by default (no layout cost), visible when .on is added */
.chat-bubble.turn {
  opacity: 0;
  transform: translateY(10px);
  max-height: 0;
  padding-top: 0;
  padding-bottom: 0;
  margin-top: -16px; /* counter the flex gap so the bubble takes no space */
  border-width: 0;
  pointer-events: none;
  transition:
    opacity 0.45s cubic-bezier(.2,.7,.2,1),
    transform 0.5s cubic-bezier(.2,.7,.2,1),
    max-height 0.5s cubic-bezier(.3,.7,.3,1),
    margin-top 0.45s cubic-bezier(.3,.7,.3,1),
    padding 0.4s cubic-bezier(.3,.7,.3,1);
}
.chat-bubble.turn.on {
  opacity: 1;
  transform: translateY(0);
  max-height: 520px;
  padding-top: 14px;
  padding-bottom: 14px;
  margin-top: 0;
  border-width: 1px;
  pointer-events: auto;
}
/* Typing indicator bubble (uses .typing-dots markup) */
.chat-bubble.typing-turn {
  padding: 14px 18px;
}
.typing-dots {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.typing-dots span {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--ink-3);
  opacity: 0.35;
  animation: p1-typing 1.1s ease-in-out infinite;
}
.typing-dots span:nth-child(2) { animation-delay: 0.15s; }
.typing-dots span:nth-child(3) { animation-delay: 0.3s; }
@keyframes p1-typing {
  0%, 60%, 100% { opacity: 0.3; transform: translateY(0); }
  30%           { opacity: 1;   transform: translateY(-3px); }
}
.chat-bubble.user {
  align-self: flex-end;
  background: var(--accent);
  color: var(--accent-ink);
}
.chat-bubble.agent {
  align-self: flex-start;
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--ink);
}
.chat-bubble .label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--ink-3);
  margin-bottom: 6px;
  text-transform: uppercase;
}
.chat-bubble.user .label { color: rgba(15,14,12,0.55); }
.chat-bubble .sources {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: 6px 8px;
  margin: -2px 0 12px;
  padding-bottom: 12px;
  border-bottom: 1px dashed var(--line);
}
.chat-bubble .src-label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-right: 2px;
}
.chat-bubble .src-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 9px;
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: 999px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  color: var(--ink-2);
}
.chat-bubble .reasoning {
  display: flex; flex-direction: column; gap: 4px;
  margin: -2px 0 12px;
  padding-bottom: 12px;
  border-bottom: 1px dashed var(--line);
}
.chat-bubble .r-line {
  position: relative;
  padding-left: 16px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11.5px;
  color: var(--ink-3);
  line-height: 1.5;
}
.chat-bubble .r-line::before {
  content: "✓";
  position: absolute;
  left: 0; top: 0;
  color: var(--ink-2);
  font-size: 10px;
}
.chat-bubble .r-line em {
  font-style: normal;
  color: var(--ink-2);
  border-bottom: 1px dotted var(--line-2);
}
.chat-bubble .actions {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
}
.chat-bubble .action {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.06em;
  padding: 6px 12px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  color: var(--ink-2);
  background: var(--surface);
}
.chat-bubble .action.primary {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
  position: relative;
}

/* Fake cursor for pillar 1 */
.p1-cursor {
  position: absolute;
  width: 22px; height: 22px;
  left: 8%; top: 90%;
  z-index: 20;
  pointer-events: none;
  opacity: 0;
  transform: translate(0, 0);
  transition: transform 0.9s cubic-bezier(.45,.05,.2,1), opacity 0.3s ease;
}
.p1-cursor svg {
  width: 100%; height: 100%;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.55));
}
.p1-stage[data-phase="cursor"] .p1-cursor,
.p1-stage[data-phase="click"] .p1-cursor { opacity: 1; }
.p1-stage[data-phase="cursor"] .p1-cursor {
  transform: translate(var(--cx, 0), var(--cy, 0));
}
.p1-stage[data-phase="click"] .p1-cursor {
  transform: translate(var(--cx, 0), var(--cy, 0)) scale(0.88);
}
.p1-click-ring {
  position: absolute;
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 2px solid var(--ink);
  left: 50%; top: 50%;
  transform: translate(-50%, -50%) scale(0.3);
  opacity: 0;
  pointer-events: none;
  z-index: 19;
}
.p1-stage[data-phase="click"] .p1-click-ring {
  animation: click-ring 0.5s ease-out forwards;
}
@keyframes click-ring {
  0% { transform: translate(-50%, -50%) scale(0.3); opacity: 0.7; }
  100% { transform: translate(-50%, -50%) scale(1.5); opacity: 0; }
}

/* Programming checklist */
.programming {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  min-height: 400px;
  gap: 28px;
}
.prog-title {
  font-family: 'Georgia', serif;
  font-size: 24px;
  letter-spacing: -0.018em;
  color: var(--ink);
  margin: 0;
  text-align: center;
}
.prog-sub {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin: -16px 0 0;
}
.prog-list {
  list-style: none;
  padding: 0; margin: 0;
  display: flex; flex-direction: column;
  gap: 10px;
  width: 100%;
  max-width: 480px;
}
.prog-item {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 16px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 13px;
  color: var(--ink-3);
  opacity: 0.4;
  transition: opacity 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}
.prog-item.active {
  opacity: 1;
  color: var(--ink-2);
  border-color: var(--line-2);
}
.prog-item.done {
  opacity: 1;
  color: var(--ink);
}
.prog-icon {
  width: 18px; height: 18px;
  border-radius: 50%;
  border: 1.5px solid var(--line-2);
  display: grid; place-items: center;
  flex-shrink: 0;
  position: relative;
}
.prog-item.active .prog-icon {
  border-color: var(--ink);
}
.prog-item.active .prog-icon::after {
  content: "";
  width: 10px; height: 10px;
  border-radius: 50%;
  border: 1.5px solid var(--ink);
  border-right-color: transparent;
  animation: prog-spin 0.8s linear infinite;
}
.prog-item.done .prog-icon {
  background: var(--ok);
  border-color: var(--ok);
}
.prog-item.done .prog-icon::after {
  content: "";
  width: 4px; height: 8px;
  border-right: 1.5px solid #fff;
  border-bottom: 1.5px solid #fff;
  transform: rotate(45deg) translate(-1px, -1px);
}
@keyframes prog-spin { to { transform: rotate(360deg); } }
.prog-item .meta {
  margin-left: auto;
  font-size: 11px;
  color: var(--ink-3);
  letter-spacing: 0.04em;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.prog-item.done .meta { opacity: 1; }

.prog-url {
  display: flex; align-items: center; gap: 12px;
  margin-top: 8px;
  padding: 14px 20px;
  border: 1px dashed var(--line-2);
  border-radius: 99px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  color: var(--ink-2);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.prog-url.visible { opacity: 1; }
.prog-url .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--ok);
}

/* Survey layer */
.survey {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 40px 44px;
  display: flex; flex-direction: column;
  min-height: 420px;
  height: 100%;
}
.survey .brand-row {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 32px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}
.survey .brand-row .logo {
  display: flex; align-items: center; gap: 8px;
  font-family: 'Georgia', serif; font-size: 16px;
  color: var(--ink);
}
.survey .brand-row .logo .mark {
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--ink); position: relative;
}
.survey .brand-row .logo .mark::after {
  content: ""; position: absolute; inset: 3px;
  border-radius: 50%; border: 1px solid var(--bg);
}
.survey .progress {
  display: flex; align-items: center; gap: 10px;
  font-family: 'IBM Plex Mono', monospace; font-size: 11px;
  color: var(--ink-3); letter-spacing: 0.08em;
}
.survey .progress .bar {
  width: 80px; height: 4px;
  background: var(--line-2); border-radius: 99px;
  overflow: hidden; position: relative;
}
.survey .progress .bar::after {
  content: ""; display: block;
  width: 4%; height: 100%; background: var(--accent);
  border-radius: 99px;
}
.survey .q-num {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--ink-3);
  text-transform: uppercase;
  margin-bottom: 16px;
}
.survey .q-title {
  font-family: 'Georgia', serif;
  font-size: 26px;
  letter-spacing: -0.018em;
  line-height: 1.2;
  color: var(--ink);
  margin: 0 0 8px;
  max-width: 42ch;
}
.survey .q-hint {
  font-size: 13px; color: var(--ink-3);
  margin: 0 0 28px;
}
.survey .choices {
  display: grid; gap: 10px;
  margin-bottom: 32px;
}
.survey .choice {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 18px;
  border: 1px solid var(--line-2);
  border-radius: 10px;
  background: var(--surface);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  font-size: 14px;
  color: var(--ink);
  text-align: left;
  font-family: 'Hanken Grotesk', sans-serif;
}
.survey .choice:hover {
  border-color: var(--ink-3);
  background: var(--surface-2);
}
.survey .choice .bubble {
  width: 18px; height: 18px;
  border-radius: 50%;
  border: 1.5px solid var(--line-2);
  flex-shrink: 0;
  position: relative;
  transition: border-color 0.2s;
}
.survey .choice:hover .bubble { border-color: var(--ink); }
.survey .choice.selected { border-color: var(--ink); background: var(--surface-2); }
.survey .choice.selected .bubble { border-color: var(--ink); }
.survey .choice.selected .bubble::after {
  content: ""; position: absolute;
  inset: 3px; border-radius: 50%;
  background: var(--ink);
}
.survey .choice .k {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  color: var(--ink-3);
  margin-left: auto;
  letter-spacing: 0.08em;
}
.survey .s-footer {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: auto;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.survey .s-footer .meta {
  font-size: 12px; color: var(--ink-3);
  font-family: 'IBM Plex Mono', monospace;
  letter-spacing: 0.06em;
}
.survey > * {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.45s ease, transform 0.45s cubic-bezier(.2,.7,.2,1);
}
.p1-stage[data-phase="survey"] .survey > * {
  opacity: 1; transform: none;
}
.p1-stage[data-phase="survey"] .survey > *:nth-child(1) { transition-delay: 0.05s; }
.p1-stage[data-phase="survey"] .survey > *:nth-child(2) { transition-delay: 0.12s; }
.p1-stage[data-phase="survey"] .survey > *:nth-child(3) { transition-delay: 0.19s; }
.p1-stage[data-phase="survey"] .survey > *:nth-child(4) { transition-delay: 0.26s; }
.p1-stage[data-phase="survey"] .survey > *:nth-child(5) { transition-delay: 0.33s; }
.p1-stage[data-phase="survey"] .survey > *:nth-child(6) { transition-delay: 0.40s; }

@media (prefers-reduced-motion: reduce) {
  .p1-cursor, .p1-click-ring { display: none; }
  .chat-bubble, .survey > * { opacity: 1 !important; transform: none !important; }
  .prog-item { opacity: 1; }
}

/* ════════════════════════════════════════════════════════════════ */
/* PILLAR 2 · INSIGHT COLLECTION                                    */
/* ════════════════════════════════════════════════════════════════ */

.p2-grid {
  display: grid;
  grid-template-columns: 0.7fr 1fr;
  gap: 24px;
  min-height: 540px;
}
@media (max-width: 900px) { .p2-grid { grid-template-columns: 1fr; } }

/* Respondent roster */
.roster {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 20px;
  display: flex; flex-direction: column;
  overflow: hidden;
}
.roster-head {
  display: flex; align-items: center; justify-content: space-between;
  padding-bottom: 14px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.roster-head .title {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.roster-head .count {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  color: var(--ink);
  letter-spacing: 0.02em;
}
.roster-head .count .done { color: var(--ink); }
.roster-head .count .total { color: var(--ink-3); }
.roster-list {
  list-style: none;
  padding: 0; margin: 0;
  display: flex; flex-direction: column;
  gap: 6px;
  flex: 1;
  overflow: hidden;
}
.r-row {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  transition: opacity 0.35s ease, border-color 0.3s ease;
}
.r-row.complete { opacity: 0.55; }
.r-avatar {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--bg);
  border: 1px solid var(--line-2);
  display: grid; place-items: center;
  font-family: 'Hanken Grotesk', sans-serif;
  font-size: 11px;
  font-weight: 500;
  color: var(--ink-2);
  flex-shrink: 0;
}
.r-meta { flex: 1; min-width: 0; }
.r-meta .name {
  font-size: 13px;
  color: var(--ink);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.r-meta .sub {
  font-size: 11px;
  color: var(--ink-3);
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.r-status {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
  display: flex; align-items: center; gap: 6px;
  flex-shrink: 0;
}
.r-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--ink-4);
}
.r-row.progress .r-dot {
  background: var(--ok);
  animation: pill-blink 1.2s ease-in-out infinite;
}
.r-row.complete .r-dot {
  background: transparent;
  border: 1px solid var(--ink-3);
}
.r-row.progress .r-status { color: var(--ok); }
.r-row.complete .r-status::before {
  content: "✓ ";
  color: var(--ink-2);
}
.r-row.progress .r-wave {
  display: flex; align-items: center; gap: 1.5px;
  height: 12px;
}
.r-wave { display: none; }
.r-row.progress .r-wave { display: flex; }
.r-wave span {
  display: block;
  width: 2px;
  background: var(--ok);
  border-radius: 1px;
  animation: mini-wave 0.9s ease-in-out infinite;
}
.r-wave span:nth-child(1) { height: 40%; animation-delay: 0s; }
.r-wave span:nth-child(2) { height: 70%; animation-delay: 0.1s; }
.r-wave span:nth-child(3) { height: 100%; animation-delay: 0.2s; }
.r-wave span:nth-child(4) { height: 60%; animation-delay: 0.3s; }
@keyframes mini-wave {
  0%, 100% { transform: scaleY(0.5); }
  50% { transform: scaleY(1); }
}

/* Hero interview */
.interview {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 24px;
  display: flex; flex-direction: column;
  gap: 20px;
  overflow: hidden;
  position: relative;
}
.iv-head {
  display: flex; align-items: center; gap: 14px;
}
.iv-head .avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--line-2);
  display: grid; place-items: center;
  font-family: 'Hanken Grotesk', sans-serif;
  font-weight: 500;
  color: var(--ink-2);
  flex-shrink: 0;
}
.iv-head .meta { flex: 1; min-width: 0; }
.iv-head .name {
  font-size: 15px;
  color: var(--ink);
  line-height: 1.2;
}
.iv-head .sub {
  font-size: 12px;
  color: var(--ink-3);
  line-height: 1.3;
  margin-top: 2px;
}
.iv-head .status {
  display: flex; flex-direction: column; align-items: flex-end; gap: 4px;
  font-family: 'IBM Plex Mono', monospace;
}
.iv-head .live {
  display: flex; align-items: center; gap: 6px;
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--ok);
  text-transform: uppercase;
}
.iv-head .live::before {
  content: "●";
  animation: pill-blink 1.2s ease-in-out infinite;
}
.iv-head .time {
  font-size: 11px;
  color: var(--ink-2);
  letter-spacing: 0.04em;
}
.iv-scale {
  position: absolute;
  top: 24px; right: 24px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 5px 10px;
  border-radius: 99px;
  display: none;
}

/* Waveform */
.iv-wave-wrap {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 20px 22px;
  position: relative;
  overflow: hidden;
}
.iv-progress {
  position: absolute;
  left: 22px; right: 22px; bottom: 8px;
  height: 2px;
  background: var(--line);
  border-radius: 99px;
  overflow: hidden;
}
.iv-progress::after {
  content: ""; display: block;
  width: 34%;
  height: 100%;
  background: var(--ink);
  border-radius: 99px;
  animation: iv-progress 18s linear infinite;
}
@keyframes iv-progress {
  0% { width: 0; }
  100% { width: 100%; }
}
.iv-wave {
  display: flex; align-items: center;
  height: 68px;
  gap: 2px;
}
.iv-wave .bar {
  flex: 1;
  background: var(--ink-2);
  border-radius: 1.5px;
  min-height: 6%;
  height: 30%;
  transform-origin: center;
  transition: height 0.18s ease, background 0.18s ease;
}
.iv-wave .bar.hot {
  background: var(--ink);
}

/* Transcript */
.iv-transcript {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 18px 20px;
  flex: 1;
  min-height: 220px;
  display: flex; flex-direction: column; gap: 12px;
  overflow: hidden;
  position: relative;
}
.iv-transcript-head {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
  display: flex; justify-content: space-between;
}
.iv-transcript-lines {
  display: flex; flex-direction: column; gap: 14px;
  flex: 1;
  overflow: hidden;
}
.tx-line {
  display: flex; gap: 12px;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.4s ease, transform 0.4s cubic-bezier(.2,.7,.2,1);
}
.tx-line.visible { opacity: 1; transform: none; }
.tx-line.fading { opacity: 0.35; }
.tx-line .tag {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--ink-3);
  min-width: 78px;
  padding-top: 2px;
  flex-shrink: 0;
}
.tx-line .tag.them { color: var(--ink); font-weight: 500; }
.tx-line .text {
  font-size: 13px;
  color: var(--ink-2);
  line-height: 1.5;
  flex: 1;
}
.tx-line.active .text::after {
  content: "";
  display: inline-block;
  width: 6px;
  height: 12px;
  background: var(--ink);
  vertical-align: -1px;
  margin-left: 2px;
  animation: tx-caret 1s step-end infinite;
}
@keyframes tx-caret { 50% { opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  .r-row.progress .r-dot,
  .iv-head .live::before,
  .tx-line.active .text::after,
  .iv-wave .bar { animation: none !important; }
  .iv-progress::after { animation: none; width: 34%; }
  .tx-line { opacity: 1; transform: none; }
}

/* ════════════════════════════════════════════════════════════════ */
/* PILLAR 3 · INSIGHTS                                              */
/* ════════════════════════════════════════════════════════════════ */

.p3-stage {
  display: flex; flex-direction: column;
  gap: 14px;
  min-height: 0;
}
.p3-board {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 12px;
  flex: 1;
  min-height: 340px;
}
@media (max-width: 900px) { .p3-board { grid-template-columns: 1fr; grid-template-rows: auto; } }

.p3-card {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px 18px;
  display: flex; flex-direction: column;
  gap: 10px;
  min-height: 0;
  min-width: 0;
  overflow: hidden;
  transition: box-shadow 0.4s ease, border-color 0.4s ease;
}
.p3-card.highlight {
  box-shadow: 0 0 0 2px color-mix(in oklab, var(--ink) 18%, transparent);
  border-color: var(--ink-3);
}
.p3-card .card-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 12px;
}
.p3-card .card-title {
  font-family: 'Georgia', serif;
  font-size: 18px;
  letter-spacing: -0.015em;
  color: var(--ink);
  margin: 0;
  line-height: 1.2;
}
.p3-card .card-meta {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.p3-card.bars { grid-column: 1 / 2; grid-row: 1 / 3; }
.p3-card.bars { gap: 14px; }

/* KPI strip inside bars card */
.bars-kpis {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 4px;
}
.kpi {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  display: flex; flex-direction: column; gap: 2px;
  min-width: 0;
}
.kpi-v {
  font-family: 'Georgia', serif;
  font-size: 26px;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.kpi-v .u {
  font-size: 14px;
  color: var(--ink-3);
  margin-left: 1px;
  letter-spacing: 0;
}
.kpi-l {
  font-size: 11px;
  color: var(--ink-2);
  line-height: 1.3;
  margin-top: 2px;
}
.kpi-d {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 9.5px;
  letter-spacing: 0.04em;
  color: var(--ink-3);
  margin-top: 4px;
  text-transform: none;
}
.kpi-d.up { color: var(--ink); }
.kpi-d.flat { color: var(--ink-3); }

/* Section dividers within the bars card */
.bars-divider {
  display: flex; align-items: center; gap: 10px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 9.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-top: 2px;
}
.bars-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

/* Segment comparison rows */
.segment-rows {
  display: flex; flex-direction: column;
  gap: 8px;
}
.seg-row {
  display: grid;
  grid-template-columns: 150px 1fr 44px 40px;
  align-items: center;
  gap: 12px;
  font-size: 12px;
}
.seg-row .seg-label {
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.seg-row .seg-label em {
  font-style: normal;
  color: var(--ink-3);
  font-size: 11px;
  margin-left: 4px;
}
.seg-row .seg-track {
  position: relative;
  height: 8px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 99px;
  overflow: visible;
}
.seg-row .seg-fill {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  background: var(--ink-2);
  border-radius: 99px;
}
.seg-row .seg-marker {
  position: absolute;
  top: -4px; bottom: -4px;
  width: 2px;
  background: var(--accent);
  transform: translateX(-1px);
  opacity: 0.85;
}
.seg-row .seg-val {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  color: var(--ink);
  text-align: right;
  letter-spacing: 0.02em;
}
.seg-row .seg-n {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  color: var(--ink-3);
  text-align: right;
  letter-spacing: 0.02em;
}
.p3-card.wtp { grid-column: 2 / 3; grid-row: 1 / 2; }
.p3-card.themes { grid-column: 2 / 3; grid-row: 2 / 3; }

@media (max-width: 900px) {
  .p3-card.bars,
  .p3-card.wtp,
  .p3-card.themes {
    grid-column: 1 / -1;
    grid-row: auto;
  }
}

.p3-card .card-head > div { min-width: 0; }
.p3-card .card-sub {
  margin-top: 4px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.04em;
  color: var(--ink-3);
  line-height: 1.3;
}

/* Bars chart */
.bar-rows {
  display: flex; flex-direction: column;
  gap: 8px;
  flex: 1;
  justify-content: center;
}
.bar-row {
  display: grid;
  grid-template-columns: 140px 1fr 44px;
  align-items: center;
  gap: 14px;
  font-size: 12.5px;
  height: 22px;
}
.bar-rows { gap: 6px; justify-content: flex-start; }
.bar-row .label {
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
}
.bar-row .track {
  position: relative;
  height: 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 99px;
  overflow: hidden;
}
.bar-row .fill {
  height: 100%;
  background: var(--ink);
  border-radius: 99px;
  transition: width 1.1s cubic-bezier(.2,.7,.2,1);
}
.bar-row .val {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  color: var(--ink-3);
  text-align: right;
  letter-spacing: 0.02em;
}
.bar-row.accent .fill { background: var(--ink); }
.bar-row:not(.accent) .fill { background: var(--ink-2); }

.card-foot {
  margin-top: 4px;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
  display: flex; align-items: center; gap: 10px;
  flex-wrap: wrap;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10.5px;
  letter-spacing: 0.04em;
  color: var(--ink-3);
}
.card-foot .foot-k { text-transform: uppercase; letter-spacing: 0.1em; }
.card-foot .foot-v { color: var(--ink); }
.card-foot .foot-v.up::before { content: ""; }
.card-foot .foot-v.up { color: var(--ink); }
.card-foot .foot-v.down { color: var(--ink-2); }
.card-foot .foot-sep { color: var(--ink-4); }

/* Willingness-to-pay stacked bar */
.wtp-stat {
  display: flex; align-items: baseline; gap: 12px;
  padding-bottom: 4px;
}
.wtp-big {
  font-family: 'Georgia', serif;
  font-size: 34px;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.wtp-lbl {
  color: var(--ink-2);
  font-size: 12px;
  line-height: 1.35;
  max-width: 20ch;
}
.wtp-stack {
  display: flex;
  width: 100%;
  height: 14px;
  border-radius: 99px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface);
}
.wtp-stack .seg { display: block; height: 100%; }
.wtp-stack .seg.s1 { background: var(--ink); }
.wtp-stack .seg.s2 { background: var(--ink-2); }
.wtp-stack .seg.s3 { background: var(--ink-3); }
.wtp-stack .seg.s4 { background: var(--ink-4); }

.wtp-legend {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 14px;
}
.wtp-legend .wl {
  display: grid;
  grid-template-columns: 10px 1fr auto;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  color: var(--ink-2);
  min-width: 0;
}
.wtp-legend .wl .sw {
  width: 10px; height: 10px;
  border-radius: 2px;
}
.wtp-legend .wl .sw.s1 { background: var(--ink); }
.wtp-legend .wl .sw.s2 { background: var(--ink-2); }
.wtp-legend .wl .sw.s3 { background: var(--ink-3); }
.wtp-legend .wl .sw.s4 { background: var(--ink-4); }
.wtp-legend .wl .wl-l {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.wtp-legend .wl .wl-v {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  color: var(--ink-3);
}

@media (max-width: 720px) {
  .p3-board {
    gap: 10px;
    min-height: 0;
  }
  .p3-card {
    padding: 14px;
    gap: 8px;
  }
  .p3-card .card-head {
    align-items: flex-start;
    gap: 8px;
  }
  .p3-card .card-title { font-size: 16px; }
  .p3-card .card-meta { font-size: 9px; letter-spacing: 0.08em; }
  .p3-card .card-sub { font-size: 9px; }

  .bars-kpis {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .p3-card .bar-row {
    grid-template-columns: minmax(84px, 36%) 1fr auto;
    gap: 8px;
    font-size: 11.5px;
    height: auto;
    min-height: 20px;
  }
  .p3-card .bar-row .val { font-size: 10px; }

  .p3-card .segment-rows { gap: 6px; }
  .p3-card .seg-row {
    grid-template-columns: minmax(92px, 42%) 1fr auto;
    grid-template-areas:
      "label track val"
      "label track n";
    gap: 6px 8px;
    font-size: 11px;
  }
  .p3-card .seg-row .seg-label {
    grid-area: label;
    white-space: normal;
    line-height: 1.2;
  }
  .p3-card .seg-row .seg-track { grid-area: track; }
  .p3-card .seg-row .seg-val {
    grid-area: val;
    font-size: 10px;
  }
  .p3-card .seg-row .seg-n {
    grid-area: n;
    font-size: 9.5px;
  }

  .p3-card.wtp .wtp-stat {
    flex-wrap: wrap;
    gap: 8px;
  }
  .p3-card.wtp .wtp-big { font-size: 30px; }
  .p3-card.wtp .wtp-lbl {
    flex: 1 1 180px;
    max-width: none;
  }
  .p3-card.wtp .wtp-legend {
    grid-template-columns: 1fr;
    gap: 6px;
  }
}

/* Themes list */
.themes-list {
  list-style: none;
  padding: 0; margin: 0;
  display: flex; flex-direction: column;
  flex: 1;
}
.theme {
  display: grid;
  grid-template-columns: 22px 1fr auto auto;
  align-items: center;
  gap: 12px;
  padding: 6px 0;
  border-bottom: 1px dashed var(--line);
  font-size: 13px;
}
.theme:last-child { border-bottom: none; }
.theme .t-rank {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  color: var(--ink-4);
  letter-spacing: 0.08em;
}
.theme .t-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.theme .t-label {
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.theme .t-sub {
  font-size: 11px;
  color: var(--ink-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.theme .t-count {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  color: var(--ink);
  text-align: right;
  letter-spacing: 0.02em;
}
.theme .t-trend {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.04em;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink-2);
  white-space: nowrap;
}
.theme .t-trend.up { color: var(--ink); border-color: var(--ink-4); }
.theme .t-trend.down { color: var(--ink-3); }
.theme .t-trend.flat { color: var(--ink-4); }

/* Ask input */
.p3-ask {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: 12px;
  padding: 14px 18px;
  display: flex; align-items: center; gap: 14px;
  transition: border-color 0.3s ease;
}
.p3-ask:focus-within { border-color: var(--ink); }
.p3-ask .ic {
  width: 22px; height: 22px;
  display: grid; place-items: center;
  color: var(--ink-3);
  flex-shrink: 0;
}
.p3-ask .ic svg { width: 16px; height: 16px; }
.p3-ask .input-line {
  flex: 1;
  font-size: 15px;
  color: var(--ink);
  min-height: 22px;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
}
.p3-ask .input-line::after {
  content: "";
  display: inline-block;
  width: 7px; height: 16px;
  background: var(--ink);
  vertical-align: -2px;
  margin-left: 2px;
  animation: tx-caret 0.9s step-end infinite;
}
.p3-ask .input-line.faded {
  color: var(--ink-4);
}
.p3-ask .ask-btn {
  padding: 8px 16px;
  border-radius: 99px;
  background: var(--ink);
  color: var(--bg);
  font-size: 13px;
  border: none;
  flex-shrink: 0;
  display: inline-flex; align-items: center; gap: 6px;
}

/* Ask response thread */
.p3-thread {
  display: flex; flex-direction: column;
  gap: 10px;
  min-height: 0;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.45s ease;
}
.p3-thread.open { max-height: 320px; }
.p3-msg {
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.55;
  max-width: 90%;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.35s ease, transform 0.35s ease;
}
.p3-msg.visible { opacity: 1; transform: none; }
.p3-msg.user {
  align-self: flex-end;
  background: var(--accent);
  color: var(--accent-ink);
}
.p3-msg.agent {
  align-self: flex-start;
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--ink);
}
.p3-msg .label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 9.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 4px;
}
.p3-msg.user .label { color: rgba(15,14,12,0.55); }
.p3-msg .grounding {
  display: flex; flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
}
.p3-msg .g-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 9px;
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: 99px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10.5px;
  color: var(--ink-3);
  letter-spacing: 0.02em;
}

/* Thinking indicator */
.p3-msg .think-dots {
  display: inline-flex; gap: 5px;
  align-items: center;
  padding: 2px 0;
}
.p3-msg .think-dots span {
  width: 6px; height: 6px;
  border-radius: 99px;
  background: var(--ink-3);
  opacity: 0.35;
  animation: think-bounce 1.1s ease-in-out infinite;
}
.p3-msg .think-dots span:nth-child(2) { animation-delay: 0.15s; }
.p3-msg .think-dots span:nth-child(3) { animation-delay: 0.3s; }
@keyframes think-bounce {
  0%, 60%, 100% { opacity: 0.3; transform: translateY(0); }
  30%           { opacity: 1;   transform: translateY(-3px); }
}

@media (prefers-reduced-motion: reduce) {
  .bar-row .fill,
  .donut .ring,
  .p3-thread,
  .p3-msg { transition: none; }
  .p3-ask .input-line::after { animation: none; }
}

/* ── CTA band (shared) ─────────────────────────────────────────── */
.cta-band {
  text-align: center;
  padding: 140px 0;
}
.cta-band h2 { max-width: 22ch; margin: 0 auto 32px; }
.cta-band p { color: var(--ink-2); max-width: 52ch; margin: 0 auto 40px; font-size: 18px; }
