/*
 * PTA 中转站控制台 · Interface v6 "Clarity"
 * 设计系统重写：系统字体栈（无外部字体 CDN）、冷灰中性色 + Iris 品牌色、
 * 扁平卡片层级、紧凑数据密度。与 design-system/pta-学习助手/MASTER.md 对齐。
 * 文件名沿用 app-v5.css（layout.php / 发布脚本 / 冒烟检查依赖），全部类名钩子保持兼容。
 * UTF-8
 */

/* ============================================================
   1. Design Tokens
   ============================================================ */
:root {
  color-scheme: light;

  /* 品牌色 Iris */
  --brand-50: #f0f1ff;
  --brand-100: #e2e4ff;
  --brand-200: #c8ccfd;
  --brand-300: #a5abf8;
  --brand-400: #7f86ef;
  --brand-500: #5d63e4;
  --brand-600: #4b4fd3;
  --brand-700: #3d3fb4;
  --brand-800: #333490;
  --brand-900: #2b2c72;

  /* 正向强调（Emerald） */
  --accent-500: #10b981;
  --accent-600: #059669;

  /* 中性色（Cool gray） */
  --bg: #f5f6f8;
  --bg-subtle: #eef0f3;
  --surface: #ffffff;
  --surface-high: #fafbfc;
  --surface-sunken: #f2f4f7;
  --surface-glass: rgba(255, 255, 255, 0.86);
  --border: #e4e7ec;
  --border-strong: #d0d5dd;
  --text: #101828;
  --text-2: #475467;
  --text-3: #667085;
  --text-inverse: #ffffff;

  /* 语义色 */
  --success: #067647;
  --success-bg: #ecfdf3;
  --success-border: #abefc6;
  --danger: #c4320a;
  --danger-strong: #b42318;
  --danger-bg: #fef3f2;
  --danger-border: #fecdca;
  --warning: #b54708;
  --warning-bg: #fffaeb;
  --warning-border: #fedf89;
  --info: #175cd3;
  --info-bg: #eff8ff;
  --info-border: #b2ddff;

  /* 圆角 */
  --radius-xs: 6px;
  --radius-sm: 8px;
  --radius-md: 10px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-2xl: 20px;
  --radius-full: 999px;

  /* 阴影（克制使用） */
  --shadow-xs: 0 1px 2px rgba(16, 24, 40, 0.05);
  --shadow-sm: 0 1px 3px rgba(16, 24, 40, 0.08), 0 1px 2px rgba(16, 24, 40, 0.04);
  --shadow-md: 0 4px 8px -2px rgba(16, 24, 40, 0.08), 0 2px 4px -2px rgba(16, 24, 40, 0.04);
  --shadow-lg: 0 12px 24px -4px rgba(16, 24, 40, 0.10), 0 4px 8px -4px rgba(16, 24, 40, 0.04);
  --ring: 0 0 0 3px rgba(93, 99, 228, 0.20);

  /* 动效 */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --dur-fast: 120ms;
  --dur-base: 200ms;
  --dur-slow: 300ms;

  /* 字体（系统字体，国内网络无需外部 CDN） */
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI Variable Text", "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei UI", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  --font-mono: "JetBrains Mono", "Cascadia Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;

  /* 布局 */
  --topbar-h: 56px;
  --sidebar-w: 244px;
  --content-max: 1200px;
  --mobile-nav-h: 60px;
}

/* ============================================================
   2. Reset & Base
   ============================================================ */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--topbar-h) + 12px);
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background: var(--bg);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  margin: 0 0 0.5em;
  font-weight: 650;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--text);
}
h1 { font-size: 22px; }
h2 { font-size: 16px; }
h3 { font-size: 14.5px; }
h4 { font-size: 13.5px; }

p { margin: 0 0 0.75em; }
small { font-size: 12px; color: var(--text-3); }
strong { font-weight: 600; }

a {
  color: var(--brand-600);
  text-decoration: none;
  transition: color var(--dur-fast) var(--ease-out);
}
a:hover { color: var(--brand-700); text-decoration: underline; text-underline-offset: 3px; }
a.btn:hover,
.nav-link:hover,
.mobile-nav-link:hover,
.brand:hover,
.quick-action-grid a:hover,
.settings-tabs a:hover,
.tabs a:hover,
.landing-topnav a:hover,
.account-menu-item:hover,
.pagination a:hover { text-decoration: none; }

img, svg { max-width: 100%; }

code {
  padding: 1px 6px;
  border-radius: var(--radius-xs);
  background: var(--surface-sunken);
  border: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 0.86em;
  color: var(--brand-700);
  word-break: break-all;
}

pre {
  margin: 0 0 12px;
  padding: 12px 14px;
  overflow: auto;
  max-height: 420px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface-sunken);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
}

hr { height: 1px; margin: 20px 0; border: 0; background: var(--border); }

details {
  margin: 0 0 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
}
details > summary {
  padding: 10px 14px;
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  list-style-position: inside;
}
details > summary:hover { background: var(--surface-high); }
details[open] > summary { border-bottom: 1px solid var(--border); }
details > pre,
details > div,
details > p { margin: 12px 14px; }

::selection { background: rgba(169, 118, 47, 0.22); }
::placeholder { color: #9a9384; opacity: 1; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: 999px;
  border: 3px solid transparent;
  background-clip: content-box;
}
::-webkit-scrollbar-thumb:hover { background-color: #98a2b3; }

:focus-visible {
  outline: 2px solid var(--brand-500);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  top: -48px;
  left: 16px;
  z-index: 300;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  background: var(--text);
  color: #fff;
  font-size: 13px;
  transition: top var(--dur-fast) var(--ease-out);
}
.skip-link:focus { top: 10px; color: #fff; }

/* ============================================================
   3. 工具类
   ============================================================ */
.muted, .text-muted { color: var(--text-3); }
.text-center { text-align: center; }
.mono, .font-mono { font-family: var(--font-mono); font-size: 0.94em; }
.inline { display: inline-flex; align-items: center; gap: 6px; }
.error { color: var(--danger-strong); }
.warning { color: var(--warning); }
.success { color: var(--success); }
.full-width { grid-column: 1 / -1; }
.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;
}
.eyebrow {
  display: inline-block;
  margin-bottom: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--brand-600);
}
.empty-inline { color: var(--text-3); font-size: 13px; }
.field-hint,
.help-text,
.hint,
.stat-hint { margin: 6px 0 0; font-size: 12.5px; color: var(--text-3); }
.table-card > .hint { padding: 0 20px; margin: -6px 0 12px; }

@keyframes fade-up {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pop-in {
  from { opacity: 0; transform: translateY(4px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.container > * { animation: fade-up 320ms var(--ease-out) backwards; }
.container > *:nth-child(2) { animation-delay: 30ms; }
.container > *:nth-child(3) { animation-delay: 60ms; }
.container > *:nth-child(n+4) { animation-delay: 90ms; }

/* ============================================================
   4. 顶栏
   ============================================================ */
.shell {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 130;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: var(--topbar-h);
  padding: 0 20px 0 16px;
  background: var(--surface-glass);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.topbar-left,
.topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: var(--text);
}
.brand:hover { color: var(--text); }
.brand-mark {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  flex: none;
  border-radius: var(--radius-sm);
  background: var(--brand-600);
  color: #fff;
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.02em;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 1px 2px rgba(16, 24, 40, 0.12);
}
.brand-logo { width: 32px; height: 32px; border-radius: var(--radius-sm); object-fit: contain; }
.brand-copy { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.brand-copy strong { font-size: 14px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-copy span { font-size: 11.5px; color: var(--text-3); white-space: nowrap; }

.landing-topnav { display: flex; align-items: center; gap: 2px; margin-left: 16px; }
.landing-topnav a {
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-2);
  font-size: 13.5px;
  font-weight: 500;
  transition: background var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
}
.landing-topnav a:hover { background: var(--bg-subtle); color: var(--text); }

.topbar-cta { display: flex; align-items: center; gap: 8px; }

/* 用户芯片 */
.user-chip {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 40px;
  padding: 3px 10px 3px 3px;
  border-radius: var(--radius-full);
  background: var(--surface);
  color: var(--text);
  font-family: inherit;
  cursor: pointer;
  transition: border-color var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out);
}
.user-chip:hover { background: var(--surface-high); border-color: var(--border-strong); box-shadow: none; color: var(--text); }
.user-avatar {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  flex: none;
  border-radius: 50%;
  background: var(--brand-100);
  color: var(--brand-700);
  font-size: 13px;
  font-weight: 700;
}
.chip-info { display: flex; flex-direction: column; line-height: 1.3; text-align: left; }
.chip-name {
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}
.chip-meta { font-size: 11px; font-weight: 400; color: var(--text-3); }
.user-menu-toggle { border: 1px solid var(--border); }
.user-menu-caret {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: var(--text-3);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.user-menu-toggle[aria-expanded="true"] .user-menu-caret { transform: rotate(180deg); }

/* 账号下拉菜单 */
.account-menu { position: relative; }
.account-menu-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 150;
  width: 272px;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  animation: pop-in 140ms var(--ease-out);
}
.account-menu-summary {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 4px;
  padding: 10px 10px 12px;
  border-bottom: 1px solid var(--border);
  line-height: 1.4;
}
.account-menu-summary strong { font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-menu-summary span { font-size: 12px; color: var(--text-3); }
.account-menu-item {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  width: 100%;
  min-height: 0;
  padding: 8px 10px;
  border: 0;
  border-radius: var(--radius-sm);
  background: none;
  color: var(--text-2);
  font-family: inherit;
  font-size: 13px;
  font-weight: 400;
  text-align: left;
  white-space: normal;
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
}
.account-menu-item svg {
  width: 18px;
  height: 18px;
  flex: none;
  fill: none;
  stroke: var(--text-3);
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.account-menu-item:hover { background: var(--bg-subtle); color: var(--text); box-shadow: none; }
.account-menu-item span { display: flex; flex-direction: column; line-height: 1.35; }
.account-menu-item strong { font-size: 13px; font-weight: 600; color: var(--text); }
.account-menu-item small { font-size: 11.5px; color: var(--text-3); }
.account-menu-divider { height: 1px; margin: 4px 2px; background: var(--border); }
.account-menu-logout strong { color: var(--danger-strong); }
.account-menu-logout svg { stroke: var(--danger-strong); }
.account-menu-logout:hover { background: var(--danger-bg); }
.account-menu form { margin: 0; }

/* 汉堡按钮（移动端） */
.menu-toggle {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 36px;
  height: 36px;
  min-height: 0;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  cursor: pointer;
}
.menu-toggle:hover { background: var(--surface-high); border-color: var(--border-strong); box-shadow: none; }
.menu-toggle span {
  display: block;
  width: 16px;
  height: 1.75px;
  border-radius: 2px;
  background: var(--text-2);
}

/* ============================================================
   5. 主体布局 / 侧边栏
   ============================================================ */
.body {
  flex: 1;
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
  align-items: start;
  width: 100%;
}
.body.guest-body { grid-template-columns: minmax(0, 1fr); }
.body > .guest-container { grid-column: 1 / -1; }

.sidebar {
  position: sticky;
  top: var(--topbar-h);
  height: calc(100vh - var(--topbar-h));
  height: calc(100dvh - var(--topbar-h));
  width: var(--sidebar-w);
  padding: 14px 10px 20px;
  overflow-y: auto;
  overscroll-behavior: contain;
  color: var(--text-2);
  background: var(--surface-high);
  border-right: 1px solid var(--border);
}
.sidebar::-webkit-scrollbar { width: 8px; }

.sidebar-mobile-head { display: none; }

.sidebar-account {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 2px 10px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-xs);
}
.sidebar-account-avatar {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: none;
  border-radius: var(--radius-sm);
  background: var(--brand-600);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
}
.sidebar-account-copy { display: flex; flex-direction: column; min-width: 0; line-height: 1.35; }
.sidebar-account-copy strong {
  font-size: 13px;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sidebar-account-copy span { font-size: 11.5px; color: var(--text-3); }

.sidebar-section-title {
  margin: 14px 10px 6px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-3);
}
.sidebar-divider-title {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  color: var(--brand-700);
}

/* 可折叠导航分组 */
.nav-group { margin: 0; }
.nav-group-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  min-height: 0;
  margin: 10px 0 2px;
  padding: 5px 10px;
  border: 0;
  border-radius: var(--radius-xs);
  background: none;
  color: var(--text-3);
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  transition: color var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out);
}
.nav-group-toggle:hover { color: var(--text); background: var(--bg-subtle); box-shadow: none; }
.nav-group-toggle-sub { margin-top: 6px; }
.nav-group-caret {
  width: 12px;
  height: 12px;
  flex: none;
  transition: transform var(--dur-base) var(--ease-out);
}
.nav-group.collapsed .nav-group-caret { transform: rotate(-90deg); }
.nav-group-body {
  display: grid;
  grid-template-rows: 1fr;
  transition: grid-template-rows var(--dur-base) var(--ease-out);
}
.nav-group.collapsed .nav-group-body { grid-template-rows: 0fr; }
.nav-group-body-inner { overflow: hidden; min-height: 0; }
.nav-group.no-anim .nav-group-body,
.nav-group.no-anim .nav-group-caret { transition: none; }

.nav-list {
  display: flex;
  flex-direction: column;
  gap: 1px;
  margin: 0 0 2px;
  padding: 0;
}

.nav-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  color: var(--text-2);
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1.3;
  transition: background var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out);
}
.nav-link svg.nav-icon {
  width: 17px;
  height: 17px;
  flex: none;
  color: #98a2b3;
  transition: color var(--dur-fast) var(--ease-out);
}
.nav-link span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.nav-link .nav-badge {
  margin-left: auto;
  min-width: 18px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--danger-strong);
  color: #fff;
  font-size: 11px;
  font-weight: 650;
  line-height: 18px;
  text-align: center;
  flex: none;
}
.nav-link.active .nav-badge { background: var(--brand-600); }
.nav-link:hover { color: var(--text); background: var(--bg-subtle); }
.nav-link:hover svg.nav-icon { color: var(--text-2); }
.nav-link.active {
  color: var(--brand-700);
  background: var(--surface);
  border-color: var(--border);
  box-shadow: var(--shadow-xs);
  font-weight: 600;
}
.nav-link.active svg.nav-icon { color: var(--brand-600); }

.nav-list-admin .nav-link { min-height: 32px; font-size: 13px; }

.logout-form { margin: 18px 2px 0; }
.btn-logout {
  color: var(--text-2) !important;
  background: transparent !important;
  border: 1px solid var(--border) !important;
  box-shadow: none !important;
}
.btn-logout:hover {
  color: var(--danger-strong) !important;
  background: var(--danger-bg) !important;
  border-color: var(--danger-border) !important;
}

.sidebar-scrim {
  position: fixed;
  inset: 0;
  z-index: 125;
  background: rgba(16, 24, 40, 0.42);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--dur-base) var(--ease-out);
}

/* ============================================================
   6. 内容容器 / 页头
   ============================================================ */
.container {
  width: 100%;
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 28px 32px 64px;
  min-width: 0;
}
.container:focus { outline: none; }

.guest-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: none;
  padding: 48px 20px 72px;
}
.guest-container > * { width: 100%; max-width: 1080px; }

.page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 24px;
}
.page-header h1 { margin: 0; font-size: 22px; }
.page-header p { margin: 4px 0 0; color: var(--text-3); font-size: 13.5px; }

/* page_header()：标题区不再是卡片，而是平铺的页头 + 右侧操作 */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: 24px;
  align-items: center;
  margin: 0 0 24px;
  padding: 0 0 20px;
  border-bottom: 1px solid var(--border);
}
.hero > h1 { grid-column: 1; margin: 0; font-size: 22px; font-weight: 650; }
.hero > p { grid-column: 1; margin: 4px 0 0; color: var(--text-3); font-size: 13.5px; }
.hero > .hero-actions { grid-column: 2; grid-row: 1 / span 2; margin-top: 0; justify-content: flex-end; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-bottom: 14px;
}
.section-heading > span,
.section-heading > div > span {
  display: block;
  margin-bottom: 2px;
  font-size: 12px;
  font-weight: 600;
  color: var(--brand-600);
}
.section-heading h2 { margin: 0; font-size: 16px; }
.section-heading h3 { margin: 0; font-size: 14.5px; }
.section-heading p { margin: 0; max-width: 460px; color: var(--text-3); font-size: 13px; }
.section-heading .badge { flex: none; }

/* ============================================================
   7. 按钮
   ============================================================ */
button,
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid var(--brand-600);
  border-radius: var(--radius-sm);
  background: var(--brand-600);
  color: #fff;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: var(--shadow-xs), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  transition: background var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out);
}
button:hover,
.btn:hover { background: var(--brand-700); border-color: var(--brand-700); color: #fff; }
button:focus-visible,
.btn:focus-visible { outline: none; box-shadow: var(--ring); }
button:disabled,
.btn:disabled,
button[aria-busy="true"] { opacity: 0.55; cursor: not-allowed; box-shadow: none; }
.btn svg, button svg { width: 16px; height: 16px; flex: none; }

.btn-primary { /* 与默认按钮一致，保留类名兼容 */ }

.btn-secondary,
button.secondary,
.btn.secondary {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-xs);
}
.btn-secondary:hover,
button.secondary:hover,
.btn.secondary:hover {
  background: var(--surface-high);
  color: var(--text);
  border-color: var(--border-strong);
}
.btn-secondary:active,
button.secondary:active,
.btn.secondary:active { background: var(--bg-subtle); }

.btn-outline {
  background: var(--surface);
  color: var(--brand-700);
  border-color: var(--brand-200);
  box-shadow: var(--shadow-xs);
}
.btn-outline:hover {
  background: var(--brand-50);
  color: var(--brand-800);
  border-color: var(--brand-300);
}
.btn-outline:active { background: var(--brand-100); }

.btn-danger,
button.danger {
  background: var(--danger-strong);
  border-color: var(--danger-strong);
  color: #fff;
}
.btn-danger:hover,
button.danger:hover { background: #912018; border-color: #912018; color: #fff; }
button.secondary.danger,
.btn-secondary.danger,
.btn-outline.danger {
  background: var(--surface);
  color: var(--danger-strong);
  border-color: var(--danger-border);
}
button.secondary.danger:hover,
.btn-secondary.danger:hover,
.btn-outline.danger:hover { background: var(--danger-bg); color: #912018; }

.btn-sm { min-height: 30px; padding: 0 10px; font-size: 12.5px; border-radius: var(--radius-xs); }
.btn-lg { min-height: 44px; padding: 0 20px; font-size: 14.5px; }
.btn-block { width: 100%; }

/* ============================================================
   8. 徽章 / 提示条
   ============================================================ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 1px 8px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  background: var(--surface-sunken);
  color: var(--text-2);
  font-size: 12px;
  font-weight: 550;
  line-height: 1.6;
  white-space: nowrap;
}
.badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.85;
}
.badge.muted::before,
.badge:not(.success):not(.badge-success):not(.danger):not(.error):not(.warning):not(.badge-warn):not(.badge-warning):not(.info):not(.primary)::before { display: none; }
.badge.success, .badge-success {
  background: var(--success-bg);
  border-color: var(--success-border);
  color: var(--success);
}
.badge.danger, .badge.error {
  background: var(--danger-bg);
  border-color: var(--danger-border);
  color: var(--danger-strong);
}
.badge.warning, .badge-warn, .badge-warning {
  background: var(--warning-bg);
  border-color: var(--warning-border);
  color: var(--warning);
}
.badge.info {
  background: var(--info-bg);
  border-color: var(--info-border);
  color: var(--info);
}
.badge.primary {
  background: var(--brand-50);
  border-color: var(--brand-200);
  color: var(--brand-700);
}
.badge.muted { background: var(--surface-sunken); border-color: var(--border); color: var(--text-3); }

.flash {
  position: relative;
  margin-bottom: 20px;
  padding: 11px 14px 11px 38px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--text);
  font-size: 13.5px;
  font-weight: 500;
}
.flash::before {
  content: "";
  position: absolute;
  left: 15px;
  top: 16px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-3);
  box-shadow: 0 0 0 3px rgba(102, 112, 133, 0.16);
}
.flash.success { background: var(--success-bg); border-color: var(--success-border); color: #054f31; }
.flash.success::before { background: var(--success); box-shadow: 0 0 0 3px rgba(6, 118, 71, 0.16); }
.flash.error { background: var(--danger-bg); border-color: var(--danger-border); color: #7a271a; }
.flash.error::before { background: var(--danger-strong); box-shadow: 0 0 0 3px rgba(180, 35, 24, 0.16); }
.flash.warning { background: var(--warning-bg); border-color: var(--warning-border); color: #7a2e0e; }
.flash.warning::before { background: var(--warning); box-shadow: 0 0 0 3px rgba(181, 71, 8, 0.16); }
.flash.info { background: var(--info-bg); border-color: var(--info-border); color: #194185; }
.flash.info::before { background: var(--info); box-shadow: 0 0 0 3px rgba(23, 92, 211, 0.16); }

/* ============================================================
   9. 卡片 / 栅格 / 统计
   ============================================================ */
.panel,
.table-card,
.stat,
.detail-card,
.settings-card,
.device-list-card,
.empty-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-xs);
}

.panel { padding: 20px 22px; margin-bottom: 20px; min-width: 0; }
.panel > h1 { font-size: 18px; }
.panel > h2 { margin-bottom: 14px; font-size: 15px; }
.panel > h3 { font-size: 14px; }
.panel > :last-child { margin-bottom: 0; }
.panel-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 14px;
}
.panel-title-row h2 { margin: 0; font-size: 15px; }
.panel-title-row a { font-size: 13px; font-weight: 500; }

.grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid > .panel,
.grid > .detail-card { margin-bottom: 0; }

.stat {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 16px 18px;
}
.stat-icon {
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-high);
  color: var(--text-2);
}
.stat-icon svg { width: 16px; height: 16px; }
.stat-label { padding-right: 40px; font-size: 13px; font-weight: 500; color: var(--text-3); }
.stat-value {
  margin-top: 6px;
  font-size: 26px;
  font-weight: 650;
  letter-spacing: -0.02em;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
  color: var(--text);
  overflow-wrap: anywhere;
}
.stat-foot { margin-top: 6px; font-size: 12.5px; color: var(--text-3); }

.split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
  margin-bottom: 20px;
}
.split > .panel,
.split > .table-card { margin-bottom: 0; }

.list { display: flex; flex-direction: column; gap: 8px; }
.list-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  transition: border-color var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out);
}
.list-item:hover { border-color: var(--border-strong); background: var(--surface-high); }
.list-item h3 { margin: 6px 0 2px; font-size: 14px; font-weight: 600; }
.list-item h3 a { color: var(--text); }
.list-item h3 a:hover { color: var(--brand-700); }
.list-item p { margin: 0; font-size: 12.5px; }

.meta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.meta { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 0 0 14px; color: var(--text-3); font-size: 12.5px; }

.empty-card { padding: 40px 24px; text-align: center; color: var(--text-3); }
.empty-card h2 { font-size: 15px; }

.detail-card { padding: 16px 18px; margin-bottom: 16px; min-width: 0; }
.detail-card > strong { display: block; margin-top: 2px; color: var(--text); font-size: 14px; overflow-wrap: anywhere; }
.detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.detail-grid > .detail-card { margin-bottom: 0; background: var(--surface-high); box-shadow: none; }
.detail-label { display: block; font-size: 12.5px; font-weight: 500; color: var(--text-3); }

.progress {
  height: 6px;
  margin-top: 10px;
  border-radius: var(--radius-full);
  background: var(--bg-subtle);
  overflow: hidden;
}
.progress > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--brand-500);
  transition: width var(--dur-slow) var(--ease-out);
}

/* 选项卡（错题本 / 代码分析等） */
.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  margin: 0 0 18px;
  padding: 3px;
  width: fit-content;
  max-width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface-sunken);
}
.tabs a {
  padding: 5px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-2);
  font-size: 13px;
  font-weight: 500;
}
.tabs a:hover { color: var(--text); }
.tabs a.active {
  background: var(--surface);
  color: var(--text);
  font-weight: 600;
  box-shadow: var(--shadow-sm);
}

/* ============================================================
   10. 表格
   ============================================================ */
.table-card { margin-bottom: 20px; overflow: hidden; min-width: 0; }
.table-card > h2 { margin: 0; padding: 16px 20px 12px; font-size: 15px; }
.table-card-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px 12px;
}
.table-card-heading h2 { margin: 0; font-size: 15px; }
.table-card-heading a { font-size: 13px; font-weight: 500; }
.table-card > .muted { padding: 0 20px 18px; }
.table-card > .toolbar,
.table-card > form.toolbar { padding: 0 20px; }
.table-card > .pagination { border-top: 1px solid var(--border); }

.table-wrap { width: 100%; overflow-x: auto; }
.table-card > .table-wrap { border-top: 1px solid var(--border); }
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}
thead th {
  padding: 9px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-high);
  color: var(--text-3);
  font-size: 12px;
  font-weight: 600;
  text-align: left;
  white-space: nowrap;
}
td {
  padding: 11px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text-2);
  vertical-align: middle;
}
td:first-child { color: var(--text); font-weight: 500; }
td form { margin: 0; }
tbody tr { transition: background var(--dur-fast) var(--ease-out); }
tbody tr:hover { background: var(--surface-high); }
tbody tr.unread-row { background: var(--brand-50); }
tr:last-child td { border-bottom: 0; }
.table-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.table-actions button,
.table-actions .btn { min-height: 30px; padding: 0 10px; font-size: 12.5px; }
.orders-table td { white-space: nowrap; }

/* ============================================================
   11. 表单
   ============================================================ */
form { margin: 0; }
label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 550;
  color: var(--text);
}
label > span { font-weight: 400; color: var(--text-3); }
label > input,
label > select,
label > textarea { margin-top: 6px; }
input,
select,
textarea {
  width: 100%;
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  line-height: 1.45;
  box-shadow: var(--shadow-xs);
  transition: border-color var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out);
}
input + label,
select + label,
textarea + label,
.field-hint + label,
.help-text + label,
.auth-field-help + label { margin-top: 14px; }
select {
  appearance: none;
  padding-right: 34px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23667085' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 16px;
}
select[multiple] { padding-right: 12px; background-image: none; }
textarea { min-height: 96px; resize: vertical; }
input[type="file"] { padding: 6px; }
input[type="color"] { padding: 3px; width: 56px; }
input:hover,
select:hover,
textarea:hover { border-color: var(--border-strong); }
input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--brand-400);
  box-shadow: var(--ring);
}
input:disabled,
select:disabled,
textarea:disabled,
input[readonly] { background: var(--surface-sunken); color: var(--text-2); box-shadow: none; }
input[type="checkbox"],
input[type="radio"] {
  width: 16px;
  height: 16px;
  min-height: 0;
  padding: 0;
  margin: 0 6px 0 0;
  vertical-align: -3px;
  accent-color: var(--brand-600);
  box-shadow: none;
  cursor: pointer;
}
fieldset { margin: 0 0 14px; padding: 14px 16px; border: 1px solid var(--border); border-radius: var(--radius-md); }
legend { padding: 0 6px; font-size: 13px; font-weight: 600; }

.form-group { margin-bottom: 14px; }
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 16px;
}
.form-grid > label { margin-bottom: 0; }
.form-grid > .form-actions { grid-column: 1 / -1; margin-top: 4px; }
.form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
}
.inline-form { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px;
  margin-bottom: 16px;
}
.toolbar .form-actions { margin-top: 0; }
.toolbar label { margin-bottom: 0; font-size: 12.5px; color: var(--text-2); }
.toolbar input,
.toolbar select { width: auto; min-width: 150px; }

.checkbox-label,
.checkbox {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-weight: 450;
  color: var(--text-2);
  cursor: pointer;
}
.checkbox-label input[type="checkbox"],
.checkbox-label input[type="radio"],
.checkbox input[type="checkbox"],
.checkbox input[type="radio"] {
  flex: none;
  margin: 3px 0 0;
}

/* 邮箱验证码整页模式隐藏页脚 */
body:has(.auth-email-code-page) .guest-footer { display: none; }

/* ============================================================
   12. 分页
   ============================================================ */
.pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 20px;
  font-size: 13px;
}
.pagination-links { display: flex; gap: 8px; }
.pagination a,
.pagination span:not(.muted) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  padding: 0 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font-size: 13px;
  font-weight: 550;
  box-shadow: var(--shadow-xs);
}
.pagination a:hover { background: var(--surface-high); }
.pagination .active { background: var(--brand-600); border-color: var(--brand-600); color: #fff; }

/* ============================================================
   13. 对话框 / Toast
   ============================================================ */
dialog {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
}
dialog::backdrop { background: rgba(16, 24, 40, 0.45); }
dialog:not(.app-dialog) > form,
dialog:not(.app-dialog) > div:not([class*="card"]) {
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
}
.app-dialog,
.admin-channel-dialog {
  width: min(440px, calc(100vw - 32px));
  border-radius: var(--radius-xl);
}
.app-dialog-card {
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  animation: pop-in 160ms var(--ease-out);
}
.app-dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}
.app-dialog-head h2 { margin: 0; font-size: 16px; }
.app-dialog-close {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: var(--radius-xs);
  background: transparent;
  color: var(--text-3);
  font-size: 18px;
  font-weight: 400;
  box-shadow: none;
}
.app-dialog-close:hover { background: var(--bg-subtle); border: 0; color: var(--text); }
.app-dialog-card > p { margin: 0 0 20px; color: var(--text-2); font-size: 14px; }
.app-dialog-actions { display: flex; justify-content: flex-end; gap: 8px; }
.app-dialog-actions button { min-width: 84px; }
.app-dialog-actions .secondary { order: -1; }
.app-dialog-card .form-grid { grid-template-columns: 1fr; }
.admin-channel-dialog-form .form-actions,
.admin-user-dialog-form .form-actions { justify-content: flex-end; }

.app-toast {
  position: fixed;
  top: calc(var(--topbar-h) + 12px);
  right: 20px;
  z-index: 200;
  max-width: min(380px, calc(100vw - 40px));
  padding: 11px 14px;
  border-radius: var(--radius-md);
  background: #1d2939;
  color: #fff;
  font-size: 13.5px;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
  transition: opacity var(--dur-base) var(--ease-out), transform var(--dur-base) var(--ease-out);
}
.app-toast.show { opacity: 1; transform: translateY(0); }
.app-toast.success { background: #054f31; }
.app-toast.error { background: #7a271a; }

/* ============================================================
   14. 移动端底部导航 / 页脚
   ============================================================ */
.mobile-nav {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 135;
  background: var(--surface-glass);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-top: 1px solid var(--border);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.mobile-nav-inner { display: flex; height: var(--mobile-nav-h); }
.mobile-nav-link {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: var(--text-3);
  font-size: 11px;
  font-weight: 550;
}
.mobile-nav-link svg { width: 20px; height: 20px; }
.mobile-nav-link.active { color: var(--brand-700); }
.mobile-nav-link.active svg { color: var(--brand-600); }

.site-footer {
  padding: 18px 20px;
  border-top: 1px solid var(--border);
  background: var(--surface);
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 12px;
  font-size: 12.5px;
  color: var(--text-3);
}
.footer-inner a { color: var(--text-2); }
.footer-inner a:hover { color: var(--brand-700); }
.footer-sep { color: var(--border-strong); }

/* ============================================================
   15. 落地页（landing 布局）
   ============================================================ */
body.landing-page { background: var(--surface); }
body.landing-page .topbar { background: rgba(255, 255, 255, 0.82); }
body.landing-page .guest-container { max-width: none; padding-top: 0; }
body.landing-page .guest-container > * { max-width: 1160px; }

.landing-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 56px;
  align-items: center;
  padding: 72px 0 56px;
  isolation: isolate;
}
.landing-hero-glow {
  position: absolute;
  inset: 0 -50vw;
  z-index: -1;
  background-image: radial-gradient(rgba(16, 24, 40, 0.07) 1px, transparent 1px);
  background-size: 22px 22px;
  -webkit-mask-image: radial-gradient(ellipse 60% 70% at 70% 40%, #000 30%, transparent 75%);
  mask-image: radial-gradient(ellipse 60% 70% at 70% 40%, #000 30%, transparent 75%);
  pointer-events: none;
}
.landing-eyebrow,
.landing-kicker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 16px;
  padding: 3px 10px 3px 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  background: var(--surface);
  color: var(--text-2);
  font-size: 12.5px;
  font-weight: 550;
  box-shadow: var(--shadow-xs);
}
.landing-eyebrow::before,
.landing-kicker::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-500);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.18);
}
.landing-hero-copy h1 {
  margin: 0 0 18px;
  font-size: clamp(32px, 4.4vw, 50px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.12;
}
.landing-hero-copy h1 em {
  font-style: normal;
  color: var(--brand-600);
}
.landing-hero-copy p { max-width: 520px; margin: 0 0 28px; color: var(--text-2); font-size: 16px; line-height: 1.7; }
.landing-hero-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.landing-hero-actions .btn { min-height: 44px; padding: 0 22px; font-size: 14.5px; }
.landing-hero-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
  color: var(--text-2);
  font-size: 13px;
}
.landing-hero-trust li { display: flex; align-items: center; gap: 6px; }
.landing-hero-trust svg { width: 15px; height: 15px; color: var(--accent-600); }

.landing-hero-visual { position: relative; min-height: 340px; padding: 12px 24px 40px 0; }
.landing-mock-console {
  position: relative;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--surface);
  box-shadow: 0 24px 48px -12px rgba(16, 24, 40, 0.18), 0 0 0 6px rgba(240, 241, 255, 0.7);
  overflow: hidden;
}
.lmc-chrome {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-high);
}
.lmc-chrome i { width: 10px; height: 10px; border-radius: 50%; background: var(--border-strong); }
.lmc-chrome span {
  flex: 1;
  max-width: 220px;
  height: 18px;
  margin-left: 10px;
  border-radius: var(--radius-full);
  background: var(--bg-subtle);
}
.lmc-body { padding: 18px; }
.lmc-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 18px; }
.lmc-stat {
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
}
.lmc-stat b { display: block; font-size: 20px; font-weight: 650; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.lmc-stat span { font-size: 12px; color: var(--text-3); }
.lmc-line {
  height: 10px;
  margin-bottom: 10px;
  border-radius: var(--radius-full);
  background: var(--bg-subtle);
}
.lmc-line.w80 { width: 80%; }
.lmc-line.w60 { width: 60%; }
.lmc-progress { height: 8px; margin-top: 16px; border-radius: var(--radius-full); background: var(--bg-subtle); overflow: hidden; }
.lmc-progress i { display: block; width: 64%; height: 100%; border-radius: inherit; background: var(--brand-500); }

.landing-mock-panel {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 236px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  animation: fade-up 500ms var(--ease-out) 150ms backwards;
}
.lmp-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; font-size: 12.5px; font-weight: 600; }
.lmp-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent-500); box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.18); }
.lmp-row { display: flex; align-items: center; justify-content: space-between; font-size: 12.5px; color: var(--text-2); }
.lmp-toggle {
  position: relative;
  width: 30px;
  height: 18px;
  border-radius: var(--radius-full);
  background: var(--brand-600);
}
.lmp-toggle::after {
  content: "";
  position: absolute;
  top: 2px;
  right: 2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  box-shadow: var(--shadow-xs);
}
.lmp-bar { height: 6px; margin: 10px 0 8px; border-radius: var(--radius-full); background: var(--bg-subtle); overflow: hidden; }
.lmp-bar i { display: block; width: 78%; height: 100%; background: var(--accent-500); }
.lmp-meta { font-size: 11.5px; color: var(--text-3); }

.landing-chip {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  background: var(--surface);
  box-shadow: var(--shadow-md);
  font-size: 12.5px;
  font-weight: 550;
}
.landing-chip svg { width: 14px; height: 14px; color: var(--accent-600); }
.landing-chip.chip-a { top: -6px; left: -20px; animation: fade-up 500ms var(--ease-out) 250ms backwards; }
.landing-chip.chip-b { top: 46%; right: -8px; animation: fade-up 500ms var(--ease-out) 350ms backwards; }
.landing-chip-sub { color: var(--text-3); font-weight: 400; }

.landing-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin: 8px 0 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  overflow: hidden;
}
.landing-metric {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 20px;
  border-right: 1px solid var(--border);
}
.landing-metric:last-child { border-right: 0; }
.landing-metric-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex: none;
  border-radius: var(--radius-sm);
  background: var(--brand-50);
  color: var(--brand-600);
}
.landing-metric-icon svg { width: 18px; height: 18px; }
.landing-metric strong { display: block; font-size: 14px; }
.landing-metric span:not(.landing-metric-icon) { font-size: 12.5px; color: var(--text-3); }

.landing-section-head { margin: 88px 0 28px; text-align: center; }
.landing-section-head h2 { margin: 0 0 10px; font-size: clamp(24px, 3vw, 32px); font-weight: 700; letter-spacing: -0.025em; }
.landing-section-head p { margin: 0 auto; max-width: 560px; color: var(--text-2); font-size: 15px; }

.landing-features {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--border);
  overflow: hidden;
}
.landing-feature {
  padding: 26px 24px;
  background: var(--surface);
  transition: background var(--dur-base) var(--ease-out);
}
.landing-feature:hover { background: var(--surface-high); }
.landing-feature-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  margin-bottom: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--brand-600);
  box-shadow: var(--shadow-xs);
}
.landing-feature-icon svg { width: 18px; height: 18px; }
.landing-feature h3 { margin: 0 0 6px; font-size: 15px; }
.landing-feature p { margin: 0; color: var(--text-2); font-size: 13.5px; }

.landing-flow {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.landing-step {
  position: relative;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
}
.landing-step-tag {
  display: inline-block;
  margin-bottom: 14px;
  padding: 2px 10px;
  border-radius: var(--radius-full);
  background: var(--brand-50);
  color: var(--brand-700);
  font-size: 12px;
  font-weight: 600;
}
.landing-step strong { display: block; margin-bottom: 6px; font-size: 15px; }
.landing-step span:not(.landing-step-tag) { color: var(--text-2); font-size: 13.5px; }

.landing-platforms {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.landing-platform {
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-xs);
}
.landing-platform-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; padding-bottom: 16px; border-bottom: 1px solid var(--border); }
.landing-platform-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: none;
  border-radius: var(--radius-md);
  background: var(--brand-600);
  color: #fff;
}
.landing-platform-icon svg { width: 20px; height: 20px; }
.landing-platform-head h3 { margin: 0; font-size: 15px; }
.landing-platform-head span { font-size: 12.5px; color: var(--text-3); }
.landing-platform ul { margin: 0; padding: 0; list-style: none; }
.landing-platform li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 5px 0;
  color: var(--text-2);
  font-size: 13.5px;
}
.landing-platform li svg { width: 15px; height: 15px; flex: none; margin-top: 4px; color: var(--accent-600); }

.landing-assurance {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 72px;
  padding: 24px 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--surface-high);
}
.landing-assurance-item { display: flex; align-items: center; gap: 12px; }
.landing-assurance-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--brand-600);
}
.landing-assurance-icon svg { width: 18px; height: 18px; }
.landing-assurance-item span { display: block; font-size: 12.5px; color: var(--text-3); }
.landing-assurance-item strong { font-size: 14px; }

.landing-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
  margin: 72px 0 32px;
  padding: 40px;
  border-radius: var(--radius-2xl);
  background: #101828;
  color: #fff;
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.landing-cta::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: radial-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px);
  background-size: 20px 20px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000);
  mask-image: linear-gradient(90deg, transparent, #000);
}
.landing-cta h2 { margin: 0 0 6px; color: #fff; font-size: 24px; letter-spacing: -0.02em; }
.landing-cta p { margin: 0; color: rgba(255, 255, 255, 0.72); font-size: 14.5px; }
.landing-cta .hero-actions { margin-top: 0; }
.landing-cta .btn { background: #fff; border-color: #fff; color: #101828; }
.landing-cta .btn:hover { background: var(--brand-50); border-color: var(--brand-50); color: #101828; }
.landing-cta .btn-outline { background: transparent; color: #fff; border-color: rgba(255, 255, 255, 0.35); box-shadow: none; }
.landing-cta .btn-outline:hover { background: rgba(255, 255, 255, 0.1); color: #fff; border-color: rgba(255, 255, 255, 0.6); }

/* ============================================================
   16. 认证页
   ============================================================ */
.auth-shell {
  width: 100%;
  max-width: 420px;
  margin: 16px auto 24px;
}
.auth-shell::before {
  content: "";
  display: block;
  width: 44px;
  height: 44px;
  margin: 0 auto 20px;
  border-radius: var(--radius-md);
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='11' width='16' height='10' rx='2'/%3E%3Cpath d='M8 11V7a4 4 0 0 1 8 0v4'/%3E%3C/svg%3E") center / 20px no-repeat,
    var(--brand-600);
  box-shadow: var(--shadow-md), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}
.auth-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--surface);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}
.auth-card > .auth-inline-feedback { margin: 20px 24px 0; }
.auth-card-header {
  padding: 28px 28px 0;
  text-align: center;
}
.auth-card-header h1,
.auth-card-header h2 { margin: 0 0 6px; font-size: 20px; font-weight: 650; letter-spacing: -0.015em; }
.auth-card-header p { margin: 0; color: var(--text-3); font-size: 13.5px; }
.auth-card-body { padding: 22px 28px 28px; }
.auth-form { display: flex; flex-direction: column; gap: 0; }
.auth-form > label { margin-top: 12px; }
.auth-form > label:first-of-type,
.auth-form > .auth-label-row:first-child,
.auth-form > input[type="hidden"] + label { margin-top: 0; }
.auth-form > .flash { margin: 14px 0 0; }
.auth-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.auth-entry-field { margin-bottom: 14px; }
.auth-entry-form { display: flex; flex-direction: column; }
.auth-entry-help,
.auth-field-help { margin: 8px 0 0; font-size: 12.5px; color: var(--text-3); }
.auth-entry-help { text-align: center; margin-top: 14px; }
.auth-label-row { display: flex; align-items: center; justify-content: space-between; margin: 12px 0 6px; }
.auth-label-row label { margin-bottom: 0; }
.auth-label-row a { font-size: 12.5px; font-weight: 500; }
.auth-submit { width: 100%; min-height: 40px; margin-top: 18px; }
.auth-switch { margin-top: 18px; text-align: center; font-size: 13.5px; color: var(--text-3); }
.auth-consent { margin-top: 14px; font-size: 12.5px; color: var(--text-2); }
.auth-quick-login { margin-top: 6px; }
.auth-login-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0 14px;
  color: var(--text-3);
  font-size: 12px;
}
.auth-login-divider::before,
.auth-login-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}
.auth-login-options { display: flex; flex-direction: column; gap: 8px; }
.auth-login-options a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font-size: 13.5px;
  font-weight: 550;
  box-shadow: var(--shadow-xs);
}
.auth-login-options a:hover { background: var(--surface-high); text-decoration: none; color: var(--text); }
.auth-email-target {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 10px;
  margin-bottom: 14px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface-high);
  color: var(--text);
  font-size: 13px;
}
.auth-email-target span { width: 100%; font-size: 12px; color: var(--text-3); }
.auth-email-target strong { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.auth-email-target a { font-size: 12.5px; font-weight: 500; }
.auth-code-input {
  font-family: var(--font-mono);
  font-size: 18px;
  letter-spacing: 0.3em;
  text-align: center;
}

/* 邮箱验证码整页模式 */
.auth-email-code-page { position: relative; width: 100%; max-width: 420px; margin: 24px auto; }
.auth-email-code-content {
  padding: 32px 28px 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--surface);
  box-shadow: var(--shadow-md);
  text-align: center;
}
.auth-email-code-content h1 { margin: 0 0 8px; font-size: 20px; }
.auth-email-code-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  color: var(--text-3);
}
.auth-email-code-close:hover { background: var(--bg-subtle); color: var(--text); }
.auth-email-code-close svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.auth-email-code-intro { margin: 0 0 22px; color: var(--text-2); font-size: 13.5px; }
.auth-email-code-intro h1 { margin: 0 0 6px; font-size: 20px; }
.auth-email-code-form { display: flex; flex-direction: column; gap: 18px; }
.auth-email-code-fields { display: flex; justify-content: center; gap: 8px; margin: 0; padding: 0; border: 0; }
.auth-email-code-fields input {
  width: 46px;
  height: 54px;
  padding: 0;
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 600;
  text-align: center;
}
.auth-email-code-resend { margin: 18px 0 0; font-size: 12.5px; color: var(--text-3); }
.auth-email-code-resend button {
  min-height: 0;
  padding: 0;
  border: 0;
  background: none;
  color: var(--brand-600);
  font-size: 12.5px;
  font-weight: 600;
  box-shadow: none;
}
.auth-email-code-resend button:hover { background: none; color: var(--brand-700); }
.auth-email-code-submit { width: 100%; min-height: 40px; }
.auth-email-code-alt { display: flex; justify-content: center; gap: 6px; margin-top: 12px; font-size: 13px; color: var(--text-3); }

/* 图形验证码 / 极验 */
.captcha-field { margin: 14px 0 0; padding: 0; border: 0; }
.captcha-field legend { margin-bottom: 6px; padding: 0; font-size: 13px; font-weight: 550; }
.captcha-row { display: flex; align-items: center; gap: 8px; }
.captcha-row input { flex: 1; }
.captcha-row img {
  height: 38px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.captcha-refresh {
  min-height: 38px;
  padding: 0 12px;
  white-space: nowrap;
}
.geetest-field { margin: 14px 0 0; }
.geetest-container { min-height: 44px; }
.geetest-status { margin-top: 6px; font-size: 12.5px; color: var(--text-3); }

/* 登录用的面板（旧样式类保留） */
.panel-auth { max-width: 460px; margin: 24px auto; }

/* ============================================================
   17. 仪表盘 / 快捷操作
   ============================================================ */
.dashboard-welcome {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 24px;
  padding: 0 0 20px;
  border-bottom: 1px solid var(--border);
}
.dashboard-welcome-copy h1 { margin: 2px 0 4px; font-size: 24px; font-weight: 650; letter-spacing: -0.02em; }
.dashboard-welcome-copy p { margin: 0; color: var(--text-3); font-size: 13.5px; }
.dashboard-welcome .hero-actions { margin-top: 0; }
.dashboard-kicker {
  display: inline-block;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--brand-600);
}

.quick-start-section { margin-bottom: 24px; }
.quick-action-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.quick-action-grid a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-xs);
  color: var(--text);
  transition: border-color var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out);
}
.quick-action-grid a:hover { border-color: var(--brand-300); box-shadow: var(--shadow-sm); color: var(--text); }
.quick-action-grid a > span {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  flex: none;
  border-radius: var(--radius-sm);
  background: var(--brand-50);
  color: var(--brand-700);
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.quick-action-grid a > div { flex: 1; min-width: 0; line-height: 1.4; }
.quick-action-grid strong { display: block; font-size: 13.5px; }
.quick-action-grid small { font-size: 12px; color: var(--text-3); }
.quick-action-grid b {
  flex: none;
  font-size: 0;
  width: 16px;
  height: 16px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2398a2b3' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m9 18 6-6-6-6'/%3E%3C/svg%3E") center / 16px no-repeat;
  transition: transform var(--dur-fast) var(--ease-out);
}
.quick-action-grid a:hover b { transform: translateX(2px); }

/* ============================================================
   18. 设置页 / 详情页
   ============================================================ */
.settings-workspace {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}
.settings-tabs {
  position: sticky;
  top: calc(var(--topbar-h) + 20px);
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.settings-tabs a {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 8px 12px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  color: var(--text-2);
  font-size: 13.5px;
  font-weight: 500;
}
.settings-tabs a small { font-size: 12px; color: var(--text-3); font-weight: 400; }
.settings-tabs a:hover { background: var(--bg-subtle); color: var(--text); }
.settings-tabs a.active {
  background: var(--surface);
  border-color: var(--border);
  box-shadow: var(--shadow-xs);
  color: var(--brand-700);
  font-weight: 600;
}
.settings-tab-content { min-width: 0; }
.settings-card { padding: 22px; margin-bottom: 18px; }
.settings-card-head { margin: -2px 0 18px; padding-bottom: 14px; border-bottom: 1px solid var(--border); }
.settings-card-head h2 { margin: 0 0 2px; font-size: 15px; }
.settings-card-head p { margin: 0; color: var(--text-3); font-size: 13px; }
.settings-form .form-grid { margin-bottom: 4px; }
.settings-form-primary { margin-top: 4px; }
.settings-notice {
  margin-bottom: 16px;
  padding: 11px 14px;
  border: 1px solid var(--info-border);
  border-radius: var(--radius-md);
  background: var(--info-bg);
  color: #194185;
  font-size: 13px;
}
.settings-test-form { margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--border); }

.danger-zone { border-color: var(--danger-border); }
.danger-zone h2 { color: var(--danger-strong); }

/* TOTP */
.totp-setup-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}
.totp-qr-panel { text-align: center; }
.totp-qr-frame {
  display: inline-block;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: #fff;
}
.totp-qr-unavailable { padding: 24px; color: var(--text-3); font-size: 13px; }
.totp-manual-panel { margin-top: 14px; }
.totp-secret {
  display: inline-block;
  padding: 7px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-sunken);
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.08em;
  overflow-wrap: anywhere;
}
.totp-uri-details { margin-top: 10px; font-size: 12.5px; }
.totp-help { font-size: 13px; color: var(--text-3); }

/* 设备绑定 */
.device-bind-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 18px;
  padding: 18px 20px;
  border: 1px solid var(--brand-200);
  border-radius: var(--radius-lg);
  background: var(--brand-50);
}
.device-bind-action { text-align: right; }
.device-bind-copy { font-size: 13.5px; color: var(--text-2); }
.device-bind-copy h2 { margin-bottom: 4px; }
.device-code-box { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.device-code-box input { width: 220px; font-family: var(--font-mono); background: var(--surface); }
.device-filter-form { margin-bottom: 14px; }
.device-list-card { padding: 18px 20px; margin-bottom: 12px; }

/* ============================================================
   19. 支付 / 套餐 / 数据中心 / 学习工具
   ============================================================ */
.manual-qr-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}
.manual-qr-card {
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  text-align: center;
}
.manual-qr-card img { max-width: 100%; border-radius: var(--radius-md); }
.pay-channel-notice { margin-bottom: 14px; font-size: 13px; color: var(--text-3); }
.payment-proof-preview img { max-width: 240px; border-radius: var(--radius-md); border: 1px solid var(--border); }

.price-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.membership-price { font-size: 26px; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.price-sale { color: var(--danger-strong); }
.price-sale del { color: var(--text-3); font-weight: 400; margin-right: 6px; }

.claim-channel { margin-bottom: 16px; }
.claim-ref-label { font-size: 12.5px; color: var(--text-3); }
.claim-ref { font-family: var(--font-mono); font-size: 13px; }
.claim-ref-hint { font-size: 12.5px; color: var(--text-3); }
.claim-paid-form { margin-top: 14px; }
.claim-paid-details { margin-top: 12px; }

.insight-bars { display: flex; flex-direction: column; gap: 10px; }
.insight-bar-row { display: grid; grid-template-columns: 140px 1fr auto; align-items: center; gap: 12px; font-size: 13px; }
.insight-bar-track { height: 8px; border-radius: var(--radius-full); background: var(--bg-subtle); overflow: hidden; }
.insight-bar-track > span,
.insight-bar-row .insight-bar-fill { display: block; height: 100%; border-radius: inherit; background: var(--brand-500); }

.leaderboard { display: flex; flex-direction: column; gap: 6px; }
.leader-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--radius-sm); }
.leader-row:nth-child(odd) { background: var(--surface-high); }
.leader-rank {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: var(--radius-xs);
  background: var(--bg-subtle);
  font-size: 12px;
  font-weight: 650;
  color: var(--text-2);
  font-variant-numeric: tabular-nums;
}

.announcement-list { display: flex; flex-direction: column; gap: 12px; }
.announcement {
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-left: 3px solid var(--brand-400);
  border-radius: var(--radius-md);
  background: var(--surface);
}
.announcement .section-heading { margin-bottom: 6px; }
.announcement-warning { border-left-color: var(--warning); }
.announcement-danger,
.announcement-critical { border-left-color: var(--danger-strong); }
.announcement-success { border-left-color: var(--success); }
.announcement-body { margin-bottom: 6px; color: var(--text-2); font-size: 13.5px; }

.invite-link-box { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.invite-link-box input { flex: 1; font-family: var(--font-mono); font-size: 12.5px; }

/* 错题复习 */
.review-session { display: flex; flex-direction: column; gap: 14px; }
.review-card {
  padding: 18px 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-xs);
  transition: opacity var(--dur-slow) var(--ease-out);
}
.review-card h3 { margin: 0 0 2px; color: var(--text-3); font-size: 12.5px; font-weight: 600; }
.problem-title { margin-bottom: 12px; font-size: 15px; font-weight: 600; }
.question-text,
.user-answer { margin: 0; }
.user-answer { border-color: var(--danger-border); background: var(--danger-bg); }
.review-quality { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); }
.review-quality p { margin-bottom: 8px; font-size: 13px; color: var(--text-2); }
.quality-buttons { display: flex; flex-wrap: wrap; gap: 6px; }
.btn-quality {
  min-width: 40px;
  background: var(--surface);
  color: var(--text);
  border-color: var(--border-strong);
  font-variant-numeric: tabular-nums;
}
.btn-quality:hover { background: var(--brand-50); color: var(--brand-700); border-color: var(--brand-300); }

/* 苏格拉底对话 */
.chat-session {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
}
.chat-history { display: flex; flex-direction: column; gap: 12px; }
.chat-message {
  max-width: min(680px, 88%);
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 14px 14px 14px 4px;
  background: var(--surface-high);
}
.chat-message.user {
  align-self: flex-end;
  border-color: var(--brand-200);
  border-radius: 14px 14px 4px 14px;
  background: var(--brand-50);
}
.message-role { margin-bottom: 2px; font-size: 12px; font-weight: 600; color: var(--text-3); }
.chat-message.user .message-role { color: var(--brand-700); }
.message-content { font-size: 14px; color: var(--text); overflow-wrap: anywhere; }
.message-meta { margin-top: 4px; font-size: 11.5px; color: var(--text-3); }
.chat-input-form { display: flex; align-items: flex-end; gap: 8px; padding-top: 16px; border-top: 1px solid var(--border); }
.chat-input-form textarea { flex: 1; min-height: 72px; }

/* 代码分析 */
.code-block { max-height: 520px; }
.analysis-result {
  margin-top: 16px;
  padding: 16px 18px;
  border: 1px solid var(--brand-200);
  border-radius: var(--radius-md);
  background: var(--brand-50);
}
.analysis-result h4 { margin: 0 0 8px; color: var(--brand-700); }
.analysis-result .content { color: var(--text); font-size: 14px; line-height: 1.75; overflow-wrap: anywhere; }
.answer-preview { max-width: 360px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 运维监控 */
.ops-meter { display: flex; flex-direction: column; gap: 6px; }
.ops-meter-label { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--text-3); }
.ops-meter-track { height: 8px; border-radius: var(--radius-full); background: var(--bg-subtle); overflow: hidden; }
.ops-meter-fill { display: block; height: 100%; border-radius: inherit; background: var(--brand-500); transition: width var(--dur-slow) var(--ease-out); }
.ops-meter-vip .ops-meter-fill { background: var(--accent-500); }

/* 管理后台用户对话框 */
.admin-user-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.admin-user-dialog { width: min(520px, calc(100vw - 32px)); }
.admin-user-dialog-summary {
  margin-bottom: 14px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface-high);
  font-size: 13px;
}
.admin-user-dialog-form .form-grid { grid-template-columns: 1fr 1fr; }

/* ============================================================
   20. 品牌预览 / 法律文档 / 杂项
   ============================================================ */
.brand-preview { display: flex; align-items: center; gap: 12px; }
.brand-preview-img {
  width: 44px;
  height: 44px;
  object-fit: contain;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
}
.brand-preview-favicon .brand-preview-img { width: 28px; height: 28px; }

.legal-doc { max-width: 820px; margin-left: auto; margin-right: auto; padding: 32px 36px; line-height: 1.85; }
.legal-doc h1 { font-size: 24px; }
.legal-doc h2 { margin-top: 1.6em; font-size: 16.5px; }
.legal-doc h3 { margin-top: 1.2em; font-size: 15px; }
.legal-doc p,
.legal-doc li { color: var(--text-2); }

/* ============================================================
   21. 动效偏好
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ============================================================
   22. 响应式
   ============================================================ */
@media (max-width: 1280px) {
  :root { --sidebar-w: 228px; }
  .container { padding: 24px 24px 56px; }
}

@media (max-width: 1180px) {
  .quick-action-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .landing-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .landing-metric:nth-child(2) { border-right: 0; }
  .landing-metric:nth-child(-n+2) { border-bottom: 1px solid var(--border); }
}

@media (max-width: 1024px) {
  .menu-toggle { display: inline-flex; }

  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 140;
    width: min(300px, 84vw);
    height: 100vh;
    height: 100dvh;
    padding-top: 0;
    background: var(--surface);
    transform: translateX(-100%);
    transition: transform var(--dur-slow) var(--ease-out);
  }
  .nav-open .sidebar {
    transform: translateX(0);
    box-shadow: 24px 0 64px rgba(16, 24, 40, 0.2);
  }
  .nav-open .sidebar-scrim { opacity: 1; pointer-events: auto; }
  body.nav-open { overflow: hidden; }

  .sidebar-mobile-head {
    position: sticky;
    top: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 0 -10px 12px;
    padding: 14px 16px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
  }
  .sidebar-mobile-head button {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    min-height: 0;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--text-2);
    font-size: 18px;
    font-weight: 400;
    box-shadow: none;
  }
  .sidebar-mobile-head button:hover { background: var(--bg-subtle); border-color: var(--border-strong); color: var(--text); }
  .body { grid-template-columns: minmax(0, 1fr); }

  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .landing-hero { grid-template-columns: 1fr; gap: 40px; padding-top: 48px; }
  .landing-hero-visual { max-width: 560px; }
  .landing-features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .landing-platforms { grid-template-columns: 1fr; }
  .landing-flow { grid-template-columns: 1fr; }
  .landing-assurance { grid-template-columns: 1fr; gap: 14px; }
}

@media (max-width: 900px) {
  .landing-topnav { display: none; }
  .settings-workspace { grid-template-columns: 1fr; gap: 16px; }
  .settings-tabs {
    position: static;
    flex-direction: row;
    overflow-x: auto;
    padding: 3px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--surface-sunken);
  }
  .settings-tabs a { flex: none; padding: 6px 12px; }
  .settings-tabs small { display: none; }
  .totp-setup-grid { grid-template-columns: 1fr; }
  .split { grid-template-columns: 1fr; }
  .grid.three { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 768px) {
  :root { --topbar-h: 54px; }
  .topbar { padding: 0 12px; }
  .brand-copy span { display: none; }
  .chip-info { display: none; }
  .user-chip { padding: 3px; gap: 4px; }
  .user-menu-caret { display: none; }
  .container { padding: 20px 16px calc(var(--mobile-nav-h) + 32px); }
  .guest-container { padding: 28px 16px 48px; }
  .mobile-nav { display: block; }
  body:has(.mobile-nav) .site-footer { padding-bottom: calc(var(--mobile-nav-h) + 18px + env(safe-area-inset-bottom, 0px)); }

  .hero { grid-template-columns: 1fr; row-gap: 12px; }
  .hero > .hero-actions { grid-column: 1; grid-row: auto; justify-content: flex-start; }
  .form-grid { grid-template-columns: 1fr; }
  .panel { padding: 18px 16px; }
  .settings-card { padding: 18px 16px; }
  .table-card-heading,
  .table-card > h2 { padding: 14px 16px 10px; }
  .table-card > .toolbar,
  .table-card > form.toolbar { padding: 0 16px; }
  thead th, td { padding-left: 12px; padding-right: 12px; }
  .toolbar input,
  .toolbar select { min-width: 0; width: 100%; }
  .toolbar > * { flex: 1 1 160px; }
  .device-bind-panel { flex-direction: column; align-items: stretch; }
  .device-bind-action { text-align: left; }
  .device-code-box input { width: 100%; }
  .insight-bar-row { grid-template-columns: 96px 1fr auto; }
  .landing-features { grid-template-columns: 1fr; }
  .landing-hero-visual { padding-right: 0; }
  .landing-chip.chip-a { left: 0; }
  .landing-cta { padding: 28px 24px; }
  .legal-doc { padding: 24px 20px; }
  .admin-user-dialog-form .form-grid { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .auth-form-grid { grid-template-columns: 1fr; }
  .grid.three { grid-template-columns: 1fr; }
  .quick-action-grid { grid-template-columns: 1fr; }
  .landing-metrics { grid-template-columns: 1fr; }
  .landing-metric { border-right: 0; border-bottom: 1px solid var(--border); }
  .landing-metric:last-child { border-bottom: 0; }
  .landing-mock-panel { position: relative; width: auto; margin-top: 12px; }
  .landing-chip { display: none; }
  .auth-card-header { padding: 24px 20px 0; }
  .auth-card-body { padding: 20px 20px 24px; }
  .auth-email-code-content { padding: 28px 18px 22px; }
  .auth-email-code-fields { gap: 6px; }
  .auth-email-code-fields input { width: 40px; height: 48px; font-size: 19px; }
  .dashboard-welcome-copy h1 { font-size: 21px; }
  .chat-message { max-width: 100%; }
  .chat-input-form { flex-direction: column; align-items: stretch; }
}

@media (max-width: 390px) {
  .grid { grid-template-columns: 1fr; }
  .stat-value { font-size: 24px; }
  .brand-copy strong { max-width: 120px; }
}

/* ============================================================
   23. v7 “Desk” 视觉调整
   目标：去掉模板化的 AI 感——纸张底色、墨色文字、细分割线、
   低圆角、无阴影、编号式章节；营销区不再使用渐变光斑、
   悬浮卡片和假仪表盘。所有既有类名与交互钩子保持不变。
   ============================================================ */
:root {
  color-scheme: light;

  /* 墨蓝作为唯一品牌色，替代高饱和 Iris */
  --brand-50: #eef1f4;
  --brand-100: #dde3e9;
  --brand-200: #c2cdd7;
  --brand-300: #9dafbe;
  --brand-400: #748b9e;
  --brand-500: #526b80;
  --brand-600: #2f3e4e;
  --brand-700: #26333f;
  --brand-800: #1e2832;
  --brand-900: #171f26;

  /* 少量暖赭色用于编号和强调，不做大面积色块 */
  --accent-500: #a9762f;
  --accent-600: #8a5f24;

  /* 纸张与墨色 */
  --bg: #f4f1e9;
  --bg-subtle: #eae6dc;
  --surface: #fdfcf8;
  --surface-high: #f7f4ec;
  --surface-sunken: #efece3;
  --surface-glass: rgba(253, 252, 248, 0.94);
  --border: #dcd6c8;
  --border-strong: #c4bdac;
  --text: #1c1b18;
  --text-2: #4d4a42;
  --text-3: #6f6a5e;

  /* 语义色降饱和，仍保持 4.5:1 以上对比度 */
  --success: #2f6b4a;
  --success-bg: #edf4ee;
  --success-border: #c3dccb;
  --danger: #a63a2a;
  --danger-strong: #8f2f21;
  --danger-bg: #fbeeeb;
  --danger-border: #e8c3ba;
  --warning: #8a5f24;
  --warning-bg: #faf3e3;
  --warning-border: #e6d2a8;
  --info: #2f5d78;
  --info-bg: #eef4f7;
  --info-border: #c3d7e1;

  /* 接近印刷品的直角与细线 */
  --radius-xs: 2px;
  --radius-sm: 3px;
  --radius-md: 5px;
  --radius-lg: 7px;
  --radius-xl: 9px;
  --radius-2xl: 11px;

  --shadow-xs: none;
  --shadow-sm: none;
  --shadow-md: none;
  --shadow-lg: 0 16px 40px rgba(28, 27, 24, 0.14);
  --ring: 0 0 0 3px rgba(169, 118, 47, 0.25);

  --font-sans: "Segoe UI Variable Text", "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei UI", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  --font-serif: "Source Han Serif SC", "Noto Serif CJK SC", "Songti SC", "STSong", "SimSun", serif;
  --font-mono: "Cascadia Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

html,
body { background: var(--bg); }

body { line-height: 1.65; }

h1, h2, h3, h4 { font-weight: 600; letter-spacing: -0.005em; }

.topbar {
  background: var(--surface);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.brand-mark {
  border-radius: 2px;
  box-shadow: none;
  font-weight: 700;
}
.mobile-nav {
  background: var(--surface);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

button,
.btn {
  border-radius: 4px;
  box-shadow: none;
}
.btn-secondary,
button.secondary,
.btn.secondary,
.btn-outline { box-shadow: none; }
.btn-sm { border-radius: 3px; }

.badge { border-radius: 3px; }
.flash { border-radius: 4px; }
.tabs { border-radius: 5px; }
.tabs a { border-radius: 3px; }
input,
select,
textarea { border-radius: 4px; box-shadow: none; }
.pagination a,
.pagination span:not(.muted) { border-radius: 3px; box-shadow: none; }

/* —— 落地页 —— */
body.landing-page { background: var(--bg); }
body.landing-page .topbar { background: var(--surface); }
body.landing-page .guest-container {
  align-items: stretch;
  padding: 0 32px;
}
body.landing-page .guest-container > * {
  max-width: 1120px;
  margin-left: auto;
  margin-right: auto;
}

.landing-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(300px, 0.88fr);
  gap: 64px;
  align-items: start;
  padding: 88px 0 72px;
  border-bottom: 1px solid var(--border);
  isolation: auto;
}
.landing-hero-glow { display: none; }

.landing-hero-copy p.landing-overline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  max-width: none;
  margin: 0 0 26px;
  color: var(--text-3);
  font-size: 12px;
  line-height: 1.6;
  letter-spacing: 0.08em;
}
.landing-overline span + span::before {
  content: "/";
  margin-right: 10px;
  color: var(--border-strong);
}

.landing-hero-copy h1 {
  margin: 0 0 24px;
  font-family: var(--font-serif);
  font-size: clamp(34px, 4.4vw, 52px);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.24;
}
.landing-hero-copy h1 em {
  font-style: normal;
  color: inherit;
}
.landing-hero-copy p.landing-lede {
  max-width: 540px;
  margin: 0 0 30px;
  color: var(--text-2);
  font-size: 16px;
  line-height: 1.85;
}
.landing-hero-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.landing-hero-actions .btn { min-height: 44px; padding: 0 22px; font-size: 14px; }
.landing-hero-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin: 30px 0 0;
  padding: 0;
  list-style: none;
  color: var(--text-3);
  font-size: 12.5px;
}
.landing-hero-trust li { display: flex; align-items: center; gap: 6px; }
.landing-hero-trust svg { width: 14px; height: 14px; color: var(--accent-600); }

.landing-index {
  padding-top: 14px;
  border-top: 2px solid var(--text);
}
.landing-index-title {
  margin: 0 0 6px;
  color: var(--text-3);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.12em;
}
.landing-index-list { margin: 0; padding: 0; list-style: none; }
.landing-index-list li { border-bottom: 1px solid var(--border); }
.landing-index-list a {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 2px 10px;
  padding: 15px 0;
  color: var(--text);
  text-decoration: none;
}
.landing-index-list a:hover { color: var(--brand-700); text-decoration: none; }
.landing-index-num {
  grid-row: 1 / span 2;
  padding-top: 2px;
  color: var(--accent-600);
  font-family: var(--font-mono);
  font-size: 11.5px;
}
.landing-index-label { font-size: 14.5px; font-weight: 600; }
.landing-index-desc { grid-column: 2; color: var(--text-3); font-size: 12.5px; }
.landing-index-foot { margin: 14px 0 0; color: var(--text-3); font-size: 12px; }

.landing-section { padding: 72px 0 0; }
.landing-section-head {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  margin: 0 0 28px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
  text-align: left;
}
.landing-section-num {
  flex: none;
  padding-top: 4px;
  color: var(--accent-600);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
}
.landing-section-head h2 {
  margin: 0 0 6px;
  font-family: var(--font-serif);
  font-size: clamp(24px, 2.6vw, 32px);
  font-weight: 600;
  letter-spacing: -0.01em;
}
.landing-section-head p {
  max-width: 620px;
  margin: 0;
  color: var(--text-2);
  font-size: 14px;
}

.landing-features {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 56px;
  border: 0;
  border-radius: 0;
  background: none;
  overflow: visible;
}
.landing-feature {
  padding: 24px 0;
  border-top: 1px solid var(--border);
  border-radius: 0;
  background: transparent;
}
.landing-feature:nth-child(-n + 2) { padding-top: 0; border-top: 0; }
.landing-feature:hover { background: transparent; }
.landing-feature-num {
  display: block;
  margin-bottom: 10px;
  color: var(--accent-600);
  font-family: var(--font-mono);
  font-size: 11.5px;
}
.landing-feature h3 { margin: 0 0 6px; font-size: 16px; font-weight: 600; }
.landing-feature p { margin: 0; color: var(--text-2); font-size: 13.5px; line-height: 1.75; }

.landing-flow {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--border);
}
.landing-step {
  display: flex;
  gap: 16px;
  padding: 26px 28px 26px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}
.landing-step + .landing-step {
  padding-left: 28px;
  border-left: 1px solid var(--border);
}
.landing-step span.landing-step-num {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex: none;
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  color: var(--text-2);
  font-family: var(--font-mono);
  font-size: 12px;
}
.landing-step strong { display: block; margin-bottom: 4px; font-size: 15px; }
.landing-step div > span { color: var(--text-2); font-size: 13.5px; line-height: 1.7; }

.landing-platforms {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 40px;
}
.landing-platform {
  padding: 0;
  border: 0;
  border-top: 2px solid var(--text);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.landing-platform h3 {
  margin: 16px 0 14px;
  font-size: 16px;
  font-weight: 600;
}
.landing-platform h3 span {
  display: block;
  margin-top: 3px;
  color: var(--text-3);
  font-size: 12px;
  font-weight: 400;
}
.landing-platform ul { margin: 0; padding: 0; list-style: none; }
.landing-platform li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 7px 0;
  border-top: 1px solid var(--border);
  color: var(--text-2);
  font-size: 13.5px;
}
.landing-platform li:first-child { border-top: 0; }
.landing-platform li svg {
  width: 14px;
  height: 14px;
  flex: none;
  margin-top: 4px;
  color: var(--accent-600);
}

.landing-assurance {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin: 72px 0 0;
  padding: 22px 0;
  border: 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  background: transparent;
}
.landing-assurance-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 0 28px;
}
.landing-assurance-item:first-child { padding-left: 0; }
.landing-assurance-item + .landing-assurance-item { border-left: 1px solid var(--border); }
.landing-assurance-item span { color: var(--text-3); font-size: 12px; }
.landing-assurance-item strong { font-size: 14px; font-weight: 600; }

.landing-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
  margin: 56px 0;
  padding: 32px 0 32px 32px;
  border: 0;
  border-left: 3px solid var(--accent-600);
  border-radius: 0;
  background: transparent;
  color: var(--text);
  position: relative;
  overflow: visible;
  isolation: auto;
}
.landing-cta::before { content: none; display: none; }
.landing-cta h2 {
  margin: 0 0 6px;
  color: var(--text);
  font-family: var(--font-serif);
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.landing-cta p { margin: 0; color: var(--text-2); font-size: 14px; }
.landing-cta .hero-actions { margin-top: 0; }
.landing-cta .btn { background: var(--brand-600); border-color: var(--brand-600); color: #fff; }
.landing-cta .btn:hover { background: var(--brand-700); border-color: var(--brand-700); color: #fff; }
.landing-cta .btn-outline { background: transparent; color: var(--brand-700); border-color: var(--border-strong); }
.landing-cta .btn-outline:hover { background: var(--surface-high); color: var(--brand-800); border-color: var(--border-strong); }

/* —— 认证页 —— */
.auth-shell { max-width: 400px; margin: 40px auto 56px; }
.auth-shell::before { content: none; display: none; }
.auth-card {
  border-radius: 5px;
  border-top: 3px solid var(--brand-600);
  box-shadow: none;
}
.auth-card-header { padding: 28px 28px 0; text-align: left; }
.auth-card-header h1,
.auth-card-header h2 {
  margin: 0 0 6px;
  font-family: var(--font-serif);
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.auth-card-header p { color: var(--text-3); font-size: 13.5px; }
.auth-card-body { padding: 22px 28px 30px; }
.auth-entry-field { margin-bottom: 16px; }
.auth-submit { min-height: 44px; margin-top: 20px; border-radius: 4px; }
.auth-email-target { border-radius: 4px; background: var(--surface-high); }
.auth-login-options a { border-radius: 4px; box-shadow: none; }

@media (max-width: 1024px) {
  body.landing-page .guest-container { padding: 0 24px; }
  .landing-hero {
    grid-template-columns: 1fr;
    gap: 44px;
    padding: 56px 0 48px;
  }
  .landing-index { max-width: 640px; }
  .landing-features { grid-template-columns: 1fr; gap: 0; }
  .landing-feature:nth-child(2) { padding-top: 24px; border-top: 1px solid var(--border); }
  .landing-flow { grid-template-columns: 1fr; }
  .landing-step + .landing-step {
    padding-left: 0;
    border-left: 0;
    border-top: 1px solid var(--border);
  }
  .landing-platforms { grid-template-columns: 1fr; gap: 32px; }
  .landing-assurance { grid-template-columns: 1fr; gap: 0; }
  .landing-assurance-item { padding: 14px 0; }
  .landing-assurance-item:first-child { padding-top: 0; }
  .landing-assurance-item + .landing-assurance-item {
    border-left: 0;
    border-top: 1px solid var(--border);
  }
}

@media (max-width: 768px) {
  body.landing-page .guest-container { padding: 0 20px; }
  .landing-hero { padding-top: 44px; }
  .landing-hero-copy h1 { font-size: 32px; }
  .landing-section { padding-top: 56px; }
  .landing-section-head { gap: 12px; }
  .landing-cta { padding: 24px 0 24px 20px; }
}

@media (max-width: 560px) {
  .landing-hero-copy h1 { font-size: 29px; }
  .landing-hero-trust { gap: 6px 16px; }
  .landing-feature { padding: 20px 0; }
  .landing-feature:nth-child(2) { padding-top: 20px; }
  .landing-step { padding: 22px 0; }
  .landing-cta h2 { font-size: 23px; }
  .auth-shell { margin-top: 28px; }
  .auth-card-header { padding: 24px 20px 0; }
  .auth-card-body { padding: 20px 20px 26px; }
}
