:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f3f5f8;
  color: #1b2433;
  --ink: #1b2433;
  --muted: #667085;
  --brand: #245fca;
  --brand-dark: #1e3154;
  --line: #dce2ea;
  --surface: #ffffff;
  --danger: #a32222;
  --success: #197343;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; }
.site-header { min-height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .8rem clamp(1rem, 4vw, 3rem); background: var(--brand-dark); color: white; }
.brand { color: white; text-decoration: none; font-size: 1.15rem; font-weight: 800; letter-spacing: -.02em; }
.brand span { color: #95bbff; }
nav { display: flex; flex-wrap: wrap; gap: .3rem; }
nav a { color: #eaf1ff; text-decoration: none; padding: .55rem .7rem; border-radius: .6rem; }
nav a:hover, nav a:focus-visible { background: #ffffff18; }
.page-shell { width: min(1180px, calc(100% - 2rem)); margin: 1.5rem auto; padding: clamp(1.1rem, 3vw, 2rem); background: var(--surface); border: 1px solid #e7eaf0; border-radius: 1.2rem; box-shadow: 0 18px 55px #18223810; flex: 1; }
.page-shell.narrow { max-width: 520px; }
h1 { margin: 0 0 1rem; font-size: clamp(1.7rem, 4vw, 2.6rem); line-height: 1.1; }
h2 { margin-top: 2rem; font-size: 1.25rem; }
a { color: var(--brand); }
.muted { color: var(--muted); }
.error { color: var(--danger); min-height: 1.5rem; }
.success { color: var(--success); }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 1rem; }
.card { padding: 1.1rem; border: 1px solid var(--line); border-radius: 1rem; background: #fbfcfe; }
.card h2, .card h3 { margin-top: 0; }
.stack { display: grid; gap: .9rem; }
label { display: grid; gap: .4rem; margin: .8rem 0; font-weight: 650; }
input, select, textarea { width: 100%; font: inherit; padding: .75rem .8rem; border: 1px solid #bdc6d3; border-radius: .7rem; background: white; color: var(--ink); }
input:focus, select:focus, textarea:focus { outline: 3px solid #7eaaff55; border-color: var(--brand); }
button, .button { display: inline-flex; justify-content: center; align-items: center; gap: .4rem; width: auto; min-height: 44px; font: inherit; font-weight: 750; padding: .7rem 1rem; border: 0; border-radius: .7rem; background: var(--brand); color: white; text-decoration: none; cursor: pointer; }
button:hover, .button:hover { filter: brightness(.94); }
button.secondary, .button.secondary { background: #e9eef6; color: var(--ink); }
button.danger { background: #a52b2b; }
.toolbar { display: flex; flex-wrap: wrap; gap: .65rem; align-items: center; }
.list-clean { list-style: none; padding: 0; display: grid; gap: .7rem; }
.list-clean li { padding: .85rem; border: 1px solid var(--line); border-radius: .8rem; }
.badge { display: inline-block; padding: .18rem .48rem; border-radius: 999px; background: #e8effc; color: #244e91; font-size: .82rem; }
.live-hint { border-left: 5px solid var(--brand); }
.live-status { margin: 1rem 0; border-left: 5px solid #7c8da8; }
.live-status .toolbar { min-height: 2rem; }
.status-dot { width: .72rem; height: .72rem; border-radius: 50%; background: #7c8da8; box-shadow: 0 0 0 .28rem #7c8da822; }
.live-status[data-state="connected"], .live-status[data-state="listening"] { border-left-color: var(--success); }
.live-status[data-state="connected"] .status-dot, .live-status[data-state="listening"] .status-dot { background: var(--success); box-shadow: 0 0 0 .28rem #19734322; }
.live-status[data-state="paused"] { border-left-color: #a26800; }
.live-status[data-state="paused"] .status-dot { background: #a26800; box-shadow: 0 0 0 .28rem #a2680022; }
.live-status[data-state="degraded"], .live-status[data-state="reconnecting"] { border-left-color: #b34b24; }
.live-status[data-state="degraded"] .status-dot, .live-status[data-state="reconnecting"] .status-dot { background: #b34b24; box-shadow: 0 0 0 .28rem #b34b2422; }
.live-status[data-state="ended"] { opacity: .78; }
.rating-row { display: flex; flex-wrap: wrap; gap: .7rem; align-items: end; }
.rating-row label { flex: 1 1 130px; }
footer { padding: .8rem 1rem 1.4rem; text-align: center; color: var(--muted); font-size: .85rem; }
@media (max-width: 680px) {
  .site-header { align-items: flex-start; flex-direction: column; }
  nav { width: 100%; }
  nav a { flex: 1; text-align: center; }
  .page-shell { width: min(100% - 1rem, 1180px); margin: .6rem auto; border-radius: .9rem; }
  .toolbar > button, .toolbar > .button { flex: 1 1 140px; }
}
