:root {
  --bg: #fbfaf8;
  --ink: #1c1a17;
  --muted: #6b665e;
  --line: #e2ded6;
  --accent: #2f5d50;
  --warn: #8a3324;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #161513;
    --ink: #eae7e1;
    --muted: #9a948a;
    --line: #2e2b27;
    --accent: #7fb3a2;
    --warn: #d98570;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.6 ui-serif, Georgia, "Times New Roman", serif;
  display: flex;
  justify-content: center;
  padding: 3rem 1.25rem 4rem;
}

#app { width: 100%; max-width: 40rem; }
.hidden { display: none !important; }

h1 { font-size: 1.7rem; line-height: 1.25; margin: 0 0 1rem; font-weight: 600; }
h2 { font-size: 1.05rem; margin: 0 0 .35rem; font-weight: 600; }

.eyebrow {
  font: 600 .75rem/1 ui-sans-serif, system-ui, sans-serif;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 .75rem;
}

.muted { color: var(--muted); }
.ok { color: var(--accent); }
.error { color: var(--warn); }

.disclosure {
  border-left: 3px solid var(--accent);
  padding: .1rem 0 .1rem 1.1rem;
  margin: 1.5rem 0 2rem;
}
.disclosure p { margin: .8rem 0; }

.miccheck { border-top: 1px solid var(--line); padding-top: 1.5rem; margin-bottom: 1.75rem; }
.miccheck p { margin: .35rem 0 .9rem; font-size: .93rem; }

.meter {
  height: 8px;
  background: var(--line);
  border-radius: 99px;
  overflow: hidden;
  margin: .9rem 0 .5rem;
}
#level { height: 100%; width: 0; background: var(--accent); transition: width .06s linear; }

.agree {
  display: flex;
  gap: .7rem;
  align-items: flex-start;
  border-top: 1px solid var(--line);
  padding-top: 1.5rem;
  margin-bottom: 1.5rem;
  cursor: pointer;
}
.agree input { margin-top: .42rem; width: 1.05rem; height: 1.05rem; accent-color: var(--accent); }

button {
  font: 500 1rem/1 ui-sans-serif, system-ui, sans-serif;
  padding: .85rem 1.5rem;
  border-radius: 7px;
  border: 1px solid transparent;
  background: var(--accent);
  color: var(--bg);
  cursor: pointer;
}
button:disabled { opacity: .4; cursor: not-allowed; }
button.secondary { background: transparent; color: var(--ink); border-color: var(--line); }

.status-row {
  display: flex;
  align-items: center;
  gap: .6rem;
  font: .85rem/1 ui-sans-serif, system-ui, sans-serif;
  color: var(--muted);
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--line);
}
.spacer { flex: 1; }

.dot { width: 9px; height: 9px; border-radius: 99px; background: var(--muted); flex: none; }
.dot.speaking { background: var(--accent); animation: pulse 1.4s ease-in-out infinite; }
.dot.listening { background: var(--warn); }
@keyframes pulse { 50% { opacity: .25; } }

#transcript {
  min-height: 45vh;
  max-height: 62vh;
  overflow-y: auto;
  padding: 1.5rem 0;
}

.line { margin: 0 0 1.1rem; }
.line.agent { color: var(--ink); }
.line.participant { color: var(--muted); padding-left: 1.1rem; border-left: 2px solid var(--line); }

.controls {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  border-top: 1px solid var(--line);
  padding-top: 1.25rem;
}
.controls .muted { font-size: .87rem; }

/* Visible during the pilot so a bad run produces numbers rather than an impression. */
.diag {
  font: .74rem/1.4 ui-monospace, SFMono-Regular, Menlo, monospace;
  color: var(--muted);
  opacity: .65;
  margin: .9rem 0 0;
}

.hold { display: flex; gap: .6rem; align-items: center; margin: 1rem 0 0; font-size: .9rem; cursor: pointer; }
.hold input { accent-color: var(--accent); }
.hold-hint { font-size: .9rem; color: var(--muted); margin: .6rem 0 0; }
.hold-hint.holding { color: var(--accent); font-weight: 600; }
kbd {
  font: .8rem/1 ui-monospace, Menlo, monospace;
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  border-radius: 4px;
  padding: .15rem .4rem;
}

.download { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
