:root {
  --bg: #0f1115;
  --panel: #171b22;
  --panel2: #1e242d;
  --line: #2a3240;
  --text: #e8ecf2;
  --muted: #96a3b5;
  --accent: #4c8bf5;
  --accent2: #7b5cf5;
  --ok: #3ecf8e;
  --warn: #f5b94c;
  --danger: #f5684c;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  line-height: 1.5;
  min-height: 100vh;
}
.wrap { max-width: 820px; margin: 0 auto; padding: 32px 20px 60px; }

header h1 { margin: 0 0 6px; font-size: 30px; letter-spacing: -.5px; }
.sub { margin: 0 0 24px; color: var(--muted); }

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 22px 24px;
  margin-bottom: 18px;
}
.card h2 { margin: 0 0 10px; font-size: 19px; }
.hint { color: var(--muted); font-size: 14px; margin: 0 0 14px; }
.hidden { display: none; }

input[type=file] { display: block; margin: 0 0 12px; color: var(--muted); }
input[type=file]::file-selector-button {
  background: var(--panel2); color: var(--text); border: 1px solid var(--line);
  border-radius: 8px; padding: 8px 14px; margin-right: 10px; cursor: pointer;
}

button {
  border: none; border-radius: 10px; padding: 12px 20px; font-size: 15px;
  font-weight: 600; cursor: pointer; transition: transform .05s ease, filter .15s ease;
}
button:active { transform: translateY(1px); }
button.primary { background: linear-gradient(90deg, var(--accent), var(--accent2)); color: #fff; }
button.danger { background: var(--danger); color: #fff; }
button.ghost { background: transparent; color: var(--muted); border: 1px solid var(--line); }
button:disabled { opacity: .5; cursor: not-allowed; }

.status { margin-top: 12px; font-size: 14px; color: var(--muted); }
.status.ok { color: var(--ok); }
.status.err { color: var(--danger); }

.transcript {
  background: #0b0e13; border: 1px solid var(--line); border-radius: 10px;
  padding: 14px 16px; max-height: 260px; overflow-y: auto; font-size: 15px;
  white-space: pre-wrap; margin-bottom: 16px;
}

.rec-box { display: flex; align-items: center; gap: 12px; }
.time { color: var(--muted); font-variant-numeric: tabular-nums; }
.rec-box.recording button#record { color: var(--danger); }

.metrics { width: 100%; border-collapse: collapse; margin-top: 8px; }
.metrics th, .metrics td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); font-size: 14px; }
.metrics th { color: var(--muted); font-weight: 500; }

.recs { margin-top: 18px; }
.recs h3 { font-size: 16px; margin: 0 0 10px; }
.recs ul { margin: 0; padding-left: 20px; }
.recs li { margin-bottom: 8px; color: #dfe6ee; }

@media (max-width: 560px) {
  .wrap { padding: 20px 14px 48px; }
  header h1 { font-size: 24px; }
  button { width: 100%; }
  .rec-box { flex-wrap: wrap; }
}
