/* The guest page: CircularOS's forest, paper and lime, with the speaking agent from
   circularos.ai drawn in light on a dark stage. */
@font-face {
  font-family: "Inter";
  src: url("/static/InterVariable-4.1-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}
:root {
  --ink: #132823;
  --muted: #4a5f58;
  --faint: #7a8b84;
  --paper: #f5f2ec;
  --card: #fffdf8;
  --soft: #f1eee6;
  --line: #e3ded2;
  --green: #2f6a4a;
  --green-soft: #edf2e7;
  --green-line: #d5e2cf;
  --lime: #d8ed91;
  --stage: #132823;
  --stage-text: #f3f0e8;
  --stage-muted: #a9bbb3;
  --stage-line: rgba(255, 255, 255, 0.12);
  --red: #c2412d;
  --radius: 20px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}
* {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
html {
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  color: var(--ink);
  background: var(--paper);
  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Arial,
    sans-serif;
  -webkit-font-smoothing: antialiased;
  font-optical-sizing: auto;
  font-size: 16px;
  line-height: 1.55;
}
h1,
h2,
h3,
p,
ol,
ul,
dl,
dd {
  margin: 0;
}
ol,
ul {
  padding: 0;
  list-style: none;
}
button {
  font: inherit;
  color: inherit;
  cursor: pointer;
  touch-action: manipulation;
}
button:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 4px;
}

/* Header */
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  max-width: 1360px;
  margin: 0 auto;
  padding: 20px clamp(16px, 3vw, 32px) 16px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -0.045em;
  line-height: 1;
  color: var(--ink);
}
.top-note {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 99px;
  background: var(--stage);
  font-size: 12.5px;
  font-weight: 500;
  color: var(--stage-text);
}
.top-note::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--lime);
}

/* Layout: the agent's stage, and the panel beside it */
.layout {
  flex: 1;
  width: 100%;
  max-width: 1360px;
  margin: 0 auto;
  padding: 0 clamp(16px, 3vw, 32px) 28px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 410px);
  gap: clamp(16px, 2vw, 24px);
  align-items: start;
}

/* With nothing to show beside it (a link that does not work), the stage stands alone. */
body[data-view="invalid"] .layout {
  grid-template-columns: minmax(0, 920px);
  justify-content: center;
}

/* The stage */
.stage {
  position: relative;
  isolation: isolate;
  min-width: 0;
  min-height: min(calc(100dvh - 96px), 920px);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: clamp(18px, 2.4vw, 30px);
  border-radius: 28px;
  overflow: hidden;
  text-align: center;
  color: var(--stage-text);
  background:
    radial-gradient(62% 50% at 50% 46%, #28493f 0%, rgba(40, 73, 63, 0) 72%),
    linear-gradient(180deg, #17312a 0%, #0f221d 100%);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.06) inset,
    0 40px 80px -48px rgba(19, 40, 35, 0.7);
}
/* A faint grid of points behind the agent, fading out at the edges. */
.stage::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: radial-gradient(rgba(243, 240, 232, 0.07) 1px, transparent 1.2px);
  background-size: 22px 22px;
  mask-image: radial-gradient(75% 65% at 50% 45%, #000 20%, transparent 75%);
}
.stage-bar {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.stage-label {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--lime);
}
.stage-label::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 0 4px rgba(216, 237, 145, 0.14);
}
.state {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 13px;
  border: 1px solid var(--stage-line);
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.06);
  font-size: 12.5px;
  line-height: 1.4;
  color: #dbe4de;
  white-space: nowrap;
  backdrop-filter: blur(8px);
}
.state-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #6f857c;
  transition: background-color 200ms ease;
}
body[data-view="ready"] .state-dot,
body[data-view="live"] .state-dot {
  background: var(--lime);
}
body[data-mode="speaking"] .state-dot {
  animation: pulse 1.1s ease-in-out infinite;
}
@keyframes pulse {
  50% {
    box-shadow: 0 0 0 5px rgba(216, 237, 145, 0.22);
  }
}
.clock {
  padding-left: 8px;
  border-left: 1px solid var(--stage-line);
  font-variant-numeric: tabular-nums;
  color: var(--stage-muted);
}

.intro {
  max-width: 640px;
  margin-top: clamp(12px, 3vh, 36px);
}
h1 {
  font-size: clamp(32px, 4.2vw, 54px);
  line-height: 1.04;
  font-weight: 500;
  letter-spacing: -0.045em;
  color: var(--stage-text);
  text-wrap: balance;
}
.lead {
  max-width: 520px;
  margin: 14px auto 0;
  font-size: 16.5px;
  color: var(--stage-muted);
  text-wrap: pretty;
}
body[data-view="live"] .intro {
  display: none;
}

/* The agent */
.frame {
  position: relative;
  flex: 1;
  width: 100%;
  max-width: 600px;
  min-height: clamp(200px, 28vh, 400px);
  margin-top: 8px;
}
body[data-view="live"] .frame {
  min-height: clamp(320px, 56vh, 640px);
  margin-top: clamp(4px, 2vh, 20px);
}
/* Before a call there is nothing to caption. */
body[data-view="ready"] .caption,
body[data-view="loading"] .caption,
body[data-view="invalid"] .caption {
  display: none;
}
.frame::before {
  content: "";
  position: absolute;
  inset: 6% 14% 16%;
  z-index: -1;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(216, 237, 145, 0.2), transparent);
  opacity: 0;
  transition: opacity 600ms ease;
}
body[data-mode="speaking"] .frame::before {
  opacity: 1;
}
.face {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
body[data-face="none"] .face {
  display: none;
}
body[data-view="invalid"] .face {
  opacity: 0.3;
}
.caption {
  position: absolute;
  left: 50%;
  bottom: 0;
  translate: -50% 0;
  width: min(660px, 100%);
  padding: 64px 20px 6px;
  /* Fades out on every side, so the words sit on the stage with no visible box. */
  background: radial-gradient(
    58% 78% at 50% 100%,
    rgba(15, 34, 29, 0.92) 0%,
    rgba(15, 34, 29, 0.62) 48%,
    rgba(15, 34, 29, 0) 76%
  );
}
.caption-speaker {
  min-height: 16px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--lime);
}
.caption-text {
  min-height: 2.9em;
  margin-top: 8px;
  font-size: clamp(18px, 2.1vw, 23px);
  line-height: 1.42;
  letter-spacing: -0.015em;
  color: var(--stage-text);
  text-wrap: balance;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* The secure payment step: a light card the agent is visibly not part of */
.secure {
  width: 100%;
  max-width: 460px;
  margin-top: 4px;
  padding: 22px 24px 20px;
  border-radius: var(--radius);
  background: var(--card);
  color: var(--ink);
  text-align: left;
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.55);
  animation: arrive 260ms var(--ease);
}
.secure-tag {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 99px;
  background: var(--green-soft);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--green);
}
.secure h2 {
  margin-top: 12px;
  font-size: 26px;
  font-weight: 500;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}
.secure-note {
  margin-top: 6px;
  font-size: 13.5px;
  color: var(--muted);
}
.secure form {
  margin-top: 16px;
  display: grid;
  gap: 12px;
}
.secure label {
  display: grid;
  gap: 5px;
  font-size: 12.5px;
  color: var(--muted);
}
.secure input {
  width: 100%;
  height: 46px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  font: inherit;
  font-size: 16px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
  color: var(--ink);
}
.secure input:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 1px;
  border-color: transparent;
}
.secure-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.secure-error {
  font-size: 13px;
  color: var(--red);
}
.secure-actions {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-top: 2px;
}
.secure-actions .button {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--stage-text);
  box-shadow: none;
}
.secure-actions .link {
  margin-top: 0;
}
.secure-small {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  line-height: 1.55;
  color: var(--faint);
}
body[data-secure="on"] .frame {
  flex: 0 0 auto;
  min-height: clamp(150px, 20vh, 220px);
}
body[data-secure="on"] .face {
  opacity: 0.25;
  filter: grayscale(1);
  transition: opacity 400ms ease;
}
body[data-secure="on"] .caption {
  display: none;
}
body[data-secure="on"] .state-dot {
  background: #ff8f7a;
  animation: none;
}
.round:disabled {
  opacity: 0.4;
  cursor: default;
}

/* The choice of voice, before a call */
.voices {
  width: min(480px, 100%);
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  text-align: left;
}
.voices-title {
  grid-column: 1 / -1;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-align: center;
  color: var(--stage-muted);
}
.voice {
  position: relative;
  display: grid;
  gap: 2px;
  padding: 12px 14px 12px 42px;
  border: 1px solid var(--stage-line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  cursor: pointer;
  transition:
    border-color 160ms ease,
    background-color 160ms ease;
}
.voice input {
  position: absolute;
  left: 15px;
  top: 15px;
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--lime);
  cursor: pointer;
}
.voice-name {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--stage-text);
}
.voice-note {
  font-size: 12.5px;
  line-height: 1.4;
  color: var(--stage-muted);
}
.voice:has(input:checked) {
  border-color: rgba(216, 237, 145, 0.7);
  background: rgba(216, 237, 145, 0.1);
}
.voice:has(input:focus-visible) {
  outline: 2px solid var(--lime);
  outline-offset: 2px;
}

/* Controls */
.controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 20px;
  min-height: 56px;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 56px;
  padding: 14px 34px;
  border: 1px solid var(--lime);
  border-radius: 99px;
  background: var(--lime);
  color: var(--ink);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
  white-space: nowrap;
  box-shadow: 0 18px 40px -18px rgba(216, 237, 145, 0.75);
  transition:
    transform 160ms var(--ease),
    box-shadow 160ms ease,
    opacity 160ms ease;
}
.button:not(:disabled):hover {
  box-shadow: 0 20px 44px -16px rgba(216, 237, 145, 0.9);
}
.button:not(:disabled):active {
  transform: scale(0.97);
}
.button:disabled {
  opacity: 0.45;
  cursor: default;
}
.button:focus-visible {
  outline-color: var(--lime);
}
.button.danger {
  border-color: var(--red);
  background: var(--red);
  color: #fff;
  box-shadow: 0 18px 40px -18px rgba(194, 65, 45, 0.8);
}
.round {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border: 1px solid var(--stage-line);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.07);
  color: var(--stage-text);
}
.round svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.round .mic-off {
  display: none;
}
.round[aria-pressed="true"] {
  border-color: var(--lime);
  background: rgba(216, 237, 145, 0.14);
  color: var(--lime);
}
.round[aria-pressed="true"] .mic-off {
  display: block;
}
.round:focus-visible {
  outline-color: var(--lime);
}
.fine {
  margin-top: 16px;
  font-size: 13px;
  color: var(--stage-muted);
}
body[data-view="live"] .fine,
body[data-view="invalid"] .fine,
body[data-view="loading"] .fine {
  display: none;
}
.problem {
  max-width: 480px;
  margin-top: 14px;
  padding: 10px 16px;
  border: 1px solid rgba(255, 143, 122, 0.35);
  border-radius: 12px;
  background: rgba(194, 65, 45, 0.16);
  font-size: 14px;
  color: #ffc6ba;
}

/* The panel */
.panel {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.card {
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: 0 1px 2px rgba(19, 40, 35, 0.04);
}
.card h2 {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.015em;
}
.card h3 {
  margin: 22px 0 10px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--faint);
}
.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.pill {
  flex: none;
  padding: 4px 10px;
  border-radius: 99px;
  background: var(--green-soft);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--green);
}
.card-note,
.card-empty {
  margin-top: 6px;
  font-size: 13.5px;
  color: var(--muted);
}
.card-empty {
  padding: 18px 0 6px;
}

/* The test account, laid out like a card the caller reads from */
.answers {
  margin-top: 16px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  font-size: 14px;
}
.answers dt,
.answers dd {
  padding: 11px 14px;
  border-top: 1px solid var(--line);
}
.answers dt:first-of-type,
.answers dd:first-of-type {
  border-top: 0;
}
.answers dt {
  background: var(--soft);
  color: var(--muted);
}
.answers dt::first-letter {
  text-transform: uppercase;
}
.answers dd {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.005em;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

/* Lists */
.ideas {
  margin-top: 14px;
  display: grid;
  gap: 10px;
  font-size: 14px;
  color: #2c3b36;
}
.ideas li {
  position: relative;
  padding-left: 18px;
}
.ideas li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.62em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--green);
}
.ideas.numbered {
  counter-reset: idea;
  gap: 12px;
}
.ideas.numbered li {
  counter-increment: idea;
  min-height: 24px;
  padding-left: 38px;
}
.ideas.numbered li::before {
  content: counter(idea);
  left: 0;
  top: 0;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  background: var(--ink);
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  color: var(--lime);
}

/* How the link is protected: closed until asked for */
.protect summary {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.015em;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.protect summary::-webkit-details-marker {
  display: none;
}
.protect summary::after {
  content: "";
  width: 8px;
  height: 8px;
  border-right: 1.5px solid var(--muted);
  border-bottom: 1.5px solid var(--muted);
  rotate: 45deg;
  translate: 0 -2px;
  transition: rotate 200ms var(--ease);
}
.protect[open] summary::after {
  rotate: 225deg;
  translate: 0 2px;
}
.protect summary:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 4px;
}
.protect .ideas {
  font-size: 13.5px;
  line-height: 1.55;
}

/* What was kept and what was not */
.kept {
  display: grid;
  gap: 8px;
  font-size: 13.5px;
  color: #2c3b36;
}
.kept li {
  position: relative;
  padding-left: 24px;
}
.kept li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.5em;
  width: 9px;
  height: 5px;
  border-left: 1.8px solid var(--green);
  border-bottom: 1.8px solid var(--green);
  rotate: -45deg;
}
.kept li.is-left-out {
  color: var(--muted);
}
.kept li.is-left-out::before {
  top: 0.72em;
  width: 9px;
  height: 0;
  border-left: 0;
  border-bottom: 1.8px solid var(--faint);
  rotate: 0deg;
}
.link {
  margin-top: 18px;
  padding: 0;
  border: 0;
  background: none;
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  color: var(--ink);
}

/* The feed: the live call and its stored transcript share it */
.feed-card {
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.feed {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-height: min(58vh, 600px);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}
/* The stored transcript is read after the call: it runs down the page, not inside a box. */
[data-record-feed] {
  max-height: none;
  overflow: visible;
}
.line {
  padding-left: 12px;
  border-left: 2px solid var(--line);
  animation: arrive 260ms var(--ease);
}
.line.agent {
  border-left-color: var(--green);
}
.line-who {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--faint);
}
.line.agent .line-who {
  color: var(--green);
}
.line-text {
  margin-top: 2px;
  font-size: 14.5px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.line.withheld .line-text {
  font-style: italic;
  color: var(--faint);
}
.step {
  padding: 11px 13px;
  border: 1px solid var(--green-line);
  border-radius: 12px;
  background: var(--green-soft);
  animation: arrive 260ms var(--ease);
}
.step-name {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 10px;
  font-size: 13.5px;
  font-weight: 600;
  color: #1f3b2f;
}
.step-state {
  padding: 1px 8px;
  border-radius: 99px;
  background: var(--ink);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--lime);
}
.step-meaning {
  margin-top: 4px;
  font-size: 13px;
  line-height: 1.45;
  color: #3f5049;
}
@keyframes arrive {
  from {
    opacity: 0;
    translate: 0 6px;
  }
}

/* The record */
.facts {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.fact {
  padding: 13px 15px;
  border-radius: 14px;
  background: var(--soft);
}
.fact dt {
  font-size: 12px;
  color: var(--muted);
}
.fact dd {
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.requests {
  display: grid;
  gap: 8px;
}
.request {
  padding: 13px 15px;
  border: 1px solid var(--green-line);
  border-radius: 14px;
  background: var(--green-soft);
}
.request-name {
  font-size: 14px;
  font-weight: 600;
  color: #1f3b2f;
}
.request-detail,
.request-status {
  font-size: 13px;
  color: #3f5049;
  font-variant-numeric: tabular-nums;
}

/* Footer */
.foot {
  padding: 18px clamp(16px, 3vw, 32px) 26px;
  border-top: 1px solid var(--line);
}
.foot p,
.noscript {
  max-width: 760px;
  margin: 0 auto;
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--faint);
  text-align: center;
  text-wrap: pretty;
}
.noscript {
  padding: 16px;
  color: var(--red);
}

@media (min-width: 901px) {
  /* A long record scrolls past the agent, which stays where it is. */
  .stage {
    position: sticky;
    top: 16px;
  }
  /* The payment card can make the stage taller than the window: it scrolls then. */
  body[data-secure="on"] .stage {
    position: relative;
    top: 0;
  }
}
@media (max-width: 900px) {
  .layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .stage {
    min-height: min(86svh, 760px);
  }
  .frame {
    min-height: clamp(200px, 30vh, 340px);
  }
  body[data-view="live"] .frame {
    min-height: clamp(280px, 48vh, 460px);
  }
  .feed {
    max-height: 48vh;
  }
}
@media (max-width: 480px) {
  .voices {
    grid-template-columns: minmax(0, 1fr);
  }
  .top-note {
    padding: 6px 11px;
    font-size: 12px;
  }
  .stage {
    border-radius: 22px;
  }
  .lead {
    font-size: 15.5px;
  }
  .button {
    padding: 14px 28px;
  }
  .card {
    padding: 20px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .line,
  .step,
  .secure {
    animation: none;
  }
  body[data-mode="speaking"] .state-dot {
    animation: none;
  }
}
