/* ===========================================================================
   RosRunner 官方網站 — 設計系統
   ---------------------------------------------------------------------------
   色票刻意沿用產品本身的 RunnerPalette.Light.xaml（accent #0F6CBD、語意色
   與 success／warning／danger 同值），讓網站與軟體看起來是同一個東西。
   明亮、專業、以產品畫面與資訊階層為主；不使用滿版終端機、霓虹或漸層堆疊。
   =========================================================================== */

:root {
  /* ── 色彩 ── */
  --bg: #f7f8fa;
  --surface: #ffffff;
  --surface-soft: #f2f4f7;
  --line: #e2e5ea;
  --line-strong: #c9cdd3;

  --ink: #1b1f24;
  --ink-2: #5c6470;
  /* --ink-3 是最淡的一級文字色。值被調深過：原本的 #79818c 在白底只有 3.93:1、
     在 --surface-soft 上只有 3.57:1，兩者都低於 WCAG 2.2 AA 對一般文字的 4.5:1
     （2026-09-21 Lighthouse 抓到）。#676e7a 在白底 5.0:1、在 #f2f4f7 上 4.6:1。 */
  --ink-3: #676e7a;

  --accent: #0f6cbd;
  --accent-hover: #115ea3;
  --accent-press: #0c4a85;
  --accent-soft: #e6f0fa;

  --success: #1b6e3a;
  --success-soft: #e1f5e6;
  --warning: #7a5a00;
  --warning-soft: #fff4cc;
  --warning-line: #f0db8a;
  --danger: #b42318;
  --danger-soft: #fde7e7;
  --danger-line: #f1b3ae;

  /* ── 字體 ── */
  /* 系統字型優先：中日文字型檔案很大，預載三套完整字型會直接吃掉
     首屏預算（需求 §23.1）。這裡只指名系統上已有的字族。 */
  --font-sans: system-ui, -apple-system, "Segoe UI", "Noto Sans",
    "Microsoft JhengHei UI", "Microsoft JhengHei", "PingFang TC",
    "Hiragino Kaku Gothic ProN", "Yu Gothic UI", "Meiryo", sans-serif;
  --font-mono: "Cascadia Mono", "Consolas", "SFMono-Regular", "Menlo",
    "DejaVu Sans Mono", monospace;

  /* ── 尺寸 ── */
  --container: 1120px;
  --container-wide: 1280px;
  --gutter: 16px;
  --radius: 10px;
  --radius-sm: 8px;
  --radius-lg: 14px;

  --shadow-sm: 0 1px 2px rgba(27, 31, 36, .06), 0 1px 3px rgba(27, 31, 36, .05);
  --shadow-md: 0 4px 12px rgba(27, 31, 36, .08), 0 1px 3px rgba(27, 31, 36, .05);
  --shadow-lg: 0 12px 32px rgba(27, 31, 36, .10), 0 2px 8px rgba(27, 31, 36, .06);
}

@media (min-width: 720px) {
  :root { --gutter: 24px; }
}

/* ── 基礎 ─────────────────────────────────────────────────────────────── */

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

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

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

h1, h2, h3, h4 {
  margin: 0 0 .5em;
  line-height: 1.25;
  letter-spacing: -.01em;
  font-weight: 650;
  text-wrap: balance;
}

h1 { font-size: clamp(1.85rem, 1.3rem + 2.2vw, 2.75rem); }
h2 { font-size: clamp(1.4rem, 1.15rem + 1.1vw, 1.9rem); }
h3 { font-size: 1.15rem; }

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

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

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: .7em 1.1em;
  background: var(--surface);
  border: 1px solid var(--accent);
  border-radius: 0 0 var(--radius-sm) 0;
  font-weight: 600;
}
.skip-link:focus { left: 0; }

/* 只給輔助技術讀的文字。用途例：語言切換按鈕上看不見的「Language」，
   讓可及名稱同時包含用途與目前語言，而不必靠 aria-label 蓋掉可見文字。 */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* ── 按鈕 ─────────────────────────────────────────────────────────────── */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5em;
  padding: .72em 1.25em;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font: inherit;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}

.button--primary { background: var(--accent); color: #fff; }
.button--primary:hover { background: var(--accent-hover); color: #fff; }
.button--primary:active { background: var(--accent-press); }

.button--ghost {
  background: var(--surface);
  color: var(--accent);
  border-color: var(--line-strong);
}
.button--ghost:hover { border-color: var(--accent); background: var(--accent-soft); }

.button--compact { padding: .55em 1em; font-size: .94rem; }

.text-link { font-weight: 600; }

/* ── 頁首 ─────────────────────────────────────────────────────────────── */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--line);
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 62px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: -.015em;
  flex: 0 0 auto;
}
.brand:hover { color: var(--ink); }
.brand__mark { width: 30px; height: 30px; }
.brand--compact .brand__mark { width: 26px; height: 26px; }

.nav-toggle {
  margin-left: auto;
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 42px;
  height: 38px;
  padding: 0 9px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.nav-toggle__bar { display: block; height: 2px; background: var(--ink); border-radius: 2px; }

.site-nav {
  display: none;
  flex-direction: column;
  gap: .25rem;
  width: 100%;
  padding-bottom: 1rem;
}
.site-nav.is-open { display: flex; }

.site-nav__list {
  list-style: none;
  margin: 0;
  padding: .5rem 0 0;
  display: flex;
  flex-direction: column;
  gap: .1rem;
}

.site-nav__list a {
  display: block;
  padding: .6em .25em;
  color: var(--ink);
  text-decoration: none;
  font-weight: 550;
  border-bottom: 1px solid var(--line);
}
.site-nav__list a:hover { color: var(--accent); }
.site-nav__list a[aria-current] { color: var(--accent); }

.site-nav__actions {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding-top: .85rem;
  flex-wrap: wrap;
}

@media (min-width: 920px) {
  .nav-toggle { display: none; }
  .site-nav {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 1.5rem;
    width: auto;
    margin-left: auto;
    padding-bottom: 0;
  }
  .site-nav__list { flex-direction: row; gap: 1.35rem; padding: 0; }
  .site-nav__list a { padding: .2em 0; border-bottom: 2px solid transparent; }
  .site-nav__list a[aria-current] { border-bottom-color: var(--accent); }
  .site-nav__actions { padding-top: 0; }
}

/* 語言選單 */
.lang { position: relative; }
.lang__button {
  display: inline-flex;
  align-items: center;
  gap: .4em;
  padding: .5em .75em;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  font: inherit;
  font-size: .92rem;
  font-weight: 550;
  color: var(--ink);
  cursor: pointer;
}
.lang__button:hover { border-color: var(--accent); }
.lang__icon { width: 17px; height: 17px; flex: 0 0 auto; }

.lang__menu {
  list-style: none;
  margin: .35rem 0 0;
  padding: .3rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  min-width: 170px;
}
.lang__menu[hidden] { display: none; }
.lang__menu a {
  display: block;
  padding: .5em .7em;
  border-radius: 6px;
  color: var(--ink);
  text-decoration: none;
}
.lang__menu a:hover { background: var(--accent-soft); color: var(--accent-hover); }
.lang__menu a[aria-current] { font-weight: 650; color: var(--accent); }

@media (min-width: 920px) {
  .lang__menu { position: absolute; right: 0; top: 100%; z-index: 60; }
}

/* ── 麵包屑 ───────────────────────────────────────────────────────────── */

.breadcrumb { border-bottom: 1px solid var(--line); background: var(--surface); }
.breadcrumb ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  margin: 0;
  padding-block: .7rem;
  font-size: .88rem;
  color: var(--ink-2);
}
.breadcrumb li + li::before { content: "/"; margin-right: .4rem; color: var(--ink-3); }
.breadcrumb a { color: var(--ink-2); text-decoration: none; }
.breadcrumb a:hover { color: var(--accent); text-decoration: underline; }

/* ── 區段 ─────────────────────────────────────────────────────────────── */

.section { padding-block: clamp(2.5rem, 1.5rem + 3vw, 4.5rem); }
.section--tight { padding-block: 1.5rem; }
.section--muted { background: var(--surface); border-block: 1px solid var(--line); }
.section__lead {
  font-size: 1.08rem;
  color: var(--ink-2);
  max-width: 68ch;
  margin-bottom: 1.5rem;
}
.section__note { font-size: .92rem; color: var(--ink-2); margin-top: 1rem; }

.prose { max-width: 72ch; }
/* 左邊還要讓出縮圖欄時才用：單純的單欄文字不該放這麼寬。 */
.prose--wide { max-width: 58rem; }
.prose h2 { margin-top: 2rem; }
.prose > h2:first-child { margin-top: 0; }
.prose h3 { margin-top: 1.6rem; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin-bottom: .4em; }

/* ── Hero ─────────────────────────────────────────────────────────────── */

.hero {
  padding-block: clamp(2.25rem, 1.5rem + 3vw, 4rem);
  background: linear-gradient(180deg, var(--surface) 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--line);
}
.hero__inner { display: grid; gap: 2.25rem; }
.hero__eyebrow {
  display: inline-block;
  margin: 0 0 .85rem;
  padding: .3em .75em;
  background: var(--accent-soft);
  color: var(--accent-press);
  border-radius: 100px;
  font-size: .82rem;
  font-weight: 650;
  letter-spacing: .01em;
}
.hero__title { margin-bottom: .55rem; }
.hero__lead { font-size: 1.12rem; color: var(--ink-2); max-width: 60ch; }
.hero__actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.5rem; }
.hero__note { margin-top: 1.1rem; font-size: .9rem; color: var(--ink-2); max-width: 58ch; }

@media (min-width: 980px) {
  .hero__inner { grid-template-columns: minmax(0, 1fr) minmax(0, 1.12fr); align-items: center; gap: 3rem; }
}

/* ── 頁面標頭 ─────────────────────────────────────────────────────────── */

.page-header {
  padding-block: clamp(2rem, 1.4rem + 2.4vw, 3.25rem);
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.page-header__eyebrow {
  margin: 0 0 .5rem;
  color: var(--accent);
  font-weight: 650;
  font-size: .86rem;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.page-header__lead { font-size: 1.1rem; color: var(--ink-2); max-width: 70ch; }
.page-header__actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.4rem; }

/* ── 頁面插圖（裝飾性，不含文字） ─────────────────────────────────────── */
/* 刻意做得安靜：沒有外框、沒有陰影、寬度受限。它的工作是把長段落切開，
   不是搶走注意力。太顯眼的配圖會讓人以為那是產品畫面。 */

/* 上下都不自己加間距：插圖一定夾在兩個 .section 之間，
   而 .section 的 padding-block 已經有 2.5–4.5rem。自己再加一份就會空一大片。 */
.art {
  padding: 0;
}
.art img {
  display: block;
  width: 100%;
  max-width: 760px;
  height: auto;
  max-height: 150px;
  object-fit: contain;
  margin: 0 auto;
}
@media (min-width: 980px) {
  .art img { max-width: 860px; max-height: 180px; }
}

/* 文件頁：插圖已經在 article 裡，不需要再包一層 container。 */
.art--docs { padding: .25rem 0 1.5rem; }
.art--docs img { max-width: 100%; }

/* ── 產品畫面（實機擷圖，識別資訊已置換） ─────────────────────────────── */

.shot { margin: 0; }
.shot__frame {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.shot__chrome {
  display: flex;
  align-items: center;
  gap: .4rem;
  padding: .55rem .85rem;
  background: var(--surface-soft);
  border-bottom: 1px solid var(--line);
}
.shot__dot { width: 9px; height: 9px; border-radius: 50%; background: var(--line-strong); }
.shot__titlebar {
  margin-left: .5rem;
  font-size: .78rem;
  color: var(--ink-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.shot__frame img { width: 100%; }

/* 放大檢視的觸發區。整張圖就是連結，滑鼠游標與角落的提示塊負責告訴使用者
   「這裡可以點」——只靠 cursor 改變太隱晦，觸控裝置根本看不到。 */
.shot__link {
  display: block;
  position: relative;
  line-height: 0;
  cursor: zoom-in;
}
.shot__link img { display: block; }

.shot__zoom {
  position: absolute;
  right: .6rem;
  bottom: .6rem;
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .32rem .6rem;
  border-radius: 100px;
  background: rgba(255, 255, 255, .94);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  color: var(--ink-1);
  font-size: .78rem;
  font-weight: 600;
  line-height: 1.2;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity .15s ease, transform .15s ease;
}
.shot__link:hover .shot__zoom,
.shot__link:focus-visible .shot__zoom { opacity: 1; transform: none; }
.shot__link:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

/* 觸控裝置沒有 hover，提示塊直接常駐（縮成只剩圖示，不佔畫面）。 */
@media (hover: none) {
  .shot__zoom { opacity: 1; transform: none; padding: .35rem; }
  .shot__zoom-text { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .shot__zoom { transition: none; }
}

/* ── 放大檢視對話框 ───────────────────────────────────────────────── */

/* 對話框跟著圖片縮放，不固定大小：固定大小會讓小圖四周留一大片空白，
   而圖片一律縮到視窗內，所以任何方向都不會出現捲軸。 */
.lightbox {
  /* 圖片可用的空間 = 視窗 − 標題列 − stage 內距。用 vw/vh 直接算，
     不依賴 flex 容器解析百分比高度（height:auto 時百分比 max-height 不可靠）。 */
  --lightbox-bar: 56px;
  --lightbox-gap: 1.5rem;

  /* 必須是 fit-content，不能是 auto：modal <dialog> 的 UA 樣式是
     position: fixed 且 inset: 0，上下左右都有值時 auto 會撐滿整個視窗
     （再被 max-height 截住），結果小圖四周留一大片空白。 */
  width: fit-content;
  height: fit-content;
  max-width: 96vw;
  max-height: 94vh;
  padding: 0;
  border: 0;
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: 0 24px 70px rgba(16, 20, 28, .35);
  overflow: hidden;
}
.lightbox::backdrop { background: rgba(16, 20, 28, .72); }
.lightbox[open] { display: flex; flex-direction: column; }

.lightbox__bar {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .6rem .7rem .6rem 1rem;
  border-bottom: 1px solid var(--line);
  background: var(--surface-soft);
}
.lightbox__title {
  flex: 1 1 auto;
  min-width: 0;
  /* 對話框用 fit-content 量寬度，而 fit-content 看的是 max-content：
     不設上限的話，一行長圖說就會把對話框撐到整個視窗寬。
     設了上限，寬度就由圖片決定，圖說自己 ellipsis。 */
  max-width: 46ch;
  margin: 0;
  font-size: .88rem;
  color: var(--ink-2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.lightbox__close {
  flex: 0 0 auto;
  /* 把關閉鈕推到最右邊。不能靠標題 flex-grow 撐開——
     標題有 max-width（對話框用 fit-content 量寬度時需要），
     撐不滿時剩餘空間會留在關閉鈕右邊，關閉鈕就不在角落了。 */
  margin-inline-start: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  min-width: 34px;
  padding: 0 .55rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink-1);
  font: inherit;
  font-size: .82rem;
  font-weight: 600;
  cursor: pointer;
}
.lightbox__close:hover { border-color: var(--accent); color: var(--accent); }
.lightbox__close:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.lightbox__stage {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  background: var(--surface-soft);
  display: grid;
  place-items: center;
  padding: .75rem;
}
/* 整張圖一定縮到視窗內：不放大超過原尺寸，也絕不溢出成捲軸。
   width/height 留 auto，長寬比由瀏覽器維持。 */
.lightbox__stage img {
  display: block;
  width: auto;
  height: auto;
  max-width: calc(96vw - var(--lightbox-gap));
  max-height: calc(94vh - var(--lightbox-bar) - var(--lightbox-gap));
}

.shot__caption {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: .5rem;
  margin-top: .75rem;
  font-size: .85rem;
  color: var(--ink-2);
}
.shot__badge {
  flex: 0 0 auto;
  padding: .15em .55em;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 100px;
  font-size: .76rem;
  font-weight: 650;
  color: var(--ink-2);
}

/* ── 卡片 ─────────────────────────────────────────────────────────────── */

.card-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1rem;
}
@media (min-width: 640px) { .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 980px) {
  .card-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .card-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.35rem;
  box-shadow: var(--shadow-sm);
}
.card h3 { margin-bottom: .45rem; }
.card p { color: var(--ink-2); font-size: .97rem; }
.card--link { padding: 0; transition: border-color .15s ease, box-shadow .15s ease; }
.card--link > a {
  display: block;
  padding: 1.35rem;
  color: inherit;
  text-decoration: none;
  height: 100%;
}
.card--link:hover { border-color: var(--accent); box-shadow: var(--shadow-md); }
.card__link {
  display: inline-block;
  margin-top: .8rem;
  color: var(--accent);
  font-weight: 600;
  font-size: .94rem;
}
.card--link:hover .card__link { text-decoration: underline; }

/* ── 主題小節 ─────────────────────────────────────────────────────────── */
/* 卡片格的替代版面：不畫框、不切欄，靠左緣線與留白分段，讀起來像文章。 */

.topics { margin-top: 1.6rem; }

.topic {
  border-left: 3px solid var(--line);
  padding-left: 1.25rem;
  margin-bottom: 2.1rem;
}
.topic:last-child { margin-bottom: 0; }

.topic__title {
  margin: 0 0 .5rem;
  font-size: 1.16rem;
}
.topic p { color: var(--ink-2); max-width: 65ch; }
.topic p:last-of-type { margin-bottom: 0; }
.topic__more { margin-top: .7rem; margin-bottom: 0; font-size: .95rem; }

/* 帶縮圖的主題：小螢幕上下堆疊，夠寬時縮圖移到文字左邊。 */
.topic--with-thumb { display: grid; gap: 1rem; }
@media (min-width: 760px) {
  .topic--with-thumb {
    grid-template-columns: minmax(240px, .8fr) minmax(0, 1.4fr);
    gap: 2rem;
    /* 縮圖對著整段文字置中。靠上對齊會讓比較長的那幾段在縮圖下方留一塊空白，
       五個項目排下來每一個的留白高度都不一樣，看起來就散掉了。 */
    align-items: center;
  }
}

.topic__thumb {
  display: block;
  /* 寬度寫死成填滿欄位，不要靠 auto：圖片還沒載入時容器沒有內在尺寸，
     img 的 width:100% 會解成 0，縮圖高度跟著塌掉，載入後才撐開就是版面位移。 */
  width: 100%;
  max-width: 400px;
  /* 堆疊時（窄螢幕）欄寬大於縮圖上限，置中才不會偏在左邊。 */
  margin-inline: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  line-height: 0;
  cursor: zoom-in;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.topic__thumb img { display: block; width: 100%; height: auto; }
.topic__thumb:hover { border-color: var(--accent); box-shadow: var(--shadow-md); }
.topic__thumb:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) {
  .topic__thumb { transition: none; }
}

.topics__note {
  margin-top: 1.75rem;
  padding-top: .9rem;
  border-top: 1px solid var(--line);
  font-size: .85rem;
  color: var(--ink-3);
}

/* ── 功能列 ───────────────────────────────────────────────────────────── */

.feature-row__inner { display: grid; gap: 2rem; align-items: center; }
@media (min-width: 980px) {
  .feature-row__inner { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 3rem; }
  .feature-row--reversed .feature-row__copy { order: 2; }
}

.tick-list { list-style: none; margin: 0 0 1.25rem; padding: 0; }
.tick-list li {
  position: relative;
  padding-left: 1.6em;
  margin-bottom: .6em;
  color: var(--ink-2);
}
.tick-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .55em;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--accent);
}

/* ── 步驟 ─────────────────────────────────────────────────────────────── */

.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.25rem; }
@media (min-width: 900px) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem 2.5rem; } }
.step { display: flex; gap: 1rem; }
.step__number {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-press);
  font-weight: 700;
  font-size: .95rem;
}
.step__body h3 { margin-bottom: .3rem; font-size: 1.05rem; }
.step__body p { color: var(--ink-2); font-size: .97rem; }

/* ── 表格 ─────────────────────────────────────────────────────────────── */

.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
table { border-collapse: collapse; width: 100%; font-size: .95rem; }
thead th {
  text-align: left;
  background: var(--surface-soft);
  border-bottom: 1px solid var(--line);
  padding: .75rem .9rem;
  font-weight: 650;
  white-space: nowrap;
}
tbody th, tbody td {
  padding: .75rem .9rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  text-align: left;
}
tbody th { font-weight: 600; }
tbody tr:last-child th, tbody tr:last-child td { border-bottom: 0; }

/* ── Callout ──────────────────────────────────────────────────────────── */

.callout {
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius-sm);
  background: var(--surface);
  padding: 1rem 1.15rem;
  margin: 1.5rem 0;
}
.callout__title { margin: 0 0 .35rem; font-weight: 650; font-size: .95rem; }
.callout__body p { font-size: .96rem; color: var(--ink-2); }
.callout--limit { border-left-color: var(--warning); background: var(--warning-soft); }
.callout--limit .callout__title { color: var(--warning); }
.callout--warning { border-left-color: var(--danger); background: var(--danger-soft); }
.callout--warning .callout__title { color: var(--danger); }
.callout--readOnly, .callout--read-only { border-left-color: var(--success); background: var(--success-soft); }
.callout--readOnly .callout__title, .callout--read-only .callout__title { color: var(--success); }

/* ── 狀態面板（下載／版本／法律待確認） ───────────────────────────────── */

.status-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 1rem + 2vw, 2.5rem);
  box-shadow: var(--shadow-sm);
  max-width: 78ch;
}
.status-panel__badge {
  display: inline-block;
  margin: 0 0 .9rem;
  padding: .3em .8em;
  background: var(--warning-soft);
  border: 1px solid var(--warning-line);
  border-radius: 100px;
  color: var(--warning);
  font-size: .84rem;
  font-weight: 650;
}
.status-panel__body p { color: var(--ink-2); }
.status-panel__next {
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 1.25rem 0 0;
  border-top: 1px solid var(--line);
  display: grid;
  gap: .9rem;
}
.status-panel__next li { display: flex; flex-direction: column; gap: .15rem; }
.status-panel__next a { font-weight: 650; }
.status-panel__next span { font-size: .93rem; color: var(--ink-2); }

/* ── FAQ ──────────────────────────────────────────────────────────────── */

.faq-item { padding-block: 1.4rem; border-bottom: 1px solid var(--line); }
.faq-item:last-child { border-bottom: 0; }
.faq-item h3 { margin-bottom: .5rem; }
.faq-item p { color: var(--ink-2); }

.heading-anchor {
  margin-left: .4em;
  opacity: 0;
  text-decoration: none;
  color: var(--ink-3);
  font-weight: 400;
}
h2:hover .heading-anchor, h3:hover .heading-anchor, .heading-anchor:focus { opacity: 1; }

/* ── 法律全文 ─────────────────────────────────────────────────────────── */

.legal-text {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
}
.legal-text__body {
  margin: 1rem 0 0;
  max-height: 32rem;
  overflow: auto;
  padding: 1rem;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: .82rem;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
}

/* ── CTA 帶 ───────────────────────────────────────────────────────────── */

.cta-band { background: var(--surface); border-top: 1px solid var(--line); }
.cta-band__inner { display: grid; gap: 1.5rem; align-items: center; }
.cta-band h2 { margin-bottom: .4rem; }
.cta-band p { color: var(--ink-2); max-width: 60ch; }
.cta-band__actions { display: flex; flex-wrap: wrap; gap: .75rem; }
@media (min-width: 900px) {
  .cta-band__inner { grid-template-columns: minmax(0, 1fr) auto; gap: 2.5rem; }
}

/* ── 頁尾 ─────────────────────────────────────────────────────────────── */

.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--line);
  padding-block: 2.5rem 1.75rem;
  margin-top: auto;
}
.site-footer__top { display: grid; gap: 2rem; }
.site-footer__tagline { margin: .85rem 0 .5rem; color: var(--ink-2); font-size: .95rem; max-width: 40ch; }
.site-footer__contact { font-size: .95rem; }
.site-footer__nav { display: grid; gap: 1.75rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.site-footer__heading { margin: 0 0 .7rem; font-size: .82rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.site-footer__group ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.site-footer__group a { color: var(--ink-2); text-decoration: none; font-size: .95rem; }
.site-footer__group a:hover { color: var(--accent); text-decoration: underline; }

.site-footer__bottom {
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  display: grid;
  gap: .6rem;
}
.site-footer__legal { margin: 0; font-size: .88rem; color: var(--ink-2); }
.site-footer__domain { margin-left: .5rem; color: var(--ink-3); }
.site-footer__trademark { margin: 0; font-size: .82rem; color: var(--ink-3); max-width: 90ch; line-height: 1.55; }

@media (min-width: 760px) {
  .site-footer__nav { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (min-width: 980px) {
  .site-footer__top { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 3rem; }
}

/* ── 文件版型 ─────────────────────────────────────────────────────────── */

.page-docs { display: flex; flex-direction: column; min-height: 100vh; }
.page-docs main { flex: 1; }

.docs-layout {
  display: grid;
  gap: 2rem;
  padding-block: 2rem 3rem;
  max-width: var(--container-wide);
}

.docs-sidebar {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: .5rem 1rem 1rem;
}
.docs-sidebar__summary {
  cursor: pointer;
  padding: .7rem .25rem;
  font-weight: 650;
  font-size: .95rem;
}
.docs-sidebar__heading {
  margin: .5rem 0 .6rem;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.docs-sidebar__nav ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .1rem; }
.docs-sidebar__nav a {
  display: block;
  padding: .45em .6em;
  border-radius: 6px;
  color: var(--ink-2);
  text-decoration: none;
  font-size: .95rem;
}
.docs-sidebar__nav a:hover { background: var(--surface-soft); color: var(--accent); }
.docs-sidebar__nav a[aria-current] { background: var(--accent-soft); color: var(--accent-press); font-weight: 650; }

.docs-article {
  min-width: 0;
  padding: clamp(1.1rem, 2.5vw, 2.5rem);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}
.docs-article__header { padding-bottom: 1.25rem; border-bottom: 1px solid var(--line); margin-bottom: 1.75rem; }
.docs-article__lead { font-size: 1.08rem; color: var(--ink-2); max-width: 70ch; }

.docs-meta { display: flex; flex-wrap: wrap; gap: 1.5rem; margin: 1.1rem 0 0; font-size: .88rem; }
.docs-meta div { display: flex; flex-wrap: wrap; gap: .25rem .4rem; }
.docs-meta dt { color: var(--ink-3); margin: 0; }
.docs-meta dd { margin: 0; color: var(--ink-2); font-weight: 600; }

.docs-body { max-width: 68ch; line-height: 1.85; }
.docs-body h2 { margin-top: 2.25rem; padding-top: .5rem; }
.docs-body h3 { margin-top: 1.75rem; }
.docs-body ul, .docs-body ol { padding-left: 1.35em; }
.docs-body li { margin-bottom: .45em; }
.docs-body .table-scroll { margin: 1.25rem 0; }

.docs-toc { display: none; }
.docs-toc__heading {
  margin: 0 0 .6rem;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.docs-toc ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; }
.docs-toc a { color: var(--ink-2); text-decoration: none; font-size: .9rem; display: block; border-left: 2px solid var(--line); padding-left: .7rem; }
.docs-toc a:hover { color: var(--accent); border-left-color: var(--accent); }

.docs-pager {
  display: grid;
  gap: 1rem;
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}
.docs-pager__link {
  display: block;
  padding: .9rem 1.1rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  text-decoration: none;
}
.docs-pager__link:hover { border-color: var(--accent); }
.docs-pager__label { display: block; font-size: .8rem; color: var(--ink-3); }
.docs-pager__title { display: block; font-weight: 650; color: var(--accent); }
.docs-pager__link--next { text-align: right; }

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

@media (min-width: 900px) {
  .docs-layout { grid-template-columns: 210px minmax(0, 1fr); gap: 1.5rem; }
  .docs-sidebar { position: sticky; top: 78px; align-self: start; max-height: calc(100vh - 96px); overflow-y: auto; }
  .docs-sidebar__summary { display: none; }
  .docs-sidebar[open] .docs-sidebar__nav { display: block; }
}

@media (min-width: 1440px) {
  .docs-layout { grid-template-columns: 210px minmax(0, 1fr) 180px; }
  .docs-toc { display: block; position: sticky; top: 78px; align-self: start; }
}

/* ── 程式碼區塊 ───────────────────────────────────────────────────────── */

.code-block {
  margin: 1.25rem 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--surface);
}
.code-block__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  padding: .4rem .5rem .4rem .85rem;
  background: var(--surface-soft);
  border-bottom: 1px solid var(--line);
  min-height: 38px;
}
.code-lang { font-size: .78rem; color: var(--ink-3); font-family: var(--font-mono); }
.code-copy {
  padding: .35em .75em;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  font: inherit;
  font-size: .8rem;
  font-weight: 600;
  color: var(--ink-2);
  cursor: pointer;
}
.code-copy:hover { border-color: var(--accent); color: var(--accent); }
.code-block pre { margin: 0; padding: .95rem 1rem; overflow-x: auto; }
.code-block code {
  font-family: var(--font-mono);
  font-size: .86rem;
  line-height: 1.6;
  color: var(--ink);
}

:not(pre) > code {
  padding: .12em .38em;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: .86em;
  word-break: break-word;
}

.doc-figure { margin: 1.5rem 0; }
.doc-figure img { border: 1px solid var(--line); border-radius: var(--radius-sm); }
.doc-figure figcaption { margin-top: .6rem; font-size: .88rem; color: var(--ink-2); }

/* ── 語言選擇入口與 404 ───────────────────────────────────────────────── */

.page-entry { display: grid; place-items: center; min-height: 100vh; padding: var(--gutter); }
.entry { width: 100%; }
.entry__inner {
  max-width: 560px;
  margin-inline: auto;
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(1.75rem, 1rem + 3vw, 3rem);
  box-shadow: var(--shadow-md);
}
.entry__mark { width: 64px; height: 64px; margin: 0 auto 1rem; }
.entry__intro { color: var(--ink-2); margin-bottom: 1.75rem; }
.entry__list { list-style: none; margin: 0; padding: 0; display: grid; gap: .7rem; }
.entry-card {
  display: block;
  padding: .95rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  text-decoration: none;
  text-align: left;
  transition: border-color .15s ease, background-color .15s ease;
}
.entry-card:hover { border-color: var(--accent); background: var(--accent-soft); }
.entry-card__name { display: block; font-weight: 650; color: var(--ink); }
.entry-card__tagline { display: block; margin-top: .2rem; font-size: .88rem; color: var(--ink-2); }

/* ── 版面保險 ─────────────────────────────────────────────────────────── */

/* 360px 寬也不能出現橫向捲動：長網址與長識別碼一律允許斷行。 */
body { overflow-x: clip; }
.docs-body a, .prose a { word-break: break-word; }

/* 文件在小螢幕保留閱讀空間，導覽入口維持可點選的高度。 */
@media (max-width: 899px) {
  .docs-layout { gap: 1rem; padding-top: 1rem; }
  .docs-sidebar { padding: .25rem .8rem; }
  .docs-sidebar__summary { min-height: 44px; }
  .docs-sidebar__nav { padding-bottom: .75rem; }
  .docs-sidebar__nav a { padding-block: .65rem; }
}

@media (max-width: 639px) {
  .hero__actions, .page-header__actions { align-items: stretch; }
  .hero__actions .button, .page-header__actions .button { flex: 1 1 100%; }
  .topic--with-thumb { border-left: 0; padding-left: 0; padding-bottom: 1.5rem; border-bottom: 1px solid var(--line); }
}
