/* ============================================================
   郭掌门 · BigModel 统一主题层（持续学习平台）
   令牌基准 = open.bigmodel.cn / 传播系统 module-nav.js
   主色 #134CFF · 页面 #F5F7FA/白 · 线 #EBEEF5 · 墨 #1D2129
   加载顺序：styles.css 之后引入，只做令牌覆盖与少量组件微调
   ============================================================ */

:root {
  --bg: #f5f7fa;
  --surface: #ffffff;
  --surface-soft: #f7f8fa;
  --ink: #1d2129;
  --muted: #86909c;
  --line: #ebeef5;
  --line-strong: #e4e7ed;

  /* 品牌主色：原 teal 家族整体映射到 BigModel 蓝 */
  --teal: #134cff;
  --teal-soft: #eaf0ff;

  --orange: #f77234;
  --orange-soft: #fff3ec;
  --blue: #134cff;
  --blue-soft: #eaf0ff;
  --amber: #d25f00;
  --amber-soft: #fff7e8;
  --violet: #722ed1;
  --violet-soft: #f3ecff;
  --red: #f53f3f;
  --red-soft: #ffecec;

  --shadow: 0 4px 16px rgba(29, 33, 41, 0.06);
  --radius: 10px;

  /* 统一字号体系（对齐 portal.html --fs-*） */
  --fs-body: 15px;
  --fs-small: 13.5px;
  --fs-title: 20px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC",
    "Microsoft YaHei", "Noto Sans SC", sans-serif;
  font-size: var(--fs-body);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
}

/* ---------- 顶部导航：白底细线，对齐传播系统 ---------- */
.app-header {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  box-shadow: none;
}

.app-header .brand,
.app-header a,
.app-header button {
  color: var(--ink);
}

/* ---------- 交互曲线：全站统一 ---------- */
button,
a,
input,
select,
textarea,
.card,
.tag,
[role="button"] {
  transition: color 0.2s cubic-bezier(0.645, 0.045, 0.355, 1),
    background-color 0.2s cubic-bezier(0.645, 0.045, 0.355, 1),
    border-color 0.2s cubic-bezier(0.645, 0.045, 0.355, 1),
    box-shadow 0.2s cubic-bezier(0.645, 0.045, 0.355, 1);
}

/* ---------- 主按钮：品牌蓝 ---------- */
button[class*="primary"],
.btn-primary,
.button-primary {
  background: #134cff;
  border-color: #134cff;
  color: #fff;
}

button[class*="primary"]:hover:not(:disabled),
.btn-primary:hover:not(:disabled),
.button-primary:hover:not(:disabled) {
  background: #0b3fe8;
  border-color: #0b3fe8;
}

/* ---------- 链接与焦点 ---------- */
a {
  color: #134cff;
}

a:hover {
  color: #0b3fe8;
}

:focus-visible {
  outline: 2px solid rgba(19, 76, 255, 0.35);
  outline-offset: 1px;
}

/* ---------- 输入控件 ---------- */
input:not([type="checkbox"]):not([type="radio"]),
select,
textarea {
  border-color: var(--line-strong);
  background: #fff;
}

input:focus,
select:focus,
textarea:focus {
  border-color: #134cff;
  box-shadow: 0 0 0 3px rgba(19, 76, 255, 0.12);
  outline: none;
}

/* ---------- 卡片：白底细线 + 轻阴影，hover 微浮 ---------- */
.card,
[class*="card"]:not(button) {
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.card:hover {
  border-color: #d9e2ff;
  box-shadow: 0 8px 24px rgba(19, 76, 255, 0.1);
}

/* ---------- 滚动条 ---------- */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-thumb {
  background: #d4d9e3;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #b8c2d4;
}

::-webkit-scrollbar-track {
  background: transparent;
}

/* ============================================================
   扁平简约 2.0（2026-10-18）
   原则：单一品牌蓝 + 中性灰，去杂色；页头降噪；图标随文字色
   ============================================================ */

/* 品牌条：五维杂色 → 单一品牌蓝，底座浅蓝（:nth-child 同特异性覆盖） */
.brand-mark {
  background: #eaf0ff;
  border-color: #d9e2ff;
}

.brand-mark span,
.brand-mark span:nth-child(1),
.brand-mark span:nth-child(2),
.brand-mark span:nth-child(3),
.brand-mark span:nth-child(4),
.brand-mark span:nth-child(5) {
  background: #134cff;
}

/* eyebrow 残留 teal → 中性灰 */
.app-header .eyebrow {
  color: var(--muted);
}

/* 页头降噪：压低高度，辅助文案一律中性灰 */
.header-inner {
  min-height: 72px;
}

.app-header .thesis {
  color: var(--muted);
  font-size: 13px;
}

.storage-status {
  color: var(--muted);
}

/* 次按钮扁平：白底细线，hover 才见品牌蓝 */
.button-secondary {
  color: var(--ink);
  background: #fff;
  border-color: var(--line-strong);
}

.button-secondary:hover:not(:disabled) {
  color: #134cff;
  border-color: #134cff;
  background: #fff;
}

/* 图标随文字色（扁平线性 SVG 已内置 currentColor） */
.icon {
  color: inherit;
}

/* 页签降字重：常规态 500，激活态品牌蓝 */
.nav-item {
  font-weight: 500;
}

.nav-item.is-active {
  font-weight: 600;
  color: #134cff;
}

/* 窄屏页签溢出可横向滚动，不挤破版面 */
.nav-inner {
  overflow-x: auto;
  scrollbar-width: none;
}

.nav-inner::-webkit-scrollbar {
  display: none;
}
