:root {
  --bg: #FAFAF7; --side: #F4F5F1; --surface: #FFFFFF; --surface2: #F2F3EE; --border: #E3E4DE; --input: #C9CBC3;
  --text: #111316; --muted: #525963; --accent: #0B7A5E; --accent-text: #FFFFFF; --accent-soft: #E2F2EA; --accent-ink: #065842;
  --danger: #B42318; --danger-soft: #FDE7E5; --warn: #8A4B00; --warn-soft: #FFF1DC; --ok: #065842; --ok-soft: #E2F2EA;
  --code-bg: #0F1419; --code-border: #0F1419; --code-text: #D6DEE6; --shadow: 0 24px 60px rgba(17,19,22,.14);
  --header: rgba(250,250,247,.85); --cta-bg: #111316; --cta-text: #FAFAF7; --cta-btn: #3CCB9A; --cta-btn-text: #0A1F18;
  --overlay: rgba(8,10,14,.5);
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --bg: #16181D; --side: #1A1C21; --surface: #1D2026; --surface2: #22262E; --border: #2F343D; --input: #444B57; --text: #E8EAED; --muted: #A3AAB6; --accent: #3CCB9A; --accent-text: #0A1F18; --accent-soft: #1D3830; --accent-ink: #74E2BC; --danger: #FF8A80; --danger-soft: #3D1F1E; --warn: #F5C27A; --warn-soft: #3A2C14; --ok: #74E2BC; --ok-soft: #1D3830; --code-bg: #101216; --code-border: #2A2F38; --shadow: 0 24px 60px rgba(0,0,0,.35); --header: rgba(22,24,29,.82); --cta-bg: #E8EAED; --cta-text: #16181D; --cta-btn: #16181D; --cta-btn-text: #E8EAED; --overlay: rgba(0,0,0,.6); } }
:root[data-theme="dark"] { --bg: #16181D; --side: #1A1C21; --surface: #1D2026; --surface2: #22262E; --border: #2F343D; --input: #444B57; --text: #E8EAED; --muted: #A3AAB6; --accent: #3CCB9A; --accent-text: #0A1F18; --accent-soft: #1D3830; --accent-ink: #74E2BC; --danger: #FF8A80; --danger-soft: #3D1F1E; --warn: #F5C27A; --warn-soft: #3A2C14; --ok: #74E2BC; --ok-soft: #1D3830; --code-bg: #101216; --code-border: #2A2F38; --shadow: 0 24px 60px rgba(0,0,0,.35); --header: rgba(22,24,29,.82); --cta-bg: #E8EAED; --cta-text: #16181D; --cta-btn: #16181D; --cta-btn-text: #E8EAED; --overlay: rgba(0,0,0,.6); }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.6 'Geist', system-ui, -apple-system, 'Segoe UI', sans-serif; transition: background .25s, color .25s; }
a { color: inherit; text-decoration: none; }
a:hover { opacity: .85; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3 { margin: 0; letter-spacing: -.02em; line-height: 1.15; }
p { margin: 0; }
code, pre, .mono { font-family: 'Geist Mono', ui-monospace, SFMono-Regular, Menlo, monospace; }
code { font-size: .9em; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.eyebrow { font-size: 14px; font-weight: 600; color: var(--accent-ink); text-transform: uppercase; letter-spacing: .08em; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font-weight: 500; white-space: nowrap; }
.btn.primary { background: var(--accent); color: var(--accent-text); border-color: transparent; font-weight: 600; }
.btn.big { min-height: 52px; padding: 0 24px; border-radius: 14px; font-size: 16px; }
.btn.ghost { background: transparent; }
.btn.danger { color: var(--danger); border-color: var(--danger); background: transparent; }
.btn.icon { width: 44px; padding: 0; }
.btn:disabled { opacity: .5; cursor: default; }
.link { background: none; border: none; padding: 0; color: var(--accent-ink); font-weight: 600; }

/* header */
.site-header { position: sticky; top: 0; z-index: 20; background: var(--header); backdrop-filter: blur(12px); border-bottom: 1px solid var(--border); }
.site-header .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; padding-top: 14px; padding-bottom: 14px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; }
.brand .mark { width: 32px; height: 32px; border-radius: 9px; background: var(--accent); color: var(--accent-text); display: flex; align-items: center; justify-content: center; }
.brand .sub { color: var(--muted); font-weight: 500; }
.site-nav { display: flex; flex-wrap: wrap; gap: 4px 22px; font-size: 15px; color: var(--muted); flex: 1 1 auto; }
.site-header .actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.theme-toggle .sun, :root[data-theme="dark"] .theme-toggle .moon { display: none; }
:root[data-theme="dark"] .theme-toggle .sun { display: block; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .theme-toggle .moon { display: none; } :root:not([data-theme="light"]) .theme-toggle .sun { display: block; } }

/* landing */
.hero { display: flex; flex-wrap: wrap; gap: 56px; align-items: center; padding: 88px 0 64px; }
.hero > div { flex: 1 1 440px; min-width: 0; }
.hero h1 { font-size: clamp(40px, 5.4vw, 66px); line-height: 1.04; letter-spacing: -.035em; }
.hero .lead { font-size: 19px; color: var(--muted); max-width: 560px; }
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-ink); font-size: 14px; font-weight: 500; }
.pill .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.stack { display: flex; flex-direction: column; gap: 24px; }
.row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.code-card { border-radius: 20px; background: var(--code-bg); border: 1px solid var(--code-border); box-shadow: var(--shadow); overflow: hidden; color: var(--code-text); }
.code-card .bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 20px; border-bottom: 1px solid #2A2F38; font-family: 'Geist Mono', ui-monospace, monospace; font-size: 13px; color: #9AA4B2; }
.code-card .tag { padding: 3px 10px; border-radius: 999px; background: #173B30; color: #7BE3BC; }
.code-card pre { margin: 0; padding: 22px; overflow-x: auto; font-size: 13.5px; line-height: 1.75; }
.k { color: #8FB8FF; } .s { color: #9BE3B8; } .n { color: #F5C27A; } .c { color: #9AA4B2; } .kw { color: #C9A6FF; }
.works { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px 36px; padding: 22px 24px; border-radius: 18px; border: 1px solid var(--border); background: var(--surface); font-size: 15px; color: var(--muted); margin-bottom: 72px; }
.works b { color: var(--text); font-weight: 600; }
.flow { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 96px; }
.flow > div { flex: 1 1 180px; padding: 20px; border-radius: 16px; background: var(--surface2); }
.flow > div.on { background: var(--accent-soft); color: var(--accent-ink); }
.flow .step { font-size: 13px; font-family: 'Geist Mono', ui-monospace, monospace; color: var(--muted); }
.flow .on .step { color: inherit; }
.flow b { display: block; margin-top: 6px; }
.flow span { font-size: 14px; color: var(--muted); }
.flow .on span { color: inherit; }
.section { padding: 0 0 104px; }
.section-head { max-width: 680px; display: flex; flex-direction: column; gap: 14px; margin-bottom: 44px; }
.section-head h2 { font-size: clamp(30px, 3.6vw, 44px); line-height: 1.1; letter-spacing: -.03em; }
.section-head p { font-size: 18px; color: var(--muted); }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 16px; }
.card { padding: 26px; border-radius: 18px; background: var(--surface); border: 1px solid var(--border); display: flex; flex-direction: column; gap: 12px; }
.card .ic { width: 44px; height: 44px; border-radius: 12px; background: var(--accent-soft); color: var(--accent-ink); display: flex; align-items: center; justify-content: center; }
.card h3 { font-size: 19px; }
.card p { color: var(--muted); font-size: 15px; }
.card .use { margin-top: auto; padding-top: 12px; border-top: 1px dashed var(--border); font-size: 14px; color: var(--text); }
.card .use span { color: var(--muted); }
.band { background: var(--surface2); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: 88px 0; margin-bottom: 104px; }
.split { display: flex; flex-wrap: wrap; gap: 48px; align-items: flex-start; }
.split > div { flex: 1 1 360px; min-width: 0; }
.split > .wide { flex: 1.4 1 480px; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip { display: inline-flex; flex-direction: column; gap: 2px; padding: 12px 16px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); }
.chip code { font-size: 14px; font-weight: 500; color: var(--accent-ink); }
.chip span { font-size: 12.5px; color: var(--muted); }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 16px; }
.steps li { padding: 28px; border-radius: 18px; border: 1px solid var(--border); background: var(--surface); display: flex; flex-direction: column; gap: 12px; }
.steps .n { font-family: 'Geist Mono', ui-monospace, monospace; font-size: 14px; color: var(--accent-ink); }
.steps h3 { font-size: 20px; }
.steps p { color: var(--muted); font-size: 15px; }
.steps code { margin-top: auto; padding: 8px 12px; border-radius: 10px; background: var(--surface2); font-size: 13px; }
.checks { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 12px; }
.checks li { display: flex; gap: 12px; align-items: flex-start; }
.checks svg { flex: none; margin-top: 3px; color: var(--accent); }
.callout { padding: 40px; border-radius: 24px; background: var(--accent-soft); color: var(--accent-ink); display: flex; flex-wrap: wrap; gap: 24px 48px; align-items: center; }
.callout > div { flex: 1 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.callout h2 { font-size: clamp(26px, 3vw, 34px); }
.callout .badge { align-self: flex-start; padding: 4px 12px; border-radius: 999px; background: var(--surface); color: var(--text); font-size: 13px; font-weight: 500; }
.callout code { padding: 14px 18px; border-radius: 14px; background: var(--code-bg); color: var(--code-text); font-size: 14px; overflow-x: auto; max-width: 100%; }
.faq { max-width: 860px; margin: 0 auto; display: flex; flex-direction: column; gap: 10px; }
.faq details { border-radius: 16px; border: 1px solid var(--border); background: var(--surface); }
.faq summary { list-style: none; cursor: pointer; min-height: 60px; padding: 16px 22px; display: flex; align-items: center; justify-content: space-between; gap: 16px; font-size: 17px; font-weight: 600; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ''; width: 10px; height: 10px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); transition: transform .2s; flex: none; margin-right: 4px; }
.faq details[open] summary::after { transform: rotate(-135deg); }
.faq details p { padding: 0 22px 20px; color: var(--muted); }
.cta { padding: 64px 32px; border-radius: 28px; background: var(--cta-bg); color: var(--cta-text); display: flex; flex-direction: column; align-items: center; gap: 18px; text-align: center; margin-bottom: 96px; }
.cta h2 { font-size: clamp(30px, 4vw, 48px); max-width: 720px; }
.cta p { font-size: 18px; opacity: .8; max-width: 560px; }
.cta .btn.primary { background: var(--cta-btn); color: var(--cta-btn-text); }
.cta .btn.ghost { color: var(--cta-text); border-color: currentColor; }
.site-footer { border-top: 1px solid var(--border); }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; padding: 32px 24px; font-size: 14px; color: var(--muted); }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 24px; }

/* forms */
.field { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 600; }
.field input, .field select, .field textarea { width: 100%; min-height: 48px; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--input); background: var(--bg); color: var(--text); font-size: 15px; font-weight: 400; }
.field textarea { resize: vertical; font-family: 'Geist Mono', ui-monospace, monospace; font-size: 13px; }
.field .hint { font-size: 13px; font-weight: 400; color: var(--muted); }
.field.mono input { font-family: 'Geist Mono', ui-monospace, monospace; }
.check { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; }
.check input { width: 18px; height: 18px; margin: 3px 0 0; accent-color: var(--accent); flex: none; }
.check span span { display: block; font-size: 13px; color: var(--muted); }
.seg { display: flex; flex-wrap: wrap; gap: 4px; padding: 4px; border-radius: 12px; background: var(--surface2); }
.seg label { flex: 1 1 auto; position: relative; }
.seg input { position: absolute; opacity: 0; inset: 0; }
.seg span { display: flex; align-items: center; justify-content: center; height: 40px; padding: 0 14px; border-radius: 9px; font-size: 14px; font-weight: 500; color: var(--muted); cursor: pointer; }
.seg input:checked + span { background: var(--surface); color: var(--text); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.seg input:focus-visible + span { outline: 2px solid var(--accent); }
.alert { padding: 14px 18px; border-radius: 14px; font-size: 15px; display: flex; gap: 12px; align-items: flex-start; }
.alert.error { background: var(--danger-soft); color: var(--danger); }
.alert.ok { background: var(--ok-soft); color: var(--ok); }
.alert.warn { background: var(--warn-soft); color: var(--warn); }
.alert ul { margin: 0; padding-left: 18px; }
.panel { border-radius: 18px; border: 1px solid var(--border); background: var(--surface); padding: 24px; display: flex; flex-direction: column; gap: 18px; }
.panel h2 { font-size: 18px; }
.auth { max-width: 440px; margin: 56px auto; }
.auth .panel { padding: 28px; }
.auth h1 { font-size: 26px; }
.mode-block[hidden] { display: none; }

/* app */
.app { min-height: 100vh; display: flex; flex-wrap: wrap; }
.sidebar { flex: 1 1 248px; min-width: 0; background: var(--side); border-right: 1px solid var(--border); padding: 22px 14px; display: flex; flex-direction: column; gap: 22px; }
.sidebar nav { display: flex; flex-direction: column; gap: 4px; }
.sidebar .label { padding: 0 12px 6px; font-size: 12px; font-weight: 600; letter-spacing: .1em; color: var(--muted); }
.sidebar nav a { min-height: 44px; padding: 0 12px; border-radius: 10px; display: flex; align-items: center; gap: 12px; }
.sidebar nav a[aria-current] { background: var(--accent-soft); color: var(--accent-ink); font-weight: 600; }
.sidebar .me { margin-top: auto; padding: 12px 10px 0; border-top: 1px solid var(--border); display: flex; align-items: center; gap: 12px; }
.avatar { width: 38px; height: 38px; flex: none; border-radius: 50%; background: var(--accent-soft); color: var(--accent-ink); font-weight: 600; display: flex; align-items: center; justify-content: center; }
.main { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; }
.topbar { min-height: 68px; padding: 12px clamp(16px, 4vw, 48px); border-bottom: 1px solid var(--border); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: 15px; color: var(--muted); }
.crumbs b { color: var(--text); font-weight: 600; }
.content { padding: 36px clamp(16px, 4vw, 48px) 64px; display: flex; flex-direction: column; gap: 24px; max-width: 1320px; width: 100%; margin: 0 auto; }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 20px; }
.page-head h1 { font-size: clamp(28px, 3vw, 36px); }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1px; border-radius: 18px; overflow: hidden; border: 1px solid var(--border); background: var(--border); }
.stats > div { padding: 20px 24px; background: var(--surface); display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--muted); }
.stats b { font-size: 28px; font-weight: 600; color: var(--text); letter-spacing: -.02em; }
.table-wrap { border-radius: 18px; border: 1px solid var(--border); background: var(--surface); overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 720px; }
th { text-align: left; padding: 14px 22px; background: var(--surface2); font-size: 13px; font-weight: 600; color: var(--muted); }
td { padding: 16px 22px; border-top: 1px solid var(--border); vertical-align: middle; }
td .name { font-weight: 600; font-size: 16px; }
td .sub { font-size: 12.5px; color: var(--muted); font-family: 'Geist Mono', ui-monospace, monospace; }
.status { display: inline-flex; align-items: center; gap: 7px; padding: 4px 11px; border-radius: 999px; font-size: 13px; font-weight: 600; white-space: nowrap; }
.status::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.status.ok { background: var(--ok-soft); color: var(--ok); }
.status.warn { background: var(--warn-soft); color: var(--warn); }
.status.off { background: var(--surface2); color: var(--muted); }
.status.bad { background: var(--danger-soft); color: var(--danger); }
.two { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.two > .a { flex: 1.25 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.two > .b { flex: 1 1 380px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.page-head h1 { overflow-wrap: anywhere; }
.code-box textarea { max-width: 100%; }
@media (max-width: 560px) { .content { padding-top: 24px; } .panel { padding: 18px; } .page-head .row .btn { flex: 1 1 auto; } .stats b { font-size: 22px; } }
.code-box { border-radius: 14px; background: var(--code-bg); color: var(--code-text); border: 1px solid var(--code-border); overflow: hidden; }
.code-box textarea { display: block; width: 100%; height: 300px; margin: 0; padding: 16px 18px; border: none; background: transparent; color: inherit; font-family: 'Geist Mono', ui-monospace, monospace; font-size: 12.5px; line-height: 1.6; resize: vertical; white-space: pre; overflow: auto; }
.code-box textarea:focus { outline: none; }
.install { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 14px; }
.install li { display: flex; gap: 14px; align-items: flex-start; }
.install .num { flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--surface2); font-size: 13px; font-weight: 600; display: flex; align-items: center; justify-content: center; }
.install > li > div { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.kbd { padding: 6px 10px; border-radius: 8px; background: var(--surface2); font-family: 'Geist Mono', ui-monospace, monospace; font-size: 13px; }
.builds { margin: 0 -8px; padding: 0 8px; list-style: none; max-height: 300px; overflow-y: auto; }
.builds li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--border); font-size: 14px; }
.builds li:first-child { border-top: none; }
.builds b { font-family: 'Geist Mono', ui-monospace, monospace; font-weight: 500; min-width: 34px; }
.builds .info { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.4; color: var(--muted); font-size: 13px; }
.builds .info .mono { color: var(--text); font-size: 13px; }
.builds .nop { color: var(--warn); font-weight: 600; }
.lock { min-height: 48px; padding: 0 14px; border-radius: 12px; background: var(--surface2); display: flex; align-items: center; gap: 10px; font-family: 'Geist Mono', ui-monospace, monospace; font-size: 14px; }
.dialog { position: fixed; inset: 0; z-index: 50; background: var(--overlay); display: none; align-items: center; justify-content: center; padding: 16px; overflow-y: auto; }
.dialog.open { display: flex; }
.dialog .panel { width: 100%; max-width: 460px; box-shadow: 0 30px 80px rgba(0,0,0,.35); }
.copied { color: var(--accent-ink); }
@media (max-width: 720px) { .sidebar { flex-basis: 100%; border-right: none; border-bottom: 1px solid var(--border); } .sidebar .me { margin-top: 0; } }

/* highlighted UI labels in the install steps */
mark { background: var(--accent-soft); color: var(--accent-ink); font-weight: 600; padding: 1px 7px; border-radius: 6px; }
.kv { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; font-size: 14px; }
.kv > span { color: var(--muted); min-width: 78px; }
/* admin user actions */
.admin-change { display: flex; align-items: center; gap: 6px; flex-wrap: nowrap; }
.admin-change select, .admin-change input { min-height: 38px; border-radius: 10px; border: 1px solid var(--input); background: var(--bg); color: var(--text); padding: 0 8px; font-size: 14px; }
.admin-change .slots { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.admin-change .slots input { width: 64px; }
.admin-change .btn { min-height: 38px; padding: 0 14px; font-size: 14px; }
@media (max-width: 720px) {
  .admin-change { flex-wrap: wrap; }
  .page-head { align-items: flex-start; }
  .page-head h1 { font-size: 26px; }
  td, th { padding: 12px 14px; }
  .two { gap: 16px; }
  .topbar { min-height: 56px; }
}
/* desktop: the sidebar stays in view, so the account block is always at the bottom of the screen */
@media (min-width: 721px) {
  .app { flex-wrap: nowrap; align-items: flex-start; }
  .sidebar { flex: 0 0 260px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
}
