/* ══════════════════════════════════════════════════════════════════
   AptaPilot 门户样式 —— 对齐 zxiaohan.com/AptaPilot 品牌设计系统。
   navy + orange + cream，service-first。改 --navy / --orange 即可整体换色。
   同一套 class 名沿用旧门户（.wrap/.section/.card/.panel/.btn/.cta…），
   仅重新皮肤化以与主站统一。浅色单主题（主站无深色模式）。
   ══════════════════════════════════════════════════════════════════ */
:root {
  --navy: #0a2342;
  --navy-2: #12365f;
  --cream: #f4efe6;
  --orange: #ee6c2b;
  /* 与官网 apta.css 对齐：--orange 是亮橙(实心按钮/强调点)，--orange-deep 只用于 hover
     与文字强调。此前门户把 deep 调得更暗(#b4450f)并让按钮直接用 deep，导致整体比官网暗一号。 */
  --orange-deep: #cf551a;
  --orange-tint: rgba(238, 108, 43, 0.09);
  --orange-line: rgba(238, 108, 43, 0.4);

  --bg: #f6f4f0;
  --panel: #fff;
  --line: rgba(12, 28, 48, 0.11);
  --line-2: rgba(12, 28, 48, 0.055);
  --line-3: rgba(12, 28, 48, 0.2);

  --fg: #0c1c30;
  --fg-2: #33414f;
  --fg-muted: #63707d;
  --sub: #98a2ab;

  /* 兼容旧变量名（部分内联样式/脚本可能引用） */
  --text: var(--fg);
  --text-muted: var(--fg-muted);
  --border: var(--line);
  --accent: var(--orange-deep);

  --f-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI",
    "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --f-body: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI",
    "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --f-mono: ui-monospace, "SF Mono", "Cascadia Code", "Segoe UI Mono", Menlo,
    Consolas, monospace;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --r-card: 16px;
  --r-pill: 999px;
  --r-chip: 9px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--f-body);
  background: var(--bg);
  color: var(--fg);
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: -0.011em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }
sub { font-size: 0.72em; }
a { color: inherit; text-decoration: none; }

/* ── 布局 ──────────────────────────────────────────────── */
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 32px; }

.section {
  padding-block: clamp(52px, 7vw, 92px);
  border-top: 1px solid var(--line-2);
}
.section:first-of-type { border-top: 0; }
.section[id] { scroll-margin-top: 72px; }

/* 编号分区标签，如 "/ 001 — 你拥有什么" */
.eyebrow {
  font-family: var(--f-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--orange-deep);
  margin: 0 0 18px;
}

/* ── 排版 ──────────────────────────────────────────────── */
h1, h2, h3 { font-family: var(--f-display); color: var(--navy); font-weight: 600; }
h1 {
  font-size: clamp(38px, 6vw, 66px);
  line-height: 0.98;
  letter-spacing: -0.045em;
}
h2 {
  font-size: clamp(26px, 3.4vw, 40px);
  line-height: 1.08;
  letter-spacing: -0.035em;
}
h3 { font-size: 20px; line-height: 1.2; letter-spacing: -0.025em; }

p { margin: 0 0 14px; color: var(--fg-2); }
.muted { color: var(--fg-muted); }
.zh { color: var(--fg-muted); font-size: 0.95em; }
.lead { font-size: clamp(15px, 1.1vw, 18px); line-height: 1.6; color: var(--fg-2); }

a:hover { color: var(--orange-deep); }
em { font-style: normal; color: var(--orange-deep); }

/* ── 顶栏 ──────────────────────────────────────────────── */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  /* 窄屏允许换行成两行，否则右侧按钮的中英标签会折行、把顶栏撑高。 */
  flex-wrap: wrap;
  padding: 14px max(32px, calc((100% - 1120px) / 2 + 32px));
  max-width: none;
  background: rgba(246, 244, 240, 0.82);
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  border-bottom: 1px solid var(--line-2);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--f-display);
  font-weight: 600;
  font-size: 16px;
  letter-spacing: -0.02em;
  color: var(--navy);
}
.brand:hover { color: var(--navy); }
.brand .d { width: 17px; height: 17px; flex: none; }
.topnav {
  display: flex;
  gap: 24px;
  align-items: center;
  min-width: 0;
  font-size: 13px;
  color: var(--fg-muted);
}
.topnav a { color: var(--fg-muted); }
.topnav a:hover { color: var(--navy); }
.topnav .muted {
  max-width: min(36vw, 320px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--f-mono);
  font-size: 12px;
}

/* ── 首页 navy hero ────────────────────────────────────── */
.hero {
  position: relative;
  overflow: hidden;
  background: var(--navy);
  color: var(--cream);
  padding: clamp(64px, 9vw, 104px) 0 clamp(56px, 8vw, 92px);
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(120% 90% at 18% 0%, #000, transparent 80%);
  -webkit-mask-image: radial-gradient(120% 90% at 18% 0%, #000, transparent 80%);
}
.hero .wrap { position: relative; }
.hero .eyebrow { color: var(--orange); }
.hero h1 { color: var(--cream); margin-top: 14px; max-width: 15ch; }
.hero .zh { color: rgba(244, 239, 230, 0.66); }
.hero .lead, .hero p { color: rgba(244, 239, 230, 0.74); }
.hero .lead.muted { color: rgba(244, 239, 230, 0.74); }
.hero .cta { color: var(--cream); border-bottom-color: rgba(244, 239, 230, 0.5); }
.hero .cta:hover { color: var(--orange); border-bottom-color: var(--orange); }

/* ── CTA 行 / 按钮 ─────────────────────────────────────── */
.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 26px;
  align-items: center;
  margin-top: 30px;
}

/* 主按钮：橙色实心 pill（对齐主站 .pill.solid） */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--f-body);
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: -0.005em;
  cursor: pointer;
  padding: 13px 22px;
  border-radius: var(--r-pill);
  white-space: nowrap;
  background: var(--orange);
  color: #fff;
  border: 1px solid var(--orange);
  text-decoration: none;
  transition: background 0.25s var(--ease), border-color 0.25s var(--ease);
}
.btn:hover { background: var(--orange-deep); border-color: var(--orange-deep); color: #fff; }
.btn.secondary {
  background: transparent;
  color: var(--navy);
  border-color: var(--line-3);
}
.btn.secondary:hover { background: transparent; color: var(--navy); border-color: var(--navy); }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }

/* "→" 文字 CTA */
.cta {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: var(--navy);
  font-size: 14px;
  font-weight: 600;
  border-bottom: 1px solid var(--navy);
  padding-bottom: 2px;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.cta:hover { color: var(--orange-deep); border-color: var(--orange-deep); }
.cta .arrow { margin-left: 7px; }

/* ── 卡片 / 网格 ───────────────────────────────────────── */
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
@media (max-width: 620px) { .grid { grid-template-columns: 1fr; } }

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  padding: 28px 26px;
  transition: transform 0.4s var(--ease), border-color 0.4s var(--ease);
}
.card:hover { transform: translateY(-4px); border-color: var(--orange-line); }
.card .num {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.24em;
  color: var(--orange-deep);
}
.card h3 { margin: 14px 0 8px; color: var(--navy); }
.card p { font-size: 13.5px; line-height: 1.6; margin: 0 0 6px; color: var(--fg-muted); }
.card .zh { color: var(--fg-muted); }

/* ── 权益 / 授权行 ─────────────────────────────────────── */
.ent {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 15px 0;
  border-top: 1px solid var(--line-2);
}
.ent:first-child { border-top: 0; }
.ent .name { font-weight: 600; color: var(--navy); font-family: var(--f-display); }
.ent .feat { color: var(--fg-muted); font-size: 13px; }
.badge {
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  padding: 3px 11px;
  color: var(--fg-muted);
  white-space: nowrap;
}
.badge.plan { border-color: var(--orange-line); color: var(--orange-deep); }

/* ── 表单面板 ──────────────────────────────────────────── */
.panel {
  max-width: 420px;
  margin: clamp(40px, 7vw, 72px) auto;
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  background: var(--panel);
  padding: 32px;
  box-shadow: 0 24px 60px -40px rgba(12, 28, 48, 0.4);
}
.tabs { display: flex; gap: 6px; margin-bottom: 24px; border-bottom: 1px solid var(--line); }
.tab {
  background: none;
  border: 0;
  border-bottom: 2px solid transparent;
  font-family: var(--f-body);
  font-size: 14.5px;
  font-weight: 500;
  color: var(--fg-muted);
  padding: 9px 4px;
  margin-bottom: -1px;
  cursor: pointer;
}
.tab.active { color: var(--navy); border-bottom-color: var(--orange); }

.field { margin-bottom: 15px; }
.field label { display: block; font-size: 13px; color: var(--fg-muted); margin-bottom: 6px; }
.field input {
  width: 100%;
  font-family: var(--f-body);
  font-size: 15px;
  padding: 11px 13px;
  border-radius: var(--r-chip);
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--fg);
}
.field input:focus {
  outline: 2px solid var(--orange-deep);
  outline-offset: 2px;
  border-color: var(--orange-deep);
  box-shadow: 0 0 0 3px var(--orange-tint);
}

.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--fg-muted);
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  margin: 20px 0;
}
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.oauth-btn {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--f-body);
  font-size: 14.5px;
  font-weight: 500;
  cursor: pointer;
  padding: 12px 16px;
  border-radius: var(--r-pill);
  background: var(--panel);
  color: var(--navy);
  border: 1px solid var(--line);
  text-decoration: none;
  transition: border-color 0.2s var(--ease);
}
.oauth-btn:hover { border-color: var(--navy); color: var(--navy); }

.msg { font-size: 13px; margin: 14px 0 0; min-height: 18px; line-height: 1.5; }
.msg.err { color: #c0392b; }
.msg.ok { color: var(--fg-muted); }

.link-btn {
  background: none;
  border: 0;
  font-family: var(--f-body);
  font-size: 13px;
  color: var(--fg-muted);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  padding: 0;
}
.link-btn:hover { color: var(--orange-deep); }

/* ── 配置缺失横幅 ──────────────────────────────────────── */
.config-warn {
  background: var(--orange-tint);
  border: 1px solid var(--orange-line);
  color: var(--orange-deep);
  border-radius: var(--r-chip);
  padding: 13px 16px;
  font-size: 13px;
  line-height: 1.55;
  margin: 20px 0;
}
.config-warn code {
  font-family: var(--f-mono);
  font-size: 0.9em;
  background: rgba(238, 108, 43, 0.12);
  padding: 1px 5px;
  border-radius: 4px;
}

/* ── 页脚 ──────────────────────────────────────────────── */
.footer {
  border-top: 1px solid var(--line-2);
  padding-block: 28px 48px;
  color: var(--fg-muted);
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.02em;
  display: flex;
  flex-wrap: wrap;
  gap: 14px 28px;
  align-items: center;
  justify-content: space-between;
}
.footer a { color: var(--fg-muted); text-decoration: none; }
.footer a:hover { color: var(--navy); }
.footer nav { display: flex; gap: 22px; flex-wrap: wrap; }

/* ── 工具 ──────────────────────────────────────────────── */
.hidden { display: none !important; }
.stack > * + * { margin-top: 10px; }
.center { text-align: center; }
.mono { font-family: var(--f-mono); }

/* 占位条纹：设计稿里所有 [ imagery placeholder ] 都用这个填充。 */
.ph {
  background-image: repeating-linear-gradient(
    135deg,
    rgba(12, 28, 48, 0.05) 0 10px,
    transparent 10px 20px
  );
  background-color: var(--cream);
}

/* 状态胶囊 —— 运行中 / 试用 / 过期 */
.status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: var(--r-pill);
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
}
.status::before { content: "●"; font-size: 9px; }
.status.ok { background: #eef7ee; border: 1px solid rgba(60, 140, 80, 0.3); color: #2e7d43; }
.status.warn { background: var(--orange-tint); border: 1px solid rgba(238, 108, 43, 0.3); color: var(--orange-deep); }
.status.off { background: #f2f0ec; color: var(--sub); }

/* ── 筛选 chip ─────────────────────────────────────────── */
.filters { display: flex; gap: 10px; margin-top: 28px; flex-wrap: wrap; align-items: center; }
.filters .spacer { flex: 1; }
.chip {
  font-family: var(--f-body);
  font-size: 13px;
  color: var(--fg-2);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  padding: 9px 18px;
  cursor: pointer;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
}
.chip:hover { border-color: var(--navy); }
.chip[aria-pressed="true"] {
  background: var(--navy);
  border-color: var(--navy);
  color: var(--cream);
  font-weight: 600;
}

/* ── 工具卡网格（目录页 / 相关工具） ───────────────────── */
.tool-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }

.tool-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.4s var(--ease), border-color 0.4s var(--ease);
}
.tool-card:hover { transform: translateY(-4px); border-color: var(--orange-line); }
.tool-card .thumb {
  height: 150px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 16px;
  position: relative; /* 让 logo 绝对居中，而编号/标签仍按 flex 停在两角 */
  background: var(--cream);
}
/* 官网正式 logo（catalog.logoUrl）。居中而非铺满：几个 logo 的画布留白差别很大，
   contain + 固定尺寸才能让四张卡看起来一样重。 */
.tool-card .thumb .logo {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 76px;
  height: 76px;
  object-fit: contain;
  border-radius: 16px;
}
.tool-card .thumb .num {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  color: var(--orange-deep);
}
.tool-card .body { padding: 22px; flex: 1; display: flex; flex-direction: column; }
.tool-card h3 { color: var(--navy); }
.tool-card p { margin-top: 8px; font-size: 13.5px; line-height: 1.6; color: var(--fg-muted); flex: 1; }
.tool-card .actions { display: flex; gap: 10px; margin-top: 18px; }
.tool-card .actions .btn { flex: 1; justify-content: center; padding: 10px 12px; font-size: 13px; }
.tool-card .actions .btn.secondary { flex: none; }

/* 面徽章 */
.tag {
  font-family: var(--f-mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  padding: 4px 11px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  color: var(--fg-2);
  white-space: nowrap;
}
.tag.exp { background: var(--orange-tint); border-color: var(--orange-line); color: var(--orange-deep); }

/* "写一份 manifest 即自动上架" 空位 */
.tile-empty {
  border: 1px dashed rgba(12, 28, 48, 0.18);
  border-radius: 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 22px;
  gap: 8px;
  min-height: 280px;
}
.tile-empty .plus {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--cream);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--orange-deep);
  font-size: 22px;
}
.tile-empty h3 { font-size: 16px; }
.tile-empty p { font-size: 12.5px; color: var(--fg-muted); max-width: 24ch; margin: 0; }

/* navy 号召卡 */
.callout-navy {
  background: var(--navy);
  border-radius: 18px;
  padding: 26px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: var(--cream);
  min-height: 280px;
}
.callout-navy .eyebrow { color: var(--orange); margin-bottom: 12px; }
.callout-navy h3 { color: var(--cream); font-size: 22px; letter-spacing: -0.03em; }
.callout-navy p { margin-top: 10px; font-size: 13.5px; line-height: 1.6; color: rgba(244, 239, 230, 0.7); }
.callout-navy .btn { margin-top: 18px; align-self: flex-start; }

/* ── 流水线条（落地页 / 目录页） ───────────────────────── */
.pipeline { display: flex; align-items: stretch; gap: 0; flex-wrap: wrap; }
.pipeline .node {
  flex: 1;
  min-width: 170px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  padding: 24px;
}
.pipeline .node .num {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--orange-deep);
}
.pipeline .node h3 { margin-top: 10px; font-size: 17px; }
.pipeline .node p { margin: 6px 0 0; font-size: 12.5px; color: var(--fg-muted); }
.pipeline .arrow {
  display: flex;
  align-items: center;
  padding: 0 6px;
  color: var(--orange);
  font-size: 20px;
}

/* ── 工具详情页 ────────────────────────────────────────── */
.crumb { font-family: var(--f-mono); font-size: 12px; color: var(--fg-muted); padding: 22px 0 0; }
.crumb a { color: var(--orange-deep); }

.tool-head {
  display: flex;
  gap: 32px;
  align-items: flex-start;
  padding: 32px 0 40px;
  border-bottom: 1px solid var(--line-2);
}
.tool-head .icon {
  width: 104px;
  height: 104px;
  flex: none;
  border-radius: 22px;
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--f-mono);
  font-size: 10px;
  color: var(--sub);
  text-align: center;
}
/* 官网正式 logo 作详情页图标：contain + 内边距，几个 logo 的画布留白差别很大，
   不这样处理会被拉伸、且四个工具看起来大小不一。 */
.tool-head img.icon {
  object-fit: contain;
  padding: 12px;
  background: var(--cream);
}
.tool-head h1 { margin-top: 16px; font-size: clamp(32px, 4.4vw, 48px); }
.tool-head .zh-name { font-size: 19px; margin-top: 6px; color: var(--fg-muted); }

.dl-row { display: flex; gap: 14px; align-items: center; margin-top: 26px; flex-wrap: wrap; }
.dl-btn {
  display: inline-flex;
  flex-direction: column;
  padding: 11px 22px;
  border-radius: 14px;
  border: 1px solid var(--line-3);
  background: var(--panel);
  color: var(--navy);
  transition: border-color 0.2s var(--ease);
}
.dl-btn:hover { border-color: var(--navy); color: var(--navy); }
.dl-btn .label { font-weight: 600; font-size: 14px; }
.dl-btn .meta { font-family: var(--f-mono); font-size: 10.5px; color: var(--fg-muted); }
.dl-btn.primary { background: var(--orange); border-color: var(--orange); color: #fff; }
.dl-btn.primary:hover { background: var(--orange-deep); border-color: var(--orange-deep); color: #fff; }
.dl-btn.primary .meta { color: rgba(255, 255, 255, 0.85); }

.section-nav {
  position: sticky;
  /* 顶栏高度随内容/断点变化，由 JS 量出后写入 --topbar-h；未设时退回 56px。 */
  top: var(--topbar-h, 56px);
  z-index: 10;
  display: flex;
  gap: 26px;
  flex-wrap: wrap;
  padding: 14px 0;
  border-bottom: 1px solid var(--line-2);
  background: rgba(246, 244, 240, 0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  font-family: var(--f-mono);
  font-size: 12px;
}
.section-nav a { color: var(--fg-muted); }
.section-nav a:hover, .section-nav a.active { color: var(--orange-deep); font-weight: 600; }

.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 32px; }
.feature-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  padding: 22px;
}
.feature-card .num { font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.2em; color: var(--orange-deep); }
.feature-card h4 { margin-top: 12px; font-size: 16px; font-weight: 600; color: var(--navy); font-family: var(--f-display); }
.feature-card .zh { font-size: 12.5px; margin-top: 2px; }
.feature-card p { margin: 10px 0 0; font-size: 13px; line-height: 1.6; color: var(--fg-muted); }

/* 使用步骤：图文左右交替 */
.steps { display: flex; flex-direction: column; gap: 20px; margin-top: 32px; }
.step-row {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 24px;
  align-items: center;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
}
.step-row:nth-child(even) { grid-template-columns: 1fr 1.1fr; }
.step-row:nth-child(even) .step-text { order: 2; }
.step-row:nth-child(even) .step-shot { order: 1; }
.step-text { padding: 26px 28px; }
.step-text .num { font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.2em; color: var(--orange-deep); }
.step-text h4 { margin-top: 10px; font-size: 19px; font-weight: 600; color: var(--navy); font-family: var(--f-display); }
.step-text .zh { font-size: 12.5px; }
.step-text p { margin: 10px 0 0; font-size: 13.5px; line-height: 1.6; color: var(--fg-muted); }
.step-shot {
  min-height: 200px;
  height: 100%;
  display: flex;
  align-items: flex-end;
  padding: 12px;
  font-family: var(--f-mono);
  font-size: 11px;
  color: var(--sub);
}

.mode-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 26px; }
.mode-card { background: var(--cream); border-radius: 14px; padding: 18px; }
.mode-card h5 { font-size: 14px; font-weight: 600; color: var(--navy); font-family: var(--f-display); }
.mode-card p { margin: 6px 0 0; font-size: 12.5px; color: var(--fg-muted); }

.note-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 26px; }
.note { display: flex; gap: 14px; padding: 18px; border: 1px solid rgba(12, 28, 48, 0.09); border-radius: 14px; }
.note .n { font-family: var(--f-mono); color: var(--orange-deep); font-size: 13px; }
.note h5 { font-size: 14px; font-weight: 600; color: var(--navy); font-family: var(--f-display); }
.note p { margin: 5px 0 0; font-size: 12.5px; color: var(--fg-muted); line-height: 1.6; }

.people-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-top: 28px; }
.person { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-card); padding: 20px; }
.person .avatar { width: 56px; height: 56px; border-radius: var(--r-pill); margin-bottom: 12px; }
.person h5 { font-size: 14px; font-weight: 600; color: var(--navy); font-family: var(--f-display); }
.person .zh { font-size: 12px; margin-top: 2px; }

/* ── 控制台（侧栏外壳） ─────────────────────────────────── */
.console { display: flex; min-height: 100vh; }

.side {
  width: 236px;
  flex: none;
  background: var(--navy);
  color: var(--cream);
  display: flex;
  flex-direction: column;
  padding: 22px 16px;
}
.side .brand { color: var(--cream); padding: 0 8px 22px; }
.side .brand:hover { color: var(--cream); }
.side-nav { display: flex; flex-direction: column; gap: 2px; }
.side-nav a {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 13.5px;
  color: rgba(244, 239, 230, 0.66);
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}
.side-nav a::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 2px;
  background: rgba(244, 239, 230, 0.3);
  flex: none;
}
.side-nav a:hover { color: var(--cream); background: rgba(244, 239, 230, 0.06); }
.side-nav a.active { background: rgba(238, 108, 43, 0.16); color: var(--cream); font-weight: 600; }
.side-nav a.active::before { background: var(--orange); }
.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 2px; }
.side-user {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  padding: 10px 8px;
  border-top: 1px solid rgba(244, 239, 230, 0.12);
}
.side-user .av {
  width: 30px;
  height: 30px;
  border-radius: var(--r-pill);
  background: var(--orange);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 12px;
  flex: none;
}
.side-user .who { line-height: 1.2; min-width: 0; }
.side-user .nm {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--cream);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.side-user .pl { font-size: 11px; color: rgba(244, 239, 230, 0.5); }

.console-main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.console-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 18px 36px;
  border-bottom: 1px solid var(--line-2);
}
.console-top .eyebrow { margin: 0; }
.console-top h2 { font-size: 20px; letter-spacing: -0.03em; margin-top: 2px; }
.console-body { padding: 32px 36px; display: flex; flex-direction: column; gap: 28px; }

.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-card); padding: 20px; }
.stat .k {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--fg-muted);
}
.stat .v {
  font-family: var(--f-display);
  font-size: 32px;
  font-weight: 600;
  color: var(--navy);
  margin-top: 8px;
  letter-spacing: -0.03em;
}
.stat .v sub { font-size: 16px; color: var(--fg-muted); vertical-align: baseline; }

/* 流水线看板 */
.board { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
.board-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 20px 24px;
  border-bottom: 1px solid var(--line-2);
}
.board-head h3 { font-size: 16px; }
.board-head .sub { font-size: 12.5px; color: var(--fg-muted); margin-top: 2px; }
.board-steps { padding: 26px 24px; display: flex; align-items: stretch; gap: 0; flex-wrap: wrap; }
.board-steps .arrow { display: flex; align-items: center; padding: 0 8px; color: #c9c2b4; font-size: 18px; }
.board-steps .arrow.on { color: var(--orange); }

.step {
  flex: 1;
  min-width: 160px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
}
.step .top { display: flex; justify-content: space-between; align-items: center; }
.step .num { font-family: var(--f-mono); font-size: 10.5px; letter-spacing: 0.18em; color: var(--orange-deep); }
.step .dot {
  width: 18px;
  height: 18px;
  border-radius: var(--r-pill);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: #fff;
}
.step h4 { margin-top: 12px; font-size: 14.5px; font-weight: 600; color: var(--navy); font-family: var(--f-display); }
.step p { margin: 5px 0 0; font-size: 12px; color: var(--fg-muted); }
.step .state { margin-top: 10px; font-size: 11px; }

.step.done .dot { background: #2e7d43; }
.step.done .state { color: #2e7d43; }
/* ready：已授权、可运行但尚未跑过 */
.step.ready .dot { background: var(--orange); }
.step.ready .state { color: var(--orange-deep); }
.step.run {
  background: var(--panel);
  border: 1.5px solid var(--orange);
  box-shadow: 0 0 0 3px rgba(238, 108, 43, 0.1);
}
.step.run .dot { background: var(--orange); font-size: 10px; }
.step.run .state { color: var(--orange-deep); }
.step.todo { border-style: dashed; opacity: 0.75; }
.step.todo .num, .step.todo p, .step.todo .state { color: var(--sub); }
.step.todo h4 { color: var(--fg-muted); }
.step.todo .dot { border: 1.5px solid #c9c2b4; }

.bar { margin-top: 10px; height: 5px; background: var(--cream); border-radius: var(--r-pill); overflow: hidden; }
.bar > span { display: block; height: 100%; background: var(--orange); }

/* 下半区：最近项目 + 授权面板 */
.console-lower { display: grid; grid-template-columns: 1.5fr 1fr; gap: 20px; }
.card-plain { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 22px 24px; }
.card-plain .head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 16px;
}
.card-plain .head h3 { font-size: 16px; }

.list-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 0;
  border-top: 1px solid var(--line-2);
}
.list-row .left { display: flex; gap: 12px; align-items: center; min-width: 0; }
.list-row .thumb { width: 38px; height: 38px; border-radius: 9px; flex: none; }
.list-row .nm { font-size: 14px; font-weight: 600; color: var(--navy); font-family: var(--f-display); }
.list-row .meta { font-size: 12px; color: var(--fg-muted); }
.list-row .when { font-size: 11.5px; color: var(--fg-muted); white-space: nowrap; }

.panel-navy { background: var(--navy); border-radius: 18px; padding: 22px 24px; color: var(--cream); }
.panel-navy h3 { color: var(--cream); font-size: 16px; }
.panel-navy .sub { margin-top: 4px; font-size: 12.5px; color: rgba(244, 239, 230, 0.6); }
.panel-navy .rows { margin-top: 16px; display: flex; flex-direction: column; }
.panel-navy .row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 11px 0;
  border-top: 1px solid rgba(244, 239, 230, 0.12);
  font-size: 13.5px;
}
.panel-navy .row.locked { color: rgba(244, 239, 230, 0.55); }
.panel-navy .btn { width: 100%; justify-content: center; margin-top: 18px; }
.pill {
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  padding: 3px 9px;
  border: 1px solid rgba(244, 239, 230, 0.25);
  border-radius: var(--r-pill);
  color: rgba(244, 239, 230, 0.8);
  white-space: nowrap;
}
/* 徽章文字只有 10px：用 orange-deep 而非亮橙，白字对比度才够 AA。 */
.pill.on { background: var(--orange); border-color: var(--orange); color: #fff; }
.pill.off { border: 0; color: rgba(244, 239, 230, 0.5); padding: 3px 0; }

/* ── 认证页 ────────────────────────────────────────────── */
.auth-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(32px, 6vw, 64px) 24px;
  position: relative;
  overflow: hidden;
}
/* 顶部橙色柔光，对齐设计稿 */
.auth-main::before {
  content: "";
  position: absolute;
  top: -160px;
  left: 50%;
  transform: translateX(-50%);
  width: min(760px, 130vw);
  height: 440px;
  background: radial-gradient(closest-side, rgba(238, 108, 43, 0.12), transparent);
  pointer-events: none;
}
.auth-box { position: relative; width: 100%; max-width: 440px; }
.auth-head { text-align: center; margin-bottom: 28px; }
.auth-head h1 { font-size: clamp(28px, 5vw, 34px); letter-spacing: -0.04em; }
.auth-head p { margin-top: 8px; font-size: 15px; color: var(--fg-muted); }
.auth-box .panel { margin: 0; max-width: none; border-radius: 20px; }

/* 胶囊分段切换（取代下划线 tabs） */
.seg { display: flex; gap: 4px; padding: 4px; background: var(--cream); border-radius: var(--r-pill); margin-bottom: 24px; }
.seg-btn {
  flex: 1;
  text-align: center;
  padding: 9px;
  border: 0;
  border-radius: var(--r-pill);
  background: transparent;
  font-family: var(--f-body);
  font-size: 14px;
  font-weight: 500;
  color: var(--fg-muted);
  cursor: pointer;
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}
.seg-btn[aria-pressed="true"] {
  background: var(--panel);
  color: var(--navy);
  font-weight: 600;
  box-shadow: 0 2px 6px -3px rgba(12, 28, 48, 0.3);
}
.fineprint { text-align: center; margin-top: 10px; font-size: 11.5px; color: var(--sub); line-height: 1.6; }
.fineprint a { color: var(--orange-deep); }

/* ── 小屏 ──────────────────────────────────────────────── */
@media (max-width: 1080px) {
  .tool-grid, .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .people-grid { grid-template-columns: repeat(2, 1fr); }
  .console-lower { grid-template-columns: 1fr; }
  .stat-row { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 860px) {
  /* 控制台侧栏在窄屏转为顶部横向导航 */
  .console { flex-direction: column; }
  .side { width: auto; flex-direction: row; align-items: center; flex-wrap: wrap; gap: 8px; padding: 14px 20px; }
  .side .brand { padding: 0 12px 0 0; }
  .side-nav { flex-direction: row; flex-wrap: wrap; flex: 1; }
  .side-foot { margin-top: 0; flex-direction: row; align-items: center; flex-wrap: wrap; }
  .side-user { margin-top: 0; border-top: 0; padding: 0 8px; }
  .console-top, .console-body { padding-inline: 22px; }

  .step-row, .step-row:nth-child(even) { grid-template-columns: 1fr; }
  .step-row:nth-child(even) .step-text { order: 0; }
  .step-row:nth-child(even) .step-shot { order: 0; }
  .step-shot { min-height: 160px; }

  .tool-head { gap: 20px; }
  .tool-head .icon { width: 72px; height: 72px; border-radius: 18px; }
  .section-nav { gap: 16px; }
}

@media (max-width: 600px) {
  .wrap { padding: 0 22px; }
  .topbar { gap: 12px; padding: 12px 16px; }
  .topnav { gap: 14px; }
  .topnav .muted { max-width: 38vw; }
  .grid { gap: 14px; }
  .panel { padding: 26px 22px; }

  .tool-grid, .feature-grid, .mode-grid, .note-grid, .people-grid { grid-template-columns: 1fr; }
  .stat-row { grid-template-columns: repeat(2, 1fr); }
  .filters { gap: 8px; }
  .filters .spacer { display: none; }

  /* 流水线在手机上竖排，箭头转向下 */
  .pipeline, .board-steps { flex-direction: column; }
  .pipeline .arrow, .board-steps .arrow { justify-content: center; padding: 6px 0; }
  .pipeline .arrow { transform: rotate(90deg); }
  .board-steps .arrow { transform: rotate(90deg); }

  .tool-head { flex-direction: column; }
  .dl-row { flex-direction: column; align-items: stretch; }
  .dl-btn { text-align: center; }
  .tool-card .actions { flex-wrap: wrap; }
}
