:root {
  --bg: #0d0b14; --panel: #17141f; --line: #2a2536; --text: #f1eef8; --muted: #a59fb6;
  --violet: #8b6cf6; --violet-2: #b8a6ff; --green: #3ecf8e; --orange: #f5a524; --red: #f0616d;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color-scheme: dark;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font-size: 16px; line-height: 1.5; }
.top { display: flex; align-items: center; justify-content: space-between; padding: 14px 24px; border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; color: var(--muted); text-decoration: none; font-weight: 600; }
.brand img { height: 28px; width: auto; }
main { max-width: 1120px; margin: 0 auto; padding: 28px 24px 64px; }
h1 { font-size: 26px; margin: 0 0 4px; }
h2 { font-size: 18px; margin: 0; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.center { text-align: center; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(420px, 100%), 1fr)); gap: 16px; margin-top: 20px; }
.card, .playground, .notice { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 18px; }
.card header, .playground header { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; margin-bottom: 14px; }
.card header { flex-direction: column; gap: 8px; }
.badges { display: flex; flex-wrap: wrap; gap: 6px; }
.badge { font-size: 12px; padding: 2px 9px; border-radius: 999px; border: 1px solid var(--line); white-space: nowrap; }
.badge.pilot { color: var(--green); border-color: color-mix(in srgb, var(--green) 45%, transparent); }
.badge.billable { color: var(--orange); }
.badge.role { color: var(--violet-2); }
.meter { margin: 10px 0; }
.meter-label { display: flex; justify-content: space-between; font-size: 14px; margin-bottom: 4px; }
.bar { height: 8px; background: var(--line); border-radius: 999px; overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; background: var(--violet); transition: width .3s; }
.bar i.warn { background: var(--orange); }
.bar i.full { background: var(--red); }
button { font: inherit; cursor: pointer; border-radius: 10px; padding: 9px 16px; border: 1px solid var(--line); background: transparent; color: var(--text); }
button.primary { background: var(--violet); border-color: var(--violet); color: #fff; font-weight: 600; }
button.primary:disabled { opacity: .55; cursor: wait; }
button.ghost { padding: 4px 10px; }
.card button { margin-top: 10px; width: 100%; }
.playground { margin-top: 24px; }
textarea, select { font: inherit; width: 100%; background: var(--bg); color: var(--text); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
textarea:focus, select:focus, button:focus-visible { outline: 2px solid var(--violet-2); outline-offset: 2px; }
.row { display: flex; gap: 12px; align-items: flex-end; margin-top: 10px; }
.row label { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.log { margin-top: 16px; display: flex; flex-direction: column; gap: 12px; }
.msg { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; white-space: pre-wrap; }
.msg.q { background: transparent; color: var(--muted); }
.msg.a { background: color-mix(in srgb, var(--violet) 10%, var(--panel)); }
.msg.err { border-color: var(--red); color: var(--red); }
.meta { font-size: 13px; color: var(--muted); margin-top: 6px; }
.notice { margin-top: 20px; }
code { background: var(--bg); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; font-size: 14px; user-select: all; }
#sign-in { display: flex; justify-content: center; margin-top: 40px; }
@media (max-width: 560px) { .top, main { padding-left: 14px; padding-right: 14px; } .row { flex-direction: column; align-items: stretch; } }
