:root { color-scheme: dark; --bg: #08090b; --panel: #14161b; --line: #262931; --line2: #323641; --text: #eceef2; --muted: #9aa0ac; --dim: #6b717d; --accent: #4f7dff; --accent2: #7aa0ff; --green: #3fcf7a; }
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: radial-gradient(ellipse 70% 50% at 50% 0%, rgba(79,125,255,.18), transparent 70%), var(--bg); color: var(--text); font: 16px/1.6 Inter, "Segoe UI", system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
a { color: var(--accent2); }
.top { width: min(1100px, calc(100% - 32px)); margin: 0 auto; height: 68px; display: flex; align-items: center; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 17px; color: var(--text); text-decoration: none; }
.logo i { width: 30px; height: 30px; border-radius: 7.5px; background: var(--accent); color: #fff; display: grid; place-items: center; font-style: normal; font-family: "Segoe UI", system-ui, sans-serif; font-weight: 900; font-size: 17.5px; line-height: 1; flex: none; }
main { width: min(560px, calc(100% - 32px)); margin: 50px auto 80px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: clamp(22px, 5vw, 36px); box-shadow: 0 30px 80px -40px rgba(79,125,255,.5); }
.card + .card { margin-top: 18px; }
h1 { font-size: clamp(26px, 5vw, 34px); letter-spacing: -.03em; line-height: 1.15; margin: 0 0 10px; }
h2 { font-size: 19px; margin: 0 0 6px; }
p { color: var(--muted); margin: 0 0 16px; }
.key { display: flex; gap: 8px; align-items: stretch; margin: 18px 0; }
.key code { flex: 1; min-width: 0; font: 600 clamp(14px, 3.6vw, 18px) Consolas, "JetBrains Mono", monospace; letter-spacing: .5px; background: #0d0f13; border: 1px solid var(--line2); border-radius: 10px; padding: 14px 16px; overflow-wrap: anywhere; color: #fff; user-select: all; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 10px; font: 600 15px inherit; font-family: inherit; border: 1px solid transparent; cursor: pointer; text-decoration: none; }
.btn.primary { background: var(--accent); color: #fff; }
.btn.primary:hover { background: #6390ff; }
.btn.ghost { background: rgba(255,255,255,.04); border-color: var(--line2); color: var(--text); }
.btn:disabled { opacity: .5; cursor: default; }
.steps { margin: 6px 0 0; padding-left: 20px; color: #cfd3da; }
.steps li { margin: 6px 0; }
form { display: flex; gap: 8px; flex-wrap: wrap; }
input { flex: 1; min-width: 200px; font: inherit; color: var(--text); background: #0d0f13; border: 1px solid var(--line2); border-radius: 10px; padding: 10px 13px; }
input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(79,125,255,.2); }
.msg { margin-top: 12px; min-height: 1.5em; color: var(--muted); font-size: 15px; }
.msg.ok { color: var(--green); } .msg.bad { color: #ff8a8a; }
.spinner { width: 22px; height: 22px; border: 3px solid #333743; border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; display: inline-block; vertical-align: middle; margin-right: 10px; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 3s; } }

/* ---- account dashboard ---- */
.top { justify-content: space-between; }
.top-right { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 14px; min-width: 0; }
.top-right span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
main.wide { width: min(720px, calc(100% - 32px)); }
.intro { margin: 0 0 22px; }
.center { text-align: center; color: var(--muted); }
.btn.small { min-height: 34px; padding: 0 12px; font-size: 13.5px; }
.btn.danger { color: #ff9a9a; }
.notice { border-radius: 12px; padding: 12px 16px; margin-bottom: 18px; background: rgba(79,125,255,.12); border: 1px solid rgba(79,125,255,.35); color: #cfdcff; }
.notice.bad { background: rgba(255,90,90,.1); border-color: rgba(255,90,90,.35); color: #ffb3b3; }
.plan-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 8px; }
.plan-head h2 { font-size: 22px; margin: 0; }
.price { display: flex; align-items: baseline; gap: 6px; } .price b { font-size: 30px; letter-spacing: -.03em; } .price span { color: var(--muted); }
.pill { font-size: 13px; font-weight: 600; padding: 4px 11px; border-radius: 99px; border: 1px solid; white-space: nowrap; }
.pill.ok { color: var(--green); border-color: rgba(63,207,122,.4); background: rgba(63,207,122,.1); }
.pill.warn { color: #ffcf8a; border-color: rgba(255,190,90,.4); background: rgba(255,190,90,.1); }
.pill.bad { color: #ff9a9a; border-color: rgba(255,90,90,.4); background: rgba(255,90,90,.1); }
.alert { color: #ffcf8a; background: rgba(255,190,90,.08); border: 1px solid rgba(255,190,90,.25); border-radius: 10px; padding: 10px 14px; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; margin: 14px 0 6px; }
.facts dt { color: var(--muted); } .facts dd { margin: 0; font-weight: 500; }
.plan-card h3 { font-size: 14px; text-transform: uppercase; letter-spacing: .06em; color: var(--dim); margin: 22px 0 6px; }
.plan-card .key { margin: 8px 0; flex-wrap: wrap; }
.machines { list-style: none; padding: 0; margin: 6px 0 0; border-top: 1px solid var(--line); }
.machines li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.machines small { color: var(--dim); }
.muted { color: var(--muted); }
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 22px; }
.fine { font-size: 14px; color: var(--dim); margin: 14px 0 0; }
#sign-in { display: flex; justify-content: center; }
code { font-family: Consolas, monospace; }
@media (max-width: 520px) { .top-right span { display: none; } .facts { grid-template-columns: 1fr; } .facts dd { margin-bottom: 6px; } }
[hidden] { display: none !important; }

/* ---- legal pages ---- */
.legal-nav { display: flex; gap: 18px; font-size: 14.5px; }
.legal-nav a { color: var(--muted); text-decoration: none; }
.legal-nav a:hover, .legal-nav a[aria-current] { color: var(--text); }
main.legal { margin-top: 30px; line-height: 1.7; }
.legal h1 { font-size: clamp(28px, 5vw, 40px); margin-bottom: 4px; }
.legal h2 { font-size: 19px; margin: 34px 0 8px; }
.legal p, .legal li { color: #c9cdd5; }
.legal strong { color: var(--text); }
.legal ul, .legal ol { padding-left: 22px; margin: 0 0 16px; }
.legal li { margin: 6px 0; }
.legal .updated { color: var(--dim); font-size: 14px; margin-bottom: 26px; }
.legal .callout { border: 1px solid rgba(79,125,255,.35); background: rgba(79,125,255,.1); border-radius: 12px; padding: 14px 18px; color: #d7e1ff; margin: 18px 0 8px; }
.legal-table { width: 100%; border-collapse: collapse; font-size: 14.5px; margin: 8px 0 16px; }
.legal-table th, .legal-table td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--line); color: #c9cdd5; }
.legal-table th { color: var(--text); font-weight: 600; background: var(--panel); }
.legal .todo { background: rgba(255,190,90,.18); color: #ffcf8a; border-radius: 4px; padding: 0 4px; }
.legal .draft-note { margin-top: 40px; font-size: 13.5px; color: var(--dim); border-top: 1px solid var(--line); padding-top: 14px; }
.legal-foot { width: min(720px, calc(100% - 32px)); margin: 0 auto 50px; padding-top: 22px; border-top: 1px solid var(--line); display: flex; gap: 18px; flex-wrap: wrap; font-size: 14px; }
.legal-foot a { color: var(--dim); text-decoration: none; } .legal-foot a:hover { color: var(--text); }
@media (max-width: 560px) { .legal-nav { gap: 12px; font-size: 13.5px; } .legal-table, .legal-table tbody, .legal-table tr, .legal-table td { display: block; width: 100%; } .legal-table thead { display: none; } .legal-table td { border: 0; padding: 4px 0; } .legal-table tr { border-bottom: 1px solid var(--line); padding: 10px 0; } .legal-table td:first-child { color: var(--text); font-weight: 600; } }

/* ---- admin + creator pages ---- */
main.admin { width: min(1180px, calc(100% - 32px)); margin: 30px auto 80px; }
.admin-tag { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent2); border: 1px solid rgba(79,125,255,.4); border-radius: 99px; padding: 1px 8px; margin-left: 6px; }
.card.narrow { max-width: 460px; margin: 60px auto; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.card-head h2 { margin: 0; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin: 14px 0 16px; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; display: flex; flex-direction: column; gap: 2px; }
.stat span { color: var(--muted); font-size: 13.5px; } .stat b { font-size: 26px; letter-spacing: -.02em; } .stat small { color: var(--dim); font-size: 12.5px; }
.top-code { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; background: linear-gradient(90deg, rgba(255,200,80,.14), rgba(79,125,255,.08)); border: 1px solid rgba(255,200,80,.3); border-radius: 14px; padding: 12px 16px; margin-bottom: 18px; }
.top-code b { font: 700 20px Consolas, monospace; color: #ffd36b; } .top-code span { color: #d8dbe2; font-size: 14px; }
.table-wrap { overflow-x: auto; margin: 0 -4px; }
table.data { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 640px; }
table.data th, table.data td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.data th { color: var(--muted); font-weight: 600; font-size: 12.5px; white-space: nowrap; }
table.data th[data-sort] { cursor: pointer; user-select: none; } table.data th[data-sort]:hover, table.data th.sorted { color: var(--text); }
table.data th.sorted::after { content: ' ↕'; color: var(--accent2); }
table.data .num { text-align: right; font-variant-numeric: tabular-nums; }
table.data tr.paused td:not(.actions-cell) { opacity: .5; }
table.data code { font-weight: 700; color: #fff; }
.actions-cell { white-space: nowrap; text-align: right; } .actions-cell .btn + .btn { margin-left: 6px; }
.block { display: block; }
.grid-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; align-items: end; }
.grid-form label, .stack label { display: flex; flex-direction: column; gap: 4px; font-size: 13.5px; color: var(--muted); }
.grid-form input, .stack input { min-width: 0; }
.stack { display: flex; flex-direction: column; gap: 12px; } .stack .btn { align-self: flex-start; }
pre.req { white-space: pre-wrap; font: 14px/1.6 Consolas, monospace; background: #0d0f13; border: 1px solid var(--line2); border-radius: 10px; padding: 12px 14px; margin: 8px 0 10px; color: #fff; user-select: all; }
.app { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin-top: 10px; background: rgba(255,255,255,.015); }
.app.pending { border-color: rgba(255,190,90,.35); }
.app-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.app p { margin: 6px 0; overflow-wrap: anywhere; }
.check.ok { color: var(--green); } .check.bad { color: #ff9a9a; }
.app .actions { margin-top: 10px; align-items: center; }
label.inline { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; color: var(--muted); }
.mini-input { width: 70px; min-width: 0; padding: 6px 8px; flex: none; } .mini-input.wide { width: 130px; text-transform: uppercase; }
label.inline input[type=checkbox] { flex: none; min-width: 0; width: auto; }
.kicker { color: var(--accent2); font-weight: 600; font-size: 14px; margin: 0 0 6px; }
.how { list-style: none; padding: 0; margin: 0 0 18px; display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; counter-reset: s; }
.how li { counter-increment: s; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; display: flex; flex-direction: column; gap: 3px; }
.how li::before { content: counter(s); width: 26px; height: 26px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 13px; margin-bottom: 6px; }
.how span { color: var(--muted); font-size: 14px; }
.section-title { margin: 10px 0 14px; text-align: center; }
