/* Pickup — AI front desk concept demo. Larpcore Labs house style: ink, stone and tape red. */

@font-face { font-family: 'PK Display'; src: url('../fonts/Archivo-var.woff2') format('woff2'); font-weight: 100 900; font-stretch: 62% 125%; font-display: swap; }
@font-face { font-family: 'PK UI'; src: url('../fonts/inter-tight-latin-wght-normal.woff2') format('woff2'); font-weight: 100 900; font-display: swap; }
@font-face { font-family: 'PK Text'; src: url('../fonts/Geist-var.woff2') format('woff2'); font-weight: 100 900; font-display: swap; }
@font-face { font-family: 'PK Mono'; src: url('../fonts/jetbrains-mono-latin-400-normal.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'PK Mono'; src: url('../fonts/jetbrains-mono-latin-500-normal.woff2') format('woff2'); font-weight: 500; font-display: swap; }

:root {
  --ink: #0b0807;
  --ink-2: #131010;
  --ink-3: #1c1817;
  --ink-4: #2a2523;
  --stone: #dedcd3;
  --stone-2: #d2cfc5;
  --stone-hi: #ebe9e2;
  --stone-lo: #c4c0b5;
  --red: #fe3939;
  --red-lap: #d42424;
  --red-dim: rgba(254, 57, 57, 0.16);
  --chat-bg: #0f1114;
  --bub-in: #22262b;
  --chat-fg: #e9edef;
  --muted: rgba(222, 220, 211, 0.56);
  --faint: rgba(222, 220, 211, 0.14);
  --line: rgba(222, 220, 211, 0.1);

  --display: 'PK Display', 'Arial Narrow', Impact, sans-serif;
  --ui: 'PK UI', 'Helvetica Neue', Arial, sans-serif;
  --text: 'PK Text', 'PK UI', system-ui, sans-serif;
  --mono: 'PK Mono', ui-monospace, Menlo, Consolas, monospace;

  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --pad: 20px;
  --gap: 16px;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--stone);
  font: 400 14px/1.4 var(--ui);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: none;
}
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
input { font: inherit; color: inherit; }
a { color: inherit; }
.mono { font-family: var(--mono); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
svg.ic { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; flex: none; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }

/* ---------- App frame ---------- */
/* the app fills the window, but never gets shorter than --app-min: below that the page scrolls (with the
   transport pinned to the bottom) instead of squashing the panes */
.app {
  --app-min: 700px;
  height: 100%;
  height: max(100dvh, var(--app-min));
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  grid-template-areas: 'top' 'stats' 'stage' 'transport';
}
.app::before {
  /* faint paper grain so the ink isn't flat */
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.5;
  background: radial-gradient(1200px 700px at 30% -10%, rgba(254, 57, 57, 0.07), transparent 60%),
    radial-gradient(900px 600px at 100% 110%, rgba(222, 220, 211, 0.05), transparent 60%);
  z-index: 0;
}
.app > * { position: relative; z-index: 1; }

/* ---------- Header ---------- */
.top {
  grid-area: top;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
  padding: 12px var(--pad) 8px;
  min-height: 60px;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.tape {
  position: relative;
  display: inline-block;
  padding: 5px 12px 3px;
  background: var(--red);
  color: var(--ink);
  font: 860 26px/0.86 var(--display);
  font-stretch: 62%;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  transform: rotate(-2.2deg);
  clip-path: polygon(0 6%, 3% 0, 97% 4%, 100% 0, 99% 50%, 100% 100%, 96% 94%, 4% 100%, 0 96%, 1.2% 50%);
}
.tape::after {
  /* the lap: a second strip laid over the end */
  content: '';
  position: absolute;
  right: -2px;
  top: -2px;
  bottom: -2px;
  width: 15px;
  background: var(--red-lap);
  transform: skewX(-8deg);
  mix-blend-mode: multiply;
}
.brand__sub { display: grid; line-height: 1.1; }
.brand__sub b { font: 600 13px var(--ui); color: var(--stone); }
.brand__sub span { font: 500 10.5px var(--mono); color: var(--muted); letter-spacing: 0.04em; text-transform: uppercase; }

.chapter {
  justify-self: center;
  position: relative;
  min-width: 0;
  max-width: 100%;
  height: 34px;
  display: grid;
  place-items: center;
}
.chapter__t {
  grid-area: 1 / 1;
  visibility: hidden;
  font: 800 23px/1.1 var(--ui);
  letter-spacing: -0.015em;
  color: #fff;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.45);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.chapter__t .w { display: inline-block; white-space: pre; }
.chapter__t.is-hero { visibility: visible; }

.top__tools { display: flex; align-items: center; gap: 10px; }
.seg {
  display: inline-flex;
  padding: 3px;
  border-radius: 999px;
  background: var(--ink-3);
  box-shadow: inset 0 0 0 1px var(--line);
}
.seg button {
  height: 30px;
  padding: 0 13px;
  border-radius: 999px;
  font: 500 12.5px var(--ui);
  color: var(--muted);
  transition: color 0.2s, background-color 0.2s;
  white-space: nowrap;
}
.seg button:hover { color: var(--stone); }
.seg button:active, .tool:active, .qchip:active, .speed:active, .tabs button:active, .handoff button:active, .wdrawer__x:active, .cta:active, .try__k button:active { transform: scale(0.95); }
.seg button, .tool, .qchip, .speed, .tabs button, .handoff button, .wdrawer__x { transition: color 0.2s, background-color 0.2s, transform 0.15s var(--ease); }
.seg button[aria-checked='true'] { background: var(--stone); color: var(--ink); }
.tool {
  height: 36px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 13px;
  border-radius: 999px;
  background: var(--ink-3);
  box-shadow: inset 0 0 0 1px var(--line);
  font: 500 12.5px var(--ui);
  color: var(--muted);
  white-space: nowrap;
  transition: color 0.2s, background-color 0.2s, box-shadow 0.2s;
}
.tool svg.ic { font-size: 16px; }
.tool > span { display: inline-flex; align-items: center; }
.tool:hover { color: var(--stone); }
.tool[aria-pressed='true'] { color: var(--ink); background: var(--stone); }
.tool[aria-pressed='true'] .tool__off { display: none; }
.tool[aria-pressed='false'] .tool__on { display: none; }
.cta {
  height: 36px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0 15px;
  border-radius: 999px;
  background: var(--red);
  color: var(--ink);
  font: 600 13px var(--ui);
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.2s var(--ease), background-color 0.2s;
}
.cta:hover { transform: translateY(-1px); background: #ff5050; }
.cta svg.ic { font-size: 15px; margin-left: 4px; }
.cta__tab { display: none; }

/* ---------- Stats strip ---------- */
.stats {
  grid-area: stats;
  min-height: 46px;
  contain: layout paint style;
  display: flex;
  gap: 8px;
  padding: 2px var(--pad) 12px;
  overflow-x: auto;
  scrollbar-width: none;
}
.stats::-webkit-scrollbar { display: none; }
.stat {
  flex: none;
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  padding: 7px 12px 6px;
  border-radius: 8px;
  background: var(--ink-2);
  box-shadow: inset 0 0 0 1px var(--line);
  font: 500 11px var(--mono);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}
.stat b {
  font: 600 15px var(--mono);
  letter-spacing: 0;
  color: var(--stone);
  font-variant-numeric: tabular-nums;
}
.stat--zero b { color: var(--stone); }
.stat--zero b::after { content: ''; display: inline-block; width: 6px; height: 6px; margin-left: 7px; border-radius: 50%; background: #5bd28a; vertical-align: 2px; box-shadow: 0 0 0 3px rgba(91, 210, 138, 0.16); }
.stat--hot b { color: var(--red); }
.stat.is-bump { box-shadow: inset 0 0 0 1px rgba(254, 57, 57, 0.5); }
.stats__note { margin-left: auto; align-self: center; font: 500 10.5px var(--mono); color: var(--muted); letter-spacing: 0.04em; text-transform: uppercase; white-space: nowrap; padding-left: 8px; }
.stats__note i { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--red); margin-right: 7px; vertical-align: 0; animation: blink 1.6s steps(2, start) infinite; }
@keyframes blink { to { visibility: hidden; } }

/* ---------- Tabs (phones only) ---------- */
.tabs { display: none; }

/* ---------- Stage ---------- */
.stage {
  grid-area: stage;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(290px, 340px) minmax(0, 1fr) minmax(360px, 430px);
  gap: var(--gap);
  padding: 0 var(--pad) 14px;
}
.pane { position: relative; min-height: 0; min-width: 0; }

/* ---------- Phone pane ---------- */
.pane--phone { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.phone-wrap { flex: 1 1 auto; min-height: 0; width: 100%; display: flex; justify-content: center; }
.phone {
  position: relative;
  height: 100%;
  max-height: 740px;
  aspect-ratio: 0.486;
  max-width: 100%;
  border-radius: 46px;
  padding: 9px;
  background: linear-gradient(160deg, #2a2523, #0e0b0a 40%, #1a1615);
  box-shadow: 0 0 0 1px rgba(222, 220, 211, 0.14), 0 30px 60px -20px rgba(0, 0, 0, 0.8), inset 0 0 0 1.5px rgba(255, 255, 255, 0.05);
}
.phone::before, .phone::after {
  /* side keys */
  content: '';
  position: absolute;
  right: -2px;
  top: 22%;
  width: 3px;
  height: 64px;
  border-radius: 0 3px 3px 0;
  background: #2a2523;
}
.phone::after { left: -2px; right: auto; top: 18%; height: 34px; border-radius: 3px 0 0 3px; }
.screen {
  position: relative;
  height: 100%;
  border-radius: 38px;
  overflow: hidden;
  background: var(--chat-bg);
  color: var(--chat-fg);
  display: flex;
  flex-direction: column;
  isolation: isolate;
}
.sbar {
  flex: none;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 24px 0 28px;
  font: 600 13px var(--ui);
  font-variant-numeric: tabular-nums;
  position: relative;
  z-index: 9;
}
.sbar__island { position: absolute; left: 50%; top: 10px; width: 88px; height: 25px; margin-left: -44px; border-radius: 20px; background: #000; }
.sbar__icons { display: flex; align-items: center; gap: 5px; }
.sbar__icons svg { height: 11px; width: auto; fill: currentColor; }

.chead {
  flex: none;
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px 10px 8px;
  border-bottom: 1px solid rgba(233, 237, 239, 0.07);
  background: #13161a;
}
.chead__back { width: 22px; display: grid; place-items: center; color: var(--muted); font-size: 19px; }
.ava {
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font: 700 12.5px var(--ui);
  letter-spacing: 0.02em;
  color: var(--ink);
  background: conic-gradient(from 210deg, #e8b9a3, #dedcd3, #b9c2b4, #e8b9a3);
}
.ava--you { background: var(--stone); }
.chead__id { flex: 1; min-width: 0; display: grid; }
.chead__ids { display: grid; }
.chead__id .who { grid-area: 1 / 1; display: grid; min-width: 0; }
.chead__id b { font: 600 14.5px/1.2 var(--ui); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.status { position: relative; height: 15px; font: 400 11.5px/15px var(--ui); color: rgba(233, 237, 239, 0.6); }
.status span { position: absolute; inset: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; opacity: 0; }
.status span:first-child { opacity: 1; }
.status .is-act { color: #ff7a6b; }
.chead__ai {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 24px;
  padding: 0 9px 0 7px;
  border-radius: 999px;
  background: rgba(254, 57, 57, 0.14);
  color: #ff8a7d;
  font: 500 10.5px var(--mono);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.chead__ai i { width: 7px; height: 7px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 3px rgba(254, 57, 57, 0.25); }

.threads { position: relative; flex: 1 1 auto; min-height: 0; overflow: hidden; contain: strict; }
.thread { position: absolute; inset: 0; overflow: hidden; contain: strict; will-change: transform, opacity; }
.thread--live { visibility: hidden; }
.track { position: relative; padding: 12px 12px 14px; display: flex; flex-direction: column; gap: 6px; will-change: transform; }
.thread--live .track { overflow-y: auto; height: 100%; scrollbar-width: none; will-change: auto; }
.thread--live .track::-webkit-scrollbar { display: none; }

/* chat items */
.it { position: relative; display: flex; flex-direction: column; }
.it--in { align-items: flex-start; }
.it--out { align-items: flex-end; }
.it--mid { align-items: center; }
.it + .it--gap { margin-top: 8px; }
.day {
  align-self: center;
  padding: 4px 10px;
  border-radius: 7px;
  background: #1b1f24;
  font: 500 10.5px var(--mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(233, 237, 239, 0.55);
}
.sys {
  align-self: center;
  max-width: 88%;
  padding: 7px 11px;
  border-radius: 9px;
  background: #16191d;
  box-shadow: inset 0 0 0 1px rgba(233, 237, 239, 0.06);
  font: 400 11.5px/1.35 var(--ui);
  color: rgba(233, 237, 239, 0.62);
  text-align: center;
}
.sys b { color: #ff8a7d; font-weight: 600; }
.bub {
  position: relative;
  max-width: 82%;
  padding: 7px 10px 6px;
  font: 400 13.5px/1.38 var(--text);
  letter-spacing: -0.003em;
  transform-origin: 0 100%;
}
.it--in .bub { background: var(--bub-in); color: var(--chat-fg); border-radius: 4px 16px 16px 16px; }
.it--out .bub { background: var(--stone); color: #141110; border-radius: 16px 4px 16px 16px; transform-origin: 100% 100%; }
.bub__by {
  display: block;
  margin: -1px 0 2px;
  font: 600 9.5px var(--mono);
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--red-lap);
}
.bub__meta {
  float: right;
  margin: 6px 0 -3px 10px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font: 400 10px/1 var(--ui);
  font-variant-numeric: tabular-nums;
  color: rgba(233, 237, 239, 0.5);
}
.it--out .bub__meta { color: rgba(20, 17, 16, 0.5); }
.bub__meta svg { width: 15px; height: 9px; fill: none; stroke: var(--red-lap); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

/* typing / recording indicators sit in the slot of the reply that follows them */
.ind {
  position: absolute;
  top: 0;
  right: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  padding: 0 12px;
  border-radius: 16px 4px 16px 16px;
  background: var(--stone);
  color: #141110;
  font: 500 11px var(--ui);
  opacity: 0;
  transform-origin: 100% 100%;
}
.it--in .ind { right: auto; left: 0; background: var(--bub-in); color: var(--chat-fg); border-radius: 4px 16px 16px 16px; }
.dots { display: inline-flex; gap: 4px; }
.dots i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: 0.55; animation: dot 0.9s var(--ease) infinite; }
.thread--story .ind:not(.is-on) .dots i, .thread--story .ind:not(.is-on) .recdot { animation: none; }
.dots i:nth-child(2) { animation-delay: 0.12s; }
.dots i:nth-child(3) { animation-delay: 0.24s; }
@keyframes dot { 0%, 60%, 100% { transform: translateY(0); opacity: 0.45; } 30% { transform: translateY(-4px); opacity: 1; } }
.recdot { width: 8px; height: 8px; border-radius: 50%; background: var(--red); animation: recp 1s ease-in-out infinite; }
@keyframes recp { 50% { transform: scale(0.6); opacity: 0.5; } }

/* voice note */
.vn { display: grid; grid-template-columns: 34px 1fr; grid-template-rows: auto auto; column-gap: 9px; align-items: center; width: 232px; max-width: 100%; padding: 8px 10px 6px 8px; }
.vn__play {
  grid-row: 1 / 3;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(233, 237, 239, 0.12);
  color: var(--chat-fg);
  position: relative;
}
.it--out .vn__play { background: var(--red); color: var(--stone-hi); }
.vn__play svg { width: 14px; height: 14px; fill: currentColor; position: absolute; }
.vn__play .pz { opacity: 0; }
.vn__wave { position: relative; height: 26px; min-width: 0; }
.vn__cv { display: block; width: 100%; height: 26px; }
.vn__foot { display: flex; justify-content: space-between; font: 400 10px var(--ui); font-variant-numeric: tabular-nums; color: rgba(233, 237, 239, 0.5); padding-top: 2px; }
.it--out .vn__foot { color: rgba(20, 17, 16, 0.5); }
.vn__tag { font: 600 9px var(--mono); letter-spacing: 0.06em; text-transform: uppercase; }

.xs {
  /* transcript chip under a voice note */
  max-width: 82%;
  margin-top: 4px;
  padding: 7px 10px 8px;
  border-radius: 10px;
  background: #171a1e;
  box-shadow: inset 0 0 0 1px rgba(233, 237, 239, 0.07);
  font: 400 12px/1.4 var(--text);
  color: rgba(233, 237, 239, 0.86);
  clip-path: inset(0 0 100% 0 round 10px);
}
.it--out .xs { background: #1d1b19; }
.xs__k { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; font: 500 9.5px var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: #ff8a7d; }
.xs__k svg { width: 12px; height: 12px; }
.xs__body { position: relative; min-height: 34px; }
.xs__sk { position: absolute; inset: 2px 0 auto; display: grid; gap: 6px; }
.xs__sk i { position: relative; overflow: hidden; height: 9px; border-radius: 4px; background: rgba(233, 237, 239, 0.08); }
.xs__sk i::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(233, 237, 239, 0.16), transparent); transform: translateX(-100%); animation: shimmer 0.9s linear infinite; }
.xs__sk i:nth-child(2) { width: 72%; }
@keyframes shimmer { to { transform: translateX(100%); } }
.xs__txt { visibility: hidden; }
.xs__live { position: absolute; inset: 0; }
.kara .w { opacity: 0.32; transition: opacity 0.2s ease-out; }
.kara .w.on { opacity: 1; }

/* booking card inside a reply */
.card {
  margin: 4px 0 2px;
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 2px 10px;
  padding: 9px 10px;
  border-radius: 10px;
  background: #fff8;
  background: rgba(255, 255, 255, 0.45);
  box-shadow: inset 0 0 0 1px rgba(20, 17, 16, 0.12);
}
.card__cal { grid-row: 1 / 4; width: 38px; height: 40px; border-radius: 7px; overflow: hidden; background: var(--stone-hi); box-shadow: inset 0 0 0 1px rgba(20, 17, 16, 0.14); text-align: center; }
.card__cal span { display: block; background: var(--red); color: var(--stone-hi); font: 700 8.5px/13px var(--mono); letter-spacing: 0.06em; text-transform: uppercase; }
.card__cal b { display: block; font: 800 17px/26px var(--ui); color: #141110; letter-spacing: -0.02em; }
.card__cal b.sm { font-size: 13px; }
.card__t { font: 600 9.5px var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--red-lap); }
.card__w { font: 700 13px var(--ui); }
.card__p { font: 400 11.5px var(--ui); color: rgba(20, 17, 16, 0.65); }

.callpill {
  align-self: center;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 999px;
  background: #16191d;
  box-shadow: inset 0 0 0 1px rgba(233, 237, 239, 0.08);
  font: 500 11.5px var(--ui);
  color: rgba(233, 237, 239, 0.75);
}
.callpill svg.ic { color: #5bd28a; font-size: 14px; }

.handoff {
  flex: none;
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 10px 12px;
  padding: 7px 7px 7px 14px;
  border-radius: 999px;
  background: #181b1f;
  box-shadow: inset 0 0 0 1px rgba(233, 237, 239, 0.07);
  font: 400 12px var(--ui);
  color: rgba(233, 237, 239, 0.6);
}
.handoff span { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.handoff span b { color: var(--chat-fg); font-weight: 600; }
.handoff button { flex: none; height: 28px; padding: 0 12px; border-radius: 999px; background: rgba(233, 237, 239, 0.1); color: var(--chat-fg); font: 600 11.5px var(--ui); }
.handoff button:hover { background: rgba(233, 237, 239, 0.16); }

/* ---------- Call sheet ---------- */
.call {
  position: absolute;
  inset: 0;
  z-index: 8;
  translate: 0 102%;
  display: grid;
  color: var(--chat-fg);
  will-change: transform;
}
.call__bg { position: absolute; inset: 0; background: radial-gradient(130% 70% at 50% 20%, #2a1715 0%, #120f0f 55%, #0b0a0a 100%); }
.screen { --sb: 40px; }
.call__st { position: relative; grid-area: 1 / 1; display: flex; flex-direction: column; align-items: center; padding: calc(var(--sb) + 12px) 18px 22px; text-align: center; min-height: 0; }
.call__k { font: 500 10.5px var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: rgba(233, 237, 239, 0.55); }
.cava { position: relative; width: 104px; height: 104px; margin: 34px 0 18px; }
.cava .ava { position: absolute; inset: 0; width: auto; height: auto; font-size: 32px; }
.cava .rip { position: absolute; inset: 0; border-radius: 50%; border: 1.5px solid rgba(254, 57, 57, 0.6); opacity: 0; animation: rip 1.4s var(--ease-out) infinite; }
.cava .rip + .rip { animation-delay: 0.7s; }
@keyframes rip { 0% { transform: scale(1); opacity: 0.5; } 100% { transform: scale(1.8); opacity: 0; } }
.call__name { margin: 0; font: 700 25px/1.1 var(--ui); letter-spacing: -0.01em; }
.call__num { margin: 6px 0 0; font: 400 13px var(--ui); font-variant-numeric: tabular-nums; color: rgba(233, 237, 239, 0.6); }
.call__tag { margin: 12px 0 0; display: inline-flex; gap: 6px; align-items: center; padding: 5px 10px; border-radius: 999px; background: rgba(233, 237, 239, 0.08); font: 500 11px var(--ui); color: rgba(233, 237, 239, 0.8); }
.call__auto { margin-top: auto; margin-bottom: 18px; font: 500 11px var(--mono); letter-spacing: 0.04em; color: #ff8a7d; display: grid; }
.call__auto span { grid-area: 1 / 1; opacity: 0; }
.call__btns { display: flex; justify-content: space-between; width: 82%; }
.cbtn { display: grid; justify-items: center; gap: 8px; font: 500 11px var(--ui); color: rgba(233, 237, 239, 0.7); }
.cbtn i { width: 62px; height: 62px; border-radius: 50%; display: grid; place-items: center; font-size: 25px; }
.cbtn--no i { background: #3a2322; color: #ff6b5e; animation: wob 2s ease-in-out infinite; }
.cbtn--ok i { background: var(--stone); color: #141110; animation: wob 2s ease-in-out 1s infinite; }
@keyframes wob { 0%, 72%, 100% { transform: rotate(0); } 78% { transform: rotate(-14deg); } 84% { transform: rotate(12deg); } 90% { transform: rotate(-7deg); } 95% { transform: rotate(3deg); } }
.cbtn--ok b { position: absolute; }

.call__st > * { flex-shrink: 0; }
.call__st > .qual { flex-shrink: 1; min-height: 0; overflow: hidden; }
.call__live { padding-top: calc(var(--sb) + 6px); opacity: 0; visibility: hidden; }
.call__bar { display: flex; align-items: center; gap: 7px; font: 500 10.5px var(--mono); letter-spacing: 0.05em; text-transform: uppercase; color: rgba(233, 237, 239, 0.65); }
.call__bar .rec { width: 7px; height: 7px; border-radius: 50%; background: var(--red); animation: recp 1.2s ease-in-out infinite; }
.call__bar b { color: var(--chat-fg); font-weight: 500; font-variant-numeric: tabular-nums; }
.duo { display: flex; align-items: center; justify-content: center; gap: 22px; margin: 22px 0 12px; }
.duo__p { position: relative; display: grid; justify-items: center; gap: 7px; font: 500 11px var(--ui); color: rgba(233, 237, 239, 0.62); }
.duo__p .ava, .orb { width: 62px; height: 62px; font-size: 19px; transition: none; }
.orb {
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 35% 30%, #ff8a7d, var(--red) 45%, #8f1414 100%);
  color: var(--stone-hi);
  font: 800 22px var(--display);
  font-stretch: 62%;
}
.duo__ring { position: absolute; top: -6px; left: 50%; width: 74px; height: 74px; margin-left: -37px; border-radius: 50%; border: 2px solid var(--red); opacity: 0; }
.duo__p--lead .duo__ring { border-color: var(--stone); }
.duo__link { position: relative; width: 34px; height: 2px; margin-top: -20px; overflow: hidden; }
.duo__link::before { content: ''; position: absolute; top: 0; bottom: 0; left: -16px; right: 0; background: repeating-linear-gradient(90deg, rgba(233, 237, 239, 0.4) 0 4px, transparent 4px 8px); animation: link 0.8s linear infinite; }
@keyframes link { to { transform: translateX(16px); } }
.spk { position: relative; height: 18px; width: 100%; display: grid; place-items: center; }
.spk__l { grid-area: 1 / 1; display: inline-flex; align-items: center; gap: 8px; font: 600 10.5px var(--mono); letter-spacing: 0.08em; text-transform: uppercase; opacity: 0; }
.spk__l--agent { color: #ff8a7d; }
.bars { display: inline-flex; align-items: center; gap: 2px; height: 14px; }
.bars i { width: 3px; height: 100%; border-radius: 2px; background: currentColor; transform: scaleY(0.2); }
.call:not(.is-up) .rip, .call:not(.is-up) .cbtn i, .call:not(.is-up) .call__bar .rec, .call:not(.is-up) .duo__link::before { animation: none; }
.call:not(.is-up) { content-visibility: hidden; }
/* the speaking meters move every frame during a call: on their own layers they never repaint the sheet */
.duo__ring, .duo__p .ava, .orb { will-change: transform, opacity; }
.caps { position: relative; width: 100%; height: 76px; margin: 6px 0 4px; contain: strict; }
.cap {
  position: absolute;
  inset: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-content: flex-start;
  column-gap: 0.26em;
  font: 800 19px/1.25 var(--ui);
  letter-spacing: -0.012em;
  color: #fff;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.45);
  visibility: hidden;
}
.cap .w { display: none; }
.cap .w.g { display: block; opacity: 0.38; animation: capIn 0.12s ease-out; }
.cap .w.s { display: block; opacity: 1; transition: opacity 0.22s ease-out; }
@keyframes capIn { from { opacity: 0; } }
.qual { width: 100%; margin-top: 4px; display: grid; gap: 5px; }
.qual__h { display: flex; justify-content: space-between; font: 500 9.5px var(--mono); letter-spacing: 0.07em; text-transform: uppercase; color: rgba(233, 237, 239, 0.5); padding: 0 2px 2px; }
.qrow { display: grid; grid-template-columns: 16px auto 1fr; align-items: center; gap: 8px; padding: 6px 9px; border-radius: 8px; background: rgba(233, 237, 239, 0.05); font: 400 12px var(--ui); color: rgba(233, 237, 239, 0.45); text-align: left; }
.qrow b { font-weight: 500; color: rgba(233, 237, 239, 0.62); }
.qrow em { font-style: normal; justify-self: end; font: 600 11.5px var(--mono); color: var(--chat-fg); opacity: 0; }
.qrow .tick { width: 16px; height: 16px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px rgba(233, 237, 239, 0.25); display: grid; place-items: center; position: relative; }
.qrow .tick i { position: absolute; inset: 0; border-radius: 50%; background: var(--red); display: grid; place-items: center; transform: scale(0); }
.qrow .tick svg { width: 10px; height: 10px; stroke: var(--stone-hi); stroke-width: 2.6; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.ctrl { margin-top: auto; display: flex; justify-content: center; gap: 14px; padding-top: 12px; }
.ctrl span { display: grid; justify-items: center; gap: 6px; font: 500 10px var(--ui); color: rgba(233, 237, 239, 0.6); }
.ctrl i { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: rgba(233, 237, 239, 0.1); font-size: 19px; }
.ctrl .on i { background: var(--chat-fg); color: #141110; }
.ctrl .end i { background: #e5322f; color: #fff; }

.call__end { opacity: 0; visibility: hidden; justify-content: center; }
.call__end .call__k { margin-bottom: 14px; }
.call__dur { font: 600 13px var(--mono); color: rgba(233, 237, 239, 0.7); margin-bottom: 22px; }

/* the lead-qualified card (also used by the flyer) */
.qcard {
  position: relative;
  width: 100%;
  max-width: 250px;
  padding: 18px 14px 13px;
  border-radius: 12px;
  background: var(--stone);
  color: #141110;
  text-align: left;
  box-shadow: 0 18px 40px -12px rgba(0, 0, 0, 0.7);
}
.qcard__tape {
  position: absolute;
  left: 50%;
  top: -11px;
  translate: -50% 0;
  rotate: -2deg;
  padding: 4px 10px 3px;
  background: var(--red);
  color: var(--stone-hi);
  font: 860 13px/1 var(--display);
  font-stretch: 62%;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
  clip-path: polygon(0 8%, 4% 0, 96% 6%, 100% 0, 99% 50%, 100% 100%, 95% 92%, 5% 100%, 0 92%, 1.5% 50%);
}
.qcard__row { display: flex; align-items: center; gap: 10px; }
.qcard__row .ava { width: 32px; height: 32px; font-size: 11px; }
.qcard__n { flex: 1; min-width: 0; display: grid; }
.qcard__n b { font: 700 15px/1.15 var(--ui); }
.qcard__n span { font: 400 11px var(--ui); color: rgba(20, 17, 16, 0.6); }
.score {
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: conic-gradient(var(--red) calc(var(--p, 0) * 1%), rgba(20, 17, 16, 0.12) 0);
  font: 700 13px var(--mono);
  font-variant-numeric: tabular-nums;
  position: relative;
}
.score::before { content: ''; position: absolute; inset: 4px; border-radius: 50%; background: var(--stone); }
.score span { position: relative; }
.chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 10px; }
.chip {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  padding: 3px 7px 3px;
  border-radius: 5px;
  background: rgba(20, 17, 16, 0.07);
  box-shadow: inset 0 0 0 1px rgba(20, 17, 16, 0.12);
  font: 600 11px var(--ui);
  color: #141110;
  white-space: nowrap;
}
.chip small { font: 500 8.5px var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: rgba(20, 17, 16, 0.55); }
.chip--hot { background: var(--red); box-shadow: none; color: var(--stone-hi); }
.chip--hot small { color: rgba(235, 233, 226, 0.75); }

/* short phone screens (small laptops, phones): tighten the call sheet */
.call { container-type: size; container-name: screen; }
@container screen (max-height: 600px) {
  .call__st { padding: calc(var(--sb) + 6px) 14px 14px; }
  .call__live { padding-top: calc(var(--sb) + 4px); }
  .cava { width: 84px; height: 84px; margin: 18px 0 12px; }
  .cava .ava { font-size: 26px; }
  .call__name { font-size: 21px; }
  .call__tag { margin-top: 8px; }
  .cbtn i { width: 54px; height: 54px; font-size: 22px; }
  .duo { margin: 12px 0 8px; gap: 16px; }
  .duo__p .ava, .orb { width: 48px; height: 48px; font-size: 16px; }
  .duo__ring { width: 58px; height: 58px; margin-left: -29px; top: -5px; }
  .duo__link { margin-top: -18px; }
  .caps { height: 50px; margin: 4px 0 2px; }
  .cap { font-size: 16px; line-height: 1.22; }
  .qual { gap: 3px; }
  .qrow { padding: 4px 8px; font-size: 11.5px; }
  .ctrl { padding-top: 8px; gap: 12px; }
  .ctrl i { width: 40px; height: 40px; font-size: 17px; }
  .ctrl span { font-size: 9.5px; gap: 4px; }
  .call__end .qcard { transform: scale(0.94); }
}
@container screen (max-height: 480px) {
  .call__st { padding-top: calc(var(--sb) + 2px); }
  .call__live { padding-top: calc(var(--sb) + 2px); }
  .duo { margin: 8px 0 6px; }
  .duo__p > span:last-child { display: none; }
  .duo__p .ava, .orb { width: 42px; height: 42px; font-size: 14px; }
  .duo__ring { width: 52px; height: 52px; margin-left: -26px; }
  .duo__link { margin-top: 0; }
  .qual__h { display: none; }
  .qual { gap: 2px; }
  .qrow { padding: 2px 8px; font-size: 11px; }
  .qrow .tick { width: 14px; height: 14px; }
  .cbtn i { width: 48px; height: 48px; }
  .cava { width: 72px; height: 72px; margin: 12px 0 10px; }
  .call__auto { margin-bottom: 12px; }
}

/* ---------- Try box (visitor plays the customer) ---------- */
.try { flex: none; width: 100%; max-width: 360px; }
.try__k { height: 20px; display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 7px; font: 500 10.5px var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.try__k b { color: var(--stone); font-weight: 500; }
.try__k button { color: var(--muted); text-decoration: underline; text-underline-offset: 3px; text-transform: none; letter-spacing: 0; font: 500 11.5px var(--ui); }
.try__k button:hover { color: var(--stone); }
.try__k button[hidden] { display: none; }
.try__form {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px;
  border-radius: 999px;
  background: var(--ink-3);
  box-shadow: inset 0 0 0 1px var(--line);
  transition: box-shadow 0.25s;
}
.try__form:focus-within { box-shadow: inset 0 0 0 1px rgba(222, 220, 211, 0.4); }
.try.is-nudge .try__form { box-shadow: inset 0 0 0 1.5px var(--red), 0 0 0 5px rgba(254, 57, 57, 0.13); }
.try__form input { flex: 1; min-width: 0; height: 34px; padding: 0 6px 0 10px; border: 0; background: none; outline: none; font: 400 14px var(--ui); color: var(--stone); }
.try__form input::placeholder { color: rgba(222, 220, 211, 0.4); }
.rbtn { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-size: 16px; color: var(--muted); background: rgba(222, 220, 211, 0.06); transition: background-color 0.2s, color 0.2s, transform 0.2s var(--ease); }
.rbtn:hover { color: var(--stone); background: rgba(222, 220, 211, 0.12); }
.rbtn--send { background: var(--red); color: var(--ink); }
.rbtn--send:hover { background: #ff5050; color: var(--ink); }
.rbtn:active { transform: scale(0.92); }
.try__form input:placeholder-shown ~ .rbtn--send { background: rgba(254, 57, 57, 0.28); color: rgba(11, 8, 7, 0.6); cursor: default; }
.try__chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; height: 62px; overflow: hidden; align-content: flex-start; }
.qchip { height: 28px; padding: 0 11px; border-radius: 999px; background: rgba(222, 220, 211, 0.07); box-shadow: inset 0 0 0 1px var(--line); font: 500 12px var(--ui); color: rgba(222, 220, 211, 0.82); white-space: nowrap; transition: background-color 0.2s, color 0.2s; }
.qchip:hover { background: rgba(222, 220, 211, 0.14); color: var(--stone); }
.qchip--call { display: inline-flex; align-items: center; gap: 6px; color: #ff8a7d; }
.qchip--call svg.ic { font-size: 13px; }

/* ---------- Wiring pane ---------- */
.pane--wiring {
  display: flex;
  flex-direction: column;
  border-radius: 18px;
  background: var(--ink-2);
  box-shadow: inset 0 0 0 1px var(--line);
  overflow: hidden;
}
.ph {
  flex: none;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 16px 11px;
}
.ph h2 { flex: none; white-space: nowrap; margin: 0; font: 860 19px/1 var(--display); font-stretch: 62%; letter-spacing: 0.02em; text-transform: uppercase; }
.ph__sub { font: 500 10.5px var(--mono); letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ph__sp { flex: 1; }
.ph__pill { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 9px; border-radius: 999px; background: rgba(222, 220, 211, 0.07); font: 500 10px var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.ph__pill i { width: 6px; height: 6px; border-radius: 50%; background: #5bd28a; }
.ph__pill--live i { background: var(--red); animation: recp 1s ease-in-out infinite; }

.wcanvas {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  contain: strict;
  /* dot grid as a tiny image tile: much cheaper to raster than a tiled radial gradient */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18'%3E%3Ccircle cx='9' cy='9' r='1.1' fill='%23dedcd3' fill-opacity='0.1'/%3E%3C/svg%3E");
  background-size: 18px 18px;
  overflow: hidden;
}
.wedges { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.e-base { fill: none; stroke: rgba(222, 220, 211, 0.24); stroke-width: 1.5; stroke-dasharray: 2 4; stroke-linecap: round; }
.e-hotsvg { position: absolute; left: 0; top: 0; width: 0; height: 0; overflow: visible; pointer-events: none; opacity: 0; will-change: opacity; }
.e-hot { fill: none; stroke: var(--red); stroke-width: 2.2; stroke-dasharray: 7 6; stroke-linecap: round; }
.e-hot.is-on { animation: march 1s linear infinite; }
@keyframes march { to { stroke-dashoffset: -26; } }
.e-lab { font: 500 9px var(--mono); letter-spacing: 0.06em; text-transform: uppercase; fill: rgba(222, 220, 211, 0.5); }
.pk { position: absolute; left: 0; top: 0; width: 0; height: 0; z-index: 1; opacity: 0; pointer-events: none; will-change: transform, opacity; }
.pk b { position: absolute; border-radius: 50%; }
.pk__halo { left: -9px; top: -9px; width: 18px; height: 18px; background: rgba(254, 57, 57, 0.22); }
.pk__dot { left: -4.2px; top: -4.2px; width: 8.4px; height: 8.4px; background: #ff6a5c; box-shadow: inset 0 0 0 2.5px #ff6a5c, inset 0 0 0 4.2px #fff3ee; }

.wnode {
  position: absolute;
  left: 0;
  top: 0;
  translate: -50% -50%;
  rotate: var(--r, 0deg);
  display: block;
  font: 500 var(--nf, 10.5px)/1 var(--mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
  z-index: 2;
}
/* the button is the hit box: at least 42 px each way, with the tape label centred in it */
.wnode { padding: 9px 2px; min-height: 42px; min-width: 42px; }
.wnode { display: grid; place-items: center; }
.wnode__in { position: relative; display: block; }
.wnode__b, .wnode__hot {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0.72em 1.05em 0.66em 0.95em;
  background: var(--stone);
  color: var(--ink);
  clip-path: polygon(0 10%, 4px 0, calc(100% - 3px) 6%, 100% 0, calc(100% - 2px) 50%, 100% 100%, calc(100% - 5px) 92%, 3px 100%, 0 90%, 2px 50%);
}
.wnode__b svg.ic, .wnode__hot svg.ic { font-size: 1.25em; stroke-width: 2.1; }
.wnode__hot { position: absolute; inset: 0; background: var(--red); color: var(--stone-hi); opacity: 0; will-change: opacity; }
.wnode--wide .wnode__b, .wnode--wide .wnode__hot { padding-top: 0.9em; padding-bottom: 0.84em; font-size: 1.12em; }
.wnode--wide small, .wnode--trig small { display: block; font-size: 0.72em; letter-spacing: 0.08em; opacity: 0.6; margin-top: 0.3em; }
.wnode__lap { position: absolute; left: -6px; top: -5px; width: 22px; height: 9px; background: var(--red); rotate: -24deg; opacity: 0.9; z-index: 1; }
.wnode__ring { position: absolute; inset: -3px; border: 2px solid var(--red); border-radius: 4px; opacity: 0; pointer-events: none; }
.wnode__n {
  position: absolute;
  right: -8px;
  top: -9px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: var(--ink);
  color: var(--stone);
  box-shadow: 0 0 0 1.5px var(--red);
  font: 600 9.5px/1 var(--mono);
  letter-spacing: 0;
  rotate: calc(var(--r, 0deg) * -1);
  transform: scale(0);
  z-index: 3;
}
.wcanvas.is-tight .wnode small, .wcanvas.is-tight .e-lab { display: none; }
.wcanvas.is-tight .wnode svg.ic { display: none; }
.wcanvas.is-tight .wnode--wide .wnode__b, .wcanvas.is-tight .wnode--wide .wnode__hot { font-size: 1.05em; padding-top: 0.75em; padding-bottom: 0.7em; }
.wnode:hover .wnode__b { background: var(--stone-hi); }
.wnode.is-picked .wnode__b { box-shadow: inset 0 0 0 2px var(--red); }
.wtip {
  position: absolute;
  z-index: 6;
  left: 0;
  top: 0;
  max-width: 220px;
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--stone-hi);
  color: var(--ink);
  font: 400 12px/1.35 var(--ui);
  box-shadow: 0 10px 24px -8px rgba(0, 0, 0, 0.7);
  pointer-events: none;
  opacity: 0;
  translate: -50% calc(-100% + 4px);
  transition: opacity 0.15s, translate 0.15s var(--ease);
}
.wtip b { display: block; margin-bottom: 2px; font: 600 9.5px var(--mono); letter-spacing: 0.07em; text-transform: uppercase; color: var(--red-lap); }
.wtip.is-on { opacity: 1; translate: -50% -100%; }

.wdrawer {
  position: absolute;
  z-index: 7;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(340px, 100%);
  display: flex;
  flex-direction: column;
  background: #1a1615;
  box-shadow: -1px 0 0 var(--line), -24px 0 40px -20px rgba(0, 0, 0, 0.7);
  transform: translateX(104%);
  transition: transform 0.32s var(--ease-out);
}
.wdrawer.is-open { transform: none; }
.wdrawer__h { display: flex; align-items: flex-start; gap: 10px; padding: 14px 14px 10px; }
.wdrawer__h div { flex: 1; min-width: 0; }
.wdrawer__h h3 { margin: 0 0 4px; font: 860 20px/1 var(--display); font-stretch: 62%; text-transform: uppercase; letter-spacing: 0.02em; }
.wdrawer__h p { margin: 0; font: 400 12.5px/1.4 var(--ui); color: var(--muted); }
.wdrawer__x { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: rgba(222, 220, 211, 0.08); font-size: 15px; }
.wdrawer__x:hover { background: rgba(222, 220, 211, 0.16); }
.wdrawer__b { flex: 1; min-height: 0; overflow: auto; padding: 0 14px 16px; }
.wdrawer__meta { font: 500 10px var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); margin: 4px 0 10px; }
.io { margin: 0 0 12px; }
.io h4 { margin: 0 0 5px; font: 600 9.5px var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: #ff8a7d; }
.io pre { margin: 0; padding: 10px 11px; border-radius: 8px; background: var(--ink); box-shadow: inset 0 0 0 1px var(--line); font: 400 11px/1.55 var(--mono); color: var(--stone); white-space: pre-wrap; word-break: break-word; }
.io .k { color: #e8b9a3; }
.io .s { color: #b9d3b4; }
.io .n { color: #ff8a7d; }
.wdrawer__none { font: 400 12.5px/1.45 var(--ui); color: var(--muted); padding: 10px 12px; border-radius: 8px; background: rgba(222, 220, 211, 0.05); }

.wlegend { flex: none; display: flex; gap: 14px; align-items: center; padding: 9px 16px 12px; font: 500 10px var(--mono); letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); }
.wlegend span { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.wlegend .lg-pk { width: 8px; height: 8px; border-radius: 50%; background: #ff6a5c; box-shadow: 0 0 0 4px rgba(254, 57, 57, 0.2); }
.wlegend .lg-n { width: 14px; height: 10px; background: var(--stone); }
.wlegend .lg-h { width: 14px; height: 10px; background: var(--red); }
.wlegend em { margin-left: auto; font-style: normal; text-transform: none; letter-spacing: 0; font: 400 11.5px var(--ui); }

.wruns { position: absolute; left: 16px; bottom: 14px; width: min(222px, 36%); height: 98px; pointer-events: none; display: none; }
.wcanvas.is-roomy .wruns { display: block; }
.wruns__h { position: absolute; left: 0; top: 0; font: 500 9.5px var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: rgba(222, 220, 211, 0.4); }
.wrun { position: absolute; left: 0; right: 0; bottom: 0; height: 17px; display: flex; align-items: center; gap: 7px; font: 500 10.5px var(--mono); color: var(--muted); white-space: nowrap; }
.wrun b { color: var(--stone); font-weight: 500; }
.wrun__l { overflow: hidden; text-overflow: ellipsis; }
.wrun em { margin-left: auto; font-style: normal; color: #5bd28a; }
.wrun__ok { flex: none; width: 14px; height: 14px; border-radius: 50%; display: grid; place-items: center; background: rgba(91, 210, 138, 0.16); color: #5bd28a; }
.wrun__ok svg.ic { font-size: 9px; stroke-width: 3; }

/* ---------- Lead log pane (stone paper) ---------- */
.pane--log {
  display: flex;
  flex-direction: column;
  border-radius: 18px;
  background: var(--stone);
  color: #141110;
  overflow: hidden;
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.8);
}
.pane--log .ph h2 { color: #141110; }
.pane--log .ph__sub { color: rgba(20, 17, 16, 0.55); }
.pane--log .ph__pill { background: rgba(20, 17, 16, 0.08); color: rgba(20, 17, 16, 0.65); }
.lcols, .lrow { display: grid; grid-template-columns: 52px 20px minmax(64px, 0.95fr) minmax(0, 1.7fr) 38px; column-gap: 9px; align-items: start; padding: 0 14px; }
.lcols { flex: none; padding-top: 7px; padding-bottom: 7px; border-top: 1px solid rgba(20, 17, 16, 0.14); border-bottom: 1px solid rgba(20, 17, 16, 0.14); font: 500 9.5px var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: rgba(20, 17, 16, 0.5); }
.lcols span:last-child, .lrow .c-sc { justify-self: end; }
.lrows { flex: 1 1 auto; min-height: 0; contain: strict; overflow-y: auto; overflow-x: hidden; scrollbar-width: thin; scrollbar-color: rgba(20, 17, 16, 0.25) transparent; }
.lwrap { display: grid; grid-template-rows: 1fr; }
.lwrap.is-new { grid-template-rows: 0fr; }
.lwrap__in { min-height: 0; overflow: hidden; }
.lrow { position: relative; padding-top: 10px; padding-bottom: 10px; border-bottom: 1px solid rgba(20, 17, 16, 0.09); background: repeating-linear-gradient(transparent 0 0); }
.lrow__fl { position: absolute; inset: 0; background: var(--red); opacity: 0; pointer-events: none; }
.c-t { font: 500 10.5px/1.5 var(--mono); color: rgba(20, 17, 16, 0.6); font-variant-numeric: tabular-nums; }
.c-ch { padding-top: 1px; }
.chn { width: 20px; height: 20px; border-radius: 5px; display: grid; place-items: center; background: rgba(20, 17, 16, 0.08); font-size: 12px; color: #141110; }
.chn--call { background: #141110; color: var(--stone); }
.chn--voice { background: var(--red); color: var(--stone-hi); }
.c-l { min-width: 0; display: grid; }
.c-l b { font: 600 12.5px/1.3 var(--ui); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.c-l small { font: 400 10px/1.35 var(--mono); color: rgba(20, 17, 16, 0.5); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.c-x { min-width: 0; display: grid; gap: 1px; font: 400 12px/1.35 var(--ui); }
.c-x span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.c-x .rep { color: rgba(20, 17, 16, 0.58); }
.c-x .rep::before { content: '↳ '; color: var(--red-lap); }
.c-sc b { display: inline-grid; place-items: center; min-width: 30px; height: 22px; padding: 0 5px; border-radius: 6px; font: 600 11px var(--mono); font-variant-numeric: tabular-nums; box-shadow: inset 0 0 0 1px rgba(20, 17, 16, 0.25); }
.c-sc b.hi { background: var(--red); color: var(--stone-hi); box-shadow: none; }
.c-sc b.mid { box-shadow: inset 0 0 0 1.5px var(--red); color: var(--red-lap); }
.c-chips { grid-column: 3 / -1; display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; }
.c-chips .chip { opacity: 0; }
.lrow--q { background: rgba(255, 255, 255, 0.28); }
.qtag { display: inline-block; margin: 2px 5px 0 0; padding: 2px 5px 1px; background: var(--red); color: var(--stone-hi); font: 860 10px/1 var(--display); font-stretch: 62%; letter-spacing: 0.06em; text-transform: uppercase; rotate: -2deg; }
.lrow--you .c-l b { color: var(--red-lap); }
.lfoot { flex: none; display: flex; align-items: center; gap: 10px; padding: 10px 14px 12px; border-top: 1px solid rgba(20, 17, 16, 0.12); font: 500 10px var(--mono); letter-spacing: 0.05em; text-transform: uppercase; color: rgba(20, 17, 16, 0.55); }
.lfoot span { flex: 1; }
.lfoot b { color: #141110; font-weight: 600; }

/* ---------- Transport ---------- */
.transport {
  grid-area: transport;
  position: sticky;
  bottom: 0;
  z-index: 5;
  background: var(--ink);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 var(--pad) 14px;
  height: 66px;
}
.tbtn { flex: none; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--ink-3); box-shadow: inset 0 0 0 1px var(--line); font-size: 17px; color: var(--stone); transition: background-color 0.2s, transform 0.15s; }
.tbtn:hover { background: var(--ink-4); }
.tbtn:active { transform: scale(0.94); }
.tbtn--play { width: 44px; height: 44px; background: var(--stone); color: var(--ink); font-size: 18px; }
.tbtn--play:hover { background: var(--stone-hi); }
.tbtn > span { display: grid; place-items: center; }
.tbtn--play .i-pause { display: none; }
.is-playing .tbtn--play .i-pause { display: block; }
.is-playing .tbtn--play .i-play { display: none; }
.tc { flex: none; min-width: 102px; font: 500 12px var(--mono); font-variant-numeric: tabular-nums; color: var(--stone); }
.tc i { font-style: normal; color: var(--muted); }
.scrub { position: relative; flex: 1 1 auto; min-width: 0; height: 44px; cursor: pointer; touch-action: none; outline: none; }
.scrub__rail { position: absolute; left: 0; right: 0; bottom: 9px; height: 4px; border-radius: 2px; background: rgba(222, 220, 211, 0.12); overflow: hidden; }
.scrub__fill { position: absolute; inset: 0; background: var(--stone); transform-origin: 0 50%; transform: scaleX(0); }
.scrub__head { position: absolute; bottom: 3px; left: 0; width: 16px; height: 16px; margin-left: -8px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 4px rgba(254, 57, 57, 0.22); transition: box-shadow 0.15s; will-change: transform; }
.scrub:focus-visible .scrub__head, .scrub.is-drag .scrub__head { box-shadow: 0 0 0 7px rgba(254, 57, 57, 0.3); }
.scrub__marks { position: absolute; inset: 0 0 18px; }
.smark { position: absolute; bottom: 0; translate: -1px 0; display: flex; flex-direction: column; align-items: flex-start; gap: 3px; font: 500 9.5px var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); white-space: nowrap; transition: color 0.2s; }
.smark::after { content: ''; width: 1px; height: 7px; background: rgba(222, 220, 211, 0.35); }
.smark:hover, .smark.is-past { color: var(--stone); }
.smark.is-now { color: var(--red); }
.smark.is-now::after { background: var(--red); }
.scrub.is-tight .smark span { display: none; }
.scrub.is-tight .smark.is-now span { display: inline; }
.speed { flex: none; height: 32px; min-width: 44px; padding: 0 10px; border-radius: 999px; background: var(--ink-3); box-shadow: inset 0 0 0 1px var(--line); font: 600 11.5px var(--mono); color: var(--stone); }
.speed:hover { background: var(--ink-4); }
.concept { flex: none; font: 500 10.5px var(--mono); letter-spacing: 0.04em; color: var(--muted); text-decoration: none; white-space: nowrap; }
.concept:hover { color: var(--stone); }

/* ---------- Flyer + toast ---------- */
.flyer { position: fixed; left: 0; top: 0; z-index: 50; pointer-events: none; visibility: hidden; transform-origin: 0 0; will-change: transform, opacity; contain: layout paint style; }
.flyer .qcard { max-width: none; width: 250px; }
.toast {
  position: fixed;
  left: 50%;
  bottom: 88px;
  z-index: 60;
  max-width: min(420px, calc(100% - 32px));
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--stone-hi);
  color: var(--ink);
  font: 500 13px/1.4 var(--ui);
  box-shadow: 0 16px 36px -10px rgba(0, 0, 0, 0.7);
  translate: -50% 12px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, translate 0.25s var(--ease);
}
.toast.is-on { opacity: 1; translate: -50% 0; }

.is-live-mode .call { visibility: hidden !important; }

/* first load and business switches */
.stage > .pane { transition: opacity 0.2s var(--ease); }
/* while a business builds, its panes are out of sight (nothing paints) and a small label says what's happening */
.is-switching .stage > .pane { opacity: 0; }
.is-switching.is-switch-warm .stage > .pane { opacity: 0.001; }
.is-switching .stage::after {
  content: 'Switching business…';
  position: absolute;
  left: 50%;
  top: 42%;
  translate: -50% -50%;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--ink-3);
  box-shadow: inset 0 0 0 1px var(--line);
  font: 500 11px var(--mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
  pointer-events: none;
}
.is-booting.is-switching .stage::after { content: 'Connecting the line…'; }
.is-booting .pane::before {
  content: attr(data-boot);
  position: absolute;
  left: 50%;
  top: 46%;
  translate: -50% -50%;
  z-index: 20;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--ink-3);
  box-shadow: inset 0 0 0 1px var(--line);
  font: 500 11px var(--mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
  animation: bootp 1.1s ease-in-out infinite alternate;
}
.is-booting .pane--log::before { background: rgba(20, 17, 16, 0.08); color: rgba(20, 17, 16, 0.6); box-shadow: none; }
@keyframes bootp { from { opacity: 0.45; } to { opacity: 1; } }

/* (ambient loops keep running when paused: pausing them from a root class restyled hundreds of nodes) */

/* ---------- Tablet: phone left, wiring over log ---------- */
@media (max-width: 1180px) {
  .top { grid-template-columns: auto 1fr; }
  .chapter { grid-column: 1 / -1; grid-row: 2; justify-self: start; height: 30px; }
  .chapter__t { font-size: 20px; }
  .cta__long, .cta__short { display: none; }
  .cta__tab { display: inline; }
  .stage { grid-template-columns: minmax(280px, 330px) minmax(0, 1fr); grid-template-rows: minmax(0, 1.3fr) minmax(0, 0.7fr); }
  .pane--phone { grid-row: 1 / 3; }
  .stats__note { display: none; }
}
@media (max-width: 1000px) {
  .brand__sub { display: none; }
}

/* big screens (27-inch at 100%): a wider phone column, so the phone stays phone-shaped and tall */
@media (min-width: 1800px) and (min-height: 1050px) {
  .stage { grid-template-columns: minmax(290px, 410px) minmax(0, 1fr) minmax(360px, 480px); }
  .phone { max-height: 960px; }
  .try { max-width: 410px; }
}

/* ---------- Short desktop windows: the phone drops its device frame ----------
   A device frame only reads as a phone when it's tall; squeezed under ~560 px it turns into a stubby box. On
   shorter windows the phone becomes a chat panel like the other panes (as it does on phones). */
@media (min-width: 761px) and (max-height: 899px) {
  .phone { aspect-ratio: auto; width: 100%; height: 100%; max-height: none; border-radius: 18px; padding: 0; background: none; box-shadow: 0 0 0 1px rgba(222, 220, 211, 0.14), 0 24px 48px -28px rgba(0, 0, 0, 0.8); }
  .phone::before, .phone::after { display: none; }
  .screen { border-radius: 18px; --sb: 14px; }
  .sbar { display: none; }
  .chead { padding-top: 10px; }
  .cava { margin-top: 20px; }
  .pane--phone { gap: 10px; }
  .try { max-width: none; }
}
/* laptop windows (1366x657, 1920 at 150%): tighter chrome and one row of quick replies, so the panes keep
   their height; the page only scrolls below 600 px */
@media (min-width: 761px) and (max-height: 760px) {
  .app { --app-min: 600px; }
  .top { padding-top: 8px; padding-bottom: 4px; min-height: 52px; }
  .stats { min-height: 38px; padding-bottom: 8px; }
  .stat { padding: 5px 10px 4px; }
  .transport { height: 58px; padding-bottom: 10px; }
  .try__k { margin-bottom: 5px; }
  .try__chips { height: 28px; }
  .qchip--call { order: -1; }
}
/* tablets stack the wiring over the log, which needs height: short tablet windows scroll instead */
@media (min-width: 761px) and (max-width: 1180px) {
  .app { --app-min: 860px; }
}

/* ---------- Phones: one pane at a time ---------- */
@media (max-width: 760px) {
  :root { --pad: 12px; --gap: 10px; }
  .app { --app-min: 560px; }
  .transport { position: relative; background: none; }
  .top { grid-template-columns: auto 1fr auto; gap: 8px; padding-top: 10px; min-height: 0; }
  .brand__sub { display: none; }
  .tape { font-size: 22px; }
  .chapter { grid-column: 1 / -1; grid-row: 2; justify-self: stretch; height: 24px; place-items: center start; }
  .chapter__t { font-size: 16px; }
  .top__tools { grid-column: 2 / 4; grid-row: 1; justify-self: end; gap: 6px; }
  .seg button { height: 28px; padding: 0 9px; font-size: 12px; }
  .tool { height: 34px; padding: 0; width: 34px; justify-content: center; }
  .tool .tool__t { display: none; }
  .cta { display: none; }
  .stats { padding-bottom: 8px; gap: 6px; }
  .stat { padding: 6px 9px 5px; font-size: 9.5px; gap: 6px; }
  .stat b { font-size: 13px; }

  .tabs {
    display: flex;
    margin: 0 var(--pad) 10px;
    padding: 3px;
    border-radius: 12px;
    background: var(--ink-3);
    box-shadow: inset 0 0 0 1px var(--line);
  }
  .tabs button { position: relative; flex: 1; height: 34px; border-radius: 9px; font: 600 13px var(--ui); color: var(--muted); }
  .tabs button[aria-selected='true'] { background: var(--stone); color: var(--ink); }
  .tabs .dot { position: absolute; top: 7px; right: calc(50% - 34px); width: 7px; height: 7px; border-radius: 50%; background: var(--red); transform: scale(0); transition: transform 0.25s var(--ease); }
  .tabs .dot.is-on { transform: scale(1); }
  .app { grid-template-rows: auto auto auto 1fr auto; grid-template-areas: 'top' 'stats' 'tabs' 'stage' 'transport'; }
  .tabs { grid-area: tabs; }

  .stage { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); padding-bottom: 8px; }
  /* one pane at a time; hidden panes keep running (layout stays live) but aren't painted */
  .stage > .pane { grid-area: 1 / 1; }
  /* hidden panes leave layout entirely (they lay themselves out again when shown). Not content-visibility:
     GSAP reads computed styles when a tween starts, which forces a full update of skipped content. */
  /* hidden panes skip style, layout and paint but keep their rendering state, so showing one doesn't rebuild
     it from scratch (every tween is rendered once at build, so GSAP never reads styles from a skipped pane) */
  /* (opacity and z-index rather than visibility/pointer-events: those are inherited, so toggling them would
     restyle every element in the pane; the active pane sits on top and takes the taps) */
  .stage > .pane { z-index: 1; }
  .app .stage > .pane.is-tab-hidden { content-visibility: hidden; opacity: 0; z-index: 0; }
  .app .stage > .pane.is-tab-hidden.is-tab-entering { content-visibility: visible; }
  .stage > .pane.is-tab-in { animation: paneIn 0.18s var(--ease) both; }
  @keyframes paneIn { from { opacity: 0; } }
  /* while the first story builds, every pane is laid out (invisibly) once, so fonts are shaped and layouts
     cached before anyone switches tabs */
  /* (visibility, not opacity, while positions settle: layout-shift scoring counts transparent elements) */
  .app.is-warming .stage > .pane.is-tab-hidden, .app .stage > .pane.is-tab-hidden.is-warm { content-visibility: visible; visibility: hidden; }
  /* ...then painted once at 0.1% opacity, so the GPU compiles its shaders and uploads glyphs at load
     instead of on the first tab switch */
  .app.is-warming.is-warm-paint .stage > .pane.is-tab-hidden { visibility: visible; opacity: 0.001; }
  .pane--phone { grid-row: auto; gap: 10px; }
  .phone { aspect-ratio: auto; width: 100%; height: 100%; max-height: none; border-radius: 26px; padding: 0; background: none; box-shadow: 0 0 0 1px rgba(222, 220, 211, 0.14); }
  .phone::before, .phone::after { display: none; }
  .screen { border-radius: 26px; }
  .sbar { display: none; }
  .chead { padding-top: 10px; }
  .screen { --sb: 14px; }
  .cava { margin-top: 20px; }
  .try { max-width: none; }
  .try__chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-right: calc(var(--pad) * -1); padding-right: var(--pad); }
  .try__chips::-webkit-scrollbar { display: none; }

  .lcols, .lrow { grid-template-columns: 46px 20px minmax(60px, 0.9fr) minmax(0, 1.6fr) 34px; column-gap: 7px; padding-left: 12px; padding-right: 12px; }
  .wlegend em { display: none; }

  .transport { gap: 8px; height: 58px; padding-bottom: max(10px, env(safe-area-inset-bottom)); }
  .tbtn, .tbtn--play { width: 40px; height: 40px; }
  .speed { height: 40px; }

  /* every control is at least 40 px on touch */
  .brand { min-height: 40px; }
  .seg { padding: 2px; }
  .seg button { height: 40px; }
  .tool { width: 40px; height: 40px; }
  .tabs button { height: 40px; }
  .qchip { height: 40px; padding: 0 13px; }
  .try__chips { height: 40px; }
  .rbtn { width: 40px; height: 40px; }
  .try__form { padding: 3px; }
  .try__form input { height: 40px; }
  .try__k button { min-height: 40px; }
  .handoff { padding: 4px 4px 4px 14px; }
  .handoff button { height: 40px; padding: 0 14px; }
  .wdrawer__x { width: 40px; height: 40px; }
  .smark { pointer-events: none; }
  .e-hot.is-on { animation: none; }
  .cap, .chapter__t { text-shadow: none; }
  .wdrawer { box-shadow: -1px 0 0 var(--line); }
  .toast { box-shadow: 0 4px 10px -6px rgba(0, 0, 0, 0.6); }
  .wtip { display: none; }
  .qcard { box-shadow: 0 6px 14px -8px rgba(0, 0, 0, 0.6); }
  .pane--log { box-shadow: none; }
  .phone { box-shadow: 0 0 0 1px rgba(222, 220, 211, 0.14); }
  .stats { min-height: 40px; }
  .tbtn--restart { display: none; }
  .tc { min-width: 0; font-size: 11px; }
  .tc i { display: none; }
  .concept { display: none; }
  .smark { font-size: 8.5px; }
  .smark span { display: none; }
  .smark.is-now span { display: inline; }
  .toast { bottom: 76px; }
}

@media (max-width: 380px) {
  .seg button { padding: 0 7px; font-size: 11.5px; }
  .stat { font-size: 9px; }
}

@media (prefers-reduced-motion: reduce) {
  .cap .w.g, .dots i, .rip, .e-hot, .e-hot.is-on, .recdot, .duo__link::before, .xs__sk i::after, .cbtn i, .stats__note i, .call__bar .rec { animation: none !important; }
  .rip { display: none; }
  .wdrawer, .toast, .tabs .dot { transition-duration: 0.01s; }
}
