:root {
  --bg: #07090c; --panel: #0e1218; --line: #1d2530; --text: #e6edf3; --muted: #8b98a8;
  --accent: #3ee08f; --accent-ink: #04140b; --agent: #a78bfa; --warn: #f5b942; --fail: #ff6b6b;
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root { --bg: #f7f8fa; --panel: #fff; --line: #e2e6ec; --text: #10151c; --muted: #5b6878; --accent: #0f9d58; --accent-ink: #fff; --agent: #6d28d9; --warn: #b7791f; --fail: #d93025; color-scheme: light; }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.55 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
code, pre { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
code { font-size: .9em; background: var(--panel); border: 1px solid var(--line); border-radius: 5px; padding: .05em .35em; word-break: break-all; }
pre { font-size: .88em; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: .9rem 1rem; overflow-x: auto; }
pre code { background: none; border: 0; padding: 0; word-break: normal; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
main { max-width: 820px; margin: 0 auto; padding: 0 16px 3rem; }
.top { max-width: 820px; margin: 0 auto; padding: 14px 16px; display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: .5rem; color: var(--text); font-weight: 800; font-size: 1.15rem; letter-spacing: -.01em; }
.brand:hover { text-decoration: none; }
.brand b { color: var(--accent); }
.mark { width: 26px; height: 26px; color: var(--accent); }
.top nav { display: flex; gap: 1rem; flex-wrap: wrap; font-size: .92rem; align-items: center; }
.top nav a { color: var(--muted); }
.top nav form { margin: 0; }
.linkish { font: inherit; background: none; border: 0; color: var(--muted); cursor: pointer; padding: 0; }
h1 { letter-spacing: -.02em; line-height: 1.15; }
h2 { font-size: 1.2rem; margin: 2rem 0 .6rem; }
.hero { text-align: center; padding: 3.5rem 0 1.5rem; }
.hero h1 { font-size: clamp(2rem, 7vw, 3.1rem); margin: 0 0 .8rem; }
.lede { color: var(--muted); font-size: 1.12rem; margin: 0 auto 1.6rem; max-width: 36rem; }
button, .button { font: inherit; font-weight: 700; padding: .75rem 1.2rem; border: 0; border-radius: 10px; background: var(--accent); color: var(--accent-ink); cursor: pointer; display: inline-block; text-align: center; }
button:hover, .button:hover { text-decoration: none; filter: brightness(1.08); }
button.secondary { background: transparent; color: var(--accent); border: 1px solid var(--accent); }
button.danger { background: transparent; color: var(--fail); border: 1px solid var(--fail); }
.linkish:hover { filter: none; }
.dial { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 1.25rem; text-align: center; margin: 1rem auto; max-width: 380px; }
.dial .label { margin: 0; color: var(--muted); font-size: .85rem; text-transform: uppercase; letter-spacing: .08em; }
.dial .number { font-size: clamp(1.6rem, 6vw, 2.1rem); font-weight: 800; margin: .1rem 0 .5rem; letter-spacing: .01em; font-variant-numeric: tabular-nums; }
.dial .code { font-size: clamp(2.6rem, 12vw, 3.6rem); font-weight: 800; margin: 0 0 .8rem; letter-spacing: .25em; color: var(--accent); font-variant-numeric: tabular-nums; padding-left: .25em; }
.dial .hint { margin: 0; color: var(--muted); }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); grid-template-rows: auto auto; gap: 1rem; margin-top: 1.5rem; }
@supports (grid-template-rows: subgrid) { .cards article { display: grid; grid-row: span 2; grid-template-rows: subgrid; } }
.cards article { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 1.1rem 1.2rem; }
.cards h2 { margin: 0 0 .4rem; font-size: 1.05rem; }
.cards p { margin: 0; color: var(--muted); }
.steps ol { padding-left: 1.2rem; }
.steps li { margin: .4rem 0; }
.note { background: color-mix(in srgb, var(--accent) 12%, transparent); border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent); padding: .7rem .9rem; border-radius: 10px; }
.note.error { background: color-mix(in srgb, var(--fail) 12%, transparent); border-color: color-mix(in srgb, var(--fail) 45%, transparent); }
label { display: block; font-weight: 600; margin: .9rem 0 .35rem; }
label .muted { font-weight: 400; }
input, select, textarea { width: 100%; font: inherit; padding: .75rem .9rem; background: var(--bg); color: var(--text); border: 1px solid var(--line); border-radius: 10px; outline: none; margin-top: .3rem; }
input:focus { border-color: var(--accent); }
.stack button { margin-top: 1rem; }
.row { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; margin: .6rem 0; }
.row input { flex: 1 1 14rem; margin: 0; }
.rooms { list-style: none; padding: 0; margin: 1rem 0; }
.rooms li { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding: .75rem 1rem; border: 1px solid var(--line); border-radius: 12px; margin: .5rem 0; background: var(--panel); }
.rooms .code { font-weight: 800; letter-spacing: .12em; font-variant-numeric: tabular-nums; }
.rooms .name { color: var(--text); }
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1.2rem; align-items: start; }
@media (max-width: 640px) { .split { grid-template-columns: 1fr; } }
.live { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 1rem 1.2rem; margin: 1rem 0; }
.live h2 { margin: 0 0 .5rem; display: flex; align-items: center; gap: .5rem; }
.live h3 { font-size: .95rem; margin: 1rem 0 .4rem; color: var(--muted); }
.count { font-size: .85rem; background: var(--accent); color: var(--accent-ink); border-radius: 999px; padding: 0 .55rem; }
.people, .log { list-style: none; padding: 0; margin: 0; }
.people li { padding: .3rem 0; display: flex; align-items: center; gap: .5rem; }
.dot { width: .6rem; height: .6rem; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent); }
.people li.agent .dot { background: var(--agent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--agent) 25%, transparent); }
.log li { padding: .15rem 0; font-size: .92rem; }
.agents { display: grid; gap: .6rem; }
.agents form { display: flex; gap: .8rem; align-items: center; flex-wrap: wrap; margin: 0; }
details { margin: 2rem 0; }
summary { cursor: pointer; color: var(--muted); }
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
td { border-top: 1px solid var(--line); padding: .5rem .4rem; vertical-align: top; }
td:first-child { white-space: nowrap; }
@media (max-width: 640px) { td:first-child { white-space: normal; } }
.pass { margin-top: 2rem; }
.transcript .lines { list-style: none; padding: .8rem 1rem; margin: .5rem 0; max-height: 26rem; overflow-y: auto; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; }
.transcript .lines li { padding: .25rem 0; line-height: 1.45; }
.transcript .lines li.agent b { color: var(--agent); }
.transcript .lines li.person b { color: var(--accent); }
