/* ============================================================
   Ducere · Ava inbound-call demo
   Light "clinic daylight" base. Night scenario darkens the room.
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; }

:root {
  /* Surfaces — warm porcelain, the way a good treatment room reads */
  --paper:    #FAF8F5;
  --paper-2:  #F2EDE6;
  --card:     #FFFFFF;
  --card-2:   #F7F4F0;

  /* Ink */
  --ink:      #14161A;
  --ink-2:    #5C6068;
  --ink-3:    #8E9299;
  --line:     rgba(20,22,26,.09);
  --line-2:   rgba(20,22,26,.16);

  /* Accent is injected from CONFIG in script.js */
  --accent:      #B8945F;
  --accent-rgb:  184,148,95;

  --ok:       #4E7C63;
  --ok-rgb:   78,124,99;

  --shadow:   0 1px 2px rgba(20,22,26,.04), 0 12px 32px -14px rgba(20,22,26,.16);
  --shadow-lg:0 2px 4px rgba(20,22,26,.04), 0 32px 64px -24px rgba(20,22,26,.24);

  --radius:   18px;
  --radius-sm:12px;

  --display: Didot, "Hoefler Text", "Big Caslon", "Playfair Display", Georgia, "Times New Roman", serif;
  --body: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;

  --ease: cubic-bezier(.22,.61,.36,1);
}

html, body { height: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* Daylight from above. Both scenarios run on it — the 11:47 PM call is told
   by the clock and the "clinic closed" state, not by dimming the room. */
.room {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(120% 70% at 50% -12%, rgba(255,255,255,.9) 0%, rgba(255,255,255,0) 60%),
    radial-gradient(80% 50% at 50% -6%, rgba(var(--accent-rgb),.10) 0%, rgba(var(--accent-rgb),0) 70%);
}

.stage {
  position: relative;
  z-index: 1;
  max-width: 1240px;
  margin: 0 auto;
  padding: 20px 32px 24px;
}

/* ============================================================
   Top bar
   ============================================================ */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.brand { display: flex; align-items: center; gap: 11px; }

.brand-tile {
  width: 34px; height: 34px;
  border-radius: 9px;
  background: #14161A;
  display: grid; place-items: center;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.08);
}
.brand-tile img { width: 13px; display: block; }

.brand-name {
  font-family: var(--body);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--ink);
}

.topbar-mid { text-align: center; display: flex; flex-direction: column; gap: 3px; }

.clock {
  font-family: var(--mono);
  font-size: 17px;
  letter-spacing: .01em;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}
.clock-label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.line-state {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 3px rgba(var(--ok-rgb),.16);
  transition: background-color .4s var(--ease), box-shadow .4s var(--ease);
}
.dot.is-live { background: var(--accent); box-shadow: 0 0 0 3px rgba(var(--accent-rgb),.2); }

/* ============================================================
   Act one — the live line
   ============================================================ */
.call-hero {
  text-align: center;
  padding: 44px 20px 46px;
  border-bottom: 1px solid var(--line);
}

.call-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.live-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 rgba(var(--accent-rgb),.55);
  animation: livePulse 2.4s var(--ease) infinite;
}
@keyframes livePulse {
  0%   { box-shadow: 0 0 0 0   rgba(var(--accent-rgb),.5); }
  70%  { box-shadow: 0 0 0 9px rgba(var(--accent-rgb),0); }
  100% { box-shadow: 0 0 0 0   rgba(var(--accent-rgb),0); }
}

.call-hero h1 {
  margin: 14px 0 0;
  font-family: var(--display);
  font-size: 27px;
  font-weight: 400;
  letter-spacing: .01em;
  color: var(--ink-2);
}

.call-number {
  display: inline-block;
  margin: 6px 0 0;
  font-family: var(--display);
  font-size: clamp(40px, 6vw, 74px);
  line-height: 1.06;
  letter-spacing: -.012em;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color .3s var(--ease), border-color .3s var(--ease);
}
.call-number:hover { color: var(--accent); border-bottom-color: rgba(var(--accent-rgb),.5); }

.call-note {
  margin: 16px auto 0;
  max-width: 460px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink-3);
}

/* ============================================================
   Act two — the reveal
   ============================================================ */
.reveal-head { padding: 28px 0 0; }

.reveal-head h2 {
  margin: 0;
  font-family: var(--display);
  font-size: 25px;
  font-weight: 400;
  letter-spacing: .005em;
}
.reveal-head p {
  margin: 6px 0 0;
  max-width: 560px;
  font-size: 13.5px;
  color: var(--ink-3);
}

/* ============================================================
   Scenario controls
   ============================================================ */
.controls {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  padding: 16px 0 18px;
}

.scenarios { display: flex; gap: 12px; flex: 1; min-width: 0; }

.scn {
  flex: 1 1 0;
  min-width: 0;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 11px 17px 12px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font: inherit;
  color: inherit;
  box-shadow: var(--shadow);
  transition: transform .3s var(--ease), border-color .3s var(--ease),
              box-shadow .3s var(--ease);
  position: relative;
  overflow: hidden;
}
.scn::after {
  content: "";
  position: absolute;
  left: 17px; right: 17px; bottom: 0;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .5s var(--ease);
}
.scn:hover { transform: translateY(-2px); border-color: var(--line-2); }
.scn.is-active::after { transform: scaleX(1); }
.scn.is-active { border-color: rgba(var(--accent-rgb),.45); }

.scn-time {
  font-family: var(--mono);
  font-size: 15px;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}
.scn-label {
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: -.01em;
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}
.scn-sub { font-size: 12.5px; color: var(--ink-3); }

.scn-badge {
  font-family: var(--mono);
  font-size: 8px;
  font-weight: 400;
  letter-spacing: .14em;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 999px;
  border: 1px dashed var(--line-2);
  color: var(--ink-3);
}

.transport { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

.tbtn {
  font: inherit;
  font-size: 12.5px;
  font-weight: 500;
  padding: 9px 18px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background: transparent;
  color: var(--ink-2);
  cursor: pointer;
  transition: color .25s var(--ease), border-color .25s var(--ease), background-color .25s var(--ease);
}
.tbtn:hover:not(:disabled) { color: var(--ink); border-color: var(--ink-3); }
.tbtn:disabled { opacity: .35; cursor: default; }

.keyhint {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-left: 6px;
}

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

/* ============================================================
   Grid
   ============================================================ */
.grid {
  display: grid;
  grid-template-columns: minmax(0, 1.42fr) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}
.rail { display: flex; flex-direction: column; gap: 20px; min-width: 0; }

.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* ============================================================
   HERO — the call
   ============================================================ */
/* Fixed height on desktop: the transcript flexes, so the panel never grows
   when the booking card and wrap-up appear. Nothing jumps mid-demo. */
.hero {
  padding: 22px 26px 20px;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  height: 560px;
}

.hero-head { display: flex; align-items: center; gap: 16px; flex-shrink: 0; }

.ava { position: relative; width: 52px; height: 52px; flex-shrink: 0; }

.ava-disc {
  position: absolute; inset: 0;
  border-radius: 50%;
  background: linear-gradient(150deg, rgba(var(--accent-rgb),.9), rgba(var(--accent-rgb),.62));
  color: #fff;
  display: grid; place-items: center;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .12em;
  box-shadow: 0 6px 18px -8px rgba(var(--accent-rgb),.9);
}
.ava-ring {
  position: absolute; inset: 0;
  border-radius: 50%;
  border: 1.5px solid rgba(var(--accent-rgb),.55);
  opacity: 0;
}
.ava-ring.is-ringing { animation: ringOut 1s var(--ease) 1; }
@keyframes ringOut {
  0%   { opacity: .9; transform: scale(1); }
  100% { opacity: 0;  transform: scale(2.05); }
}

.ava-id { flex: 1; min-width: 0; }
.ava-id h2 {
  margin: 0;
  font-family: var(--display);
  font-size: 30px;
  font-weight: 400;
  letter-spacing: .005em;
  line-height: 1.1;
}
.ava-id p {
  margin: 4px 0 0;
  font-size: 12.5px;
  color: var(--ink-3);
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
}
#heroPhase[hidden] { display: none; }

.call-meta { text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }

.status-pill {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: .16em;
  text-transform: uppercase;
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  color: var(--ink-2);
  white-space: nowrap;
  transition: color .3s var(--ease), border-color .3s var(--ease), background-color .3s var(--ease);
}
.status-pill.is-ringing { color: var(--accent); border-color: rgba(var(--accent-rgb),.5); background: rgba(var(--accent-rgb),.07); }
.status-pill.is-live    { color: #fff; background: var(--accent); border-color: transparent; }
.status-pill.is-done    { color: var(--ok); border-color: rgba(var(--ok-rgb),.45); background: rgba(var(--ok-rgb),.08); }

.timer {
  font-family: var(--mono);
  font-size: 26px;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.01em;
  color: var(--ink-3);
  line-height: 1;
  transition: color .3s var(--ease);
}
.timer.is-live { color: var(--ink); }

/* caller strip */
.caller {
  margin-top: 16px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  background: var(--card-2);
  border: 1px solid transparent;
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity .5s var(--ease), transform .5s var(--ease),
              background-color .6s var(--ease), border-color .6s var(--ease);
}
.caller.is-on { opacity: 1; transform: none; }
.caller.is-ringing { border-color: rgba(var(--accent-rgb),.35); background: rgba(var(--accent-rgb),.06); }

.caller-left { display: flex; align-items: center; gap: 13px; min-width: 0; }
.caller-icon {
  width: 32px; height: 32px;
  border-radius: 9px;
  display: grid; place-items: center;
  background: rgba(var(--accent-rgb),.12);
  color: var(--accent);
  flex-shrink: 0;
}
.caller-icon svg { width: 16px; height: 16px; }
.caller-name { display: block; font-size: 14px; font-weight: 600; letter-spacing: -.01em; }
.caller-sub {
  display: block;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-top: 1px;
}

.ring-badge {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-3);
  white-space: nowrap;
  transition: color .3s var(--ease);
}
.ring-badge.is-ringing { color: var(--accent); }
.ring-badge.is-answered {
  color: var(--ok);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.ring-badge.is-answered::before {
  content: "";
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--ok);
}

/* waveform */
.wave {
  display: flex;
  align-items: center;
  gap: 3px;
  height: 26px;
  margin: 14px 2px 2px;
  flex-shrink: 0;
  opacity: 0;
  transition: opacity .4s var(--ease);
}
.wave.is-on { opacity: 1; }
.wave[hidden] { display: none; }
.wave i {
  display: block;
  width: 3px;
  height: 3px;
  border-radius: 2px;
  background: var(--line-2);
  transition: height .16s ease-out, background-color .3s var(--ease);
}
.wave.spk-ava i   { background: rgba(var(--accent-rgb),.75); }
.wave.spk-caller i{ background: var(--ink-3); }

/* transcript */
.transcript-wrap { position: relative; flex: 1; min-height: 0; margin-top: 6px; }

.transcript {
  height: 100%;
  overflow-y: auto;
  padding-right: 6px;
  scrollbar-width: thin;
}
.transcript::-webkit-scrollbar { width: 4px; }
.transcript::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 4px; }

.line {
  padding: 11px 0 12px;
  border-top: 1px solid var(--line);
  animation: lineIn .45s var(--ease) both;
}
.line:first-child { border-top: 0; }
@keyframes lineIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: none; }
}

.line-who {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--ink-3);
  display: block;
  margin-bottom: 5px;
}
/* .from-ava, not .ava — .ava is the avatar and would resize the whole row. */
.line.from-ava .line-who { color: var(--accent); }

.line-text {
  font-size: 15.5px;
  line-height: 1.55;
  letter-spacing: -.008em;
  color: var(--ink-2);
}
.line.from-ava .line-text { color: var(--ink); }

/* Message mode — the same transcript area rendered as a thread.
   Sides match the SMS panel: the clinic on the right, the person on the left. */
.dm {
  display: flex;
  margin-top: 9px;
  animation: lineIn .45s var(--ease) both;
}
.dm:first-child { margin-top: 0; }
.dm.from-ava    { justify-content: flex-end; }
.dm.from-caller { justify-content: flex-start; }

.dm-bubble {
  max-width: 74%;
  padding: 11px 15px;
  font-size: 14.5px;
  line-height: 1.45;
  letter-spacing: -.005em;
  border-radius: 18px;
}
.dm.from-caller .dm-bubble {
  background: var(--card-2);
  color: var(--ink);
  border-bottom-left-radius: 5px;
}
.dm.from-ava .dm-bubble {
  background: var(--accent);
  color: #fff;
  border-bottom-right-radius: 5px;
}
/* The accent caret disappears against Ava's own bubble. */
.dm.from-ava .caret { background: #fff; }

.caret {
  display: inline-block;
  width: 2px;
  height: 1em;
  background: var(--accent);
  vertical-align: -2px;
  margin-left: 2px;
  animation: blink 1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.idle-note {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  text-align: center;
  transition: opacity .4s var(--ease);
}
.idle-note p {
  margin: 0;
  max-width: 300px;
  font-family: var(--display);
  font-size: 19px;
  line-height: 1.45;
  color: var(--ink-3);
}
.idle-note[hidden] { display: none; }

/* booking result */
.booking {
  margin-top: 14px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 17px;
  border-radius: var(--radius-sm);
  background: rgba(var(--ok-rgb),.07);
  border: 1px solid rgba(var(--ok-rgb),.28);
  animation: bookIn .6s var(--ease) both;
}
.booking[hidden] { display: none; }
@keyframes bookIn {
  from { opacity: 0; transform: translateY(12px) scale(.985); }
  to   { opacity: 1; transform: none; }
}
.booking-mark {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--ok);
  color: #fff;
  display: grid; place-items: center;
  flex-shrink: 0;
}
.booking-mark svg { width: 15px; height: 15px; }
.booking-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.booking-label {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ok);
}
.booking-when {
  font-family: var(--display);
  font-size: 21px;
  line-height: 1.2;
  color: var(--ink);
}
.booking-what { font-size: 12.5px; color: var(--ink-2); }

/* wrap-up */
.wrap-strip {
  margin-top: 12px;
  padding-top: 12px;
  flex-shrink: 0;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-3);
  animation: lineIn .5s var(--ease) both;
}
.wrap-strip[hidden] { display: none; }
.wrap-strip b { color: var(--ink); font-weight: 500; }

/* ============================================================
   Rail panels
   ============================================================ */
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.panel-head h3 {
  margin: 0;
  font-family: var(--display);
  font-size: 19px;
  font-weight: 400;
  letter-spacing: .005em;
}
.panel-sub {
  margin: 4px 0 0;
  font-size: 12.5px;
  color: var(--ink-3);
}

.phase-badge {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .14em;
  text-transform: uppercase;
  padding: 4px 9px;
  border-radius: 999px;
  border: 1px dashed var(--line-2);
  color: var(--ink-3);
  white-space: nowrap;
  cursor: help;
}

/* ── SMS ─────────────────────────────────────────────────── */
.sms { padding: 16px 20px 18px; }

.thread {
  margin-top: 13px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-height: 150px;
}

.bubble {
  max-width: 86%;
  padding: 9px 13px;
  font-size: 13px;
  line-height: 1.42;
  border-radius: 16px;
  animation: bubbleIn .45s var(--ease) both;
}
@keyframes bubbleIn {
  from { opacity: 0; transform: translateY(8px) scale(.97); }
  to   { opacity: 1; transform: none; }
}
.bubble.out {
  align-self: flex-end;
  background: var(--accent);
  color: #fff;
  border-bottom-right-radius: 5px;
}
.bubble.in {
  align-self: flex-start;
  background: var(--card-2);
  color: var(--ink);
  border-bottom-left-radius: 5px;
}

.stamp {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-3);
  align-self: center;
  padding: 2px 0;
}

.queued {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 6px 11px;
  border-radius: 10px;
  border: 1px dashed var(--line-2);
  color: var(--ink-3);
  font-size: 12px;
  animation: bubbleIn .45s var(--ease) both;
}
.queued b {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: .12em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--ink-2);
  white-space: nowrap;
}

.thread-empty {
  margin: auto 0;
  text-align: center;
  font-size: 13px;
  color: var(--ink-3);
}

/* ── CRM ─────────────────────────────────────────────────── */
.crm { padding: 18px 20px 18px; }

.board {
  margin-top: 13px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.col { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.col-label {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.col-slot {
  min-height: 68px;
  border-radius: var(--radius-sm);
  background: var(--card-2);
  border: 1px solid transparent;
  padding: 7px;
  transition: background-color .4s var(--ease), border-color .4s var(--ease);
}
.col[data-col="booked"] .col-slot.is-hot {
  background: rgba(var(--ok-rgb),.08);
  border-color: rgba(var(--ok-rgb),.3);
}

.lead-card {
  background: var(--card);
  border: 1px solid var(--line-2);
  border-radius: 9px;
  padding: 9px 10px;
  box-shadow: var(--shadow);
}
.lead-name { font-size: 12.5px; font-weight: 600; letter-spacing: -.01em; display: block; }
.lead-meta {
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-3);
  display: block;
  margin-top: 3px;
}
.lead-src {
  display: inline-block;
  margin-top: 7px;
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(var(--accent-rgb),.13);
  color: var(--accent);
}

.crm-stats {
  margin-top: 14px;
  padding-top: 13px;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.crm-stats > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.crm-k {
  font-family: var(--mono);
  font-size: 16px;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  letter-spacing: -.02em;
}
.crm-v {
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-3);
}

/* ============================================================
   Act three — the arithmetic
   ============================================================ */
.calc {
  margin-top: 34px;
  padding-top: 30px;
  border-top: 1px solid var(--line);
}
.calc[hidden] { display: none; }

.calc-head h2 {
  margin: 0;
  font-family: var(--display);
  font-size: 25px;
  font-weight: 400;
  letter-spacing: .005em;
}
.calc-head p {
  margin: 6px 0 0;
  font-size: 13.5px;
  color: var(--ink-3);
}

.calc-body {
  margin-top: 22px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 26px;
  align-items: stretch;
}

/* ── Inputs ─────────────────────────────────────────────── */
.calc-inputs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 20px;
  align-content: start;
}

/* space-between keeps the two slider tracks on one line with each other
   even when one label wraps and the other doesn't. */
.field {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

.field label {
  font-size: 12.5px;
  color: var(--ink-2);
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.field-out {
  font-family: var(--mono);
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
  color: var(--accent);
}

.field input[type="number"] {
  width: 100%;
  min-width: 0;
  font-family: var(--mono);
  font-size: 17px;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  background: var(--card);
  border: 1px solid var(--line-2);
  border-radius: 10px;
  padding: 10px 13px;
  transition: border-color .25s var(--ease), box-shadow .25s var(--ease);
}
.field input[type="number"]:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb),.14);
}

.field-money { position: relative; display: flex; align-items: center; }
.field-money .field-prefix {
  position: absolute;
  left: 13px;
  font-family: var(--mono);
  font-size: 17px;
  color: var(--ink-3);
  pointer-events: none;
}
.field-money input[type="number"] { padding-left: 28px; }

/* Range: the two figures that are assumptions, so they stay draggable. */
.range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 3px;
  margin: 14px 0 8px;
  background: var(--line-2);
  border-radius: 3px;
  cursor: pointer;
}
.range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 17px; height: 17px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--card);
  box-shadow: 0 1px 5px rgba(20,22,26,.25);
  cursor: pointer;
}
.range::-moz-range-thumb {
  width: 15px; height: 15px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--card);
  box-shadow: 0 1px 5px rgba(20,22,26,.25);
  cursor: pointer;
  border-color: var(--card);
}
.range:focus-visible { outline: 2px solid var(--accent); outline-offset: 6px; }

/* ── Result ─────────────────────────────────────────────── */
.calc-result {
  background: rgba(var(--accent-rgb),.055);
  border: 1px solid rgba(var(--accent-rgb),.24);
  border-radius: var(--radius);
  padding: 22px 26px 20px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

.calc-label {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--accent);
}

.calc-total {
  font-family: var(--display);
  font-size: clamp(36px, 4.4vw, 58px);
  line-height: 1.05;
  letter-spacing: -.015em;
  color: var(--ink);
  margin-top: 6px;
}

.calc-annual {
  font-size: 13.5px;
  color: var(--ink-2);
  margin-top: 4px;
}

.calc-chain {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(var(--accent-rgb),.22);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .06em;
  color: var(--ink-3);
}

.calc-note {
  margin: 18px 0 0;
  max-width: 620px;
  font-size: 12px;
  line-height: 1.55;
  color: var(--ink-3);
}

/* ============================================================
   Footer
   ============================================================ */
.foot {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.foot a { color: var(--ink-2); text-decoration: none; border-bottom: 1px solid var(--line-2); }
.foot a:hover { color: var(--accent); border-color: var(--accent); }
.foot-contact { display: flex; gap: 18px; flex-wrap: wrap; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 1080px) {
  .grid { grid-template-columns: 1fr; }
  .hero { height: auto; }
  .transcript { height: auto; max-height: none; }
}

@media (max-width: 760px) {
  .stage { padding: 20px 18px 32px; }
  .topbar { flex-wrap: wrap; row-gap: 14px; }
  .topbar-mid { order: 3; width: 100%; text-align: left; align-items: flex-start; }
  .controls { flex-direction: column; align-items: stretch; }
  /* flex-basis 0 would zero the HEIGHT once these stack — size to content. */
  .scenarios { flex-direction: column; }
  .scn { flex: 0 0 auto; }
  .transport { justify-content: flex-start; }
  .caller { flex-direction: column; align-items: flex-start; gap: 10px; }
  .call-hero { padding: 32px 4px 34px; }
  .reveal-head h2 { font-size: 22px; }
  .hero { padding: 20px 18px; }
  .ava-id h2 { font-size: 25px; }
  .timer { font-size: 21px; }
  .board { grid-template-columns: 1fr; }
  .col-slot { min-height: 0; }
  .crm-stats { grid-template-columns: 1fr 1fr; }
  .calc-body { grid-template-columns: 1fr; gap: 22px; }
  .calc-inputs { grid-template-columns: 1fr; }
  .calc-head h2 { font-size: 22px; }
}

/* ============================================================
   Reduced motion — keep the sequence, drop the flourishes
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  .ava-ring.is-ringing { animation: none; }
  .caret { animation: none; }
  .wave i { transition: none; }
  .line, .booking, .bubble, .queued, .wrap-strip { animation-duration: .01ms; }
  .live-dot { animation: none; }
  .scn, .caller { transition-duration: .01ms; }
}
