/* 中文：Inkflow 纯白墨水屏设计系统（零外部字体/CDN，兼顾桌面端与移动端可读性）。
 * English: Pure-white e-ink design system for the Inkflow website, Companion showcase, and Web Serial flasher. */
:root {
  --bg: #ffffff;
  --surface: #fafafa;
  --surface-alt: #f3f5f8;
  --paper: #f6f4ee;
  --ink: #111418;
  --ink-soft: #262c34;
  --muted: #525b65;
  --subtle: #75818e;
  --line: #e1e5eb;
  --line-strong: #c2cad4;
  --accent: #1d4ed8;
  --accent-soft: #eff4ff;
  --ok: #146c43;
  --ok-bg: #eef9f2;
  --warn: #92400e;
  --warn-bg: #fff8eb;
  --err: #b42318;
  --err-bg: #fef3f2;
  --radius: 16px;
  --radius-sm: 10px;
  --header-h: 68px;
  --font-sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; background: var(--bg); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.75 var(--font-sans);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
img { max-width: 100%; height: auto; display: block; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2.5px solid var(--accent); outline-offset: 3px; }

.wrap { width: min(1160px, calc(100% - 48px)); margin: 0 auto; }

/* ---- 顶部导航 / Header ---- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  height: var(--header-h);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 21px;
  font-weight: 750;
  letter-spacing: -0.6px;
  flex-shrink: 0;
}
.brand img {
  width: 30px;
  height: 30px;
  border-radius: 7px;
  border: 1px solid var(--line);
}
.brand small {
  font-size: 11.5px;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0;
  padding: 2px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
}
.nav {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 14px;
}
.nav a { white-space: nowrap; }
.nav a.active { color: var(--ink); font-weight: 700; position: relative; }
.nav a.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -6px;
  height: 2px;
  border-radius: 2px;
  background: var(--ink);
}

/* ---- 按钮与胶囊 / Buttons & Tags ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--bg);
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
  transition: border-color .16s ease, background .16s ease, color .16s ease, transform .14s ease, box-shadow .16s ease;
}
.btn:hover:not(:disabled) { border-color: var(--ink); color: var(--ink); box-shadow: 0 2px 8px rgba(17, 20, 24, 0.06); }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn.primary {
  background: var(--ink);
  border-color: var(--ink);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(17, 20, 24, 0.14);
}
.btn.primary:hover:not(:disabled) { background: #262c34; border-color: #262c34; color: #ffffff; box-shadow: 0 6px 18px rgba(17, 20, 24, 0.18); }
.btn.accent {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
}
.btn.accent:hover:not(:disabled) { background: #1e40af; border-color: #1e40af; color: #ffffff; }
.btn.sm { padding: 7px 14px; font-size: 13px; }
.btn:disabled, .btn.is-disabled { opacity: 0.48; cursor: not-allowed; pointer-events: none; }

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  font-size: 12px;
  color: var(--muted);
}
.tag.mono { font-family: var(--font-mono); }
.tag.ink { background: var(--ink); border-color: var(--ink); color: #ffffff; font-weight: 600; }
.tag.ok { background: var(--ok-bg); border-color: #b7e4c7; color: var(--ok); font-weight: 600; }
.tag.info { background: var(--accent-soft); border-color: #c7d7fe; color: var(--accent); font-weight: 600; }

/* ---- 首屏 Hero / Dual-Device Stage ---- */
.hero {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 48px;
  align-items: center;
  padding: 58px 0 56px;
  border-bottom: 1px solid var(--line);
}
.eyebrow {
  margin: 0 0 12px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.3px;
  text-transform: uppercase;
  color: var(--muted);
}
.hero h1 {
  margin: 0 0 18px;
  font-size: clamp(32px, 4.1vw, 48px);
  line-height: 1.18;
  letter-spacing: -1.2px;
}
.hero-lead {
  margin: 0 0 26px;
  font-size: 16px;
  line-height: 1.8;
  color: var(--muted);
  max-width: 560px;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 22px; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 8px; font-size: 12.5px; color: var(--muted); }

/* 双机同框舞台 / Dual-device stage */
.hero-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}
.dual-devices {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  width: 100%;
  padding: 12px 0 6px;
}
.eink-bezel {
  position: relative;
  width: 286px;
  padding: 13px 13px 18px;
  border-radius: 26px;
  background: #ffffff;
  border: 2px solid #1b1f24;
  box-shadow: 0 20px 44px rgba(17, 20, 24, 0.08);
  z-index: 2;
}
.eink-bezel .bezel-screen {
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid #d7dce2;
  background: var(--paper);
  aspect-ratio: 684 / 1216;
}
.eink-bezel .bezel-screen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: zoom-in;
  transition: opacity .18s ease, transform .24s ease;
}
.eink-bezel .bezel-screen:hover img { transform: scale(1.015); }
.eink-bezel .bezel-screen img.is-swapping,
.phone-bezel .bezel-screen img.is-swapping { opacity: 0.45; }
.eink-bezel .bezel-chin {
  margin: 10px 0 0;
  text-align: center;
  font: 600 10.5px/1 var(--font-mono);
  letter-spacing: 1.6px;
  color: var(--subtle);
  text-transform: uppercase;
}

.phone-bezel {
  position: relative;
  width: 204px;
  margin-left: -34px;
  margin-bottom: 10px;
  padding: 9px;
  border-radius: 30px;
  background: #14171a;
  border: 1.5px solid #2f363f;
  box-shadow: 0 18px 36px rgba(17, 20, 24, 0.14);
  z-index: 3;
}
.phone-bezel .bezel-screen {
  border-radius: 22px;
  overflow: hidden;
  background: #ffffff;
  aspect-ratio: 720 / 1565;
}
.phone-bezel .bezel-screen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: zoom-in;
  transition: opacity .18s ease, transform .24s ease;
}
.phone-bezel .bezel-screen:hover img { transform: scale(1.015); }
.phone-bezel.standalone {
  width: 248px;
  margin: 0 auto;
}
.eink-bezel.compact {
  width: 250px;
  padding: 11px 11px 15px;
  border-radius: 22px;
  box-shadow: 0 12px 28px rgba(17, 20, 24, 0.06);
}

.stage-switcher {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
}
.stage-pill {
  border: 0;
  background: transparent;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
  transition: background .15s, color .15s;
}
.stage-pill:hover { color: var(--ink); }
.stage-pill.active { background: var(--ink); color: #ffffff; }

.stage-caption {
  margin: 0;
  font-size: 12.5px;
  color: var(--subtle);
  text-align: center;
}

/* ---- 通用区块与网格 / Sections & Grids ---- */
.section { padding: 60px 0; border-bottom: 1px solid var(--line); }
.section:last-of-type { border-bottom: 0; }
.section.tinted { background: var(--surface); }
.section-head { margin-bottom: 30px; }
.section-head h2 {
  margin: 0 0 10px;
  font-size: clamp(23px, 2.8vw, 32px);
  line-height: 1.28;
  letter-spacing: -0.6px;
}
.section-head p { margin: 0; color: var(--muted); max-width: 720px; font-size: 15px; }

.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }

.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  background: var(--bg);
  transition: border-color .18s ease, box-shadow .18s ease;
}
.card:hover { border-color: var(--line-strong); box-shadow: 0 8px 24px rgba(17, 20, 24, 0.04); }
.card.soft { background: var(--surface); }
.card h3 { margin: 0 0 8px; font-size: 17px; line-height: 1.4; }
.card p { margin: 0; font-size: 14px; color: var(--muted); }
.card-kicker {
  display: inline-block;
  font: 600 11px/1 var(--font-mono);
  letter-spacing: 0.9px;
  color: var(--subtle);
  text-transform: uppercase;
  margin-bottom: 10px;
}
.card-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  font: 600 13px/1 var(--font-mono);
  margin-bottom: 12px;
}
.feature-list {
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}
.feature-list li {
  position: relative;
  padding-left: 18px;
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.65;
}
.feature-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ink);
}
.feature-list li strong { color: var(--ink); }

/* ---- 固件核心特色实拍展馆 / Interactive Feature Showcase ---- */
.showcase-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}
.showcase-tab {
  border: 1px solid var(--line-strong);
  background: var(--bg);
  color: var(--muted);
  padding: 9px 18px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  transition: all .15s;
}
.showcase-tab:hover { border-color: var(--ink); color: var(--ink); }
.showcase-tab.active {
  background: var(--ink);
  border-color: var(--ink);
  color: #ffffff;
}

.showcase-panel {
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 32px;
  background: var(--bg);
  display: grid;
  grid-template-columns: 0.92fr 1.08fr;
  gap: 36px;
  align-items: center;
}
.showcase-copy h3 {
  margin: 0 0 10px;
  font-size: clamp(20px, 2.2vw, 25px);
  line-height: 1.32;
  letter-spacing: -0.4px;
}
.showcase-copy .lead {
  margin: 0 0 18px;
  font-size: 14.5px;
  color: var(--muted);
}
.shot-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
}
.shot-pill {
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--muted);
  padding: 6px 13px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  transition: all .15s;
}
.shot-pill:hover { border-color: var(--ink); color: var(--ink); }
.shot-pill.active {
  background: var(--ink);
  border-color: var(--ink);
  color: #ffffff;
}

.showcase-visual {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  justify-items: center;
}
.shot-thumbs {
  display: grid;
  gap: 10px;
  width: 100%;
}
.shot-thumb-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: left;
  padding: 9px 11px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface);
  transition: border-color .15s, background .15s;
}
.shot-thumb-btn:hover { border-color: var(--line-strong); background: var(--bg); }
.shot-thumb-btn.active {
  border-color: var(--ink);
  background: var(--bg);
  box-shadow: 0 0 0 1px var(--ink);
}
.shot-thumb-btn img {
  width: 40px;
  height: 71px;
  object-fit: cover;
  border-radius: 5px;
  border: 1px solid var(--line);
  flex-shrink: 0;
  background: var(--paper);
}
.shot-thumb-btn strong { display: block; font-size: 13px; line-height: 1.35; color: var(--ink); }
.shot-thumb-btn span { display: block; font-size: 11.5px; color: var(--muted); line-height: 1.4; margin-top: 2px; }

.shot-stage-caption {
  margin: 10px 0 0;
  font-size: 12px;
  color: var(--subtle);
  text-align: center;
  max-width: 260px;
}

/* ---- 伴侣 App 专场与画廊 / Companion App Showcase ---- */
.companion-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin-top: 28px;
}
.app-shot-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 16px 16px;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.app-shot-card:hover {
  border-color: var(--line-strong);
  box-shadow: 0 12px 28px rgba(17, 20, 24, 0.055);
  transform: translateY(-2px);
}
.app-shot-card .phone-bezel {
  width: 180px;
  margin: 0 auto 14px;
  padding: 7px;
  border-radius: 26px;
  box-shadow: 0 12px 24px rgba(17, 20, 24, 0.10);
}
.app-shot-card .phone-bezel .bezel-screen { border-radius: 19px; }
.app-shot-card h3 { margin: 0 0 5px; font-size: 15.5px; }
.app-shot-card p { margin: 0; font-size: 13px; color: var(--muted); line-height: 1.55; }

/* 五通道零流量流向 / 5-Channel Zero-Traffic Flow */
.channel-flow {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-top: 22px;
}
.channel-node {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px 14px;
  background: var(--bg);
}
.channel-node.zero { border-color: #b7e4c7; background: #fafdfb; }
.channel-step {
  font: 700 11px/1 var(--font-mono);
  color: var(--subtle);
  margin-bottom: 8px;
}
.channel-node h3 { margin: 0 0 6px; font-size: 15px; }
.channel-node p { margin: 0 0 10px; font-size: 12.5px; color: var(--muted); line-height: 1.55; }

/* 伴侣 App 详情图文交错 / Alternating Feature Rows */
.app-feature-grid {
  display: grid;
  gap: 24px;
}
.app-feature-row {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 32px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 28px 32px;
  background: var(--bg);
}
.app-feature-row.reverse { grid-template-columns: 0.95fr 1.05fr; }
.app-feature-row.reverse .app-feature-media { order: -1; }
.app-feature-media {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}
.app-feature-media .phone-bezel {
  width: 220px;
  margin: 0;
  padding: 8px;
  border-radius: 28px;
}
.app-feature-media .eink-bezel.compact {
  width: 220px;
  margin: 0;
}
.app-feature-media .phone-bezel .bezel-screen { border-radius: 20px; }

/* 下载中心 / Download Cards */
.download-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin-top: 22px;
}
.platform-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.platform-card.primary-card { border-color: var(--ink); }
.platform-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.platform-head h3 { margin: 0; font-size: 19px; }
.platform-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
}
.platform-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 4px;
}

/* 三步流程条 / 3-Step Rail */
.step-rail {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}
.step-item {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px 18px;
  background: var(--surface);
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.step-item .card-num { margin-bottom: 0; flex-shrink: 0; background: var(--bg); }
.step-item strong { display: block; font-size: 14.5px; margin-bottom: 2px; }
.step-item span { display: block; font-size: 12.5px; color: var(--muted); line-height: 1.5; }

/* ---- 表格 / Tables ---- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; font-size: 14px; background: var(--bg); }
th, td { padding: 12px 16px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
tr:last-child td { border-bottom: 0; }
th { background: var(--surface); font-weight: 600; color: var(--ink); white-space: nowrap; }
td:first-child { white-space: nowrap; font-weight: 500; }
code, .mono { font-family: var(--font-mono); font-size: 13px; }
.sha { font-family: var(--font-mono); font-size: 12px; word-break: break-all; color: var(--muted); }

/* ---- 提示框 / Alerts ---- */
.alert {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  font-size: 14px;
  background: var(--surface);
  margin: 14px 0;
}
.alert strong { display: block; margin-bottom: 4px; }
.alert.ok { border-color: #b7e4c7; background: var(--ok-bg); color: var(--ok); }
.alert.warn { border-color: #f3d59b; background: var(--warn-bg); color: var(--warn); }
.alert.err { border-color: #f5c2c0; background: var(--err-bg); color: var(--err); }
.alert.info { border-color: #c7d7fe; background: var(--accent-soft); color: #1e3a8a; }

/* ---- 刷机工作台 / Flasher Workbench ---- */
.page-hero { padding: 44px 0 32px; border-bottom: 1px solid var(--line); }
.page-hero h1 { margin: 0 0 12px; font-size: clamp(26px, 3.5vw, 38px); letter-spacing: -0.9px; line-height: 1.22; }
.page-hero p { margin: 0; color: var(--muted); max-width: 760px; font-size: 15.5px; }

.tabs {
  display: inline-flex;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 3px;
  background: var(--surface);
  margin-bottom: 20px;
}
.tab-btn {
  border: 0;
  background: transparent;
  padding: 8px 18px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
}
.tab-btn.active { background: var(--ink); color: #ffffff; }

.flasher-grid { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 24px; align-items: start; }

.form-row { margin-bottom: 16px; }
.form-row label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.select-input, .text-input {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--bg);
  font-size: 14px;
}
.check-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
  margin: 10px 0;
}

.dropzone {
  border: 1.5px dashed var(--line-strong);
  border-radius: var(--radius);
  padding: 28px 20px;
  text-align: center;
  background: var(--surface);
  transition: border-color .15s, background .15s;
}
.dropzone.dragover { border-color: var(--accent); background: var(--accent-soft); }
.dropzone p { margin: 6px 0; color: var(--muted); font-size: 14px; }

.progress-wrap { margin: 18px 0; }
.progress-head { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 6px; }
.progress-track {
  height: 10px;
  border-radius: 999px;
  background: var(--surface-alt);
  border: 1px solid var(--line);
  overflow: hidden;
}
.progress-bar {
  height: 100%;
  width: 0%;
  background: var(--ink);
  transition: width .15s linear;
}
.progress-bar.ok { background: var(--ok); }
.progress-bar.err { background: var(--err); }

.console-box {
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fafafa;
  padding: 12px 14px;
  font: 12px/1.6 var(--font-mono);
  max-height: 260px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  color: #24292f;
}

.release-notes {
  margin: 12px 0 0;
  padding: 12px 14px;
  border-left: 3px solid var(--ink);
  background: var(--surface);
  border-radius: 0 8px 8px 0;
  white-space: pre-line;
  font-size: 13px;
  color: var(--ink);
}

/* ---- 站内说明书检索 / Manual Search Widget ---- */
.search-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  background: var(--bg);
}
.search-row { display: flex; gap: 10px; align-items: center; }
.search-row input {
  flex: 1;
  height: 46px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--bg);
}
.search-results { margin-top: 14px; display: grid; gap: 10px; }
.search-item {
  display: block;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  background: var(--surface);
}
.search-item:hover { border-color: var(--accent); background: var(--bg); }
.search-item strong { display: block; font-size: 15px; margin-bottom: 4px; }
.search-item .path { font-size: 12px; color: var(--accent); margin-bottom: 6px; }
.search-item ol { margin: 0; padding-left: 18px; font-size: 13px; color: var(--muted); }

/* ---- 说明书阅读布局 / Manual Layout ---- */
.manual-layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 40px; padding: 32px 0 56px; align-items: start; }
.manual-toc {
  position: sticky;
  top: 88px;
  max-height: calc(100vh - 110px);
  overflow: auto;
  padding-right: 12px;
}
.manual-toc h2 { font-size: 14px; margin: 0 0 10px; color: var(--muted); }
.manual-toc a {
  display: flex;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.5;
}
.manual-toc a span { font-family: var(--font-mono); font-size: 11px; color: var(--subtle); padding-top: 2px; }
.manual-toc a.active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.toc-toggle { display: none; width: 100%; margin-bottom: 14px; text-align: left; }
.chapter { padding-bottom: 36px; margin-bottom: 36px; border-bottom: 1px solid var(--line); }
.chapter:last-child { border-bottom: 0; }
.chapter-kicker { font: 600 12px/1 var(--font-mono); color: var(--accent); margin-bottom: 6px; }
.chapter h2 { margin: 0 0 10px; font-size: 24px; }
.chapter-intro { margin: 0 0 22px; color: var(--muted); }
.task { margin: 0 0 26px; padding: 18px 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); }
.task:target { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.task h3 { margin: 0 0 8px; font-size: 18px; }
.task-path {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 6px;
  background: var(--surface-alt);
  font-size: 12px;
  color: var(--ink);
  margin-bottom: 12px;
}
.task-steps { margin: 0 0 12px; padding-left: 20px; }
.task-steps li { margin: 6px 0; }
.task-note { font-size: 13px; color: var(--muted); padding: 8px 12px; border-left: 2.5px solid var(--line-strong); background: var(--surface); margin-top: 8px; }
.task-note strong { color: var(--ink); margin-right: 6px; }

/* ---- FAQ 折叠项 / FAQ Details ---- */
.faq-list { display: grid; gap: 12px; }
.faq-item {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--bg);
  padding: 16px 20px;
}
.faq-item summary {
  cursor: pointer;
  font-weight: 650;
  font-size: 15px;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; font-family: var(--font-mono); font-size: 18px; color: var(--subtle); }
.faq-item[open] summary::after { content: "−"; color: var(--ink); }
.faq-item p { margin: 10px 0 0; font-size: 14px; color: var(--muted); }

/* ---- 原生高清图预览弹窗 / Native Lightbox ---- */
.lightbox {
  border: 1px solid var(--line-strong);
  border-radius: 20px;
  padding: 18px 20px 20px;
  background: #ffffff;
  color: var(--ink);
  max-width: min(92vw, 560px);
  box-shadow: 0 24px 64px rgba(17, 20, 24, 0.24);
}
.lightbox::backdrop {
  background: rgba(17, 20, 24, 0.56);
  backdrop-filter: blur(4px);
}
.lightbox-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.lightbox-head strong { font-size: 14.5px; }
.lightbox-img {
  max-height: 70vh;
  width: auto;
  margin: 0 auto;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--paper);
  transition: opacity .15s ease;
}
.lightbox-img.is-swapping { opacity: 0.45; }
.lightbox-cap {
  margin: 10px 0 0;
  font-size: 13px;
  color: var(--muted);
  text-align: center;
}
.lightbox-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.lightbox-counter {
  font-size: 12px;
  color: var(--subtle);
}

/* ---- 搜索命中高亮、任务锚点复制与回到顶部 / Search Highlight, Task Copy & Back-To-Top ---- */
.search-hl {
  background: #e8eefc;
  color: var(--ink);
  padding: 0 3px;
  border-radius: 4px;
  font-weight: 600;
}
.task-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}
.task-head h3 { margin: 0; }
.task-copy-btn {
  flex-shrink: 0;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 12px;
  font-weight: 600;
  transition: border-color .15s, color .15s, background .15s;
}
.task-copy-btn:hover { border-color: var(--ink); color: var(--ink); background: var(--bg); }
.sha-cell {
  display: flex;
  align-items: center;
  gap: 8px;
}
.sha-cell .sha { flex: 1; min-width: 0; }
.back-to-top {
  position: fixed;
  right: 22px;
  bottom: 24px;
  z-index: 25;
  padding: 8px 15px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(10px);
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 8px 24px rgba(17, 20, 24, 0.10);
  transition: border-color .15s, transform .15s, box-shadow .15s;
}
.back-to-top:hover {
  border-color: var(--ink);
  transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(17, 20, 24, 0.14);
}

/* ---- 页脚 / Footer ---- */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 30px 0 44px;
  font-size: 13px;
  color: var(--muted);
}
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; align-items: center; }
.footer-links { display: flex; flex-wrap: wrap; gap: 18px; }

[hidden] { display: none !important; }

@media (max-width: 1040px) {
  .grid-4, .companion-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .channel-flow { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .showcase-panel { grid-template-columns: 1fr; padding: 24px; }
  .showcase-visual { grid-template-columns: 1fr; }
  .shot-thumbs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 920px) {
  .hero, .flasher-grid, .manual-layout, .app-feature-row, .app-feature-row.reverse { grid-template-columns: 1fr; gap: 28px; }
  .app-feature-row.reverse .app-feature-media { order: 0; }
  .grid-3, .grid-2, .download-grid, .step-rail { grid-template-columns: 1fr; }
  .manual-toc { position: static; max-height: none; display: none; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; margin-bottom: 18px; }
  .manual-toc.open { display: block; }
  .toc-toggle { display: inline-flex; justify-content: space-between; }
}

@media (max-width: 640px) {
  .wrap { width: calc(100% - 28px); }
  .brand { font-size: 18px; gap: 8px; }
  .nav { gap: 11px; font-size: 13px; }
  .nav .hide-sm { display: none; }
  .brand small { display: none; }
  td:first-child { white-space: normal; }
  .hero { padding: 34px 0 36px; }
  .section { padding: 40px 0; }
  .grid-4, .companion-strip, .channel-flow, .shot-thumbs { grid-template-columns: 1fr; }
  .eink-bezel { width: 222px; padding: 10px 10px 14px; border-radius: 20px; }
  .phone-bezel { width: 154px; margin-left: -26px; padding: 6px; border-radius: 24px; }
  .phone-bezel .bezel-screen { border-radius: 18px; }
  .app-feature-row { padding: 20px 18px; }
  .showcase-panel { padding: 20px 16px; }
  .showcase-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 4px;
  }
  .showcase-tabs::-webkit-scrollbar { display: none; }
  .showcase-tab { flex-shrink: 0; padding: 8px 14px; font-size: 13px; }
  .back-to-top { right: 14px; bottom: 16px; padding: 7px 13px; font-size: 12.5px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
