/* Codex 重置罗盘 - 样式表 */
/* 设计参考:Linear.app 深色设计体系(照葫芦画瓢,非复制) */
/* 签名元素:近黑底 + 顶部极光晕 + 细网格、小号大写 eyebrow 标签、
   渐变展示数字、半透玻璃卡片 + 内嵌高光、发丝级分隔线 */

:root {
  --bg: #090A10;
  --surface: rgba(255, 255, 255, 0.02);
  --surface-hover: rgba(255, 255, 255, 0.04);
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --inset-hi: inset 0 1px 0 0 rgba(255, 255, 255, 0.05);

  --violet: #8B5CF6;
  --violet-deep: #6D4AE8;
  --cyan: #22D3EE;
  --green: #34D399;
  --orange: #FBBF24;
  --red: #FB7185;

  --text: #F4F5F7;
  --text-2: #9BA3B4;
  --text-3: #7C8698;

  --accent-purple: var(--violet);   /* 兼容 app.js 内联引用 */
  --accent-cyan: var(--cyan);
  --semantic-green: var(--green);
  --semantic-orange: var(--orange);
  --semantic-red: var(--red);
  --text-primary: var(--text);
  --text-secondary: var(--text-2);
  --border-base: var(--border);
  --bg-base: var(--bg);

  --font-main: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

/* 基础 */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-main);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
}
::selection { background: rgba(139, 92, 246, 0.35); }

/* 键盘可达性 */
.skip-link {
  position: fixed; top: -100px; left: 1rem; z-index: 200;
  padding: 0.6rem 1.1rem; border-radius: 8px;
  background: var(--violet); color: #fff; font-size: 0.85rem; font-weight: 600;
  text-decoration: none; transition: top 0.2s var(--ease);
}
.skip-link:focus { top: 1rem; }
:focus-visible { outline: 2px solid var(--violet); outline-offset: 2px; border-radius: 4px; }
a:focus-visible, button:focus-visible, summary:focus-visible { outline-offset: 3px; }
main:focus { outline: none; }

/* 深色滚动条 */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #2A2F3D; border-radius: 6px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: #3A4152; }
html { scrollbar-color: #2A2F3D var(--bg); scrollbar-width: thin; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  html { scroll-behavior: auto; }
}

/* 顶部极光 + 细网格(Linear hero 签名背景) */
body::before {
  content: '';
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(ellipse 70% 45% at 50% -8%, rgba(109, 74, 232, 0.28), transparent 65%),
    radial-gradient(ellipse 40% 30% at 72% 4%, rgba(34, 211, 238, 0.07), transparent 70%);
  transform: translate3d(calc(var(--mx, 0) * 18px), calc(var(--my, 0) * 10px), 0) scale(1.05);
  transition: transform 0.3s var(--ease);
  will-change: transform;
}
body::after {
  content: '';
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 90% 55% at 50% 0%, black 20%, transparent 75%);
  mask-image: radial-gradient(ellipse 90% 55% at 50% 0%, black 20%, transparent 75%);
}

/* 排版 */
h1, h2, h3, h4 { font-weight: 650; line-height: 1.25; margin: 0 0 0.5em; letter-spacing: -0.01em; }
p { margin: 0 0 1em; }
p, li { hanging-punctuation: first allow-end; }
a { color: var(--cyan); text-decoration: none; transition: color 0.2s var(--ease); }
a:hover { color: #7FE7F7; text-decoration: none; }
a[target="_blank"]::after { content: "↗"; font-size: 0.82em; margin-left: 0.15em; opacity: 0.7; }
input, textarea { caret-color: var(--violet); }
a:focus-visible, button:focus-visible, summary:focus-visible, input:focus-visible {
  outline: 2px solid var(--violet); outline-offset: 2px; border-radius: 4px;
}

/* 发丝分隔线(替代原曲线分隔带) */
.hairline {
  border: none; height: 1px; margin: 0 auto; max-width: 1080px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.09) 30%, rgba(255, 255, 255, 0.09) 70%, transparent);
}
hr:not(.hairline) { border: none; border-top: 1px solid var(--border); margin: 2rem 0; }

.container { max-width: 1080px; margin: 0 auto; padding: 0 1.5rem; }

/* 区块标题组:eyebrow + 标题 + 副述 */
section { padding: clamp(3.5rem, 7vw, 6rem) 0; }
.section-eyebrow {
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--violet); margin-bottom: 0.75rem;
}
.section-title { font-size: clamp(1.6rem, 3.5vw, 2.1rem); margin-bottom: 0.5rem; }
.section-sub { color: var(--text-2); font-size: 0.95rem; margin-bottom: 2.5rem; max-width: 560px; }

/* 顶栏:毛玻璃 + 发丝底线 */
header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(9, 10, 16, 0.72);
  backdrop-filter: blur(14px) saturate(1.4);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  border-bottom: 1px solid var(--border);
}
header .container { display: flex; align-items: center; justify-content: space-between; padding: 0.9rem 1.5rem; }
.header-brand h1 { font-size: 1.05rem; font-weight: 650; letter-spacing: -0.01em; }
.header-brand small { display: block; font-size: 0.7rem; color: var(--text-3); font-weight: 400; letter-spacing: 0.02em; }
.header-nav { display: flex; gap: 1.75rem; font-size: 0.85rem; }
.header-nav a { color: var(--text-2); padding: 0.25rem 0; position: relative; transition: color 0.2s var(--ease); }
.header-nav a:hover { color: var(--text); }
.header-nav a::after { content: attr(data-label); }
@media (max-width: 768px) {
  header .container { flex-wrap: wrap; row-gap: 0.5rem; }
  .header-nav { font-size: 0.8rem; gap: 1.1rem; flex-wrap: wrap; }
}

/* Hero:极光下的渐变展示数字 */
.hero { padding: clamp(5rem, 10vw, 8rem) 0 clamp(3.5rem, 7vw, 5.5rem); text-align: center; }
.hero-eyebrow {
  font-size: 0.75rem; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--text-2); margin-bottom: 1.25rem;
}
.hero-eyebrow b { color: var(--violet); font-weight: 600; }
.hero-display {
  font-size: clamp(4.5rem, 13vw, 8.5rem);
  font-weight: 700; letter-spacing: -0.045em; line-height: 1;
  font-variant-numeric: tabular-nums;
  margin: 0 0 0.5rem;
  background: linear-gradient(180deg, #FFFFFF 20%, rgba(167, 139, 250, 0.75) 85%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  animation: heroGlow 4.5s ease-in-out infinite;
}
.hero-display .hero-unit {
  font-size: 0.22em; font-weight: 500; letter-spacing: 0.02em;
  -webkit-text-fill-color: var(--text-2); color: var(--text-2);
  margin-left: 0.5rem; vertical-align: 0.55em;
}
@keyframes heroGlow {
  0%, 100% { filter: drop-shadow(0 0 18px rgba(139, 92, 246, 0.25)); }
  50% { filter: drop-shadow(0 0 34px rgba(139, 92, 246, 0.45)); }
}
.hero-subtitle { margin-top: 1.75rem; }
#hero-prob { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.prob-box {
  min-width: 168px; padding: 1.1rem 1.75rem;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; box-shadow: var(--inset-hi);
  transition: border-color 0.25s var(--ease), background 0.25s var(--ease), transform 0.25s var(--ease);
}
.prob-box:hover { border-color: var(--border-strong); background: var(--surface-hover); transform: translateY(-2px); }
.prob-box strong {
  display: block; font-size: 1.9rem; font-weight: 700; letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  background: linear-gradient(135deg, var(--violet), var(--cyan));
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.prob-box span { font-size: 0.78rem; color: var(--text-3); letter-spacing: 0.04em; }
.hero-note { font-size: 0.82rem; color: var(--text-3); margin-top: 1.75rem; max-width: 520px; margin-left: auto; margin-right: auto; }

/* 算法依据展开 */
.algorithm-legend { font-size: 0.85rem; color: var(--text-2); max-width: 620px; margin: 1rem auto 0; }
.algorithm-legend summary { color: var(--cyan); cursor: pointer; list-style-position: inside; }
.algorithm-legend[open] summary { margin-bottom: 0.5rem; }
#algorithm-desc { text-align: left; padding: 1rem 1.25rem; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; }

/* 时间线 */
.timeline-header { margin-bottom: 2.25rem; }
.timeline-count { font-size: 0.9rem; color: var(--text-2); }
.timeline-count b { color: var(--text); font-weight: 650; font-variant-numeric: tabular-nums; }
.timeline-content { position: relative; }
.timeline-content::before {
  content: ''; position: absolute; left: 19px; top: 6px; bottom: 6px; width: 1px;
  background: linear-gradient(to bottom, rgba(139, 92, 246, 0.6), rgba(255, 255, 255, 0.07) 40%, rgba(255, 255, 255, 0.07));
}
.timeline-item {
  position: relative; padding: 0.9rem 1.25rem 0.9rem 3.5rem;
  margin-bottom: 0.5rem; border-radius: 12px; border: 1px solid transparent;
  transition: background 0.25s var(--ease), border-color 0.25s var(--ease);
}
.timeline-item:hover { background: var(--surface); border-color: var(--border); }
.timeline-dot {
  position: absolute; left: 14px; top: 1.55rem;
  width: 11px; height: 11px; border-radius: 50%;
  background: var(--violet);
  box-shadow: 0 0 0 4px var(--bg), 0 0 12px rgba(139, 92, 246, 0.8);
}
.timeline-dot.type-boost { background: var(--cyan); box-shadow: 0 0 0 4px var(--bg), 0 0 12px rgba(34, 211, 238, 0.8); }
.timeline-dot.type-unlock { background: var(--green); box-shadow: 0 0 0 4px var(--bg), 0 0 12px rgba(52, 211, 153, 0.8); }
.timeline-dot.type-banked { background: var(--orange); box-shadow: 0 0 0 4px var(--bg), 0 0 12px rgba(251, 191, 36, 0.8); }
.timeline-dot.type-preview { background: transparent; border: 2px dashed var(--violet); box-shadow: 0 0 0 4px var(--bg); width: 9px; height: 9px; }
.timeline-meta { font-size: 0.8rem; color: var(--text-3); margin-bottom: 0.3rem; font-variant-numeric: tabular-nums; }
.timeline-meta .tl-badge {
  display: inline-block; padding: 0.1rem 0.55rem; border-radius: 999px;
  font-size: 0.72rem; font-weight: 600; margin: 0 0.5rem; letter-spacing: 0.02em;
  background: rgba(139, 92, 246, 0.14); color: #C4B5FD;
  border: 1px solid rgba(139, 92, 246, 0.25);
}
.timeline-meta .tl-badge-boost { background: rgba(34, 211, 238, 0.12); color: #67E8F9; border-color: rgba(34, 211, 238, 0.3); }
.timeline-meta .tl-badge-unlock { background: rgba(52, 211, 153, 0.12); color: #6EE7B7; border-color: rgba(52, 211, 153, 0.3); }
.timeline-meta .tl-badge-banked { background: rgba(251, 191, 36, 0.12); color: #FCD34D; border-color: rgba(251, 191, 36, 0.3); }
.timeline-meta .tl-badge-preview { background: transparent; border-style: dashed; }
.timeline-meta .tl-rel { color: var(--text-3); }
.timeline-title { font-size: 1.02rem; font-weight: 600; margin-bottom: 0.35rem; letter-spacing: -0.01em; }
.timeline-summary, .timeline-summary-preview { font-size: 0.92rem; color: var(--text-2); margin-bottom: 0.4rem; line-height: 1.7; }
.timeline-preview-note { display: block; font-size: 0.78rem; color: var(--orange); margin-bottom: 0.25rem; }
.timeline-link { font-size: 0.84rem; display: inline-flex; align-items: center; gap: 0.2rem; }

/* 时间线工具条(筛选/搜索/排序) */
.tl-controls { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; justify-content: space-between; margin-top: 1rem; }
.tl-chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.tl-chip {
  padding: 0.35rem 0.9rem; border-radius: 999px; font-size: 0.8rem; font-weight: 550;
  background: var(--surface); color: var(--text-2); border: 1px solid var(--border);
  cursor: pointer; transition: all 0.2s var(--ease);
}
.tl-chip:hover { border-color: var(--border-strong); color: var(--text); }
.tl-chip.on { background: rgba(139, 92, 246, 0.18); border-color: rgba(139, 92, 246, 0.5); color: #DDD6FE; }
.tl-tools { display: flex; gap: 0.5rem; flex: 1; justify-content: flex-end; min-width: 240px; }
.tl-search { flex: 1; max-width: 280px; padding: 0.45rem 0.85rem; font-size: 0.85rem; }
.tl-sort { white-space: nowrap; padding: 0.45rem 0.9rem; font-size: 0.82rem; }
.tl-hit { font-size: 0.78rem; color: var(--text-3); min-height: 1.1em; margin: 0.4rem 0 0.25rem; }
.tl-empty { text-align: center; color: var(--text-2); padding: 2.5rem 1rem; border: 1px dashed var(--border); border-radius: 12px; font-size: 0.9rem; }
.tl-month { font-size: 0.76rem; font-weight: 650; letter-spacing: 0.1em; color: var(--text-3); margin: 1.4rem 0 0.2rem 3.5rem; }
.tl-actions { display: flex; gap: 0.9rem; align-items: center; }
.tl-copy {
  background: none; border: none; color: var(--text-3); font-size: 0.8rem;
  cursor: pointer; padding: 0.15rem 0.45rem; border-radius: 6px;
  transition: color 0.2s var(--ease), background 0.2s var(--ease);
}
.tl-copy:hover { color: var(--text); background: var(--surface-hover); }
.tl-expand { display: block; margin: 1.25rem auto 0; }
.tl-stat-link {
  background: none; border: none; color: inherit; font: inherit;
  cursor: pointer; padding: 0.1rem 0.3rem; border-radius: 6px;
  transition: background 0.2s var(--ease);
}
.tl-stat-link:hover { background: var(--surface-hover); }
.timeline-item.is-preview { border: 1px dashed rgba(139, 92, 246, 0.35); background: rgba(139, 92, 246, 0.03); }
.timeline-dot { transition: transform 0.2s var(--ease); }
.timeline-item:hover .timeline-dot { transform: scale(1.35); }

/* 回到顶部 */
#back-to-top {
  position: fixed; right: 1.25rem; bottom: 1.25rem; z-index: 120;
  width: 44px; height: 44px; border-radius: 50%;
  background: rgba(20, 22, 32, 0.75); border: 1px solid var(--border-strong);
  color: var(--text); font-size: 1.05rem; cursor: pointer;
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  opacity: 0; pointer-events: none; transform: translateY(8px);
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease), border-color 0.25s var(--ease);
}
#back-to-top.show { opacity: 1; pointer-events: auto; transform: none; }
#back-to-top:hover { border-color: var(--violet); }

/* 图表容器 */
.svg-chart { width: 100%; overflow-x: auto; }
.svg-chart svg { max-width: 800px; margin: 0 auto; display: block; }
.svg-bar { cursor: pointer; fill: var(--violet); opacity: 0.85; transition: opacity 0.2s var(--ease); }
.svg-bar:hover { opacity: 1; fill: #A78BFA; }
.svg-bar.highlight { fill: var(--orange); opacity: 1; }
.svg-bar-label { font: 11px var(--font-main); fill: var(--text-3); text-anchor: middle; }
.svg-rhythm-legend { font-size: 0.88rem; color: var(--text-2); text-align: center; margin-top: 1.5rem; font-variant-numeric: tabular-nums; }

/* 计算器卡片 */
.calc-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; padding: 1.5rem 1.75rem; margin-bottom: 1.25rem;
  box-shadow: var(--inset-hi);
  transition: border-color 0.25s var(--ease);
}
.calc-card:hover { border-color: var(--border-strong); }
.calc-label { display: block; font-size: 0.92rem; font-weight: 600; margin-bottom: 0.35rem; }
.calc-desc { font-size: 0.8rem; color: var(--text-3); display: block; margin-bottom: 0.85rem; }
.input-field {
  width: 100%; padding: 0.7rem 1rem;
  background: rgba(0, 0, 0, 0.25); border: 1px solid var(--border);
  border-radius: 10px; color: var(--text); font-size: 0.95rem;
  font-family: var(--font-main);
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
  color-scheme: dark;
}
.input-field:focus { border-color: var(--violet); outline: none; box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.18); }
.range-slider {
  width: 100%; height: 6px; border-radius: 3px;
  background: linear-gradient(to right, var(--violet), var(--cyan));
  -webkit-appearance: none; appearance: none; cursor: pointer;
}
.range-slider::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 20px; height: 20px; border-radius: 50%;
  background: #fff; border: none; cursor: pointer;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.5), 0 0 0 4px rgba(139, 92, 246, 0.2);
}
.range-slider::-moz-range-thumb {
  width: 20px; height: 20px; border-radius: 50%;
  background: #fff; cursor: pointer; border: none;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.5), 0 0 0 4px rgba(139, 92, 246, 0.2);
}
.range-value { margin-top: 0.6rem; font-size: 0.88rem; color: var(--text-2); }
.range-value strong { color: var(--cyan); font-variant-numeric: tabular-nums; }

/* 按钮:Linear 风次级按钮 + 渐变主按钮 */
.button-group { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.btn {
  padding: 0.6rem 1.2rem; border-radius: 10px; font-size: 0.88rem; font-weight: 550;
  cursor: pointer; border: 1px solid var(--border);
  background: var(--surface-hover); color: var(--text);
  box-shadow: var(--inset-hi);
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease), transform 0.15s var(--ease);
  font-family: var(--font-main);
}
.btn:hover { background: rgba(255, 255, 255, 0.07); border-color: var(--border-strong); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary {
  background: linear-gradient(180deg, #8B5CF6, #6D4AE8); border-color: rgba(139, 92, 246, 0.5);
  color: #fff; box-shadow: 0 0 20px rgba(109, 74, 232, 0.35), var(--inset-hi);
}
.btn-primary:hover { background: linear-gradient(180deg, #9D75F8, #7A5AEB); }
.btn-secondary { background: var(--surface-hover); color: var(--text-2); }
.btn-secondary:hover { color: var(--text); }
.btn-danger { background: rgba(251, 113, 133, 0.12); border-color: rgba(251, 113, 133, 0.35); color: var(--red); box-shadow: none; }
.btn-danger:hover { background: rgba(251, 113, 133, 0.2); border-color: rgba(251, 113, 133, 0.55); }

/* 健康判定 */
.result-status { font-size: 1.15rem; font-weight: 650; margin-bottom: 1rem; display: flex; align-items: center; gap: 0.6rem; letter-spacing: -0.01em; }
.status-green { color: var(--green); }
.status-orange { color: var(--orange); }
.status-red { color: var(--red); }
.progress-bar { margin: 0.75rem 0; }
.progress-track {
  height: 8px; width: 100%; background: rgba(0, 0, 0, 0.3);
  border-radius: 999px; overflow: hidden; display: flex; gap: 3px;
  border: 1px solid var(--border);
}
.progress-fill {
  height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, var(--violet), var(--cyan));
  transition: width 0.35s var(--ease);
}
.banked-card {
  background: rgba(251, 191, 36, 0.06); border: 1px solid rgba(251, 191, 36, 0.3);
  border-radius: 12px; padding: 1rem; margin-top: 1rem; display: none;
}
.banked-card.visible { display: block; }
.banked-countdown { font-size: 1.2rem; font-weight: 650; color: var(--orange); text-align: center; margin-top: 0.5rem; font-variant-numeric: tabular-nums; }

/* Q&A 手风琴 */
.accordion { border: 1px solid var(--border); border-radius: 14px; overflow: hidden; background: var(--surface); box-shadow: var(--inset-hi); }
.accordion-item { border-bottom: 1px solid var(--border); }
.accordion-item:last-child { border-bottom: none; }
.accordion-header {
  width: 100%; padding: 1.05rem 1.5rem;
  background: none; border: none; color: var(--text);
  font-size: 0.95rem; font-weight: 550; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  transition: background 0.2s var(--ease);
  list-style: none;
}
.accordion-header::-webkit-details-marker { display: none; }
.accordion-header:hover { background: var(--surface-hover); }
.accordion-header::after {
  content: '+'; font-size: 1.25rem; font-weight: 400; color: var(--text-3);
  transition: transform 0.3s var(--ease), color 0.2s var(--ease);
  flex-shrink: 0;
}
.accordion-item[open] .accordion-header::after { transform: rotate(45deg); color: var(--violet); }
.accordion-content { padding: 0 1.5rem 1.25rem; color: var(--text-2); font-size: 0.92rem; line-height: 1.75; display: none; }
.accordion-item[open] .accordion-content { display: block; }
.accordion-content table th { color: var(--text-2); font-weight: 600; font-size: 0.82rem; letter-spacing: 0.04em; }
.accordion-content table td { font-variant-numeric: tabular-nums; }

/* 页脚 */
footer {
  padding: 3rem 0 4rem; text-align: center;
  border-top: 1px solid var(--border);
  color: var(--text-3); font-size: 0.82rem;
}
footer p { margin-bottom: 0.4rem; }
footer a { color: var(--text-2); }
footer a:hover { color: var(--cyan); }

/* 响应式 */
@media (max-width: 768px) {
  body { font-size: 14px; }
  .hero-display { letter-spacing: -0.035em; }
  .timeline-item { padding-left: 2.75rem; }
  .timeline-dot { left: 10px; }
  .timeline-dot.type-preview { left: 10px; }
  .timeline-content::before { left: 15px; }
  .prob-box { min-width: 140px; padding: 0.9rem 1.25rem; }
  .calc-card { padding: 1.25rem; }
  .tl-month { margin-left: 2.75rem; }
  .tl-tools { justify-content: stretch; min-width: 0; }
  .tl-search { max-width: none; }
  #back-to-top { right: 1rem; bottom: 1rem; }
}

/* 近 30 天统计 chips */
.stat-chips { display: flex; flex-wrap: wrap; gap: 0.75rem; justify-content: center; margin-top: 1rem; }
.stat-chip {
  min-width: 130px; padding: 0.85rem 1.25rem; text-align: center;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; box-shadow: var(--inset-hi);
  transition: border-color 0.25s var(--ease), transform 0.25s var(--ease);
}
.stat-chip:hover { border-color: var(--border-strong); transform: translateY(-2px); }
.stat-chip b { display: block; font-size: 1.35rem; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; color: var(--text); }
.stat-chip span { font-size: 0.74rem; color: var(--text-3); letter-spacing: 0.03em; }

/* 星期分布小图 */
.wd-block { margin-top: 1.1rem; padding-top: 0.9rem; border-top: 1px solid var(--border); }
.wd-title { font-size: 0.78rem; font-weight: 650; letter-spacing: 0.08em; color: var(--text-3); margin: 0 0 0.6rem; }
.wd-chart { display: flex; flex-direction: column; gap: 0.3rem; }
.wd-row { display: flex; align-items: center; gap: 0.6rem; font-size: 0.78rem; }
.wd-name { width: 2.6em; color: var(--text-3); flex-shrink: 0; }
.wd-track { flex: 1; height: 8px; border-radius: 4px; background: rgba(255, 255, 255, 0.04); overflow: hidden; }
.wd-fill { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, var(--violet), var(--cyan)); }
.wd-count { width: 1.6em; text-align: right; color: var(--text-2); font-variant-numeric: tabular-nums; flex-shrink: 0; }
.insight-line { font-size: 0.82rem; color: var(--cyan); margin: 0.9rem 0 0; }
.insight-line:empty { display: none; }

/* 数据时间戳 */
.data-stamp { font-size: 0.76rem; color: var(--text-3); font-variant-numeric: tabular-nums; }
.data-stamp:empty { display: none; }

/* 窄屏图表横向滚动阴影提示 */
.svg-chart {
  overflow-x: auto;
  background:
    linear-gradient(to right, var(--bg), var(--bg)),
    linear-gradient(to right, var(--bg), var(--bg)),
    radial-gradient(farthest-side at 0 50%, rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0)),
    radial-gradient(farthest-side at 100% 50%, rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0));
  background-repeat: no-repeat;
  background-size: 36px 100%, 36px 100%, 12px 100%, 12px 100%;
  background-position: 0 0, 100% 0, 0 0, 100% 0;
  background-attachment: local, local, scroll, scroll;
}

/* 滑块刻度 */
.range-ticks {
  display: flex; justify-content: space-between;
  font-size: 0.68rem; color: var(--text-3);
  margin-top: 0.15rem; padding: 0 2px;
  font-variant-numeric: tabular-nums;
}
.pct-num { color: var(--cyan); font-weight: 600; font-variant-numeric: tabular-nums; }
.pct-num:empty { display: none; }

/* 清除按钮 armed 态 */
.btn-danger.armed { background: var(--red); color: #fff; border-color: var(--red); }

/* Toast 轻提示 */
.toast {
  position: fixed; left: 50%; bottom: 2rem; z-index: 150;
  transform: translate(-50%, 12px);
  padding: 0.65rem 1.3rem; border-radius: 10px;
  background: rgba(21, 24, 36, 0.92); border: 1px solid var(--border-strong);
  color: var(--text); font-size: 0.85rem;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  opacity: 0; pointer-events: none;
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* 数据滞后警示条 */
.stale-banner {
  position: sticky; top: 0; z-index: 110;
  padding: 0.55rem 1rem; text-align: center;
  font-size: 0.82rem; color: #FCD34D;
  background: rgba(120, 80, 10, 0.28);
  border-bottom: 1px solid rgba(251, 191, 36, 0.35);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}

/* ===== Wave H · 微体验 ===== */

/* 86 顶部滚动进度条(合成器友好的 scaleX) */
#scroll-progress {
  position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 120;
  background: linear-gradient(90deg, var(--violet), var(--cyan));
  transform: scaleX(0); transform-origin: left center;
}

/* 87 区块淡入(IntersectionObserver 驱动;无 JS 或减弱动态时内容始终可见) */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.6s var(--ease), transform 0.6s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* 90 长文行高微调 */
.accordion-content p, .timeline-item p { line-height: 1.85; }

/* 92 页脚版本号 */
.site-version { font-size: 0.75rem; color: var(--text-3); margin-top: 0.5rem; }

/* 98 SVG 图表性能微调:布局/绘制隔离 + 网格线 crispEdges */
.svg-chart { contain: layout paint; }
.svg-chart line { shape-rendering: crispEdges; }

/* 94 打印样式:白底黑字、展开手风琴、外链显示地址、装饰元素隐藏 */
@media print {
  :root { --text: #111111; --text-2: #333333; --text-3: #555555; --border-base: #CCCCCC; }
  body { background: #FFFFFF; color: #111111; }
  header { position: static !important; background: none !important; backdrop-filter: none !important; -webkit-backdrop-filter: none !important; border-bottom: 1px solid #CCCCCC !important; }
  body::before, body::after,
  .skip-link, #scroll-progress, #back-to-top, .toast, .stale-banner,
  .header-nav, .tl-controls, .btn, button, .button-group,
  .algorithm-legend, .range-ticks, .wd-chart { display: none !important; }
  .reveal { opacity: 1 !important; transform: none !important; }
  .accordion-content { display: block !important; }
  details > *:not(summary) { display: block !important; }
  #hero-hour, .nf-code { -webkit-text-fill-color: currentColor; color: #111111 !important; background: none !important; }
  a { color: #111111; }
  a[target="_blank"]::after { content: " (" attr(href) ")"; font-size: 0.75em; opacity: 0.7; margin-left: 0.2em; }
  section, .calc-card, .timeline-item, .accordion-item { break-inside: avoid; }
  main, .container { max-width: 100% !important; }
}
