:root {
  color-scheme: dark;
  --ink: #edf2ed;
  --muted: #8f9ca1;
  --bg: #10171d;
  --panel: #182229;
  --panel-2: #202d35;
  --line: rgba(225, 235, 226, .13);
  --orange: #ff9b59;
  --lime: #b7e36c;
  --blue: #9fcbff;
  --danger: #ff7d78;
  --shadow: 0 22px 60px rgba(0, 0, 0, .24);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--ink);
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; background: radial-gradient(circle at 80% -20%, #2b3c3d 0, transparent 36rem), var(--bg); }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 3px solid rgba(183, 227, 108, .58); outline-offset: 2px; }
.topbar { height: 74px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; padding: 0 max(24px, calc((100vw - 1180px) / 2)); position: sticky; top: 0; z-index: 10; background: rgba(16, 23, 29, .88); backdrop-filter: blur(16px); }
.brand { display: flex; align-items: center; gap: 11px; font-weight: 720; letter-spacing: -.02em; cursor: pointer; }
.brand-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 5px rgba(183, 227, 108, .12), 0 0 24px rgba(183, 227, 108, .55); }
.topbar-right { display: flex; align-items: center; gap: 14px; }
.environment-chip, .eyebrow, .panel-kicker, .section-label, .channel-label { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .11em; font-size: 10px; color: var(--muted); }
.environment-chip { border: 1px solid var(--line); padding: 8px 10px; color: var(--lime); }
.page-wrap { max-width: 1180px; margin: 0 auto; padding: 54px 24px 90px; }
.page-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 34px; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(38px, 5vw, 64px); line-height: .98; letter-spacing: -.065em; font-weight: 760; margin-top: 12px; }
h2 { font-size: 28px; line-height: 1.05; letter-spacing: -.045em; }
h3 { font-size: 21px; letter-spacing: -.03em; }
.lead { color: var(--muted); line-height: 1.7; max-width: 590px; }
.compact-lead { margin-top: 10px; }
.heading-actions, .detail-actions { display: flex; gap: 10px; align-items: center; }
.button { min-height: 44px; border: 1px solid transparent; padding: 0 17px; border-radius: 2px; color: var(--ink); font-weight: 680; transition: transform .16s ease, background .16s ease, border-color .16s ease; }
.button:hover:not(:disabled) { transform: translateY(-2px); }
.button:disabled { opacity: .5; cursor: wait; }
.button.primary { background: var(--lime); color: #172019; border-color: var(--lime); }
.button.secondary { background: var(--panel-2); border-color: var(--line); }
.button.ghost { color: var(--muted); background: transparent; border-color: transparent; }
.button.compact { min-height: 36px; padding: 0 11px; font-size: 12px; }
.button.full { width: 100%; }
.stack-lg { display: grid; gap: 26px; }
.signal-band { display: flex; justify-content: space-between; gap: 30px; padding: 34px; background: linear-gradient(105deg, #283a3b, #1a282e 62%); border: 1px solid rgba(183, 227, 108, .2); box-shadow: var(--shadow); position: relative; overflow: hidden; }
.signal-band::after { content: ''; width: 190px; height: 190px; border: 1px solid rgba(255, 155, 89, .35); border-radius: 50%; position: absolute; right: 10%; top: -100px; box-shadow: 0 0 0 18px rgba(255, 155, 89, .04), 0 0 0 38px rgba(255, 155, 89, .035); }
.signal-copy { position: relative; z-index: 1; }
.signal-copy h2 { font-size: 37px; margin: 17px 0 9px; }
.signal-copy p { color: #b4c1bd; }
.signal-live { color: var(--lime); font: 11px ui-monospace, monospace; letter-spacing: .1em; }
.signal-metrics { display: flex; align-items: center; gap: 30px; position: relative; z-index: 1; }
.metric { display: grid; gap: 5px; min-width: 78px; }
.metric strong { font-size: 30px; letter-spacing: -.06em; }
.metric span { color: var(--muted); font-size: 12px; }
.section-header { display: flex; justify-content: space-between; align-items: end; padding: 16px 0 0; border-bottom: 1px solid var(--line); padding-bottom: 17px; }
.section-header h2 { margin-top: 8px; }
.muted { color: var(--muted); }
.dashboard-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; }
.project-card { min-height: 273px; padding: 22px; border: 1px solid var(--line); background: rgba(24, 34, 41, .84); cursor: pointer; display: flex; flex-direction: column; transition: border-color .18s, transform .18s, background .18s; }
.project-card:hover { border-color: rgba(183, 227, 108, .62); background: var(--panel-2); transform: translateY(-3px); }
.project-card.is-disabled { opacity: .56; }
.card-top, .card-bottom, .channel-head, .manifest-meta, .draft-row, .form-footer, .backline { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.project-card h3 { margin-top: 22px; }
.slug { color: var(--muted); font: 12px ui-monospace, monospace; margin-top: 7px; }
.project-icon { display: grid; place-items: center; width: 37px; height: 37px; background: var(--orange); color: #23190f; font-weight: 800; border-radius: 50%; }
.project-icon.big { width: 58px; height: 58px; font-size: 24px; }
.status-pill { display: inline-flex; align-items: center; gap: 5px; width: max-content; padding: 5px 8px; font: 10px ui-monospace, monospace; letter-spacing: .08em; border: 1px solid rgba(143, 156, 161, .32); color: var(--muted); }
.status-pill.active { color: var(--lime); border-color: rgba(183, 227, 108, .35); }
.status-pill.orange { color: var(--orange); border-color: rgba(255, 155, 89, .35); }
.status-pill.blue { color: var(--blue); border-color: rgba(159, 203, 255, .34); }
.status-pill.paused { color: var(--danger); }
.channel-row { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin: 24px 0 0; padding: 15px 0; gap: 15px; }
.channel-mini { display: grid; gap: 6px; }
.channel-mini strong { font-size: 17px; letter-spacing: -.04em; }
.channel-code { font: 11px ui-monospace, monospace; color: var(--muted); }
.card-bottom { margin-top: auto; font-size: 12px; color: var(--muted); padding-top: 19px; }
.arrow { color: var(--lime); font-size: 20px; }
.panel { border: 1px solid var(--line); background: rgba(24, 34, 41, .78); padding: 27px; }
.create-panel { display: grid; grid-template-columns: .8fr 1.2fr; gap: 30px; align-items: start; }
.create-panel h2 { margin: 10px 0 8px; }
.create-panel p { color: var(--muted); line-height: 1.6; font-size: 14px; max-width: 300px; }
.create-form { display: grid; grid-template-columns: 1fr 1fr auto; gap: 14px; align-items: end; }
.field { display: grid; gap: 8px; min-width: 0; }
.field-label { color: #c4cfca; font-size: 12px; font-weight: 680; }
.field-hint { color: var(--muted); font-size: 11px; line-height: 1.4; }
input, textarea, select { width: 100%; min-height: 46px; padding: 0 13px; color: var(--ink); background: #10181d; border: 1px solid var(--line); border-radius: 2px; }
textarea { padding-top: 12px; min-height: 112px; resize: vertical; }
select { appearance: auto; }
.inline-error { color: var(--danger); font-size: 13px; line-height: 1.45; margin-top: 10px; }
.detail-hero { display: flex; align-items: end; justify-content: space-between; gap: 20px; padding-bottom: 26px; border-bottom: 1px solid var(--line); }
.detail-title { display: flex; align-items: center; gap: 17px; }
.detail-title h2 { margin-top: 7px; }
.channel-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.channel-panel { min-height: 206px; padding: 24px; border: 1px solid var(--line); background: var(--panel); }
.channel-panel.stable { border-top: 3px solid var(--orange); }
.channel-panel.beta { border-top: 3px solid var(--blue); }
.channel-name { font: 11px ui-monospace, monospace; letter-spacing: .1em; color: var(--muted); }
.channel-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--orange); }
.channel-dot.beta { background: var(--blue); }
.version-display { display: flex; align-items: baseline; gap: 10px; margin: 33px 0 13px; }
.version-display span:first-child { font: 10px ui-monospace, monospace; color: var(--muted); letter-spacing: .1em; }
.version-display strong { font-size: 39px; letter-spacing: -.08em; }
.version-code { color: var(--lime); font: 12px ui-monospace, monospace; }
.manifest-notes { color: #b6c3be; font-size: 13px; line-height: 1.5; min-height: 38px; }
.manifest-meta { font-size: 11px; color: var(--muted); margin-top: 20px; }
.unpublished { color: var(--muted); font-size: 28px; letter-spacing: -.05em; margin: 50px 0 10px; }
.section-label { display: flex; align-items: center; gap: 13px; color: var(--lime); margin-bottom: 18px; }
.section-label i { height: 1px; background: var(--line); flex: 1; }
.drafts-panel { padding-bottom: 12px; }
.draft-row { padding: 15px 0; border-bottom: 1px solid var(--line); }
.draft-row:last-child { border-bottom: 0; }
.draft-code { color: var(--lime); font: 13px ui-monospace, monospace; min-width: 52px; }
.draft-main { display: grid; gap: 5px; margin-right: auto; min-width: 0; }
.draft-main strong { font-size: 15px; }
.draft-main span { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 350px; }
.history-panel { padding-bottom: 10px; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { text-align: left; color: var(--muted); font: 10px ui-monospace, monospace; letter-spacing: .1em; padding: 0 12px 13px; }
td { border-top: 1px solid var(--line); padding: 15px 12px; vertical-align: middle; }
td:first-child, th:first-child { padding-left: 0; }
td:last-child, th:last-child { padding-right: 0; }
.table-sub { display: block; color: var(--muted); font-size: 11px; margin-top: 5px; max-width: 240px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mono { font: 12px ui-monospace, monospace; color: var(--lime); }
.table-actions { white-space: nowrap; text-align: right; }
.table-actions .button { margin-left: 5px; }
.empty-history { padding: 20px 0 12px; }
.toast { position: fixed; right: 24px; bottom: 24px; z-index: 30; max-width: min(400px, calc(100vw - 48px)); padding: 14px 16px; border-left: 3px solid var(--lime); background: #22322b; box-shadow: var(--shadow); font-size: 13px; }
.toast.error { border-color: var(--danger); background: #382625; }
.empty-state { grid-column: 1 / -1; padding: 56px 20px; text-align: center; border: 1px dashed var(--line); color: var(--muted); }
.empty-glyph { display: block; color: var(--lime); font-size: 42px; margin-bottom: 12px; }
.empty-state h3 { color: var(--ink); margin-bottom: 8px; }
.publish-panel { max-width: 820px; margin: 0 auto; }
.backline { justify-content: flex-start; color: var(--muted); font-size: 12px; margin-bottom: 21px; }
.publish-panel h2 { font-size: 38px; }
.publish-form { margin-top: 32px; }
.draft-banner { display: flex; align-items: center; gap: 15px; padding: 16px; background: #27372f; border: 1px solid rgba(183, 227, 108, .22); margin-bottom: 23px; }
.draft-banner .eyebrow { margin-right: auto; }
.draft-banner strong { font: 14px ui-monospace, monospace; color: var(--lime); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 19px; }
.form-grid .field:nth-child(3), .form-grid .field:nth-child(4) { grid-column: 1 / -1; }
.switch-row { display: flex; align-items: center; gap: 12px; margin-top: 23px; cursor: pointer; }
.switch-row input { position: absolute; opacity: 0; width: 1px; min-height: 1px; }
.switch-ui { width: 39px; height: 23px; border: 1px solid var(--line); background: #10181d; border-radius: 999px; position: relative; transition: .18s; }
.switch-ui::after { content: ''; width: 17px; height: 17px; background: var(--muted); position: absolute; top: 2px; left: 2px; border-radius: 50%; transition: .18s; }
.switch-row input:checked + .switch-ui { background: var(--orange); border-color: var(--orange); }
.switch-row input:checked + .switch-ui::after { left: 18px; background: #2b1e15; }
.switch-row strong, .switch-row small { display: block; }
.switch-row small { color: var(--muted); font-size: 12px; margin-top: 4px; }
.form-footer { justify-content: flex-end; border-top: 1px solid var(--line); margin-top: 30px; padding-top: 20px; }
.login-shell { min-height: 100svh; display: grid; place-items: center; padding: 32px 22px; position: relative; overflow: hidden; }
.login-shell::before { content: ''; position: absolute; inset: 12% 10% auto auto; width: 46vw; height: 46vw; max-width: 620px; max-height: 620px; border: 1px solid rgba(255, 155, 89, .17); border-radius: 50%; box-shadow: 0 0 0 28px rgba(255, 155, 89, .035), 0 0 0 58px rgba(255, 155, 89, .025); pointer-events: none; }
.login-mark, .login-footer { position: absolute; color: var(--muted); font: 10px ui-monospace, monospace; letter-spacing: .13em; }
.login-mark { top: 28px; left: 28px; color: var(--lime); }
.login-footer { bottom: 28px; right: 28px; }
.login-card { width: min(470px, 100%); position: relative; z-index: 1; }
.login-card h1 { font-size: clamp(45px, 8vw, 74px); max-width: 450px; margin: 21px 0 18px; }
.login-card .lead { font-size: 16px; margin-bottom: 30px; }
.login-form { padding: 21px; background: rgba(24, 34, 41, .88); border: 1px solid var(--line); box-shadow: var(--shadow); }
.login-form .field { margin-bottom: 15px; }
.login-note { color: var(--muted); font-size: 11px; margin-top: 15px; }

@media (max-width: 800px) {
  .page-wrap { padding: 38px 17px 70px; }
  .topbar { padding: 0 17px; height: 66px; }
  .environment-chip { display: none; }
  .page-heading { align-items: start; flex-direction: column; gap: 18px; }
  .page-heading h1 { font-size: 48px; }
  .heading-actions { width: 100%; }
  .heading-actions .button { flex: 1; }
  .signal-band { flex-direction: column; padding: 25px 21px; }
  .signal-copy h2 { font-size: 31px; }
  .signal-metrics { gap: 24px; }
  .metric strong { font-size: 25px; }
  .dashboard-grid, .channel-grid { grid-template-columns: 1fr; }
  .create-panel { grid-template-columns: 1fr; gap: 21px; }
  .create-panel p { max-width: 560px; }
  .create-form { grid-template-columns: 1fr; }
  .detail-hero { align-items: start; flex-direction: column; }
  .detail-hero, .detail-title, .detail-actions, .channel-grid, .channel-panel, .history-panel, .stack-lg { min-width: 0; max-width: 100%; }
  .detail-actions { width: 100%; }
  .detail-actions .button { flex: 1; min-width: 0; padding-left: 8px; padding-right: 8px; font-size: 12px; }
  .draft-row { align-items: flex-start; flex-wrap: wrap; }
  .draft-main { width: calc(100% - 70px); }
  .draft-row .status-pill { order: 3; }
  .draft-row .button { order: 4; margin-left: auto; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .field:nth-child(3), .form-grid .field:nth-child(4) { grid-column: auto; }
  .draft-banner { flex-wrap: wrap; }
  .draft-banner .eyebrow { width: 100%; }
  .publish-panel { padding: 21px; }
  .publish-panel h2 { font-size: 31px; }
  .login-footer { right: 17px; bottom: 18px; font-size: 8px; }
}

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition-duration: .01ms !important; } }
