:root {
  --bg: #0c1015;
  --surface: #121820;
  --surface-raised: #18212b;
  --surface-hover: #202b36;
  --text: #edf2f5;
  --muted: #98a7b4;
  --faint: #71818e;
  --line: #29343e;
  --accent: #6bc9b1;
  --accent-ink: #09281f;
  --info: #8fb9e8;
  --warning: #e7be75;
  --danger: #f09a96;
  --sidebar: 244px;
  --radius: 6px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.6 "Cascadia Mono", Consolas, monospace; letter-spacing: 0; }
button, input, select, textarea { font: inherit; letter-spacing: 0; }
button, a, input, select { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .55; }
a { color: var(--accent); }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 8px; font-size: 25px; line-height: 1.3; }
h2 { margin-bottom: 8px; font-size: 16px; line-height: 1.4; }
h3 { font-size: 14px; }
p { margin-bottom: 12px; }
code { font-family: inherit; color: #c7d7e2; overflow-wrap: anywhere; }
[hidden] { display: none !important; }
.skip { position: fixed; top: -100px; left: 16px; z-index: 100; padding: 10px; background: var(--accent); color: var(--accent-ink); }
.skip:focus { top: 10px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.site-header { height: 66px; display: flex; align-items: center; gap: 36px; padding: 0 max(24px, calc((100vw - 1240px) / 2)); border-bottom: 1px solid var(--line); background: #0e1319; }
.wordmark { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 700; font-size: 14px; white-space: nowrap; }
.brand-mark { display: inline-grid; place-items: center; width: 38px; height: 30px; background: var(--accent); color: var(--accent-ink); border-radius: 4px; font-size: 13px; }
.public-nav { display: flex; gap: 26px; }
.public-nav a { color: var(--muted); text-decoration: none; font-size: 13px; }
.public-nav a:hover { color: var(--text); }
.authbar { display: flex; align-items: center; gap: 10px; margin-left: auto; min-width: 0; }
.auth-identity { max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 12px; }
.header-section { color: var(--muted); font-size: 12px; padding-left: 26px; border-left: 1px solid var(--line); }
.wrap { max-width: 1240px; margin: 0 auto; padding-left: 28px; padding-right: 28px; }
.hero { min-height: 440px; display: grid; grid-template-columns: 1.6fr 1fr; align-items: center; gap: 70px; padding-top: 58px; padding-bottom: 58px; }
.hero h1 { margin: 18px 0 14px; font-size: 46px; line-height: 1.15; }
.hero-lead { max-width: 650px; color: var(--text); font-size: 20px; line-height: 1.55; }
.subtle { color: var(--muted); }
.hero .subtle { max-width: 650px; }
.environment { display: inline-flex; align-items: center; gap: 8px; color: var(--accent); font-size: 11px; font-weight: 700; text-transform: uppercase; }
.status-dot { width: 6px; height: 6px; background: var(--accent); border-radius: 50%; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 22px; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 9px 16px; border: 1px solid var(--accent); border-radius: 5px; background: var(--accent); color: var(--accent-ink); text-decoration: none; font-weight: 700; line-height: 1.35; }
.button:hover { background: #83d8c2; }
.button.secondary { border-color: #3b4955; background: var(--surface-raised); color: var(--text); }
.button.secondary:hover { background: var(--surface-hover); }
.button.danger { border-color: var(--danger); background: var(--danger); color: #321311; }
.button.small { min-height: 34px; padding: 6px 13px; font-size: 12px; }
.text-button { padding: 0; border: 0; background: transparent; color: var(--accent); }
.icon-button { flex: 0 0 38px; width: 38px; height: 38px; display: inline-grid; place-items: center; padding: 0; border: 1px solid var(--line); border-radius: 5px; background: transparent; color: var(--text); font-size: 19px; }
.service-panel { padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.panel-heading h2, .panel-heading p { margin-bottom: 0; }
.panel-heading p { margin-top: 5px; color: var(--muted); font-size: 12px; }
.status { display: inline-flex; align-items: center; min-height: 24px; padding: 2px 8px; border: 1px solid var(--line); border-radius: 4px; color: var(--muted); font-size: 10px; font-weight: 700; white-space: nowrap; }
.status.ok { border-color: #356759; background: #132a25; color: var(--accent); }
.status.warning { border-color: #6d5934; background: #2b2417; color: var(--warning); }
.status.error { border-color: #75433f; background: #2e1d1c; color: var(--danger); }
.status-list, .detail-list { margin: 0; }
.status-list > div, .detail-list > div { display: flex; justify-content: space-between; gap: 20px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.status-list > div:last-child, .detail-list > div:last-child { border-bottom: 0; }
.status-list dt, .detail-list dt { color: var(--muted); }
.status-list dd, .detail-list dd { margin: 0; text-align: right; overflow-wrap: anywhere; }
.band { padding-top: 44px; padding-bottom: 44px; border-top: 1px solid var(--line); }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.section-heading h2 { margin: 0; font-size: 22px; }
.eyebrow { margin-bottom: 6px; color: var(--faint); font-size: 10px; font-weight: 700; }
.footnote { margin: 14px 0 0; color: var(--faint); font-size: 11px; }
.table-wrap { width: 100%; overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
.panel > .table-wrap, .data-region > .table-wrap { border: 0; border-radius: 0; }
table { width: 100%; border-collapse: collapse; font-size: 12px; }
th, td { padding: 12px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
th { background: #151d25; color: var(--muted); font-size: 10px; font-weight: 700; white-space: nowrap; }
td { color: #d6e0e6; overflow-wrap: anywhere; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: #141c24; }
.empty, .loading { padding: 28px 16px; text-align: center; color: var(--muted); }
.error-state { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px; border: 1px solid #75433f; color: var(--danger); }
.docs { padding-bottom: 80px; }
.endpoint-list { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.endpoint-list code { padding: 10px 12px; border: 1px solid var(--line); background: var(--surface); border-radius: 4px; }
.app-shell { min-height: calc(100vh - 66px); display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; align-self: start; height: calc(100vh - 66px); display: flex; flex-direction: column; padding: 24px 14px; border-right: 1px solid var(--line); background: #0f141a; overflow-y: auto; z-index: 20; }
.sidebar-label { padding: 0 12px 14px; color: var(--faint); font-size: 10px; }
.sidebar nav { display: grid; gap: 3px; }
.nav-item { width: 100%; min-height: 39px; padding: 9px 12px; border: 0; border-left: 2px solid transparent; border-radius: 3px; background: transparent; color: var(--muted); text-align: left; font-size: 12px; }
.nav-item:hover { background: var(--surface-raised); color: var(--text); }
.nav-item.active { border-left-color: var(--accent); background: #192722; color: var(--accent); }
.sidebar-foot { margin-top: auto; padding: 24px 12px 4px; }
.sidebar-foot p { margin: 8px 0 0; color: var(--faint); font-size: 10px; }
.workspace { min-width: 0; }
.workspace-header { min-height: 88px; display: flex; align-items: center; gap: 16px; padding: 18px 30px; border-bottom: 1px solid var(--line); }
.workspace-header h1 { margin: 0; font-size: 20px; }
.workspace-header .eyebrow { margin: 0 0 3px; }
.workspace-header > .icon-button:last-child { margin-left: auto; }
#menuButton { display: none; }
.workspace-content { max-width: 1500px; padding: 26px 30px 60px; }
.view { display: none; }
.view.active { display: block; }
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.metric { min-width: 0; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.metric-label { display: block; margin-bottom: 9px; color: var(--muted); font-size: 11px; }
.metric-value { display: block; color: var(--text); font-size: 20px; line-height: 1.35; overflow-wrap: anywhere; }
.metric-note { display: block; margin-top: 7px; color: var(--faint); font-size: 10px; }
.content-grid { display: grid; gap: 18px; margin-bottom: 18px; }
.content-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.panel { min-width: 0; margin-bottom: 18px; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.content-grid .panel { margin-bottom: 0; }
label { display: block; margin-bottom: 13px; color: var(--muted); font-size: 11px; }
input, select, textarea { width: 100%; min-height: 40px; margin-top: 6px; padding: 9px 11px; border: 1px solid #35424e; border-radius: 4px; background: #0e141b; color: var(--text); }
input:hover, select:hover { border-color: #52616e; }
input:focus, select:focus { border-color: var(--accent); outline: 1px solid var(--accent); }
input:disabled { color: var(--faint); background: #131920; }
label.check { display: flex; align-items: center; gap: 9px; min-height: 40px; margin: 4px 0 12px; color: var(--text); }
label.check input { flex: 0 0 auto; width: 16px; min-height: 16px; margin: 0; accent-color: var(--accent); }
.form-grid { max-width: 920px; }
.form-grid.two-col { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 16px; }
.form-grid .button { justify-self: start; }
.inline-form { display: flex; align-items: end; gap: 12px; }
.inline-form label { flex: 1; max-width: 440px; margin: 0; }
.inline-form .button { flex: 0 0 auto; }
.code { max-height: 360px; margin: 16px 0 0; padding: 14px; border: 1px solid var(--line); border-radius: 4px; background: #090d12; color: #c4d6df; white-space: pre-wrap; overflow: auto; font-size: 11px; }
.balance-list { display: grid; gap: 10px; }
.balance-row { display: flex; justify-content: space-between; gap: 12px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.balance-row span { color: var(--muted); }
.notice { margin: 16px 30px 0; padding: 12px 14px; border: 1px solid #356759; border-radius: 4px; background: #132a25; color: var(--accent); font-size: 12px; }
.panel .notice { margin: 16px 0 0; border-color: var(--line); background: var(--surface-raised); color: var(--muted); }
.notice.error { border-color: #75433f; background: #2e1d1c; color: var(--danger); }
.toast { position: fixed; right: 24px; bottom: 24px; z-index: 100; max-width: min(440px, calc(100vw - 32px)); padding: 14px 18px; border: 1px solid #356759; border-radius: 5px; background: #142820; color: var(--accent); box-shadow: 0 10px 30px #0008; }
.toast.error { border-color: #75433f; background: #2e1d1c; color: var(--danger); }
.modal { width: min(540px, calc(100vw - 32px)); max-height: calc(100vh - 48px); padding: 24px; border: 1px solid #43525f; border-radius: 7px; background: var(--surface); color: var(--text); overflow: auto; }
.modal.wide { width: min(680px, calc(100vw - 32px)); }
.modal::backdrop { background: #05080bcc; }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.modal-head h2 { margin: 0; }
.secret-value { display: block; padding: 14px; border: 1px solid #4c635c; background: #0b1411; color: var(--accent); user-select: all; }
.preview { margin-top: 18px; padding: 16px; border-left: 2px solid var(--info); background: #131e28; }
.gate { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; padding-top: 52px; padding-bottom: 70px; }
.gate-heading { grid-column: 1 / -1; max-width: 700px; margin-bottom: 14px; }
.gate-heading h1 { margin-top: 12px; font-size: 30px; }
.gate-form { margin: 0; }
.gate-status { align-self: start; }
@media (max-width: 1000px) {
  .hero { gap: 34px; }
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .content-grid.two { grid-template-columns: 1fr; }
  .gate { grid-template-columns: minmax(0, 1fr) 280px; }
}
@media (max-width: 760px) {
  .site-header { height: 60px; gap: 14px; padding: 0 16px; }
  .public-nav { display: none; }
  .header-section { padding-left: 12px; font-size: 10px; }
  .auth-identity { display: none; }
  .hero { min-height: 0; grid-template-columns: 1fr; gap: 26px; padding-top: 38px; padding-bottom: 38px; }
  .hero h1 { font-size: 34px; }
  .hero-lead { font-size: 17px; }
  .wrap { padding-left: 18px; padding-right: 18px; }
  .section-heading { align-items: flex-start; flex-direction: column; gap: 4px; }
  .app-shell { min-height: calc(100vh - 60px); display: block; }
  .sidebar { position: fixed; top: 60px; bottom: 0; left: 0; width: min(290px, 85vw); height: auto; transform: translateX(-105%); transition: transform .15s ease; box-shadow: 10px 0 30px #0008; }
  .sidebar.open { transform: translateX(0); padding-top: 72px; }
  #menuButton { display: inline-grid; position: relative; z-index: 21; }
  .workspace-header { min-height: 76px; padding: 14px 18px; }
  .workspace-header h1 { font-size: 17px; }
  .workspace-content { padding: 18px 16px 50px; }
  .notice { margin: 14px 16px 0; }
  .panel { padding: 16px; }
  .gate { grid-template-columns: 1fr; padding-top: 32px; }
  .gate-heading { grid-column: auto; }
  .gate-status { grid-row: auto; }
  .form-grid.two-col { grid-template-columns: 1fr; }
  .inline-form { align-items: stretch; flex-direction: column; }
  .inline-form label { max-width: none; }
  .inline-form .button { align-self: flex-start; }
  .table-wrap table.responsive thead, .data-region table.responsive thead { display: none; }
  .table-wrap table.responsive, .table-wrap table.responsive tbody, .table-wrap table.responsive tr, .table-wrap table.responsive td,
  .data-region table.responsive, .data-region table.responsive tbody, .data-region table.responsive tr, .data-region table.responsive td { display: block; width: 100%; }
  .table-wrap table.responsive tr, .data-region table.responsive tr { padding: 10px 12px; border-bottom: 1px solid var(--line); }
  .table-wrap table.responsive tr:last-child, .data-region table.responsive tr:last-child { border-bottom: 0; }
  .table-wrap table.responsive td, .data-region table.responsive td { display: grid; grid-template-columns: minmax(100px, 38%) minmax(0, 1fr); gap: 10px; padding: 6px 0; border: 0; }
  .table-wrap table.responsive td::before, .data-region table.responsive td::before { content: attr(data-label); color: var(--faint); font-size: 10px; }
  .table-wrap table.responsive td[colspan], .data-region table.responsive td[colspan] { display: block; }
  .table-wrap table.responsive td[colspan]::before, .data-region table.responsive td[colspan]::before { display: none; }
  .toast { right: 16px; bottom: 16px; }
}
@media (max-width: 390px) {
  .wordmark { gap: 7px; font-size: 12px; }
  .brand-mark { width: 34px; }
  .header-section { display: none; }
  .metrics { grid-template-columns: 1fr; }
  .hero .actions .button { width: 100%; }
  .status-list > div, .detail-list > div { gap: 12px; font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .sidebar { transition: none; }
}
