/* STOCKings 介紹網站共用樣式：只有淺色一種外觀（淺色極簡）。
 * 米白底、深藍大字（標題、主要按鈕）、翠綠點綴（小標、勾勾、箭頭），和程式圖示同一套顏色；陰影用平移的實心色塊，不用光暈。
 * 文字對比都在 4.5:1 以上；動畫只在 <html class="js"> 時啟用，「減少動態效果」時全部關掉。 */

:root {
  color-scheme: light;
  --bg: #fbfbf8;
  --bg-2: #f3f3ee;
  --surface: #ffffff;
  --surface-2: #f1f1ec;
  --border: #e2e2da;
  --border-strong: #c9c9bf;
  --text: #1d2939;
  --muted: #5b6575;
  --ink: #0f1b2d;              /* 標題、主要按鈕、深色區塊 */
  --ink-hover: #22324a;
  --green: #0f9d6b;            /* 點綴（圖案、邊線） */
  --green-ink: #0b7a53;        /* 白底上的綠色字 */
  --green-soft: #e3f4ec;
  --link: #0b7a53;
  --note-bg: #fff7e0;
  --note-border: #e6c869;
  --note-text: #6b5210;
  --lift: 10px 10px 0 rgb(15 157 107 / .14);
  --radius: 14px;
  --font-head: "Inter", "Noto Sans TC", system-ui, -apple-system, "Segoe UI", "PingFang TC", "Microsoft JhengHei", sans-serif;
  --font-body: "Noto Sans TC", system-ui, -apple-system, "Segoe UI", "PingFang TC", "Microsoft JhengHei", sans-serif;
}
:root[data-lang="en"] { --font-body: system-ui, -apple-system, "Segoe UI", "Noto Sans TC", sans-serif; }

/* ---------- 語言切換：只顯示目前語言的內容 ---------- */
html[data-lang="en"] [data-l="zh"],
html:not([data-lang="en"]) [data-l="en"] { display: none !important; }

/* ---------- 基本 ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; -webkit-text-size-adjust: 100%; background: var(--bg); }
body {
  margin: 0;
  color: var(--text);
  font: 16px/1.75 var(--font-body);
  overflow-x: hidden;
  background-color: var(--bg);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--link); text-underline-offset: 3px; }
a:hover { color: var(--ink); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.2; letter-spacing: -.02em; color: var(--ink); }
b, strong { color: var(--ink); }
code { font: .88em ui-monospace, "Cascadia Mono", Consolas, monospace; background: var(--surface-2); border: 1px solid var(--border); color: var(--green-ink); padding: 0 .35em; border-radius: 5px; }
.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.skip { position: absolute; left: 8px; top: -60px; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { top: 8px; color: #fff; }
.muted { color: var(--muted); }

/* ---------- 頁首 ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgb(251 251 248 / .85);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.site-header .wrap { display: flex; align-items: center; gap: 16px; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font: 800 1.2rem var(--font-head); }
.brand img { width: 32px; height: 32px; border-radius: 9px; }
.brand:hover { color: var(--ink); }
.nav { display: flex; gap: 2px; margin-left: auto; }
.nav a { color: var(--muted); text-decoration: none; padding: 6px 12px; border-radius: 8px; font-size: .95rem; font-weight: 500; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); }
.tools { display: flex; gap: 8px; margin-left: auto; }
.nav + .tools { margin-left: 10px; }
.tool-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 38px; padding: 0 14px;
  background: var(--ink); color: #fff;
  border: 0; border-radius: 10px;
  font: 600 .9rem var(--font-head); cursor: pointer;
}
.tool-btn:hover { background: var(--ink-hover); }
.tool-btn svg { width: 17px; height: 17px; }
@media (max-width: 860px) { .nav { display: none; } .tools { margin-left: auto !important; } }

/* ---------- 按鈕：深藍圓角方塊＋小方塊箭頭 ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 14px;
  min-height: 52px; padding: 8px 8px 8px 22px;
  border-radius: 10px; border: 1px solid transparent;
  font: 600 1rem var(--font-head); text-decoration: none; line-height: 1.25;
  transition: background .2s, border-color .2s, transform .2s;
}
.btn .arrow { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 7px; background: var(--green); color: #fff; flex: none; }
.btn .arrow svg { width: 18px; height: 18px; }
.btn small { display: block; font: 500 .75rem var(--font-body); opacity: .85; }
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: var(--ink-hover); color: #fff; transform: translateY(-1px); }
.btn-ghost { background: var(--surface); color: var(--ink); border: 1.5px solid var(--ink); }
.btn-ghost:hover { background: var(--surface-2); color: var(--ink); }
.btn-ghost .arrow { background: var(--ink); color: #fff; }
.btn-light { background: #fff; color: var(--ink); }
.btn-light:hover { background: var(--green-soft); color: var(--ink); }
.btn-light .arrow { background: var(--green); color: #fff; }
.btn:not(:has(.arrow)) { padding-right: 22px; }
.btn > svg { width: 20px; height: 20px; flex: none; }

/* ---------- 小標 ---------- */
.eyebrow, .kicker {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--green-ink); font: 700 .8rem var(--font-head);
  letter-spacing: .14em; text-transform: uppercase; margin: 0 0 18px;
}
.eyebrow::before, .kicker::before { content: ""; width: 26px; height: 2px; background: var(--green); }

/* ---------- 主視覺 ---------- */
.hero {
  position: relative; overflow: hidden;
  padding: 72px 0 96px;
  border-bottom: 1px solid var(--border);
}
.hero::before { /* 很淡的細格線，往邊緣淡出 */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgb(15 27 45 / .05) 1px, transparent 1px),
    linear-gradient(90deg, rgb(15 27 45 / .05) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, #000 30%, transparent 85%);
  mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, #000 30%, transparent 85%);
}
.hero-net { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.hero-grid { position: relative; display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center; min-height: 540px; }
.hero h1 { font-size: clamp(2.3rem, 5.4vw, 4.4rem); font-weight: 800; line-height: 1.08; margin: 0 0 26px; letter-spacing: -.025em; }
.hero h1 .line { display: block; }
.hero h1 .hl { color: var(--green-ink); }
.hero .sub { color: var(--muted); font-size: 1.08rem; max-width: 34em; margin: 0 0 32px; padding-left: 18px; border-left: 3px solid var(--green); }
.cta { display: flex; flex-wrap: wrap; gap: 14px; }
.cta-note { color: var(--muted); font-size: .88rem; margin: 18px 0 0; }
.hero-visual { perspective: 1600px; }
.hero-shot { transform: none; }
.scroll-hint {
  position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  color: var(--muted); text-decoration: none; font: 600 .7rem var(--font-head); letter-spacing: .2em; text-transform: uppercase;
  writing-mode: vertical-rl;
}
.scroll-hint i { display: block; width: 2px; height: 34px; background: linear-gradient(var(--green), transparent); }
.js .scroll-hint i { animation: drip 2.2s ease-in-out infinite; }
@keyframes drip { 0% { transform: scaleY(.2); transform-origin: top; } 50% { transform: scaleY(1); transform-origin: top; } 100% { transform: scaleY(.2); transform-origin: bottom; } }
.scroll-hint:hover { color: var(--ink); }

/* ---------- 視窗框（截圖） ---------- */
.window, .shot > a {
  display: block; margin: 0;
  background: var(--surface); border-radius: 14px; overflow: hidden;
  border: 1px solid var(--border-strong);
  box-shadow: var(--lift);
}
.window-bar, .shot > a::before {
  display: flex; gap: 7px; align-items: center; height: 30px; padding: 0 14px;
  background: var(--surface-2); border-bottom: 1px solid var(--border);
}
.window-bar span { width: 10px; height: 10px; border-radius: 50%; background: var(--border-strong); }
.window-bar span:first-child { background: var(--green); }
.shot > a::before { content: ""; height: 26px; background-image: radial-gradient(circle at 18px 50%, var(--green) 4px, transparent 5px), radial-gradient(circle at 34px 50%, var(--border-strong) 4px, transparent 5px), radial-gradient(circle at 50px 50%, var(--border-strong) 4px, transparent 5px), linear-gradient(var(--surface-2), var(--surface-2)); }

/* ---------- 區塊共用 ---------- */
.block { padding: 110px 0; position: relative; }
.block-tight { padding-top: 0; }
.block.alt { background: var(--bg-2); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.block > .wrap { position: relative; }
.section-head { max-width: 760px; margin: 0 0 56px; }
.section-head h2 { font-size: clamp(1.9rem, 4vw, 3rem); font-weight: 800; letter-spacing: -.03em; margin: 0 0 16px; }
.section-head p { color: var(--muted); font-size: 1.06rem; margin: 0; }
.sub-head { font-size: 1.6rem; margin: 96px 0 28px; }

/* ---------- 深藍色帶（隱私） ---------- */
.band {
  position: relative; overflow: hidden;
  padding: 96px 0;
  background: var(--ink);
  background-image: radial-gradient(rgb(255 255 255 / .08) 1.2px, transparent 1.4px);
  background-size: 18px 18px;
  color: #fff;
}
.band::after { content: ""; position: absolute; right: -120px; top: -160px; width: 460px; height: 460px; border-radius: 50%; border: 1px solid rgb(255 255 255 / .18); pointer-events: none; }
.band-grid { display: grid; grid-template-columns: .9fr 1.4fr; gap: 56px; align-items: center; position: relative; }
.band h2 { font-size: clamp(2rem, 4vw, 3rem); font-weight: 800; margin: 0 0 18px; color: #fff; }
.band-head p { color: rgb(255 255 255 / .9); font-size: 1.05rem; margin: 0 0 28px; }
.band .kicker { color: #fff; }
.band .kicker::before { background: #4fd6a3; }
.band b, .band strong { color: #fff; }
.cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.band .card { background: rgb(255 255 255 / .05); border: 1px solid rgb(255 255 255 / .16); border-radius: var(--radius); padding: 24px; }
.band .card:nth-child(even) { transform: translateY(28px); }
.band .card h3 { font-size: 1.12rem; margin: 14px 0 8px; color: #fff; }
.band .card p { margin: 0; color: rgb(255 255 255 / .9); font-size: .95rem; }
.icon-badge { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 12px; background: var(--green); color: #fff; }
.icon-badge svg { width: 24px; height: 24px; }

/* ---------- 功能（文字＋截圖交錯） ---------- */
.feature { display: grid; grid-template-columns: 1fr 1.15fr; gap: 64px; align-items: center; margin: 0 0 110px; }
.feature.reverse .feature-text { order: 2; }
.feature-text h3 { font-size: clamp(1.5rem, 2.8vw, 2.1rem); font-weight: 700; margin: 14px 0 12px; }
.feature-text > p { color: var(--muted); margin: 0 0 18px; }
.pill { display: inline-block; font: 700 .78rem var(--font-head); letter-spacing: .12em; text-transform: uppercase; color: var(--green-ink); border: 1px solid rgb(15 157 107 / .3); background: var(--green-soft); padding: 4px 12px; border-radius: 999px; }
.pill.violet { color: var(--ink); border-color: var(--border-strong); background: var(--surface-2); }
.checks { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.checks li { position: relative; padding-left: 32px; color: var(--text); }
.checks li::before {
  content: ""; position: absolute; left: 0; top: .32em; width: 20px; height: 20px; border-radius: 50%;
  border: 1.5px solid var(--green);
  background: no-repeat center/12px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230f9d6b' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E");
}
.shot { margin: 0; }
.shot img { width: 100%; }
.shot figcaption { color: var(--muted); font-size: .88rem; margin-top: 14px; padding-left: 14px; border-left: 2px solid var(--green); }
.shot.portrait { max-width: 400px; justify-self: center; }
.chips { list-style: none; padding: 0; margin: 20px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { font-size: .85rem; padding: 4px 12px; border-radius: 8px; background: var(--surface); border: 1px solid var(--border); color: var(--text); }

/* ---------- 白色卡片（更多分析圖、小功能） ---------- */
.gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; align-items: start; margin-bottom: 120px; }
.tile, .mini {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  transition: border-color .25s, box-shadow .25s, transform .25s;
}
.tile:hover, .mini:hover { border-color: var(--ink); box-shadow: 6px 6px 0 rgb(15 157 107 / .18); }
@media (min-width: 1000px) {
  .gallery .tile:nth-child(2) { margin-top: 48px; }
  .gallery .tile:nth-child(3) { margin-top: 24px; }
  .gallery .tile:nth-child(4) { margin-top: 72px; }
}
.tile { overflow: hidden; }
.tile-img { display: block; background: var(--surface-2); border-bottom: 1px solid var(--border); padding: 10px; }
.tile-img img { border-radius: 8px; }
.tile-body { padding: 18px 20px 22px; }
.tile h4 { font-size: 1.1rem; margin: 0 0 6px; }
.tile p { color: var(--muted); font-size: .92rem; margin: 0; }

.mini-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.mini { padding: 20px; font-size: .92rem; color: var(--muted); }
.mini b { display: flex; align-items: center; gap: 10px; font: 700 1.02rem var(--font-head); color: var(--ink); margin-bottom: 6px; }
.mini b::before { content: ""; width: 8px; height: 8px; border-radius: 2px; background: var(--green); flex: none; }
.mini:nth-child(even) b::before { background: var(--ink); }

.pdf-note { display: flex; gap: 18px; align-items: center; margin-top: 64px; background: var(--surface); border: 1px solid var(--border); border-left: 3px solid var(--green); border-radius: 12px; padding: 20px 24px; }
.pdf-note svg { width: 38px; height: 38px; flex: none; color: var(--green); }
.pdf-note p { margin: 0; }
.pdf-note .muted { font-size: .92rem; }

/* ---------- 常見問題 ---------- */
#faq .wrap { display: grid; grid-template-columns: minmax(0, .75fr) minmax(0, 1.6fr); gap: 56px; align-items: start; }
#faq .section-head { margin: 0; position: sticky; top: 100px; }
.faq { display: grid; gap: 12px; }
.faq details { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; }
.faq details[open] { border-color: var(--ink); }
.faq summary { cursor: pointer; list-style: none; padding: 18px 56px 18px 22px; font: 600 1.04rem var(--font-head); color: var(--ink); position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 18px; top: 50%; transform: translateY(-50%); width: 28px; height: 28px; display: grid; place-items: center; border-radius: 7px; background: var(--surface-2); color: var(--ink); font-size: 1.2rem; }
.faq details[open] summary::after { content: "−"; background: var(--ink); color: #fff; }
.faq details p { margin: 0; padding: 0 22px 20px; color: var(--text); }

/* ---------- 下載 ---------- */
.download {
  display: grid; grid-template-columns: auto 1fr auto; gap: 32px; align-items: center;
  padding: 44px; border-radius: 22px; color: #fff;
  background: radial-gradient(rgb(255 255 255 / .08) 1.2px, transparent 1.4px) 0 0/18px 18px, var(--ink);
  box-shadow: 14px 14px 0 rgb(15 157 107 / .22);
}
.download img { border-radius: 20px; }
.download h2, .download b, .download strong { color: #fff; }
.download h2 { font-size: 2rem; margin: 0 0 6px; }
.download p { margin: 0 0 10px; color: rgb(255 255 255 / .92); }
.download ul { margin: 0; padding-left: 1.2em; color: rgb(255 255 255 / .92); font-size: .95rem; }
.download .btn-ghost { background: transparent; border-color: rgb(255 255 255 / .6); color: #fff; }
.download .btn-ghost:hover { background: rgb(255 255 255 / .08); color: #fff; }
.download .btn-ghost .arrow { background: #fff; color: var(--ink); }

/* ---------- 頁尾 ---------- */
.site-footer { border-top: 1px solid var(--border); background: var(--bg-2); padding: 56px 0 32px; font-size: .93rem; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 28px; }
.footer-grid p { margin: 0; }
.site-footer h2 { font: 600 .8rem var(--font-head); text-transform: uppercase; letter-spacing: .14em; color: var(--green-ink); margin: 0 0 12px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.site-footer a { color: var(--text); text-decoration: none; }
.site-footer a:hover { color: var(--green-ink); text-decoration: underline; }
.site-footer .brand { margin-bottom: 10px; }
.disclaimer { margin-top: 32px; padding: 14px 16px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); color: var(--muted); font-size: .88rem; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; margin-top: 20px; color: var(--muted); font-size: .86rem; }

/* ---------- 文件頁（隱私權政策、服務條款）：適合讀長文 ---------- */
.doc { max-width: calc(70ch + 48px); margin: 0 auto; padding: 0 24px 96px; font-size: 1.04rem; line-height: 1.85; color: var(--text); }
.doc-hero { position: relative; padding: 64px 0 28px; margin-bottom: 8px; border-bottom: 1px solid var(--border); }
.doc-hero h1 { font-size: clamp(2rem, 5vw, 3rem); font-weight: 800; margin: 14px 0 10px; }
.doc-meta { color: var(--muted); font-size: .93rem; margin: 0; }
.doc .lead { font-size: 1.06rem; background: var(--surface); border: 1px solid var(--border); border-left: 3px solid var(--green); border-radius: 12px; padding: 18px 20px; margin: 28px 0; }
.doc h2 { font-size: 1.4rem; font-weight: 700; margin: 52px 0 14px; padding-top: 4px; }
.doc h2 .n { color: var(--green-ink); margin-right: 10px; font-variant-numeric: tabular-nums; }
.doc h3 { font-size: 1.12rem; margin: 28px 0 8px; }
.doc p { margin: 0 0 1em; }
.doc ul, .doc ol { padding-left: 1.3em; }
.doc li { margin: 6px 0; }
.doc li::marker { color: var(--green); }
.toc { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 16px 20px; margin: 24px 0; }
.toc b { display: block; font: 600 .78rem var(--font-head); letter-spacing: .14em; text-transform: uppercase; color: var(--green-ink); margin-bottom: 8px; }
.toc li { margin: 0 0 4px; break-inside: avoid; }
.toc ol { margin: 0; padding-left: 1.3em; columns: 2; column-gap: 28px; font-size: .95rem; }
.toc a { text-decoration: none; }
.toc a:hover { text-decoration: underline; }
@media (max-width: 600px) { .toc ol { columns: 1; } }
.note { background: var(--note-bg); border: 1px solid var(--note-border); color: var(--note-text); padding: 12px 16px; border-radius: 10px; font-size: .94rem; }
.placeholder { background: var(--note-bg); color: var(--note-text); border: 1px dashed var(--note-border); border-radius: 6px; padding: 0 6px; font-weight: 600; }
.draft-banner { margin: 0; background: var(--note-bg); border-bottom: 1px solid var(--note-border); color: var(--note-text); font-size: .9rem; text-align: center; padding: 8px 16px; }
.data-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: .94rem; line-height: 1.65; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; margin: 8px 0 18px; }
.data-table th, .data-table td { text-align: left; vertical-align: top; padding: 12px 14px; border-bottom: 1px solid var(--border); }
.data-table th { background: var(--surface-2); font: 600 .8rem var(--font-head); letter-spacing: .06em; color: var(--green-ink); }
.data-table tr:last-child td { border-bottom: 0; }
/* 表格比內文欄寬一點，欄位才不會擠成一個字一行；窄螢幕時下面會改成上下排 */
@media (min-width: 681px) {
  .doc .data-table { width: min(1040px, calc(100vw - 48px)); position: relative; left: 50%; transform: translateX(-50%); }
  .data-table td:first-child { min-width: 9em; }
}
@media (max-width: 680px) {
  .data-table, .data-table tbody, .data-table tr, .data-table td { display: block; width: 100%; }
  .data-table thead { display: none; }
  .data-table tr { border-bottom: 1px solid var(--border); padding: 8px 0; }
  .data-table tr:last-child { border-bottom: 0; }
  .data-table td { border: 0; padding: 4px 16px; }
  .data-table td::before { content: attr(data-label); display: block; font-size: .78rem; font-weight: 700; color: var(--green-ink); }
  .data-table th[scope="row"] { display: block; width: 100%; border: 0; background: none; padding: 4px 16px 0; }
  .data-table td:not([data-label])::before { content: none; }
}

/* ---------- 教學：首頁卡片牆、每一章一頁（tools/site_tutorials.py 產生） ---------- */
.tut-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 18px; }
.tut-card {
  display: flex; flex-direction: column; overflow: hidden; text-decoration: none; color: var(--text);
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  transition: border-color .25s, box-shadow .25s, transform .25s;
}
.tut-card:hover { color: var(--text); border-color: var(--ink); box-shadow: 6px 6px 0 rgb(15 157 107 / .18); transform: translateY(-2px); }
.tut-thumb { display: block; aspect-ratio: 16 / 9; overflow: hidden; background: var(--surface-2); border-bottom: 1px solid var(--border); }
.tut-thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top left; }
.tut-body { display: grid; gap: 6px; padding: 16px 18px 20px; }
.tut-n { font: 700 .78rem var(--font-head); letter-spacing: .12em; color: var(--green-ink); }
.tut-card b { font: 700 1.05rem/1.35 var(--font-head); color: var(--ink); }
.tut-sum { color: var(--muted); font-size: .9rem; line-height: 1.6; }
.tut-card:not(:has(.tut-thumb)) .tut-body { padding-top: 22px; }

.tutorial-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 40px; align-items: start; }
.tutorial-nav { position: sticky; top: 88px; max-height: calc(100vh - 110px); overflow: auto; padding: 32px 0 24px; font-size: .9rem; }
.tutorial-nav .back { display: inline-block; margin-bottom: 14px; color: var(--muted); text-decoration: none; font-weight: 600; }
.tutorial-nav .back::before { content: "← "; }
.tutorial-nav .back:hover { color: var(--ink); }
.tutorial-nav ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.tutorial-nav li a { display: flex; gap: 10px; padding: 6px 10px; border-radius: 8px; color: var(--text); text-decoration: none; line-height: 1.45; }
.tutorial-nav li a:hover { background: var(--surface-2); color: var(--ink); }
.tutorial-nav li a[aria-current="page"] { background: var(--ink); color: #fff; }
.tutorial-nav .n { flex: none; width: 1.6em; text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; }
.tutorial-nav li a[aria-current="page"] .n { color: #9fe3c6; }
.doc.tutorial { max-width: none; margin: 0; padding: 0 0 96px; }
.doc.tutorial .doc-hero { padding-top: 40px; }
.tshot { margin: 18px 0 26px; }
.tshot a { display: block; border: 1px solid var(--border-strong); border-radius: 10px; overflow: hidden; box-shadow: var(--lift); }
.tshot img { width: 100%; }
.tshot figcaption { color: var(--muted); font-size: .88rem; margin-top: 10px; padding-left: 12px; border-left: 2px solid var(--green); }
.doc ol.steps { padding-left: 1.6em; }
.doc ol.steps > li::marker { font-weight: 700; color: var(--green-ink); }
.callout { display: block; margin: 22px 0; padding: 14px 18px; border-radius: 12px; background: var(--green-soft); border-left: 3px solid var(--green); }
.callout > b:first-child { display: block; margin-bottom: 4px; color: var(--ink); }
.callout p { margin: 0 0 .5em; }
.callout p:last-child { margin-bottom: 0; }
.callout.warn { background: var(--note-bg); border-left-color: var(--note-border); }
.doc .mark { color: #c8102e; font-weight: 700; }
.doc.tutorial .data-table td:first-child { white-space: nowrap; width: 1%; }
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 56px; }
.pager a { display: grid; gap: 2px; padding: 14px 16px; border: 1px solid var(--border); border-radius: 12px; text-decoration: none; color: var(--ink); font-weight: 600; background: var(--surface); }
.pager a:hover { border-color: var(--ink); }
.pager small { color: var(--muted); font-weight: 500; }
.pager .next { grid-column: 2; text-align: right; }
@media (max-width: 1000px) {
  .tutorial-layout { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .tutorial-nav { position: static; max-height: none; padding-bottom: 0; }
  .tutorial-nav ol { display: none; }
}
@media (max-width: 640px) {
  .pager { grid-template-columns: minmax(0, 1fr); }
  .pager .next { grid-column: auto; }
  .doc.tutorial { padding: 0 0 72px; }
}

/* ---------- 捲動淡入（只有 JS 啟用時） ---------- */
.js .reveal { opacity: 0; translate: 0 32px; transition: opacity .7s ease, translate .7s cubic-bezier(.2, .7, .2, 1); }
.js .reveal.in { opacity: 1; translate: 0 0; }

/* ---------- 響應式 ---------- */
@media (max-width: 1000px) {
  .hero-grid, .band-grid, .feature { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .hero-grid { min-height: 0; }
  #faq .wrap { grid-template-columns: minmax(0, 1fr); gap: 0; }
  #faq .section-head { position: static; margin-bottom: 40px; }
  .feature.reverse .feature-text { order: 0; }
  .feature { margin-bottom: 80px; }
  .gallery, .mini-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .scroll-hint { display: none; }
}
@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  .hero { padding: 48px 0 64px; }
  .block { padding: 72px 0; }
  .block-tight { padding-top: 0; }
  .band { padding: 72px 0; }
  .cards, .gallery, .mini-grid { grid-template-columns: minmax(0, 1fr); }
  .band .card:nth-child(even) { transform: none; }
  .sub-head { margin-top: 64px; }
  .gallery { margin-bottom: 80px; }
  .download { grid-template-columns: minmax(0, 1fr); padding: 28px 22px; gap: 20px; }
  .download img { width: 64px; height: 64px; }
  .btn { width: 100%; justify-content: space-between; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid > :first-child { grid-column: 1 / -1; }
  .doc { padding: 0 16px 72px; font-size: 1rem; }
  .doc-hero { padding-top: 40px; }
}

/* ---------- 減少動態效果、列印 ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; translate: none; transition: none; }
  .js .scroll-hint i { animation: none; }
  .btn, .tile, .mini { transition: none; }
}
@media print {
  .js .reveal { opacity: 1; translate: none; }
  .hero-net, .scroll-hint, .site-header .tools { display: none; }
}
.hero-text, .feature-text, .band-head, .shot, .hero-visual { min-width: 0; }
.eyebrow { flex-wrap: wrap; }
