:root {
  color-scheme: light;
  font-family: "Segoe UI", "Microsoft YaHei UI", sans-serif;
  color: #18202b;
  background: #f5f7f9;
  --line: #d9e0e6;
  --muted: #657381;
  --accent: #147b73;
  --red: #a52e3b;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 340px; }
button, input, select { font: inherit; }
.topbar { height: 58px; display: flex; align-items: center; justify-content: space-between; padding: 0 28px; border-bottom: 1px solid var(--line); background: #fff; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; font-size: 14px; font-weight: 650; }
.brand-mark { display: grid; place-items: center; width: 29px; height: 29px; border-radius: 7px; background: #177d74; color: white; font-size: 11px; font-weight: 750; }
.topbar-actions, .section-heading, .section-actions, .heading-row, .form-footer, .footer { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.topbar-actions { justify-content: flex-end; }
.text-link, .footer a { color: #176b64; font-size: 12px; text-decoration: none; }
.text-link:hover, .footer a:hover { text-decoration: underline; }
.health { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: 11px; }
.page { width: min(1160px, calc(100% - 48px)); margin: 30px auto 44px; }
.heading-row { margin-bottom: 23px; }
.eyebrow { color: #607d7a; font-size: 11px; font-weight: 650; }
h1 { margin: 5px 0 0; font-size: 24px; font-weight: 650; }
h2 { margin: 0; font-size: 15px; font-weight: 650; }
.updated, .scope, .muted { color: var(--muted); font-size: 11px; }
.section { margin-bottom: 30px; border-top: 1px solid var(--line); padding-top: 15px; }
.section-heading { margin-bottom: 14px; min-height: 28px; }
.section-actions { justify-content: flex-end; }
.metrics-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 6px; overflow: hidden; background: #fff; }
.metric { min-height: 87px; padding: 11px 14px 10px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.metric:nth-child(4n) { border-right: 0; }
.metric:nth-last-child(-n + 4) { border-bottom: 0; }
.metric-label, .metric-note { display: block; color: var(--muted); font-size: 10px; }
.metric strong { display: block; margin: 5px 0 2px; font-size: 20px; font-weight: 650; font-variant-numeric: tabular-nums; }
.limit-strip { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 20px; margin-top: 10px; color: #455360; font-size: 11px; }
.limit-strip span { display: inline-flex; gap: 7px; }
.limit-strip b { font-weight: 600; }
.button { min-height: 34px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 0 13px; border: 1px solid transparent; border-radius: 5px; font-size: 12px; font-weight: 600; cursor: pointer; }
.button:disabled { cursor: not-allowed; opacity: .5; }
.button-primary { background: #147b73; color: white; }
.button-primary:hover:not(:disabled) { background: #0e665f; }
.button-secondary { border-color: #bac6cd; background: #fff; color: #293642; }
.button-secondary:hover:not(:disabled) { background: #f0f4f5; }
.table-scroll { width: 100%; overflow: auto; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
table { width: 100%; border-collapse: collapse; text-align: left; font-size: 11px; }
th, td { height: 38px; padding: 8px 10px; border-bottom: 1px solid #e7ecef; white-space: nowrap; }
th { position: sticky; top: 0; background: #f7f9fa; color: #556370; font-size: 10px; font-weight: 650; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: #f7faf9; }
td.expression { max-width: 300px; overflow: hidden; text-overflow: ellipsis; color: #53616b; font-family: Consolas, monospace; }
td.right, th.right { text-align: right; font-variant-numeric: tabular-nums; }
.empty { height: 61px; color: var(--muted); text-align: center; }
.section-footnote { margin: 8px 0 0; color: var(--muted); font-size: 10px; }
.callout { padding: 10px 12px; margin-bottom: 10px; border: 1px solid; border-radius: 5px; font-size: 11px; }
.callout-warning { border-color: #e6c78a; background: #fff9ec; color: #73550e; }
#topup-form { padding: 0; }
.form-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 14px; }
label { display: grid; align-content: start; gap: 6px; color: #46535f; font-size: 11px; font-weight: 600; }
input, select { width: 100%; min-height: 36px; padding: 7px 9px; border: 1px solid #c8d1d8; border-radius: 4px; background: #fff; color: #1b2630; font-size: 12px; font-variant-numeric: tabular-nums; }
input:focus, select:focus, button:focus-visible, a:focus-visible { outline: 2px solid #30a79b; outline-offset: 2px; }
input[aria-invalid="true"] { border-color: #bd4050; }
.field-wide { grid-column: 1 / -1; }
.preview-strip { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin-top: 16px; padding: 12px; border: 1px solid var(--line); border-radius: 5px; background: #fff; }
.preview-strip > div { min-width: 0; display: grid; gap: 5px; }
.preview-strip span { color: var(--muted); font-size: 10px; }
.preview-strip strong { overflow-wrap: anywhere; font-size: 14px; font-variant-numeric: tabular-nums; font-weight: 650; }
.form-footer { margin-top: 13px; }
.form-message { min-height: 16px; margin: 0; color: var(--muted); font-size: 11px; }
.form-message[data-state="error"] { color: var(--red); }
.form-message[data-state="success"] { color: #117057; }
.status { display: inline-flex; padding: 3px 7px; border-radius: 10px; background: #edf2f4; color: #55636c; font-size: 10px; }
.status[data-state="applied"] { background: #e4f4ed; color: #146245; }
.status[data-state="review"] { background: #fff2da; color: #805911; }
.status[data-state="rejected"] { background: #fbe9eb; color: #9d3340; }
.footer { margin-top: 38px; padding-top: 13px; border-top: 1px solid var(--line); color: var(--muted); font-size: 10px; }

@media (max-width: 760px) {
  .topbar { padding: 0 15px; }
  .page { width: calc(100% - 30px); margin-top: 23px; }
  .metrics-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metric:nth-child(2n) { border-right: 0; }
  .metric:nth-child(4n) { border-right: 0; }
  .metric:nth-last-child(-n + 4) { border-bottom: 1px solid var(--line); }
  .metric:nth-last-child(-n + 2) { border-bottom: 0; }
  .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .preview-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .section-heading { align-items: flex-start; }
  .section-actions { flex-wrap: wrap; }
}
@media (max-width: 460px) {
  .topbar { height: 52px; }
  .brand { font-size: 12px; }
  .text-link { font-size: 10px; }
  .form-grid { grid-template-columns: 1fr; }
  .field-wide { grid-column: auto; }
  .section-heading { flex-direction: column; align-items: flex-start; }
  .section-actions { justify-content: flex-start; }
  .form-footer { align-items: flex-start; flex-direction: column; }
  .button-primary { width: 100%; }
  .updated { max-width: 132px; text-align: right; }
  .footer { align-items: flex-start; flex-direction: column; }
}

:root {
  color-scheme: dark;
  color: #f2ebe4;
  background: #181716;
  --surface: #23211f;
  --field: #1c1b19;
  --line: #413b36;
  --muted: #b9afa4;
  --accent: #f2a17d;
  --red: #ff9da8;
}
body { min-width: 0; }
.topbar {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 0 24px;
  background: #1e1c1b;
}
.brand-mark { background: var(--accent); color: #251a15; font-size: 19px; }
.text-link, .footer a { color: var(--accent); }
.rail {
  position: fixed;
  inset: 58px auto 0 0;
  display: flex;
  flex-direction: column;
  width: 176px;
  gap: 4px;
  padding: 26px 14px;
  border-right: 1px solid var(--line);
  background: #1e1c1b;
}
.rail > span { padding: 0 10px 7px; font-size: 12px; color: var(--muted); }
.rail a { color: inherit; text-decoration: none; padding: 9px 10px; border-radius: 7px; font-size: 14px; }
.rail a:hover, .rail a[aria-current] { background: #37302b; color: #ffba9b; }
.rail + .page { width: auto; max-width: 1400px; margin: 35px 30px 44px 206px; }
h1 { font-size: clamp(26px, 3vw, 34px); letter-spacing: -.025em; }
h2 { font-size: 17px; }
.heading-note { margin: 8px 0 0; color: var(--muted); font-size: 14px; }
.section { min-width: 0; background: var(--surface); padding: 19px; border: 1px solid var(--line); border-radius: 14px; margin-bottom: 20px; }
.section h2 { scroll-margin-top: 76px; }
.metrics-grid, .table-scroll, .preview-strip { background: var(--field); border-radius: 9px; }
.metric { min-height: 94px; padding: 14px 15px; }
.metric strong { font: 650 clamp(20px, 2.3vw, 28px)/1.15 ui-monospace, Consolas, monospace; }
.metric-label, .metric-note, .scope, .updated, .limit-strip { font-size: 12px; }
.limit-strip { margin-top: 15px; color: var(--muted); }
.button { min-height: 38px; border-radius: 7px; }
.button-primary, .button-primary:hover:not(:disabled) { color: #261811; background: var(--accent); }
.button-primary:hover:not(:disabled) { background: #ffc3a8; }
.button-secondary { color: #f2ebe4; background: var(--field); border-color: #66564d; }
.button-secondary:hover:not(:disabled) { background: #3a302a; }
th, td { border-bottom-color: var(--line); font-size: 12px; }
th { background: #2b2724; color: #d6ccc3; }
tbody tr:hover td { background: #292521; }
.section-footnote { font-size: 12px; }
label { color: #ddd3c9; font-size: 12px; }
input, select { color: #f2ebe4; background: var(--field); border-color: #61554b; border-radius: 7px; }
input::placeholder { color: #b9afa4; }
:is(a, button, input, select):focus-visible { outline: 2px solid #ffb999; outline-offset: 3px; }
.callout-warning { background: #3b3020; color: #fbd6a2; border-color: #6c5438; }
.status, .status[data-state] { background: #322d28; color: #e1d6c8; }
.status[data-state="applied"], .form-message[data-state="success"] { color: #9fdfa8; }
.status[data-state="review"] { color: #fbd6a2; }
.status[data-state="rejected"] { color: var(--red); }
.health { padding: 4px 9px; border: 1px solid var(--line); border-radius: 6px; font-size: 12px; }
.health[data-state="online"] { color: #a8ddb0; background: #243028; }
.health[data-state="offline"] { color: var(--red); background: #352328; }
.connect-page h1 { scroll-margin-top: 120px; }
.connect-intro { margin: 0 0 24px; }
.access-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(220px, 1fr); gap: 18px; }
.field-label { margin-bottom: 7px; color: var(--muted); font-size: 12px; }
.endpoint { display: flex; align-items: center; gap: 12px; }
.endpoint code { min-width: 0; overflow-wrap: anywhere; flex: 1; color: #ffc7ac; padding: 9px 10px; background: var(--field); border: 1px solid var(--line); border-radius: 7px; }
.access-main .form-message { margin-top: 6px; }
.protocol-list { margin: 0; }
.protocol-list > div { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 4px 12px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.protocol-list dt { color: var(--muted); }
.protocol-list dd { margin: 0; overflow-wrap: anywhere; }
.line-section .button { margin-top: 15px; }
.steps { padding-left: 1.5rem; line-height: 1.8; color: var(--muted); }
.steps li + li { margin-top: 9px; }
.connect-page pre { overflow: auto; margin-bottom: 0; padding: 13px; background: var(--field); border: 1px solid var(--line); border-radius: 8px; font-size: 13px; }
@media (max-width: 850px) {
  .rail { position: sticky; top: 58px; z-index: 1; flex-direction: row; width: auto; border-right: 0; border-bottom: 1px solid var(--line); padding: 7px 12px; flex-wrap: wrap; }
  .rail > span { display: none; }
  .rail + .page { margin: 24px 15px 36px; }
  .section h2 { scroll-margin-top: 120px; }
}
@media (max-width: 650px) {
  .access-grid { grid-template-columns: minmax(0, 1fr); gap: 0; }
}
@media (max-width: 460px) {
  .topbar { padding: 0 14px; }
  .rail { top: 52px; }
  .rail a { font-size: 12px; padding: 8px; }
  .section { padding: 14px; }
  .heading-row { align-items: flex-start; }
  .endpoint { flex-wrap: wrap; }
  .endpoint code { flex-basis: 100%; }
}
