/* Booth intake. Tokens only: var(--ao-*). No hex here. */
html { -webkit-text-size-adjust: 100% }
body {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  max-width: 560px;
  margin: 0 auto;
  font-weight: var(--ao-w-regular);
  font-size: 17px;
  line-height: 1.45;
  color: var(--ao-t0);
}

.top { display: flex; align-items: center; gap: var(--ao-sp-3); padding: var(--ao-sp-4); }
.top__logo { display: block; border-radius: var(--ao-r-full); }
.top__name { font-family: var(--ao-f-display); font-size: var(--ao-fs-h3); letter-spacing: var(--ao-ls-tight); }

.app { flex: 1; display: flex; flex-direction: column; padding: var(--ao-sp-2) var(--ao-sp-4) 96px; }

.say {
  align-self: flex-start;
  margin: 0;
  padding: var(--ao-sp-3) var(--ao-sp-4);
  background: var(--ao-sf-1);
  border: 1px solid var(--ao-bd-1);
  border-radius: var(--ao-r-lg);
  overflow-wrap: anywhere;
}
.say[hidden] { display: none; }

.dock {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: var(--ao-sp-2);
  max-width: 560px;
  margin: 0 auto;
  padding: var(--ao-sp-2) var(--ao-sp-4) calc(var(--ao-sp-2) + env(safe-area-inset-bottom));
  background: var(--ao-bg-page);
  border-top: 1px solid var(--ao-bd-1);
}
.dock[hidden] { display: none; }
.progress { flex: 1; min-width: 0; color: var(--ao-t2); font-size: var(--ao-fs-body-sm); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* Keep page content clear of the fixed dock. */
body:has(.dock:not([hidden])) { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }

.scrim {
  position: fixed;
  inset: 0;
  z-index: 8;
  background: var(--ao-glass);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--ao-dur-mid) var(--ao-ease-out);
}
.scrim--on { opacity: 1; pointer-events: auto; }

.card {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9;
  max-width: 560px;
  margin: 0 auto;
  padding: var(--ao-sp-5) var(--ao-sp-4) calc(var(--ao-sp-5) + env(safe-area-inset-bottom));
  background: var(--ao-bg-page);
  border: 1px solid var(--ao-bd-2);
  border-bottom: 0;
  border-radius: var(--ao-r-lg) var(--ao-r-lg) 0 0;
  box-shadow: var(--ao-lift-agent);
  transform: translateY(110%);
  visibility: hidden;
  transition: transform var(--ao-dur-mid) var(--ao-ease-out), visibility 0s linear var(--ao-dur-mid);
}
.card--open { transform: none; visibility: visible; transition-delay: 0s; }
.card__ai { margin: 0 0 var(--ao-sp-2); color: var(--ao-t2); font-size: var(--ao-fs-body-sm); }
.card__text { margin: 0; font-family: var(--ao-f-display); font-size: var(--ao-fs-h3); line-height: 1.35; }
.card .actions { flex-direction: column; align-items: stretch; }
.card .btn { justify-content: center; text-align: center; }
@media (prefers-reduced-motion: reduce) {
  .card, .scrim { transition: none; }
}

.row { display: flex; gap: var(--ao-sp-2); align-items: stretch; }
.row input { flex: 1; min-width: 0; }
.btn--mic { flex: none; width: 88px; padding-inline: 0; display: inline-flex; align-items: center; justify-content: center; }
/* A field without a Speak button keeps the same right edge as the fields that have one. */
.form .row:not(:has(.btn--mic)) > input { margin-right: calc(88px + var(--ao-sp-2)); }
.legend { margin: 0; color: var(--ao-t1); font-size: var(--ao-fs-body-sm); }
.step { margin: 0; padding: 0; }
.step[hidden] { display: none; }
.step > label:not(.check) { display: block; color: var(--ao-t1); font-size: var(--ao-fs-body-sm); }
/* One rhythm inside every step: 12px between blocks, 4px from a label to its field and from a
   field to its error or hint, checkbox rows stacked on their own padding. */
.form .step > * + * { margin-top: var(--ao-sp-3); }
.form .step > label + .row,
.form .step > .row + .err,
.form .step > .err + .hint,
.form .step > .row + .hint { margin-top: var(--ao-sp-1); }
.form .step > .check + .check { margin-top: 0; }

.chips { display: flex; flex-wrap: wrap; gap: var(--ao-sp-2); }

.chip, .btn {
  min-height: 48px;
  padding: var(--ao-sp-2) var(--ao-sp-4);
  font: inherit;
  color: var(--ao-t0);
  background: var(--ao-bg-page);
  border: 1px solid var(--ao-bd-2);
  border-radius: var(--ao-r-pill);
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.chip:active, .btn:active { background: var(--ao-sf-2); }
.chip[aria-pressed="true"], .chip:has(input:checked) { background: var(--ao-agent-12); border-color: var(--ao-agent); box-shadow: inset 0 0 0 1px var(--ao-agent); }
.btn--primary { background: var(--ao-t0); color: var(--ao-bg-page); border-color: var(--ao-t0); font-weight: var(--ao-w-medium); }
.btn--primary:active { background: var(--ao-t1); }
.btn--quiet { border-color: transparent; color: var(--ao-t2); text-decoration: underline; padding-inline: 0; margin-right: var(--ao-sp-2); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--ao-sp-2); margin-top: var(--ao-sp-3); }

/* Dock buttons: compact, after the .btn rule so the sizes stick. */
.dock .btn { flex: none; }
.dock .btn--dock { min-height: 44px; padding: var(--ao-sp-1) var(--ao-sp-3); }
.dock .btn--vol { display: inline-flex; align-items: center; justify-content: center; width: 44px; min-width: 44px; padding: 0; font-size: 1.25rem; line-height: 1; }
.dock .btn--vol:disabled { opacity: 0.4; cursor: default; }

:focus-visible { outline: 2px solid var(--ao-t0); outline-offset: 2px; }

.form { display: flex; flex-direction: column; gap: var(--ao-sp-3); }
.field { display: flex; flex-direction: column; gap: var(--ao-sp-1); }
.field[hidden] { display: none; }
.field label, .field legend { color: var(--ao-t1); font-size: var(--ao-fs-body-sm); }
.app input[type="text"], .app input[type="tel"], .app input[type="email"], .app input[type="url"] {
  min-height: 48px;
  padding: var(--ao-sp-2) var(--ao-sp-3);
  font: inherit;
  font-size: 17px;
  color: var(--ao-t0);
  background: var(--ao-bg-page);
  border: 1px solid var(--ao-bd-2);
  border-radius: var(--ao-r-md);
}
/* Focus and error thicken the one border instead of stacking an outline ring on it. */
.app input:not([type="checkbox"]):focus-visible { outline: none; border-color: var(--ao-t0); box-shadow: 0 0 0 1px var(--ao-t0); }
.app input[aria-invalid="true"] { border-color: var(--ao-alert); box-shadow: 0 0 0 1px var(--ao-alert); }
.hint { margin: 0; color: var(--ao-t2); font-size: var(--ao-fs-body-sm); }
.err { color: var(--ao-alert); font-size: var(--ao-fs-body-sm); }
.err:empty { display: none; }
fieldset { border: 0; min-width: 0; }

.check { display: flex; align-items: flex-start; gap: var(--ao-sp-3); min-height: 48px; padding: var(--ao-sp-2) 0; }
.check input { width: 28px; height: 28px; flex: none; margin-top: var(--ao-sp-1); accent-color: var(--ao-agent); }
.check a { text-decoration: underline; }

.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip { position: relative; display: inline-flex; align-items: center; }
.chip:has(input:focus-visible) { outline: 2px solid var(--ao-t0); outline-offset: 2px; }

/* Honeypot: off screen, not display:none, so simple bots still fill it. */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.status { color: var(--ao-t2); }
