:root {
  --bg0: #0f1412;
  --bg1: #1a2420;
  --ink: #e8f0ea;
  --muted: #8fa398;
  --accent: #3dba7a;
  --accent-dim: #2a7a52;
  --danger: #e07060;
  --track: #2a3530;
  --font-display: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --font-body: "Avenir Next", "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: var(--font-body);
  color: var(--ink);
  background:
    radial-gradient(ellipse 80% 50% at 20% 0%, #1e3a2e 0%, transparent 55%),
    radial-gradient(ellipse 60% 40% at 90% 80%, #243028 0%, transparent 50%),
    var(--bg0);
}

.shell {
  max-width: 32rem;
  margin: 0 auto;
  padding: 2.5rem 1.25rem 3rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.brand h1 {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 8vw, 3.5rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0;
  line-height: 1;
}

.tagline {
  margin: 0.35rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.panel {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

label,
.meter-head,
.k {
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

select {
  appearance: none;
  background: var(--bg1);
  color: var(--ink);
  border: 1px solid #334038;
  border-radius: 0.35rem;
  padding: 0.75rem 0.9rem;
  font: inherit;
  font-size: 1rem;
}

.meter-head {
  display: flex;
  justify-content: space-between;
}

.meter-track {
  height: 0.85rem;
  background: var(--track);
  border-radius: 999px;
  overflow: hidden;
}

.meter-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent-dim), var(--accent));
  transition: width 60ms linear;
}

.controls {
  flex-direction: row;
  gap: 0.75rem;
}

button {
  flex: 1;
  font: inherit;
  font-size: 1rem;
  padding: 0.85rem 1rem;
  border-radius: 0.35rem;
  border: 1px solid #334038;
  background: var(--bg1);
  color: var(--ink);
  cursor: pointer;
}

button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

button.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #062014;
  font-weight: 600;
}

button.primary:hover:not(:disabled) {
  filter: brightness(1.05);
}

.status-panel p {
  margin: 0.25rem 0;
  font-size: 0.95rem;
}

.status-panel .k {
  display: inline-block;
  min-width: 7.5rem;
}

.error {
  color: var(--danger);
  margin-top: 0.5rem !important;
}

.hidden {
  display: none;
}

.shell-wide {
  max-width: 48rem;
}

.nav {
  margin: 0 0 0.75rem;
}

.nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
}

.nav a:hover {
  color: var(--accent);
}

.hello {
  margin: 0;
  font-size: 1.25rem;
}

.full-name {
  margin: 0.25rem 0 0;
  color: var(--muted);
}

.script-panel blockquote {
  margin: 0.5rem 0 0;
  padding: 1rem 1.1rem;
  background: var(--bg1);
  border-left: 3px solid var(--accent);
  border-radius: 0 0.35rem 0.35rem 0;
  line-height: 1.55;
  font-size: 1.05rem;
}

.hint,
.timer {
  margin: 0.35rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.ok {
  color: var(--accent);
  margin-top: 0.5rem !important;
}

input[type="search"] {
  background: var(--bg1);
  color: var(--ink);
  border: 1px solid #334038;
  border-radius: 0.35rem;
  padding: 0.75rem 0.9rem;
  font: inherit;
  font-size: 1rem;
}

.speakers-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.speaker-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: space-between;
  align-items: center;
  padding: 0.85rem 0;
  border-bottom: 1px solid #2a3530;
}

.speaker-row.enrolled .speaker-meta strong::after {
  content: " · ok";
  color: var(--accent);
  font-weight: 500;
  font-size: 0.8rem;
}

.speaker-meta {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 12rem;
  flex: 1;
}

.speaker-meta span,
.speaker-meta em {
  color: var(--muted);
  font-style: normal;
  font-size: 0.9rem;
}

.speaker-actions {
  display: flex;
  gap: 0.5rem;
}

.speaker-actions button,
.speaker-actions .link-btn {
  flex: 0 0 auto;
  padding: 0.55rem 0.8rem;
  font-size: 0.9rem;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

.speaker-actions .link-btn {
  background: var(--accent);
  border: 1px solid var(--accent);
  color: #062014;
  font-weight: 600;
  border-radius: 0.35rem;
}

.summary p {
  margin: 0.2rem 0;
}

.identify-shell {
  max-width: 40rem;
}

.identify-stage {
  min-height: 42vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 1.5rem 0.5rem;
  gap: 0.35rem;
}

.identify-kicker {
  margin: 0;
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.8rem;
}

.identify-name {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 12vw, 5rem);
  line-height: 1.05;
  font-weight: 600;
}

.identify-full {
  margin: 0;
  color: var(--muted);
  font-size: 1.05rem;
  min-height: 1.4em;
}

.identify-confidence {
  margin: 0.4rem 0 0;
  color: var(--accent);
  font-size: 1rem;
  min-height: 1.3em;
}

.identify-stage.matched .identify-name {
  color: var(--accent);
}

.identify-stage.unknown .identify-name {
  color: #d8b56a;
}

.identify-stage.silent .identify-name {
  color: var(--muted);
}
