:root {
  color-scheme: dark;
  --bg: #0e1723;
  --panel: #152231;
  --muted: #9baec0;
  --border: #2a3a4a;
  --accent: #81e1cf;
  --text: #eff5fb;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-height: 100vh; background: var(--bg); color: var(--text); }
a { color: inherit; text-decoration: none; }
p { line-height: 1.65; }
.topbar { min-height: 64px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; padding: 0 clamp(16px, 4vw, 44px); gap: 12px; }
.topbar nav, .brand { display: flex; align-items: center; gap: 16px; }
.topbar nav { font-size: 14px; color: var(--muted); }
.topbar nav a:hover, .text-button:hover { color: var(--accent); }
.brand { font-weight: 650; white-space: nowrap; gap: 10px; }
.brand-product { color: var(--muted); padding-left: 10px; border-left: 1px solid var(--border); font-weight: 500; font-size: 14px; }
.button { display: inline-flex; justify-content: center; align-items: center; background: var(--accent); color: #102722; border: 1px solid transparent; border-radius: 9px; padding: 10px 16px; min-height: 42px; font: inherit; font-size: 14px; font-weight: 650; cursor: pointer; white-space: nowrap; }
.button:hover { background: #a1efdd; }
.button:disabled { opacity: .48; cursor: default; }
.text-button { padding: 5px 0; background: none; border: 0; color: var(--muted); font: inherit; cursor: pointer; white-space: nowrap; }
.eyebrow { color: var(--accent); font-size: 13px; font-weight: 650; margin: 0 0 8px; }
.console { display: grid; grid-template-columns: minmax(0, 1fr); }
.console-sidebar { background: #111e2b; padding: 10px 12px; border-bottom: 1px solid var(--border); min-width: 0; }
.console-brand, .account { display: none; }
#console-nav { display: flex; flex-wrap: wrap; gap: 5px; }
#console-nav a { display: flex; align-items: center; padding: 10px 12px; border-radius: 9px; color: var(--muted); white-space: nowrap; }
#console-nav a span { display: none; width: 29px; font-size: 17px; }
#console-nav a:hover, #console-nav [aria-current=page] { color: var(--text); background: #243747; }
#console-nav [aria-current=page] span { color: var(--accent); }
.workspace-scroll { min-width: 0; }

@media (min-width: 851px) {
  body[data-page=console].platform-authenticated { height: 100dvh; min-height: 0; overflow: hidden; }
  body[data-page=console].platform-authenticated .topbar { display: none; }
  .console { height: 100dvh; grid-template-columns: clamp(220px, 18vw, 260px) minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); }
  .console-sidebar { display: flex; flex-direction: column; min-height: 0; gap: clamp(15px, 4vh, 34px); overflow: clip; padding: clamp(14px, 3vh, 30px) 14px clamp(12px, 3vh, 25px); border-bottom: 0; border-right: 1px solid var(--border); }
  .console-brand { display: flex; align-items: center; gap: 7px; min-height: 30px; padding-inline: 6px; white-space: nowrap; }
  .console-brand strong { font-size: 21px; letter-spacing: -.035em; }
  .console-brand span { padding: 2px 5px; border-radius: 3px; background: #eef5fd; color: #152231; font-size: 10px; font-weight: 650; }
  #console-nav { display: grid; gap: clamp(2px, .65vh, 6px); }
  #console-nav a { padding-block: clamp(6px, 1.4vh, 12px); }
  #console-nav a span { display: inline-block; }
  .account { display: grid; margin-top: auto; }
  .workspace-scroll { min-height: 0; overflow-y: auto; overscroll-behavior-y: contain; }
}
.workspace { width: min(100%, 1280px); padding: clamp(20px, 4vw, 50px); margin: 0 auto; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 22px; }
.section-heading h1, .docs h1 { margin: 0; font-size: clamp(28px, 3vw, 40px); letter-spacing: -.035em; }
.section-heading h1 + p { color: var(--muted); margin: 8px 0 0; }
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.metrics article, .card { background: var(--panel); border: 1px solid var(--border); border-radius: 12px; padding: 18px; }
.metrics p { margin: 0 0 8px; font-size: 14px; color: var(--muted); }
.metrics strong { display: block; font-size: clamp(19px, 2.25vw, 30px); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.metrics small { display: block; margin-top: 6px; color: var(--muted); }
.card + .card { margin-top: 14px; }
.card-header, .form-row { display: flex; align-items: end; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.card-header h2 { margin: 0; font-size: 19px; }
.card-header p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.filters { display: flex; flex-wrap: wrap; gap: 12px; }
label { display: grid; gap: 6px; font-size: 13px; color: var(--muted); }
.form-row { justify-content: start; }
input, select { background: #101b28; border: 1px solid var(--border); border-radius: 7px; color: var(--text); padding: 9px 11px; max-width: 100%; min-height: 42px; font: inherit; }
select { max-width: min(220px, 100%); }
.trend { margin-top: 24px; height: 188px; display: flex; align-items: end; gap: clamp(1px, .65vw, 8px); border-bottom: 1px solid var(--border); background-image: repeating-linear-gradient(to top, transparent 0, transparent calc(25% - 1px), #263746 calc(25% - 1px), #263746 25%); }
.trend span { flex: 1; min-width: 1px; border-radius: 3px 3px 0 0; background: linear-gradient(#82e3d0, #307b86); }
.trend p { width: 100%; text-align: center; margin: auto; color: var(--muted); }
.trend-dates { display: flex; justify-content: space-between; color: var(--muted); font-size: 12px; margin-top: 8px; }
.notice { background: #263747; color: var(--text); padding: 12px 15px; border-radius: 8px; margin: 0 0 16px; }
.supporting { font-size: 13px; color: var(--muted); }
.table-wrap { overflow: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; text-align: left; }
th, td { padding: 11px 8px; border-bottom: 1px solid var(--border); overflow-wrap: anywhere; }
th { color: var(--muted); font-weight: 550; }
tbody tr:last-child td { border-bottom: 0; }
.key-result { background: #203746; padding: 12px; margin-top: 16px; border-radius: 8px; }
.key-result p { margin: 0 0 6px; }
.key-result div { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.example-tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--line); margin-top: 18px; }
.example-tabs button { font: inherit; color: var(--muted); background: transparent; border: 0; border-bottom: 2px solid transparent; padding: 9px 14px; cursor: pointer; }
.example-tabs button[aria-selected="true"] { color: var(--accent); border-bottom-color: var(--accent); }
code { font-family: "IBM Plex Mono", ui-monospace, monospace; color: #a5e9dc; overflow-wrap: anywhere; }
.docs { width: min(100% - 32px, 900px); margin: 55px auto 80px; }
.docs p:not(.eyebrow) { color: var(--muted); }
.docs h2 { margin: 40px 0 8px; }
.snippet { position: relative; background: var(--panel); border: 1px solid var(--border); border-radius: 9px; }
.snippet button { position: absolute; top: 8px; right: 12px; background: var(--panel); padding: 4px 8px; }
pre { padding: 18px 16px; overflow: auto; margin: 0; font-size: 13px; line-height: 1.6; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
@media (max-width: 520px) {
  .topbar nav { gap: 8px; }
  .brand-product { display: none; }
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .section-heading { align-items: start; }
  .section-heading .button { white-space: normal; text-align: center; }
  th, td { padding-inline: 5px; }
}

/* Open platform sign-in. */
[data-page=login] .topbar,
[data-page=registration] .topbar,
[data-page=preview] .topbar,
[data-page=console]:not(.platform-authenticated) .topbar { display: none; }

.login-shell {
  min-height: 100svh;
  display: grid;
  grid-template-columns: minmax(0, 37fr) minmax(0, 63fr);
  color: #f7f8fa;
  background: #161617;
}
.login-intro {
  display: grid;
  align-items: center;
  padding: 56px clamp(35px, 5vw, 96px);
  background:
    radial-gradient(ellipse at 82% 2%, #8faebdb0 0%, transparent 57%),
    radial-gradient(ellipse at -17% 34%, #527ba9 0%, transparent 52%),
    radial-gradient(ellipse at -8% 69%, #182a46 0%, transparent 52%),
    linear-gradient(155deg, #6387ad 2%, #3b5060 38%, #262e32 66%, #101111 100%);
}
.login-intro-copy { max-width: 440px; transform: translateY(-2vh); }
.login-intro h1 { font-size: clamp(28px, 2.62vw, 50px); font-weight: 600; line-height: 1.45; letter-spacing: -.025em; margin: 0 0 23px; }
.login-intro p { color: #d7dce4; font-size: 15px; margin: 0 0 35px; }
.login-light-button { border-radius: 100px; background: #f6f7f9; color: #14161b; }
.login-light-button:hover { background: #dedfe3; }
.login-intro .login-light-button { min-height: 42px; padding-inline: 17px; }
.login-surface { display: grid; position: relative; place-items: center; padding: 64px 36px 86px; }
.login-content { width: min(100%, 350px); }
.login-brand { display: flex; justify-content: center; align-items: center; gap: 9px; margin-bottom: clamp(35px, 6vh, 60px); white-space: nowrap; }
.login-brand img { width: 34px; height: 34px; }
.login-brand strong { font-size: clamp(27px, 2.2vw, 34px); line-height: 1; font-weight: 700; letter-spacing: -.06em; }
.login-brand span { padding: 3px 5px; margin-left: 2px; border-radius: 3px; background: #f7f8fa; color: #161617; font-size: 11px; font-weight: 650; }
.login-form { display: grid; gap: 18px; }
.login-field { display: block; position: relative; }
.login-field-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.login-form input { width: 100%; min-height: 48px; background: #1c1c1d; border: 1px solid #3b3b3e; color: #f7f8fa; border-radius: 100px; padding: 0 18px; font-size: 14px; }
.login-form input::placeholder { color: #a0a2a9; opacity: 1; }
.login-form input:focus-visible { outline: 1px solid #9db4d4; outline-offset: 1px; }
.login-form .login-light-button { margin-top: 9px; min-height: 44px; }
.login-account-note { margin: 0; color: #a7a9b1; font-size: 13px; line-height: 1.6; }
.login-footer { position: absolute; bottom: 24px; color: #94969e; font-size: 13px; }
.login-footer a:hover { color: #f7f8fa; }
.form-message { min-height: 22px; margin: 4px 0; font-size: 13px; color: #ffc0a9; }
.login-form .form-message { margin: 0; }
.login-register-link { text-align: center; color: #a7a9b1; font-size: 13px; margin: 20px 0 0; }
.login-register-link a, .registration-privacy a { color: #f7f8fa; text-decoration: underline; text-underline-offset: .18em; }
.registration-shell .login-brand { margin-bottom: 24px; }
.registration-options { display: flex; gap: 4px; padding: 4px; border-radius: 100px; background: #242427; margin: 14px 0; }
.registration-options a { flex: 1; text-align: center; border-radius: 100px; padding: 8px 10px; color: #b8bbc4; font-size: 14px; }
.registration-options a[aria-current] { color: #f7f8fa; background: #3b3b40; }
.registration-form { gap: 13px; }
.registration-form .registration-mobile input { padding-left: 55px; }
.registration-form .registration-action-field input { padding-right: 68px; }
.registration-form .registration-code input { padding-right: 120px; }
.registration-prefix, .registration-field-action { position: absolute; top: 50%; transform: translateY(-50%); }
.registration-prefix { left: 18px; font-size: 14px; }
.registration-field-action { right: 12px; border: 0; background: transparent; padding: 8px 5px; color: #f7f8fa; white-space: nowrap; cursor: pointer; }
.registration-code .registration-field-action { border-left: 1px solid #3b3b3e; padding-left: 11px; }
.registration-field-action:disabled { color: #a7a9b1; cursor: default; }
.registration-privacy { display: flex; align-items: start; gap: 8px; margin: 4px 2px 0; color: #a7a9b1; font-size: 13px; }
.registration-form input[type="checkbox"] { width: 16px; height: 16px; min-height: 0; padding: 0; flex-shrink: 0; margin: 2px 0 0; }
.registration-form [data-kind="success"] { color: #b4e7d7; }

@media (max-width: 760px) {
  .login-shell { grid-template-columns: 1fr; }
  .login-intro { padding: 32px 25px; }
  .login-intro-copy { transform: none; }
  .login-intro h1 { margin-bottom: 10px; }
  .login-intro p { margin-bottom: 15px; }
  .login-surface { min-height: 420px; }
  .registration-shell .login-intro { display: none; }
  .registration-shell .login-surface { min-height: 100svh; padding: 36px 22px 70px; }
}

/* Console and public guide. */
.account { grid-template-columns: 28px minmax(0, 1fr) 32px; align-items: center; gap: 7px; border-top: 1px solid var(--border); padding: clamp(7px, 1.8vh, 16px) 4px 0; color: var(--muted); }
.account-avatar { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; color: var(--accent); background: #203f4c; font-size: 12px; }
.account #account { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; line-height: 1.4; }
.account-actions { position: relative; justify-self: end; }
.account-actions summary { display: grid; place-items: center; width: 32px; height: 32px; list-style: none; border-radius: 7px; cursor: pointer; font-size: 20px; line-height: 1; }
.account-actions summary::-webkit-details-marker { display: none; }
.account-actions summary:hover, .account-actions[open] summary { color: var(--text); background: #243747; }
.account-menu { position: absolute; z-index: 2; right: 0; bottom: calc(100% + 8px); min-width: 145px; padding: 4px; border: 1px solid var(--border); border-radius: 9px; background: var(--panel); box-shadow: 0 10px 25px #050a11a0; }
.account-menu > :is(a, button) { display: block; width: 100%; text-align: left; padding: 8px 9px; border: 0; border-radius: 6px; background: transparent; color: var(--text); font: inherit; font-size: 13px; white-space: nowrap; cursor: pointer; }
.account-menu > :is(a, button):hover { background: #243747; }
.enterprise-credit { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 11px 15px; margin: 0 0 14px; border: 1px solid var(--border); border-radius: 8px; color: var(--muted); background: #142433; font-size: 14px; }
.enterprise-credit strong { color: var(--accent); font-variant-numeric: tabular-nums; }
.enterprise-credit-warning { flex-basis: 100%; margin: 0; color: #ffcf9c; }
.enterprise-block { margin: 32px 0 0; padding-top: 25px; border-top: 1px solid var(--border); }
.enterprise-block h2, .enterprise-block h3, .table-wrap h2 { margin: 0 0 5px; }
.enterprise-block .section-heading p { color: var(--muted); margin: 0; font-size: 13px; }
.enterprise-metrics, .enterprise-charts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.enterprise-charts > .card { margin: 0; }
.enterprise-charts h3 { font-size: 15px; }
.enterprise-charts .trend { height: 140px; }
#enterprise-request-trend span { background: linear-gradient(#80b5ff, #4469be); }
.table-wrap > h2 { font-size: 17px; }
.row-actions { display: flex; gap: 12px; }
dialog { background: var(--panel); color: var(--text); border: 1px solid var(--border); border-radius: 16px; padding: 26px; width: min(92vw, 620px); }
dialog::backdrop { background: #060d17b0; }
dialog h2 { margin: 0 0 22px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.form-grid select { max-width: 100%; }
.dialog-actions { display: flex; flex-wrap: wrap; justify-content: end; gap: 13px; padding-top: 10px; }
.button-secondary { background: transparent; color: var(--text); border-color: var(--border); }
.button-secondary:hover { background: var(--border); }
.recharge-form { display: grid; gap: 20px; max-width: 560px; }
.recharge-form fieldset { border: 0; padding: 0; margin: 0; }
.recharge-form legend { margin-bottom: 9px; color: var(--muted); font-size: 14px; }
.amount-options { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.amount-options button { min-width: 60px; border: 1px solid var(--border); padding: 10px; border-radius: 8px; background: #192a39; color: var(--text); font: inherit; cursor: pointer; }
.amount-options button[aria-pressed=true] { background: var(--accent); border-color: var(--accent); color: #102722; }
.recharge-form input { max-width: 170px; }
.payment-method { display: flex; justify-content: space-between; padding: 12px 14px; border: 1px solid var(--border); color: var(--muted); border-radius: 7px; }
.payment-method strong { color: var(--text); }
.inline-link { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.console-guide { max-width: 850px; }
.console-guide > h1 { margin-top: 0; }
.console-guide > h2 { margin-top: 35px; }
.console-guide > p { color: var(--muted); }
[data-page=docs] { color-scheme: light; --bg: #fbfcff; --panel: #f3f6fb; --text: #152337; --muted: #4e5c71; --border: #dce3ee; --accent: #1a57ad; }
.docs-layout { display: grid; grid-template-columns: minmax(160px, 235px) minmax(0, 1fr); min-height: calc(100vh - 64px); }
.docs-nav { display: flex; flex-direction: column; padding: 34px 18px; gap: 7px; border-right: 1px solid var(--border); background: var(--panel); }
.docs-nav strong { margin: 0 12px 5px; font-size: 14px; }
.docs-nav a { padding: 8px 12px; color: var(--muted); border-radius: 6px; font-size: 14px; }
.docs-nav a:hover, .docs-nav a:focus-visible { background: #e2ebfa; color: var(--accent); }
[data-page=docs] .docs { margin: 44px clamp(20px, 4vw, 64px) 70px; width: auto; max-width: 850px; min-width: 0; }
[data-page=docs] .notice { background: #e8f0fb; color: var(--text); }
[data-page=docs] code { color: #23466d; }
[data-page=docs] .snippet { background: #132034; color: #c4ddff; border-color: #132034; }
[data-page=docs] .snippet button { background: #23344c; color: #bbd9fa; }
@media (max-width: 850px) {
  .docs-layout { grid-template-columns: minmax(0, 1fr); }
  .docs-nav { display: none; }
}
