/* ============================================================
   不可视界线 · 设计令牌（Design Tokens）
   哥特 × 日系 × 毛玻璃观测台
   所有颜色/字体/间距/动效曲线集中在此，禁止在组件里硬编码色值。
   ============================================================ */

:root {
  /* === 背景层级（深渊夜曜系）=== */
  --bg-abyss: #09080D;
  --bg-abyss-soft: #0D0B13;
  --bg-nebula-crimson: rgba(225, 29, 72, 0.14);
  --bg-nebula-violet: rgba(109, 40, 217, 0.16);

  /* === 毛玻璃表面层级 === */
  --glass-panel: rgba(19, 17, 28, 0.68);
  --glass-elevated: rgba(28, 25, 42, 0.78);
  --glass-subtle: rgba(255, 255, 255, 0.03);
  --glass-hover: rgba(225, 29, 72, 0.08);
  --glass-inset: rgba(8, 7, 12, 0.55);

  /* === 结界微光边框 === */
  --border-glass: rgba(255, 255, 255, 0.10);
  --border-glass-strong: rgba(255, 255, 255, 0.16);
  --border-crimson-glow: rgba(244, 63, 94, 0.45);
  --border-violet-glow: rgba(139, 92, 246, 0.40);

  /* === 主题强调色 === */
  --accent-crimson: #E11D48;
  --accent-rose: #FB7185;
  --accent-violet: #8B5CF6;
  --accent-indigo: #6366F1;
  --accent-cyan: #22D3EE;

  /* === 文字层级（月银苍白系）=== */
  --text-primary: #F1F5F9;
  --text-secondary: #94A3B8;
  --text-muted: #64748B;
  --text-inverse: #0B0A10;

  /* === 状态语义色 === */
  --status-up: #10B981;
  --status-degraded: #F59E0B;
  --status-down: #F43F5E;
  --status-skipped: #64748B;
  --status-pending: #8B5CF6;

  /* === 字体栈（零外网：全部系统字体回退）=== */
  --font-display: 'Shippori Mincho', 'Noto Serif SC', 'Noto Serif CJK SC', 'Songti SC', 'SimSun', serif;
  --font-sans: 'Inter', 'HarmonyOS Sans SC', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'Cascadia Mono', 'Consolas', 'SFMono-Regular', ui-monospace, monospace;

  /* === 尺寸与节奏 === */
  --r-xs: 6px;
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 28px;
  --r-pill: 999px;
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 24px;
  --sp-6: 32px;
  --sp-7: 48px;
  --sp-8: 64px;
  --sidebar-w: 240px;
  --rail-w: 72px;
  --dock-h: 72px;
  --content-max: 1760px;
  --header-h: 64px;

  /* === 阴影 / 景深 === */
  --shadow-panel: 0 18px 48px -24px rgba(0, 0, 0, 0.92), 0 2px 0 rgba(255, 255, 255, 0.03) inset;
  --shadow-float: 0 28px 80px -32px rgba(0, 0, 0, 0.95);
  --shadow-crimson: 0 0 0 1px rgba(244, 63, 94, 0.32), 0 18px 50px -26px rgba(225, 29, 72, 0.75);
  --shadow-violet: 0 0 0 1px rgba(139, 92, 246, 0.30), 0 18px 50px -26px rgba(109, 40, 217, 0.72);

  /* === 动效曲线 === */
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --dur-fast: 140ms;
  --dur-base: 220ms;
  --dur-slow: 420ms;

  /* === 层级 === */
  --z-bg: 0;
  --z-content: 10;
  --z-nav: 40;
  --z-modal: 80;
  --z-toast: 90;
}

/* === 基础重置 === */
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg-abyss);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.6;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
h1, h2, h3, h4, h5, p, figure, dl, dd, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
img, svg { display: block; max-width: 100%; }
::selection { background: rgba(225, 29, 72, 0.34); color: #fff; }

h1, h2, h3 { font-family: var(--font-display); font-weight: 600; letter-spacing: 0.08em; line-height: 1.32; }

/* 等宽数字：实时跳动的毫秒数绝不引起布局抖动 */
.mono, .num { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-feature-settings: 'tnum' 1, 'zero' 1; }

/* 自定义滚动条 */
* { scrollbar-width: thin; scrollbar-color: rgba(139, 92, 246, 0.35) transparent; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(139, 92, 246, 0.28); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: rgba(244, 63, 94, 0.42); }

/* 键盘可达性：清晰的绯红光环 */
:focus-visible { outline: 2px solid rgba(244, 63, 94, 0.7); outline-offset: 2px; border-radius: 4px; }

/* 屏幕阅读器专用 */
.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;
}

/* === 无障碍：尊重减弱动效 === */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
html[data-motion='off'] *, html[data-motion='off'] *::before, html[data-motion='off'] *::after {
  animation-duration: 0.001ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: 0.001ms !important;
}

/* 启动占位（Vue 挂载后会被替换） */
.ih-boot {
  position: fixed; inset: 0; display: grid; place-content: center; justify-items: center;
  gap: var(--sp-5); color: var(--text-secondary);
  font-family: var(--font-display); letter-spacing: 0.22em; font-size: 13px;
}
.ih-boot-mark svg { animation: boot-spin 8s linear infinite; }
@keyframes boot-spin { to { transform: rotate(360deg); } }
