:root {
  color-scheme: light dark;
  --bg: #f4f6f4;
  --surface: #ffffff;
  --ink: #17231f;
  --muted: #5a6a65;
  --rule: #d5ded9;
  --accent: #0b6b61;
  --accent-ink: #ffffff;
  --danger: #a1322b;
  --focus: #0b6b61;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1513;
    --surface: #151f1c;
    --ink: #e2ece8;
    --muted: #9fb2ab;
    --rule: #2a3a35;
    --accent: #5fc4b8;
    --accent-ink: #0a1411;
    --danger: #ff8f86;
    --focus: #5fc4b8;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.55 var(--sans);
}
.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 1rem;
  border-bottom: 1px solid var(--rule);
  background: var(--surface);
}
.brand { font-weight: 700; letter-spacing: 0.04em; }
.who { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 1rem; font-size: 0.9rem; }
.who-email { color: var(--muted); overflow-wrap: anywhere; }
main { flex: 1; width: 100%; max-width: 30rem; margin: 0 auto; padding: 2rem 1rem; }
.card {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: 1.5rem;
}
h1 { margin: 0 0 0.5rem; font-size: 1.5rem; line-height: 1.25; text-wrap: balance; }
.lead { margin: 0 0 1.25rem; }
.muted { color: var(--muted); font-size: 0.92rem; }
label { display: block; margin-bottom: 0.35rem; font-weight: 600; font-size: 0.92rem; }
input {
  display: block;
  width: 100%;
  padding: 0.7rem 0.8rem;
  font: inherit;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--rule);
  border-radius: 4px;
}
label.check { display: flex; align-items: flex-start; gap: 0.6rem; margin: 0.75rem 0; font-weight: 400; }
label.check input { width: 1.1rem; height: 1.1rem; margin-top: 0.15rem; flex: none; }
input#code { font-family: ui-monospace, Consolas, monospace; font-size: 1.25rem; letter-spacing: 0.18em; text-transform: uppercase; }
button { font: inherit; cursor: pointer; }
button.primary {
  display: block;
  width: 100%;
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  font-weight: 600;
  color: var(--accent-ink);
  background: var(--accent);
  border: 0;
  border-radius: 4px;
}
button.primary:disabled { opacity: 0.6; cursor: progress; }
button.link { padding: 0.25rem 0; color: var(--accent); background: none; border: 0; text-decoration: underline; }
.msg { min-height: 1.4em; margin: 0.9rem 0 0; font-size: 0.92rem; color: var(--muted); }
.msg.error { color: var(--danger); }
.foot { padding: 1rem; text-align: center; font-size: 0.82rem; color: var(--muted); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
[hidden] { display: none !important; }
@media (prefers-reduced-motion: no-preference) {
  .card { transition: opacity 0.15s ease; }
}
h2 { margin: 0 0 0.4rem; font-size: 1.1rem; }
.gap { margin-top: 1rem; }
.accounts { list-style: none; margin: 0 0 0.5rem; padding: 0; }
.accounts li { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.7rem 0; border-top: 1px solid var(--rule); }
.accounts li:first-child { border-top: 0; }
.acct-main { display: flex; flex-direction: column; min-width: 0; overflow-wrap: anywhere; }
.stepup { margin-top: 1.25rem; padding-top: 1rem; border-top: 1px solid var(--rule); }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); gap: 0.75rem; margin: 1rem 0 0; }
.tile { padding: 0.75rem 0.9rem; background: var(--bg); border: 1px solid var(--rule); border-radius: 4px; }
.tile dt { font-size: 0.78rem; color: var(--muted); margin: 0; }
.tile dd { margin: 0.15rem 0 0; font-size: 1.25rem; font-weight: 650; font-variant-numeric: tabular-nums; }
.row { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: flex-end; }
.row .grow { flex: 1 1 12rem; }
select { font: inherit; color: var(--ink); background: var(--bg); border: 1px solid var(--rule); border-radius: 4px; padding: 0.7rem 0.6rem; }
button.compact { width: auto; margin-top: 0; padding: 0.7rem 1.1rem; }
.episodes { list-style: none; margin: 1rem 0 0.5rem; padding: 0; }
.episodes li { padding: 0.75rem 0; border-top: 1px solid var(--rule); }
.episodes li:first-child { border-top: 0; }
.ep-text { margin: 0 0 0.3rem; overflow-wrap: anywhere; white-space: pre-wrap; }
.ep-meta { display: flex; flex-wrap: wrap; gap: 0.25rem 0.9rem; font-size: 0.82rem; color: var(--muted); }
.ep-id { font-family: ui-monospace, Consolas, monospace; }
.chip { padding: 0 0.5rem; border: 1px solid var(--rule); border-radius: 999px; font-size: 0.78rem; color: var(--ink); }
.pager { display: flex; justify-content: space-between; margin-bottom: 1.25rem; }
h3 { margin: 1.5rem 0 0.4rem; font-size: 1rem; }
button.danger { display: block; width: 100%; margin-top: 1rem; padding: 0.75rem 1rem; font-weight: 600; color: #fff; background: var(--danger); border: 0; border-radius: 4px; }
button.danger:disabled { opacity: 0.45; cursor: not-allowed; }
.mem-main { display: flex; flex-direction: column; min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 30rem) { main { padding-inline: 0.75rem; } }
.acct-actions { display: flex; gap: 1rem; flex-shrink: 0; }
