:root {
  --ground: #0e1726;
  --panel: #16223a;
  --panel-2: #22314f;
  --panel-3: #2d3f62;
  --text: #c9d3e6;
  --quiet: #8d9ab3;
  --white: #ffffff;
  --line: rgba(201, 211, 230, .11);
  --brass: #d9a441;
  --brass-soft: rgba(217, 164, 65, .14);
  --coral: #e0715c;
  --coral-soft: rgba(224, 113, 92, .14);
  --hang-up: #d64b3f;

  --width: 1120px;
  --phone-width: 392px;
  --phone-height: clamp(600px, calc(100vh - 256px), 700px);
  --ease: cubic-bezier(.2, .8, .2, 1);

  font-family: "Geist", "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background: var(--ground);
  color-scheme: dark;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-size: 16px;
  line-height: 1.5;
}

h1, h2, h3, p { margin: 0; }
button { font: inherit; color: inherit; cursor: pointer; }
button:disabled { cursor: default; }
[hidden] { display: none !important; }

a { color: var(--white); text-underline-offset: 3px; text-decoration-thickness: 1px; }

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

/* Page */

.masthead, .stage, .colophon {
  width: 100%;
  max-width: calc(var(--width) + 64px);
  margin: 0 auto;
  padding-left: 32px;
  padding-right: 32px;
}

.masthead {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--white);
  text-decoration: none;
  font-weight: 600;
  font-size: 19px;
  letter-spacing: -0.01em;
}

.brand .bell { width: 30px; height: 30px; }

.built-with {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text);
  font-size: 13.5px;
  text-decoration: none;
  transition: border-color .15s, color .15s;
}

.built-with::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brass);
}

.built-with:hover { color: var(--white); border-color: rgba(201, 211, 230, .3); }

.stage {
  flex: 1;
  display: grid;
  grid-template-columns: var(--phone-width) minmax(0, 1fr);
  grid-template-areas: "pitch pitch" "phone note";
  gap: 32px 28px;
  padding-top: 36px;
  padding-bottom: 48px;
}

.pitch {
  grid-area: pitch;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 16px 48px;
  align-items: end;
}

.pitch h1 {
  color: var(--white);
  font-size: clamp(2rem, 3.2vw, 2.55rem);
  line-height: 1.08;
  font-weight: 600;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.pitch-copy { max-width: 58ch; padding-bottom: 2px; }
.pitch-copy p + p { margin-top: 8px; }
.pitch .try { color: var(--white); }

.tabs { display: none; }

.colophon {
  display: flex;
  justify-content: space-between;
  gap: 8px 24px;
  flex-wrap: wrap;
  padding-top: 20px;
  padding-bottom: 28px;
  border-top: 1px solid var(--line);
  font-size: 13.5px;
  color: var(--quiet);
}

/* Phone */

.phone {
  grid-area: phone;
  position: relative;
  height: var(--phone-height);
  border-radius: 32px;
  background: var(--panel);
  border: 1px solid var(--line);
  overflow: hidden;
}

.dial, .live {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  transition: opacity .3s var(--ease), visibility .3s;
}

.phone[data-state="idle"] .live,
.phone[data-state="ringing"] .live,
.phone[data-state="live"] .dial,
.phone[data-state="ended"] .dial {
  opacity: 0;
  visibility: hidden;
}

.avatar {
  display: grid;
  place-items: center;
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--panel-3);
  color: var(--white);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: .02em;
}

.avatar.big { position: relative; width: 104px; height: 104px; font-size: 34px; }

.dial {
  align-items: center;
  text-align: center;
  padding: 92px 28px 36px;
}

.dial .practice { margin-top: 22px; color: var(--white); font-size: 25px; font-weight: 600; letter-spacing: -0.015em; }
.dial .number { margin-top: 4px; font-variant-numeric: tabular-nums; }
.dial-status { margin-top: 26px; min-height: 1.5em; font-size: 14.5px; color: var(--quiet); }

.dial-actions { margin-top: auto; }
.phone[data-state="idle"] .dial .stop,
.phone[data-state="ringing"] .dial .go { display: none; }

.sound-hint { margin-top: 20px; font-size: 13.5px; color: var(--quiet); }
.phone[data-state="ringing"] .sound-hint { visibility: hidden; }

/* The avatar pulses while it rings and stops the moment she picks up. */
.phone[data-state="ringing"] .avatar.big::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid var(--brass);
  animation: ringing 1.4s var(--ease) infinite;
}

@keyframes ringing {
  from { transform: scale(1); opacity: .7; }
  to { transform: scale(1.6); opacity: 0; }
}

.round {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--text);
  font-size: 13px;
}

.round svg {
  box-sizing: content-box;
  width: 26px;
  height: 26px;
  padding: 19px;
  border-radius: 50%;
  fill: var(--white);
  transition: transform .15s var(--ease), background-color .15s, opacity .15s;
}

.round:focus-visible { outline: none; }
.round:focus-visible svg { outline: 2px solid var(--brass); outline-offset: 3px; }
.round:active svg { transform: scale(.94); }

.round.go svg { background: var(--brass); fill: var(--ground); }
.round.go:hover svg { background: #e4b358; }
.round.go:disabled svg { opacity: .5; }

.round.stop svg { background: var(--hang-up); transform: rotate(135deg); }
.round.stop:active svg { transform: rotate(135deg) scale(.94); }

.dial .round svg { width: 30px; height: 30px; padding: 23px; }

/* In the call */

.live { padding: 16px 14px 18px; }

.call-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 6px 16px;
  border-bottom: 1px solid var(--line);
}

.who { flex: 1; min-width: 0; }
.who .practice { color: var(--white); font-weight: 600; font-size: 15.5px; line-height: 1.3; }
.call-status { display: flex; gap: 8px; font-size: 13px; color: var(--quiet); }
.clock { font-variant-numeric: tabular-nums; }
.phone[data-state="live"] .clock { color: var(--brass); }

.meter {
  display: flex;
  align-items: center;
  gap: 3px;
  height: 26px;
  padding-right: 4px;
}

.meter i {
  width: 4px;
  height: 100%;
  border-radius: 2px;
  background: var(--brass);
  opacity: .35;
  transform: scaleY(.14);
  transition: transform 80ms linear, opacity .2s;
}

.phone.speaking .meter i { opacity: 1; }

.transcript {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  margin: 0;
  padding: 16px 6px 12px;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  scrollbar-width: thin;
  scrollbar-color: var(--panel-3) transparent;
}

.transcript li {
  max-width: 86%;
  padding: 9px 13px;
  font-size: 15px;
  line-height: 1.42;
  border-radius: 16px;
}

.transcript .her {
  align-self: flex-start;
  background: var(--panel-2);
  color: var(--white);
  border-bottom-left-radius: 5px;
}

.transcript .you {
  align-self: flex-end;
  background: var(--text);
  color: var(--ground);
  border-bottom-right-radius: 5px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.turn { padding: 12px 2px 2px; border-top: 1px solid var(--line); }

.turn-hint {
  padding: 0 4px 10px;
  font-size: 13px;
  color: var(--quiet);
}

.turn-hint.heard { color: var(--white); }

.replies { display: grid; gap: 6px; }

.reply {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  min-height: 48px;
  padding: 10px 13px;
  border: 1px solid rgba(201, 211, 230, .2);
  border-radius: 12px;
  background: transparent;
  color: var(--white);
  font-size: 15px;
  line-height: 1.3;
  text-align: left;
  transition: background-color .15s, border-color .15s;
  animation: offer .26s var(--ease) backwards;
}

.reply:nth-child(2) { animation-delay: .04s; }
.reply:nth-child(3) { animation-delay: .08s; }
.reply:nth-child(4) { animation-delay: .12s; }

.reply:hover { background: var(--panel-2); border-color: rgba(201, 211, 230, .34); }
.reply:active { background: var(--panel-3); }

.reply kbd {
  display: none;
  flex: none;
  width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 6px;
  background: var(--panel-2);
  color: var(--quiet);
  font: inherit;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

@media (hover: hover) and (pointer: fine) {
  .reply kbd { display: grid; }
}

@keyframes offer {
  from { opacity: 0; transform: translateY(6px); }
}

.more {
  display: block;
  min-height: 36px;
  margin: 6px auto 0;
  padding: 4px 10px;
  border: 0;
  background: none;
  color: var(--text);
  font-size: 13.5px;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.more:hover { color: var(--white); }

.controls, .after {
  display: flex;
  justify-content: center;
  gap: 48px;
  padding-top: 14px;
}

.after { display: none; gap: 10px; flex-wrap: wrap; padding-top: 18px; }
.phone[data-state="ended"] .controls { display: none; }
.phone[data-state="ended"] .after { display: flex; }

.mic svg { background: var(--panel-3); }
.mic:disabled { opacity: .4; }
.mic.listening svg { background: var(--brass); fill: var(--ground); animation: listening 1.2s ease-in-out infinite; }

@keyframes listening {
  50% { box-shadow: 0 0 0 7px var(--brass-soft); }
}

.pill {
  min-height: 48px;
  padding: 12px 22px;
  border: 0;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  transition: transform .15s var(--ease), background-color .15s;
}

.pill:active { transform: scale(.97); }
.pill.go { background: var(--brass); color: var(--ground); }
.pill.go:hover { background: #e4b358; }
.pill.quiet { display: none; background: var(--panel-2); color: var(--white); }

/* What the practice sees */

.console {
  grid-area: note;
  display: flex;
  flex-direction: column;
  gap: 18px;
  height: var(--phone-height);
  padding: 22px 24px 24px;
  border-radius: 20px;
  background: var(--panel);
  border: 1px solid var(--line);
}

.console-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.console-title { color: var(--white); font-size: 17px; font-weight: 600; letter-spacing: -0.01em; }
.console-sub { margin-top: 2px; font-size: 13.5px; color: var(--quiet); }

.status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: none;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--panel-2);
  font-size: 13px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.lamp { width: 8px; height: 8px; border-radius: 50%; background: var(--quiet); }

.console[data-status="live"] .status { color: var(--brass); background: var(--brass-soft); }
.console[data-status="live"] .lamp { background: var(--brass); animation: lamp 1.6s ease-in-out infinite; }

@keyframes lamp {
  50% { box-shadow: 0 0 0 4px var(--brass-soft); }
}

dl { margin: 0; }
dt { font-size: 12.5px; color: var(--quiet); }

dd {
  margin: 3px 0 0;
  color: var(--white);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.4;
  white-space: pre-line;
  font-variant-numeric: tabular-nums;
}

/* Blank fields show a faint bar, so the console reads as ready, not broken. */
dd:empty::before,
.summary p:empty::before {
  content: "";
  display: block;
  width: 55%;
  height: 8px;
  margin: 7px 0;
  border-radius: 4px;
  background: rgba(201, 211, 230, .07);
}

.record {
  display: grid;
  grid-template-columns: 1.7fr 1fr 1fr;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.record > div { min-width: 0; padding: 11px 14px; }
.record > div + div { border-left: 1px solid var(--line); }

.facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 24px;
}

.facts .wide { grid-column: 1 / -1; }
dd.urgent { color: var(--coral); }

.flags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.flags li {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 13px;
  color: var(--quiet);
  transition: color .3s, background-color .3s, border-color .3s;
}

.flags li::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--panel-3);
  transition: background-color .3s;
}

.flags li.on { color: var(--white); border-color: rgba(217, 164, 65, .4); background: var(--brass-soft); }
.flags li.on::before { background: var(--brass); }
.flags li.urgent.on { border-color: rgba(224, 113, 92, .45); background: var(--coral-soft); }
.flags li.urgent.on::before { background: var(--coral); }

.block h3 {
  margin-bottom: 6px;
  font-size: 12.5px;
  font-weight: 400;
  color: var(--quiet);
}

.summary p { color: var(--white); font-size: 15.5px; line-height: 1.5; }

.lower {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.lower .block { display: flex; flex-direction: column; min-height: 0; }

.follow-ups, .activity {
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 13.5px;
  line-height: 1.4;
}

.follow-ups li { display: flex; gap: 9px; padding: 4px 0; color: var(--white); }

/* A small drawn check, so it doesn't depend on the font having one. */
.follow-ups li::before {
  content: "";
  flex: none;
  width: 5px;
  height: 9px;
  margin: 3px 3px 0 3px;
  border: solid var(--brass);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.follow-ups:empty::before,
.activity:empty::before {
  content: "Nothing yet";
  color: var(--quiet);
  opacity: .7;
}

.activity {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--panel-3) transparent;
}

.activity li {
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 6px;
  padding: 4px 0;
}

.activity time { color: var(--quiet); font-variant-numeric: tabular-nums; }

.console-foot { padding-top: 4px; }

/* When the call ends, the console tidies into a summary: only what happened. */
.console.filed { animation: filed 1.2s var(--ease); }
.console.filed .facts > div:has(dd:empty) { display: none; }
.console.filed .flags li:not(.on) { display: none; }
.console.filed .lower .block:has(.follow-ups:empty) { display: none; }
.console.filed .lower:has(.follow-ups:empty) { grid-template-columns: 1fr; }

@keyframes filed {
  from { border-color: rgba(217, 164, 65, .6); }
}

/* Tablet */

@media (max-width: 1100px) {
  :root { --phone-width: 360px; }
  .pitch { grid-template-columns: 1fr; max-width: 760px; }
  .pitch h1 { max-width: 22ch; }
  .record { grid-template-columns: 1fr 1fr; }
  .record > div:first-child { grid-column: 1 / -1; border-bottom: 1px solid var(--line); }
  .record > div:nth-child(2) { border-left: 0; }
  .lower { grid-template-columns: 1fr; }
  .activity { max-height: 180px; }
}

/* Phones: the call comes first, the summary is one tap away. */

@media (max-width: 820px) {
  .masthead, .stage, .colophon { padding-left: 16px; padding-right: 16px; }
  .masthead { padding-top: 16px; }
  .built-with { min-height: 32px; padding: 0 12px; font-size: 13px; }

  .stage {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "pitch" "tabs" "phone" "note";
    max-width: 520px;
    gap: 0;
    padding-top: 24px;
    padding-bottom: 28px;
  }

  .pitch h1 { font-size: 1.75rem; }
  .pitch-copy p:not(.try) { display: none; }
  .pitch .try { font-size: 15px; color: var(--text); }

  .tabs {
    grid-area: tabs;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    margin: 20px 0 12px;
    padding: 4px;
    border-radius: 14px;
    background: var(--panel);
    border: 1px solid var(--line);
    scroll-margin-top: 8px;
  }

  .tabs button {
    position: relative;
    min-height: 42px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--quiet);
    font-size: 14px;
    font-weight: 500;
  }

  .tabs [aria-selected="true"] { background: var(--panel-2); color: var(--white); }

  /* A dot on the tab when the summary changed while you were on the call. */
  .tabs .fresh::after {
    content: "";
    display: inline-block;
    width: 7px;
    height: 7px;
    margin-left: 7px;
    vertical-align: 2px;
    border-radius: 50%;
    background: var(--brass);
  }

  .stage[data-view="call"] .console,
  .stage[data-view="note"] .phone { display: none; }

  .phone { --phone-height: max(540px, calc(100svh - 84px)); border-radius: 26px; }
  .console { height: auto; min-height: 520px; padding: 18px 16px 20px; border-radius: 18px; }
  .console-sub { display: none; }

  .dial { padding-top: 56px; }
  .dial-actions { margin-top: 44px; }
  .sound-hint { margin-top: 16px; }
  .pill.quiet { display: inline-block; }

  .facts { grid-template-columns: 1fr; }
  .activity { max-height: none; }
  .colophon { flex-direction: column; }
}

@media (max-width: 380px) {
  .transcript li { max-width: 92%; }
  .controls { gap: 36px; }
  .record { grid-template-columns: 1fr; }
  .record > div + div { border-left: 0; border-top: 1px solid var(--line); }
  .record > div:first-child { border-bottom: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
  }

  .phone[data-state="ringing"] .avatar.big::after { display: none; }
}

/* The one-press demo */

.demo-button {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-top: 16px;
  padding: 11px 20px 11px 16px;
  border: 0;
  border-radius: 999px;
  background: var(--brass);
  color: var(--ground);
  font-size: 15px;
  font-weight: 600;
  transition: background-color .15s;
}
.demo-button svg { width: 16px; height: 16px; fill: currentColor; }
.demo-button:hover { background: #e4b358; }
.reply.chosen { border-color: var(--brass); background: rgba(217, 164, 65, .14); }
