/* socraticgate V1 — 克制、文档感、非娱乐化 */

/* ============================================================
   主题变量（COMMON-001-BTN-06）
   默认暗色（保持现状视觉）；html.light 覆盖为亮色
   ============================================================ */
:root {
  /* 基础背景 */
  --ig-bg-body: hsl(240 10% 8%);
  --ig-bg-elevated: hsl(240 8% 10%);
  --ig-bg-input: hsl(240 8% 8%);
  --ig-bg-soft: hsl(240 6% 11%);
  --ig-bg-nav: hsl(240 10% 6%);
  --ig-bg-hover: hsl(240 6% 14%);
  --ig-bg-active: hsl(240 6% 22%);
  --ig-bg-secondary: hsl(240 6% 18%);
  --ig-bg-tertiary: hsl(240 10% 9%);

  /* 文字 */
  --ig-text-primary: hsl(240 5% 90%);
  --ig-text-secondary: hsl(240 5% 80%);
  --ig-text-muted: hsl(240 5% 60%);
  --ig-text-disabled: hsl(240 4% 55%);
  --ig-text-placeholder: hsl(240 4% 40%);
  --ig-text-strong: hsl(0 0% 96%);
  --ig-text-inverse: hsl(240 10% 8%);

  /* 边框 */
  --ig-border-default: hsl(240 6% 18%);
  --ig-border-input: hsl(240 6% 22%);
  --ig-border-strong: hsl(240 6% 26%);

  /* 按钮主色 */
  --ig-btn-primary-bg: hsl(0 0% 96%);
  --ig-btn-primary-text: hsl(240 10% 8%);

  /* 标签色（保持） */
  --ig-v-stop: hsl(0 72% 58%);
  --ig-v-rescope: hsl(38 92% 55%);
  --ig-v-evidence: hsl(210 90% 62%);
  --ig-v-go: hsl(142 60% 50%);
  --ig-v-alpha: hsl(270 75% 68%);
}

/* 亮色覆盖（html.light） */
html.light {
  --ig-bg-body: hsl(0 0% 98%);
  --ig-bg-elevated: hsl(0 0% 100%);
  --ig-bg-input: hsl(0 0% 100%);
  --ig-bg-soft: hsl(240 5% 96%);
  --ig-bg-nav: hsl(0 0% 100%);
  --ig-bg-hover: hsl(240 5% 94%);
  --ig-bg-active: hsl(240 5% 86%);
  --ig-bg-secondary: hsl(240 5% 92%);
  --ig-bg-tertiary: hsl(240 5% 97%);

  --ig-text-primary: hsl(240 10% 12%);
  --ig-text-secondary: hsl(240 10% 22%);
  --ig-text-muted: hsl(240 5% 38%);
  --ig-text-disabled: hsl(240 4% 55%);
  --ig-text-placeholder: hsl(240 4% 55%);
  --ig-text-strong: hsl(240 10% 8%);
  --ig-text-inverse: hsl(0 0% 100%);

  --ig-border-default: hsl(240 6% 88%);
  --ig-border-input: hsl(240 6% 82%);
  --ig-border-strong: hsl(240 6% 70%);

  --ig-btn-primary-bg: hsl(240 10% 12%);
  --ig-btn-primary-text: hsl(0 0% 100%);
}

* { -webkit-tap-highlight-color: transparent; }

::selection { background: hsl(240 5% 30%); color: #fff; }
html.light ::selection { background: hsl(240 5% 70%); color: hsl(240 10% 8%); }

/* ============================================================
   亮色模式：修复 hardcoded Tailwind 浅灰文字看不清
   （全站大量 text-zinc-* 为暗色专用浅灰，切亮色后落浅底对比度不足。
    此处统一映射为深色可读文字；同时把纯深色标签 bg-zinc-800 翻浅，
    避免深字落深底。仅 html.light 生效，暗色零影响。）
   ============================================================ */
html.light .text-zinc-50   { color: hsl(240 10% 8%) !important; }
html.light .text-zinc-100  { color: hsl(240 10% 12%) !important; }
html.light .text-zinc-200  { color: hsl(240 10% 16%) !important; }
html.light .text-zinc-300  { color: hsl(240 10% 22%) !important; }
html.light .text-zinc-400  { color: hsl(240 5%  30%) !important; }
html.light .text-zinc-500  { color: hsl(240 5%  34%) !important; }
html.light .text-zinc-600  { color: hsl(240 5%  38%) !important; }
html.light .bg-zinc-700    { background: hsl(240 6%  86%) !important; }
html.light .bg-zinc-800    { background: hsl(240 6%  90%) !important; }
html.light .bg-zinc-900    { background: hsl(240 6%  95%) !important; }
html.light .bg-zinc-950    { background: hsl(240 6%  97%) !important; }
html.light .hover\:bg-zinc-700:hover { background: hsl(240 6% 84%) !important; }
html.light .hover\:bg-zinc-800:hover { background: hsl(240 6% 90%) !important; }

/* 主题应用：背景 / 文字（受变量驱动） */
.ig-body {
  background: var(--ig-bg-body);
  color: var(--ig-text-primary);
}

/* 少量动效：仅淡入，避免游戏化 */
.fade-in { animation: fadeIn .25s ease-out; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* shadcn 风格基础组件类 */
.ig-card {
  background: var(--ig-bg-elevated);
  border: 1px solid var(--ig-border-default);
  border-radius: 0.5rem;
}
.ig-input, .ig-textarea, .ig-select {
  width: 100%;
  background: var(--ig-bg-input);
  border: 1px solid var(--ig-border-input);
  border-radius: 0.375rem;
  padding: 0.55rem 0.75rem;
  font-size: 0.875rem;
  color: var(--ig-text-primary);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.ig-input:focus, .ig-textarea:focus, .ig-select:focus {
  border-color: hsl(240 5% 55%);
  box-shadow: 0 0 0 1px hsl(240 5% 45%);
}
html.light .ig-input:focus, html.light .ig-textarea:focus, html.light .ig-select:focus {
  border-color: hsl(240 30% 35%);
  box-shadow: 0 0 0 1px hsl(240 30% 35%);
}
.ig-input::placeholder, .ig-textarea::placeholder { color: var(--ig-text-placeholder); }

.ig-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  border-radius: 0.375rem;
  font-size: 0.875rem; font-weight: 500;
  padding: 0.55rem 1.1rem;
  transition: opacity .15s, background .15s;
  cursor: pointer;
  border: 1px solid transparent;
}
.ig-btn-primary { background: var(--ig-btn-primary-bg); color: var(--ig-btn-primary-text); }
.ig-btn-primary:hover { opacity: .88; }
.ig-btn-primary:disabled { opacity: .4; cursor: not-allowed; }
.ig-btn-outline { background: transparent; border-color: var(--ig-border-strong); color: var(--ig-text-secondary); }
.ig-btn-outline:hover { background: var(--ig-bg-hover); }
.ig-btn-ghost { background: transparent; color: var(--ig-text-muted); }
.ig-btn-ghost:hover { background: var(--ig-bg-hover); }

.ig-label { display:block; font-size: 0.8rem; font-weight: 600; color: var(--ig-text-secondary); margin-bottom: 0.35rem; }
.ig-hint { font-size: 0.75rem; color: var(--ig-text-muted); margin-top: 0.3rem; line-height 1.5; }

/* 五灯状态色：红=停止 黄=重切 蓝=补证据 绿=进入验证 紫=Alpha快跑 */
.v-stop { color: var(--ig-v-stop); }
.v-rescope { color: var(--ig-v-rescope); }
.v-evidence { color: var(--ig-v-evidence); }
.v-go { color: var(--ig-v-go); }
.v-alpha { color: var(--ig-v-alpha); }
.bg-v-stop { background: hsl(0 60% 14%); border-color: hsl(0 55% 30%) !important; }
.bg-v-rescope { background: hsl(38 60% 12%); border-color: hsl(38 60% 30%) !important; }
.bg-v-evidence { background: hsl(210 55% 13%); border-color: hsl(210 55% 32%) !important; }
.bg-v-go { background: hsl(142 45% 10%); border-color: hsl(142 45% 26%) !important; }
.bg-v-alpha { background: hsl(270 45% 14%); border-color: hsl(270 45% 34%) !important; }
html.light .bg-v-stop { background: hsl(0 60% 94%); border-color: hsl(0 55% 70%) !important; }
html.light .bg-v-rescope { background: hsl(38 60% 94%); border-color: hsl(38 60% 70%) !important; }
html.light .bg-v-evidence { background: hsl(210 55% 95%); border-color: hsl(210 55% 72%) !important; }
html.light .bg-v-go { background: hsl(142 45% 94%); border-color: hsl(142 45% 66%) !important; }
html.light .bg-v-alpha { background: hsl(270 45% 95%); border-color: hsl(270 45% 74%) !important; }

/* 输入类型选择卡 */
.intake-tab {
  border: 1px solid var(--ig-border-input);
  border-radius: 0.5rem;
  padding: 0.7rem 0.6rem;
  text-align: left;
  cursor: pointer;
  transition: border-color .15s, background .15s;
  background: var(--ig-bg-soft);
}
.intake-tab:hover { border-color: hsl(240 5% 40%); }
.intake-tab.selected { border-color: hsl(0 0% 85%); background: var(--ig-bg-hover); }
html.light .intake-tab:hover { border-color: hsl(240 5% 60%); }
html.light .intake-tab.selected { border-color: hsl(240 10% 20%); background: hsl(240 5% 92%); }

/* 事实/假设分离标记 */
.tag-fact { background: hsl(142 45% 14%); color: hsl(142 50% 60%); }
.tag-evidence { background: hsl(210 50% 15%); color: hsl(210 70% 65%); }
.tag-inference { background: hsl(38 50% 13%); color: hsl(38 70% 62%); }
.tag-hypothesis { background: hsl(0 45% 14%); color: hsl(0 60% 65%); }
html.light .tag-fact { background: hsl(142 45% 90%); color: hsl(142 60% 28%); }
html.light .tag-evidence { background: hsl(210 50% 92%); color: hsl(210 70% 32%); }
html.light .tag-inference { background: hsl(38 50% 92%); color: hsl(38 70% 32%); }
html.light .tag-hypothesis { background: hsl(0 45% 92%); color: hsl(0 60% 32%); }

/* 拦截提示块 */
.ig-block-error {
  background: hsl(0 55% 12%);
  border: 1px solid hsl(0 50% 28%);
  border-radius: 0.5rem;
  padding: 0.9rem 1rem;
  font-size: 0.85rem;
  color: hsl(0 40% 85%);
  white-space: pre-line;
  line-height: 1.65;
}
.ig-block-warn {
  background: hsl(38 50% 10%);
  border: 1px solid hsl(38 50% 26%);
  border-radius: 0.5rem;
  padding: 0.9rem 1rem;
  font-size: 0.85rem;
  color: hsl(38 45% 82%);
  white-space: pre-line;
  line-height: 1.65;
}
html.light .ig-block-error { background: hsl(0 55% 96%); border-color: hsl(0 50% 78%); color: hsl(0 50% 28%); }
html.light .ig-block-warn { background: hsl(38 50% 95%); border-color: hsl(38 50% 76%); color: hsl(38 60% 24%); }

/* 进度指示（闸门步骤条）：克制的线性指示 */
.gate-step { display:flex; align-items:center; gap:.5rem; font-size:.72rem; color:var(--ig-text-muted); }
.gate-step.active { color: var(--ig-text-strong); }
.gate-step.done { color: hsl(142 50% 48%); }
.gate-dot { width:1.35rem; height:1.35rem; border-radius:9999px; border:1px solid var(--ig-border-strong); display:flex; align-items:center; justify-content:center; font-size:.65rem; flex-shrink:0; }
.gate-step.active .gate-dot { background: var(--ig-text-strong); color: var(--ig-text-inverse); border-color:transparent; font-weight:600; }
.gate-step.done .gate-dot { background: hsl(142 45% 14%); border-color: hsl(142 45% 30%); }
html.light .gate-step.done .gate-dot { background: hsl(142 45% 92%); border-color: hsl(142 45% 70%); }

/* 报告 pre 排版 */
.report-text { white-space: pre-line; line-height: 1.75; font-size: .875rem; color: var(--ig-text-secondary); }

/* 评分条 */
.score-bar { height: 6px; border-radius: 9999px; background: var(--ig-bg-secondary); overflow: hidden; }
.score-fill { height: 100%; border-radius: 9999px; transition: width .4s ease; }

/* 打印（导出报告） */
@media print {
  header, footer, .no-print { display: none !important; }
  body { background: #fff !important; color: #000 !important; }
}

/* ===== V3：证据作战室 ===== */
.v-archived { color: var(--ig-text-muted); }
.bg-v-archived { background: var(--ig-bg-soft); border-color: var(--ig-border-strong) !important; }
.status-pill { display: inline-flex; align-items: center; gap: 4px; font-size: 10px; padding: 2px 8px; border-radius: 9999px; border: 1px solid; white-space: nowrap; }
.st-inbox { color: var(--ig-text-secondary); border-color: var(--ig-border-strong); background: var(--ig-bg-soft); }
.st-rescope { color: hsl(38 92% 60%); border-color: hsl(38 60% 30%); background: hsl(38 60% 12%); }
.st-need_evidence { color: hsl(210 90% 65%); border-color: hsl(210 55% 32%); background: hsl(210 55% 13%); }
.st-screened { color: hsl(142 60% 55%); border-color: hsl(142 45% 26%); background: hsl(142 45% 10%); }
.st-sprinting { color: hsl(270 75% 70%); border-color: hsl(270 45% 34%); background: hsl(270 45% 14%); }
.st-validated { color: hsl(142 70% 60%); border-color: hsl(142 55% 32%); background: hsl(142 55% 12%); }
.st-archived { color: var(--ig-text-muted); border-color: var(--ig-border-strong); background: var(--ig-bg-soft); }
html.light .st-rescope { background: hsl(38 60% 94%); border-color: hsl(38 60% 70%); }
html.light .st-need_evidence { background: hsl(210 55% 95%); border-color: hsl(210 55% 72%); }
html.light .st-screened { background: hsl(142 45% 94%); border-color: hsl(142 45% 66%); }
html.light .st-sprinting { background: hsl(270 45% 95%); border-color: hsl(270 45% 74%); }
html.light .st-validated { background: hsl(142 55% 94%); border-color: hsl(142 55% 70%); }

.opp-card { cursor: pointer; transition: border-color .15s ease, transform .1s ease; }
.opp-card:hover { border-color: hsl(240 5% 40%); }
html.light .opp-card:hover { border-color: hsl(240 5% 60%); }
.sprint-task { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border: 1px solid var(--ig-border-default); border-radius: 8px; background: var(--ig-bg-soft); }
.sprint-task.done { opacity: .55; }
.sprint-task.done .task-title { text-decoration: line-through; }
.hour-badge { flex-shrink: 0; font-size: 10px; font-family: ui-monospace, monospace; color: var(--ig-text-muted); border: 1px solid var(--ig-border-input); border-radius: 6px; padding: 2px 6px; margin-top: 1px; white-space: nowrap; }
.deadline-bar { font-variant-numeric: tabular-nums; font-size: 12px; color: hsl(270 60% 78%); border: 1px solid hsl(270 40% 30%); background: hsl(270 40% 12%); border-radius: 8px; padding: 8px 12px; }
.deadline-bar.expired { color: hsl(0 80% 70%); border-color: hsl(0 50% 32%); background: hsl(0 50% 12%); }
html.light .deadline-bar { color: hsl(270 60% 38%); border-color: hsl(270 40% 70%); background: hsl(270 40% 96%); }
html.light .deadline-bar.expired { color: hsl(0 80% 32%); border-color: hsl(0 50% 72%); background: hsl(0 50% 96%); }
.line-clamp-1 { display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.line-clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ===== 移动端深度适配（mobile-first） ===== */

/* iOS / Android 安全区域：底部导航/底部操作条避开 Home Indicator */
:root {
  --sat: env(safe-area-inset-top, 0px);
  --sab: env(safe-area-inset-bottom, 0px);
  --sal: env(safe-area-inset-left, 0px);
  --sar: env(safe-area-inset-right, 0px);
}

html, body { overscroll-behavior-y: contain; }

/* 通用工具类：移动端内边距/字号 */
.m-pad { padding-left: 12px; padding-right: 12px; }
@media (min-width: 640px) {
  .m-pad { padding-left: 20px; padding-right: 20px; }
}

/* 主站：主内容底部留出底部导航空间 + 安全区域 */
.main-pad-bottom { padding-bottom: calc(64px + var(--sab)); }
@media (min-width: 768px) {
  .main-pad-bottom { padding-bottom: 24px; }
}

/* 底部固定导航（主站） */
.bottom-nav {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 40;
  background: var(--ig-bg-nav);
  border-top: 1px solid var(--ig-border-default);
  padding: 6px 4px calc(6px + var(--sab));
  display: flex;
  justify-content: space-around;
  gap: 2px;
  -webkit-backdrop-filter: saturate(140%) blur(8px);
  backdrop-filter: saturate(140%) blur(8px);
}
.bottom-nav a, .bottom-nav button {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-height: 44px;
  padding: 4px 2px;
  border-radius: 8px;
  background: transparent;
  border: 0;
  color: var(--ig-text-muted);
  font-size: 10px;
  line-height: 1.1;
  cursor: pointer;
  text-decoration: none;
  transition: background .15s, color .15s;
}
.bottom-nav a i, .bottom-nav button i { font-size: 14px; }
.bottom-nav a:hover, .bottom-nav button:hover { background: var(--ig-bg-hover); }
.bottom-nav a.active, .bottom-nav button.active {
  color: var(--ig-text-strong);
  background: var(--ig-bg-hover);
}

/* 桌面端隐藏底部导航 */
@media (min-width: 768px) {
  .bottom-nav { display: none; }
}

/* 移动端隐藏顶部桌面导航（只显示 logo + 移动菜单按钮） */
.desktop-only { display: none; }
@media (min-width: 768px) {
  .desktop-only { display: flex; }
  .mobile-only { display: none !important; }
}

/* 主站 header：移动端更紧凑 */
.app-header {
  position: sticky; top: 0; z-index: 30;
  background: var(--ig-bg-nav);
  border-bottom: 1px solid var(--ig-border-default);
  padding-top: var(--sat);
  -webkit-backdrop-filter: saturate(140%) blur(8px);
  backdrop-filter: saturate(140%) blur(8px);
}
.app-header-inner {
  max-width: 768px;
  margin: 0 auto;
  padding: 10px 14px;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
@media (min-width: 640px) {
  .app-header-inner { padding: 14px 20px; }
}

/* 移动端汉堡按钮 */
.mobile-menu-btn {
  display: inline-flex;
  align-items: center; justify-content: center;
  width: 40px; height: 40px;
  border-radius: 8px;
  background: transparent; border: 0;
  color: var(--ig-text-secondary);
  cursor: pointer;
}
.mobile-menu-btn:hover { background: var(--ig-bg-hover); }
@media (min-width: 768px) { .mobile-menu-btn { display: none; } }

/* 移动端抽屉式菜单 */
.mobile-drawer {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  z-index: 50;
  background: rgba(0, 0, 0, 0.6);
  display: none;
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}
.mobile-drawer.open { display: block; }
.mobile-drawer-panel {
  position: absolute; right: 0; top: 0; bottom: 0;
  width: min(280px, 80vw);
  background: var(--ig-bg-nav);
  border-left: 1px solid var(--ig-border-default);
  padding: calc(16px + var(--sat)) 16px 16px;
  display: flex; flex-direction: column; gap: 4px;
  animation: drawerIn .2s ease-out;
  overflow-y: auto;
  padding-bottom: calc(16px + var(--sab));
}
@keyframes drawerIn { from { transform: translateX(100%); } to { transform: none; } }
.mobile-drawer-panel a, .mobile-drawer-panel button {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 12px;
  border-radius: 8px;
  background: transparent; border: 0;
  color: var(--ig-text-secondary);
  font-size: 14px;
  text-decoration: none;
  cursor: pointer;
  min-height: 44px;
  width: 100%;
  text-align: left;
}
.mobile-drawer-panel a:hover, .mobile-drawer-panel button:hover { background: var(--ig-bg-hover); }
.mobile-drawer-panel a i, .mobile-drawer-panel button i { width: 16px; text-align: center; color: var(--ig-text-muted); }
.mobile-drawer-panel .drawer-section {
  margin-top: 12px; padding-top: 12px;
  border-top: 1px solid var(--ig-border-default);
  font-size: 11px; color: var(--ig-text-muted);
  text-transform: uppercase; letter-spacing: 0.08em;
}

/* ===== 主站卡片：移动端更紧凑 ===== */
.ig-card.p-responsive { padding: 14px; }
@media (min-width: 640px) {
  .ig-card.p-responsive { padding: 20px; }
}

/* 表单网格：移动端单列 */
.form-grid-2 {
  display: grid; grid-template-columns: 1fr; gap: 8px;
}
@media (min-width: 640px) {
  .form-grid-2 { grid-template-columns: 1fr 1fr; gap: 8px; }
}

/* 移动端单列评分卡 */
@media (max-width: 639px) {
  .score-grid { grid-template-columns: 1fr !important; }
}

/* 报告页表格：移动端允许横向滚动并显示滚动提示 */
.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0 -14px;
  padding: 0 14px;
}
@media (min-width: 640px) {
  .table-scroll { margin: 0; padding: 0; }
}

/* 移动端堆叠：水平排列的 flex 在小屏改为垂直 */
@media (max-width: 639px) {
  .stack-mobile { flex-direction: column !important; align-items: stretch !important; }
  .stack-mobile > * { width: 100% !important; }
}

/* 触摸目标：强制最小 44x44 */
.touch-target {
  min-height: 44px; min-width: 44px;
}

/* 移动端字号提升（避免太小不可读） */
@media (max-width: 639px) {
  .text-readable { font-size: 14px !important; line-height: 1.5 !important; }
}

/* ===== 管理后台响应式 ===== */

/* 移动端：侧边栏默认隐藏，转为抽屉 */
.admin-layout {
  display: block;
  min-height: 100vh;
  background: var(--ig-bg-body);
}
.admin-aside {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: 240px;
  background: var(--ig-bg-nav);
  border-right: 1px solid var(--ig-border-default);
  padding: 12px;
  z-index: 45;
  display: flex; flex-direction: column;
  transform: translateX(-100%);
  transition: transform .2s ease-out;
  overflow-y: auto;
  padding-top: calc(12px + var(--sat));
  padding-bottom: calc(12px + var(--sab));
}
.admin-aside.open { transform: translateX(0); }
.admin-main-wrap {
  flex: 1; min-width: 0;
  padding-bottom: calc(64px + var(--sab));
  background: var(--ig-bg-body);
  color: var(--ig-text-primary);
}
@media (min-width: 768px) {
  .admin-layout { display: block; }
  .admin-aside {
    position: fixed;
    top: 0; left: 0; bottom: 0;
    width: 176px;
    transform: none;
  }
  .admin-main-wrap {
    margin-left: 176px;
    padding-bottom: 24px;
  }
  .admin-mobile-bar { display: none; }
}

/* 移动端管理后台底部导航 */
.admin-bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0;
  z-index: 40;
  background: var(--ig-bg-nav);
  border-top: 1px solid var(--ig-border-default);
  padding: 6px 4px calc(6px + var(--sab));
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 2px;
}
.admin-bottom-nav a, .admin-bottom-nav button {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px;
  min-height: 44px;
  padding: 4px 2px;
  border-radius: 6px;
  background: transparent;
  border: 0;
  color: var(--ig-text-muted);
  font-size: 10px;
  text-decoration: none;
  transition: background .15s, color .15s;
  cursor: pointer;
}
.admin-bottom-nav a i, .admin-bottom-nav button i { font-size: 14px; }
.admin-bottom-nav a.active, .admin-bottom-nav button.active { color: var(--ig-text-strong); background: var(--ig-bg-hover); }
.admin-bottom-nav a:hover, .admin-bottom-nav button:hover { background: var(--ig-bg-hover); }

@media (min-width: 768px) {
  .admin-bottom-nav { display: none; }
}

/* 移动端管理后台头部：含菜单按钮 */
.admin-mobile-bar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 8px;
  padding: calc(8px + var(--sat)) 12px 8px;
  background: var(--ig-bg-elevated);
  border-bottom: 1px solid var(--ig-border-default);
}
.admin-mobile-bar .am-title { font-size: 14px; font-weight: 500; color: var(--ig-text-secondary); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 管理后台表格：移动端转为卡片布局 */
@media (max-width: 767px) {
  .admin-table thead { display: none; }
  .admin-table, .admin-table tbody, .admin-table tr, .admin-table td { display: block; width: 100%; }
  .admin-table tr {
    border: 1px solid var(--ig-border-default);
    border-radius: 8px;
    margin-bottom: 10px;
    padding: 8px 10px;
    background: var(--ig-bg-tertiary);
  }
  .admin-table td {
    padding: 6px 0 !important;
    border-bottom: 1px solid var(--ig-bg-secondary) !important;
    display: flex !important;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    font-size: 12px !important;
  }
  .admin-table td:last-child { border-bottom: 0 !important; }
  .admin-table td::before {
    content: attr(data-label);
    color: var(--ig-text-muted);
    font-size: 10px;
    flex-shrink: 0;
    max-width: 40%;
    word-break: break-word;
    text-transform: uppercase;
    letter-spacing: 0.05em;
  }
  .admin-table td.no-label::before { content: ''; }
}

/* 移动端管理后台表单：纵向堆叠 */
@media (max-width: 639px) {
  .form-stack-mobile { display: flex; flex-direction: column; align-items: stretch; }
  .form-stack-mobile > * { width: 100% !important; }
}

/* 移动端避免横向溢出 */
.no-h-scroll { overflow-x: hidden; }

/* ===== 语言切换 toggle（COMMON-001-BTN-05） ===== */
.lang-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  min-width: 44px;
  padding: 4px 10px;
  border-radius: 6px;
  background: var(--ig-bg-secondary);
  border: 1px solid var(--ig-border-strong);
  color: var(--ig-text-secondary);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}
.lang-toggle:hover { background: var(--ig-bg-active); border-color: var(--ig-text-muted); color: var(--ig-text-strong); }
.lang-toggle:active { background: var(--ig-bg-active); }
.lang-toggle-block { width: 100%; }

/* ===== 主题切换 toggle（COMMON-001-BTN-06） ===== */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  min-width: 36px;
  padding: 4px 8px;
  border-radius: 6px;
  background: var(--ig-bg-secondary);
  border: 1px solid var(--ig-border-strong);
  color: var(--ig-text-secondary);
  font-size: 12px;
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}
.theme-toggle:hover { background: var(--ig-bg-active); border-color: var(--ig-text-muted); color: var(--ig-text-strong); }
.theme-toggle:active { background: var(--ig-bg-active); }
.theme-toggle i { font-size: 12px; line-height: 1; }

/* 主题切换小色块按钮（紧凑场景，如 admin 侧栏顶部） */
.theme-toggle.icon-only {
  min-width: 32px;
  padding: 4px;
}

/* ===== 登录认证 UI（AUTH 模块） ===== */
.login-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 4px 12px;
  border-radius: 6px;
  background: var(--ig-bg-secondary);
  border: 1px solid var(--ig-border-strong);
  color: var(--ig-text-secondary);
  font-size: 12px;
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  white-space: nowrap;
}
.login-btn:hover { background: var(--ig-bg-active); border-color: var(--ig-text-muted); color: var(--ig-text-strong); }

/* 抽屉内登录按钮通栏 */
.drawer-login-slot { margin-top: 2px; }
.drawer-login-slot .login-btn { width: 100%; justify-content: center; }

/* ---- 用户菜单 ---- */
.user-menu { position: relative; display: inline-flex; }
.user-menu-trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 3px 8px 3px 4px;
  border-radius: 6px;
  background: transparent;
  border: 1px solid transparent;
  color: var(--ig-text-secondary);
  cursor: pointer;
  transition: background .15s, border-color .15s;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  max-width: 200px;
}
.user-menu-trigger:hover { background: var(--ig-bg-active); border-color: var(--ig-border-strong); }
.user-avatar {
  width: 26px; height: 26px;
  border-radius: 9999px;
  background: linear-gradient(135deg, hsl(240 5% 30%), hsl(240 6% 22%));
  display: inline-flex; align-items: center; justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}
.user-avatar-img { width: 100%; height: 100%; object-fit: cover; }
.user-avatar-txt { font-size: 12px; font-weight: 700; color: var(--ig-text-strong); }
.user-email { font-size: 12px; color: var(--ig-text-muted); max-width: 120px; overflow: hidden; text-overflow: ellipsis; }
.user-caret { color: var(--ig-text-disabled); }
.user-menu-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 200px;
  z-index: 60;
  background: var(--ig-bg-elevated);
  border: 1px solid var(--ig-border-default);
  border-radius: 10px;
  box-shadow: 0 10px 30px -6px rgba(0,0,0,.5);
  overflow: hidden;
}
.user-menu-dropdown.open { display: block; }
.user-menu-head {
  padding: 10px 12px;
  border-bottom: 1px solid var(--ig-border-default);
  font-size: 13px;
  color: var(--ig-text-strong);
  display: flex; flex-direction: column; gap: 2px;
}
.user-menu-item {
  display: flex; align-items: center; gap: 8px;
  width: 100%;
  padding: 10px 12px;
  background: transparent;
  border: none;
  color: var(--ig-text-secondary);
  font-size: 13px;
  cursor: pointer;
  text-align: left;
}
.user-menu-item:hover { background: var(--ig-bg-hover); color: var(--ig-text-strong); }
/* 亮色兼容 */
html.light .user-menu-dropdown { box-shadow: 0 10px 30px -6px rgba(0,0,0,.2); }

/* ---- 登录弹窗 ---- */
.auth-modal { position: fixed; inset: 0; z-index: 100; display: none; }
.auth-modal.open { display: block; }
.auth-modal-backdrop {
  position: absolute; inset: 0;
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(2px);
}
.auth-modal-panel {
  position: relative;
  width: min(92vw, 360px);
  margin: 12vh auto 0;
  background: var(--ig-bg-elevated);
  border: 1px solid var(--ig-border-default);
  border-radius: 14px;
  padding: 22px;
  box-shadow: 0 20px 50px -10px rgba(0,0,0,.6);
}
.auth-modal-close {
  position: absolute; top: 12px; right: 12px;
  width: 30px; height: 30px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 6px;
  background: transparent; border: none;
  color: var(--ig-text-muted);
  cursor: pointer;
}
.auth-modal-close:hover { background: var(--ig-bg-hover); color: var(--ig-text-strong); }
.auth-modal-head { text-align: center; margin-bottom: 18px; }
.auth-logo {
  width: 44px; height: 44px; margin: 0 auto 10px;
  border-radius: 12px;
  background: linear-gradient(135deg, hsl(240 30% 40%), hsl(240 40% 30%));
  display: flex; align-items: center; justify-content: center;
}
.auth-logo i { color: #fff; }
.auth-modal-title { font-size: 16px; font-weight: 600; color: var(--ig-text-strong); }
.auth-modal-sub { margin-top: 4px; font-size: 12px; color: var(--ig-text-muted); }
.auth-modal-body { display: flex; flex-direction: column; gap: 10px; }
.provider-btn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%;
  padding: 11px 14px;
  border-radius: 8px;
  background: var(--ig-bg-secondary);
  border: 1px solid var(--ig-border-strong);
  color: var(--ig-text-primary);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background .15s, border-color .15s, transform .05s;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}
.provider-btn:hover { background: var(--ig-bg-active); border-color: var(--ig-text-muted); }
.provider-btn:active { transform: scale(.99); }
.provider-btn i { font-size: 16px; }
.provider-ms i { color: #00a4ef; }
.provider-google i { color: #ea4335; }
.provider-btn.disabled, .provider-btn:disabled {
  cursor: not-allowed;
  opacity: .5;
  filter: grayscale(.6);
}
.provider-btn.disabled:hover, .provider-btn:disabled:hover { background: var(--ig-bg-secondary); border-color: var(--ig-border-strong); }
.auth-msg { margin-top: 4px; min-height: 18px; font-size: 12px; color: var(--ig-v-go); text-align: center; }
.auth-msg.error { color: var(--ig-text-muted); }
html.light .auth-modal-panel { box-shadow: 0 20px 50px -10px rgba(0,0,0,.25); }

@media print {
  header, footer, .no-print, .bottom-nav, .admin-bottom-nav, .mobile-drawer, .admin-mobile-bar, .lang-toggle, .theme-toggle, .login-slot, .user-menu, .auth-modal { display: none !important; }
  body, html.light body { background: #fff !important; color: #000 !important; }
}

/* ============================================================
   HOME-001 · 首页 Landing（营销页）
   复用主题变量，亮/暗自动适配；不摆数字、不编造证据
   ============================================================ */
.landing-nav {
  position: sticky; top: 0; z-index: 30;
  background: var(--ig-bg-nav);
  border-bottom: 1px solid var(--ig-border-default);
  padding-top: var(--sat);
  -webkit-backdrop-filter: saturate(140%) blur(8px);
  backdrop-filter: saturate(140%) blur(8px);
}
.landing-nav-inner {
  max-width: 1080px; margin: 0 auto;
  padding: 12px 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.landing-wrap { max-width: 1080px; margin: 0 auto; padding: 48px 20px 32px; }
.landing-hero { text-align: center; padding: 40px 0 24px; }
.landing-eyebrow {
  display: inline-block; font-size: 11px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--ig-text-muted); border: 1px solid var(--ig-border-strong);
  border-radius: 9999px; padding: 4px 12px; margin-bottom: 20px;
}
.landing-h1 {
  font-size: clamp(1.9rem, 4.6vw, 3.1rem); font-weight: 700; line-height: 1.15;
  letter-spacing: -.02em; color: var(--ig-text-strong); margin: 0 0 16px;
}
.landing-sub {
  max-width: 640px; margin: 0 auto; font-size: 1.02rem; line-height: 1.7;
  color: var(--ig-text-secondary);
}
.landing-cta-primary {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--ig-btn-primary-bg); color: var(--ig-btn-primary-text);
  font-size: .95rem; font-weight: 600; padding: 12px 22px; border-radius: 10px;
  box-shadow: 0 8px 24px -8px rgba(0,0,0,.4); transition: transform .15s ease, opacity .15s ease;
}
.landing-cta-primary:hover { transform: translateY(-1px); opacity: .92; }
.landing-cta-secondary {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: .95rem; padding: 12px 18px; border-radius: 10px;
  color: var(--ig-text-secondary); border: 1px solid var(--ig-border-strong);
  transition: background .15s ease;
}
.landing-cta-secondary:hover { background: var(--ig-bg-hover); }

/* 裁决引擎图（首屏唯一视觉中心） */
.verdict-engine {
  max-width: 860px; margin: 36px auto 20px;
  display: flex; flex-direction: column; align-items: stretch; gap: 12px;
}
.ve-in {
  font-family: ui-monospace, monospace; font-size: .78rem;
  background: var(--ig-bg-soft); border: 1px solid var(--ig-border-default);
  border-radius: 10px; padding: 10px 14px; text-align: center;
}
.ve-in span { color: var(--ig-text-muted); font-family: sans-serif; }
.ve-gates { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.ve-gate {
  background: var(--ig-bg-elevated); border: 1px solid var(--ig-border-default);
  border-radius: 10px; padding: 12px 8px; text-align: center;
  font-size: .8rem; color: var(--ig-text-secondary);
  display: flex; flex-direction: column; align-items: center; gap: 6px;
}
.ve-gate i { color: var(--ig-text-muted); }
.ve-verdicts { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.ve-tag {
  font-size: .78rem; font-weight: 600; padding: 6px 14px; border-radius: 9999px;
  background: var(--ig-bg-nav); border: 1px solid var(--ig-border-strong);
}
.ve-stop    { color: var(--ig-v-stop); border-color: color-mix(in srgb, var(--ig-v-stop) 45%, transparent); }
.ve-rescope { color: var(--ig-v-rescope); border-color: color-mix(in srgb, var(--ig-v-rescope) 45%, transparent); }
.ve-evidence{ color: var(--ig-v-evidence); border-color: color-mix(in srgb, var(--ig-v-evidence) 45%, transparent); }
.ve-mvp     { color: var(--ig-v-go); border-color: color-mix(in srgb, var(--ig-v-go) 45%, transparent); }
.ve-alpha   { color: var(--ig-v-alpha); border-color: color-mix(in srgb, var(--ig-v-alpha) 45%, transparent); }
.landing-scroll-cue {
  margin-top: 22px; font-size: .85rem; color: var(--ig-text-muted);
  display: inline-flex; align-items: center; gap: 8px; animation: cue 2.2s ease-in-out infinite;
}
@keyframes cue { 0%,100%{ transform: translateY(0); } 50%{ transform: translateY(5px); } }

/* 通用区块 */
.landing-sec { padding: 52px 0 8px; max-width: 860px; margin: 0 auto; }
.landing-sec + .landing-sec { border-top: 1px solid var(--ig-border-default); margin-top: 8px; padding-top: 56px; }
.landing-h2 {
  font-size: clamp(1.4rem, 3vw, 2rem); font-weight: 700; letter-spacing: -.01em;
  color: var(--ig-text-strong); text-align: center; margin: 0 0 12px;
}
.landing-lead { text-align: center; color: var(--ig-text-secondary); line-height: 1.7; max-width: 620px; margin: 0 auto 24px; }

.landing-3col { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin-top: 8px; }
.landing-card {
  background: var(--ig-bg-elevated); border: 1px solid var(--ig-border-default);
  border-radius: 14px; padding: 20px 18px;
}
.landing-card-accent { border-color: var(--ig-border-strong); }
.lc-ico {
  width: 36px; height: 36px; border-radius: 10px; margin-bottom: 12px;
  background: var(--ig-bg-secondary); display: flex; align-items: center; justify-content: center;
}
.landing-card h3, .landing-step h3 { font-size: 1rem; font-weight: 600; color: var(--ig-text-strong); margin: 0 0 6px; }
.landing-card p, .landing-step p { font-size: .88rem; line-height: 1.6; color: var(--ig-text-secondary); margin: 0; }

.landing-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin-top: 8px; }
.landing-step {
  background: var(--ig-bg-elevated); border: 1px solid var(--ig-border-default);
  border-radius: 14px; padding: 18px; display: flex; gap: 12px; align-items: flex-start;
}
.ls-num {
  flex-shrink: 0; width: 28px; height: 28px; border-radius: 9999px;
  background: var(--ig-btn-primary-bg); color: var(--ig-btn-primary-text);
  font-size: .8rem; font-weight: 700; display: flex; align-items: center; justify-content: center;
}

.landing-rules { list-style: none; padding: 0; margin: 8px auto 0; max-width: 560px; }
.landing-rules li {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 12px; font-size: .92rem; line-height: 1.55; color: var(--ig-text-secondary);
  border-bottom: 1px solid var(--ig-border-default);
}
.landing-note { font-size: .8rem; color: var(--ig-text-muted); text-align: center; max-width: 620px; margin: 18px auto 0; line-height: 1.6; }

.landing-faq { max-width: 640px; margin: 8px auto 0; }
.landing-faq details {
  border: 1px solid var(--ig-border-default); border-radius: 12px;
  background: var(--ig-bg-elevated); padding: 14px 16px; margin-bottom: 10px;
}
.landing-faq summary { cursor: pointer; font-size: .95rem; font-weight: 600; color: var(--ig-text-strong); }
.landing-faq details[open] summary { margin-bottom: 8px; }
.landing-faq p { font-size: .88rem; line-height: 1.65; color: var(--ig-text-secondary); margin: 0; }

.landing-final-cta { text-align: center; padding-bottom: 40px; }
.landing-final-cta .landing-cta-primary { margin-top: 10px; }
.landing-footer { border-top: 1px solid var(--ig-border-default); background: var(--ig-bg-nav); }
