/* ==========================================================================
   DeepApi · 基础层
   设计基调：黑白中性色、克制的层级、留白优先、参考 Claude / ChatGPT 的干净质感
   ========================================================================== */

:root {
  /* 背景层级 */
  --bg:            #ffffff;
  --bg-subtle:     #f7f7f7;
  --bg-muted:      #f0f0f0;
  --bg-inset:      #e9e9e9;
  --bg-overlay:    rgba(17, 17, 17, .38);

  /* 描边 */
  --border:        #e6e6e6;
  --border-strong: #d2d2d2;

  /* 文字 */
  --text:          #0d0d0d;
  --text-2:        #575757;
  --text-3:        #8c8c8c;
  --text-invert:   #ffffff;

  /* 主色（中性黑） */
  --accent:        #111111;
  --accent-hover:  #000000;
  --accent-fg:     #ffffff;
  --accent-soft:   #f2f2f2;

  /* 语义色（保持低饱和，避免破坏中性调性） */
  --positive:      #1f7a4d;
  --positive-soft: #eaf5ef;
  --negative:      #a33a2f;
  --negative-soft: #fbeeec;
  --warning:       #8a6a15;
  --warning-soft:  #fbf3e0;

  /* 圆角 */
  --r-xs: 6px;
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 24px;
  --r-full: 999px;

  /* 阴影 */
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, .04);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, .06), 0 1px 2px rgba(0, 0, 0, .04);
  --shadow-md: 0 6px 20px rgba(0, 0, 0, .07);
  --shadow-lg: 0 18px 48px rgba(0, 0, 0, .12);

  /* 尺寸 */
  --page-max: 1120px;
  --header-h: 60px;

  /* 动效 */
  --ease: cubic-bezier(.32, .72, 0, 1);
  --dur: .18s;

  /* 字体 */
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Inter", "PingFang SC",
               "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", "JetBrains Mono", Menlo,
               Consolas, "Liberation Mono", monospace;
}

[data-theme="dark"] {
  --bg:            #0b0b0b;
  --bg-subtle:     #131313;
  --bg-muted:      #1a1a1a;
  --bg-inset:      #232323;
  --bg-overlay:    rgba(0, 0, 0, .6);

  --border:        #262626;
  --border-strong: #3b3b3b;

  --text:          #f4f4f4;
  --text-2:        #a6a6a6;
  --text-3:        #757575;
  --text-invert:   #0b0b0b;

  --accent:        #f4f4f4;
  --accent-hover:  #ffffff;
  --accent-fg:     #0b0b0b;
  --accent-soft:   #1f1f1f;

  --positive:      #5dbf8a;
  --positive-soft: #13251c;
  --negative:      #e08b80;
  --negative-soft: #271513;
  --warning:       #d8b45e;
  --warning-soft:  #26200f;

  --shadow-xs: 0 1px 2px rgba(0, 0, 0, .5);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, .55);
  --shadow-md: 0 6px 20px rgba(0, 0, 0, .6);
  --shadow-lg: 0 18px 48px rgba(0, 0, 0, .7);
}

/* ------------------------------------------------------------------ *
   重置
   ------------------------------------------------------------------ */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 { margin: 0; font-weight: 600; letter-spacing: -.02em; line-height: 1.25; }
h1 { font-size: 40px; }
h2 { font-size: 28px; }
h3 { font-size: 20px; }
h4 { font-size: 16px; }

p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }

a { color: inherit; text-decoration: none; transition: color var(--dur) var(--ease), opacity var(--dur) var(--ease); }
a:hover { color: var(--text-2); }

img, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: none; padding: 0; }

code, pre, kbd { font-family: var(--font-mono); font-size: .875em; }

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

:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 2px;
  border-radius: var(--r-xs);
}

/* 滚动条 */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border: 3px solid var(--bg);
  border-radius: var(--r-full);
}
::-webkit-scrollbar-thumb:hover { background: var(--text-3); }

/* ------------------------------------------------------------------ *
   布局骨架
   ------------------------------------------------------------------ */

.page {
  width: 100%;
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 0 24px;
}

.page--wide { max-width: 1320px; }

.section { padding: 88px 0; }
.section--tight { padding: 56px 0; }
.section--line { border-top: 1px solid var(--border); }

.stack   { display: flex; flex-direction: column; gap: 16px; }
.stack-8 { display: flex; flex-direction: column; gap: 8px; }
.stack-24{ display: flex; flex-direction: column; gap: 24px; }
.row     { display: flex; align-items: center; gap: 12px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.wrap    { flex-wrap: wrap; }
.grow    { flex: 1 1 auto; min-width: 0; }
.mono    { font-family: var(--font-mono); }

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

/* ------------------------------------------------------------------ *
   文字工具类
   ------------------------------------------------------------------ */

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-3);
}

.muted   { color: var(--text-2); }
.dim     { color: var(--text-3); }
.strong  { font-weight: 600; }
.tiny    { font-size: 12px; }
.small   { font-size: 13px; }
.lead    { font-size: 17px; line-height: 1.65; color: var(--text-2); }
.center  { text-align: center; }
.nowrap  { white-space: nowrap; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.section-head { max-width: 640px; margin: 0 auto 48px; text-align: center; }
.section-head h2 { margin-bottom: 12px; }

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

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

@media (max-width: 768px) {
  body { font-size: 14.5px; }
  h1 { font-size: 30px; }
  h2 { font-size: 23px; }
  h3 { font-size: 18px; }
  .page { padding: 0 18px; }
  .section { padding: 60px 0; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: minmax(0, 1fr); }
  .section-head { margin-bottom: 32px; }
}
