:root {
  --bg: #f6f5f2;
  --card: #ffffff;
  --text: #1d1d1f;
  --muted: #5f6368;
  --accent: #2f6f5e;
  --accent-soft: #e3efea;
  --border: #dcdad5;
  --error: #b3261e;
}

* { box-sizing: border-box; }
/* Class rules like .consent { display: flex } would otherwise override the hidden attribute. */
[hidden] { display: none !important; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

main { max-width: 640px; margin: 0 auto; padding: 32px 16px 48px; }

h1 { margin: 0; font-size: 32px; color: var(--accent); }
.tagline { margin: 4px 0 24px; color: var(--muted); }

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
}

form { display: grid; gap: 16px; }
label { display: grid; gap: 6px; font-weight: 600; font-size: 14px; }

input, select {
  font: inherit;
  font-weight: 400;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
}

.hint { font-weight: 400; font-size: 13px; color: var(--muted); }
.returning { margin: 0; padding: 10px 12px; border-radius: 8px; background: var(--accent-soft); font-size: 14px; }
.orb.ringing { animation: pulse 1.4s ease-in-out infinite; }

.consent { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; color: var(--muted); }
.consent input { margin-top: 4px; }

button {
  font: inherit;
  font-weight: 600;
  padding: 12px 16px;
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
}
button:disabled { opacity: .6; cursor: wait; }
button.secondary { background: var(--accent-soft); color: var(--accent); }

.status { margin: 0; color: var(--muted); min-height: 1.5em; }
.status.error { color: var(--error); }

.talk-head { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; }

.orb {
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--accent-soft);
  border: 2px solid var(--accent);
  flex: none;
  transition: transform .15s;
}
.orb.speaking { background: var(--accent); animation: pulse 1s ease-in-out infinite; }
.orb.listening { border-style: dashed; }
@keyframes pulse { 50% { transform: scale(1.12); } }
@media (prefers-reduced-motion: reduce) { .orb.speaking, .orb.ringing { animation: none; } }

#calling button { width: 100%; }

.plan { margin: -12px 0 20px; font-size: 14px; color: var(--accent); font-weight: 600; }
.otp { display: grid; gap: 12px; }
.otp p { margin: 0; }
button.link { background: none; color: var(--accent); padding: 4px 0; text-align: left; font-weight: 400; text-decoration: underline; }
a { color: var(--accent); }

footer { max-width: 640px; margin: 0 auto; padding: 0 16px 32px; font-size: 13px; color: var(--muted); text-align: center; }

.legal { line-height: 1.6; }
.legal h2 { font-size: 18px; margin: 28px 0 8px; }
.legal h3 { font-size: 16px; margin: 20px 0 6px; }
.legal ul { padding-left: 20px; }
.legal table { border-collapse: collapse; width: 100%; font-size: 14px; }
.legal th, .legal td { border: 1px solid var(--border); padding: 6px 8px; text-align: left; vertical-align: top; }
button.danger { background: #b3261e; }
