/* ==========================================================================
   GhostLock Mobile 官方页 —— 样式
   --------------------------------------------------------------------------
   几条刻意的约束，改之前先看一眼：

   1) 移动优先。默认样式就是手机（≤430px）的，宽屏靠 min-width 媒体查询加上去；
      没有哪个断点是用来"修桌面"的。
   2) 主题两套，靠 <html data-theme> 切换。色值全部走变量，组件里不出现写死的颜色
      （唯一例外是深色卡片内部的分隔线，那本来就是叠加的白）。
   3) 圆角小、阴影淡、边框细、留白大、标题字重高 —— 排版纪律参考 workbuddy.cn，
      不用大色块、不用渐变光斑、不用 emoji 装饰。
   ========================================================================== */

/* ------------------------------------------------------------------ 变量 */

:root {
  color-scheme: light;

  --bg: #ffffff;
  --bg-soft: #f7f8fa;
  --surface: #ffffff;
  --surface-2: #f4f5f7;
  --nav-bg: rgba(255, 255, 255, 0.84);

  --ink: #0e1015;
  --ink-2: #565c68;
  --ink-3: #8a9099;

  --line: #e9ebef;
  --line-2: #dcdfe5;

  --accent: #1f6feb;
  --accent-soft: #eaf2fe;
  --ok: #137a3c;
  --warn: #a8481a;
  --warn-soft: #fdf2e9;

  /* 实心按钮：浅色下黑底白字 */
  --solid-bg: #101319;
  --solid-fg: #ffffff;
  --solid-hover: #242830;

  /* 反色卡片：两个主题下都保持深底，用来做节奏上的重音 */
  --card-inv-bg: #14171d;
  --card-inv-fg: #f5f6f8;
  --card-inv-dim: rgba(245, 246, 248, 0.64);

  --r-lg: 18px;
  --r-md: 12px;

  --shadow-2: 0 1px 2px rgba(14, 16, 21, 0.04), 0 14px 30px -18px rgba(14, 16, 21, 0.3);

  --nav-h: 60px;

  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Noto Sans SC", Roboto, Helvetica, Arial, sans-serif;
  --mono: "SF Mono", "Cascadia Code", "Roboto Mono", Menlo, Consolas, "Courier New", monospace;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

[data-theme="dark"] {
  color-scheme: dark;

  --bg: #0c0e12;
  --bg-soft: #101318;
  --surface: #12151a;
  --surface-2: #181c22;
  --nav-bg: rgba(12, 14, 18, 0.84);

  --ink: #f2f4f7;
  --ink-2: #9aa1ad;
  --ink-3: #6f7783;

  --line: #212630;
  --line-2: #2c333e;

  --accent: #5aa6ff;
  --accent-soft: #14243a;
  --ok: #4ec27b;
  --warn: #e0a06a;
  --warn-soft: #241a12;

  /* 深色主题下实心按钮反过来：白底黑字，否则按钮会陷进页面里 */
  --solid-bg: #f2f4f7;
  --solid-fg: #0c0e12;
  --solid-hover: #ffffff;

  --card-inv-bg: #1b2028;
  --card-inv-dim: rgba(242, 244, 247, 0.6);

  --shadow-2: 0 1px 2px rgba(0, 0, 0, 0.35), 0 18px 34px -22px rgba(0, 0, 0, 0.9);
}

/* ------------------------------------------------------------------ 基础 */

*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 20px);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* 窄屏底部有常驻下载条，正文给它留出高度，免得最后一段被盖住。 */
@media (max-width: 759px) {
  body {
    padding-bottom: calc(70px + env(safe-area-inset-bottom));
  }
}

svg {
  max-width: 100%;
}

h1,
h2,
h3,
h4 {
  font-weight: 700;
  letter-spacing: -0.022em;
  line-height: 1.2;
  text-wrap: balance;
}

p {
  margin: 0;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

code {
  font-family: var(--mono);
  font-size: 0.9em;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 1px 5px;
  color: var(--ink);
}

::selection {
  background: var(--accent-soft);
  color: var(--ink);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

.wrap {
  width: 100%;
  max-width: 1180px;
  margin-inline: auto;
  padding-inline: 20px;
}

@media (min-width: 768px) {
  .wrap {
    padding-inline: 32px;
  }
}

.wrap-mid {
  max-width: 880px;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 10px 16px;
  background: var(--solid-bg);
  color: var(--solid-fg);
  border-radius: 0 0 8px 0;
}

.skip:focus {
  left: 0;
}

.muted {
  color: var(--ink-3);
}

/* ------------------------------------------------------------------ 按钮 */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-family: inherit;
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.16s var(--ease), border-color 0.16s var(--ease), transform 0.16s var(--ease);
}

.btn-dark {
  background: var(--solid-bg);
  color: var(--solid-fg);
}

.btn-dark:hover {
  background: var(--solid-hover);
}

.btn-dark:active {
  transform: translateY(1px);
}

.btn-line {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--line-2);
}

.btn-line:hover {
  background: var(--surface-2);
}

.btn-sm {
  height: 34px;
  padding: 0 14px;
  font-size: 13.5px;
}

.btn-lg {
  height: 50px;
  padding: 0 22px;
  font-size: 15.5px;
}

.btn-num {
  padding: 4px 7px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.16);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
}

[data-theme="dark"] .btn-num {
  background: rgba(12, 14, 18, 0.12);
}

.btn-line .btn-num {
  background: var(--surface-2);
  color: var(--ink-2);
}

.i-dl {
  width: 17px;
  height: 17px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-btn {
  width: 36px;
  height: 36px;
  flex: none;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink-2);
  cursor: pointer;
  transition: border-color 0.16s var(--ease), color 0.16s var(--ease);
}

.icon-btn:hover {
  border-color: var(--line-2);
  color: var(--ink);
}

.icon-btn svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.mini {
  padding: 5px 8px;
  border: 1px solid var(--line-2);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink-2);
  font-family: var(--sans);
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
}

.mini.copied {
  color: var(--ok);
  border-color: var(--ok);
}

/* ------------------------------------------------------------------ 公告 */

.announce {
  background: var(--card-inv-bg);
  color: var(--card-inv-fg);
  font-size: 13.5px;
}

.announce.lv-warn {
  background: #7d3410;
}

.announce.lv-ok {
  background: #0f5c34;
}

.announce-in {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  padding-block: 6px;
}

.announce-tag {
  flex: none;
  padding: 3px 7px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.16);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
}

.announce p {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.announce a {
  flex: none;
  color: inherit;
  opacity: 0.85;
}

.announce-x {
  flex: none;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: inherit;
  opacity: 0.7;
  cursor: pointer;
}

.announce-x:hover {
  opacity: 1;
  background: rgba(255, 255, 255, 0.12);
}

.announce-x svg {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
}

/* ------------------------------------------------------------------ 导航 */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--nav-bg);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s var(--ease);
}

.nav.scrolled {
  border-bottom-color: var(--line);
}

.nav-in {
  display: flex;
  align-items: center;
  gap: 12px;
  height: var(--nav-h);
}

.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  flex: none;
  color: inherit;
  text-decoration: none;
}

.mark {
  display: block;
  line-height: 0;
}

.mark svg {
  border-radius: 9px;
}

.brand-tx {
  display: flex;
  align-items: baseline;
  gap: 5px;
  font-size: 15.5px;
}

.brand-tx b {
  font-weight: 700;
  letter-spacing: -0.01em;
}

.brand-tx i {
  font-style: normal;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--ink-3);
}

.nav-links {
  display: none;
}

.nav-act {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-ver {
  display: none;
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 500;
  color: var(--ink-3);
}

.nav-cta {
  display: none;
}

@media (min-width: 480px) {
  .nav-ver,
  .nav-cta {
    display: inline-flex;
  }

  .nav-ver {
    display: inline-block;
  }
}

@media (min-width: 900px) {
  .nav-links {
    display: flex;
    align-items: center;
    gap: 2px;
    margin-left: 18px;
  }

  .nav-links a {
    padding: 8px 12px;
    border-radius: 8px;
    color: var(--ink-2);
    font-size: 14.5px;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.15s var(--ease), color 0.15s var(--ease);
  }

  .nav-links a:hover {
    background: var(--surface-2);
    color: var(--ink);
  }

  .burger {
    display: none;
  }
}

/* 主题图标：浅色显示月亮（点了变深），深色显示太阳 */
.i-sun {
  display: none;
}

[data-theme="dark"] .i-sun {
  display: block;
}

[data-theme="dark"] .i-moon {
  display: none;
}

.drawer {
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}

.drawer .wrap {
  display: flex;
  flex-direction: column;
  padding-block: 4px 14px;
}

.drawer a {
  padding: 13px 2px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  font-size: 16px;
  font-weight: 500;
  text-decoration: none;
}

.drawer a:last-child {
  border-bottom: 0;
}

.drawer-dl {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--accent) !important;
}

.drawer-dl span {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-3);
}

/* --------------------------------------------------------------- 通用排版 */

.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 16px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.13em;
  color: var(--ink-2);
}

.eyebrow::before {
  content: "";
  width: 16px;
  height: 1px;
  flex: none;
  background: var(--line-2);
}

.eyebrow i {
  font-style: normal;
  font-size: 10.5px;
  letter-spacing: 0.16em;
  color: var(--ink-3);
}

h2 {
  margin: 0 0 14px;
  font-size: clamp(25px, 4.6vw, 40px);
}

.sec-lead {
  max-width: 62ch;
  margin: 0 0 38px;
  font-size: 15.5px;
  line-height: 1.75;
  color: var(--ink-2);
}

.sec-lead b {
  color: var(--ink);
}

.br-m {
  display: none;
}

@media (min-width: 768px) {
  .br-m {
    display: inline;
  }
}

.sec {
  padding-block: clamp(56px, 8.5vw, 104px);
}

.sec-soft {
  background: var(--bg-soft);
  border-block: 1px solid var(--line);
}

/* 宽屏上给浅色分区一个圆角容器，页面节奏不至于被几条通长的横线切碎。 */
@media (min-width: 980px) {
  .sec-soft {
    margin-inline: 24px;
    border: 1px solid var(--line);
    border-radius: 30px;
  }
}

/* ------------------------------------------------------------------ 首屏 */

.hero {
  padding-block: clamp(34px, 6vw, 76px) clamp(40px, 6vw, 76px);
}

.hero-in {
  display: grid;
  gap: 36px;
}

@media (min-width: 1000px) {
  .hero-in {
    grid-template-columns: 1.02fr 0.98fr;
    gap: 56px;
    align-items: center;
  }
}

h1 {
  margin: 0 0 18px;
  font-size: clamp(31px, 7.4vw, 56px);
  line-height: 1.14;
  letter-spacing: -0.03em;
}

.lead {
  max-width: 54ch;
  margin: 0 0 26px;
  font-size: clamp(15px, 2.3vw, 16.8px);
  line-height: 1.78;
  color: var(--ink-2);
}

.lead code {
  white-space: nowrap;
}

.cta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

@media (max-width: 460px) {
  .cta .btn {
    width: 100%;
  }
}

.hero-spec {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 26px 0 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.hero-spec dt {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--ink-3);
}

.hero-spec dd {
  margin: 3px 0 0;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
}

.hash {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  color: var(--ink-3);
}

.hash > span {
  flex: none;
  font-weight: 600;
  letter-spacing: 0.08em;
}

.hash code {
  padding: 0;
  border: 0;
  background: transparent;
  font-size: 11px;
  color: var(--ink-2);
  word-break: break-all;
  cursor: pointer;
}

.dl-count {
  margin: 18px 0 0;
  font-size: 13px;
  color: var(--ink-3);
}

.dl-count b {
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

/* 终端窗口 */
.term {
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow-2);
  overflow: hidden;
}

.term-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 11px 14px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
}

.dot {
  width: 9px;
  height: 9px;
  flex: none;
  border-radius: 50%;
  background: var(--line-2);
}

.term-title {
  margin-left: 8px;
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--ink-3);
}

.term-body {
  margin: 0;
  padding: 16px 14px 18px;
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.9;
  color: var(--ink-2);
  -webkit-overflow-scrolling: touch;
}

.term-body code {
  padding: 0;
  border: 0;
  background: transparent;
  font-size: inherit;
  color: inherit;
}

.t-s {
  color: var(--ink);
  font-weight: 600;
}

.t-i {
  color: var(--ink-3);
}

.t-ok {
  color: var(--ok);
}

.t-cur {
  color: var(--accent);
  animation: blink 1.15s steps(2, start) infinite;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

.term-cap {
  margin: 12px 0 0;
  font-size: 12.5px;
  line-height: 1.65;
  color: var(--ink-3);
}

/* ------------------------------------------------------------------ 数据条 */

.stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin-bottom: 16px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
}

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

.stats > div {
  padding: 16px 18px;
  background: var(--bg);
}

.stats b {
  display: block;
  font-size: clamp(21px, 3.2vw, 28px);
  font-weight: 700;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

.stats span {
  display: block;
  margin-top: 4px;
  font-size: 12.5px;
  color: var(--ink-3);
}

/* -------------------------------------------------------------- 能力网格 */

.bento {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
}

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

  .c-3,
  .c-6 {
    grid-column: span 2;
  }
}

@media (min-width: 1080px) {
  .bento {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .c-2 {
    grid-column: span 2;
  }

  .c-3 {
    grid-column: span 3;
  }

  .c-6 {
    grid-column: span 6;
  }
}

.cell {
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  transition: border-color 0.18s var(--ease);
}

.cell:hover {
  border-color: var(--line-2);
}

.cell h3 {
  margin: 0;
  font-size: 17px;
}

.cell p {
  font-size: 14.5px;
  line-height: 1.72;
  color: var(--ink-2);
}

.cell-note {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-size: 13px !important;
  color: var(--ink-3) !important;
}

.c-inv {
  background: var(--card-inv-bg);
  border-color: transparent;
  color: var(--card-inv-fg);
}

.c-inv h3 {
  color: var(--card-inv-fg);
}

.c-inv p {
  color: var(--card-inv-dim);
}

.chain {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
}

.chain li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
  font-size: 13.5px;
  color: var(--card-inv-dim);
}

.chain li span {
  flex: none;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--card-inv-fg);
  opacity: 0.45;
}

.c6-tx {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  margin: 4px 0 0;
  padding: 0;
}

.chips li {
  padding: 6px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-2);
  font-size: 12.5px;
  color: var(--ink-2);
}

@media (min-width: 1080px) {
  .c-6 {
    flex-direction: row;
    align-items: center;
    gap: 40px;
  }

  .c6-tx {
    flex: 1;
  }

  .chips {
    flex: none;
    margin: 0;
    max-width: 44%;
    justify-content: flex-end;
  }
}

/* ---------------------------------------------------------------- 四步 */

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

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

.no {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  margin-bottom: 13px;
  border: 1px solid var(--line-2);
  border-radius: 50%;
  background: var(--surface);
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 600;
}

.steps h3 {
  margin: 0 0 7px;
  font-size: 16.5px;
}

.steps p {
  font-size: 14px;
  line-height: 1.72;
  color: var(--ink-2);
}

.steps b {
  color: var(--ink);
}

@media (min-width: 900px) {
  .steps li {
    position: relative;
    padding-right: 24px;
  }

  .steps li::before {
    content: "";
    position: absolute;
    top: 15px;
    left: 44px;
    right: 0;
    height: 1px;
    background: var(--line-2);
  }

  .steps li:last-child::before {
    display: none;
  }
}

/* ------------------------------------------------------------------ 机型 */

.filter {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 420px;
  margin-bottom: 22px;
  padding: 0 12px;
  border: 1px solid var(--line-2);
  border-radius: 10px;
  background: var(--surface);
}

.filter svg {
  width: 16px;
  height: 16px;
  flex: none;
  fill: none;
  stroke: var(--ink-3);
  stroke-width: 1.7;
  stroke-linecap: round;
}

.filter input {
  flex: 1;
  min-width: 0;
  padding: 11px 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-family: inherit;
  font-size: 14.5px;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

.compat {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
}

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

.group {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
}

.group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 16px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
}

.kernel {
  font-family: var(--mono);
  font-size: 12.5px;
  font-weight: 500;
  color: var(--ink);
  word-break: break-all;
}

.count {
  flex: none;
  font-size: 12px;
  color: var(--ink-3);
}

.group table {
  width: 100%;
  border-collapse: collapse;
}

.group th {
  padding: 10px 16px 6px;
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.07em;
  color: var(--ink-3);
}

.group td {
  padding: 9px 16px;
  border-top: 1px solid var(--line);
  font-size: 14px;
  color: var(--ink-2);
}

.group td.model {
  color: var(--ink);
  font-weight: 600;
}

.group td.codename,
.group td.firmware {
  font-family: var(--mono);
  font-size: 12.5px;
}

/* 窄屏：把表格摊成"机型一行、代号一行、固件一行"，横着滚表格在手机上很难用。 */
@media (max-width: 640px) {
  .group thead {
    display: none;
  }

  .group table,
  .group tbody,
  .group tr,
  .group td {
    display: block;
  }

  .group tr {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 2px 10px;
    padding: 12px 16px;
    border-top: 1px solid var(--line);
  }

  .group tr:first-child {
    border-top: 0;
  }

  .group td {
    padding: 0;
    border: 0;
  }

  .group td.model {
    font-size: 15px;
  }

  .group td.codename {
    text-align: right;
    color: var(--ink-3);
  }

  .group td.firmware {
    grid-column: 1 / -1;
    color: var(--ink-3);
  }
}

.compat-empty {
  padding: 26px 0;
  font-size: 14.5px;
  color: var(--ink-3);
}

/* ------------------------------------------------------------------ FAQ */

.faq details {
  border-top: 1px solid var(--line);
}

.faq details:last-child {
  border-bottom: 1px solid var(--line);
}

.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 0;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "";
  width: 8px;
  height: 8px;
  flex: none;
  border-right: 1.8px solid var(--ink-3);
  border-bottom: 1.8px solid var(--ink-3);
  transform: rotate(45deg) translate(-2px, -2px);
  transition: transform 0.2s var(--ease);
}

.faq details[open] summary::after {
  transform: rotate(-135deg) translate(-2px, -2px);
}

.faq details > p {
  max-width: 68ch;
  padding-bottom: 20px;
  font-size: 14.8px;
  line-height: 1.8;
  color: var(--ink-2);
}

/* ------------------------------------------------------------------ 下载 */

.dl {
  display: grid;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  overflow: hidden;
}

@media (min-width: 900px) {
  .dl {
    grid-template-columns: 1.12fr 0.88fr;
  }
}

.dl-main {
  padding: 24px 20px;
}

@media (min-width: 900px) {
  .dl-main {
    padding: 34px 32px;
  }
}

.dl-top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}

.tag {
  padding: 5px 8px;
  border-radius: 6px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.dl-ver {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--ink-3);
}

.dl-hint {
  margin: 18px 0 0;
  font-size: 13px;
  line-height: 1.7;
  color: var(--ink-3);
}

.changes {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.changes h3 {
  margin: 0 0 10px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.changes ul {
  margin: 0;
  padding-left: 18px;
  font-size: 14px;
  line-height: 1.85;
  color: var(--ink-2);
}

.dl-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 16px;
  margin: 0;
  padding: 20px;
  background: var(--surface-2);
  border-top: 1px solid var(--line);
}

@media (min-width: 900px) {
  .dl-meta {
    grid-template-columns: minmax(0, 1fr);
    padding: 30px 28px;
    border-top: 0;
    border-left: 1px solid var(--line);
  }
}

.dl-meta > div {
  padding: 11px 0;
  border-top: 1px solid var(--line);
}

.dl-meta > div.wide {
  grid-column: 1 / -1;
}

@media (max-width: 899px) {
  .dl-meta > div:nth-child(-n + 2) {
    border-top: 0;
  }
}

@media (min-width: 900px) {
  .dl-meta > div:first-child {
    border-top: 0;
  }
}

.dl-meta dt {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.07em;
  color: var(--ink-3);
}

.dl-meta dd {
  margin: 3px 0 0;
  font-size: 14px;
  color: var(--ink);
}

.dl-meta dd.mono {
  font-family: var(--mono);
  font-size: 12.5px;
  word-break: break-all;
}

.dl-meta .wide dd {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.dl-meta .wide code {
  padding: 0;
  border: 0;
  background: transparent;
  font-size: 12px;
  color: var(--ink-2);
  word-break: break-all;
  cursor: pointer;
}

.notes {
  display: grid;
  gap: 14px;
  margin-top: 20px;
}

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

.note {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
}

.note h4 {
  margin: 0 0 10px;
  font-size: 14.5px;
}

.note ul {
  margin: 0;
  padding-left: 17px;
  font-size: 13.8px;
  line-height: 1.78;
  color: var(--ink-2);
}

.note li + li {
  margin-top: 6px;
}

.note-warn {
  background: var(--warn-soft);
  border-color: transparent;
}

.note-warn h4 {
  color: var(--warn);
}

/* ------------------------------------------------------------------ 页脚 */

.foot {
  padding-block: 40px 34px;
  background: var(--bg-soft);
  border-top: 1px solid var(--line);
}

.foot-top {
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}

@media (min-width: 768px) {
  .foot-top {
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
    gap: 40px;
  }
}

.foot-brand {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.foot-brand b {
  font-size: 14.5px;
}

.foot-brand p {
  margin: 3px 0 0;
  font-size: 12.5px;
  color: var(--ink-3);
}

.foot-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
}

.foot-links a {
  color: var(--ink-2);
  font-size: 13.5px;
  text-decoration: none;
}

.foot-links a:hover {
  color: var(--ink);
}

.foot-legal {
  margin-top: 20px;
  font-size: 12px;
  line-height: 1.75;
  color: var(--ink-3);
}

.foot-legal p + p {
  margin-top: 6px;
}

/* ------------------------------------------------------- 移动端常驻下载条 */

.mobar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  background: var(--nav-bg);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-top: 1px solid var(--line);
  transform: translateY(115%);
  transition: transform 0.24s var(--ease);
}

.mobar.show {
  transform: none;
}

@media (min-width: 760px) {
  .mobar {
    display: none;
  }
}

.mobar-tx {
  flex: 1;
  min-width: 0;
}

.mobar-tx b {
  display: block;
  font-size: 13.5px;
}

.mobar-tx span {
  display: block;
  overflow: hidden;
  font-size: 11.5px;
  color: var(--ink-3);
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ------------------------------------------------------------ 滚动出现 */

/* 只在 JS 可用时才隐藏（<html class="js"> 由 theme.js 加上）——
   脚本没加载出来时内容必须照常可见，这是底线。 */
.js .cell,
.js .group,
.js .steps li,
.js .note,
.js .dl {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
}

.js .cell.in,
.js .group.in,
.js .steps li.in,
.js .note.in,
.js .dl.in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}
