/* TrueAPI C 端统一设计系统。
   色彩、排版、间距与开屏参考保持一致；数据页面沿用同一套底色、边框和
   强调色。模型滚动只使用 transform，并尊重 reduced motion。 */

:root {
  color-scheme: light;
  --paper: #f7f4ec;
  --card: rgba(255, 255, 255, .6);
  --ink: #14121f;
  --ink-2: #3f3a4c;
  --muted: #6f6b7a;
  --line: #e4e0d4;
  --line-strong: #d7d1c6;
  --accent: #5b47d6;
  --accent-strong: #4f3cc7;
  --accent-soft: rgba(91, 71, 214, .09);
  --ok: #16845b;
  --ok-bg: #e9f8f1;
  --warn: #8a5a12;
  --warn-bg: #f6eeda;
  --bad: #a63a2c;
  --bad-bg: #f7e8e4;
  --info: #5b47d6;
  --info-bg: #f0edf9;
  --neutral-bg: #eeebf2;
  --field-bg: rgba(255, 255, 255, .52);
  --radius: 12px;
  --radius-lg: 20px;
  --shadow: 0 1px 2px rgba(35, 28, 65, .035), 0 12px 32px rgba(35, 28, 65, .07);
  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", "Microsoft YaHei", sans-serif;
  --display: "Didot", "Bodoni 72", "Playfair Display", "Times New Roman", serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }

/* The landing reference is designed on a 1600 x 1000 canvas.  Scaling from
   whichever viewport axis is tighter preserves the composition on wide and
   short desktop screens instead of letting width alone inflate the type. */
html { font-size: min(1vw, 1.6vh); -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 14px/1.6 var(--font);
  font-feature-settings: "tnum" 1;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, p { margin: 0; }

.hidden { display: none !important; }

.muted { color: var(--muted); }
.small { font-size: 12px; }
.num { font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1; }
.mono { font-family: var(--mono); font-size: .92em; }

/* ---------- 字标与标题 ---------- */

.wordmark {
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .32em;
}

/* ---------- C 端开屏 ---------- */

.landing {
  --landing-blue: var(--accent);
  --landing-blue-strong: var(--accent-strong);
  --landing-ink: var(--ink);
  --landing-muted: var(--muted);
  --landing-line: var(--line);
  min-height: 100vh;
  background: #fff;
  color: var(--landing-ink);
  font-size: 16px;
}

.landing button, .landing a { font-family: var(--font); }
.landing a { color: inherit; text-decoration: none; }
.landing :focus-visible { outline-color: #77727f; }

.landing-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 30;
  height: 64px;
  background: rgba(255, 255, 255, .96);
  border-bottom: 1px solid transparent;
  backdrop-filter: blur(12px);
}
.landing-header.scrolled { border-bottom-color: #eef2f6; box-shadow: 0 8px 24px rgba(15, 23, 42, .04); }
.landing-header-inner {
  width: 100%;
  height: 64px;
  margin: 0 auto;
  padding: 0 40px;
  display: flex;
  align-items: center;
}
.landing-brand {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-right: auto;
  color: #121317;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -.04em;
  text-decoration: none;
}
.landing-brand-mark {
  position: relative;
  width: 28px;
  height: 16px;
  border-radius: 999px;
  background: var(--landing-blue);
}
.landing-brand-mark::after {
  content: "";
  position: absolute;
  right: 2px;
  top: 2px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fff;
}
.landing-header-actions { display: flex; align-items: center; gap: 32px; margin-left: auto; }
.landing-header-actions button {
  min-width: 0;
  border: 0;
  border-radius: 0;
  padding: 0;
  background: transparent;
  color: #111318;
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
}
.locale-picker {
  position: relative;
  min-width: 0;
  display: inline-grid;
  grid-template-columns: minmax(0, auto) .5rem;
  align-items: center;
  gap: .5rem;
  color: #111318;
  cursor: pointer;
}
.locale-picker::after {
  content: "";
  width: .4rem;
  height: .4rem;
  border-right: .1rem solid currentColor;
  border-bottom: .1rem solid currentColor;
  transform: translateY(-.12rem) rotate(45deg);
  pointer-events: none;
}
.locale-picker-value {
  min-width: 0;
  max-width: 10rem;
  overflow: hidden;
  font: inherit;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
  pointer-events: none;
}
.locale-picker select {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 0;
  padding: 0;
  appearance: none;
  background-color: transparent;
  color: transparent;
  opacity: 0;
  cursor: pointer;
}
.locale-picker:focus-within { outline: 2px solid #77727f; outline-offset: .25rem; }
.landing-header-actions button:hover { background: transparent; color: #111318; opacity: .68; }
.locale-picker:hover { color: var(--accent); }
.landing-login, .landing-signup { background: transparent; color: #111318; font-weight: 700; }
.landing-main { margin-top: 64px; background: #fff; }
.landing-hero {
  width: min(1536px, calc(100% - 80px));
  min-height: calc(100svh - 64px);
  margin: 0 auto;
  padding: 48px 0 56px;
  display: grid;
  grid-template-columns: minmax(0, .94fr) minmax(480px, 1.06fr);
  align-items: center;
  gap: clamp(56px, 5.5vw, 108px);
}
.landing-copy { min-width: 0; max-width: 700px; }
.landing-kicker {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 16px;
  border: 1px solid #c8e3ff;
  border-radius: 999px;
  background: #eff7ff;
  color: var(--landing-blue);
  font-size: 13px;
  letter-spacing: .13em;
}
.landing-copy h1 {
  max-width: none;
  margin-top: 0;
  font-size: clamp(54px, 4.4vw, 78px);
  font-weight: 520;
  line-height: 1.04;
  letter-spacing: -.055em;
  white-space: nowrap;
}
.landing-benefits { display: flex; align-items: center; gap: 16px; margin-top: 38px; color: #45474d; font-size: 21px; }
.landing-benefits i { width: 5px; height: 5px; border-radius: 50%; background: #c4c8ce; }
.landing-subtitle { margin-top: 30px; color: #45474d; font-size: 19px; }
.landing-endpoint {
  width: min(100%, 690px);
  min-height: 74px;
  margin-top: 28px;
  padding: 10px 12px 10px 24px;
  display: flex;
  align-items: center;
  gap: 14px;
  border: 1px solid var(--landing-line);
  border-radius: 20px;
  background: #fff;
}
.landing-online-dot { flex: 0 0 auto; width: 8px; height: 8px; border-radius: 50%; background: #24cf83; }
.landing-endpoint code { flex: 1; overflow: hidden; color: #4b5563; font: 16px/1.4 var(--mono); text-overflow: ellipsis; white-space: nowrap; }
.landing-endpoint button {
  flex: 0 0 auto;
  min-width: 102px;
  padding: 10px 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 1px solid #d9e0e7;
  border-radius: 999px;
  background: #fff;
  color: #41444a;
  font-size: 14px;
  cursor: pointer;
}
.landing-endpoint button:hover { border-color: #b9d9fb; color: var(--landing-blue); background: #f7fbff; }
.landing-endpoint svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.landing-cta-row { display: flex; align-items: center; gap: 22px; margin-top: 36px; }
.landing-primary-cta, .landing-secondary-cta {
  min-width: 184px;
  min-height: 60px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border-radius: 999px;
  font-size: 16px;
  cursor: pointer;
}
.landing-primary-cta { border: 1px solid var(--landing-blue); background: var(--landing-blue); color: #fff; }
.landing-primary-cta:hover { background: var(--landing-blue-strong); }
.landing-secondary-cta { border: 1px solid #d5dbe2; background: #fff; color: #34373c; }
.landing-secondary-cta:hover { border-color: #b9d9fb; color: var(--landing-blue); }
.landing-model-panel {
  min-width: 0;
  height: clamp(590px, calc(100svh - 128px), 760px);
  padding: 34px 32px;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--landing-line);
  border-radius: 36px;
  background: #f5f8fb;
  box-shadow: 0 24px 60px rgba(31, 48, 68, .08);
  overflow: hidden;
}
.landing-model-head { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.landing-model-head h2 { font-size: 22px; font-weight: 600; letter-spacing: -.025em; }
.landing-model-head button { display: inline-flex; align-items: center; gap: 8px; border: 0; padding: 0; background: transparent; color: var(--landing-blue); font-size: 14px; white-space: nowrap; cursor: pointer; }
.landing-model-head button:hover { color: #0076ed; }
.landing-model-head button svg { flex: 0 0 auto; }
.landing-model-window { flex: 1; min-height: 0; margin-top: 20px; overflow: hidden; overscroll-behavior: contain; }
.landing-model-track { display: flex; min-width: 0; flex-direction: column; gap: 12px; will-change: transform; }
.landing-model-row {
  width: 100%;
  min-height: 75px;
  padding: 12px 16px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 8px;
  align-items: center;
  gap: 14px;
  border: 1px solid var(--landing-line);
  border-radius: 16px;
  background: #fff;
  color: var(--landing-ink);
  text-align: left;
  cursor: pointer;
  transition: border-color .15s ease, background-color .15s ease, transform .15s ease;
}
.landing-model-row:hover { border-color: #b9dcff; background: #f7fbff; transform: translateY(-1px); }
.landing-provider-mark { width: 28px; height: 28px; display: grid; place-items: center; overflow: hidden; }
.landing-provider-mark img { width: 24px; height: 24px; object-fit: contain; opacity: .56; }
.landing-provider-mark.kimi img { border-radius: 6px; }
.landing-model-row strong { display: block; overflow: hidden; font-size: 16px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.landing-model-row small { display: block; margin-top: 4px; overflow: hidden; color: #728096; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.landing-model-row > i { width: 7px; height: 7px; border-radius: 50%; background: var(--landing-blue); }

.landing-guide { width: min(1232px, calc(100% - 48px)); margin: 0 auto; padding: 90px 0 110px; border-top: 1px solid #eef2f6; }
.landing-guide h2 { margin-top: 20px; font-size: 40px; font-weight: 560; letter-spacing: -.035em; }
.landing-guide-grid { margin-top: 40px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.landing-guide-grid article { min-height: 190px; padding: 24px; border: 1px solid var(--landing-line); border-radius: 20px; background: #fff; }
.landing-guide-grid article > span { color: var(--landing-blue); font: 13px/1 var(--mono); }
.landing-guide-grid h3 { margin-top: 28px; font-size: 18px; font-weight: 620; }
.landing-guide-grid p { margin-top: 9px; color: var(--landing-muted); font-size: 14px; }

/* ---------- 认证视图 ---------- */

.auth-dialog {
  width: min(560px, calc(100vw - 28px));
  max-height: calc(100vh - 28px);
  padding: 0;
  border: 0;
  border-radius: 28px;
  background: transparent;
  color: var(--ink);
  overflow: auto;
}
.auth-dialog::backdrop { background: rgba(10, 18, 28, .52); backdrop-filter: blur(4px); }

.auth-inner { position: relative; width: 100%; padding: 32px 42px 36px; border: 0; border-radius: 28px; background: #fff; box-shadow: 0 28px 90px rgba(15,23,42,.2); }
.auth-close { position: absolute; top: 18px; right: 20px; width: 34px; height: 34px; border: 0; border-radius: 50%; background: transparent; color: #111827; font-size: 27px; font-weight: 300; line-height: 1; cursor: pointer; }
.auth-close:hover { background: #f3f4f6; color: var(--accent-strong); }

.auth-brand { position: relative; text-align: center; margin-bottom: 24px; }
.auth-brand h1 { margin: 32px 0 0; font-size: clamp(28px, 4vw, 34px); font-weight: 720; letter-spacing: -.04em; }
.auth-brand-mark,
.app-brand-mark {
  position: absolute;
  top: 0;
  left: 0;
  width: 40px;
  height: 22px;
  border-radius: 999px;
  background: linear-gradient(90deg, #3154ff, var(--accent));
}
.auth-brand-mark::after,
.app-brand-mark::after {
  content: "";
  position: absolute;
  right: 3px;
  top: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
}
.app-brand-mark { position: relative; flex: 0 0 auto; width: 38px; height: 22px; }
.app-brand-mark::after { width: 16px; height: 16px; }

.auth-card {
  width: 100%;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  padding: 0;
}

.tabs { display: flex; justify-content: center; gap: 52px; background: transparent; padding: 0; }
.tab {
  position: relative;
  border: 0;
  background: transparent;
  color: #6b7280;
  padding: 8px 4px 13px;
  border-radius: 0;
  font: 500 16px/1 var(--font);
  cursor: pointer;
}
.tab::after { content: ""; position: absolute; left: 50%; bottom: 0; width: 0; height: 3px; border-radius: 999px; background: var(--accent); transform: translateX(-50%); transition: width .15s ease; }
.tab.active { background: transparent; color: var(--accent); box-shadow: none; }
.tab.active::after { width: 46px; }
.auth-dialog .tab:focus-visible { outline: none; }

.form-stack { display: grid; gap: 16px; margin-top: 28px; }
.auth-dialog label { gap: 0; }
.auth-dialog input {
  min-height: 54px;
  border: 2px solid transparent;
  border-radius: 999px;
  background: #f5f5f5;
  padding: 13px 22px;
  color: #111827;
  font-size: 15px;
}
.auth-dialog input::placeholder { color: #9ca3af; opacity: 1; }
.auth-dialog input:hover { border-color: #e5e7eb; }
.auth-dialog input:focus,
.auth-dialog input:focus-visible {
  border-color: #e5e7eb;
  background: #f5f5f5;
  box-shadow: none;
  outline: none;
}
.auth-dialog .button.primary {
  min-height: 52px;
  margin-top: 2px;
  font-size: 16px;
  font-weight: 500;
}
.auth-dialog .error { margin-top: 12px; text-align: center; }
.google-auth-button {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 11px 12px;
  border: 1px solid #747775;
  border-radius: 12px;
  background: #fff;
  color: #1f1f1f;
  font-family: "Google Sans", Roboto, Arial, sans-serif;
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
  text-decoration: none;
}
.google-auth-button:hover { background: #f8faff; }
.google-auth-button:focus-visible { outline: 2px solid #77727f; outline-offset: 2px; }
.google-auth-mark {
  width: 22px;
  height: 22px;
  display: block;
}
.auth-separator { display: flex; align-items: center; gap: 12px; margin: 14px 0; color: var(--ink-2); font-size: 12px; }
.auth-separator::before, .auth-separator::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.auth-legal { margin: 14px 4px 0; color: var(--ink-2); font-size: 11px; line-height: 1.55; text-align: center; }
.auth-legal a { color: inherit; text-underline-offset: 2px; }

.landing-legal-footer {
  width: min(96rem, calc(100% - 10rem));
  margin: 0 auto;
  padding: 2rem 0 2.5rem;
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  border-top: 1px solid var(--line);
  color: var(--ink-2);
  font-size: .875rem;
}
.landing-legal-footer nav { display: flex; gap: 1.5rem; }
.landing-legal-footer a { color: inherit; text-decoration: none; }
.landing-legal-footer a:hover { color: var(--ink); }
.landing-legal-page { min-height: 65vh; padding: 4rem 0 6rem; }
.landing-legal-document {
  width: min(52rem, calc(100% - 3rem));
  margin: 0 auto;
  color: var(--ink);
}
.landing-legal-document header { margin-bottom: 2.5rem; }
.landing-legal-document h1 { margin: 0 0 .75rem; font-family: var(--display); font-size: clamp(2.4rem, 5vw, 4.5rem); font-weight: 500; }
.landing-legal-document header p { color: var(--ink-2); }
.landing-legal-document h2 { margin: 2rem 0 .65rem; font-size: 1.2rem; }
.landing-legal-document p { color: var(--ink-2); line-height: 1.8; }

@media (max-width: 640px) {
  .landing-legal-footer {
    width: calc(100% - 2rem);
    flex-direction: column;
    padding-bottom: 2rem;
  }
  .landing-legal-page { padding: 2.5rem 0 4rem; }
}
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

label { display: grid; gap: 6px; color: var(--ink-2); font-size: 13px; font-weight: 600; }

input, select, textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  background: var(--field-bg);
  border-radius: var(--radius);
  padding: 10px 12px;
  color: var(--ink);
  font: 400 14px/1.4 var(--font);
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}
input:hover, select:hover, textarea:hover { border-color: #9fcdfb; }
input:focus, select:focus, textarea:focus {
  border-color: var(--line-strong);
  background: var(--field-bg);
  box-shadow: none;
}

.field-note { color: var(--muted); font-size: 12px; margin-top: -6px; }

.error { min-height: 22px; margin-top: 14px; color: var(--bad); font-size: 13px; }

/* ---------- 按钮 ---------- */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 9px 16px;
  font: 600 13px/1.2 var(--font);
  cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
  white-space: nowrap;
}
.button:disabled { opacity: .55; cursor: default; }
.button.primary { background: var(--accent); color: #fff; }
.button.primary:hover:not(:disabled) { background: var(--accent-strong); }
.button.secondary { background: var(--neutral-bg); color: var(--ink); }
.button.secondary:hover:not(:disabled) { background: #e6f1fc; }
.button.text { background: transparent; color: var(--accent); padding-left: 8px; padding-right: 8px; }
.button.text:hover:not(:disabled) { background: var(--accent-soft); }
.button.danger { background: var(--bad-bg); color: var(--bad); }
.button.danger:hover:not(:disabled) { background: #f3d9d3; }
.button.small { padding: 6px 10px; font-size: 12px; }
.button.block { width: 100%; }

:focus-visible { outline: 2px solid #77727f; outline-offset: 2px; border-radius: 4px; }

/* ---------- 应用骨架 ---------- */

#app-view { width: min(1440px, calc(100% - 32px)); margin: 0 auto; padding: 20px 0 56px; }

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 0 18px;
}
.app-header h1 { font-size: 20px; font-weight: 650; }
.app-header .muted { font-size: 12.5px; margin-top: 2px; }
.app-shell {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  align-items: start;
  gap: 20px;
}
.app-sidebar {
  position: sticky;
  top: 20px;
  min-height: calc(100vh - 120px);
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--card);
  box-shadow: 0 12px 32px rgba(15, 23, 42, .045);
}
.app-content { min-width: 0; }
.app-main { margin-top: 14px; }

.notice {
  margin-bottom: 14px;
  padding: 11px 14px;
  border: 1px solid #c8e3ff;
  border-radius: var(--radius);
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 13px;
}
.notice.error-state { border-color: #ecd2cc; background: var(--bad-bg); color: var(--bad); }

.load-error {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  padding: 11px 14px;
  border: 1px solid #ecd2cc;
  border-radius: var(--radius);
  background: var(--bad-bg);
  color: var(--bad);
  font-size: 13px;
}

/* ---------- 账户摘要 ---------- */

.summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, .045);
  padding: 20px 24px 14px;
}
.summary-item { padding: 0 20px; border-left: 1px solid var(--line); }
.summary-item:first-of-type { padding-left: 0; border-left: 0; }
.summary-label { display: block; color: var(--muted); font-size: 12px; }
.summary-item strong { display: block; margin: 6px 0 3px; font-size: 24px; font-weight: 650; letter-spacing: -.01em; }
.summary-item small { color: var(--muted); font-size: 12px; }
.summary-item .unit { font-weight: 700; }
/* ---------- 工作区导航 ---------- */

.section-nav {
  display: grid;
  gap: 6px;
}
.section-tab {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--muted);
  padding: 12px 14px;
  font: 600 13.5px/1 var(--font);
  text-align: left;
  cursor: pointer;
  transition: background-color .15s ease, color .15s ease;
}
.section-tab-icon { flex: 0 0 auto; width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.section-tab:hover { background: var(--neutral-bg); color: var(--ink); }
.section-tab.active { background: var(--accent-soft); color: var(--accent); }
.section-tab.active::after {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 3px;
  height: 22px;
  border-radius: 0 3px 3px 0;
  background: var(--accent);
  transform: translateY(-50%);
}

/* ---------- 工作区卡片 ---------- */

.workspace {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 24px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, .045);
}

.section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}
.section-heading.sub { margin-top: 30px; padding-top: 24px; border-top: 1px solid var(--line); }
.section-heading h2 { font-size: 16px; font-weight: 650; }
.section-heading h3 { font-size: 14.5px; font-weight: 650; }
.section-heading p { margin-top: 4px; color: var(--muted); font-size: 12.5px; }

/* ---------- 模型与价格 ---------- */

.provider-models { display: grid; gap: 24px; }
.provider-models > .muted { margin: 0; }
.provider-model-group { display: grid; gap: 12px; }
.provider-model-group > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 9px;
  border-bottom: 1px solid var(--line);
}
.provider-model-group > header > div { display: flex; align-items: center; gap: 9px; }
.provider-model-group > header h3 { font-size: 15px; font-weight: 680; }
.provider-model-group > header small { color: var(--muted); font-size: 12px; }
.provider-dot { width: 9px; height: 9px; border-radius: 999px; background: #64748b; box-shadow: 0 0 0 4px rgba(100, 116, 139, .1); }
.provider-dot.openai { background: #111216; box-shadow: 0 0 0 4px rgba(17, 18, 22, .09); }
.provider-dot.anthropic { background: #d97757; box-shadow: 0 0 0 4px rgba(217, 119, 87, .11); }
.provider-dot.moonshot { background: #1687f8; box-shadow: 0 0 0 4px rgba(22, 135, 248, .1); }
.provider-dot.google { background: #20b486; box-shadow: 0 0 0 4px rgba(32, 180, 134, .1); }
.provider-model-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.model-card { min-width: 0; padding: 15px; border: 1px solid var(--line); border-radius: 16px; background: var(--field-bg); }
.model-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.model-card-head > div { min-width: 0; }
.model-card-head strong { display: block; overflow-wrap: anywhere; font-size: 14px; font-weight: 680; }
.model-card-head > div > span { display: block; margin-top: 4px; color: var(--muted); font: 11.5px/1.35 var(--mono); overflow-wrap: anywhere; }
.model-group-chip { flex: 0 0 auto; max-width: 45%; padding: 4px 8px; border: 1px solid #cce3fb; border-radius: 999px; color: var(--accent-strong); background: var(--accent-soft); font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.model-prices { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 13px; }
.model-price { display: grid; gap: 2px; min-width: 112px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 11px; background: var(--card); }
.model-price small { color: var(--muted); font-size: 10.5px; }
.model-price strong { color: var(--ink); font: 650 12.5px/1.2 var(--mono); }
.model-price em { color: var(--muted); font-size: 9.5px; font-style: normal; }
.model-card footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 12px; color: var(--ink-2); font-size: 11px; }
.model-card > p { margin-top: 9px; color: var(--muted); font-size: 11.5px; line-height: 1.55; }

/* ---------- 分组卡片 ---------- */

.groups-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 12px;
}
.groups-grid > .muted { grid-column: 1 / -1; margin: 0; }
.group-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--field-bg);
  padding: 14px 16px;
}
.group-card .group-name { font-weight: 650; font-size: 13.5px; }
.group-card .group-meta { margin-top: 6px; color: var(--ink-2); font-size: 12.5px; }
.group-card .group-desc { margin-top: 6px; color: var(--muted); font-size: 12px; }
.group-card .group-tags { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px; }

/* ---------- 内联表单 ---------- */

.inline-form {
  display: grid;
  grid-template-columns: 1.1fr 1.1fr .9fr .7fr .7fr auto;
  gap: 10px;
  align-items: end;
  padding: 14px;
  margin-bottom: 18px;
  background: var(--field-bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.inline-form.compact { grid-template-columns: minmax(220px, 340px) auto; justify-content: start; }
.inline-form .actions { display: flex; gap: 8px; }
.inline-form.daily-limit-form {
  grid-template-columns: minmax(240px, 360px) minmax(220px, 1fr) auto;
  align-items: end;
}
.form-label { display: block; margin-bottom: 7px; color: var(--muted); font-size: 12px; font-weight: 650; }
.topup-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  margin-bottom: 18px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--field-bg);
}
.topup-choices { min-width: 0; }
.topup-fieldset { min-width: 0; padding: 0; border: 0; }
.topup-fieldset legend,
.topup-submit-summary > span,
.topup-custom-field > span {
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}
.topup-presets { display: grid; grid-template-columns: repeat(6, minmax(76px, 1fr)); gap: 10px; }
.topup-option {
  min-height: 54px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--ink);
  font-size: 16px;
  font-weight: 750;
  cursor: pointer;
}
.topup-option:hover { border-color: var(--line-strong); background: var(--card); }
.topup-option.active { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-strong); }
.topup-custom-field { display: grid; margin-top: 14px; }
.topup-custom-input {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 52px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}
.topup-custom-input:focus-within { border-color: var(--line-strong); background: var(--card); }
.topup-custom-input input { min-height: 48px; padding: 0; border: 0; background: transparent; box-shadow: none; font-size: 17px; font-weight: 700; }
.topup-custom-input input:focus { border: 0; outline: 0; box-shadow: none; }
.topup-custom-input b, .topup-custom-input em { color: var(--muted); font-style: normal; }
.topup-custom-field small { margin-top: 7px; color: var(--muted); font-size: 12px; }
.topup-payment-fieldset { margin-top: 20px; }
.topup-payment-methods {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.topup-payment-method {
  position: relative;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 14px;
  align-items: center;
  gap: 10px;
  min-height: 76px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  cursor: pointer;
}
.topup-payment-method:hover { border-color: var(--line-strong); background: var(--card); }
.topup-payment-method.active {
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 20%, transparent);
}
.payment-method-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 10px;
}
.payment-method-mark img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.topup-payment-method-card {
  grid-template-columns: minmax(0, 1fr) auto 14px;
  column-gap: 14px;
}
.topup-payment-method-card .payment-method-copy {
  grid-column: 1;
  grid-row: 1;
}
.payment-card-brands {
  grid-column: 2;
  grid-row: 1;
  width: 112px;
  height: 32px;
  display: block;
}
.payment-card-brands img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.paypal-mark {
  border: 1px solid var(--line-strong);
  background: #fff;
}
.alipay-mark,
.wechat-mark { overflow: hidden; }
.payment-method-copy { min-width: 0; display: grid; gap: 3px; }
.payment-method-copy strong { color: var(--ink); font-size: 14px; line-height: 1.2; }
.payment-method-copy small { color: var(--muted); font-size: 10.5px; line-height: 1.35; }
.payment-method-check {
  width: 14px;
  height: 14px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: var(--surface);
}
.topup-payment-method.active .payment-method-check {
  border: 4px solid var(--accent);
  background: #fff;
}
.topup-payment-method:focus-within { outline: 2px solid var(--line-strong); outline-offset: 2px; }
.topup-payment-note { margin-top: 9px; color: var(--muted); font-size: 11px; line-height: 1.5; }
.topup-submit {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 86px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}
.topup-submit-summary {
  min-width: 0;
  flex: 1;
  display: grid;
  grid-template-columns: minmax(150px, auto) minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-items: center;
  column-gap: 24px;
}
.topup-submit-summary > span { grid-column: 1; grid-row: 1; margin-bottom: 2px; }
.topup-submit strong {
  grid-column: 1;
  grid-row: 2;
  color: var(--ink);
  font-size: 22px;
  font-variant-numeric: tabular-nums;
}
.topup-submit small {
  grid-column: 2;
  grid-row: 1 / span 2;
  max-width: 620px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}
.topup-submit .button {
  flex: 0 0 auto;
  width: auto;
  min-width: 260px;
  min-height: 44px;
}

/* ---------- 签发成功面板 ---------- */

.issued {
  margin-bottom: 18px;
  padding: 16px 18px;
  border: 1px solid #c8e3ff;
  border-radius: var(--radius);
  background: var(--accent-soft);
}
.issued-head { display: flex; align-items: center; justify-content: space-between; }
.issued-head strong { color: var(--accent-strong); font-size: 14px; }
.issued p { margin-top: 6px; color: var(--ink-2); font-size: 12.5px; }
.issued-token {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  padding: 10px 12px;
  background: var(--card);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
}
.issued-token code {
  flex: 1;
  font-family: var(--mono);
  font-size: 12.5px;
  word-break: break-all;
  user-select: all;
}

/* ---------- 表格 ---------- */

.table-wrap { overflow: auto; border: 1px solid var(--line); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; white-space: nowrap; font-size: 13px; }
th, td { padding: 11px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th {
  background: var(--field-bg);
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: #f7fbff; }
td.num, th.num { text-align: right; }
td .cell-sub { display: block; margin-top: 2px; color: var(--muted); font-size: 12px; white-space: normal; }
.table-foot { display: flex; justify-content: center; padding-top: 12px; }

.token-ellipsis {
  display: inline-block;
  max-width: 240px;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: bottom;
}

.positive { color: var(--ok); }
.negative { color: var(--bad); }

/* ---------- 状态徽章 ---------- */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--neutral-bg);
  color: var(--ink-2);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.ok { background: var(--ok-bg); color: var(--ok); }
.badge.warn { background: var(--warn-bg); color: var(--warn); }
.badge.bad { background: var(--bad-bg); color: var(--bad); }
.badge.info { background: var(--info-bg); color: var(--info); }
.badge.neutral { background: var(--neutral-bg); color: var(--muted); }

/* ---------- 对话框 ---------- */

.dialog {
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow);
  padding: 22px;
  width: min(430px, calc(100vw - 32px));
  background: var(--card);
  color: var(--ink);
}
.dialog::backdrop { background: rgba(24, 28, 25, .42); }
.dialog h3 { font-size: 15.5px; font-weight: 650; }
.dialog-body { margin-top: 10px; font-size: 13px; line-height: 1.7; color: var(--ink-2); }
.dialog-field { margin-top: 14px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }
.dialog-actions .button.danger { background: var(--bad); color: #fff; }
.dialog-actions .button.danger:hover { background: #8f3125; }

/* ---------- 页脚 ---------- */

.app-foot {
  margin-top: 34px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

/* ---------- 响应式 ---------- */

@media (max-width: 1100px) and (min-width: 701px) {
  .landing-header-inner { padding: 0 24px; }
  .landing-hero {
    width: calc(100% - 48px);
    padding: 40px 0 48px;
    grid-template-columns: minmax(0, .9fr) minmax(400px, 1.1fr);
    gap: 40px;
  }
  .landing-copy h1 { font-size: 42px; line-height: 1.08; letter-spacing: -.045em; }
  .landing-benefits { margin-top: 30px; font-size: 17px; }
  .landing-subtitle { margin-top: 24px; font-size: 16px; }
  .landing-endpoint { min-height: 58px; margin-top: 24px; padding-left: 16px; border-radius: 16px; }
  .landing-cta-row { margin-top: 28px; }
  .landing-model-panel { height: min(620px, calc(100svh - 112px)); min-height: 560px; padding: 28px 24px; border-radius: 30px; }
}

@media (max-width: 960px) {
  .landing-header-inner { padding: 0 18px; }
  .landing-header-actions { gap: 24px; }
  .landing-header-actions button,
  .landing-header-actions .locale-picker-value { min-width: 0; font-size: 15px; }
  .landing-hero {
    width: calc(100% - 48px);
    min-height: calc(100svh - 64px);
    padding: 36px 0 44px;
    grid-template-columns: minmax(0, .88fr) minmax(340px, 1.12fr);
    gap: 34px;
  }
  .landing-copy h1 { font-size: 38px; line-height: 1.12; letter-spacing: -.04em; }
  .landing-benefits { font-size: 16px; }
  .landing-endpoint { min-height: 54px; padding-left: 14px; gap: 9px; }
  .landing-endpoint code { font-size: 12px; }
  .landing-endpoint button { min-width: 88px; padding: 8px 12px; }
  .landing-cta-row { gap: 12px; }
  .landing-primary-cta, .landing-secondary-cta { min-width: 0; flex: 1; min-height: 48px; font-size: 14px; }
  .landing-model-panel { height: min(596px, calc(100svh - 104px)); min-height: 540px; padding: 26px 20px; border-radius: 28px; }
  .landing-model-head h2 { font-size: 17px; }
  .landing-model-head button { font-size: 12px; }
  .landing-model-row { grid-template-columns: 30px minmax(0, 1fr) 7px; padding: 10px 12px; gap: 10px; }
  .landing-model-row strong { font-size: 14px; }
  .landing-model-row small { font-size: 11.5px; }
  .app-shell { grid-template-columns: 180px minmax(0, 1fr); gap: 14px; }
  .summary { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 16px; }
  .summary-item:nth-of-type(odd) { padding-left: 0; border-left: 0; }
  .inline-form { grid-template-columns: 1fr 1fr; }
  .topup-presets { grid-template-columns: repeat(3, minmax(76px, 1fr)); }
  .topup-submit { gap: 18px; }
  .topup-submit-summary { grid-template-columns: minmax(150px, auto) minmax(0, 1fr); column-gap: 18px; }
  .topup-submit .button { min-width: 220px; }
}

@media (max-width: 700px) {
  .landing-header-inner { padding: 0 14px; }
  .landing-brand { margin-right: 8px; }
  .landing-brand-mark { width: 26px; }
  .landing-header-actions { gap: 16px; }
  .landing-header-actions button,
  .landing-header-actions .locale-picker-value { min-width: 0; font-size: 14px; }
  .landing-hero { width: calc(100% - 32px); min-height: 0; padding: 42px 0 64px; grid-template-columns: 1fr; gap: 44px; }
  .landing-copy { max-width: none; }
  .landing-copy h1 { margin-top: 0; font-size: clamp(34px, 10vw, 48px); line-height: 1.08; }
  .landing-benefits { margin-top: 24px; gap: 11px; font-size: 16px; }
  .landing-subtitle { margin-top: 26px; font-size: 15px; }
  .landing-endpoint { margin-top: 24px; min-height: 46px; padding: 6px 7px 6px 12px; border-radius: 10px; }
  .landing-endpoint button { min-width: 82px; padding: 7px 10px; }
  .landing-cta-row { margin-top: 28px; }
  .landing-primary-cta, .landing-secondary-cta { min-height: 46px; }
  .landing-model-panel { height: 570px; min-height: 0; padding: 24px 20px; border-radius: 24px; }
  .landing-model-head h2 { font-size: 17px; }
  .landing-model-row { min-height: 77px; }
  .landing-guide { width: calc(100% - 48px); padding: 64px 0 80px; }
  .landing-guide h2 { font-size: 30px; }
  .landing-guide-grid { grid-template-columns: 1fr; gap: 14px; }
  .landing-guide-grid article { min-height: 0; }
  #app-view { width: min(100% - 24px, 1440px); }
  .app-shell { display: block; }
  .app-sidebar { position: static; min-height: 0; margin-bottom: 14px; padding: 6px; border-radius: 14px; overflow-x: auto; }
  .section-nav { width: max-content; min-width: 100%; display: flex; gap: 4px; }
  .section-tab { width: auto; padding: 11px 13px; text-align: center; }
  .section-tab.active::after { left: 12px; right: 12px; top: auto; bottom: 0; width: auto; height: 2px; border-radius: 2px 2px 0 0; transform: none; }
}

@media (max-width: 600px) {
  .auth-dialog { border-radius: 24px; }
  .auth-inner { padding: 26px 18px 24px; border-radius: 24px; }
  .auth-close { top: 14px; right: 14px; }
  .auth-brand { padding: 0; margin-bottom: 22px; }
  .auth-brand h1 { margin-top: 42px; font-size: 28px; }
  .auth-card { padding: 0; }
  .tabs { gap: 38px; }
  .tab { font-size: 15px; }
  .form-stack { gap: 14px; margin-top: 24px; }
  .auth-dialog input { min-height: 52px; padding: 12px 20px; font-size: 15px; }
  .auth-dialog .button.primary { min-height: 50px; font-size: 16px; }
  #app-view { width: calc(100% - 20px); padding-top: 12px; }
  .app-header { flex-direction: column; align-items: flex-start; gap: 10px; }
  .workspace { padding: 16px; }
  .provider-model-grid { grid-template-columns: 1fr; }
  .summary { padding: 16px 16px 12px; }
  .summary-item { padding: 0 12px; }
  .inline-form, .inline-form.compact { grid-template-columns: 1fr; }
  .topup-form { padding: 14px; }
  .topup-presets { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .topup-payment-methods { grid-template-columns: 1fr; }
  .topup-payment-method { min-height: 68px; }
  .topup-payment-method-card {
    grid-template-columns: minmax(0, 1fr) 14px;
    grid-template-rows: auto auto;
    min-height: 96px;
  }
  .topup-payment-method-card .payment-card-brands {
    grid-column: 1 / span 2;
    grid-row: 2;
    margin-top: 6px;
  }
  .topup-payment-method-card .payment-method-check {
    grid-column: 2;
    grid-row: 1;
  }
  .topup-submit { flex-direction: column; align-items: stretch; gap: 14px; }
  .topup-submit-summary { grid-template-columns: 1fr; grid-template-rows: auto auto auto; }
  .topup-submit-summary > span { grid-column: 1; grid-row: 1; }
  .topup-submit strong { grid-column: 1; grid-row: 2; }
  .topup-submit small { grid-column: 1; grid-row: 3; margin-top: 5px; }
  .topup-submit .button { width: 100%; min-width: 0; }
  .section-heading { flex-direction: column; }
  .section-tab { padding: 9px 10px 10px; font-size: 13px; }
}

/* ---------- 动效约束 ---------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- TrueAPI reference visual system ---------- */

.landing {
  --landing-row-height: 5.5rem;
  --landing-row-gap: .75rem;
  /* Six model slots; the mask fades the outgoing top and incoming bottom row. */
  --landing-window-height: 36.75rem;
  min-height: 100svh;
  background: var(--paper);
  color: var(--ink);
}

.landing-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 30;
  height: 4.75rem;
  border-bottom: 1px solid var(--line);
  background: rgba(247, 244, 236, .96);
  box-shadow: none;
  backdrop-filter: blur(14px);
}

.landing-header.scrolled {
  border-bottom-color: var(--line);
  box-shadow: 0 10px 26px rgba(35, 28, 65, .045);
}

.landing-header-inner {
  width: 100%;
  height: 4.75rem;
  margin: 0 auto;
  padding: 0 max(3rem, calc((100vw - 110rem) / 2 + 3rem));
}

.landing-brand {
  gap: .75rem;
  color: var(--ink);
  font-size: 1.625rem;
  font-weight: 700;
  letter-spacing: .0125rem;
}

.trueapi-mark { width: 2.25rem; height: 2.25rem; flex: 0 0 auto; border-radius: .35rem; object-fit: cover; mix-blend-mode: multiply; }

.landing-nav {
  display: flex;
  align-items: center;
  gap: 3rem;
  margin-left: auto;
}

.landing-nav a {
  color: var(--ink);
  font-size: 1.25rem;
  font-weight: 500;
  text-decoration: none;
  transition: color .16s ease;
}

.landing-nav a:hover { color: var(--accent); }
.landing-nav a.active { color: var(--accent); }

.landing-header-actions { gap: 2rem; margin-left: 3rem; }

.landing-header-actions button,
.landing-header-actions .locale-picker-value {
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 1.25rem;
  font-weight: 500;
}

.landing-header-actions .locale-picker { color: var(--accent); }
.landing-header-actions button:hover { color: var(--accent); opacity: 1; }

.landing-login { position: relative; }
.landing-login::before {
  content: "";
  position: absolute;
  top: 50%;
  left: -1rem;
  width: 1px;
  height: 1.5rem;
  background: rgba(20, 18, 31, .25);
  transform: translateY(-50%);
}

.landing-main { margin-top: 4.75rem; background: var(--paper); }

.landing-hero {
  width: 100%;
  max-width: 110rem;
  min-height: calc(100svh - 4.75rem);
  margin: 0 auto;
  padding: 2.5rem 10rem;
  display: grid;
  grid-template-columns: minmax(0, .96fr) minmax(34rem, 1.04fr);
  align-content: center;
  align-items: stretch;
  gap: 3rem;
}

.landing-copy {
  min-width: 0;
  max-width: none;
  padding: 0 0 .5rem;
}

.landing-copy h1 {
  margin: 0;
  color: #17142b;
  font-family: var(--display);
  font-size: 7.5rem;
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -.075rem;
  white-space: normal;
}

.landing-benefits {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .875rem 2rem;
  margin-top: 2.25rem;
  color: var(--ink);
  font-size: 1.375rem;
}

.landing-benefits span { display: inline-flex; align-items: center; gap: .875rem; }
.landing-benefits b { font-weight: 650; white-space: nowrap; }
.landing-benefits svg {
  width: 1.75rem;
  height: 1.75rem;
  fill: var(--accent);
  stroke: var(--accent);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.landing-benefits span:first-child svg { stroke: none; }
.landing-benefits i { width: 1px; height: 1.75rem; border-radius: 0; background: #d8d3c5; }

.landing-api-label {
  margin: 3rem 0 0 .5rem;
  color: var(--muted);
  font-size: .9375rem;
  font-weight: 600;
  letter-spacing: .125rem;
}

.landing-endpoint {
  width: min(32rem, 100%);
  min-height: 4.375rem;
  margin-top: .875rem;
  padding: 0 1.625rem;
  gap: 1rem;
  border: 1px solid rgba(222, 217, 235, .78);
  border-radius: .75rem;
  background: rgba(238, 236, 246, .84);
}

.landing-endpoint code {
  color: #3a3644;
  font: 1.25rem/1.4 var(--mono);
  letter-spacing: .0125rem;
}

.landing-endpoint button {
  min-width: 2.125rem;
  padding: .5rem;
  border: 0;
  border-radius: .5rem;
  background: transparent;
  color: var(--accent);
}
.landing-endpoint button:hover { border-color: transparent; background: rgba(91, 71, 214, .08); color: var(--accent-strong); }
.landing-endpoint svg { width: 1.375rem; height: 1.375rem; stroke-width: 1.9; }

.landing-cta-row { width: min(32rem, 100%); gap: 1.5rem; margin-top: 2.25rem; }

.landing-primary-cta,
.landing-secondary-cta {
  flex: 1;
  min-width: 0;
  min-height: 4.625rem;
  gap: .875rem;
  border-radius: .8125rem;
  font-size: 1.3125rem;
  font-weight: 600;
}

.landing-primary-cta {
  border-color: var(--accent);
  background: var(--accent);
  box-shadow: 0 10px 24px rgba(91, 71, 214, .28);
}
.landing-primary-cta:hover { background: var(--accent-strong); transform: translateY(-2px); }
.landing-secondary-cta { border: 1.5px solid var(--accent); background: transparent; color: var(--accent); }
.landing-secondary-cta:hover { border-color: var(--accent-strong); background: rgba(91, 71, 214, .06); color: var(--accent-strong); }
.landing-secondary-cta svg { width: 1.375rem; height: 1.375rem; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; }

.landing-model-panel {
  width: 100%;
  max-width: 40rem;
  height: auto;
  min-width: 0;
  padding: 0;
  justify-self: end;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
  transform: translateY(.75rem);
}

.landing-model-window {
  width: 100%;
  height: var(--landing-window-height);
  flex: 0 0 var(--landing-window-height);
  margin: 0;
  overflow: hidden;
  overscroll-behavior: contain;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 7%, #000 93%, transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0, #000 7%, #000 93%, transparent 100%);
}

.landing-model-track { gap: var(--landing-row-gap); }

.landing-model-row {
  width: 100%;
  height: var(--landing-row-height);
  min-height: var(--landing-row-height);
  padding: .8rem 1rem;
  display: grid;
  grid-template-columns: 3.55rem minmax(0, 1fr) auto auto;
  grid-template-areas: "mark copy prices state";
  align-items: center;
  gap: 1rem;
  border: 1px solid rgba(202, 196, 216, .72);
  border-radius: 1.125rem;
  background: rgba(255, 255, 255, .55);
  box-shadow: 0 .35rem 1rem rgba(35, 28, 65, .045);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease, background-color .18s ease;
}

.landing-provider-mark { grid-area: mark; }
.landing-model-copy { grid-area: copy; }
.landing-model-prices { grid-area: prices; }
.landing-model-state { grid-area: state; }

.landing-model-row:hover {
  border-color: rgba(91, 71, 214, .38);
  background: rgba(255, 255, 255, .78);
  box-shadow: 0 10px 24px rgba(35, 28, 65, .08);
  transform: translateX(-6px);
}

.landing-provider-mark {
  width: 3.55rem;
  height: 3.55rem;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(220, 215, 231, .8);
  border-radius: .95rem;
  background: rgba(255, 255, 255, .52);
}

.landing-provider-mark img { width: 1.95rem; height: 1.95rem; object-fit: contain; opacity: 1; }
.landing-provider-mark.kimi img,
.landing-provider-mark.xai img { width: 2.1rem; height: 2.1rem; border-radius: .55rem; }

.landing-model-copy { min-width: 0; }
.landing-model-row strong { font-size: 1.1875rem; font-weight: 700; letter-spacing: -.015rem; }
.landing-model-row small { display: flex; align-items: center; gap: .625rem; margin-top: .25rem; color: var(--muted); font-size: .9rem; }
.landing-model-row small em {
  overflow: hidden;
  padding: .1875rem .625rem;
  border: 1px solid rgba(91, 71, 214, .08);
  border-radius: .375rem;
  background: rgba(91, 71, 214, .09);
  color: var(--accent);
  font-size: .75rem;
  font-style: normal;
  font-weight: 650;
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.landing-model-prices {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1rem;
  color: var(--muted);
  font-size: .875rem;
  font-variant-numeric: tabular-nums;
  line-height: 1.25;
  white-space: nowrap;
}
.landing-model-prices > span { display: inline-flex; align-items: baseline; gap: .25rem; }
.landing-model-prices b { color: var(--ink); font-size: 1rem; font-weight: 700; }

.landing-model-state { display: flex; align-items: center; gap: 1.125rem; color: #aaa4bb; }
.landing-model-state i { width: .5rem; height: .5rem; border-radius: 50%; background: #a8d10b; box-shadow: 0 0 0 .1875rem rgba(168, 209, 11, .18); }
.landing-model-state b { font-size: 1.75rem; font-weight: 300; line-height: 1; }
.landing-model-row:hover .landing-model-state { color: var(--accent); }

.landing-view-models {
  align-self: flex-end;
  margin: 1.5rem 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: .75rem;
  border: 0;
  background: transparent;
  color: var(--accent);
  font-size: 1.25rem;
  font-weight: 600;
  cursor: pointer;
}
.landing-view-models:hover { color: var(--accent-strong); }

.landing-pricing-page {
  --pricing-text-meta: .875rem;
  --pricing-text-base: 1rem;
  --pricing-text-emphasis: 1.125rem;
  width: min(110rem, calc(100% - 6rem));
  min-height: calc(100svh - 4.75rem);
  margin: 0 auto;
  padding: 4rem 0 6rem;
  scroll-margin-top: 4.75rem;
}

.pricing-heading { max-width: 64rem; }
.pricing-heading h1 {
  margin-top: 0;
  color: #17142b;
  font-family: var(--display);
  font-size: 4rem;
  font-weight: 500;
  line-height: 1.08;
}

.pricing-shell {
  margin-top: 2.25rem;
  overflow: hidden;
  border: 1px solid rgba(202, 196, 216, .78);
  border-radius: 1.5rem;
  background: rgba(255, 255, 255, .52);
  box-shadow: 0 1rem 2.5rem rgba(35, 28, 65, .055);
}

.pricing-toolbar {
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid var(--line);
}

.pricing-provider-filters { min-width: 0; display: flex; align-items: center; flex-wrap: wrap; gap: .625rem; }
.pricing-filter {
  min-height: 2.625rem;
  padding: .5rem 1rem;
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  border: 1px solid rgba(202, 196, 216, .8);
  border-radius: 999px;
  background: rgba(255, 255, 255, .55);
  color: var(--ink);
  font-size: var(--pricing-text-base);
  font-weight: 650;
  white-space: nowrap;
}
.pricing-filter img { width: 1.25rem; height: 1.25rem; object-fit: contain; }
.pricing-filter:hover { border-color: rgba(91, 71, 214, .34); background: rgba(255,255,255,.8); }
.pricing-filter.active { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }

.pricing-search {
  width: min(26rem, 36vw);
  min-width: 18rem;
  min-height: 2.875rem;
  padding: 0 .875rem;
  display: flex;
  align-items: center;
  gap: .625rem;
  border: 1px solid rgba(202, 196, 216, .82);
  border-radius: .75rem;
  background: rgba(255,255,255,.68);
}
.pricing-search svg { width: 1.25rem; height: 1.25rem; flex: 0 0 auto; fill: none; stroke: var(--muted); stroke-width: 1.8; stroke-linecap: round; }
.pricing-search input { min-width: 0; min-height: 0; padding: 0; border: 0; background: transparent; box-shadow: none; font-size: var(--pricing-text-base); }
.pricing-search input:focus { border: 0; background: transparent; box-shadow: none; outline: 0; }

.pricing-table { width: 100%; }
.pricing-table-head,
.pricing-row {
  display: grid;
  grid-template-columns: minmax(15rem, 1.7fr) minmax(8rem, .8fr) repeat(4, minmax(8.75rem, .9fr));
  align-items: stretch;
}
.pricing-table-head { background: rgba(238, 236, 246, .64); color: #4b4655; font-size: var(--pricing-text-base); font-weight: 700; }
.pricing-table-head > span { min-width: 0; padding: 1rem 1.125rem; display: flex; align-items: center; white-space: nowrap; }
.pricing-row { height: 6.75rem; border-top: 1px solid var(--line); transition: background-color .16s ease; }
.pricing-table-head + .pricing-table-body .pricing-row:first-child { border-top: 0; }
.pricing-row:hover { background: rgba(255,255,255,.54); }
.pricing-row > div { min-width: 0; padding: 1.125rem; display: flex; justify-content: center; flex-direction: column; gap: .35rem; overflow: hidden; }
.pricing-model-cell { flex-direction: row !important; align-items: center; justify-content: flex-start !important; gap: .875rem !important; }
.pricing-model-cell .landing-provider-mark { width: 2.75rem; height: 2.75rem; flex: 0 0 auto; border-radius: .75rem; }
.pricing-model-cell .landing-provider-mark img { width: 1.55rem; height: 1.55rem; }
.pricing-model-cell strong { display: block; overflow: hidden; color: var(--ink); font-size: var(--pricing-text-emphasis); text-overflow: ellipsis; white-space: nowrap; }
.pricing-model-cell small { overflow: hidden; color: var(--muted); font-size: var(--pricing-text-meta); text-overflow: ellipsis; white-space: nowrap; }
.pricing-model-meta { min-width: 0; display: flex; align-items: center; flex-wrap: nowrap; gap: .4rem; overflow: hidden; }
.pricing-model-capability { padding: .18rem .48rem; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: var(--pricing-text-meta); font-style: normal; font-weight: 700; line-height: 1.25; }
.pricing-provider-cell strong { overflow: hidden; color: var(--ink); font-size: var(--pricing-text-base); text-overflow: ellipsis; white-space: nowrap; }
.pricing-price-cell strong { color: var(--ink); font-size: var(--pricing-text-emphasis); font-variant-numeric: tabular-nums; }
.pricing-price-line { min-width: 0; display: inline-flex; align-items: baseline; gap: .35rem; overflow: hidden; white-space: nowrap; }
.pricing-price-line > span,
.pricing-price-line > small { flex: 0 0 auto; color: var(--muted); font-size: var(--pricing-text-meta); }
.pricing-price-line > strong { flex: 0 0 auto; }
.pricing-cell-label { display: none; color: var(--muted); font-size: var(--pricing-text-meta); font-weight: 650; }
.pricing-empty { padding: 4rem 1.5rem; color: var(--muted); text-align: center; }

.landing-api-guide-page {
  --guide-type-meta: clamp(13px, .75rem, 15px);
  --guide-type-small: clamp(14px, .875rem, 17px);
  --guide-type-body: clamp(16px, 1rem, 19px);
  --guide-type-lead: clamp(17px, 1.0625rem, 21px);
  width: min(96rem, calc(100% - 10rem));
  min-height: calc(100svh - 4.75rem);
  margin: 0 auto;
  padding: 4.5rem 0 6rem;
}

.guide-heading { max-width: 62rem; }
.guide-heading h1 {
  margin: 0;
  color: #17142b;
  font-family: var(--display);
  font-size: clamp(3.25rem, 4.1vw, 4.25rem);
  font-weight: 500;
  line-height: 1.06;
}
.guide-heading > p:last-child { max-width: 54rem; margin-top: 1rem; color: var(--muted); font-size: var(--guide-type-lead); line-height: 1.65; }

.guide-prerequisite { margin-top: 2.25rem; padding: 1.125rem 1.375rem; display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; border: 1px solid rgba(91, 71, 214, .2); border-radius: 1rem; background: var(--accent-soft); }
.guide-prerequisite p { min-width: 0; display: grid; gap: .25rem; color: #514c5c; font-size: var(--guide-type-body); line-height: 1.55; }
.guide-prerequisite strong { color: var(--accent); font-size: var(--guide-type-meta); letter-spacing: .04em; text-transform: uppercase; }
.guide-prerequisite button { min-height: 2.75rem; padding: .6875rem 1rem; display: inline-flex; align-items: center; gap: .5rem; border: 0; border-radius: .75rem; background: var(--accent); color: #fff; font-size: var(--guide-type-small); font-weight: 750; white-space: nowrap; }
.guide-prerequisite button:hover { background: var(--accent-strong); }

.guide-facts {
  margin-top: 2rem;
  display: grid;
  grid-template-columns: .85fr 1.25fr 1fr;
  overflow: hidden;
  border: 1px solid rgba(202, 196, 216, .78);
  border-radius: 1.25rem;
  background: rgba(255, 255, 255, .5);
}
.guide-facts article { min-width: 0; padding: 1.375rem 1.5rem; display: grid; gap: .55rem; border-left: 1px solid var(--line); }
.guide-facts article:first-child { border-left: 0; }
.guide-facts span { color: var(--muted); font-size: var(--guide-type-meta); font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.guide-facts code { overflow: hidden; color: var(--ink); font-size: var(--guide-type-body); text-overflow: ellipsis; white-space: nowrap; }
.guide-facts a { display: inline-flex; align-items: center; gap: .5rem; color: var(--accent); font-size: var(--guide-type-small); font-weight: 700; }

.guide-shell {
  margin-top: 2rem;
  overflow: hidden;
  border: 1px solid rgba(202, 196, 216, .78);
  border-radius: 1.5rem;
  background: rgba(255, 255, 255, .52);
  box-shadow: 0 1rem 2.5rem rgba(35, 28, 65, .055);
}
.guide-mode-tabs { padding: .75rem; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; border-bottom: 1px solid var(--line); background: rgba(238, 236, 246, .5); }
.guide-mode-tabs button {
  min-height: 3.25rem;
  padding: .75rem 1rem;
  border: 1px solid transparent;
  border-radius: .875rem;
  background: transparent;
  color: var(--muted);
  font-size: var(--guide-type-body);
  font-weight: 720;
}
.guide-mode-tabs button:hover { color: var(--ink); }
.guide-mode-tabs button.active { border-color: rgba(202, 196, 216, .72); background: rgba(255,255,255,.82); color: var(--ink); box-shadow: 0 .35rem 1rem rgba(35, 28, 65, .06); }
.guide-intro { padding: 1.375rem 1.5rem; border-bottom: 1px solid var(--line); color: var(--muted); font-size: var(--guide-type-body); line-height: 1.65; }
.guide-workspace { min-height: 35rem; display: grid; grid-template-columns: 15.5rem minmax(0, 1fr); }

.guide-sidebar { padding: 1rem; display: flex; align-items: stretch; flex-direction: column; gap: .5rem; border-right: 1px solid var(--line); background: rgba(238, 236, 246, .28); }
.guide-sidebar button {
  min-height: 3rem;
  padding: .75rem .875rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  border: 1px solid transparent;
  border-radius: .75rem;
  background: transparent;
  color: #514c5c;
  font-size: var(--guide-type-small);
  font-weight: 680;
  text-align: left;
}
.guide-sidebar button:hover { background: rgba(255,255,255,.54); color: var(--ink); }
.guide-sidebar button.active { border-color: rgba(91, 71, 214, .2); background: var(--accent-soft); color: var(--accent); }
.guide-sidebar button small { padding: .2rem .45rem; border-radius: 999px; background: #e6efbd; color: #53650a; font-size: var(--guide-type-meta); font-weight: 800; }

.guide-content { min-width: 0; padding: 2.25rem; }
.guide-content article { max-width: 72rem; }
.guide-content article > p { margin-top: .875rem; color: var(--muted); font-size: var(--guide-type-body); line-height: 1.7; }
.guide-content article > h3 { margin-top: 1.75rem; color: var(--ink); font-size: var(--guide-type-small); font-weight: 750; letter-spacing: .04em; text-transform: uppercase; }
.guide-panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.guide-panel-heading > div { min-width: 0; }
.guide-panel-heading h2 { margin-top: .45rem; color: #17142b; font-family: var(--display); font-size: clamp(30px, 2.25rem, 42px); font-weight: 520; line-height: 1.15; }
.guide-panel-heading > code { max-width: 52%; padding: .5rem .7rem; overflow: hidden; border: 1px solid var(--line); border-radius: .5rem; background: rgba(238,236,246,.55); color: #514c5c; font-size: var(--guide-type-meta); text-overflow: ellipsis; white-space: nowrap; }
.guide-badge { display: inline-flex; align-items: center; min-height: 1.625rem; padding: .22rem .58rem; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: var(--guide-type-meta); font-weight: 800; letter-spacing: .03em; text-transform: uppercase; }

.guide-steps { margin-top: 1.5rem; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; list-style: none; }
.guide-steps li { min-width: 0; padding: 1rem; display: flex; align-items: flex-start; gap: .75rem; border: 1px solid var(--line); border-radius: .875rem; background: rgba(255,255,255,.48); }
.guide-steps li > span { width: 1.75rem; height: 1.75rem; flex: 0 0 auto; display: grid; place-items: center; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-size: var(--guide-type-meta); font-weight: 800; }
.guide-steps p { color: #514c5c; font-size: var(--guide-type-small); line-height: 1.55; }
.guide-config-list { margin-top: 1.25rem; overflow: hidden; border: 1px solid var(--line); border-radius: .875rem; }
.guide-config-list > div { padding: .875rem 1rem; display: grid; grid-template-columns: 9rem minmax(0, 1fr); align-items: center; gap: 1rem; border-top: 1px solid var(--line); }
.guide-config-list > div:first-child { border-top: 0; }
.guide-config-list dt { color: var(--muted); font-size: var(--guide-type-small); font-weight: 700; }
.guide-config-list dd { min-width: 0; }
.guide-config-list code { color: var(--ink); font-size: var(--guide-type-small); overflow-wrap: anywhere; }
.guide-external-link { margin-top: 1.25rem; display: inline-flex; align-items: center; gap: .5rem; color: var(--accent); font-size: var(--guide-type-small); font-weight: 700; }

.guide-path { margin-top: .625rem !important; }
.guide-path code,
.guide-endpoint-note code { padding: .2rem .4rem; border-radius: .375rem; background: rgba(238,236,246,.65); color: var(--ink); font-size: var(--guide-type-meta); }
.guide-code { position: relative; margin-top: 1rem; overflow: hidden; border: 1px solid rgba(202, 196, 216, .82); border-radius: 1rem; background: #211f2b; }
.guide-code button { position: absolute; top: .75rem; right: .75rem; z-index: 1; min-width: 4.25rem; min-height: 2rem; padding: .35rem .65rem; border: 1px solid rgba(255,255,255,.15); border-radius: .5rem; background: rgba(255,255,255,.08); color: #f1eef7; font-size: var(--guide-type-meta); font-weight: 700; }
.guide-code button:hover { background: rgba(255,255,255,.16); }
.guide-code pre { max-height: 31rem; padding: 1.25rem 5.75rem 1.25rem 1.25rem; overflow: auto; color: #f1eef7; font: var(--guide-type-small)/1.7 var(--mono); tab-size: 2; }
.guide-code code { font: inherit; white-space: pre; }
.guide-callout { margin-top: 1.25rem; padding: .875rem 1rem; border-left: .2rem solid var(--accent); border-radius: 0 .75rem .75rem 0; background: rgba(91, 71, 214, .07); color: #514c5c; font-size: var(--guide-type-small); line-height: 1.6; }
.guide-endpoint-note { margin-top: 1rem !important; font-size: var(--guide-type-small) !important; }
.guide-copy-buffer { position: fixed; left: -9999px; top: 0; width: 1px; height: 1px; opacity: 0; }

.landing-guide {
  width: min(90rem, calc(100% - 5rem));
  padding: 5.625rem 0 6.875rem;
  border-top-color: var(--line);
}
.landing-kicker { border-color: rgba(91, 71, 214, .18); background: var(--accent-soft); color: var(--accent); }
.landing-guide h2 { color: #17142b; font-family: var(--display); font-size: 3.25rem; font-weight: 500; }
.landing-guide-grid { margin-top: 2.5rem; gap: 1.25rem; }
.landing-guide-grid article { min-height: 11.875rem; padding: 1.5rem; border-color: rgba(202, 196, 216, .72); border-radius: 1.125rem; background: rgba(255, 255, 255, .5); }
.landing-guide-grid article > span { font-size: .8125rem; }
.landing-guide-grid h3 { margin-top: 1.75rem; font-size: 1.125rem; }
.landing-guide-grid p { margin-top: .5625rem; font-size: .875rem; }
.landing-guide-grid article > span { color: var(--accent); }

/* 登录和登录后页面使用同一套米白 / 紫色视觉。 */

.auth-dialog { border-radius: 20px; }
.auth-dialog::backdrop { background: rgba(23, 20, 43, .52); backdrop-filter: blur(5px); }
.auth-inner { border: 1px solid rgba(202, 196, 216, .72); border-radius: 20px; background: var(--paper); box-shadow: 0 28px 90px rgba(35, 28, 65, .22); }
.auth-brand { display: grid; justify-items: center; }
.auth-brand-lockup { display: inline-flex; align-items: center; gap: 9px; color: var(--ink); font-size: 20px; font-weight: 730; }
.auth-brand-lockup .trueapi-mark { width: 31px; height: 31px; }
.auth-brand h1 { margin-top: 22px; color: #17142b; font-family: var(--display); font-size: 38px; font-weight: 500; }
.tab.active { color: var(--accent); }
.tab::after { background: var(--accent); }
.auth-dialog input { border: 1px solid rgba(202, 196, 216, .72); border-radius: 12px; background: rgba(255, 255, 255, .58); }
.auth-dialog input:hover { border-color: rgba(91, 71, 214, .35); }
.auth-dialog input:focus,
.auth-dialog input:focus-visible { border-color: rgba(202, 196, 216, .72); background: rgba(255, 255, 255, .58); box-shadow: none; }

.button { border-radius: 10px; }
.button.primary { background: var(--accent); }
.button.primary:hover:not(:disabled) { background: var(--accent-strong); }
.button.secondary { border-color: rgba(202, 196, 216, .64); background: rgba(255,255,255,.5); }
.button.secondary:hover:not(:disabled) { background: rgba(91, 71, 214, .08); }

#app-view { width: 100%; min-height: 100svh; padding: 0 0 64px; background: var(--paper); }
.app-header {
  display: block;
  min-height: 4.75rem;
  margin-bottom: 2rem;
  padding: 0;
  border-bottom: 1px solid var(--line);
  background: rgba(247, 244, 236, .96);
  backdrop-filter: blur(14px);
}
.app-header-inner {
  width: 100%;
  height: 4.75rem;
  padding: 0 max(3rem, calc((100vw - 110rem) / 2 + 3rem));
  display: flex;
  align-items: center;
}
.app-header-refresh { color: var(--ink); }
.app-header-refresh:hover { color: var(--accent); }
.app-shell { width: min(110rem, calc(100% - 6rem)); margin: 0 auto; grid-template-columns: 230px minmax(0, 1fr); gap: 24px; }
.app-context-bar {
  min-height: 3rem;
  margin-bottom: 1rem;
  padding: 0 .25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  color: var(--muted);
  font-size: .75rem;
}
.app-context-bar > div { min-width: 0; display: flex; align-items: baseline; gap: .75rem; }
.app-context-bar strong { color: #17142b; font-family: var(--display); font-size: 1.5rem; font-weight: 500; }
#user-identity { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#updated-at { flex: 0 0 auto; }
.app-sidebar,
.summary,
.workspace { border-color: rgba(202, 196, 216, .7); background: rgba(255, 255, 255, .48); box-shadow: 0 10px 30px rgba(35, 28, 65, .045); }
.app-sidebar { border-radius: 18px; }
.summary,
.workspace { border-radius: 18px; }
.section-tab { border-radius: 10px; }
.section-tab.active { background: var(--accent-soft); color: var(--accent); }
.section-tab.active::after { background: var(--accent); }
.section-heading h2 { color: #17142b; font-family: var(--display); font-size: 25px; font-weight: 500; }
.section-heading h3 { color: #17142b; font-size: 16px; }
.model-card,
.group-card,
.inline-form,
.table-wrap { border-color: rgba(202, 196, 216, .66); background: rgba(255, 255, 255, .48); }
.model-card { border-radius: 14px; }
.model-group-chip { border-color: rgba(91,71,214,.15); background: var(--accent-soft); color: var(--accent); }
.provider-dot.google { background: #4285f4; box-shadow: 0 0 0 4px rgba(66, 133, 244, .1); }
.provider-dot.xai { background: #111; box-shadow: 0 0 0 4px rgba(17, 17, 17, .1); }
th { background: rgba(238, 236, 246, .66); }
tbody tr:hover td { background: rgba(91, 71, 214, .045); }
.dialog { border-color: rgba(202, 196, 216, .72); background: var(--paper); }

input:hover, select:hover, textarea:hover { border-color: rgba(87, 83, 96, .48); }
input:focus, select:focus, textarea:focus,
input:focus-visible, select:focus-visible, textarea:focus-visible,
.auth-dialog input:focus, .auth-dialog input:focus-visible {
  border-color: var(--line-strong);
  background: var(--field-bg);
  box-shadow: none;
  outline: 0;
}

html[dir="rtl"] .landing-nav { margin-right: auto; margin-left: 0; }
html[dir="rtl"] .landing-header-actions { margin-right: 3rem; margin-left: 0; }
html[dir="rtl"] .landing-login::before { right: -1rem; left: auto; }
html[dir="rtl"] .guide-code button { right: auto; left: .75rem; }
html[dir="rtl"] .guide-callout {
  border-right: .2rem solid var(--accent);
  border-left: 0;
  border-radius: .75rem 0 0 .75rem;
}
.auth-dialog input:focus,
.auth-dialog input:focus-visible {
  border-color: rgba(202, 196, 216, .72);
  background: rgba(255, 255, 255, .58);
}
:focus-visible,
.landing :focus-visible { outline: 2px solid #77727f; outline-offset: 2px; }

@media (max-width: 1120px) {
  .pricing-toolbar { align-items: stretch; flex-direction: column; }
  .pricing-search { width: 100%; min-width: 0; }
  .pricing-table-head { display: none; }
  .pricing-row { height: auto; grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 1rem; gap: .25rem; }
  .pricing-row > div { padding: .75rem; border-radius: .75rem; background: rgba(255,255,255,.42); }
  .pricing-model-cell { grid-column: 1 / -1; }
  .pricing-cell-label { display: block; margin-bottom: .2rem; }
  .pricing-output-cell { grid-column: 1 / -1; }
}

@media (max-width: 1024px) {
  html { font-size: 1.75vw; }
  .landing-nav { display: none; }
  .landing-header-actions { margin-left: auto; }
  .landing-hero {
    width: 100%;
    max-width: none;
    min-height: 0;
    padding: 3rem 5rem 2.5rem;
    grid-template-columns: 1fr;
    gap: 3.5rem;
  }
  .landing-copy { padding-left: 0; }
  .landing-model-panel { width: 100%; max-width: 40rem; justify-self: start; }
  .landing-view-models { position: static; }
  .landing-guide { width: calc(100% - 5rem); }
  .landing-api-guide-page { width: calc(100% - 5rem); padding-top: 3.5rem; }
  .landing-pricing-page { width: calc(100% - 10rem); padding-top: 3.5rem; }
  .guide-facts { grid-template-columns: 1fr; }
  .guide-facts article { border-top: 1px solid var(--line); border-left: 0; }
  .guide-facts article:first-child { border-top: 0; }
  .guide-workspace { grid-template-columns: 14rem minmax(0, 1fr); }
  .app-shell { grid-template-columns: 190px minmax(0, 1fr); gap: 16px; }
}

@media (max-width: 700px) {
  #app-view { width: 100%; }
  .app-shell { width: calc(100% - 3rem); }
  .app-shell { display: block; }
  .app-sidebar { position: static; min-height: 0; margin-bottom: 14px; }
  .app-context-bar { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 640px) {
  html { font-size: 16px; }
  .landing { --landing-row-height: 4.75rem; --landing-row-gap: .625rem; --landing-window-height: 31.625rem; }
  .landing-header,
  .landing-header-inner,
  .app-header,
  .app-header-inner { height: 4.5rem; min-height: 4.5rem; }
  .landing-header-inner { padding: 0 1.25rem; }
  .app-header-inner { padding: 0 1.25rem; }
  .landing-brand { font-size: 1.25rem; }
  .trueapi-mark { width: 1.875rem; height: 1.875rem; }
  .landing-header-actions { gap: 1.25rem; }
  .landing-header-actions .landing-console { display: none; }
  .landing-header-actions button,
  .landing-header-actions .locale-picker-value { max-width: 7.5rem; font-size: .875rem; }
  .landing-login { white-space: nowrap; }
  .landing-login::before { display: none; }
  .landing-main { margin-top: 4.5rem; }
  .landing-hero { width: 100%; padding: 2rem 1.25rem 2.5rem; gap: 2.75rem; }
  .landing-copy h1 { font-size: 3.25rem; }
  .landing-benefits { display: grid; grid-template-columns: repeat(3, max-content); justify-content: space-between; gap: .5rem; margin-top: 1.5rem; font-size: .875rem; }
  .landing-benefits span { gap: .5rem; }
  .landing-benefits svg { width: 1.375rem; height: 1.375rem; }
  .landing-benefits i { display: none; }
  .landing-api-label { margin-top: 2rem; margin-left: 0; }
  .landing-endpoint { width: 100%; min-height: 3.5rem; padding: 0 1rem; }
  .landing-endpoint code { font-size: .9375rem; }
  .landing-cta-row { width: 100%; display: grid; grid-template-columns: 1fr; gap: 1rem; margin-top: 1.5rem; }
  .landing-primary-cta,
  .landing-secondary-cta { min-height: 3.5rem; font-size: 1.0625rem; }
  .landing-model-row { grid-template-columns: 3rem minmax(0,1fr) auto; grid-template-areas: "mark copy state" "mark prices state"; gap: .2rem .75rem; padding: .7rem .75rem; border-radius: .75rem; }
  .landing-provider-mark { width: 3rem; height: 3rem; border-radius: .75rem; }
  .landing-provider-mark img { width: 1.75rem; height: 1.75rem; }
  .landing-provider-mark.kimi img,
  .landing-provider-mark.xai img { width: 2rem; height: 2rem; }
  .landing-model-row strong { font-size: 1rem; }
  .landing-model-row small { gap: .375rem; font-size: .8125rem; }
  .landing-model-row small em { max-width: 5.625rem; padding: .0625rem .375rem; font-size: .625rem; }
  .landing-model-prices { justify-content: flex-start; gap: .625rem; font-size: .75rem; }
  .landing-model-prices b { font-size: .875rem; }
  .landing-model-state { gap: .625rem; }
  .landing-model-state b { font-size: 1.5rem; }
  .landing-view-models { font-size: 1.125rem; }
  .landing-guide { width: calc(100% - 2.5rem); padding: 4.25rem 0 5.125rem; }
  .landing-guide h2 { font-size: 2.5rem; }
  .landing-api-guide-page { width: calc(100% - 2.5rem); padding: 2.75rem 0 4rem; }
  .guide-heading h1 { font-size: 3rem; }
  .guide-heading > p:last-child { font-size: 1rem; }
  .guide-prerequisite { align-items: stretch; flex-direction: column; }
  .guide-prerequisite button { justify-content: center; }
  .guide-shell { margin-top: 1.5rem; border-radius: 1rem; }
  .guide-mode-tabs button { min-height: 3rem; padding: .625rem; font-size: .875rem; }
  .guide-workspace { min-height: 0; display: block; }
  .guide-sidebar { padding: .75rem; flex-direction: row; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--line); }
  .guide-sidebar button { min-width: max-content; }
  .guide-content { padding: 1.25rem; }
  .guide-panel-heading { flex-direction: column; }
  .guide-panel-heading > code { max-width: 100%; }
  .guide-steps { grid-template-columns: 1fr; }
  .guide-config-list > div { grid-template-columns: 1fr; gap: .35rem; }
  .guide-code pre { padding: 3.5rem 1rem 1rem; font-size: .75rem; }
  .landing-pricing-page { width: calc(100% - 2.5rem); padding: 2.75rem 0 4rem; }
  .pricing-heading h1 { font-size: 3rem; }
  .pricing-heading > p:not(.landing-kicker) { font-size: 1rem; }
  .pricing-shell { margin-top: 1.5rem; border-radius: 1rem; }
  .pricing-toolbar { padding: .875rem; }
  .pricing-provider-filters { flex-wrap: nowrap; overflow-x: auto; padding-bottom: .125rem; }
  .pricing-filter { min-height: 2.375rem; padding: .4rem .75rem; font-size: .8125rem; }
  .pricing-row { grid-template-columns: 1fr 1fr; padding: .625rem; }
  .pricing-row > div { padding: .625rem; }
  .pricing-provider-cell { min-height: 4rem; }
}

@media (max-width: 520px) {
  .landing-model-row small em { display: none; }
  .landing-model-state i { width: 7px; height: 7px; }
  .pricing-row { grid-template-columns: 1fr; }
  .pricing-row > div,
  .pricing-model-cell,
  .pricing-output-cell { grid-column: 1; }
  .summary { grid-template-columns: 1fr; }
  .summary-item,
  .summary-item:nth-of-type(odd) { padding: 10px 0; border-left: 0; border-top: 1px solid var(--line); }
  .summary-item:first-of-type { border-top: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}
