:root {
  --ink: #17191d;
  --muted: #626873;
  --line: #e2e5e9;
  --grid: #eceef1;
  --blue: #245de8;
  --paper: #fbfcfe;
  --silver: #f2f4f7;
  --red: #c5221f;
  font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}
* { box-sizing: border-box; }
body { margin: 0; line-height: 1.5; font-size: 15px; }
[hidden] { display: none !important; }
code, pre { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 0.9em; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

.top { display: flex; align-items: center; gap: 14px; padding: 14px 28px; border-bottom: 1px solid var(--line); background: rgba(251,252,254,.9); position: sticky; top: 0; backdrop-filter: blur(10px); z-index: 5; }
.top img { height: 20px; }
.top .tag { font-size: 13px; font-weight: 600; color: var(--muted); border-left: 1px solid var(--line); padding-left: 14px; }
.top .spacer { flex: 1; }
.quiet { color: var(--muted); font-size: 14px; }

main { max-width: 980px; margin: 0 auto; padding: 36px 28px 96px; }
main.narrow { max-width: 420px; padding-top: 12vh; }
h1 { font-size: 30px; letter-spacing: -0.02em; margin: 0 0 6px; }
h2 { font-size: 16px; margin: 0; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.msg { min-height: 22px; font-size: 14px; color: var(--muted); }
.msg.error { color: var(--red); }

input { font: inherit; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: white; width: 100%; }
input:focus { outline: 2px solid var(--blue); outline-offset: -1px; }
button { font: inherit; cursor: pointer; border: 0; }
button.primary { background: var(--ink); color: white; border-radius: 999px; padding: 10px 18px; font-weight: 600; white-space: nowrap; }
button.primary:disabled { opacity: .5; cursor: default; }
button.secondary { background: var(--silver); border: 1px solid var(--line); border-radius: 8px; padding: 6px 12px; }
button.link { background: none; color: var(--muted); padding: 0; font-size: 14px; }
button.link:hover { color: var(--ink); }
button.danger { background: none; color: var(--red); padding: 0; font-size: 13px; }
#login-form { display: grid; gap: 10px; margin-top: 18px; }
#view-auth button { margin-top: 12px; }

.hero { margin-bottom: 20px; }
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 16px; }
.tile { background: white; border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; }
.tile-label { font-size: 13px; color: var(--muted); }
.tile-value { font-size: 32px; font-weight: 600; letter-spacing: -0.02em; margin-top: 4px; font-variant-numeric: tabular-nums; }
.tile-sub { font-size: 13px; color: var(--muted); }

.card { background: white; border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; margin-bottom: 16px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
form.inline { display: flex; gap: 8px; }
form.inline input { width: 240px; padding: 8px 12px; }
form.inline button { padding: 8px 16px; }

table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; padding: 8px 10px 8px 0; border-bottom: 1px solid var(--line); }
td { padding: 10px 10px 10px 0; border-bottom: 1px solid var(--grid); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
tr.revoked td { color: var(--muted); }
.empty { color: var(--muted); padding: 14px 0; }
.pill { display: inline-block; font-size: 12px; padding: 1px 8px; border-radius: 999px; background: var(--silver); color: var(--muted); }

.reveal { border: 1px solid #f3d9a8; background: #fff8ec; border-radius: 12px; padding: 14px 16px; margin-bottom: 14px; font-size: 14px; display: grid; gap: 10px; }
.secret-row { display: flex; gap: 8px; align-items: center; }
.secret-row code { flex: 1; background: white; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; word-break: break-all; }

.chart { height: 180px; position: relative; }
.chart svg { display: block; width: 100%; height: 100%; overflow: visible; }
.chart .grid { stroke: var(--grid); stroke-width: 1; }
.chart .axis-label { fill: var(--muted); font-size: 11px; }
.chart .bar { fill: var(--blue); }
.chart .hit { fill: transparent; cursor: default; }
.chart .hit:hover + .bar, .chart .bar.hover { fill: #1846bd; }
.table-view { margin-top: 10px; font-size: 13px; color: var(--muted); }
.table-view summary { cursor: pointer; }
.table-view table { margin-top: 8px; }

.tooltip { position: fixed; pointer-events: none; background: var(--ink); color: white; font-size: 12.5px; padding: 6px 9px; border-radius: 8px; z-index: 20; white-space: nowrap; }
.quick pre { background: #0e0f13; color: rgba(255,255,255,.92); padding: 16px 18px; border-radius: 12px; overflow-x: auto; line-height: 1.55; margin: 10px 0 0; }

@media (max-width: 720px) {
  .tiles { grid-template-columns: 1fr; }
  form.inline input { width: 100%; }
  #keys-table th:nth-child(3), #keys-table td:nth-child(3) { display: none; }
}

.switch { margin-top: 22px; font-size: 14px; color: var(--muted); }
#signup-form { display: grid; gap: 10px; margin-top: 18px; }
.tiles { grid-template-columns: repeat(3, 1fr); }
.banner { border-radius: 12px; padding: 12px 16px; margin-bottom: 14px; font-size: 14px; border: 1px solid #f3d9a8; background: #fff8ec; }
.banner.empty { border-color: #f1b7b3; background: #fdecea; }
.checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; }
.checklist li { display: grid; grid-template-columns: 24px 1fr; gap: 12px; align-items: start; }
.checklist b { font-size: 15px; }
.checklist p { margin: 2px 0 8px; font-size: 14px; }
.checklist pre { background: #0e0f13; color: rgba(255,255,255,.92); padding: 12px 14px; border-radius: 10px; overflow-x: auto; font-size: 12.5px; line-height: 1.55; margin: 6px 0; }
.check { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line); margin-top: 1px; display: grid; place-items: center; font-size: 13px; color: white; }
li.done .check { background: #1f9d55; border-color: #1f9d55; }
li.done .check::after { content: '✓'; }
li.done > div > b { color: var(--muted); }
.tryit { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.tryit label { display: flex; gap: 6px; align-items: center; color: var(--muted); }
.tryit input[type=checkbox] { width: auto; }
#try-mic.live { background: #d93025; }
.hint { color: #c26a00; font-size: 14px; min-height: 20px; margin-top: 6px; }
.tryout { border: 1px dashed var(--line); border-radius: 10px; padding: 10px 12px; white-space: pre-wrap; margin-top: 6px; }

#view-review .card { margin-top: 16px; }
#review-actions { display: grid; gap: 8px; margin-top: 8px; }
.review-buttons { display: flex; gap: 10px; margin-top: 6px; }
.review-buttons .secondary { padding: 10px 18px; border-radius: 999px; }
#pending-refresh { margin-top: 12px; }

#view-admin input.minutes { width: 90px; padding: 6px 8px; }
#view-admin td .actions { display: flex; gap: 8px; justify-content: flex-end; align-items: center; }
#view-admin button.primary, #view-admin button.secondary { padding: 6px 14px; font-size: 13px; }
.status-pending { color: #c26a00; } .status-rejected, .status-disabled { color: var(--red); } .status-ok { color: #1f9d55; }
