:root {
  --ink: #16130f;
  --paper: #f3ead7;
  --muted: #8a7f6e;
  --line: #d9ccb4;
  --hi: #c45c26;
  --en: #2f5f78;
  --gold: #b8892d;
  --danger: #9b2c2c;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(1200px 500px at 10% -10%, #2a2118 0%, transparent 50%),
    var(--ink);
  color: var(--paper);
  font-family: "IBM Plex Sans", sans-serif;
}

body {
  min-height: 100vh;
}

.screen {
  width: min(880px, calc(100% - 32px));
  margin: 0 auto;
  padding: 48px 0 72px;
}

h1,
h2,
h3 {
  font-family: Fraunces, Georgia, serif;
  font-weight: 500;
  letter-spacing: -0.03em;
  margin: 0;
}

h1 {
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  line-height: 0.95;
}

.eyebrow {
  margin: 0 0 10px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.72rem;
  color: var(--gold);
}

.lede {
  max-width: 42rem;
  color: #d7cbb6;
  font-size: 1.08rem;
  line-height: 1.55;
}

.card {
  margin-top: 32px;
  padding: 24px;
  background: #1d1914;
  border: 1px solid #3a3228;
  display: grid;
  gap: 16px;
}

label,
legend {
  display: grid;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--muted);
}

input[type="text"],
input:not([type]),
input[type="search"] {
  appearance: none;
  border: 1px solid #4a4034;
  background: #12100c;
  color: var(--paper);
  padding: 12px 14px;
  font: inherit;
}

fieldset {
  border: 1px solid #4a4034;
  margin: 0;
  padding: 12px;
  display: grid;
  gap: 8px;
}

.choice {
  display: flex;
  gap: 10px;
  align-items: baseline;
  color: var(--paper);
  font-size: 1rem;
}

.choice span {
  color: var(--muted);
  font-size: 0.85rem;
}

button {
  font: inherit;
  border: 0;
  background: var(--paper);
  color: var(--ink);
  padding: 14px 18px;
  cursor: pointer;
  font-weight: 600;
}

button.ghost {
  background: transparent;
  color: var(--paper);
  border: 1px solid #4a4034;
}

.error {
  color: #f0b4b4;
  margin: 0;
}

.call .top {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 16px;
}

.people {
  margin-top: 32px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 12px;
}

.person {
  padding: 16px;
  border: 1px solid #3a3228;
  background: #1a1612;
  min-height: 148px;
  position: relative;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.person.speaking {
  border-color: #d7b56a;
  box-shadow: 0 0 0 1px #d7b56a inset, 0 0 24px rgba(184, 137, 45, 0.18);
}

.person.bot {
  border-color: #6d5420;
  background: #241c10;
  text-align: center;
  min-width: 220px;
}

[hidden] {
  display: none !important;
}

.tag {
  margin: 0 0 8px;
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 8px;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #5c5348;
  flex: 0 0 auto;
}

.dot[data-state="online"] {
  background: #7dba6a;
  box-shadow: 0 0 8px #7dba6a;
}

.dot[data-state="connecting"] {
  background: #c9a227;
  box-shadow: 0 0 8px #c9a227;
}

.dot[data-state="offline"] {
  background: #6a3a3a;
}

.presence {
  margin: 6px 0 0;
  font-size: 0.78rem;
  color: var(--muted);
}

.speak-badge {
  margin: 10px 0 0;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
}

.now-speaking {
  margin: 16px 0 0;
  min-height: 1.4em;
  color: #efe6d3;
}

.stats {
  margin: 16px 0 0;
  padding: 12px 16px;
  border: 1px solid #3a3228;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.stats div {
  display: grid;
  gap: 4px;
}

.stats dt {
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.stats dd {
  margin: 0;
  font-variant-numeric: tabular-nums;
  color: var(--paper);
}

.meta {
  margin: 8px 0 0;
  color: var(--muted);
}

.status {
  margin: 18px 0 0;
  color: #d7cbb6;
}

.lanes {
  margin-top: 24px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.lane {
  min-height: 180px;
  padding: 16px;
  border: 1px solid #3a3228;
}

.lane.hi {
  border-top: 3px solid var(--hi);
}

.lane.en {
  border-top: 3px solid var(--en);
}

.lane h3 {
  font-size: 1.1rem;
  margin-bottom: 16px;
}

.line {
  margin: 0 0 12px;
  min-height: 1.4em;
  line-height: 1.45;
}

.line.source {
  color: #efe6d3;
}

.line.dest {
  color: #cfc09e;
}

.hint {
  margin-top: 24px;
  color: var(--muted);
  font-size: 0.92rem;
}

#remote-audio {
  display: none;
}

@media (max-width: 720px) {
  .people,
  .lanes,
  .stats {
    grid-template-columns: 1fr;
  }
}
