:root {
  --font-scale: 1;
  --ink: #344054;
  --ink-strong: #182983;
  --muted: #667085;
  --teal: #f29400;
  --teal-dark: #c97200;
  --teal-pale: #fff6ed;
  --blue-pale: #fffaf5;
  --surface: #ffffff;
  --canvas: #f9fafb;
  --border: #e4e7ec;
  --danger: #b33a3a;
  --danger-pale: #fff1f0;
  --focus: #e8a317;
  --shadow: 0 20px 60px rgba(16, 24, 40, 0.09);
  --bubble-remote-bg: #f1f4f7;
  --bubble-remote-border: #dce3e9;
  --bubble-local-bg: #e7f0fa;
  --bubble-local-border: #c5d7e9;
  color-scheme: light;
  font-family: Inter, Aptos, "Segoe UI", Arial, sans-serif;
  font-size: calc(16px * var(--font-scale));
}

html[data-text-size="1"] { --font-scale: 1; }
html[data-text-size="1.15"] { --font-scale: 1.15; }
html[data-text-size="1.3"] { --font-scale: 1.3; }

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  min-height: 100%;
  background: var(--canvas);
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 7% 10%, rgba(242, 148, 0, 0.08), transparent 24rem),
    var(--canvas);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto 1fr auto;
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

button,
a,
input {
  -webkit-tap-highlight-color: transparent;
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 100;
  padding: 0.7rem 1rem;
  color: white;
  background: var(--ink-strong);
  border-radius: 0.45rem;
  transform: translateY(-180%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  min-height: 5.25rem;
  padding: 0 4vw;
  border-bottom: 1px solid rgba(16, 24, 40, 0.1);
  background: rgba(255, 255, 255, 0.92);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  color: var(--ink-strong);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.62rem;
}

.brand-logo {
  width: 8.9rem;
  height: auto;
  display: block;
}

.brand-product {
  padding-left: 0.62rem;
  border-left: 1px solid var(--border);
  color: var(--teal-dark);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.13em;
}

.header-tools,
.conversation-actions {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.language-switch {
  padding: 0.18rem;
  border: 1px solid var(--border);
  border-radius: 0.55rem;
  background: var(--canvas);
  display: flex;
}

.language-button {
  min-width: 2.65rem;
  min-height: 2.15rem;
  padding: 0.3rem 0.55rem;
  border: 0;
  border-radius: 0.37rem;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.language-button.is-active {
  color: var(--teal-dark);
  background: var(--surface);
  box-shadow: 0 1px 5px rgba(15, 50, 70, 0.12);
}

.tool-button,
.icon-button,
.text-button {
  border: 0;
  background: transparent;
  cursor: pointer;
}

.tool-button {
  min-height: 2.55rem;
  padding: 0.5rem 0.7rem;
  border-radius: 0.5rem;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.88rem;
  font-weight: 650;
}

.tool-button:hover,
.icon-button:hover,
.text-button:hover {
  background: var(--blue-pale);
}

.tool-button svg,
.privacy-note svg,
.support-note svg,
.reassurance svg,
.button svg {
  width: 1.2rem;
  height: 1.2rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.theme-icon-sun {
  display: none;
}

html[data-theme="dark"] .theme-icon-moon {
  display: none;
}

html[data-theme="dark"] .theme-icon-sun {
  display: block;
}

main {
  width: 100%;
}

.screen {
  width: min(100% - 2rem, 74rem);
  min-height: calc(100vh - 9.5rem);
  margin: 0 auto;
  padding: clamp(2.5rem, 7vh, 5.5rem) 0;
}

.screen[hidden] {
  display: none !important;
}

.entry-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(21rem, 0.82fr);
  gap: clamp(3rem, 7vw, 6rem);
  align-items: center;
}

.entry-copy {
  max-width: 36rem;
}

.eyebrow,
.status-kicker,
.connection-label {
  margin: 0 0 0.85rem;
  color: var(--teal-dark);
  font-size: 0.73rem;
  font-weight: 820;
  letter-spacing: 0.14em;
}

h1,
h2,
p {
  overflow-wrap: break-word;
}

h1 {
  max-width: 13ch;
  margin: 0;
  color: var(--ink-strong);
  font-size: clamp(2.35rem, 6vw, 4.65rem);
  line-height: 0.99;
  letter-spacing: -0.055em;
}

.lead {
  max-width: 34rem;
  margin: 1.5rem 0 2.25rem;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.7;
}

.phone-form {
  max-width: 31rem;
}

.phone-form label,
.composer label {
  display: block;
  margin-bottom: 0.4rem;
  color: var(--ink-strong);
  font-size: 0.9rem;
  font-weight: 760;
}

.field-hint {
  margin: 0 0 0.65rem;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.45;
}

.phone-field {
  position: relative;
}

.phone-prefix {
  position: absolute;
  top: 50%;
  left: 1rem;
  color: var(--ink-strong);
  transform: translateY(-50%);
  font-weight: 700;
}

.phone-field input,
.text-field,
.code-input,
.composer-row input {
  width: 100%;
  border: 1.5px solid #b9c8d1;
  color: var(--ink-strong);
  background: var(--surface);
  box-shadow: 0 2px 8px rgba(16, 24, 40, 0.04);
}

.phone-field input,
.text-field {
  height: 3.65rem;
  border-radius: 0.6rem;
  font-size: 1.06rem;
  letter-spacing: 0.015em;
}

.phone-field input {
  padding: 0.5rem 1rem 0.5rem 2.15rem;
}

.text-field {
  padding: 0.5rem 1rem;
}

input::placeholder {
  color: #8a9aa7;
}

input[aria-invalid="true"] {
  border-color: var(--danger);
}

.field-error {
  min-height: 1.25rem;
  margin: 0.3rem 0 0.35rem;
  color: var(--danger);
  font-size: 0.78rem;
  font-weight: 650;
}

.button {
  min-height: 3rem;
  padding: 0.72rem 1.1rem;
  border: 1px solid transparent;
  border-radius: 0.55rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  font-weight: 760;
  text-decoration: none;
  transition: transform 140ms ease, background-color 140ms ease, border-color 140ms ease;
}

.button:hover:not(:disabled) {
  transform: translateY(-1px);
}

.button:disabled {
  cursor: wait;
  opacity: 0.62;
}

.button-primary {
  color: white;
  background: var(--teal);
  border-color: var(--teal);
  box-shadow: 0 8px 20px rgba(242, 148, 0, 0.2);
}

.button-primary:hover:not(:disabled) {
  background: var(--teal-dark);
}

.button-secondary,
.button-quiet {
  color: var(--ink-strong);
  background: var(--surface);
  border-color: var(--border);
}

.button-secondary:hover:not(:disabled),
.button-quiet:hover:not(:disabled) {
  border-color: #9db2be;
  background: var(--blue-pale);
}

.button-danger-quiet {
  color: var(--danger);
  background: var(--danger-pale);
  border-color: #f2ceca;
}

.button-wide {
  width: 100%;
}

.phone-form .button-wide {
  margin-top: 0.15rem;
}

.phone-form .button svg {
  margin-left: auto;
}

.privacy-note {
  max-width: 30rem;
  margin: 1.35rem 0 0;
  color: var(--muted);
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  font-size: 0.75rem;
  line-height: 1.5;
}

.privacy-note svg {
  width: 1rem;
  flex: 0 0 auto;
  margin-top: 0.1rem;
}

.how-it-works {
  position: relative;
  padding: clamp(2rem, 4vw, 3.1rem);
  border: 1px solid rgba(242, 148, 0, 0.2);
  border-radius: 1.15rem;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow);
}

.aside-icon {
  width: 3.5rem;
  height: 3.5rem;
  margin-bottom: 1.5rem;
  border-radius: 0.8rem;
  color: var(--teal);
  background: var(--teal-pale);
  display: grid;
  place-items: center;
}

.aside-icon svg,
.state-icon svg,
.conversation-empty svg {
  width: 1.9rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.how-it-works h2 {
  margin: 0 0 1.5rem;
  color: var(--ink-strong);
  font-size: 1.55rem;
  letter-spacing: -0.02em;
}

.steps {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 1.2rem;
}

.steps li {
  display: grid;
  grid-template-columns: 2rem 1fr;
  gap: 0.8rem;
}

.steps li > span {
  width: 1.9rem;
  height: 1.9rem;
  border: 1px solid #fddcab;
  border-radius: 50%;
  color: var(--teal-dark);
  background: var(--teal-pale);
  display: grid;
  place-items: center;
  font-size: 0.88rem;
  font-weight: 850;
}

.steps strong {
  color: var(--ink-strong);
  font-size: 1.05rem;
}

.steps p {
  margin: 0.25rem 0 0;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.55;
}

.support-note {
  margin-top: 1.8rem;
  padding: 0.9rem;
  border-radius: 0.6rem;
  color: var(--muted);
  background: var(--blue-pale);
  display: flex;
  gap: 0.6rem;
  font-size: 0.9rem;
  line-height: 1.55;
}

.support-note svg {
  width: 1.1rem;
  flex: 0 0 auto;
}

.support-copy {
  min-width: 0;
}

.dial-in-line {
  display: block;
  margin-top: 0.35rem;
  color: var(--ink-strong);
  font-weight: 700;
}

.dial-in-line a {
  color: var(--teal-dark);
  white-space: nowrap;
}

.dial-in-information {
  margin: 0.45rem 0 0;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 500;
  line-height: 1.5;
}

.screen-centered {
  display: grid;
  place-items: center;
}

.state-card {
  width: min(100%, 39rem);
  padding: clamp(2rem, 5vw, 3.5rem);
  border: 1px solid var(--border);
  border-radius: 1.15rem;
  background: var(--surface);
  box-shadow: var(--shadow);
  text-align: center;
}

.state-card h1 {
  max-width: none;
  font-size: clamp(2rem, 5vw, 3.25rem);
  line-height: 1.05;
}

.state-description {
  max-width: 32rem;
  margin: 1.2rem auto 1.7rem;
  color: var(--muted);
  line-height: 1.65;
}

.waiting-visual {
  position: relative;
  width: 7.5rem;
  height: 7.5rem;
  margin: 0 auto 1.3rem;
  display: grid;
  place-items: center;
}

.signal-ring {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(242, 148, 0, 0.32);
  border-radius: 50%;
  animation: signal 2.8s ease-out infinite;
}

.ring-two {
  inset: 0.8rem;
  animation-delay: 0.7s;
}

@keyframes signal {
  0% { opacity: 0.8; transform: scale(0.72); }
  70%, 100% { opacity: 0; transform: scale(1.05); }
}

.state-icon {
  position: relative;
  z-index: 1;
  width: 4.2rem;
  height: 4.2rem;
  border-radius: 50%;
  color: var(--teal);
  background: var(--teal-pale);
  display: grid;
  place-items: center;
}

.state-icon-static {
  margin: 0 auto 1.3rem;
}

.status-kicker,
.connection-label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  letter-spacing: 0;
  text-transform: none;
  font-size: 0.77rem;
}

.status-dot {
  width: 0.48rem;
  height: 0.48rem;
  border-radius: 50%;
  background: #16a26d;
  box-shadow: 0 0 0 4px rgba(22, 162, 109, 0.12);
}

.connection-label.is-interrupted .status-dot {
  background: #c18719;
  box-shadow: 0 0 0 4px rgba(193, 135, 25, 0.14);
}

.connection-label.is-rtt-paused .status-dot {
  background: #c18719;
  animation: none;
}

.number-chip {
  width: fit-content;
  margin: 0 auto 0.9rem;
  padding: 0.55rem 0.85rem;
  border-radius: 2rem;
  color: var(--muted);
  background: var(--blue-pale);
  font-size: 0.78rem;
}

.number-chip strong {
  margin-left: 0.25rem;
  color: var(--ink-strong);
}

.elapsed {
  margin: 0 0 1.4rem;
  color: var(--muted);
  font-size: 0.8rem;
}

.elapsed time {
  color: var(--ink-strong);
  font-variant-numeric: tabular-nums;
  font-weight: 760;
}

.reassurance {
  margin: 1.2rem 0 0;
  color: var(--muted);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.75rem;
}

.reassurance svg {
  color: var(--teal);
}

.verification-card form {
  width: min(100%, 26rem);
  margin: 0 auto;
}

.code-input {
  height: 4.2rem;
  padding: 0 1rem;
  border-radius: 0.65rem;
  text-align: center;
  font-size: 1.75rem;
  font-weight: 750;
  letter-spacing: 0.28em;
}

.text-button {
  margin-top: 1rem;
  padding: 0.55rem 0.9rem;
  border-radius: 0.4rem;
  color: var(--muted);
  font-size: 0.83rem;
  font-weight: 700;
}

.screen-conversation {
  width: min(100% - 2rem, 78rem);
  padding: 1.8rem 0;
}

.conversation-shell {
  height: min(51rem, calc(100vh - 9rem));
  height: min(51rem, calc(100svh - 9rem));
  min-height: 36rem;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 1rem;
  background: var(--surface);
  box-shadow: var(--shadow);
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  grid-template-areas:
    "header"
    "reconnect"
    "log"
    "composer";
}

.conversation-header {
  grid-area: header;
  width: 100%;
  min-width: 0;
  min-height: 5.2rem;
  padding: 1rem 1.4rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.conversation-header h1 {
  font-size: 1.35rem;
  line-height: 1.2;
  letter-spacing: -0.025em;
  white-space: nowrap;
}

.identity-confidence {
  width: fit-content;
  margin: 0.35rem 0 0;
  padding: 0.2rem 0.48rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
  background: var(--blue-pale);
  font-size: 0.65rem;
  font-weight: 700;
}

.identity-confidence.is-asserted {
  border-color: #bcded9;
  color: var(--teal-dark);
  background: var(--teal-pale);
}

.conversation-header .connection-label {
  margin-bottom: 0.35rem;
  justify-content: flex-start;
}

.conversation-header .button {
  min-height: 2.55rem;
  font-size: 0.78rem;
}

.reconnect-panel {
  grid-area: reconnect;
  width: 100%;
  min-width: 0;
  margin: 0;
  padding: 0.85rem 1.4rem;
  border-bottom: 1px solid #ecd8a7;
  color: #6a4e10;
  background: #fff8e5;
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.reconnect-panel[hidden] {
  display: none;
}

.reconnect-panel p {
  margin: 0.16rem 0 0;
  font-size: 0.76rem;
}

.reconnect-panel time {
  font-variant-numeric: tabular-nums;
  font-weight: 800;
}

.spinner {
  width: 1.3rem;
  height: 1.3rem;
  border: 2px solid rgba(106, 78, 16, 0.22);
  border-top-color: #8a6519;
  border-radius: 50%;
  flex: 0 0 auto;
  animation: spin 0.9s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.conversation-log {
  grid-area: log;
  width: 100%;
  min-height: 0;
  min-width: 0;
  overflow-y: auto;
  padding: 1.8rem clamp(1rem, 4vw, 3rem);
  scroll-behavior: smooth;
}

.conversation-empty {
  height: 100%;
  min-height: 12rem;
  color: #8496a4;
  display: grid;
  place-content: center;
  justify-items: center;
  text-align: center;
}

.conversation-empty svg {
  width: 2.6rem;
  margin-bottom: 0.7rem;
  color: #9db0bb;
}

.conversation-empty p {
  max-width: 25rem;
  margin: 0;
  font-size: 0.84rem;
  line-height: 1.55;
}

.message {
  width: min(82%, 41rem);
  margin-bottom: 1.25rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.message-local {
  margin-left: auto;
  align-items: flex-end;
}

.message-system {
  width: min(92%, 46rem);
  margin-right: auto;
  margin-left: auto;
  align-items: center;
}

.message-system .message-meta {
  justify-content: center;
}

.message-system .message-bubble {
  min-height: 0;
  border-color: var(--border);
  border-radius: 0.65rem;
  color: var(--muted);
  background: var(--surface);
  font-size: 0.82rem;
  text-align: center;
}

.message-peer .message-meta strong {
  color: var(--teal);
}

.message-meta {
  margin: 0 0 0.35rem;
  color: var(--muted);
  display: flex;
  align-items: baseline;
  gap: 0.45rem;
  font-size: 0.7rem;
}

.message-local .message-meta {
  justify-content: flex-end;
}

.message-meta strong {
  color: var(--ink);
  font-size: 0.75rem;
}

.message-meta time {
  font-variant-numeric: tabular-nums;
}

.message-bubble {
  width: fit-content;
  max-width: 100%;
  min-height: 2.75rem;
  padding: 0.8rem 1rem;
  border: 1px solid var(--bubble-remote-border);
  border-radius: 0.25rem 0.85rem 0.85rem 0.85rem;
  background: var(--bubble-remote-bg);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
  line-height: 1.55;
}

.message-bubble mark {
  padding: 0.05em 0;
  color: inherit;
  background: #ffe08a;
  box-shadow: 0 0 0 0.08em #ffe08a;
}

.message-local .message-bubble {
  border-color: var(--bubble-local-border);
  border-radius: 0.85rem 0.25rem 0.85rem 0.85rem;
  background: var(--bubble-local-bg);
}

.message.is-draft .message-bubble::after {
  content: "";
  width: 0.12rem;
  height: 1.05em;
  margin-left: 0.12rem;
  background: currentColor;
  display: inline-block;
  vertical-align: -0.13em;
  animation: caret 0.85s step-end infinite;
}

@keyframes caret { 50% { opacity: 0; } }

.composer {
  grid-area: composer;
  width: 100%;
  min-width: 0;
  padding: 1rem 1.4rem 1.1rem;
  border-top: 1px solid var(--border);
  background: #fbfcfc;
}

.quick-replies {
  min-width: 0;
  margin-bottom: 0.75rem;
}

.quick-replies-label {
  margin-bottom: 0.38rem;
  color: var(--muted);
  display: block;
  font-size: 0.68rem;
  font-weight: 750;
}

.quick-reply-list {
  min-width: 0;
  max-width: 100%;
  display: flex;
  gap: 0.4rem;
  overflow-x: auto;
  padding: 0.1rem 0.1rem 0.35rem;
}

.quick-reply-button {
  min-height: 2.2rem;
  padding: 0.42rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--ink);
  background: var(--surface);
  white-space: nowrap;
  font-size: 0.7rem;
  font-weight: 680;
}

.quick-reply-button:hover {
  border-color: var(--teal);
  background: var(--teal-pale);
}

.composer-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 0.55rem;
}

.composer-row input {
  min-width: 0;
  height: 3.3rem;
  padding: 0 1rem;
  border-radius: 0.55rem;
}

.composer-row input:disabled {
  background: #edf0f2;
}

.send-button,
.speech-button {
  width: 3.3rem;
  height: 3.3rem;
  border: 0;
  border-radius: 0.55rem;
  color: white;
  background: var(--teal);
  cursor: pointer;
  display: grid;
  place-items: center;
}

.speech-button {
  border: 1px solid var(--teal);
  color: var(--teal-dark);
  background: var(--surface);
}

.speech-button:hover:not(:disabled) {
  background: var(--teal-pale);
}

.speech-button[aria-pressed="true"] {
  border-color: #b42318;
  color: white;
  background: #b42318;
  box-shadow: 0 0 0 0.22rem rgba(180, 35, 24, 0.18);
}

.speech-button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.speech-button svg {
  width: 1.35rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.speech-button-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  width: 2.4rem;
  height: 1.65rem;
}

.speech-level-meter {
  display: none;
  align-items: flex-end;
  justify-content: center;
  gap: 0.1rem;
  width: 0.75rem;
  height: 1.05rem;
}

.speech-level-meter span {
  width: 0.1rem;
  min-height: 0.25rem;
  border-radius: 999px;
  background: currentColor;
  opacity: 0.32;
  transform: scaleY(0.45);
  transform-origin: bottom;
  transition: transform 90ms linear, opacity 90ms linear;
}

.speech-level-meter span:nth-child(1) { height: 0.42rem; }
.speech-level-meter span:nth-child(2) { height: 0.72rem; }
.speech-level-meter span:nth-child(3) { height: 1rem; }
.speech-level-meter span:nth-child(4) { height: 0.58rem; }

.speech-button[aria-pressed="true"] .speech-level-meter {
  display: flex;
}

.speech-button[data-audio-level="1"] .speech-level-meter span:nth-child(-n + 1),
.speech-button[data-audio-level="2"] .speech-level-meter span:nth-child(-n + 2),
.speech-button[data-audio-level="3"] .speech-level-meter span:nth-child(-n + 3),
.speech-button[data-audio-level="4"] .speech-level-meter span:nth-child(-n + 4) {
  opacity: 1;
  transform: scaleY(1);
}

.speech-controls {
  margin-top: 0.55rem;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--muted);
  font-size: 0.7rem;
}

.speech-controls select {
  min-height: 2rem;
  max-width: 14rem;
  padding: 0.25rem 1.8rem 0.25rem 0.5rem;
  border: 1px solid var(--border);
  border-radius: 0.4rem;
  color: var(--ink);
  background: var(--surface);
  font: inherit;
}

.speech-preview {
  margin-top: 0.55rem;
  min-height: 2.25rem;
  padding: 0.55rem 0.7rem;
  border: 1px dashed var(--teal);
  border-radius: 0.45rem;
  color: var(--muted);
  background: var(--teal-pale);
  font-size: 0.82rem;
  font-style: italic;
  overflow-wrap: anywhere;
}

.speech-preview::before {
  content: "… ";
  font-weight: 800;
}

.speech-status {
  min-height: 1.2em;
  margin: 0.4rem 0 0;
  color: var(--muted);
  font-size: 0.7rem;
}

.generated-label {
  margin-left: 0.45rem;
  padding: 0.12rem 0.3rem;
  border: 1px solid currentColor;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.58rem;
  font-weight: 750;
}

.send-button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.send-button svg {
  width: 1.3rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.composer-hint {
  margin: 0.55rem 0 0;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.72rem;
}

.delivery-status {
  height: 1.4em;
  margin: 0.35rem 0 0;
  overflow: hidden;
  color: var(--muted);
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 0.68rem;
  line-height: 1.4;
}

.delivery-status.has-pending {
  color: #855f0e;
  font-weight: 700;
}

.live-pill {
  padding: 0.18rem 0.38rem;
  border-radius: 0.25rem;
  color: var(--teal-dark);
  background: var(--teal-pale);
  font-size: 0.62rem;
  font-weight: 850;
  letter-spacing: 0.08em;
}

.ended-card .state-icon-ended {
  margin: 0 auto 1.3rem;
  color: var(--muted);
  background: var(--blue-pale);
}

.ended-actions {
  display: flex;
  justify-content: center;
  gap: 0.7rem;
  flex-wrap: wrap;
}

.session-summary {
  width: min(100%, 34rem);
  margin: 1.25rem auto;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.55rem;
  text-align: left;
}

.session-summary div {
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: 0.55rem;
  background: var(--background);
}

.session-summary div:last-child {
  grid-column: 1 / -1;
}

.session-summary dt {
  color: var(--muted);
  font-size: 0.65rem;
  font-weight: 700;
}

.session-summary dd {
  margin: 0.25rem 0 0;
  color: var(--ink-strong);
  font-size: 0.8rem;
  font-weight: 760;
}

.site-footer {
  min-height: 4.2rem;
  padding: 1rem 4vw;
  border-top: 1px solid rgba(16, 24, 40, 0.08);
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.7rem;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.footer-links a {
  color: var(--teal-dark);
  font-weight: 700;
  text-underline-offset: 0.18em;
}

.accessibility-dialog {
  width: min(calc(100% - 2rem), 31rem);
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 0.9rem;
  color: var(--ink);
  background: var(--surface);
  box-shadow: 0 25px 80px rgba(8, 30, 48, 0.25);
}

.accessibility-dialog::backdrop {
  background: rgba(9, 29, 44, 0.52);
  backdrop-filter: blur(2px);
}

.dialog-header {
  padding: 1.4rem 1.5rem 1.15rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.dialog-header .eyebrow {
  margin-bottom: 0.3rem;
}

.dialog-header h2 {
  margin: 0;
  color: var(--ink-strong);
  font-size: 1.45rem;
}

.icon-button {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.45rem;
  display: grid;
  place-items: center;
}

.icon-button svg {
  width: 1.25rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
}

.accessibility-dialog fieldset {
  margin: 0;
  padding: 1.3rem 1.5rem;
  border: 0;
  border-bottom: 1px solid var(--border);
}

.accessibility-dialog legend {
  padding-top: 1.3rem;
  color: var(--ink-strong);
  font-size: 0.85rem;
  font-weight: 760;
}

.size-options {
  margin-top: 0.7rem;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.55rem;
}

.size-options label {
  cursor: pointer;
}

.size-options input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.size-options label > span {
  min-height: 5rem;
  padding: 0.6rem;
  border: 1.5px solid var(--border);
  border-radius: 0.55rem;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 0.2rem;
}

.size-options input:focus-visible + span {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.size-options input:checked + span {
  border-color: var(--teal);
  color: var(--teal-dark);
  background: var(--teal-pale);
}

.size-options b {
  font-size: 1rem;
}

.size-options .medium-a {
  font-size: 1.2rem;
}

.size-options .large-a {
  font-size: 1.4rem;
}

.size-options small {
  font-size: 0.66rem;
}

.toggle-row {
  min-height: 4.6rem;
  padding: 0.8rem 1.5rem;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.select-row {
  min-height: 4.6rem;
  padding: 0.8rem 1.5rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.select-row span {
  display: grid;
  gap: 0.2rem;
}

.select-row strong {
  color: var(--ink-strong);
  font-size: 0.84rem;
}

.select-row small {
  color: var(--muted);
  font-size: 0.68rem;
}

.select-row select {
  max-width: 11rem;
  min-height: 2.5rem;
  padding: 0.35rem 0.55rem;
  border: 1px solid var(--border-strong);
  border-radius: 0.45rem;
  color: var(--ink);
  background: var(--surface);
}

.toggle-row span {
  display: grid;
  gap: 0.2rem;
}

.toggle-row strong {
  color: var(--ink-strong);
  font-size: 0.84rem;
}

.toggle-row small {
  color: var(--muted);
  font-size: 0.68rem;
}

.toggle-row input {
  appearance: none;
  width: 2.75rem;
  height: 1.55rem;
  padding: 0.15rem;
  border: 1px solid #9cadb7;
  border-radius: 2rem;
  background: #dfe5e8;
  flex: 0 0 auto;
  cursor: pointer;
}

.toggle-row input::before {
  content: "";
  width: 1.12rem;
  height: 1.12rem;
  border-radius: 50%;
  background: white;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  display: block;
  transition: transform 140ms ease;
}

.toggle-row input:checked {
  border-color: var(--teal);
  background: var(--teal);
}

.toggle-row input:checked::before {
  transform: translateX(1.18rem);
}

.accessibility-dialog > .button {
  width: calc(100% - 3rem);
  margin: 1.3rem 1.5rem 1.5rem;
}

.dialog-body {
  padding: 1.25rem 1.5rem 1.5rem;
}

.dialog-body > label:first-child {
  display: block;
  margin-bottom: 0.4rem;
  color: var(--ink-strong);
  font-size: 0.82rem;
}

.dialog-body .select-row,
.dialog-body .compact-toggle {
  margin: 0.9rem -1.5rem 0;
}

.dialog-actions {
  margin-top: 1.1rem;
  display: flex;
  justify-content: flex-end;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.transcript-preview {
  max-height: 16rem;
  margin-top: 0.8rem;
  padding: 0.75rem;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: 0.55rem;
  background: var(--background);
  user-select: text;
}

.transcript-preview p {
  margin: 0 0 0.65rem;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 0.75rem;
  line-height: 1.5;
}

.transcript-preview p:last-child {
  margin-bottom: 0;
}

.transcript-preview strong {
  margin-right: 0.35rem;
}

.compact-privacy {
  margin: 1rem 0 0;
}

.shortcut-list {
  margin: 0;
  padding: 0.75rem 1.5rem 1.5rem;
}

.shortcut-list div {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
  display: grid;
  grid-template-columns: minmax(8rem, auto) 1fr;
  gap: 1rem;
  align-items: center;
}

.shortcut-list div:last-child {
  border-bottom: 0;
}

.shortcut-list dd {
  margin: 0;
  color: var(--ink);
  font-size: 0.8rem;
}

kbd {
  min-width: 1.8rem;
  padding: 0.18rem 0.35rem;
  border: 1px solid var(--border-strong);
  border-bottom-width: 2px;
  border-radius: 0.3rem;
  background: var(--background);
  display: inline-block;
  text-align: center;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 750;
}

.toast {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 90;
  max-width: min(26rem, calc(100% - 2rem));
  padding: 0.8rem 1rem;
  border: 1px solid #c7d4dc;
  border-radius: 0.55rem;
  color: white;
  background: var(--ink-strong);
  box-shadow: 0 10px 30px rgba(8, 30, 48, 0.22);
  font-size: 0.8rem;
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

html[data-contrast="true"] {
  --ink: #081c2d;
  --ink-strong: #000f1c;
  --muted: #344b5c;
  --teal: #c97200;
  --teal-dark: #7e4a10;
  --teal-pale: #ffead5;
  --blue-pale: #fff6ed;
  --canvas: #f1f3f2;
  --border: #6d8391;
  --danger: #8f1212;
}

html[data-theme="dark"] {
  --ink: #d0d5dd;
  --ink-strong: #f2f4f7;
  --muted: #98a2b3;
  --teal: #f5a623;
  --teal-dark: #fdb44b;
  --teal-pale: #3a2a12;
  --blue-pale: #202939;
  --surface: #182230;
  --canvas: #101828;
  --border: #344054;
  --danger: #f97066;
  --danger-pale: #3b1d22;
  --focus: #fdb022;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.32);
  --bubble-remote-bg: #222e3d;
  --bubble-remote-border: #344357;
  --bubble-local-bg: #243e56;
  --bubble-local-border: #365a78;
  color-scheme: dark;
}

html[data-theme="dark"] body {
  background:
    radial-gradient(circle at 7% 10%, rgba(242, 148, 0, 0.09), transparent 24rem),
    var(--canvas);
}

html[data-theme="dark"] .site-header {
  border-bottom-color: rgba(255, 255, 255, 0.1);
  background: rgba(16, 24, 40, 0.94);
}

html[data-theme="dark"] .brand-logo {
  padding: 0.22rem 0.35rem;
  border-radius: 0.35rem;
  background: white;
}

html[data-theme="dark"] .language-button.is-active,
html[data-theme="dark"] .phone-field input,
html[data-theme="dark"] .text-field,
html[data-theme="dark"] .code-input,
html[data-theme="dark"] .composer-row input,
html[data-theme="dark"] .button-secondary,
html[data-theme="dark"] .button-quiet {
  border-color: var(--border);
  color: var(--ink-strong);
  background: var(--surface);
}

html[data-theme="dark"] .how-it-works,
html[data-theme="dark"] .state-card,
html[data-theme="dark"] .conversation-shell,
html[data-theme="dark"] .accessibility-dialog,
html[data-theme="dark"] .quick-reply-button {
  background: rgba(24, 34, 48, 0.96);
}

html[data-theme="dark"] input::placeholder,
html[data-theme="dark"] .conversation-empty,
html[data-theme="dark"] .conversation-empty svg {
  color: #98a2b3;
}

html[data-theme="dark"] .composer {
  background: #151f2d;
}

html[data-theme="dark"] .composer-row input:disabled {
  background: #202939;
}

html[data-theme="dark"] .identity-confidence,
html[data-theme="dark"] .session-summary div,
html[data-theme="dark"] kbd {
  background: #172230;
}

html[data-theme="dark"] .message-bubble mark {
  color: #101828;
  background: #fdb44b;
  box-shadow: 0 0 0 0.08em #fdb44b;
}

html[data-theme="dark"] .reconnect-panel {
  border-color: #854a0e;
  color: #fec84b;
  background: #33250f;
}

html[data-theme="dark"] .toggle-track {
  border-color: #475467;
  background: #344054;
}

html[data-theme="dark"] .site-footer {
  border-top-color: rgba(255, 255, 255, 0.08);
}

html[data-theme="dark"] .skip-link,
html[data-theme="dark"] .toast {
  color: white;
  background: #344054;
}

html[data-theme="dark"][data-contrast="true"] {
  --ink: #f2f4f7;
  --ink-strong: #ffffff;
  --muted: #d0d5dd;
  --teal: #fdb022;
  --teal-dark: #fec84b;
  --teal-pale: #47330f;
  --blue-pale: #293548;
  --surface: #111927;
  --canvas: #070d17;
  --border: #98a2b3;
}

html[data-contrast="true"] .button,
html[data-contrast="true"] input,
html[data-contrast="true"] .state-card,
html[data-contrast="true"] .conversation-shell,
html[data-contrast="true"] .how-it-works {
  border-width: 2px;
}

html[data-reduce-motion="true"] *,
html[data-reduce-motion="true"] *::before,
html[data-reduce-motion="true"] *::after {
  scroll-behavior: auto !important;
  animation-duration: 0.001ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: 0.001ms !important;
}

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

@media (max-width: 800px) {
  .site-header {
    min-height: 4.6rem;
    padding: 0 1rem;
  }

  .tool-button span {
    display: none;
  }

  .tool-button {
    width: 2.55rem;
    padding: 0;
    justify-content: center;
  }

  .entry-layout {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .entry-copy {
    max-width: none;
  }

  .phone-form {
    max-width: none;
  }

  .how-it-works {
    width: 100%;
  }

  .conversation-shell {
    height: calc(100vh - 6.6rem);
    height: calc(100svh - 6.6rem);
    min-height: 31rem;
  }

  .conversation-header {
    align-items: flex-start;
  }

  .conversation-actions .button span,
  .conversation-actions .button-quiet {
    font-size: 0;
  }

  .conversation-actions .button {
    width: 2.65rem;
    min-height: 2.65rem;
    padding: 0;
  }

  .conversation-actions .button-danger-quiet {
    width: auto;
    padding: 0 0.65rem;
    font-size: 0.7rem;
  }

  .screen-conversation {
    width: 100%;
    padding: 0;
  }

  .conversation-shell {
    border-right: 0;
    border-left: 0;
    border-radius: 0;
  }

  .site-footer {
    display: none;
  }
}

@media (max-width: 520px) {
  .site-header {
    padding-right: 0.75rem;
    padding-left: 0.75rem;
    gap: 0.5rem;
  }

  .brand-logo {
    width: 7.2rem;
  }

  .brand-product {
    display: none;
  }

  .header-tools {
    gap: 0.25rem;
  }

  .header-tools .tool-button {
    width: 2.35rem;
  }

  .language-button {
    min-width: 2.1rem;
    padding-right: 0.35rem;
    padding-left: 0.35rem;
  }

  .screen {
    width: min(100% - 1.2rem, 74rem);
    padding: 2.2rem 0;
  }

  h1 {
    font-size: clamp(2.25rem, 13vw, 3.4rem);
  }

  .state-card {
    padding: 1.8rem 1.15rem;
  }

  .conversation-header,
  .composer {
    padding-right: 0.85rem;
    padding-left: 0.85rem;
  }

  .conversation-header h1 {
    font-size: 1.12rem;
  }

  .conversation-header {
    flex-direction: column;
  }

  .conversation-actions {
    width: 100%;
    gap: 0.35rem;
    justify-content: flex-end;
  }

  .identity-confidence {
    max-width: 15rem;
  }

  .session-summary {
    grid-template-columns: 1fr;
  }

  .select-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .select-row select {
    width: 100%;
    max-width: none;
  }

  .shortcut-list div {
    grid-template-columns: 1fr;
    gap: 0.4rem;
  }

  .message {
    width: 92%;
  }

  .ended-actions {
    display: grid;
  }

  .size-options {
    gap: 0.3rem;
  }
}
