/* Cadence — car-safe dark UI: huge targets, high contrast, minimal reading. */
:root {
  --page: #0d0d0d;
  --surface: #1a1a19;
  --ink: #ffffff;
  --ink-2: #c3c2b7;
  --muted: #898781;
  --hairline: #2c2c2a;
  --accent: #3987e5;
  --green: #0ca30c;
  --amber: #fab219;
  --red: #d03b3b;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--page);
  color: var(--ink);
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  padding: max(env(safe-area-inset-top), 16px) 16px max(env(safe-area-inset-bottom), 16px);
}
.hidden { display: none !important; }
section { max-width: 480px; margin: 0 auto; }

.brand { text-align: center; font-size: 28px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-2); margin: 24px 0; }
.muted { color: var(--muted); font-size: 14px; }

button, .fileBtn {
  font: inherit; color: var(--ink); border: 1px solid var(--hairline);
  background: var(--surface); border-radius: 16px; cursor: pointer;
  display: block; width: 100%; text-align: center;
}
.giant {
  height: 42vh; min-height: 240px; font-size: 44px; font-weight: 700;
  background: var(--accent); border: none; margin: 8px 0 20px;
}
.giant:active { filter: brightness(1.2); }
.big { padding: 18px; font-size: 19px; font-weight: 600; margin: 8px 0; }
.secondary { background: var(--surface); }
.danger { background: transparent; border-color: var(--red); color: var(--red); }
.homeNav { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.rowHead { display: grid; grid-template-columns: 72px 1fr; align-items: center; gap: 12px; }
.rowHead h2 { margin: 0; }
.rowHead .backBtn { margin: 0; }

/* session status orb — read state at a glance, never words */
.orb {
  width: 46vw; max-width: 220px; aspect-ratio: 1; border-radius: 50%;
  margin: 10vh auto 16px; background: var(--surface); border: 2px solid var(--hairline);
  transition: background 0.3s;
}
.orb.listening { background: var(--green); animation: pulse 1.6s ease-in-out infinite; }
.orb.processing { background: var(--amber); animation: pulse 0.8s ease-in-out infinite; }
.orb.speaking { background: var(--accent); animation: pulse 2.4s ease-in-out infinite; }
@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(0.93); opacity: 0.75; }
}
.statusLabel { text-align: center; font-size: 22px; color: var(--ink-2); min-height: 28px; }
.live {
  height: 26vh; overflow-y: auto; background: var(--surface);
  border: 1px solid var(--hairline); border-radius: 12px; padding: 10px 12px;
  font-size: 14px; margin-bottom: 12px;
}
.live .line { margin: 6px 0; color: var(--ink-2); }
.live .coach { color: var(--accent); }
.live .error { color: var(--red); }

/* settings */
fieldset { border: 1px solid var(--hairline); border-radius: 12px; margin: 14px 0; padding: 12px 14px; }
legend { color: var(--muted); padding: 0 6px; font-size: 14px; }
label { display: block; margin: 10px 0 6px; font-size: 16px; }
label.check { display: flex; gap: 10px; align-items: center; }
input[type="password"], input[type="text"], select {
  width: 100%; font: inherit; color: var(--ink); background: var(--page);
  border: 1px solid var(--hairline); border-radius: 10px; padding: 12px; margin-top: 6px;
}
input[type="range"] { width: 100%; margin-top: 10px; }
input[type="checkbox"] { width: 22px; height: 22px; }
.fileBtn { padding: 18px; font-weight: 600; margin: 8px 0; }
.testResult { font-size: 13px; min-height: 18px; color: var(--muted); word-break: break-word; }
.testResult.ok { color: var(--green); }
.testResult.err { color: var(--red); }

/* progress charts */
.chartCard {
  position: relative; background: var(--surface); border: 1px solid var(--hairline);
  border-radius: 12px; padding: 12px; margin: 12px 0;
}
.chartCard h3 { margin: 0 0 8px; font-size: 14px; font-weight: 600; color: var(--ink-2); }
.chartCard svg { width: 100%; height: auto; display: block; }
.chartCard .tick { font-variant-numeric: tabular-nums; }
.tooltip {
  position: absolute; top: 34px; transform: translateX(-50%);
  background: var(--page); border: 1px solid var(--hairline); border-radius: 8px;
  padding: 4px 8px; font-size: 12px; color: var(--ink); pointer-events: none; white-space: nowrap;
}
.tableView { margin: 16px 0; color: var(--ink-2); }
.tableView summary { cursor: pointer; padding: 8px 0; }
.tableView table { width: 100%; border-collapse: collapse; font-size: 13px; }
.tableView th, .tableView td {
  text-align: right; padding: 6px 8px; border-bottom: 1px solid var(--hairline);
  font-variant-numeric: tabular-nums;
}
.tableView th:first-child, .tableView td:first-child { text-align: left; }
