/* 方案A「终端 Terminal」 design tokens. Every colour, size and font used by the pages comes from here. */
:root {
  color-scheme: dark;

  /* Ground and surfaces */
  --bg: #0A0D12;
  --bg-2: #0C1015;          /* side nav, right rail */
  --panel: #11151C;         /* cards, panels */
  --panel-2: #171C25;       /* raised, hover, selected row */
  --panel-3: #0E1218;       /* card footers, notes */

  /* Lines */
  --line: #232A35;
  --line-2: #2F3845;        /* control borders */
  --line-soft: #1B212B;     /* inner dividers */

  /* Text (all pass 4.5:1 on --panel) */
  --text: #E7EAF0;
  --text-2: #9AA3B2;
  --text-3: #7D8696;

  /* Accent and states */
  --accent: #F5A524;
  --accent-hi: #FFC15A;
  --on-accent: #1A1204;
  --accent-soft: rgba(245, 165, 36, 0.10);
  --accent-line: #3A2F1A;
  --live: #2FD98F;
  --alert: #FF5D5D;
  --alert-soft: #FF8A8A;
  --alert-bg: #170F12;
  --alert-line: #5A2A2A;
  --info: #4DA3FF;

  /* Neutral result chip */
  --o-neutral-bg: #E8EAEE;
  --o-neutral-fg: #14171C;
  --rainbow: linear-gradient(135deg, #ff39f6, #37d8ff 22%, #60ff9b 43%, #ffe45f 62%, #ff6a3d 80%, #ff39f6);

  /* Type */
  --font: 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', 'Hiragino Sans GB', system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, Consolas, 'Courier New', monospace;
  --fs-xs: 12px;   /* smallest allowed for Chinese text */
  --fs-sm: 13px;
  --fs-md: 14px;
  --fs-lg: 16px;
  --fs-xl: 20px;
  --fs-2xl: 26px;

  /* Shape and spacing (4-px grid) */
  --r-1: 4px;
  --r-2: 6px;
  --r-3: 10px;
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 24px;
  --sp-6: 32px;

  /* Layout */
  --top-h: 56px;
  --nav-w: 208px;
  --rail-w: 300px;
  --tab-h: 60px;
  --page-pad: 24px;
  --safe-b: env(safe-area-inset-bottom, 0px);

  /* Motion */
  --ease: cubic-bezier(.2, .7, .2, 1);
  --dur: 160ms;
}

@media (max-width: 767px) {
  :root {
    --top-h: 52px;
    --page-pad: 16px;
  }
}
