/**
 * InkTrace 字纹业务样式表
 *
 * 设计规范说明（给新手）：
 * 1. 所有颜色、圆角、字体、阴影都来自前一个引入的 `/static/tokens.css`（CSS 变量 `var(--...)`），
 *    这里绝不写死 `#fff` 或 `rgb(...)` 裸色值，这样切换 `.dark` 暗色模式时整页颜色会自动跟着翻转。
 * 2. 使用 CSS `color-mix(in oklch, var(--xxx) 12%, transparent)` 可以直接从语义色生成柔和浅底徽章色，
 *    不需要额外手写浅色版本变量。
 */

/* 声明同时支持浅色和暗色，让浏览器原生控件（滚动条、下拉框、表单高亮色）自动跟随主题 */
:root {
  color-scheme: light dark;
  accent-color: var(--accent);
}

/*
 * 把 `<meta name="color-scheme">` 的值反射回 CSS 属性：
 * 因为 CSS 规则优先级高于 `<meta>` 提示，所以用 `:has()` 让 JS 修改 `<meta>` 时 CSS 同步生效。
 */
:root:has(> head > meta[name="color-scheme"][content="dark"]) {
  color-scheme: dark;
}

:root:has(> head > meta[name="color-scheme"][content="light"]) {
  color-scheme: light;
}

/* 统一盒模型：`border-box` 让元素设置的 width/height 包含 padding 和 border，布局更好算 */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background-color: var(--background);
  color: var(--foreground);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

code,
pre {
  font-family: var(--font-mono);
}

/* 键盘 Tab 导航时显示清晰焦点环，鼠标点击时不打扰视觉（:focus-visible） */
:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 2px;
}

/* 视觉隐藏但对屏幕阅读器可见的通用工具类（供 app.js 的无障碍播报区使用） */
.visually-hidden:where(:not(:focus-within, :active)) {
  position: absolute !important;
  clip-path: inset(50%) !important;
  overflow: hidden !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  border: 0 !important;
  white-space: nowrap !important;
}

/* ── 布局容器（对应 Lagent 规范的 shell-container，宽屏最大 80rem） ── */

.shell-container {
  width: 100%;
  max-width: 80rem;
  margin-inline: auto;
  padding-inline: 1.25rem;
}

@media (min-width: 768px) {
  .shell-container {
    padding-inline: 2rem;
  }
}

/* ── 顶部吸顶导航栏（毛玻璃半透明背景） ───────────────────── */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background-color: color-mix(in oklch, var(--background) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--foreground);
  font-weight: 600;
  letter-spacing: -0.015em;
}

.brand:hover {
  text-decoration: none;
}

/* 品牌方块图标：背景与前景严格使用成对 Token（--accent 与 --accent-foreground）保证对比度 */
.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: calc(var(--radius) * 0.8);
  background-color: var(--accent);
  color: var(--accent-foreground);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 700;
  box-shadow: var(--shadow-xs);
}

.brand-meta {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.brand-sub {
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--muted-foreground);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.pill-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background-color: var(--card);
  color: var(--foreground);
  font-size: 0.8125rem;
  font-weight: 500;
  box-shadow: var(--shadow-xs);
}

.pill-link:hover {
  background-color: var(--secondary);
  text-decoration: none;
}

/* 顶栏已登录用户名芯片：复用 pill-link 外观，超长姓名省略号截断 */
.viewer-chip {
  max-width: 12rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted-foreground);
}

/* ── 语言切换（中文 / EN 自称标签；激活态品牌蓝浅底，明暗双模式自动成立） ── */

.lang-switch {
  display: inline-flex;
  align-items: stretch;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background-color: var(--card);
  box-shadow: var(--shadow-xs);
  overflow: hidden;
}

.lang-link {
  padding: 0.4rem 0.65rem;
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.2;
  color: var(--muted-foreground);
}

.lang-link + .lang-link {
  border-left: 1px solid var(--border);
}

.lang-link:hover {
  color: var(--foreground);
  background-color: var(--secondary);
  text-decoration: none;
}

.lang-link.is-active {
  color: var(--accent);
  background-color: color-mix(in oklch, var(--accent) 12%, transparent);
  font-weight: 600;
}

/* ── 主题切换按钮（两态显隐由 CSS 控制，无 JS 也能正确显示） ── */

.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.42rem 0.75rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background-color: var(--card);
  color: var(--foreground);
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  box-shadow: var(--shadow-xs);
}

.theme-toggle:hover {
  background-color: var(--secondary);
}

/* 默认（浅色）：按钮上提示“暗色模式”（即点击后将切往的目标） */
.theme-toggle .theme-opt-light {
  display: none;
}

.theme-toggle .theme-opt-dark {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

/* 当页面处于暗色（显式固定 dark 或带上 html.dark）时，按钮切换为提示“浅色模式” */
:root:has(> head > meta[name="color-scheme"][content="dark"]) .theme-toggle .theme-opt-dark,
html.dark .theme-toggle .theme-opt-dark {
  display: none;
}

:root:has(> head > meta[name="color-scheme"][content="dark"]) .theme-toggle .theme-opt-light,
html.dark .theme-toggle .theme-opt-light {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

/* 操作系统本身为暗色、且用户没有显式锁定浅色时，同样显示“浅色模式” */
@media (prefers-color-scheme: dark) {
  :root:not(:has(> head > meta[name="color-scheme"][content="light"])) .theme-toggle .theme-opt-dark {
    display: none;
  }

  :root:not(:has(> head > meta[name="color-scheme"][content="light"])) .theme-toggle .theme-opt-light {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
  }
}

/* ── 页面主体与标题区 ─────────────────────────────────────── */

.main-content {
  padding-block: 2rem 3.5rem;
}

.page-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.page-title {
  margin: 0;
  font-size: 1.75rem;
  font-weight: 600;
  letter-spacing: -0.025em;
}

.page-description {
  margin: 0.35rem 0 0;
  color: var(--muted-foreground);
  font-size: 0.9375rem;
}

/* ── 统计磁贴网格（移动端 2 列，桌面端 4 列） ────────────────── */

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1.75rem;
}

@media (min-width: 768px) {
  .stats-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.stat-tile {
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background-color: var(--card);
  color: var(--card-foreground);
  box-shadow: var(--shadow-sm);
}

.stat-tile-label {
  font-size: 0.8125rem;
  color: var(--muted-foreground);
}

.stat-tile-value {
  margin-top: 0.35rem;
  font-size: 1.625rem;
  font-weight: 600;
  /* tabular-nums 让数字等宽对齐，数值变化时不会左右抖动 */
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

/* ── 卡片通用结构 ─────────────────────────────────────────── */

.card {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background-color: var(--card);
  color: var(--card-foreground);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
}

.card-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
}

.card-body {
  padding: 1.25rem;
}

/* ── 表单控件与交互后校验（:user-invalid / :user-valid） ────── */

.form-stack {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--foreground);
}

.field-hint {
  font-size: 0.8125rem;
  color: var(--muted-foreground);
}

.input,
.textarea,
.select {
  width: 100%;
  padding: 0.55rem 0.75rem;
  border-radius: calc(var(--radius) * 0.85);
  border: 1px solid var(--input);
  background-color: var(--background);
  color: var(--foreground);
  font-family: inherit;
  font-size: 0.9375rem;
  box-shadow: var(--shadow-xs);
}

.textarea {
  resize: vertical;
  min-height: 5.5rem;
}

.input:focus,
.textarea:focus,
.select:focus {
  outline: none;
  border-color: var(--ring);
  box-shadow: 0 0 0 3px color-mix(in oklch, var(--ring) 22%, transparent);
}

/* 行内错误提示默认隐藏，只有控件在用户交互后仍不合法时才通过相邻兄弟选择器 `+` 显示 */
.field-error-inline {
  display: none;
  font-size: 0.8125rem;
  color: var(--destructive);
}

/*
 * 为什么用 `:user-invalid` 而不是 `:invalid`？
 * `:invalid` 在页面刚加载、用户还没开始填必填项时就会变红，非常打扰；
 * `:user-invalid` 只会在用户填完失焦或尝试提交表单后才触发红框。
 * 外层包 `:is(..., .user-invalid-fallback)` 可保证在旧浏览器不识别 `:user-invalid` 时整条规则不失效。
 */
:is(.input, .textarea, .select):is(:user-invalid, .user-invalid-fallback) {
  border-color: var(--destructive);
  background-color: color-mix(in oklch, var(--destructive) 7%, var(--background));
}

:is(.input, .textarea, .select):is(:user-invalid, .user-invalid-fallback) + .field-error-inline {
  display: block;
}

:is(.input, .textarea, .select):is(:user-valid, .user-valid-fallback) {
  border-color: var(--success);
}

/* 服务端返回的表单总错误提示条 */
.alert-error {
  padding: 0.75rem 0.9rem;
  border-radius: calc(var(--radius) * 0.85);
  border: 1px solid color-mix(in oklch, var(--destructive) 35%, transparent);
  background-color: color-mix(in oklch, var(--destructive) 10%, transparent);
  color: var(--destructive);
  font-size: 0.875rem;
}

/* ── 按钮体系（主操作每页至多一个 btn-primary，其余用次级/危险幽灵按钮） ── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.55rem 1rem;
  border-radius: calc(var(--radius) * 0.85);
  border: 1px solid transparent;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: opacity 0.15s ease, background-color 0.15s ease;
}

.btn-primary {
  background-color: var(--primary);
  color: var(--primary-foreground);
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  opacity: 0.9;
}

.btn-secondary {
  background-color: var(--secondary);
  color: var(--secondary-foreground);
  border-color: var(--border);
}

.btn-secondary:hover {
  background-color: var(--muted);
}

.btn-ghost-danger {
  background-color: transparent;
  color: var(--destructive);
  border-color: color-mix(in oklch, var(--destructive) 30%, transparent);
}

.btn-ghost-danger:hover {
  background-color: color-mix(in oklch, var(--destructive) 10%, transparent);
}

.btn-sm {
  padding: 0.32rem 0.65rem;
  font-size: 0.8125rem;
}

/* ── 状态徽章 ─────────────────────────────────────────────── */

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 500;
}

.empty-state {
  padding: 2.5rem 1.25rem;
  text-align: center;
  color: var(--muted-foreground);
}

/* ══════════════════════════════════════════════════════════════
 * InkTrace 字纹 · 内容检测（首页 #detect 段落，对应 assets/views/site/home.html）
 * 全部沿用上面的语义 token；柔和浅底一律用 color-mix(in oklch, ...) 生成，
 * 因此明暗双模式自动成立，无需为暗色单独写色值。
 * ══════════════════════════════════════════════════════════════ */

/* ── 未配置 API Key 时的降级警告条（warning 语义色，配对前景保证对比度） ── */

.alert-warning {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.9rem 1rem;
  border-radius: calc(var(--radius) * 0.85);
  border: 1px solid color-mix(in oklch, var(--warning) 35%, transparent);
  background-color: color-mix(in oklch, var(--warning) 12%, transparent);
  color: var(--foreground);
  font-size: 0.9375rem;
}

.alert-warning-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 1.4rem;
  height: 1.4rem;
  border-radius: 999px;
  background-color: var(--warning);
  color: var(--warning-foreground);
  font-weight: 700;
  font-size: 0.85rem;
}

.alert-warning-text {
  margin: 0.3rem 0 0;
  color: var(--muted-foreground);
  font-size: 0.875rem;
}

.alert-warning-text code {
  color: var(--foreground);
  font-size: 0.8125rem;
}

/* ── 检测类型 Tab 导航（激活态用品牌蓝下划线，accent 只做强调） ── */

.detect-tabs {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
}

.detect-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.75rem 0.25rem;
  margin-bottom: -1px;
  border-bottom: 2px solid transparent;
  color: var(--muted-foreground);
  font-size: 0.9375rem;
  font-weight: 500;
  white-space: nowrap;
}

.detect-tab:hover {
  color: var(--foreground);
  border-bottom-color: var(--border);
  text-decoration: none;
}

.detect-tab.is-active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* ── 表单头部：标签 + 模型选择器并排 ── */

.detect-form-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.textarea.detect-textarea {
  min-height: 12rem;
  font-size: 0.9375rem;
}

.detect-form-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding-top: 0.5rem;
}

.detect-form-foot-end {
  justify-content: flex-end;
}

/* ── 文件上传控件（原生 input[type=file]，自绘选择按钮用 accent 浅底） ── */

.file-input {
  width: 100%;
  padding: 0.55rem 0.75rem;
  border-radius: calc(var(--radius) * 0.85);
  border: 1px solid var(--input);
  background-color: var(--background);
  color: var(--foreground);
  font-family: inherit;
  font-size: 0.875rem;
  box-shadow: var(--shadow-xs);
  cursor: pointer;
}

.file-input::file-selector-button {
  margin-right: 0.75rem;
  padding: 0.4rem 0.8rem;
  border: 0;
  border-radius: calc(var(--radius) * 0.7);
  background-color: color-mix(in oklch, var(--accent) 12%, transparent);
  color: var(--accent);
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
}

.file-input::file-selector-button:hover {
  background-color: color-mix(in oklch, var(--accent) 20%, transparent);
}

/* ── 结果区：标题 + 若干磁贴/卡片纵向堆叠 ── */

.result-section {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1.75rem;
}

.section-heading {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -0.015em;
}

.card-title-sm {
  margin: 0 0 0.75rem;
  font-size: 0.9375rem;
  font-weight: 600;
}

/* 结果区内的统计网格去掉自带下边距，改由 result-section 的 gap 统一控制 */
.result-section .stats-grid {
  margin-bottom: 0;
}

/* 三列 / 两列磁贴变体：移动端单列，桌面端展开（复合选择器确保覆盖 .stats-grid 默认列数） */
.stats-grid.stats-grid-3,
.stats-grid.stats-grid-2 {
  grid-template-columns: minmax(0, 1fr);
}

@media (min-width: 768px) {
  .stats-grid.stats-grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .stats-grid.stats-grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.stat-tile-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem;
  margin-top: 0.35rem;
}

.stat-tile-row .stat-tile-value {
  margin-top: 0;
}

.stat-tile-value-sm {
  font-size: 1.125rem;
}

.stat-tile-sub {
  margin-top: 0.35rem;
  font-size: 0.78rem;
  color: var(--muted-foreground);
}

.stat-tile-ellipsis {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ── 状态徽章（浅底写法 bg-{c}/N text-{c}，与既有 badge-task/idea 同源） ── */

.badge-success {
  background-color: color-mix(in oklch, var(--success) 12%, transparent);
  color: var(--success);
}

.badge-warning {
  background-color: color-mix(in oklch, var(--warning) 18%, transparent);
  color: var(--warning);
}

.badge-danger {
  background-color: color-mix(in oklch, var(--destructive) 12%, transparent);
  color: var(--destructive);
}

.badge-info {
  background-color: color-mix(in oklch, var(--info) 12%, transparent);
  color: var(--info);
}

/* ── 内容构成堆叠条：人类撰写(success) / AI 辅助(warning) / AI 生成(destructive) ── */

.fraction-bar {
  display: flex;
  height: 0.6rem;
  margin-top: 0.5rem;
  border-radius: 999px;
  overflow: hidden;
  background-color: var(--muted);
}

.fraction-seg {
  display: block;
  height: 100%;
}

.fraction-human {
  background-color: var(--success);
}

.fraction-assisted {
  background-color: var(--warning);
}

.fraction-ai {
  background-color: var(--destructive);
}

.fraction-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  margin-top: 0.65rem;
  font-size: 0.8125rem;
  color: var(--muted-foreground);
}

.fraction-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.fraction-dot {
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 999px;
}

.result-prediction {
  margin: 0.75rem 0 0;
  font-size: 0.8125rem;
  color: var(--muted-foreground);
}

/* ── 段落窗口 / 抄袭命中来源明细列表 ── */

.window-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.window-item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 0.75rem;
  padding: 0.75rem 0.9rem;
  border-radius: calc(var(--radius) * 0.85);
  border: 1px solid var(--border);
  background-color: color-mix(in oklch, var(--background) 50%, transparent);
}

.window-main {
  flex: 1 1 16rem;
  min-width: 0;
}

.window-meta {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--muted-foreground);
}

.window-text {
  margin: 0.3rem 0 0;
  font-size: 0.875rem;
  color: var(--foreground);
  /* 最多两行，超出省略，避免长段落撑爆列表 */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.window-score {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  flex-shrink: 0;
}

.window-score-label {
  font-size: 0.75rem;
  color: var(--muted-foreground);
}

/* 命中来源是链接：覆盖 window-meta 的弱化色为品牌蓝，并单行省略长 URL */
.window-source {
  display: inline-block;
  max-width: 100%;
  color: var(--accent);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: bottom;
}

/* ── 页脚 ── */

.site-footer {
  border-top: 1px solid var(--border);
  padding-block: 1.25rem;
}

.site-footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.8125rem;
  color: var(--muted-foreground);
}

/* ── 提交中（busy）按钮态：由 app.js 模块三在检测请求期间置 disabled ── */

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ══════════════════════════════════════════════════════════════
 * InkTrace 字纹 · 首页官网段落（与检测区同页，对应 assets/views/site/home.html）
 * 同样只消费语义 token；浅底一律 color-mix(in oklch, ...)，明暗双模式自动成立。
 * ══════════════════════════════════════════════════════════════ */

/* ── 顶栏站内导航（窄屏隐藏，避免与登录态拥挤） ── */

.site-nav {
  display: none;
  align-items: center;
  gap: 1.25rem;
}

@media (min-width: 768px) {
  .site-nav {
    display: flex;
  }
}

.site-nav-link {
  color: var(--muted-foreground);
  font-size: 0.875rem;
  font-weight: 500;
}

.site-nav-link:hover {
  color: var(--foreground);
  text-decoration: none;
}

/* ── 落地页主体：纵向大区块节奏 ── */

.landing-main {
  display: flex;
  flex-direction: column;
  gap: 3.5rem;
  padding-block: 2.5rem 4rem;
}

.landing-section {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  /* 锚点跳转时为吸顶导航留出空间 */
  scroll-margin-top: 5rem;
}

/* 与上一段落视觉上连成一块（hero → 检测区）：吃掉一半段落间距，
   否则中间的 3.5rem 会让人以为这是两个互不相干的区块 */
.landing-section-attached {
  margin-top: -1.75rem;
}

/* ── Hero：左文案右产品示意，窄屏单列 ── */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2rem;
  align-items: center;
}

@media (min-width: 960px) {
  .hero {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  }
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  border: 1px solid color-mix(in oklch, var(--accent) 35%, transparent);
  background-color: color-mix(in oklch, var(--accent) 12%, transparent);
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.hero-title {
  margin: 0.9rem 0 0;
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.hero-lead {
  margin: 1rem 0 0;
  max-width: 34rem;
  color: var(--muted-foreground);
  font-size: 1.0625rem;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.hero-visual {
  box-shadow: var(--shadow-md);
}

/* ── 结果里有什么（四张卡）：手机单列 → 平板 2×2 → 宽屏 4 列 ── */

.feature-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
}

@media (min-width: 768px) {
  .feature-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1180px) {
  .feature-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.feature-card .card-body {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  height: 100%;
}

.feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.6rem;
  height: 2.6rem;
  border-radius: calc(var(--radius) * 0.8);
  border: 1px solid color-mix(in oklch, var(--accent) 25%, transparent);
  background-color: color-mix(in oklch, var(--accent) 12%, transparent);
  font-size: 1.35rem;
  line-height: 1;
}

.feature-title {
  margin: 0;
  font-size: 1.0625rem;
  font-weight: 600;
}

.feature-desc {
  margin: 0;
  flex: 1;
  color: var(--muted-foreground);
  font-size: 0.875rem;
}

/* hero 示例卡下方的"非真实结果"说明 */

.hero-visual-note {
  margin: 0.9rem 0 0;
  color: var(--muted-foreground);
  font-size: 0.75rem;
  font-style: italic;
}

/* ── 使用流程三步 ── */

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
}

@media (min-width: 768px) {
  .steps {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.step {
  display: flex;
  gap: 0.9rem;
  padding: 1.1rem 1.25rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background-color: var(--card);
  color: var(--card-foreground);
  box-shadow: var(--shadow-sm);
}

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  background-color: var(--primary);
  color: var(--primary-foreground);
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 700;
}

.step-title {
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 600;
}

.step-desc {
  margin: 0.3rem 0 0;
  color: var(--muted-foreground);
  font-size: 0.8125rem;
}

/* ── 隐私清单（原统一账号清单，结构与配色不变） ── */

.trust-list {
  margin: 0.9rem 0 0;
  padding-left: 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  color: var(--muted-foreground);
  font-size: 0.875rem;
}

.trust-list li::marker {
  color: var(--accent);
}

/* ── 收尾 CTA 横幅（accent 极浅底 + 边框，主按钮仍为 primary） ── */

.cta-band {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  padding: 2.5rem 1.5rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background-color: color-mix(in oklch, var(--accent) 6%, transparent);
  text-align: center;
}

.cta-title {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.cta-desc {
  margin: 0;
  color: var(--muted-foreground);
  font-size: 0.9375rem;
}

/* ── 页脚：左侧公司说明 + 免责小字，右侧链接组 ── */

.footer-meta {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}

.footer-note {
  font-size: 0.75rem;
  opacity: 0.75;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.8125rem;
}

.footer-links a {
  color: var(--muted-foreground);
}

.footer-links a:hover {
  color: var(--foreground);
}
