/* ============================================================
   Pimu Developers — shared design system
   Aligned with pimu.org: monochrome tokens, hairline rules,
   Space Grotesk / Inter / JetBrains Mono (self-hosted).
   Covers the product home, the docs and the console.
   ============================================================ */

:root {
  color-scheme: light;
  --bg: #ffffff;
  --bg-soft: #fafafa;
  --bg-deep: #0a0a0a;
  --panel: #ffffff;
  --panel-2: #f5f5f5;
  --line: rgba(10, 10, 11, 0.12);
  --line-soft: rgba(10, 10, 11, 0.08);
  --line-strong: rgba(10, 10, 11, 0.26);
  --ink: #0a0a0a;
  --ink-2: #525252;
  --ink-3: #737373;
  --ink-inv: #fafafa;
  --warn: #b45309;
  --danger: #dc2626;
  --success: #15803d;
  --code-bg: #0b0b0b;
  --code-ink: #f2f2f2;
  --code-mute: #9a9a9a;
  --code-line: rgba(250, 250, 250, 0.14);
  --display: "Space Grotesk", Inter, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --sans: Inter, "SF Pro Text", -apple-system, "system-ui", "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  --header-h: 70px;
  --sidebar-w: 264px;
  --content-w: 820px;
  --page-w: 1160px;
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 16px;
  --shadow-pop: 0 24px 60px -24px rgba(10, 10, 11, 0.35);
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0a0a0a;
  --bg-soft: #121212;
  --bg-deep: #000000;
  --panel: #111111;
  --panel-2: #1a1a1a;
  --line: rgba(250, 250, 250, 0.14);
  --line-soft: rgba(250, 250, 250, 0.1);
  --line-strong: rgba(250, 250, 250, 0.3);
  --ink: #fafafa;
  --ink-2: #a3a3a3;
  --ink-3: #8f8f8f;
  --ink-inv: #0a0a0a;
  --warn: #f59e0b;
  --danger: #f87171;
  --success: #4ade80;
  --code-bg: #050505;
  --code-ink: #f2f2f2;
  --code-mute: #8f8f8f;
  --code-line: rgba(250, 250, 250, 0.16);
  --shadow-pop: 0 24px 60px -24px rgba(0, 0, 0, 0.7);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 { font-family: var(--display); letter-spacing: -0.02em; }

a { color: inherit; text-decoration: none; }
a:hover { text-decoration: none; }

code, pre, kbd { font-family: var(--mono); }

code {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 1px 5px;
  font-size: 0.88em;
  color: var(--ink);
}

pre {
  position: relative;
  background: var(--code-bg);
  color: var(--code-ink);
  border: 1px solid var(--code-line);
  border-radius: var(--r-md);
  padding: 16px;
  overflow-x: auto;
  font-size: 12.5px;
  line-height: 1.65;
}
pre code { background: none; border: none; padding: 0; font-size: inherit; color: inherit; }
pre .tok-mute { color: var(--code-mute); }
pre .tok-key { color: #ffffff; }
pre .tok-str { color: #d4d4d4; }

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
  border-radius: 2px;
}

::selection { background: var(--ink); color: var(--bg); }

/* ---------- header ---------- */

.header {
  position: fixed;
  inset: 0 0 auto;
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 max(clamp(20px, 4vw, 40px), calc((100vw - var(--page-w)) / 2 + clamp(20px, 4vw, 40px)));
  background: var(--bg);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid var(--line-soft);
  z-index: 50;
}
.header .spacer { flex: 1; }
.header-nav { display: flex; align-items: center; gap: 28px; min-width: 0; margin-left: 26px; }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  color: var(--ink);
  font-family: var(--display);
  font-weight: 700;
  font-size: 22px;
  letter-spacing: -0.01em;
}
.brand:hover { text-decoration: none; }
.brand .brand-mark {
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  display: block;
  object-fit: contain;
}
.brand small {
  display: block;
  color: var(--ink-3);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1.4;
}
.brand > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.header .nav-link {
  color: var(--ink-2);
  font-family: var(--display);
  font-size: 15px;
  font-weight: 500;
  padding: 6px 0;
  border-radius: 0;
  white-space: nowrap;
}
.header .nav-link:hover { color: var(--ink); background: transparent; }
.header .nav-link.active { color: var(--ink); font-weight: 600; }

/* Sign in: the header's single pill action. */
.header-signin {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  height: 34px;
  padding: 0 16px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: var(--ink);
  color: var(--bg);
  font-family: var(--display);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.01em;
  white-space: nowrap;
  transition: opacity 0.15s ease;
}
.header-signin:hover { opacity: 0.86; }
.header-signin:active { opacity: 0.78; }

.badge-network {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.02em;
  color: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 10px;
  white-space: nowrap;
}
.badge-network .dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success);
  margin-right: 6px;
  vertical-align: 1px;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  min-width: 34px;
  height: 34px;
  padding: 0 10px;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  background: transparent;
  color: var(--ink-2);
  font-size: 12px;
  font-weight: 600;
  font-family: var(--sans);
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.icon-btn:hover { color: var(--ink); border-color: var(--line); background: var(--panel-2); }

/* Theme + language share one quiet, hairline pill. */
.utility {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  height: 34px;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  background: var(--panel-2);
  overflow: hidden;
}
.utility-btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 0 11px;
  border: 0;
  background: transparent;
  color: var(--ink-2);
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.15s ease, background 0.15s ease;
}
.utility-btn:hover { color: var(--ink); background: var(--bg); }
.utility-btn svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.utility-lang { min-width: 46px; padding: 0 10px; }
.utility-sep { width: 1px; height: 14px; background: var(--line); flex: 0 0 1px; }
.utility .icon-sun { display: none; }
.utility .icon-moon { display: block; }
html[data-theme="dark"] .utility .icon-sun { display: block; }
html[data-theme="dark"] .utility .icon-moon { display: none; }

.menu-btn { display: none; }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 18px;
  background: var(--ink);
  color: var(--bg);
  border: 1px solid var(--ink);
  border-radius: var(--r-sm);
  font-family: var(--display);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: opacity 0.15s ease, transform 0.15s ease;
}
.btn:hover { opacity: 0.86; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-sm { height: 36px; padding: 0 14px; font-size: 13px; }

.btn-line {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 18px;
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  font-family: var(--display);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.btn-line:hover { background: var(--panel-2); }

.btn-ghost {
  background: transparent;
  color: var(--ink-3);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 6px 10px;
  font-size: 12px;
  font-family: var(--sans);
  cursor: pointer;
}
.btn-ghost:hover { color: var(--danger); border-color: var(--line-strong); }

/* ---------- docs layout ---------- */

.sidebar {
  position: fixed;
  top: var(--header-h);
  bottom: 0;
  left: 0;
  width: var(--sidebar-w);
  border-right: 1px solid var(--line);
  overflow-y: auto;
  padding: 20px 14px 44px;
  background: var(--bg);
  z-index: 40;
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
}
.sidebar .group {
  color: var(--ink-3);
  text-transform: uppercase;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  font-weight: 600;
  margin: 20px 10px 6px;
}
.sidebar a.nav {
  display: block;
  color: var(--ink-2);
  padding: 6px 10px;
  border-radius: var(--r-sm);
  font-size: 13.5px;
  text-decoration: none;
}
.sidebar a.nav:hover { background: var(--panel-2); color: var(--ink); }
.sidebar a.nav.active {
  background: var(--panel-2);
  color: var(--ink);
  font-weight: 600;
  box-shadow: inset 2px 0 0 var(--ink);
}
.sidebar-links { display: none; }

html.sidebar-open { overflow: hidden; }

.sidebar-scrim {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 39;
  background: rgba(0, 0, 0, 0.45);
  border: 0;
  padding: 0;
  margin: 0;
  cursor: default;
  -webkit-tap-highlight-color: transparent;
}

.main {
  margin-left: var(--sidebar-w);
  padding: calc(var(--header-h) + 40px) 40px 100px;
  display: flex;
  justify-content: center;
}
.content { width: 100%; max-width: var(--content-w); min-width: 0; }

.content h1 { font-size: clamp(32px, 3.4vw, 42px); line-height: 1.14; margin: 0 0 10px; font-weight: 700; }
.content h2 { font-size: 23px; line-height: 1.25; margin: 44px 0 12px; font-weight: 700; padding-top: 6px; }
.content h3 { font-size: 17px; margin: 28px 0 8px; font-weight: 700; }
.content p { margin: 10px 0; color: var(--ink-2); }
.content ul, .content ol { color: var(--ink-2); padding-left: 22px; }
.content li { margin: 5px 0; }
.content b, .content strong { color: var(--ink); font-weight: 600; }
.content a { color: var(--ink); font-weight: 500; text-decoration: underline; text-underline-offset: 2px; text-decoration-color: var(--line-strong); }
.content a:hover { text-decoration-color: var(--ink); }

.lead { color: var(--ink-2); font-size: 17px; line-height: 1.75; margin-bottom: 24px; }

.note {
  border: 1px solid var(--line);
  border-left: 3px solid var(--ink);
  background: var(--bg-soft);
  border-radius: var(--r-sm);
  padding: 14px 16px;
  margin: 18px 0;
  color: var(--ink-2);
  font-size: 14px;
  line-height: 1.7;
}
.note.warn { border-left-color: var(--warn); }
.note b { color: var(--ink); }

.content table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  font-size: 13.5px;
}
.content th, .content td {
  text-align: left;
  padding: 9px 10px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.content th {
  color: var(--ink-3);
  font-family: var(--mono);
  font-weight: 600;
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.content td code { font-size: 12px; }

/* copy button */
.copy-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(250, 250, 250, 0.1);
  border: 1px solid var(--code-line);
  color: var(--code-ink);
  border-radius: 4px;
  font-size: 11px;
  padding: 3px 8px;
  cursor: pointer;
  font-family: var(--sans);
}
.copy-btn:hover { background: rgba(250, 250, 250, 0.2); }

/* endpoint cards */
.search-box {
  width: 100%;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  color: var(--ink);
  padding: 11px 14px;
  font-size: 14px;
  font-family: var(--sans);
  margin: 14px 0 10px;
  outline: none;
}
.search-box:focus { border-color: var(--line-strong); }
.search-box::placeholder { color: var(--ink-3); }

.endpoint {
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  margin: 12px 0;
  overflow: hidden;
  background: var(--panel);
  scroll-margin-top: calc(var(--header-h) + 16px);
}
.endpoint .ep-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid transparent;
  cursor: pointer;
  background: var(--panel);
}
.endpoint.open .ep-head { border-bottom-color: var(--line); }
.endpoint .ep-head:hover { background: var(--panel-2); }
.endpoint .ep-body { padding: 14px; display: none; }
.endpoint.open .ep-body { display: block; }
.ep-path { font-family: var(--mono); font-size: 13px; color: var(--ink); }
.ep-summary { color: var(--ink-3); font-size: 12.5px; margin-left: auto; text-align: right; }
.tag-beta {
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--warn);
  border: 1px solid var(--warn);
  border-radius: 3px;
  padding: 1px 5px;
  flex: 0 0 auto;
}
.method {
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  border-radius: 4px;
  padding: 3px 7px;
  background: var(--ink);
  color: var(--bg);
  flex: 0 0 auto;
}

.param-table td:first-child { font-family: var(--mono); white-space: nowrap; }

/* ---------- console ---------- */

.console {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: calc(var(--header-h) + 48px) 32px 100px;
}
.console-head { margin-bottom: 28px; }
.console-head .eyebrow { margin-bottom: 12px; }
.console-head h1 { font-size: clamp(32px, 3.4vw, 42px); line-height: 1.14; margin: 0 0 10px; }
.console-head p { color: var(--ink-2); margin: 0; max-width: 640px; }

.dash-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 18px;
  margin: 14px 0;
}
.dash-note { color: var(--ink-2); font-size: 13.5px; line-height: 1.7; margin: 0 0 14px; }
.dash-error { color: var(--danger); font-size: 13px; margin-top: 10px; }
.muted { color: var(--ink-3); }
.dash-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.dash-address { font-family: var(--mono); font-size: 16px; color: var(--ink); }
.dash-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin: 14px 0;
}
.dash-grid .dash-card { margin: 0; }
.dash-label {
  color: var(--ink-3);
  font-family: var(--mono);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 6px;
}
.dash-value { font-size: 26px; font-weight: 700; color: var(--ink); font-family: var(--display); letter-spacing: -0.02em; }
.dash-value small { font-size: 11px; color: var(--ink-3); margin-left: 3px; font-weight: 500; font-family: var(--sans); }

.field {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 9px 12px;
  color: var(--ink);
  font-size: 13px;
  font-family: var(--sans);
  outline: none;
}
.field:focus { border-color: var(--line-strong); }
.field::placeholder { color: var(--ink-3); }
.dash-card-head {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.dash-card-head h3 { margin: 0; font-size: 16px; color: var(--ink); }
.dash-create { display: flex; gap: 8px; flex-wrap: wrap; }
.data-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.data-table th {
  text-align: left;
  color: var(--ink-3);
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 8px;
  border-bottom: 1px solid var(--line);
  font-weight: 600;
}
.data-table td { padding: 9px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.pill { font-size: 10.5px; padding: 2px 8px; border-radius: 999px; font-family: var(--mono); white-space: nowrap; }
.pill-on { color: var(--ink); border: 1px solid var(--line-strong); }
.pill-off { color: var(--ink-3); border: 1px solid var(--line); }
.key-banner {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-left: 3px solid var(--ink);
  border-radius: var(--r-sm);
  padding: 14px;
  margin: 14px 0;
}
.key-banner-title { color: var(--ink); font-weight: 700; font-size: 13px; margin-bottom: 8px; }
.key-value {
  display: block;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 10px 12px;
  font-size: 13px;
  word-break: break-all;
  color: var(--ink);
}
.key-banner-actions { display: flex; align-items: center; gap: 12px; margin-top: 10px; flex-wrap: wrap; }

#network-btn.offline { color: var(--warn); }
.network-banner {
  border: 1px solid var(--warn);
  background: var(--bg-soft);
  color: var(--warn);
  border-radius: var(--r-sm);
  padding: 10px 14px;
  margin-bottom: 18px;
  font-size: 13px;
}

/* ---------- shared landing pieces ---------- */

.wrap { width: 100%; max-width: var(--page-w); margin: 0 auto; padding: 0 clamp(20px, 4vw, 40px); }
.landing-main { padding-top: var(--header-h); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-3);
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.eyebrow::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ink);
}

.hero { padding: clamp(56px, 7vw, 92px) 0 clamp(48px, 5vw, 72px); border-bottom: 1px solid var(--line); }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(0, 0.96fr);
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
}
.hero h1 {
  font-size: clamp(38px, 5vw, 56px);
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin: 18px 0 18px;
  font-weight: 700;
  max-width: 620px;
}
html[data-lang="zh"] .hero h1 {
  font-size: clamp(34px, 4.4vw, 48px);
  line-height: 1.2;
  letter-spacing: -0.01em;
}
.hero .lead { font-size: 17px; line-height: 1.78; color: var(--ink-2); max-width: 560px; margin: 0; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }
.hero-meta {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  margin-top: 26px;
  color: var(--ink-3);
  font-family: var(--mono);
  font-size: 11.5px;
}
.hero-meta span { display: inline-flex; align-items: center; gap: 6px; }
.hero-meta .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--success); }

.code-card {
  background: var(--code-bg);
  color: var(--code-ink);
  border: 1px solid var(--code-line);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow-pop);
}
.code-tabs { display: flex; gap: 2px; padding: 10px 10px 0; border-bottom: 1px solid var(--code-line); }
.code-tab {
  border: 0;
  background: transparent;
  color: var(--code-mute);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  padding: 7px 10px;
  border-radius: 6px 6px 0 0;
  cursor: pointer;
}
.code-tab[aria-selected="true"] { color: var(--code-ink); background: rgba(250, 250, 250, 0.08); }
.code-pane { display: none; }
.code-pane.active { display: block; }
.code-card pre { margin: 0; border: 0; border-radius: 0; padding: 18px; min-height: 236px; }

.section { padding: clamp(48px, 6vw, 76px) 0; border-bottom: 1px solid var(--line); }
.section-soft { background: var(--bg-soft); }
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 34px;
  flex-wrap: wrap;
}
.section-head h2 {
  font-size: clamp(26px, 3vw, 36px);
  line-height: 1.16;
  letter-spacing: -0.025em;
  margin: 0 0 8px;
  font-weight: 700;
}
.section-head p { color: var(--ink-2); margin: 0; max-width: 640px; font-size: 15.5px; line-height: 1.75; }
.section-head .sec-link { font-family: var(--mono); font-size: 11.5px; color: var(--ink-2); border-bottom: 1px solid var(--line-strong); padding-bottom: 2px; white-space: nowrap; }
.section-head .sec-link:hover { color: var(--ink); border-color: var(--ink); }

.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }

.card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 22px;
  min-width: 0;
}
.card .num { font-family: var(--mono); font-size: 10.5px; font-weight: 600; letter-spacing: 0.12em; color: var(--ink-3); }
.card h3 { font-size: 18px; margin: 14px 0 8px; font-weight: 700; }
.card p { margin: 0; color: var(--ink-2); font-size: 14px; line-height: 1.7; }
.card .chips { margin-top: 16px; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  font-family: var(--mono);
  font-size: 10.5px;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 3px 6px;
  color: var(--ink-2);
  background: var(--bg);
  white-space: nowrap;
}

.usecase { display: flex; flex-direction: column; gap: 16px; }
.usecase .uc-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.usecase h3 { margin: 0; font-size: 19px; }
.usecase .uc-tag { font-family: var(--mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); }
.usecase p { margin: 0; color: var(--ink-2); font-size: 14px; line-height: 1.7; }

.flow {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--bg);
}
.flow-cell { padding: 22px; min-width: 0; }
.flow-cell + .flow-cell { border-left: 1px solid var(--line); }
.flow-cell .label { font-family: var(--mono); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); }
.flow-cell h3 { font-size: 17px; margin: 8px 0 6px; }
.flow-cell p { margin: 0; color: var(--ink-2); font-size: 13.5px; line-height: 1.65; }

.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.step { border-top: 2px solid var(--ink); padding-top: 16px; min-width: 0; }
.step .n { font-family: var(--mono); font-size: 11px; font-weight: 600; letter-spacing: 0.1em; color: var(--ink-3); }
.step h3 { font-size: 18px; margin: 10px 0 8px; }
.step p { color: var(--ink-2); font-size: 14px; line-height: 1.7; margin: 0 0 12px; }
.step pre { font-size: 11.5px; padding: 12px; }

.price-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.price-table th, .price-table td { text-align: left; padding: 12px 0; border-bottom: 1px solid var(--line); }
.price-table th { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); font-weight: 600; }
.price-table td:last-child { text-align: right; font-family: var(--mono); font-size: 12.5px; color: var(--ink); }

.eco-row { display: flex; flex-wrap: wrap; gap: 10px; }
.eco-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 13px;
  color: var(--ink-2);
  background: var(--bg);
}
.eco-link:hover { color: var(--ink); border-color: var(--line-strong); }
.eco-link .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--ink-3); }

.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none;
  cursor: pointer;
  padding: 18px 0;
  font-family: var(--display);
  font-size: 16px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--mono); font-size: 16px; color: var(--ink-3); }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 0 0 18px; color: var(--ink-2); font-size: 14px; line-height: 1.75; max-width: 820px; }

.footer { padding: 56px 0 40px; background: var(--bg); }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, minmax(0, 1fr));
  gap: 32px;
  margin-bottom: 44px;
}
.footer-brand p { color: var(--ink-3); font-size: 13px; line-height: 1.7; margin: 12px 0 0; max-width: 300px; }
.footer h4 { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); margin: 0 0 12px; font-weight: 600; }
.footer ul { list-style: none; margin: 0; padding: 0; }
.footer li { margin: 7px 0; }
.footer a { color: var(--ink-2); font-size: 13.5px; }
.footer a:hover { color: var(--ink); }
.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  border-top: 1px solid var(--line);
  padding-top: 22px;
  color: var(--ink-3);
  font-size: 12px;
  font-family: var(--mono);
}

/* language blocks */
html[data-lang="en"] .only-zh,
html[data-lang="zh"] .only-en { display: none !important; }

/* mobile nav (landing / console) */
.mobile-nav {
  border: 0;
  padding: 0;
  margin: 0 0 0 auto;
  width: min(360px, 88vw);
  max-width: none;
  height: 100dvh;
  max-height: none;
  background: var(--bg);
  color: var(--ink);
}
.mobile-nav::backdrop { background: rgba(10, 10, 11, 0.45); }
.mobile-nav-inner { padding: 18px 20px 40px; }
.mobile-nav-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.mobile-nav a.mnav {
  display: block;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
  font-family: var(--display);
  font-size: 17px;
  font-weight: 600;
  color: var(--ink);
}
.mobile-nav .group { font-family: var(--mono); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); margin: 22px 0 4px; }
.mobile-nav .mnav-actions { display: flex; gap: 10px; margin-top: 24px; flex-wrap: wrap; }

/* skip link */
.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 11px 18px;
  border-radius: 0 0 8px 0;
  background: var(--ink);
  color: var(--bg);
  font: 600 14px/1 var(--sans);
  text-decoration: none;
}
.skip:focus { left: 0; }

/* ---------- responsive ---------- */

@media (max-width: 1100px) {
  /* The primary CTA stays; the secondary sign-in link moves into the drawer. */
  .header .text-link { display: none; }
}

@media (max-width: 1080px) {
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: 1.4fr repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .header { padding: 0 14px; gap: 8px; }
  .header-nav { display: none; }
  .header .badge-network, .header .nav-link, .header .text-link { display: none; }
  .brand { font-size: 16px; }
  .brand small { display: none; }
  .brand > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .menu-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    border-radius: 999px;
    border: 1px solid var(--line-soft);
    background: transparent;
    color: var(--ink);
    font-size: 16px;
    cursor: pointer;
    order: 2;
    margin-left: 2px;
  }

  .sidebar-scrim.visible { display: block; }
  .sidebar { transform: translateX(-100%); transition: transform 0.2s ease; }
  .sidebar.open { transform: translateX(0); }
  .sidebar-links { display: block; }
  .main { margin-left: 0; padding: calc(var(--header-h) + 24px) 18px 64px; }
  .content h1 { font-size: 32px; }
  .content h2 { font-size: 21px; margin-top: 36px; }
  .content table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .content table th, .content table td { white-space: nowrap; }
  .ep-head { flex-wrap: wrap; }
  .ep-summary { margin-left: 0; text-align: left; width: 100%; }

  .console { padding: calc(var(--header-h) + 28px) 18px 72px; }

  .hero-grid { grid-template-columns: minmax(0, 1fr); }
  .hero { padding-top: 44px; }
  .hero h1 { font-size: clamp(34px, 8vw, 44px); }
  .grid-3, .grid-2, .steps, .flow { grid-template-columns: minmax(0, 1fr); }
  .flow-cell + .flow-cell { border-left: 0; border-top: 1px solid var(--line); }
  .section { padding: 44px 0; }
  .section-head { margin-bottom: 24px; }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; }
  .footer-brand { grid-column: 1 / -1; }
  .code-card pre { min-height: 0; font-size: 11.5px; }
}

@media (max-width: 480px) {
  .header { padding: 0 10px; gap: 6px; }
  /* The primary CTA lives in the hero and the drawer on narrow phones. */
  .header > .btn { display: none; }
  .icon-btn { min-width: 32px; height: 32px; padding: 0 8px; }
  .utility { height: 32px; }
  .utility-btn { padding: 0 9px; }
  .utility-lang { min-width: 42px; }
  .header-signin { height: 32px; padding: 0 13px; font-size: 12px; }
  .menu-btn { width: 32px; height: 32px; flex: 0 0 32px; }
  .hero-actions .btn, .hero-actions .btn-line { width: 100%; }
  .footer-grid { grid-template-columns: minmax(0, 1fr); }
  .dash-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 420px) {
  .header { gap: 5px; }
  .brand { font-size: 15px; }
  .brand .brand-mark { width: 22px; height: 22px; flex: 0 0 22px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
