/* ============================================================================
   BteloDB 设计系统 · 清晰主流 SaaS 控制台（Clean SaaS · Dark）
   单一事实源。Studio（数据面）与 Console（控制面）共用。
   原则：中性深灰底 + 克制的品牌强调色（仅主操作 / 激活 / 链接 / 危险）+ 语义色；
   无衬线主导界面、等宽仅用于数据 / 代码；柔和圆角、克制边框与阴影；句子大小写。
   对标 Supabase / Linear / Vercel 的暗色控制台质感——一眼看懂、直接上手。
   ========================================================================== */

:root {
  /* ── 中性底 ──────────────────────────────────────────────── */
  --bg:       #0b0b0e;   /* 应用画布 */
  --bg-1:     #0e0e12;   /* 侧栏 / 顶栏 / 输入井 */
  --panel:    #151519;   /* 卡片 */
  --panel-2:  #1c1c21;   /* 卡片头 / hover */
  --panel-3:  #24242b;   /* 升起 hover */
  --line:     #26262c;   /* 边框 / 分隔 */
  --line-2:   #34343c;   /* 强边框 */
  /* ── 前景 ────────────────────────────────────────────────── */
  --fg:       #f3f3f4;
  --fg-1:     #c7c7cd;
  --dim:      #8b8b95;
  --faint:    #5c5c66;
  /* ── 品牌强调色：绿（克制使用：主操作 / 激活 / 链接 / 品牌 / 焦点）──── */
  --accent:     #3ecf8e;
  --accent-br:  #5bdca2;                    /* 略亮：hover / 链接 */
  --accent-dim: rgba(62, 207, 142, .14);    /* 浅底：激活态 / 焦点环 */
  --accent-ink: #06140d;                    /* 绿底上的深色文字（primary 按钮 / 品牌印记）*/
  /* ── 红色仅用于错误 / 危险（不再做品牌色）──────────────────── */
  --red:      #e5484d;
  --red-br:   #f2696d;
  --red-dim:  rgba(229, 72, 77, .13);
  /* ── 语义色 ──────────────────────────────────────────────── */
  --green:    #30a46c;   --green-dim: rgba(48, 164, 108, .14);
  --amber:    #e0a52b;   --amber-dim: rgba(224, 165, 43, .14);
  --blue:     #5b8def;   --blue-dim:  rgba(91, 141, 239, .14);
  /* ── 字体 ────────────────────────────────────────────────── */
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
          "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono", "Cascadia Code", "SFMono-Regular", ui-monospace,
          Consolas, "Liberation Mono", monospace;
  /* ── 字阶 ────────────────────────────────────────────────── */
  --t-micro: 11px; --t-meta: 12px; --t-sm: 13px; --t-base: 14px;
  --t-md: 15px; --t-lg: 19px; --t-xl: 26px; --t-display: 22px;
  /* ── 间距（4px 基）──────────────────────────────────────── */
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s8: 48px;
  /* ── 圆角 / 阴影 / 焦点环 ─────────────────────────────────── */
  --r-sm: 6px; --r: 9px; --r-lg: 13px;
  --shadow: 0 1px 2px rgba(0, 0, 0, .35);
  --shadow-lg: 0 8px 28px rgba(0, 0, 0, .45), 0 2px 8px rgba(0, 0, 0, .35);
  --ring: 0 0 0 3px var(--accent-dim);
  --sidebar-w: 240px;
  --topbar-h: 52px;
}

* { box-sizing: border-box; }

html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: var(--t-base)/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: rgba(62, 207, 142, .30); color: var(--accent-ink); }

/* 滚动条：纤细、中性 */
* { scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 6px;
  border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: #45454e; }

/* ── 排版 ─────────────────────────────────────────────────── */
h1, h2, h3, h4 { margin: 0; font-family: var(--sans); font-weight: 600;
  letter-spacing: -.01em; line-height: 1.25; }
.display { font-family: var(--sans); font-weight: 650; font-size: var(--t-display);
  letter-spacing: -.02em; line-height: 1.2; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent-br); }
b, strong { font-weight: 600; }
code, samp, kbd, pre { font-family: var(--mono); }

.up    { text-transform: uppercase; letter-spacing: .06em; }
.mono  { font-family: var(--mono); }
.dim   { color: var(--dim); }
.faint { color: var(--faint); }
.red   { color: var(--red-br); }
.label { font-size: var(--t-micro); text-transform: uppercase; letter-spacing: .07em;
  color: var(--dim); font-weight: 600; }

/* ── 应用外壳：侧栏 | 主区 ─────────────────────────────────── */
.app { display: grid; grid-template-columns: var(--sidebar-w) 1fr;
  grid-template-rows: var(--topbar-h) 1fr; height: 100vh;
  grid-template-areas: "brand topbar" "sidebar main"; }

.brand { grid-area: brand; display: flex; align-items: center; gap: 10px;
  padding: 0 var(--s4); border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line); background: var(--bg-1); }
.brand .mark { width: 24px; height: 24px; border-radius: 7px; background: var(--accent);
  flex: none; display: flex; align-items: center; justify-content: center;
  color: var(--accent-ink); font: 800 13px/1 var(--sans); }
.brand .name { font-family: var(--sans); font-weight: 650; font-size: var(--t-md);
  letter-spacing: -.01em; }
.brand .name i { color: var(--accent-br); font-style: normal; }

.topbar { grid-area: topbar; display: flex; align-items: center; gap: var(--s3);
  padding: 0 var(--s5); border-bottom: 1px solid var(--line); background: var(--bg-1); }
.topbar .crumbs { display: flex; align-items: center; gap: var(--s2);
  font-size: var(--t-sm); color: var(--dim); }
.topbar .crumbs .sep { color: var(--faint); }
.topbar .spacer { margin-left: auto; }

.sidebar { grid-area: sidebar; overflow-y: auto; border-right: 1px solid var(--line);
  background: var(--bg-1); padding: var(--s3) 0; }
.nav-group { margin-bottom: var(--s4); }
.nav-group > .label { padding: var(--s2) var(--s5) var(--s1); display: block; }
.nav-item { display: flex; align-items: center; gap: 10px; margin: 1px var(--s3);
  padding: 7px 10px; border-radius: var(--r-sm); color: var(--fg-1);
  font-size: var(--t-sm); cursor: pointer; transition: background .12s, color .12s; }
.nav-item:hover { background: var(--panel-2); color: var(--fg); }
.nav-item.active { background: var(--accent-dim); color: var(--fg); font-weight: 500; }
.nav-item .k { color: var(--faint); margin-left: auto; font-size: var(--t-micro);
  font-family: var(--mono); }

.main { grid-area: main; overflow-y: auto; background: var(--bg);
  padding: var(--s5) var(--s6) var(--s8); }
.page-head { margin-bottom: var(--s5); }
.page-head .display { margin-bottom: 6px; }
.page-head .sub { color: var(--dim); font-size: var(--t-sm); max-width: 76ch; line-height: 1.5; }
.surface-tag { display: inline-flex; align-items: center; gap: 6px; font-size: var(--t-micro);
  letter-spacing: .06em; text-transform: uppercase; font-weight: 600; color: var(--dim);
  margin-bottom: var(--s2); }
.surface-tag .ic { width: 13px; height: 13px; color: var(--accent-br); }

/* ── 卡片 ─────────────────────────────────────────────────── */
.card { border: 1px solid var(--line); background: var(--panel); border-radius: var(--r);
  margin-bottom: var(--s4); overflow: hidden; }
.card > .card-head { display: flex; align-items: center; gap: 9px;
  padding: 11px var(--s4); border-bottom: 1px solid var(--line); }
.card-head .ic { color: var(--dim); width: 15px; height: 15px; }
.card-title { font-family: var(--sans); font-weight: 600; font-size: var(--t-sm); }
.card-meta { margin-left: auto; font-size: var(--t-micro); color: var(--dim);
  font-family: var(--mono); }
.card > .card-body { padding: var(--s4); }

.cells { display: grid; gap: var(--s3); }
.cells > * { min-width: 0; }

.rule { height: 1px; background: var(--line); border: 0; margin: var(--s4) 0; }
.stripe { height: 2px; background: var(--line); border-radius: 2px; }

/* ── 指标读数 ─────────────────────────────────────────────── */
.metric { padding: var(--s4); border: 1px solid var(--line); background: var(--panel);
  border-radius: var(--r); }
.metric .k { display: block; font-size: var(--t-meta); color: var(--dim); margin-bottom: 8px; }
.metric .num { font-family: var(--sans); font-weight: 650; font-size: var(--t-xl);
  letter-spacing: -.02em; line-height: 1.1; }
.metric .unit { font-family: var(--mono); font-size: var(--t-sm); color: var(--dim); margin-left: 5px; }
.metric .delta { display: inline-flex; align-items: center; gap: 3px; font-size: var(--t-meta);
  color: var(--green); margin-top: 8px; }
.metric .delta.down { color: var(--red-br); }

/* ── 小读数 stat ──────────────────────────────────────────── */
.stat { display: inline-flex; align-items: baseline; gap: 6px; padding: 4px 9px;
  border: 1px solid var(--line); background: var(--panel-2); border-radius: var(--r-sm);
  margin: 0 6px 6px 0; font-size: var(--t-sm); }
.stat .k { color: var(--dim); font-size: var(--t-meta); }
.stat .v { color: var(--fg); font-weight: 600; font-family: var(--mono); }

/* ── 徽章 / 状态 pill ─────────────────────────────────────── */
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px;
  border-radius: 999px; font-size: var(--t-micro); font-weight: 500;
  color: var(--fg-1); background: var(--panel-2); border: 1px solid var(--line-2); }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--dim); }
.badge--ok   { color: #4ad08a; background: var(--green-dim); border-color: transparent; }
.badge--ok::before   { background: var(--green); }
.badge--err  { color: var(--red-br); background: var(--red-dim); border-color: transparent; }
.badge--err::before  { background: var(--red); }
.badge--warn { color: var(--amber); background: var(--amber-dim); border-color: transparent; }
.badge--warn::before { background: var(--amber); }
.badge--idle { color: var(--dim); }
.badge--idle::before { background: var(--faint); }

.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px;
  border-radius: 999px; font-size: var(--t-micro); font-weight: 500;
  border: 1px solid var(--line-2); color: var(--fg-1); }
.pill--live { color: #4ad08a; background: var(--green-dim); border-color: transparent; }
.pill--live::before { content: ""; width: 7px; height: 7px; border-radius: 50%;
  background: var(--green); box-shadow: 0 0 0 3px var(--green-dim);
  animation: pulse 1.8s ease-in-out infinite; }
.pill--off { color: var(--dim); }
@keyframes pulse { 50% { opacity: .4; } }

/* ── 表单控件 ─────────────────────────────────────────────── */
.field { display: flex; flex-direction: column; gap: 5px; margin-bottom: var(--s3); }
.field > label, .row > label { font-size: var(--t-meta); color: var(--dim); font-weight: 500; }
.row { display: flex; flex-wrap: wrap; gap: var(--s2); align-items: center; margin-bottom: var(--s2); }
input, textarea, select {
  background: var(--bg-1); color: var(--fg); border: 1px solid var(--line-2);
  border-radius: var(--r-sm); padding: 8px 11px; font: var(--t-sm) var(--sans); outline: none;
  transition: border-color .12s, box-shadow .12s; width: auto; max-width: 100%; }
input::placeholder, textarea::placeholder { color: var(--faint); }
input:focus, textarea:focus, select:focus { border-color: var(--accent); box-shadow: var(--ring); }
.field input, .field select, .field textarea, textarea { width: 100%; }
textarea { min-height: 104px; resize: vertical; line-height: 1.55; font-family: var(--mono); }
label.check { flex-direction: row; align-items: center; gap: 7px; color: var(--fg-1); width: auto; }
label.check input { width: auto; }

/* ── 按钮 ─────────────────────────────────────────────────── */
/* 注：基样式用单类选择器（不写 button.btn），否则复合选择器特异性高于
   .btn--primary/.btn--danger 等单类修饰，导致 <button> 上的变体被基色盖掉。 */
.btn { appearance: none; display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  background: var(--panel-2); color: var(--fg); border: 1px solid var(--line-2);
  border-radius: var(--r-sm); padding: 8px 14px; font: 500 var(--t-sm) var(--sans);
  cursor: pointer; white-space: nowrap; transition: background .12s, border-color .12s, color .12s; }
.btn:hover { background: var(--panel-3); color: var(--fg); }
.btn:active { transform: translateY(.5px); }
.btn:disabled, .btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn--primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
.btn--primary:hover { background: var(--accent-br); border-color: var(--accent-br); color: var(--accent-ink); }
.btn--danger { background: transparent; color: var(--red-br); border-color: var(--line-2); }
.btn--danger:hover { background: var(--red-dim); border-color: var(--red); color: var(--red-br); }
.btn--ghost { background: transparent; border-color: transparent; color: var(--fg-1); }
.btn--ghost:hover { background: var(--panel-2); color: var(--fg); }
.btn--sm { padding: 5px 10px; font-size: var(--t-meta); }
.btn-row { display: flex; flex-wrap: wrap; gap: var(--s2); align-items: center; }

/* htmx 在途态 */
.htmx-request { opacity: .6; pointer-events: none; }

/* ── 数据表 ───────────────────────────────────────────────── */
.dt { width: 100%; border-collapse: collapse; font: var(--t-sm) var(--mono); }
.dt th, .dt td { padding: 9px 12px; text-align: left; border-bottom: 1px solid var(--line);
  max-width: 420px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dt th { color: var(--dim); font: 500 var(--t-meta) var(--sans); background: var(--panel-2); }
.dt th .ty { color: var(--faint); margin-left: 6px; font-family: var(--mono); font-weight: 400; }
.dt tbody tr { transition: background .1s; }
.dt tbody tr:hover td { background: var(--panel-2); }
.dt tbody tr:last-child td { border-bottom: 0; }
.dt td .null { color: var(--faint); font-style: italic; }
.scroll { max-height: 440px; overflow: auto; border: 1px solid var(--line); border-radius: var(--r); }
.scroll .dt th { position: sticky; top: 0; z-index: 1; }

/* ── 反馈：ok / err / toast / 空态 ─────────────────────────── */
.ok  { margin: var(--s2) 0; color: #4ad08a; font-size: var(--t-sm); display: flex;
  gap: 7px; align-items: center; }
.ok .ic { color: var(--green); width: 15px; height: 15px; flex: none; }
.err { display: flex; align-items: flex-start; gap: 8px; background: var(--red-dim);
  border: 1px solid rgba(229, 72, 77, .35); border-radius: var(--r-sm); color: #f2a9ab;
  padding: 9px 12px; font-size: var(--t-sm); margin: var(--s2) 0; }
.err .ic { color: var(--red-br); width: 15px; height: 15px; flex: none; margin-top: 1px; }
.empty { padding: var(--s8) var(--s4); text-align: center; color: var(--dim);
  border: 1px dashed var(--line-2); border-radius: var(--r); font-size: var(--t-sm); }
.empty .big { display: block; font-family: var(--sans); font-weight: 600; font-size: var(--t-md);
  color: var(--fg-1); margin-bottom: 6px; }

/* ── 代码 / 输出 ──────────────────────────────────────────── */
.code, .out { display: block; background: var(--bg-1); border: 1px solid var(--line);
  border-radius: var(--r-sm); padding: var(--s3); font: var(--t-sm)/1.55 var(--mono);
  white-space: pre-wrap; word-break: break-word; max-height: 380px; overflow: auto; color: var(--fg-1); }
.kbd { border: 1px solid var(--line-2); border-bottom-width: 2px; background: var(--panel-2);
  border-radius: 5px; padding: 1px 6px; font-size: var(--t-micro); color: var(--fg-1);
  font-family: var(--mono); }

/* ── 流式 feed 行（SSE tail）──────────────────────────────── */
.feed { max-height: 340px; overflow: auto; border: 1px solid var(--line); border-radius: var(--r);
  background: var(--bg-1); }
.feedline { padding: 6px 12px; border-bottom: 1px solid var(--line); display: flex; gap: 10px;
  font: var(--t-sm) var(--mono); }
.feedline:last-child { border-bottom: 0; }
.feedline .off { color: var(--red-br); flex: none; }
.feedline code { color: var(--fg-1); }

/* ── SVG 用量曲线 ─────────────────────────────────────────── */
.usage-chart { width: 100%; height: auto; display: block; }
.usage-chart .axis { stroke: var(--line); stroke-width: 1; }
.usage-chart .grid { stroke: var(--line); stroke-width: 1; stroke-dasharray: 2 5; opacity: .6; }
.usage-chart .area { fill: var(--accent); opacity: .1; }
.usage-chart .line { fill: none; stroke: var(--accent); stroke-width: 2;
  stroke-linejoin: round; stroke-linecap: round; }
.usage-chart .dot  { fill: var(--accent); }
.usage-chart .lbl  { fill: var(--dim); font: var(--t-micro) var(--sans); }
.spark { display: inline-block; vertical-align: middle; }
.spark .line { fill: none; stroke: var(--green); stroke-width: 1.75;
  stroke-linejoin: round; stroke-linecap: round; }

/* ── 架构活文档（SVG 画布 + 可点击节点 → 实现档案）──────────── */
#arch-canvas { border: 1px solid var(--line); border-radius: var(--r); background: var(--bg-1);
  height: 560px; overflow: hidden; cursor: grab; user-select: none; }
#arch-canvas:active { cursor: grabbing; }
#arch-canvas svg { width: 100%; height: 100%; display: block; }
#arch-stage:fullscreen { background: var(--bg); padding: 12px 16px;
  display: flex; flex-direction: column; }
#arch-stage:fullscreen #arch-canvas { flex: 1; height: auto; }
.arch-doc h4 { margin: 4px 0 2px; color: var(--fg); font-family: var(--sans);
  font-size: var(--t-md); font-weight: 600; letter-spacing: -.01em; }
.arch-doc h5 { margin: 14px 0 5px; color: var(--dim); font-size: var(--t-micro);
  text-transform: uppercase; letter-spacing: .07em; font-weight: 600; }
.arch-doc ul { margin: 0; padding-left: 18px; }
.arch-doc li { font-size: var(--t-sm); margin: 4px 0; color: var(--fg-1); }
.arch-doc p { margin: 0 0 4px; }
.arch-st { font-size: var(--t-sm); margin: 6px 0; display: flex; gap: 7px; align-items: baseline; }
.arch-st.done { color: #4ad08a; }
.arch-st.part { color: var(--amber); }
.arch-st.todo { color: var(--dim); }

/* ── 图标（Tabler 单线 sprite；圆头端点更友好，色随 currentColor）──── */
/* pointer-events:none ⇒ 点击图标字形透传到外层按钮/链接（避免命中内联 SVG
   导致 htmx 从 SVG 节点解析 hx-target 而 targetError）。 */
.ic { width: 1em; height: 1em; display: inline-block; vertical-align: -.14em; flex: none;
  stroke: currentColor; fill: none; stroke-width: 1.75; pointer-events: none;
  stroke-linecap: round; stroke-linejoin: round; }
.nav-item .ic { width: 16px; height: 16px; color: var(--dim); }
.nav-item:hover .ic { color: var(--fg-1); }
.nav-item.active .ic { color: var(--accent-br); }
.btn .ic { width: 15px; height: 15px; }
.crumbs .ic { color: var(--dim); }
.stat .ic, .metric .ic { color: var(--dim); width: 14px; height: 14px; }

/* ── 控制面 Console：项目磁贴 / 账号条 / 登录 / 连接信息 ────────── */
a.tile { display: block; color: var(--fg); transition: border-color .12s, transform .12s; }
a.tile:hover { border-color: var(--line-2); transform: translateY(-1px); }
a.tile:hover .card-title { color: var(--accent-br); }
.tile .card-body { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; }
.acct { display: flex; align-items: center; gap: 9px; }
.acct .ava { width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: var(--accent-ink);
  flex: none; display: flex; align-items: center; justify-content: center; font: 600 12px var(--sans); }
.acct .nm { font-size: var(--t-sm); }
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.login-card { width: 400px; max-width: 100%; border: 1px solid var(--line); background: var(--panel);
  border-radius: var(--r-lg); box-shadow: var(--shadow-lg); overflow: hidden; }
.login-card .head { padding: var(--s5) var(--s5) var(--s4); border-bottom: 1px solid var(--line); }
.login-card .body { padding: var(--s5); display: flex; flex-direction: column; gap: var(--s3); }
.btn--block { width: 100%; padding: 11px; }
.conn { display: grid; grid-template-columns: 120px 1fr; border: 1px solid var(--line);
  border-radius: var(--r-sm); overflow: hidden; font: var(--t-sm) var(--mono); }
.conn > div { background: var(--panel); padding: 9px 12px; border-bottom: 1px solid var(--line); }
.conn > div:nth-child(even) { border-left: 1px solid var(--line); }
.conn > div:nth-last-child(-n+2) { border-bottom: 0; }
.conn .kk { color: var(--dim); font-size: var(--t-meta); font-family: var(--sans); }

/* ── 网格布局工具 ─────────────────────────────────────────── */
.grid { display: grid; gap: var(--s4); }
.g-2 { grid-template-columns: repeat(2, 1fr); }
.g-3 { grid-template-columns: repeat(3, 1fr); }
.g-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 980px) {
  .g-2, .g-3, .g-4 { grid-template-columns: 1fr; }
  .app { grid-template-columns: 1fr; grid-template-areas: "brand" "topbar" "main"; }
  .sidebar { display: none; }
  .main { padding: var(--s4) var(--s4) var(--s8); }
}

/* ============================================================================
   组件展示（showcase）：Supabase 式 bento 视觉卡片。
   卡壳统一，视觉=各自独立的内联 SVG（viz 工具类跟随令牌；绿强调克制单点）。
   ========================================================================== */

.showcase { max-width: 1240px; margin: 0 auto; padding: 56px 24px 96px; }
.showcase-top { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.showcase-top .mark { width: 26px; height: 26px; border-radius: 7px; background: var(--accent);
  color: var(--accent-ink); display: flex; align-items: center; justify-content: center;
  font: 800 14px var(--sans); }
.showcase h1 { font-size: 30px; font-weight: 680; letter-spacing: -.025em; margin-bottom: 8px; }
.showcase .lede { color: var(--dim); font-size: 15px; max-width: 64ch; line-height: 1.6;
  margin-bottom: 40px; }
.showcase .lede b { color: var(--fg); font-weight: 600; }

.bento { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; grid-auto-flow: row dense; }
.fcard { grid-column: span 2; min-height: 326px; display: flex; flex-direction: column;
  border: 1px solid var(--line); background: var(--panel); border-radius: var(--r-lg);
  overflow: hidden; position: relative; transition: border-color .18s, transform .18s; }
.fcard:hover { border-color: var(--line-2); transform: translateY(-2px); }
.fcard.w3 { grid-column: span 3; }
.fcard.w6 { grid-column: span 6; }
.fc-body { padding: 26px 26px 14px; }
.fc-title { display: flex; align-items: center; gap: 9px; font-family: var(--sans);
  font-weight: 600; font-size: var(--t-md); margin-bottom: 12px; }
.fc-title .ic { width: 17px; height: 17px; color: var(--accent); }
.fc-desc { font-size: var(--t-base); line-height: 1.55; margin: 0; color: var(--dim); }
.fc-desc b { color: var(--fg); font-weight: 600; }
.fcard-viz { flex: 1; position: relative; min-height: 150px; overflow: hidden; }
.fcard-viz svg { width: 100%; height: 100%; display: block; }
/* viz 背景纹理（可选挂在 .fcard-viz 上）*/
.fcard-viz.grid::before { content: ""; position: absolute; inset: 0; opacity: .5;
  background-image: linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: 24px 24px;
  -webkit-mask-image: radial-gradient(120% 90% at 50% 100%, #000 30%, transparent 78%);
  mask-image: radial-gradient(120% 90% at 50% 100%, #000 30%, transparent 78%); }
.fcard-viz.dots::before { content: ""; position: absolute; inset: 0; opacity: .6;
  background-image: radial-gradient(var(--line-2) 1px, transparent 1.4px); background-size: 18px 18px;
  -webkit-mask-image: radial-gradient(110% 90% at 50% 100%, #000 25%, transparent 80%);
  mask-image: radial-gradient(110% 90% at 50% 100%, #000 25%, transparent 80%); }
/* 底部渐隐，让视觉融入卡片（Supabase 手法）*/
.fcard-viz::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, transparent 60%, var(--panel) 100%); }

/* viz 画笔工具类（跟随令牌）。stroke 类只管描边、fill 类只管填充，互不冲突；
   纯描边图形另加 .nf 关填充。 */
.nf     { fill: none; }
.v-bg   { fill: var(--bg-1); }
.v-pan  { fill: var(--panel-2); }
.v-pan2 { fill: var(--panel-3); }
.v-line { stroke: var(--line); }
.v-line2{ stroke: var(--line-2); }
.v-dim  { stroke: var(--dim); }
.v-dimf { fill: var(--dim); }
.v-faint{ fill: var(--faint); }
.v-fg   { stroke: var(--fg-1); }
.v-fgf  { fill: var(--fg-1); }
.v-acc  { stroke: var(--accent); }
.v-accf { fill: var(--accent); }
.v-accd { fill: var(--accent-dim); }
.v-ink  { stroke: var(--accent-ink); }
.v-inkf { fill: var(--accent-ink); }
.v-warn { stroke: var(--amber); }
.v-warnf{ fill: var(--amber); }
.v-redf { fill: var(--red); }
.v-txt  { fill: var(--dim); font: 11px var(--mono); }
.v-txa  { fill: var(--accent); font: 11px var(--mono); }
.v-tfg  { fill: var(--fg-1); font: 11px var(--mono); }

/* ── 克制动效（每卡一个无限循环 SVG/HTML 动画；GPU 友好：transform/opacity/dashoffset）── */
@keyframes v-flow   { to { stroke-dashoffset: -240; } }
@keyframes v-pulse  { 0%, 100% { opacity: .25; } 50% { opacity: 1; } }
@keyframes v-float  { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }
@keyframes v-dash   { to { stroke-dashoffset: -120; } }
@keyframes fa-spin  { to { transform: rotate(360deg); } }
@keyframes fa-breathe { 0%, 100% { opacity: .55; } 50% { opacity: 1; } }
@keyframes fa-rise  { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
@keyframes fa-blink { 0%, 46% { opacity: 1; } 54%, 100% { opacity: 0; } }
@keyframes fa-draw  { 0% { stroke-dashoffset: 120; } 55% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: 0; } }
@keyframes fa-sweepy{ 0% { transform: translateY(-4px); opacity: 0; } 14% { opacity: .9; }
  86% { opacity: .9; } 100% { transform: translateY(132px); opacity: 0; } }
@keyframes fa-sweepx{ 0% { transform: translateX(0); opacity: 0; } 14% { opacity: .85; }
  86% { opacity: .85; } 100% { transform: translateX(248px); opacity: 0; } }
@keyframes fa-rowglow { 0%, 100% { opacity: .55; } 50% { opacity: 1; } }

.an-flow  { stroke-dasharray: 5 7; animation: v-flow 4.5s linear infinite; }
.an-pulse { animation: v-pulse 2.4s ease-in-out infinite; }
.an-float { animation: v-float 5s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.an-dash  { stroke-dasharray: 4 6; animation: v-dash 3s linear infinite; }
.fa-flow  { stroke-dasharray: 5 7; animation: v-flow 4s linear infinite; }
.fa-flow2 { stroke-dasharray: 4 6; animation: v-dash 2.6s linear infinite; }
.fa-pulse { animation: v-pulse 2.4s ease-in-out infinite; }
.fa-breathe { animation: fa-breathe 3.2s ease-in-out infinite; }
.fa-float { animation: v-float 5s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.fa-spin  { animation: fa-spin 46s linear infinite; transform-box: fill-box; transform-origin: center; }
.fa-spin-s{ animation: fa-spin 32s linear infinite; transform-box: fill-box; transform-origin: center; }
.fa-rise  { animation: fa-rise 2.2s ease-in-out infinite; transform-box: fill-box; }
.fa-blink { animation: fa-blink 1.1s steps(1, end) infinite; }
.fa-draw  { stroke-dasharray: 120; animation: fa-draw 3.4s ease-in-out infinite; }
.fa-sweepy{ animation: fa-sweepy 3.6s ease-in-out infinite; transform-box: fill-box; }
.fa-sweepx{ animation: fa-sweepx 3.6s ease-in-out infinite; transform-box: fill-box; }
.fa-rowglow { animation: fa-rowglow 2.4s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) {
  .an-flow, .an-pulse, .an-float, .an-dash,
  .fa-flow, .fa-flow2, .fa-pulse, .fa-breathe, .fa-float, .fa-spin, .fa-spin-s,
  .fa-rise, .fa-blink, .fa-draw, .fa-sweepy, .fa-sweepx, .fa-rowglow { animation: none; }
}

@media (max-width: 1100px) {
  .bento { grid-template-columns: repeat(4, 1fr); }
  .fcard, .fcard.w3 { grid-column: span 2; }
  .fcard.w6 { grid-column: span 4; }
}
@media (max-width: 680px) {
  .bento { grid-template-columns: 1fr; }
  .fcard, .fcard.w3, .fcard.w6 { grid-column: span 1; }
}

/* ============================================================================
   官网 landing（marketing）+ 语言切换器。公开页，双语。
   ========================================================================== */

.sitenav { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 20px;
  padding: 13px 28px; background: rgba(11, 11, 14, .72); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line); }
.sitebrand { display: flex; align-items: center; gap: 9px; }
.sitebrand .mark { width: 26px; height: 26px; border-radius: 7px; background: var(--accent);
  color: var(--accent-ink); display: flex; align-items: center; justify-content: center;
  font: 800 14px var(--sans); }
.sitebrand .name { font-weight: 650; font-size: 16px; letter-spacing: -.01em; }
.sitebrand .name i { color: var(--accent-br); font-style: normal; }
.sitelinks { display: flex; gap: 18px; margin-left: 8px; }
.sitelinks a { color: var(--dim); font-size: 14px; }
.sitelinks a:hover { color: var(--fg); }
.siteright { margin-left: auto; display: flex; align-items: center; gap: 12px; }

.langtoggle { display: inline-flex; align-items: center; gap: 2px; border: 1px solid var(--line-2);
  border-radius: 999px; padding: 2px; }
.langtoggle a { font-size: 12px; color: var(--dim); padding: 3px 10px; border-radius: 999px; line-height: 1.6; }
.langtoggle a.on { background: var(--accent-dim); color: var(--accent-br); }
.langtoggle a:not(.on):hover { color: var(--fg); }

.hero { max-width: 1240px; margin: 0 auto; padding: 88px 24px 36px; text-align: center; }
.hero-eyebrow { display: inline-block; font-size: 13px; color: var(--accent-br); font-weight: 600;
  margin-bottom: 18px; padding: 5px 14px; border: 1px solid transparent; border-radius: 999px;
  background: var(--accent-dim); }
.hero-title { font-size: clamp(34px, 5.5vw, 58px); font-weight: 680; letter-spacing: -.03em;
  line-height: 1.06; max-width: 20ch; margin: 0 auto 20px; }
.hero-sub { font-size: clamp(16px, 2vw, 20px); color: var(--dim); line-height: 1.6;
  max-width: 62ch; margin: 0 auto 30px; }
.hero-cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-bottom: 32px; }
.hero-cta .btn { padding: 11px 20px; font-size: 14px; }
.hero-run { display: inline-flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: center;
  border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); padding: 10px 16px; font-size: 13px; }
.hero-run code { font-family: var(--mono); color: var(--fg-1); }

.sitefooter { max-width: 1240px; margin: 40px auto 0; padding: 28px 24px 56px;
  border-top: 1px solid var(--line); display: flex; align-items: center; gap: 16px; flex-wrap: wrap; font-size: 13px; }
.sitefooter .sf-brand { display: flex; align-items: center; gap: 8px; color: var(--fg-1); }
.sitefooter .sf-brand .mark { width: 20px; height: 20px; border-radius: 6px; background: var(--accent);
  color: var(--accent-ink); display: flex; align-items: center; justify-content: center; font: 800 11px var(--sans); }
.sitefooter .langtoggle { margin-left: auto; }
@media (max-width: 680px) {
  .sitelinks { display: none; }
  .hero { padding-top: 52px; }
}

/* ── 快速上手文档页（公开 · 单列可读 · 复用 .card / pre.code）──────── */
.docs { max-width: 860px; margin: 0 auto; padding: 8px 24px 56px; display: flex; flex-direction: column; gap: 18px; }
.docs .card-body p { color: var(--dim); font-size: 14px; line-height: 1.6; margin: 0 0 12px; }
.docs .card-body p:last-child { margin-bottom: 0; }
.docs .card-body a { color: var(--accent-br); text-decoration: none; }
.docs .card-body a:hover { text-decoration: underline; }
.docs .card-body code { font-family: var(--mono); font-size: 12.5px; color: var(--fg-1);
  background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 1px 5px; }
.docs .card-body pre.code { margin: 4px 0 0; }
.docs-note { color: var(--faint); font-size: 13px; margin-top: 10px; }

/* ── API 参考（端点行：方法徽章 + 路径 + 说明 + 错误码片）──────────── */
.api-ep { padding: 13px 0; border-top: 1px solid var(--line); }
.api-ep:first-child { border-top: none; padding-top: 0; }
.api-sig { display: flex; align-items: baseline; gap: 9px; flex-wrap: wrap; }
.api-m { font: 600 11px var(--mono); letter-spacing: .03em; padding: 2px 7px; border-radius: var(--r-sm);
  background: var(--panel-2); border: 1px solid var(--line); flex: none; }
.api-m--get { color: var(--blue); } .api-m--post { color: var(--green); }
.api-m--put { color: var(--amber); } .api-m--delete { color: var(--red); }
.api-path { font-family: var(--mono); font-size: 13px; color: var(--fg); }
.api-ep p { color: var(--dim); font-size: 13px; line-height: 1.55; margin: 7px 0 0; }
.api-errs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.api-err { font: 500 10.5px var(--mono); color: var(--dim); background: var(--panel-2);
  border: 1px solid var(--line); border-radius: 999px; padding: 1px 8px; }

/* ============================================================================
   交互组件：开关 / 自定义下拉 / 模态 / 抽屉 / 浮动通知 / 内联提示。
   行为在 vendored btelo-ui.js（纯开合）；外观全在此处（令牌单一事实源）。
   ========================================================================== */

/* ── 开关 switch（纯 CSS，复选框语义）─────────────────────────── */
.switch { display: inline-flex; align-items: center; gap: 9px; cursor: pointer; user-select: none; }
.switch > input { position: absolute; width: 1px; height: 1px; opacity: 0; margin: 0; }
.switch .track { position: relative; flex: none; width: 38px; height: 22px; border-radius: 999px;
  background: var(--line-2); border: 1px solid var(--line-2);
  transition: background .15s, border-color .15s; }
.switch .track::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px;
  border-radius: 50%; background: var(--fg-1); box-shadow: var(--shadow); transition: transform .15s, background .15s; }
.switch > input:checked + .track { background: var(--accent); border-color: var(--accent); }
.switch > input:checked + .track::after { transform: translateX(16px); background: var(--accent-ink); }
.switch > input:focus-visible + .track { box-shadow: var(--ring); }
.switch > input:disabled + .track { opacity: .5; cursor: not-allowed; }
.switch .lbl { font-size: var(--t-sm); color: var(--fg-1); }

/* ── 自定义下拉 select ───────────────────────────────────────── */
.sel { position: relative; display: inline-block; }
.sel-btn { display: inline-flex; align-items: center; justify-content: space-between; gap: 8px;
  min-width: 168px; width: 100%; background: var(--bg-1); color: var(--fg); border: 1px solid var(--line-2);
  border-radius: var(--r-sm); padding: 8px 11px; font: var(--t-sm) var(--sans); cursor: pointer;
  transition: border-color .12s, box-shadow .12s; }
.sel-btn:hover { border-color: #3d3d45; }
.sel[data-open] .sel-btn, .sel-btn:focus-visible { border-color: var(--accent); box-shadow: var(--ring); outline: none; }
.sel-btn .ic { color: var(--dim); width: 15px; height: 15px; transition: transform .15s; }
.sel[data-open] .sel-btn .ic { transform: rotate(180deg); }
.sel-val { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* 视口定位（JS 锚到按钮），逃逸卡片 / 浮层 overflow 裁剪 + 浮在 dialog 之上。 */
.sel-menu { position: fixed; z-index: 300; min-width: 168px;
  background: var(--panel-2); border: 1px solid var(--line-2); border-radius: var(--r-sm);
  box-shadow: var(--shadow-lg); padding: 4px; max-height: 288px; overflow: auto;
  animation: sel-in .12s ease; }
.sel-menu[hidden] { display: none; }
@keyframes sel-in { from { opacity: 0; transform: translateY(-4px); } }
.sel-opt { display: flex; align-items: center; gap: 8px; padding: 7px 9px; border-radius: var(--r-sm);
  font-size: var(--t-sm); color: var(--fg-1); cursor: pointer; white-space: nowrap; }
.sel-opt:hover { background: var(--panel-3); color: var(--fg); }
.sel-opt[aria-selected="true"] { color: var(--accent-br); font-weight: 500; }
.sel-opt[aria-selected="true"]::after { content: "✓"; margin-left: auto; padding-left: 16px; color: var(--accent-br); }

/* ── 模态 modal / 右侧抽屉 drawer（原生 <dialog>）──────────────── */
dialog.modal, dialog.drawer { padding: 0; border: 0; background: transparent; color: var(--fg);
  max-width: 100vw; max-height: 100dvh; }
dialog.modal { margin: auto; }
dialog.drawer { margin: 0 0 0 auto; height: 100dvh; }
dialog.modal::backdrop, dialog.drawer::backdrop { background: rgba(4, 5, 8, .62); }
dialog.modal[open]::backdrop, dialog.drawer[open]::backdrop { animation: ovl-fade .2s ease; }
@keyframes ovl-fade { from { opacity: 0; } }

.modal-card { display: flex; flex-direction: column; width: 480px; max-width: calc(100vw - 32px);
  max-height: calc(100dvh - 64px); background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--r-lg); box-shadow: var(--shadow-lg); overflow: hidden; }
dialog.modal[open] .modal-card { animation: modal-in .16s ease; }
@keyframes modal-in { from { opacity: 0; transform: translateY(8px) scale(.985); } }

.drawer-card { display: flex; flex-direction: column; width: 420px; max-width: calc(100vw - 40px);
  height: 100dvh; background: var(--panel); border-left: 1px solid var(--line); box-shadow: var(--shadow-lg); }
dialog.drawer[open] .drawer-card { animation: drawer-in .22s cubic-bezier(.32, .72, 0, 1); }
@keyframes drawer-in { from { transform: translateX(100%); } }

.modal-head, .drawer-head { display: flex; align-items: center; gap: 9px; padding: 13px var(--s4);
  border-bottom: 1px solid var(--line); }
.modal-head .ic, .drawer-head .ic { color: var(--dim); width: 16px; height: 16px; }
.modal-head .t, .drawer-head .t { font-family: var(--sans); font-weight: 600; font-size: var(--t-md); }
.modal-head .x, .drawer-head .x { margin-left: auto; }
.modal-body, .drawer-body { padding: var(--s4); overflow: auto; }
.drawer-body { flex: 1; }
.modal-foot { display: flex; justify-content: flex-end; align-items: center; gap: var(--s2);
  padding: 12px var(--s4); border-top: 1px solid var(--line); }

/* ── 浮动通知 toast（右下角栈）───────────────────────────────── */
.toast-host { position: fixed; right: var(--s5); bottom: var(--s5); z-index: 200; display: flex;
  flex-direction: column; align-items: flex-end; gap: 10px; max-width: 380px; pointer-events: none; }
.toast { pointer-events: auto; display: flex; align-items: flex-start; gap: 10px; min-width: 244px;
  max-width: 380px; border: 1px solid var(--line-2); background: var(--panel-2); color: var(--fg);
  border-radius: var(--r); padding: 11px 13px; font-size: var(--t-sm); box-shadow: var(--shadow-lg);
  animation: toast-in .2s cubic-bezier(.32, .72, 0, 1); }
.toast.leaving { animation: toast-out .18s ease forwards; }
@keyframes toast-in { from { opacity: 0; transform: translateX(14px); } }
@keyframes toast-out { to { opacity: 0; transform: translateX(14px); } }
.toast .ic { width: 16px; height: 16px; flex: none; margin-top: 1px; color: var(--dim); }
.toast .t-msg { flex: 1; min-width: 0; line-height: 1.45; }
.toast .x { margin-left: 2px; padding: 3px; }
.toast--ok .ic   { color: var(--green); }
.toast--err .ic  { color: var(--red-br); }
.toast--warn .ic { color: var(--amber); }
.toast--info .ic { color: var(--blue); }

/* ── 内联提示 alert（四色，可关闭）──────────────────────────── */
.alert { display: flex; align-items: flex-start; gap: 10px; padding: 11px 13px; margin: var(--s2) 0;
  border: 1px solid var(--line-2); background: var(--panel-2); color: var(--fg-1);
  border-radius: var(--r-sm); font-size: var(--t-sm); }
.alert .ic { width: 16px; height: 16px; flex: none; margin-top: 1px; color: var(--dim); }
.alert .a-body { flex: 1; min-width: 0; line-height: 1.5; }
.alert .a-title { font-weight: 600; color: var(--fg); margin-bottom: 1px; }
.alert .x { margin: -3px -4px -3px 4px; padding: 3px; }
.alert--info { border-color: transparent; background: var(--blue-dim); color: #b3c8f7; }
.alert--info .ic, .alert--info .a-title { color: var(--blue); }
.alert--ok { border-color: transparent; background: var(--green-dim); color: #6fd3a0; }
.alert--ok .ic, .alert--ok .a-title { color: var(--green); }
.alert--warn { border-color: transparent; background: var(--amber-dim); color: var(--amber); }
.alert--warn .ic, .alert--warn .a-title { color: var(--amber); }
.alert--err { border-color: rgba(229, 72, 77, .35); background: var(--red-dim); color: #f2a9ab; }
.alert--err .ic, .alert--err .a-title { color: var(--red-br); }

/* ============================================================================
   官网 landing v1（marketing · emergent.sh 式分屏）。结构忠实复刻 emergent，
   品牌用 BteloDB 令牌（绿 --accent，非 #81FF89）。挂 console /landing-v1，不动 /。
   方法论见 design-ref/emergent/SPEC.md。全部 .lv1-* 前缀,样式单一事实源在此。
   ========================================================================== */

/* ── 顶栏（覆在 hero 上）─────────────────────────────────────── */
.lv1-nav { position: absolute; top: 0; left: 0; right: 0; z-index: 20;
  display: flex; align-items: center; gap: 24px; padding: 20px 28px; }
.lv1-brand { display: flex; align-items: center; gap: 9px; }
.lv1-orb-sm { width: 18px; height: 18px; border-radius: 50%; flex: none;
  background: radial-gradient(circle at 35% 28%, #fff, #9aa0a6 30%, #0d0e10 80%); }
.lv1-brand-name { font-weight: 700; font-size: 18px; letter-spacing: -.02em; color: var(--fg); }
.lv1-brand-name i { color: var(--accent); font-style: normal; }
.lv1-navlinks { display: flex; gap: 22px; }
.lv1-navlinks a { color: var(--fg-1); font-size: 14px; }
.lv1-navlinks a:hover { color: var(--fg); }
.lv1-navright { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.lv1-lang { display: inline-flex; align-items: center; gap: 2px; padding: 2px;
  border: 1px solid var(--line-2); border-radius: 999px;
  background: rgba(20, 22, 28, .5); backdrop-filter: blur(6px); }
.lv1-lang a { font-size: 12px; color: var(--fg-1); padding: 3px 10px; border-radius: 999px; line-height: 1.6; }
.lv1-lang a.on { background: var(--accent-dim); color: var(--accent-br); }
.lv1-lang a:not(.on):hover { color: var(--fg); }

/* ── 按钮（药丸；hero 用 --lg 全圆角 56px）──────────────────── */
.lv1-btn { appearance: none; display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  border: 0; border-radius: 999px; font: 500 14px var(--sans); cursor: pointer; text-decoration: none;
  white-space: nowrap; padding: 0 18px; height: 40px;
  transition: filter .12s, background .12s, color .12s; }
.lv1-btn:hover { filter: brightness(1.06); }
.lv1-btn .ic { width: 18px; height: 18px; }
.lv1-btn--sm { height: 34px; font-size: 13px; padding: 0 14px; }
.lv1-btn--lg { height: 56px; font-size: 15px; padding: 0 22px; width: 100%; }
.lv1-btn--primary { background: var(--accent); color: var(--accent-ink); font-weight: 600; }
.lv1-btn--dark { background: var(--panel-2); color: var(--fg); }
.lv1-btn--ghost { background: transparent; color: var(--fg-1); }
.lv1-btn--ghost:hover { color: var(--fg); filter: none; }
.lv1-btn--block { width: 100%; }

/* ── Hero：分屏 ───────────────────────────────────────────── */
.lv1-hero { display: grid; grid-template-columns: 1fr 1fr; min-height: 100vh; background: var(--bg); }
.lv1-left { position: relative; display: flex; align-items: center; justify-content: center;
  overflow: hidden; padding: 96px 24px 56px; }
.lv1-rain { position: absolute; inset: 0; z-index: 0; opacity: .5; pointer-events: none;
  background-image: radial-gradient(var(--line-2) 1px, transparent 1.4px); background-size: 22px 22px;
  -webkit-mask-image: radial-gradient(120% 120% at 35% 40%, #000 18%, transparent 74%);
  mask-image: radial-gradient(120% 120% at 35% 40%, #000 18%, transparent 74%); }
.lv1-auth { position: relative; z-index: 2; width: min(440px, 100%);
  display: flex; flex-direction: column; align-items: center; text-align: center; }
.lv1-orb { width: 74px; height: 74px; border-radius: 50%; margin-bottom: 30px;
  background: radial-gradient(circle at 35% 25%, #f4f6f8 0%, #aeb4ba 7%, #3a3d42 30%, #101113 60%, #050506 100%);
  box-shadow: 0 16px 44px rgba(0, 0, 0, .7), inset 0 -7px 16px rgba(0, 0, 0, .85), inset 0 4px 8px rgba(255, 255, 255, .18);
  animation: lv1-spin 9s linear infinite; }
@keyframes lv1-spin { to { transform: rotate(360deg); } }
.lv1-h1 { font-family: var(--sans); font-weight: 680; font-size: clamp(30px, 3vw, 40px);
  line-height: 1.12; letter-spacing: -.03em; margin: 0 0 30px; color: var(--fg); }
.lv1-grad { background: linear-gradient(90deg, var(--fg) 0%, var(--accent) 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent; }
.lv1-btns { display: flex; flex-direction: column; gap: 12px; width: min(340px, 100%); }
.lv1-iconrow { display: flex; gap: 12px; }
.lv1-iconrow .lv1-btn--lg { flex: 1; width: auto; padding: 0; }
.lv1-run { justify-content: flex-start; }
.lv1-run-code { font-family: var(--mono); font-size: 13px; color: var(--fg-1); }
.lv1-legal { margin-top: 22px; color: var(--faint); font-size: 12px; line-height: 1.5; }

/* ── Hero 右：蓝色展示卡 + 设备占位 + 轮播点 ─────────────────── */
.lv1-right { position: relative; padding: 16px 16px 16px 0; }
.lv1-show { position: relative; height: 100%; min-height: 560px; border-radius: 22px 0 0 22px; overflow: hidden;
  background: radial-gradient(120% 90% at 70% 6%, rgba(255, 255, 255, .55), transparent 55%),
    linear-gradient(165deg, #cfe8ff 0%, #9fcdf2 38%, #6ea9da 72%, #4f8fc9 100%); }
.lv1-badge { position: absolute; top: 18px; left: 18px; z-index: 4; display: inline-flex; align-items: center; gap: 7px;
  background: rgba(20, 22, 28, .55); backdrop-filter: blur(6px); color: #fff; border: 1px solid rgba(255, 255, 255, .18);
  padding: 7px 11px; border-radius: 9px; font-size: 12.5px; font-weight: 500; }
.lv1-badge-y { display: grid; place-items: center; width: 22px; height: 18px; border-radius: 4px;
  background: #f26522; color: #fff; font-weight: 700; font-size: 10px; }
.lv1-show-head { position: absolute; top: 9%; left: 0; right: 0; z-index: 3; text-align: center; color: #0f2a44; padding: 0 24px; }
.lv1-show-big { font-family: var(--sans); font-weight: 700; font-size: clamp(28px, 2.6vw, 38px); letter-spacing: -.02em; }
.lv1-show-sub { margin-top: 8px; font-size: 15px; font-weight: 500; color: #16456e; line-height: 1.4; }
.lv1-stage { position: absolute; left: 0; right: 0; bottom: 56px; top: 36%;
  display: flex; align-items: center; justify-content: center; }
.lv1-browser { width: 74%; height: 86%; background: #0e1116; border-radius: 13px; overflow: hidden;
  box-shadow: 0 30px 70px rgba(10, 40, 70, .4); border: 1px solid rgba(255, 255, 255, .18); }
.lv1-browser-bar { height: 30px; background: #1b2027; display: flex; align-items: center; gap: 6px; padding: 0 12px; }
.lv1-browser-bar i { width: 9px; height: 9px; border-radius: 50%; background: #3a424c; flex: none; }
.lv1-browser-url { flex: 1; height: 15px; margin-left: 10px; border-radius: 8px; background: #11161c; }
.lv1-browser-body { display: grid; place-items: center; height: calc(100% - 30px);
  color: #5b6470; font-size: 13px; padding: 16px; text-align: center; }
.lv1-phone { position: absolute; left: 9%; bottom: 0; width: 140px; height: 280px; background: #0e1116;
  border-radius: 26px; border: 5px solid #05070a; box-shadow: 0 24px 50px rgba(10, 40, 70, .45); }
.lv1-phone-notch { width: 52px; height: 16px; background: #05070a; border-radius: 0 0 12px 12px; margin: 0 auto; }
.lv1-dots { position: absolute; bottom: 18px; left: 0; right: 0; z-index: 4;
  display: flex; align-items: center; justify-content: center; gap: 16px; }
.lv1-dots-nav { width: 34px; height: 34px; border-radius: 50%; background: rgba(255, 255, 255, .6);
  display: grid; place-items: center; color: #0f2a44; cursor: pointer; }
.lv1-dots-nav .ic { width: 16px; height: 16px; }
.lv1-dots-nav:first-child .ic { transform: rotate(180deg); }
.lv1-pips { display: flex; gap: 6px; }
.lv1-pips i { width: 7px; height: 7px; border-radius: 50%; background: rgba(15, 42, 68, .3); }
.lv1-pips i.on { width: 20px; border-radius: 4px; background: rgba(15, 42, 68, .7); }

/* ── 通用 section 容器 + 居中标题 ───────────────────────────── */
.lv1-section { max-width: 1200px; margin: 0 auto; padding: 96px 24px; }
.lv1-sec-head { text-align: center; max-width: 680px; margin: 0 auto 56px; }
.lv1-h2 { font-family: var(--sans); font-weight: 680; font-size: clamp(28px, 3.4vw, 40px);
  letter-spacing: -.03em; line-height: 1.1; }
.lv1-lede { margin-top: 14px; color: var(--dim); font-size: 17px; line-height: 1.6; }
.lv1-eyebrow { display: inline-block; color: var(--accent-br); font-size: 13px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .08em; margin-bottom: 12px; }

/* ── 能力卡（三卡）────────────────────────────────────────── */
.lv1-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.lv1-card { border: 1px solid var(--line); background: var(--panel); border-radius: var(--r-lg);
  padding: 28px; transition: border-color .18s, transform .18s; }
.lv1-card:hover { border-color: var(--line-2); transform: translateY(-2px); }
.lv1-card-ic { width: 42px; height: 42px; border-radius: 11px; background: var(--accent-dim);
  color: var(--accent); display: grid; place-items: center; margin-bottom: 16px; }
.lv1-card-ic .ic { width: 20px; height: 20px; }
.lv1-card-title { font-size: 18px; font-weight: 600; margin: 0 0 8px; }
.lv1-card-desc { color: var(--dim); font-size: 14px; line-height: 1.6; margin: 0; }

/* ── 功能手风琴（纯 CSS radio；:checked 同步展开文本 + 右侧媒体）── */
.lv1-feat { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.lv1-feat-radio { position: absolute; opacity: 0; pointer-events: none; }
.lv1-feat-item { border-top: 1px solid var(--line); padding: 18px 0; }
.lv1-feat-item:first-child { border-top: 0; }
.lv1-feat-head { display: flex; align-items: center; gap: 11px; cursor: pointer;
  font-family: var(--sans); font-weight: 600; font-size: 18px; color: var(--dim); transition: color .15s; }
.lv1-feat-head .ic { width: 18px; height: 18px; }
.lv1-feat-desc { max-height: 0; overflow: hidden; opacity: 0; margin: 0;
  color: var(--dim); font-size: 14px; line-height: 1.6;
  transition: max-height .3s ease, opacity .3s ease, margin .3s ease; }
.lv1-feat-media { position: relative; min-height: 360px; border-radius: var(--r-lg); overflow: hidden;
  background: radial-gradient(120% 90% at 70% 8%, rgba(255, 255, 255, .5), transparent 55%),
    linear-gradient(165deg, #cfe8ff 0%, #9fcdf2 42%, #6ea9da 78%, #4f8fc9 100%); }
.lv1-feat-pane { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  padding: 30px; opacity: 0; transition: opacity .35s ease; }
.lv1-feat-pane .lv1-browser { width: 84%; height: 76%; }
/* 同步：每个 radio 选中 → 对应项高亮+展开,对应媒体面板淡入 */
#lv1f1:checked ~ .lv1-feat-text .lv1f1-item .lv1-feat-head,
#lv1f2:checked ~ .lv1-feat-text .lv1f2-item .lv1-feat-head,
#lv1f3:checked ~ .lv1-feat-text .lv1f3-item .lv1-feat-head { color: var(--accent); }
#lv1f1:checked ~ .lv1-feat-text .lv1f1-item .lv1-feat-desc,
#lv1f2:checked ~ .lv1-feat-text .lv1f2-item .lv1-feat-desc,
#lv1f3:checked ~ .lv1-feat-text .lv1f3-item .lv1-feat-desc { max-height: 220px; opacity: 1; margin-top: 10px; }
#lv1f1:checked ~ .lv1-feat-media .lv1f1-pane,
#lv1f2:checked ~ .lv1-feat-media .lv1f2-pane,
#lv1f3:checked ~ .lv1-feat-media .lv1f3-pane { opacity: 1; }

/* ── 定价（三档,中间高亮）──────────────────────────────────── */
.lv1-prices { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; align-items: start; }
.lv1-price { position: relative; display: flex; flex-direction: column; gap: 14px;
  border: 1px solid var(--line); background: var(--panel); border-radius: var(--r-lg); padding: 30px; }
.lv1-price--hot { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), var(--shadow-lg); }
.lv1-price-tag { position: absolute; top: -11px; left: 50%; transform: translateX(-50%);
  background: var(--accent); color: var(--accent-ink); font-size: 12px; font-weight: 600;
  padding: 3px 12px; border-radius: 999px; }
.lv1-price-name { font-size: 13px; font-weight: 600; color: var(--dim);
  text-transform: uppercase; letter-spacing: .05em; }
.lv1-price-num { font-family: var(--sans); font-size: 40px; font-weight: 700; letter-spacing: -.03em; line-height: 1; }
.lv1-price-per { font-size: 14px; color: var(--dim); font-weight: 500; margin-left: 4px; }
.lv1-price-blurb { color: var(--dim); font-size: 14px; margin: 0; }
.lv1-price-feats { list-style: none; padding: 0; margin: 6px 0 8px; display: flex; flex-direction: column; gap: 10px; }
.lv1-price-feats li { display: flex; gap: 9px; align-items: flex-start; font-size: 14px; color: var(--fg-1); }
.lv1-price-feats .ic { color: var(--accent); width: 16px; height: 16px; flex: none; margin-top: 2px; }
.lv1-price .lv1-btn { margin-top: auto; }

/* ── 视频区 ───────────────────────────────────────────────── */
.lv1-video { position: relative; max-width: 1000px; margin: 0 auto; aspect-ratio: 16 / 9;
  border-radius: var(--r-lg); border: 1px solid var(--line); overflow: hidden;
  background: linear-gradient(165deg, #11161c, #0b0b0e);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; }
.lv1-play { width: 72px; height: 72px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--accent); color: var(--accent-ink); display: grid; place-items: center;
  box-shadow: 0 10px 40px rgba(62, 207, 142, .4); }
.lv1-play .ic { width: 28px; height: 28px; }
.lv1-video-cap { color: var(--dim); font-size: 14px; }

/* ── 终页 CTA 带 ──────────────────────────────────────────── */
.lv1-finalcta { max-width: 760px; margin: 0 auto; padding: 80px 24px;
  text-align: center; display: flex; flex-direction: column; align-items: center; gap: 18px; }
.lv1-finalcta .lv1-lede { margin-top: 0; }

/* ── 多列页脚 ─────────────────────────────────────────────── */
.lv1-footer { border-top: 1px solid var(--line); background: var(--bg-1); }
.lv1-foot-grid { max-width: 1200px; margin: 0 auto; padding: 56px 24px 32px;
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; }
.lv1-foot-tag { color: var(--dim); font-size: 14px; margin: 12px 0 0; max-width: 30ch; }
.lv1-foot-col { display: flex; flex-direction: column; gap: 10px; }
.lv1-foot-head { font-size: 13px; font-weight: 600; color: var(--fg); margin-bottom: 4px; }
.lv1-foot-col a { color: var(--dim); font-size: 14px; }
.lv1-foot-col a:hover { color: var(--fg); }
.lv1-foot-bottom { max-width: 1200px; margin: 0 auto; padding: 20px 24px 40px; border-top: 1px solid var(--line);
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.lv1-dim { color: var(--dim); font-size: 13px; }
.lv1-foot-bottom .lv1-lang { margin-left: auto; }

@media (prefers-reduced-motion: reduce) { .lv1-orb { animation: none; } }
@media (max-width: 920px) {
  .lv1-hero { grid-template-columns: 1fr; }
  .lv1-right { display: none; }
  .lv1-cards, .lv1-prices { grid-template-columns: 1fr; }
  .lv1-feat { grid-template-columns: 1fr; gap: 28px; }
  .lv1-feat-media { min-height: 280px; }
  .lv1-foot-grid { grid-template-columns: 1fr 1fr; }
  .lv1-navlinks { display: none; }
}
@media (max-width: 560px) { .lv1-foot-grid { grid-template-columns: 1fr; } }

/* ============================================================================
   定价页（marketing · 公开 · 双语）。结构参考 WarpStream（成本计算器 + 两面拆分 +
   传统栈 TCO 对比），视觉用本设计系统令牌（绿 --accent 暗色，核心 .card/.btn）。
   挂 console /pricing；计算器走 HTMX（表单 change → /pricing/calc → 换 #pr-result）。
   全部 .pr-* 前缀，样式单一事实源在此。红色按铁律仅留给错误，故对比里不用红强调。
   ========================================================================== */

.pr-section { max-width: 1080px; margin: 0 auto; padding: 36px 24px 56px; }
.pr-sec-head { text-align: center; max-width: 680px; margin: 0 auto 32px; }
.pr-h2 { font-family: var(--sans); font-weight: 680; font-size: clamp(24px, 3vw, 32px);
  letter-spacing: -.02em; line-height: 1.15; }
.pr-lede { margin-top: 10px; color: var(--dim); font-size: var(--t-md); line-height: 1.6; }

/* ── 两面说明卡 ───────────────────────────────────────────────── */
.pr-plane-ic { width: 40px; height: 40px; border-radius: 10px; background: var(--accent-dim);
  color: var(--accent); display: grid; place-items: center; margin-bottom: 14px; }
.pr-plane-ic .ic { width: 19px; height: 19px; }
.pr-plane-t { font-size: var(--t-md); font-weight: 600; margin: 0 0 8px; }
.pr-plane-d { color: var(--dim); font-size: var(--t-sm); line-height: 1.6; margin: 0; }

/* ── 成本计算器：表单 | 结果 ──────────────────────────────────── */
.pr-calc { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; }
.pr-form { display: flex; flex-direction: column; gap: 20px; border: 1px solid var(--line);
  background: var(--panel); border-radius: var(--r-lg); padding: 24px; }
.pr-field { display: flex; flex-direction: column; gap: 9px; }
.pr-flabel { font-size: var(--t-meta); color: var(--dim); font-weight: 600;
  text-transform: uppercase; letter-spacing: .05em; }
.pr-form-note { display: flex; gap: 8px; align-items: flex-start; color: var(--dim);
  font-size: var(--t-meta); line-height: 1.5; margin: 4px 0 0; }
.pr-form-note .ic { color: var(--accent); margin-top: 2px; flex: none; }
.pr-disclaimer { color: var(--faint); font-size: var(--t-meta); line-height: 1.5;
  margin: 20px 0 0; max-width: 80ch; }

/* 分段选择（纯 CSS：隐藏 radio + 相邻 label 当按钮；:checked → 强调）。 */
.pr-seg { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.pr-seg-in { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.pr-seg-lb { padding: 8px 14px; border: 1px solid var(--line-2); border-radius: var(--r-sm);
  background: var(--bg-1); color: var(--fg-1); font-size: var(--t-sm); cursor: pointer;
  transition: border-color .12s, background .12s, color .12s; }
.pr-seg-lb:hover { border-color: #3d3d45; color: var(--fg); }
.pr-seg-in:checked + .pr-seg-lb { background: var(--accent-dim); border-color: var(--accent);
  color: var(--accent-br); font-weight: 600; }
.pr-seg-in:focus-visible + .pr-seg-lb { box-shadow: var(--ring); border-color: var(--accent); }

/* ── 结果面板 ─────────────────────────────────────────────────── */
.pr-result { border: 1px solid var(--line); background: var(--panel); border-radius: var(--r-lg);
  padding: 24px; display: flex; flex-direction: column; gap: 18px; }
.pr-headline { display: flex; align-items: flex-end; justify-content: space-between;
  gap: 12px; flex-wrap: wrap; }
.pr-tco { display: flex; flex-direction: column; gap: 2px; }
.pr-tco-lbl { font-size: var(--t-meta); color: var(--dim); }
.pr-tco-num { font-family: var(--sans); font-weight: 700; font-size: 38px;
  letter-spacing: -.03em; line-height: 1; color: var(--fg); }
.pr-save { display: inline-flex; align-items: center; background: var(--accent-dim);
  color: var(--accent-br); border-radius: 999px; padding: 4px 12px; font-size: var(--t-sm); font-weight: 600; }

.pr-bar { height: 10px; border-radius: 999px; background: var(--line); overflow: hidden; }
.pr-bar-fill { height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--accent-br)); }
.pr-barlabels { display: flex; justify-content: space-between; gap: 12px; font-size: var(--t-meta); }
.pr-bar-us { color: var(--accent-br); font-weight: 600; }

.pr-break { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.pr-col { border: 1px solid var(--line); border-radius: var(--r); background: var(--bg-1);
  padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.pr-col-h { display: flex; align-items: center; gap: 8px; font-size: var(--t-sm);
  font-weight: 600; color: var(--fg); }
.pr-col-h .ic { color: var(--accent); width: 16px; height: 16px; }
.pr-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.pr-row-l { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.pr-row-k { font-size: var(--t-sm); color: var(--fg-1); }
.pr-row-sub { font-size: var(--t-micro); color: var(--faint); font-family: var(--mono); }
.pr-row-v { font-family: var(--mono); font-size: var(--t-sm); color: var(--fg);
  font-weight: 600; flex: none; }
.pr-subtot { display: flex; justify-content: space-between; border-top: 1px solid var(--line);
  margin-top: 4px; padding-top: 10px; font-size: var(--t-sm); font-weight: 600; color: var(--fg); }
.pr-subtot span:last-child { font-family: var(--mono); color: var(--accent-br); }
.pr-note { font-size: var(--t-micro); color: var(--dim); line-height: 1.5; margin: 2px 0 0; }
.pr-col--note .pr-note { font-size: var(--t-sm); }

.pr-vs { border: 1px solid var(--line); border-radius: var(--r); background: var(--bg-1); padding: 16px; }
.pr-vs-h { font-size: var(--t-meta); color: var(--dim); text-transform: uppercase;
  letter-spacing: .05em; font-weight: 600; margin-bottom: 10px; }
.pr-vs-row { display: flex; justify-content: space-between; padding: 6px 0; font-size: var(--t-sm);
  color: var(--fg-1); border-bottom: 1px solid var(--line); }
.pr-vs-v { font-family: var(--mono); color: var(--dim); }
.pr-vs-tot { display: flex; justify-content: space-between; padding-top: 10px; margin-top: 4px;
  font-size: var(--t-sm); font-weight: 600; color: var(--fg); }
.pr-vs-tot-n { font-family: var(--mono); color: var(--fg); }

/* ── 套餐卡（优先推 BYOC：中间档高亮）───────────────────────────── */
.pr-plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; align-items: start; }
.pr-plan { position: relative; display: flex; flex-direction: column; gap: 12px;
  border: 1px solid var(--line); background: var(--panel); border-radius: var(--r-lg); padding: 28px; }
.pr-plan--hot { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), var(--shadow-lg); }
.pr-plan-tag { position: absolute; top: -11px; left: 50%; transform: translateX(-50%);
  background: var(--accent); color: var(--accent-ink); font-size: var(--t-micro); font-weight: 600;
  padding: 3px 12px; border-radius: 999px; }
.pr-plan-name { font-size: var(--t-sm); font-weight: 600; color: var(--dim);
  text-transform: uppercase; letter-spacing: .05em; }
.pr-plan-price { font-family: var(--sans); font-size: 30px; font-weight: 700;
  letter-spacing: -.02em; line-height: 1; color: var(--fg); }
.pr-plan-blurb { color: var(--dim); font-size: var(--t-sm); margin: 0; min-height: 40px; }
.pr-plan-feats { list-style: none; padding: 0; margin: 4px 0 8px; display: flex;
  flex-direction: column; gap: 9px; }
.pr-plan-feats li { display: flex; gap: 9px; align-items: flex-start; font-size: var(--t-sm);
  color: var(--fg-1); }
.pr-plan-feats .ic { color: var(--accent); width: 16px; height: 16px; flex: none; margin-top: 2px; }
.pr-plan .btn { margin-top: auto; }

/* ── FAQ（原生 details，无 JS）─────────────────────────────────── */
.pr-faq { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 10px; }
.pr-faq-item { border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); overflow: hidden; }
.pr-faq-q { display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 18px; cursor: pointer; font-weight: 600; font-size: var(--t-base);
  color: var(--fg); list-style: none; }
.pr-faq-q::-webkit-details-marker { display: none; }
.pr-faq-q .ic { color: var(--dim); transition: transform .18s; flex: none; }
.pr-faq-item[open] .pr-faq-q .ic { transform: rotate(180deg); }
.pr-faq-a { padding: 0 18px 16px; margin: 0; color: var(--dim); font-size: var(--t-sm); line-height: 1.6; }

@media (max-width: 880px) {
  .pr-calc, .pr-break, .pr-plans { grid-template-columns: 1fr; }
}
