:root {
  color-scheme: light dark;

  --bg: #f6f6f3;
  --surface: #ffffff;
  --surface-2: #eeeeea;
  --ink: #141826;
  --ink-2: #3b4152;
  --muted: #596074;
  --line: #deded8;
  --accent: #3a4bd6;
  --tick: #0a716a;
  --focus: #3a4bd6;
  --kbd-bg: #ffffff;
  --kbd-line: #c9cad2;
  --kbd-shadow: #b7b9c4;
  --fig-bg: #e9ecf1;
  --fig-line: #dadde4;

  --stage: #11141e;
  --stage-ink: #f3f4f9;
  --stage-muted: #a9afc3;
  --stage-line: rgba(255, 255, 255, 0.1);
  --orange: #ff8d2c;
  --orange-hover: #ffa255;
  --on-orange: #1d1206;
  --teal: #4fd6c8;
  --indigo: #8f9bff;

  --d-desk: #dfe5ee;
  --d-menubar: #f7f8fa;
  --d-window: #ffffff;
  --d-chrome: #ececf0;
  --d-panel: #fbfbfc;
  --d-field: #ffffff;
  --d-card: #ffffff;
  --d-accent: #007aff;
  --d-on-accent: #ffffff;
  --d-accent-soft: rgba(0, 122, 255, 0.14);
  --d-mark: #ff9500;
  --d-text: #1d1d1f;
  --d-muted: #8a8a8f;
  --d-line: #c7c7cc;
  --d-red: #ff5f57;
  --d-yellow: #febc2e;
  --d-green: #28c840;

  --radius: 20px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang TC", "Helvetica Neue", sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d1018;
    --surface: #161a25;
    --surface-2: #1b2030;
    --ink: #eef0f6;
    --ink-2: #c3c8d6;
    --muted: #9ba2b6;
    --line: #272d3d;
    --accent: #9aa6ff;
    --tick: #4fd6c8;
    --focus: #9aa6ff;
    --kbd-bg: #232837;
    --kbd-line: #3a4154;
    --kbd-shadow: #0a0c12;
    --fig-bg: #1a1f2c;
    --fig-line: #2a3042;

    --stage: #11141e;

    --d-desk: #2f3540;
    --d-menubar: #3a3a3f;
    --d-window: #323236;
    --d-chrome: #3d3d42;
    --d-panel: #38383d;
    --d-field: #2a2a2e;
    --d-card: #3a3a3f;
    --d-accent: #0a84ff;
    --d-accent-soft: rgba(10, 132, 255, 0.22);
    --d-mark: #ff9f0a;
    --d-text: #f2f2f4;
    --d-muted: #98989d;
    --d-line: #55555b;
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 16px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.7 var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }

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

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 6px;
}

h1, h2, h3, h4 { margin: 0; line-height: 1.25; font-weight: 600; letter-spacing: -0.01em; }

h1, h2 { text-wrap: balance; }

p { margin: 0; }

code {
  font-family: var(--mono);
  font-size: 0.86em;
  padding: 0.08em 0.38em;
  border-radius: 5px;
  background: var(--surface-2);
  overflow-wrap: anywhere;
}

kbd {
  display: inline-block;
  min-width: 1.85em;
  margin: 0 0.08em;
  padding: 0.05em 0.42em;
  border: 1px solid var(--kbd-line);
  border-bottom-width: 2px;
  border-radius: 6px;
  background: var(--kbd-bg);
  box-shadow: 0 1px 0 var(--kbd-shadow);
  color: var(--ink);
  font: 600 0.8em/1.5 var(--font);
  text-align: center;
  white-space: nowrap;
}

.nowrap { white-space: nowrap; }

.wrap {
  width: 100%;
  max-width: 1160px;
  margin-inline: auto;
  padding-inline: max(16px, 4vw);
}

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

.skip {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 10;
  padding: 8px 14px;
  border-radius: 8px;
  background: var(--orange);
  color: var(--on-orange);
  font-weight: 600;
  text-decoration: none;
}

.skip:focus { top: 12px; }

.eyebrow {
  margin-bottom: 14px;
  color: var(--tick);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.14em;
}

/* ---------- 下載按鈕 ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 26px;
  border-radius: 999px;
  background: var(--orange);
  color: var(--on-orange);
  font-size: 1.06rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 10px 30px -10px rgba(255, 141, 44, 0.65);
  transition: background-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.btn:hover {
  background: var(--orange-hover);
  transform: translateY(-1px);
  box-shadow: 0 14px 34px -10px rgba(255, 141, 44, 0.75);
}

.btn:active { transform: translateY(0); }

.btn:focus-visible { outline-color: var(--stage-ink); border-radius: 999px; }

.btn-icon {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.btn-sm {
  padding: 8px 18px;
  font-size: 0.92rem;
  box-shadow: none;
}

.dl-meta, .req {
  font-size: 0.88rem;
  line-height: 1.55;
}

.dl-meta { font-variant-numeric: tabular-nums; }

/* ---------- 深色舞台（頁首、主視覺） ---------- */

.stage {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(60rem 36rem at 85% -10%, rgba(109, 125, 255, 0.28), transparent 60%),
    radial-gradient(48rem 30rem at -10% 90%, rgba(79, 214, 200, 0.18), transparent 60%),
    var(--stage);
  color: var(--stage-ink);
}

.stage :focus-visible, .ink :focus-visible { outline-color: var(--stage-ink); }

.stage .eyebrow, .ink .eyebrow { color: var(--teal); }

.stage kbd, .ink kbd {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.5);
  color: var(--stage-ink);
}

.stage code, .ink code {
  background: rgba(255, 255, 255, 0.09);
  color: var(--stage-ink);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 22px;
  padding-bottom: 22px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--stage-ink);
  font-size: 1.12rem;
  font-weight: 600;
  text-decoration: none;
}

.topnav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.topnav > ul {
  display: flex;
  gap: 26px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.topnav > ul a {
  color: var(--stage-muted);
  font-size: 0.95rem;
  text-decoration: none;
  transition: color 0.15s ease;
}

.topnav > ul a:hover { color: var(--stage-ink); }

@media (max-width: 600px) {
  .topnav > ul { display: none; }
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  align-items: center;
  gap: clamp(32px, 5vw, 72px);
  padding-top: clamp(24px, 6vw, 72px);
  padding-bottom: clamp(40px, 6vw, 80px);
}

.hero h1 {
  font-size: clamp(2.5rem, 6.2vw, 4.6rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
}

.grad {
  background: linear-gradient(100deg, var(--teal) 0%, #7fb4ff 50%, var(--indigo) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lede {
  max-width: 34em;
  margin-top: 24px;
  color: var(--stage-muted);
  font-size: clamp(1.02rem, 1.6vw, 1.16rem);
}

.cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 22px;
  margin-top: 36px;
}

.cta-meta { min-width: 0; }

.stage .dl-meta { color: var(--stage-ink); }
.stage .req, .ink .req { color: var(--stage-muted); }

.hero-art {
  margin: 0;
  min-width: 0;
  filter: drop-shadow(0 40px 60px rgba(0, 0, 0, 0.45));
}

.hero-art svg { width: 100%; height: auto; }

.hero-art text { font-family: var(--font); }

.h-bar { fill: rgba(255, 255, 255, 0.08); }
.h-ghost { fill: rgba(255, 255, 255, 0.28); }
.h-active { fill: rgba(255, 255, 255, 0.2); }
.h-glyph rect { fill: #f3f4f9; }
.h-glyph-stroke { fill: none; stroke: rgba(243, 244, 249, 0.85); stroke-width: 1.6; stroke-linecap: round; }
.h-clock { fill: #f3f4f9; font-size: 13px; font-weight: 500; }
.h-panel { fill: rgba(34, 38, 54, 0.94); stroke: rgba(255, 255, 255, 0.14); }
.h-sep { stroke: rgba(255, 255, 255, 0.1); }
.h-sel { fill: #3553e8; }
.h-item { fill: #eceef5; font-size: 13.5px; }
.h-item-on { fill: #ffffff; font-size: 13.5px; font-weight: 500; }
.h-key { fill: #9097ad; font-size: 12.5px; }
.h-key-on { fill: rgba(255, 255, 255, 0.85); font-size: 12.5px; }
.h-input { fill: #ffffff; font-size: 21px; font-weight: 300; }
.h-caret { fill: #7fb4ff; }
.h-app { fill: #2d3144; }
.h-app-mark { fill: #e8eaf2; }
.h-app-play { fill: #2d3144; }

/* ---------- 快捷鍵列 ---------- */

.keys {
  padding-top: 8px;
  padding-bottom: 56px;
}

.keys-title {
  margin-bottom: 18px;
  color: var(--stage-muted);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.04em;
}

.keys-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.keys-list li {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px 16px;
  border: 1px solid var(--stage-line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.035);
  font-size: 0.92rem;
  line-height: 1.4;
}

.combo { display: flex; flex-wrap: wrap; gap: 2px; }

.combo kbd { font-size: 0.86rem; }

/* ---------- 區段 ---------- */

.section {
  padding-top: clamp(72px, 10vw, 128px);
  padding-bottom: clamp(72px, 10vw, 128px);
}

.section-head {
  max-width: 40em;
  margin-bottom: clamp(40px, 6vw, 72px);
}

.section-head h2 {
  font-size: clamp(1.75rem, 4.4vw, 3.1rem);
  line-height: 1.18;
  letter-spacing: -0.02em;
}

.section-head > p:last-child {
  margin-top: 20px;
  color: var(--muted);
  font-size: 1.06rem;
}

/* ---------- 功能 ---------- */

.feature {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  align-items: center;
  gap: clamp(28px, 5vw, 72px);
  padding-block: clamp(28px, 4vw, 48px);
}

.feature + .feature { border-top: 1px solid var(--line); }

.feature.flip { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }

.feature.flip .feature-copy { order: 2; }

.feature-copy { min-width: 0; }

.feature h4 {
  margin-bottom: 14px;
  font-size: clamp(1.6rem, 2.8vw, 2.1rem);
}

.feature-copy > p:not(.shortcut) { color: var(--ink-2); }

.shortcut {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px;
  min-height: 32px;
  margin-bottom: 12px;
}

.shortcut kbd { font-size: 0.92rem; }

.unbound {
  padding: 3px 10px;
  border: 1px dashed var(--kbd-line);
  border-radius: 6px;
  color: var(--muted);
  font-size: 0.82rem;
}

.ticks {
  display: grid;
  gap: 8px;
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
  color: var(--ink-2);
  font-size: 0.96rem;
}

.ticks li {
  position: relative;
  padding-left: 26px;
}

.ticks li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.5em;
  width: 12px;
  height: 7px;
  border-left: 2px solid var(--tick);
  border-bottom: 2px solid var(--tick);
  transform: rotate(-45deg);
}

.fig {
  margin: 0;
  min-width: 0;
  padding: clamp(12px, 2.4vw, 28px);
  border: 1px solid var(--fig-line);
  border-radius: var(--radius);
  background:
    radial-gradient(120% 90% at 100% 0%, rgba(109, 125, 255, 0.1), transparent 55%),
    radial-gradient(90% 80% at 0% 100%, rgba(79, 214, 200, 0.1), transparent 55%),
    var(--fig-bg);
}

.fig svg { width: 100%; height: auto; }

.fig text { font-family: var(--font); }

/* 圖解沿用 App 內說明頁的 class，顏色跟著深淺色切換。 */
.d-desk { fill: var(--d-desk); }
.d-menubar { fill: var(--d-menubar); }
.d-window { fill: var(--d-window); stroke: var(--d-line); }
.d-chrome { fill: var(--d-chrome); }
.d-panel { fill: var(--d-panel); stroke: var(--d-line); }
.d-field { fill: var(--d-field); stroke: var(--d-line); }
.d-card { fill: var(--d-card); stroke: var(--d-line); }
.d-sel { fill: var(--d-accent); }
.d-soft { fill: var(--d-accent-soft); }
.d-line { fill: none; stroke: var(--d-line); stroke-width: 1.5; }
.d-glyph { fill: var(--d-text); }
.d-muted-fill { fill: var(--d-muted); }
.d-red { fill: var(--d-red); }
.d-yellow { fill: var(--d-yellow); }
.d-green { fill: var(--d-green); }
.d-focus { fill: none; stroke: var(--d-mark); stroke-width: 2; stroke-dasharray: 5 4; }
.d-arrow { fill: none; stroke: var(--d-mark); stroke-width: 2; stroke-linecap: round; }
.d-arrowhead { fill: var(--d-mark); }
.d-num { fill: var(--d-mark); }
.d-key { fill: var(--kbd-bg); stroke: var(--kbd-line); }
.d-text { fill: var(--d-text); font-size: 13px; }
.d-title { fill: var(--d-text); font-size: 15px; font-weight: 600; }
.d-big { fill: var(--d-text); font-size: 22px; font-weight: 300; }
.d-muted { fill: var(--d-muted); font-size: 11px; }
.d-label { fill: var(--d-muted); font-size: 12px; font-weight: 600; }
.d-on-accent { fill: var(--d-on-accent); font-size: 13px; }
.d-on-accent-muted { fill: var(--d-on-accent); opacity: 0.78; font-size: 11px; }
.d-num-text { fill: #ffffff; font-size: 12px; font-weight: 700; }
.d-key-text { fill: var(--d-text); font-size: 12px; }
.d-mark-text { fill: var(--d-mark); font-size: 12px; font-weight: 600; }
.s-fill-green { fill: var(--d-green); }
.s-fill-mark { fill: var(--d-mark); }
.s-fill-line { fill: var(--d-line); }

/* ---------- 深色區段（隱私、下載） ---------- */

.ink {
  background:
    radial-gradient(50rem 30rem at 100% 0%, rgba(109, 125, 255, 0.18), transparent 60%),
    radial-gradient(40rem 26rem at 0% 100%, rgba(79, 214, 200, 0.12), transparent 60%),
    var(--stage);
  color: var(--stage-ink);
}

@media (prefers-color-scheme: dark) {
  .ink { border-block: 1px solid var(--line); }
}

.ink a:not(.btn) { color: var(--teal); }

.ink .section-head > p:last-child { color: var(--stage-muted); }

.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: 1px;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--stage-line);
  border-radius: var(--radius);
  background: var(--stage-line);
  list-style: none;
}

.facts li {
  padding: 28px 26px;
  background: var(--stage);
}

.facts h3 {
  margin-bottom: 10px;
  font-size: 1.12rem;
}

.facts h3::before {
  content: "";
  display: block;
  width: 26px;
  height: 3px;
  margin-bottom: 18px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--teal), var(--indigo));
}

.facts p { color: var(--stage-muted); font-size: 0.95rem; line-height: 1.7; }

.more-link { margin-top: 32px; font-weight: 600; }

/* ---------- 安裝 ---------- */

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr));
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.steps li {
  padding: 26px 24px 28px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  counter-increment: step;
}

.steps li::before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  margin-bottom: 18px;
  border-radius: 50%;
  background: var(--orange);
  color: var(--on-orange);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.steps h3 { margin-bottom: 8px; font-size: 1.1rem; }

.steps p { color: var(--muted); font-size: 0.94rem; line-height: 1.65; }

.updates {
  display: flex;
  gap: 20px;
  margin-top: 24px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface-2);
}

.updates svg {
  flex: none;
  width: 30px;
  height: 30px;
  fill: none;
  stroke: var(--tick);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.updates h3 { margin-bottom: 6px; font-size: 1.1rem; }

.updates p { color: var(--ink-2); font-size: 0.96rem; }

/* ---------- 下載 ---------- */

.final {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  text-align: center;
}

.final-icon {
  width: 112px;
  height: 112px;
  filter: drop-shadow(0 18px 30px rgba(0, 0, 0, 0.5));
}

.final h2 {
  margin-bottom: 14px;
  font-size: clamp(1.75rem, 4.4vw, 3rem);
  letter-spacing: -0.02em;
}

.final .dl-meta { color: var(--stage-ink); }

.final-meta { display: grid; gap: 4px; }

.sha {
  width: 100%;
  max-width: 36rem;
  margin-top: 8px;
  color: var(--stage-muted);
  font-size: 0.86rem;
  text-align: left;
}

.sha summary {
  width: fit-content;
  margin-inline: auto;
  padding: 4px 8px;
  border-radius: 6px;
  cursor: pointer;
}

.sha summary:hover { color: var(--stage-ink); }

.sha[open] summary { margin-bottom: 12px; }

.sha p { margin-top: 8px; }

.sha pre {
  margin: 8px 0 0;
  padding: 12px 14px;
  overflow-x: auto;
  border: 1px solid var(--stage-line);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.25);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.sha pre code { padding: 0; background: none; }

.sha-value code {
  display: block;
  padding: 12px 14px;
  border-radius: 10px;
  word-break: break-all;
  font-size: 0.82rem;
  line-height: 1.6;
}

/* ---------- 頁尾 ---------- */

.footer {
  border-top: 1px solid var(--line);
  background: var(--bg);
  color: var(--muted);
  font-size: 0.88rem;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 28px;
  padding-top: 32px;
  padding-bottom: 40px;
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  font-weight: 600;
}

.footer ul {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer a { color: var(--ink-2); }

.footer-note { flex-basis: 100%; }

/* ---------- 文件頁（隱私權政策） ---------- */

.doc-top {
  overflow: visible;
  border-bottom: 1px solid var(--stage-line);
}

.doc {
  max-width: 780px;
  padding-top: clamp(48px, 7vw, 88px);
  padding-bottom: clamp(64px, 9vw, 112px);
}

.doc h1 {
  font-size: clamp(2.1rem, 5vw, 3rem);
  letter-spacing: -0.02em;
}

.doc .updated { margin-top: 12px; color: var(--muted); font-size: 0.9rem; }

.doc .summary {
  margin-top: 28px;
  padding: 22px 24px;
  border-left: 3px solid var(--tick);
  border-radius: 0 12px 12px 0;
  background: var(--surface-2);
  color: var(--ink-2);
}

.doc h2 {
  margin: 56px 0 16px;
  font-size: 1.5rem;
}

.doc h3 { margin: 28px 0 10px; font-size: 1.12rem; }

.doc p, .doc li { color: var(--ink-2); }

.doc p + p { margin-top: 14px; }

.doc ul, .doc ol { padding-left: 1.4em; }

.doc li + li { margin-top: 8px; }

.table-scroll {
  max-width: 100%;
  overflow-x: auto;
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.doc table {
  width: 100%;
  min-width: 520px;
  border-collapse: collapse;
  font-size: 0.92rem;
  line-height: 1.6;
}

.doc th, .doc td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.doc tr:last-child td { border-bottom: 0; }

.doc th {
  background: var(--surface-2);
  color: var(--ink);
  font-weight: 600;
}

.doc td:first-child { color: var(--ink); font-weight: 600; white-space: nowrap; }

/* ---------- 404 ---------- */

.lost {
  min-height: 100vh;
  display: grid;
  place-items: center;
  text-align: center;
}

.lost-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  padding-block: 64px;
}

.lost .code {
  color: var(--teal);
  font-family: var(--mono);
  font-size: 0.95rem;
  letter-spacing: 0.2em;
}

.lost h1 { font-size: clamp(2rem, 6vw, 3rem); letter-spacing: -0.02em; }

.lost p { color: var(--stage-muted); }

.lost .links { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 16px 24px; margin-top: 12px; }

.lost .links a:not(.btn) { color: var(--teal); }

/* ---------- 共用小元件 ---------- */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.ficon {
  flex: none;
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background:
    linear-gradient(135deg, rgba(79, 214, 200, 0.16), rgba(109, 125, 255, 0.16)),
    var(--surface);
}

.ficon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: var(--tick);
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.stage .ficon, .ink .ficon {
  border-color: var(--stage-line);
  background: linear-gradient(135deg, rgba(79, 214, 200, 0.2), rgba(109, 125, 255, 0.22));
}

.stage .ficon svg, .ink .ficon svg { stroke: var(--teal); }

.stage .unbound {
  border-color: rgba(255, 255, 255, 0.28);
  color: var(--stage-muted);
}

/* ---------- 頁首的「功能」選單 ---------- */

.topbar { position: relative; z-index: 5; }

.navmenu summary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 2px;
  color: var(--stage-muted);
  font-size: 0.95rem;
  list-style: none;
  cursor: pointer;
  transition: color 0.15s ease;
}

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

.navmenu summary:hover, .navmenu[open] summary { color: var(--stage-ink); }

.navmenu summary svg {
  width: 12px;
  height: 12px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.15s ease;
}

.navmenu[open] summary svg { transform: rotate(180deg); }

.navmenu-panel {
  position: absolute;
  top: calc(100% - 10px);
  right: max(16px, 4vw);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 24px;
  width: min(620px, calc(100vw - 32px));
  max-height: calc(100vh - 96px);
  overflow-y: auto;
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 18px;
  background: rgba(24, 28, 42, 0.98);
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.7);
}

@media (min-width: 1300px) {
  .navmenu-panel { right: 40px; }
}

.navmenu-group p {
  margin-bottom: 8px;
  color: var(--teal);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
}

.navmenu-group ul {
  display: grid;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.navmenu-group a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px;
  border-radius: 9px;
  color: var(--stage-ink);
  font-size: 0.94rem;
  line-height: 1.35;
  text-decoration: none;
}

.navmenu-group a:hover { background: rgba(255, 255, 255, 0.07); }

.navmenu-group a[aria-current="page"] { background: rgba(143, 155, 255, 0.18); }

.navmenu-group .ficon { width: 30px; height: 30px; border-radius: 8px; }

.navmenu-group .ficon svg { width: 17px; height: 17px; }

.navmenu-all {
  grid-column: 1 / -1;
  justify-self: start;
  padding-top: 14px;
  color: var(--teal);
  font-size: 0.92rem;
  font-weight: 600;
  text-decoration: none;
}

.navmenu-all:hover { text-decoration: underline; }

@media (max-width: 600px) {
  .navmenu-panel { grid-template-columns: minmax(0, 1fr); padding: 18px; }
}

/* ---------- 首頁功能：索引與分組 ---------- */

.findex { margin-bottom: clamp(40px, 6vw, 64px); }

.findex ul {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.findex a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px 6px 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font-size: 0.93rem;
  line-height: 1.3;
  text-decoration: none;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.findex a:hover { border-color: var(--accent); transform: translateY(-1px); }

.findex .ficon { width: 28px; height: 28px; border-radius: 999px; }

.findex .ficon svg { width: 16px; height: 16px; }

.fgroup + .fgroup { margin-top: clamp(56px, 8vw, 104px); }

.fgroup-head {
  display: flex;
  align-items: center;
  gap: clamp(16px, 3vw, 32px);
  padding: clamp(20px, 3vw, 30px) clamp(20px, 3.4vw, 36px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    radial-gradient(80% 140% at 100% 0%, rgba(109, 125, 255, 0.12), transparent 60%),
    radial-gradient(60% 120% at 0% 100%, rgba(79, 214, 200, 0.12), transparent 60%),
    var(--surface);
}

.fgroup-num {
  flex: none;
  background: linear-gradient(135deg, var(--tick), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-size: clamp(2.6rem, 6vw, 4rem);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  letter-spacing: -0.03em;
}

.fgroup-head h3 { font-size: clamp(1.35rem, 2.6vw, 1.8rem); }

.fgroup-head p:not(.fgroup-num) { margin-top: 6px; color: var(--muted); }

.fgroup-head + .feature { margin-top: clamp(8px, 2vw, 24px); }

.feature-top {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}

.feature-top .shortcut { margin-bottom: 0; }

.feature-more { margin-top: 24px; }

.feature-more a {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-weight: 600;
  text-decoration: none;
}

.feature-more a:hover { text-decoration: underline; }

.feature-more a span[aria-hidden] { display: inline-block; transition: transform 0.15s ease; }

.feature-more a:hover span[aria-hidden] { transform: translateX(3px); }

/* ---------- 功能頁：主視覺 ---------- */

.fhero {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  align-items: center;
  gap: clamp(32px, 5vw, 64px);
  padding-top: clamp(16px, 4vw, 48px);
  padding-bottom: clamp(48px, 7vw, 88px);
}

.crumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 0;
  margin: 0 0 28px;
  padding: 0;
  list-style: none;
  color: var(--stage-muted);
  font-size: 0.86rem;
}

.crumbs li + li::before {
  content: "›";
  margin: 0 10px;
  opacity: 0.6;
}

.crumbs a { color: var(--stage-muted); }

.crumbs a:hover { color: var(--stage-ink); }

.crumbs [aria-current] { color: var(--stage-ink); }

.fhero-id {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}

.fhero-id .eyebrow { margin: 0; }

.ficon-lg { width: 52px; height: 52px; border-radius: 14px; }

.ficon-lg svg { width: 28px; height: 28px; }

.fhero h1 {
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.fhero .lede {
  margin-top: 18px;
  color: var(--stage-ink);
  font-size: clamp(1.1rem, 1.9vw, 1.3rem);
  line-height: 1.55;
}


.fhero .shortcut { margin: 22px 0 0; }

.fhero .cta { margin-top: 30px; }

.ghost {
  padding: 10px 4px;
  color: var(--stage-ink);
  font-weight: 600;
  text-decoration: none;
}

.ghost:hover { text-decoration: underline; }

.stage a.ghost { color: var(--stage-ink); }

.fhero-fig { box-shadow: 0 40px 70px -30px rgba(0, 0, 0, 0.6); }

/* ---------- 功能頁：內文 ---------- */

.fdoc {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: clamp(32px, 5vw, 72px);
  padding-top: clamp(56px, 8vw, 96px);
  padding-bottom: clamp(48px, 7vw, 80px);
}

.ftoc {
  position: sticky;
  top: 24px;
  align-self: start;
}

.ftoc p {
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
}

.ftoc ol {
  margin: 0;
  padding: 0;
  list-style: none;
  border-left: 1px solid var(--line);
}

.ftoc a {
  display: block;
  margin-left: -1px;
  padding: 6px 0 6px 16px;
  border-left: 2px solid transparent;
  color: var(--ink-2);
  font-size: 0.94rem;
  text-decoration: none;
}

.ftoc a:hover { border-left-color: var(--accent); color: var(--ink); }

.fdoc-body { max-width: 780px; min-width: 0; }

.fsec { scroll-margin-top: 16px; }

.fsec + .fsec {
  margin-top: clamp(56px, 7vw, 88px);
  padding-top: clamp(40px, 5vw, 56px);
  border-top: 1px solid var(--line);
}

.fsec h2 {
  margin-bottom: 22px;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  letter-spacing: -0.015em;
}

.fsec h2::before {
  content: "";
  display: block;
  width: 30px;
  height: 3px;
  margin-bottom: 18px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--tick), var(--accent));
}

.fsec h3 { margin: 40px 0 12px; font-size: 1.2rem; }

.fsec h2 + h3 { margin-top: 0; }

.fsec .intro {
  margin-bottom: 8px;
  color: var(--ink);
  font-size: 1.1rem;
  line-height: 1.75;
}

.fsec .intro + h3 { margin-top: 32px; }

.fsec p, .fsec li, .fsec dd { color: var(--ink-2); }

.fsec p + p, .fsec ul + p, .fsec p + ul { margin-top: 14px; }

.fsec ul:not(.ticks) { margin: 14px 0 0; padding-left: 1.3em; }

.fsec ul:not(.ticks) li + li { margin-top: 8px; }

.fsec strong { color: var(--ink); font-weight: 600; }

.fsec .ticks { margin-top: 0; font-size: 1rem; gap: 12px; }

.shot { margin: 28px 0; }

.shot figcaption {
  margin-top: 14px;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.6;
  text-align: center;
}

.fsec .table-scroll { margin-top: 0; }

.fsec h3 + .table-scroll { margin-top: 4px; }

.ktable {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.94rem;
  line-height: 1.6;
}

.ktable th, .ktable td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.ktable th {
  background: var(--surface-2);
  color: var(--ink);
  font-weight: 600;
}

.ktable tr:last-child td { border-bottom: 0; }

.ktable td { color: var(--ink-2); }

.ktable td:first-child { color: var(--ink); }

.combo-cell { white-space: nowrap; }

.combo-cell kbd { font-size: 0.86rem; }

.note {
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.9rem;
}

.fsec .note { color: var(--muted); }

.opts { margin: 0; }

.opts > div {
  display: grid;
  grid-template-columns: minmax(8em, 13em) minmax(0, 1fr);
  gap: 4px 24px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.opts > div:first-child { padding-top: 4px; }

.opts dt { color: var(--ink); font-weight: 600; }

.opts dd { margin: 0; }

.howto {
  display: grid;
  gap: 18px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: howto;
}

.howto li {
  position: relative;
  min-height: 34px;
  padding: 4px 0 0 52px;
  counter-increment: howto;
}

.howto li::before {
  content: counter(howto);
  position: absolute;
  left: 0;
  top: 0;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--orange);
  color: var(--on-orange);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.pager {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  padding-bottom: clamp(56px, 8vw, 96px);
}

.pager a {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px 24px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  color: var(--ink);
  text-decoration: none;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.pager a:hover { border-color: var(--accent); transform: translateY(-2px); }

.pager-next { align-items: flex-end; text-align: right; }

.pager-label { color: var(--muted); font-size: 0.86rem; }

.pager-name {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 1.12rem;
  font-weight: 600;
  line-height: 1.35;
}

.final-links { font-size: 0.92rem; }

.final-links span { margin: 0 8px; color: var(--stage-muted); }

@media (max-width: 960px) {
  .fdoc { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .ftoc { position: static; }
  .ftoc ol { display: flex; flex-wrap: wrap; gap: 8px; border-left: 0; }
  .ftoc a {
    margin: 0;
    padding: 6px 14px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface);
    font-size: 0.9rem;
  }
  .ftoc a:hover { border-color: var(--accent); }
}

@media (max-width: 880px) {
  .fhero { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 600px) {
  .opts > div { grid-template-columns: minmax(0, 1fr); }
  .pager { grid-template-columns: minmax(0, 1fr); }
  .pager-next { align-items: flex-start; text-align: left; }
  .fgroup-head { align-items: flex-start; }
}

/* ---------- 動態 ---------- */

@media (prefers-reduced-motion: no-preference) {
  .hero-copy > * { animation: rise 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
  .hero-copy > :nth-child(2) { animation-delay: 0.06s; }
  .hero-copy > :nth-child(3) { animation-delay: 0.12s; }
  .hero-copy > :nth-child(4) { animation-delay: 0.18s; }

  .h-menu { animation: drop 0.55s 0.25s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
  .h-sub { animation: slide 0.45s 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
  .h-search { animation: rise 0.6s 0.85s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
  .h-caret { animation: blink 1.1s 1.5s steps(1) infinite; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .findex a, .pager a, .feature-more a span, .navmenu summary svg { transition: none; }
  .btn:hover, .findex a:hover, .pager a:hover, .feature-more a:hover span { transform: none; }
}

@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

@keyframes drop {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: none; }
}

@keyframes slide {
  from { opacity: 0; transform: translateX(10px); }
  to { opacity: 1; transform: none; }
}

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

/* ---------- 窄螢幕 ---------- */

@media (max-width: 880px) {
  .hero { grid-template-columns: minmax(0, 1fr); }
  .feature, .feature.flip { grid-template-columns: minmax(0, 1fr); }
  .feature.flip .feature-copy { order: 0; }
}

@media (max-width: 420px) {
  body { font-size: 16px; }
  .btn { padding: 13px 22px; }
  .keys-list li { padding: 12px; }
  .updates { flex-direction: column; gap: 12px; }
}

@media (max-width: 600px) {
  .table-scroll { overflow: visible; }
  .doc table { min-width: 0; }
  .doc thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }
  .doc tr {
    display: block;
    padding: 14px 16px;
    border-bottom: 1px solid var(--line);
  }
  .doc tr:last-child { border-bottom: 0; }
  .doc td {
    display: block;
    padding: 0;
    border: 0;
  }
  .doc td:first-child { white-space: normal; }
  .doc td + td { margin-top: 6px; }
}
