:root {
  color-scheme: dark;
  --bg: #0b0f17;
  --surface: #121925;
  --surface-2: #182232;
  --line: #26354b;
  --text: #edf4ff;
  --muted: #91a3bb;
  --accent: #7ce2c1;
  --accent-dark: #092d25;
  --danger: #ff8f8f;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: radial-gradient(circle at top right, #14283a 0, var(--bg) 38rem); color: var(--text); min-height: 100vh; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.4rem clamp(1rem, 4vw, 4rem); border-bottom: 1px solid var(--line); background: rgba(11, 15, 23, .86); backdrop-filter: blur(12px); position: sticky; top: 0; z-index: 5; }
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: clamp(1.55rem, 3vw, 2.2rem); margin-bottom: 0; letter-spacing: -.03em; }
h2 { letter-spacing: -.025em; }
.eyebrow { color: var(--accent); font-size: .72rem; letter-spacing: .16em; font-weight: 800; margin-bottom: .35rem; }
.muted { color: var(--muted); line-height: 1.55; }
main { width: min(1380px, calc(100% - 2rem)); margin: 2rem auto 5rem; }
.session { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; justify-content: flex-end; }
.badge { border: 1px solid var(--line); border-radius: 999px; color: var(--muted); padding: .35rem .65rem; font-size: .78rem; }
.badge.ok { color: var(--accent); border-color: #247963; background: var(--accent-dark); }
.auth-card, .panel, .hero { background: rgba(18, 25, 37, .92); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 18px 50px rgba(0, 0, 0, .2); }
.auth-card { max-width: 460px; margin: 10vh auto; padding: clamp(1.5rem, 4vw, 2.5rem); }
.hero { display: flex; justify-content: space-between; align-items: center; gap: 2rem; padding: 1.7rem; margin-bottom: 1.5rem; }
.hero h2 { font-size: clamp(1.6rem, 4vw, 2.7rem); margin-bottom: .45rem; }
.capabilities { display: flex; gap: .5rem; flex-wrap: wrap; justify-content: flex-end; }
.capability { border-radius: 10px; background: var(--surface-2); color: var(--muted); padding: .55rem .7rem; font-size: .78rem; }
.capability.good { color: var(--accent); }
.grid { display: grid; gap: 1rem; margin: 1rem 0; }
.two-column { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.three-column { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.panel { padding: 1.25rem; min-width: 0; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin: 2rem 0 1rem; }
.section-heading h2 { margin: 0; }
.metric-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(145px, 1fr)); gap: .8rem; }
.metric { padding: 1rem; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.metric strong { display: block; font-size: 1.8rem; color: var(--accent); }
form { display: grid; gap: .8rem; margin: .9rem 0 1.25rem; }
.inline-form { grid-template-columns: minmax(0, 1fr) auto; align-items: end; }
.stack-form { grid-template-columns: 1fr; }
label { display: grid; gap: .35rem; color: var(--muted); font-size: .86rem; }
.checkbox { grid-template-columns: auto 1fr; align-items: start; }
input, select, textarea { width: 100%; border: 1px solid var(--line); border-radius: 10px; background: #0d1420; color: var(--text); padding: .72rem .78rem; font: inherit; }
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
button { border: 0; border-radius: 10px; padding: .72rem .95rem; background: var(--accent); color: #06241d; font-weight: 800; cursor: pointer; }
button:hover { filter: brightness(1.08); }
button.secondary { background: transparent; color: var(--text); border: 1px solid var(--line); }
.record-list { display: grid; gap: .55rem; max-height: 370px; overflow: auto; }
.record { border: 1px solid var(--line); border-radius: 11px; padding: .75rem; background: #0d1420; overflow-wrap: anywhere; }
.record strong { display: block; margin-bottom: .2rem; }
.record small { color: var(--muted); }
.record .success { color: var(--accent); }
.record .failed { color: var(--danger); }
.compact .record { font-size: .8rem; }
.token-once { padding: .8rem; border: 1px solid #8f7432; border-radius: 10px; background: #2a2415; margin-bottom: 1rem; }
.token-once textarea { margin-top: .55rem; }
#notice { position: fixed; right: 1rem; bottom: 1rem; max-width: 440px; padding: .8rem 1rem; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 10px 30px rgba(0, 0, 0, .35); opacity: 0; transform: translateY(12px); transition: .2s; pointer-events: none; }
#notice.visible { opacity: 1; transform: translateY(0); }
#notice.error { border-color: #8f3c4c; color: var(--danger); }
[hidden] { display: none !important; }
@media (max-width: 900px) {
  .two-column, .three-column { grid-template-columns: 1fr; }
  .hero, .topbar { align-items: flex-start; flex-direction: column; }
  .session, .capabilities { justify-content: flex-start; }
}
