/* Envtally 官網 — 沿用 App 的設計變數與質感（紙白／墨黑／琥珀、細線、等寬數字） */

:root {
  --paper: #f7f8f6;
  --sheet: #ffffff;
  --ink: #15181a;
  --ink-soft: #39413e;
  --muted: #6c7370;
  --faint: #9aa09b;
  --rule: #d7dbd2;
  --hair: #e8eae3;
  --rail: #f1f3ee;
  --rail-active: #e5e9de;
  --plate: #e8ebe2;
  --plate-rule: #d2d7cb;
  --sel: #e9ede2;
  --amber: #96520f;
  --amber-bg: #fbf2e6;
  --amber-line: #e8d9c2;
  --green: #3c6a4b;
  --mono: "SF Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --sans: "Avenir Next", "PingFang TC", "Helvetica Neue", system-ui, sans-serif;
  --shadow: rgba(20, 24, 26, 0.08);
  --btn-ink: #f3f5f0;
  --btn-hover: #262b2c;
  --head-bg: #f4f6f0;
  --hover-row: #f7f9f2;
  --slot: #f5f7f1;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --lift: 0 10px 26px -16px rgba(20, 24, 26, 0.32);
}

:root[data-theme="dark"] {
  --paper: #14171a;
  --sheet: #1a1e21;
  --ink: #e9ece7;
  --ink-soft: #c3c9c3;
  --muted: #8d958f;
  --faint: #6b736d;
  --rule: #2b3134;
  --hair: #22272a;
  --rail: #171b1e;
  --rail-active: #23292c;
  --plate: #1d2225;
  --plate-rule: #2c3236;
  --sel: #232a2b;
  --amber: #e0a15c;
  --amber-bg: #2e2318;
  --amber-line: #4a3a26;
  --green: #8cb99a;
  --shadow: rgba(0, 0, 0, 0.5);
  --btn-ink: #14171a;
  --btn-hover: #d5dad1;
  --head-bg: #1e2427;
  --hover-row: #212729;
  --slot: #1c2124;
  --lift: 0 10px 26px -14px rgba(0, 0, 0, 0.65);
  color-scheme: dark;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

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

a { color: inherit; }
a:hover { color: var(--ink); }

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

/* ── 頂部 ─────────────────────────────────────────────── */

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--rule);
  transition: background-color 240ms ease, box-shadow 240ms ease;
}

.topbar.is-scrolled {
  background: color-mix(in srgb, var(--paper) 97%, transparent);
  box-shadow: 0 14px 30px -26px var(--shadow);
}

.topbar__inner {
  display: flex;
  align-items: center;
  gap: 18px;
  height: 58px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.brand svg {
  width: 22px;
  height: 22px;
  transition: transform 320ms var(--ease);
}

.brand:hover svg { transform: rotate(-8deg) scale(1.06); }

.nav {
  display: flex;
  gap: 18px;
  margin-left: 8px;
  font-size: 13.5px;
  color: var(--muted);
}

.nav a {
  position: relative;
  padding-bottom: 3px;
  text-decoration: none;
}

/* hover 時由左往右畫一條底線 */
.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 240ms var(--ease);
}

.nav a:hover { color: var(--ink); }
.nav a:hover::after { transform: scaleX(1); }

.topbar__right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}

.icon-btn {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid var(--rule);
  border-radius: 6px;
  background: var(--sheet);
  color: var(--ink-soft);
  cursor: pointer;
  transition:
    border-color 160ms ease,
    color 160ms ease,
    transform 180ms var(--ease),
    box-shadow 180ms var(--ease);
}

.icon-btn:hover {
  border-color: var(--faint);
  color: var(--ink);
  transform: translateY(-1px);
  box-shadow: var(--lift);
}

.lang-select {
  height: 32px;
  padding: 0 8px;
  border: 1px solid var(--rule);
  border-radius: 6px;
  background: var(--sheet);
  color: var(--ink-soft);
  font: inherit;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 160ms ease, color 160ms ease;
}

.lang-select:hover {
  border-color: var(--faint);
  color: var(--ink);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  height: 40px;
  padding: 0 16px;
  border: 1px solid var(--rule);
  border-radius: 6px;
  background: var(--sheet);
  color: var(--ink);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  transition:
    background-color 160ms ease,
    border-color 160ms ease,
    color 160ms ease,
    transform 180ms var(--ease),
    box-shadow 180ms var(--ease);
}

.btn:hover {
  border-color: var(--faint);
  color: var(--ink);
  transform: translateY(-1px);
  box-shadow: var(--lift);
}

.btn:active {
  transform: translateY(0) scale(0.985);
  box-shadow: none;
}

.btn--primary {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--btn-ink);
}

/* 明確覆寫全域 a:hover 的顏色，否則深色主題下 hover 會變成白底白字 */
.btn--primary:hover {
  background: var(--btn-hover);
  border-color: var(--btn-hover);
  color: var(--btn-ink);
}

.btn--primary:active {
  background: var(--btn-hover);
  border-color: var(--btn-hover);
  color: var(--btn-ink);
}

.btn--ghost { background: transparent; }

.btn--sm {
  height: 32px;
  padding: 0 12px;
  font-size: 12.5px;
}

.btn .kbd {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--faint);
}

.btn--primary .kbd { color: color-mix(in srgb, var(--btn-ink) 60%, transparent); }

/* ── 主視覺 ───────────────────────────────────────────── */

.hero {
  padding: 72px 0 48px;
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: 56px;
  align-items: center;
}

.hero h1 {
  margin: 0 0 16px;
  font-size: clamp(30px, 3.6vw, 44px);
  line-height: 1.18;
  letter-spacing: -0.025em;
  font-weight: 650;
}

.hero p.lead {
  margin: 0 0 26px;
  font-size: 15.5px;
  line-height: 1.7;
  color: var(--ink-soft);
  max-width: 34em;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.hero__meta {
  margin: 18px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  font-size: 12px;
  color: var(--muted);
}

.hero__meta .mono { font-family: var(--mono); }

/* 分隔符跟著下一個項目，不會留在行尾 */
.hero__meta > * + *::before {
  content: "·";
  margin-right: 8px;
  color: var(--faint);
}

.dot-sep { color: var(--faint); }

/* 產品外觀（純 DOM 模擬，非截圖） */

.shot {
  border: 1px solid var(--rule);
  border-radius: 10px;
  background: var(--sheet);
  box-shadow: 0 18px 44px var(--shadow);
  overflow: hidden;
}

.shot__chrome {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 12px 0 14px;
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
}

.lights { display: flex; gap: 6px; }
.lights i { width: 9px; height: 9px; border-radius: 50%; display: block; }

.shot__title {
  margin-left: 6px;
  font-size: 11.5px;
  color: var(--muted);
}

.shot__actions {
  margin-left: auto;
  display: flex;
  gap: 6px;
}

.chip-btn {
  height: 22px;
  padding: 0 8px;
  border: 1px solid var(--rule);
  border-radius: 4px;
  background: var(--sheet);
  font-size: 10.5px;
  color: var(--ink-soft);
  display: inline-flex;
  align-items: center;
}

.chip-btn--ink { background: var(--ink); border-color: var(--ink); color: var(--btn-ink); }

.shot__plate {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  background: var(--plate);
  border-bottom: 1px solid var(--plate-rule);
}

.shot__host { font-size: 15px; font-weight: 600; letter-spacing: -0.01em; }

.shot__specs {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 10px;
  font-size: 10.5px;
  color: var(--muted);
}

.shot__specs b { font-family: var(--mono); font-weight: 400; color: var(--ink-soft); }

.shot__ledger { margin-left: auto; display: flex; gap: 16px; }
.shot__cell { text-align: right; }
.shot__cell em { display: block; font-style: normal; font-size: 9.5px; color: var(--muted); }
.shot__cell b { font-family: var(--mono); font-size: 14px; font-weight: 400; }
.shot__cell--amber b { color: var(--amber); }

.shot__body {
  display: grid;
  grid-template-columns: 176px minmax(0, 1fr);
  min-height: 236px;
}

.shot__rail {
  border-right: 1px solid var(--rule);
  background: var(--rail);
  padding: 8px 0;
  font-size: 11.5px;
}

.rail-item {
  display: flex;
  align-items: center;
  gap: 7px;
  width: 100%;
  border: 0;
  background: transparent;
  padding: 6px 12px;
  font: inherit;
  text-align: left;
  color: var(--ink-soft);
  cursor: pointer;
  transition: background-color 150ms ease, color 150ms ease;
}

.rail-item:hover {
  background: var(--hover-row);
  color: var(--ink);
}

.rail-item span.count {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--muted);
}

.rail-item.is-active { background: var(--rail-active); font-weight: 600; }


.shot__table { font-size: 11.5px; }

.trow {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) 0.9fr 0.7fr 0.9fr;
  gap: 8px;
  align-items: center;
  padding: 6px 14px;
  border-bottom: 1px solid var(--hair);
}

.trow--head {
  background: var(--head-bg);
  color: var(--muted);
  font-size: 10px;
  border-bottom: 1px solid var(--rule);
}

.trow .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.trow .mono { font-family: var(--mono); font-size: 10.5px; }
.trow .src { color: var(--muted); font-size: 10px; }

.tag-ai {
  margin-left: 6px;
  padding: 0 4px;
  border: 1px solid var(--amber);
  border-radius: 3px;
  color: var(--amber);
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.04em;
  vertical-align: 1px;
}

.state { display: inline-flex; align-items: center; gap: 5px; font-size: 10px; color: var(--muted); }
.state i { width: 6px; height: 6px; border-radius: 50%; display: block; }
.state--ok i { background: var(--green); }
.state--todo i { background: var(--amber); }
.state--todo { color: var(--amber); }

/* 版面防溢出：grid/flex 子項預設 min-width:auto 會被內容撐開 */
.hero > *,
.readonly > *,
.install > *,
.col,
.shot > *,
.shot__body > * {
  min-width: 0;
}

body { overflow-x: hidden; }

/* ── 區塊 ─────────────────────────────────────────────── */

section {
  border-top: 1px solid var(--rule);
  scroll-margin-top: 64px;
}

.section-pad { padding: 56px 0; }

.section-head {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 26px;
}

.section-head h2 {
  margin: 0;
  font-size: 20px;
  letter-spacing: -0.015em;
  font-weight: 620;
}

.section-head p {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}

.cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  border-top: 1px solid var(--hair);
}

.col {
  padding: 22px 22px 4px 0;
  border-right: 1px solid var(--hair);
}

.col:last-child { border-right: 0; padding-right: 0; }
.col:not(:first-child) { padding-left: 22px; }

.col h3 {
  margin: 0 0 8px;
  font-size: 14.5px;
  font-weight: 600;
}

.col h3 span {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--faint);
  margin-right: 8px;
}

.col p { margin: 0; font-size: 13px; line-height: 1.72; color: var(--ink-soft); }

/* 分類 */

.plate-panel {
  border: 1px solid var(--plate-rule);
  border-radius: 8px;
  background: var(--plate);
  padding: 18px 20px;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 26px;
  padding: 0 10px;
  border: 1px solid var(--rule);
  border-radius: 4px;
  background: var(--sheet);
  font-size: 12px;
  color: var(--ink-soft);
  transition:
    border-color 160ms ease,
    background-color 160ms ease,
    color 160ms ease,
    transform 180ms var(--ease),
    box-shadow 180ms var(--ease);
}

.chip:hover {
  border-color: var(--faint);
  color: var(--ink);
  transform: translateY(-1px);
  box-shadow: var(--lift);
}

.chip--muted { background: transparent; color: var(--muted); border-style: dashed; }

/* 唯讀 */

.readonly {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 32px;
  align-items: start;
}

.readonly h2 { margin: 0 0 10px; font-size: 20px; letter-spacing: -0.015em; }

.readonly > div > p { margin: 0; font-size: 13.5px; color: var(--ink-soft); }

.checks { margin: 0; padding: 0; list-style: none; display: grid; gap: 9px; }

.checks li {
  display: flex;
  gap: 9px;
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 1.6;
}

.checks li::before {
  content: "";
  flex: none;
  width: 5px;
  height: 5px;
  margin-top: 8px;
  border-radius: 50%;
  background: var(--green);
}

/* 安裝 */

.install {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.card {
  border: 1px solid var(--rule);
  border-radius: 8px;
  background: var(--sheet);
  padding: 20px;
  transition:
    border-color 180ms ease,
    transform 220ms var(--ease),
    box-shadow 220ms var(--ease);
}

.card:hover {
  border-color: var(--faint);
  transform: translateY(-2px);
  box-shadow: var(--lift);
}

.card h3 {
  margin: 0 0 4px;
  font-size: 14.5px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.card .os {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--muted);
}

.card ol { margin: 14px 0 0; padding-left: 18px; display: grid; gap: 7px; font-size: 13px; color: var(--ink-soft); }
.card ol li::marker { font-family: var(--mono); font-size: 11px; color: var(--faint); }

.note {
  margin-top: 14px;
  padding: 10px 12px;
  border: 1px solid var(--amber-line);
  border-radius: 6px;
  background: var(--amber-bg);
  font-size: 12px;
  color: var(--amber);
  line-height: 1.6;
}

code {
  font-family: var(--mono);
  font-size: 0.92em;
  padding: 1px 5px;
  border: 1px solid var(--hair);
  border-radius: 4px;
  background: var(--slot);
  color: var(--ink);
  word-break: break-all;
}

/* 限制 */

.limits {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 28px;
  font-size: 12.5px;
  color: var(--muted);
}

.limits p { margin: 0; }
.limits b { color: var(--ink-soft); font-weight: 600; }

/* 頁尾 */

footer {
  border-top: 1px solid var(--rule);
  padding: 26px 0 40px;
  font-size: 12px;
  color: var(--muted);
}

.footer__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  align-items: baseline;
}

.footer__inner a { text-decoration: none; }
.footer__inner a:hover { text-decoration: underline; }
.footer__inner .spacer { margin-left: auto; }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; gap: 34px; padding-top: 44px; }
  .cols { grid-template-columns: 1fr; }
  .col { border-right: 0; padding: 18px 0; border-bottom: 1px solid var(--hair); }
  .col:not(:first-child) { padding-left: 0; }
  .readonly, .install, .limits { grid-template-columns: 1fr; }
  .shot__body { grid-template-columns: 132px minmax(0, 1fr); }
  .nav { display: none; }
}

@media (max-width: 560px) {
  .wrap { width: calc(100% - 32px); }
  .trow { grid-template-columns: minmax(0, 1fr) 64px; font-size: 11px; }
  .trow .state { display: none; }
  .trow--head span:nth-child(3),
  .trow--head span:nth-child(4) { display: none; }
  .shot__body { grid-template-columns: 108px minmax(0, 1fr); }
  .shot__rail { font-size: 10.5px; }
  .rail-item { padding: 4px 8px; gap: 4px; }
  .shot__chrome { padding-left: 10px; }
  .shot__actions .chip-btn:first-child { display: none; }
  .hero__actions .btn { height: 44px; flex: 1 1 auto; justify-content: center; }
  .chips { gap: 6px; }
  .chip { font-size: 11.5px; height: 24px; }
  .hero { padding: 32px 0 28px; }
  .shot__ledger { display: none; }
  .trow { grid-template-columns: minmax(0, 1.5fr) 0.9fr 0.8fr; }
  .trow .src { display: none; }
  .section-pad { padding: 40px 0; }
  .section-head { flex-direction: column; gap: 4px; }
}

/* 交通燈配色與面板註腳（避免 inline style，才能套嚴格 CSP） */
.light--r { background: #ff5f57; }
.light--y { background: #febc2e; }
.light--g { background: #28c840; }

.panel-note {
  margin: 16px 0 0;
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.7;
}

/* ── 動態 ─────────────────────────────────────────────── */

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

@keyframes panel-rise {
  from {
    opacity: 0;
    transform: translateY(22px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

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

@keyframes glow {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.3;
  }
}

/* 首屏載入：文字與示範面板依序浮現（純 CSS，不需要等 JS） */
@media (prefers-reduced-motion: no-preference) {
  .hero h1 { animation: rise 620ms var(--ease) both; }
  .hero p.lead { animation: rise 620ms var(--ease) 90ms both; }
  .hero__actions { animation: rise 620ms var(--ease) 170ms both; }
  .hero__meta { animation: rise 620ms var(--ease) 240ms both; }
  .shot { animation: panel-rise 780ms var(--ease) 150ms both; }

  .shot__rail .rail-item { animation: row-rise 420ms var(--ease) both; }
  .shot__rail .rail-item:nth-child(1) { animation-delay: 250ms; }
  .shot__rail .rail-item:nth-child(2) { animation-delay: 300ms; }
  .shot__rail .rail-item:nth-child(3) { animation-delay: 350ms; }
  .shot__rail .rail-item:nth-child(4) { animation-delay: 400ms; }
  .shot__rail .rail-item:nth-child(5) { animation-delay: 450ms; }
  .shot__rail .rail-item:nth-child(6) { animation-delay: 500ms; }
  .shot__rail .rail-item:nth-child(7) { animation-delay: 550ms; }

  .shot__table .trow { animation: row-rise 420ms var(--ease) both; }
  .shot__table .trow:nth-child(1) { animation-delay: 280ms; }
  .shot__table .trow:nth-child(2) { animation-delay: 330ms; }
  .shot__table .trow:nth-child(3) { animation-delay: 380ms; }
  .shot__table .trow:nth-child(4) { animation-delay: 430ms; }
  .shot__table .trow:nth-child(5) { animation-delay: 480ms; }

  /* 需要更新的項目：偶爾呼吸一下 */
  .shot .state--todo i { animation: glow 2600ms ease-in-out infinite; }
}

/* 捲動進場：JS 加上 data-reveal 後才先隱藏，沒 JS 時完全不受影響 */
[data-reveal] {
  transition:
    opacity 620ms var(--ease),
    transform 620ms var(--ease);
  transition-delay: var(--reveal-delay, 0ms);
}

@media (prefers-reduced-motion: no-preference) {
  .js [data-reveal] {
    opacity: 0;
    transform: translateY(18px);
  }

  .js [data-reveal].is-visible {
    opacity: 1;
    transform: none;
  }
}

/* 切換深淺色時短暫補上顏色過渡，避免整頁瞬切 */
html.theme-fade,
html.theme-fade *,
html.theme-fade *::before,
html.theme-fade *::after {
  transition-property: background-color, border-color, color, fill, box-shadow !important;
  transition-duration: 260ms !important;
  transition-timing-function: ease !important;
  transition-delay: 0ms !important;
}

/* ── v0.4.1 設計質感與互動強化 ────────────────────────── */

.scroll-progress {
  position: absolute;
  left: 0;
  bottom: -1px;
  height: 2px;
  width: 100%;
  background: var(--amber);
  transform-origin: left;
  transform: scaleX(0);
  pointer-events: none;
  opacity: 0.85;
}

.hero-band {
  position: relative;
  background-image: radial-gradient(color-mix(in srgb, var(--ink) 11%, transparent) 1px, transparent 1px);
  background-size: 22px 22px;
  background-position: top center;
}

.hero-band::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    color-mix(in srgb, var(--paper) 15%, transparent) 0%,
    color-mix(in srgb, var(--paper) 82%, transparent) 72%,
    var(--paper) 100%
  );
  pointer-events: none;
}

.hero-band > .wrap {
  position: relative;
  z-index: 1;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px;
  margin-bottom: 18px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: var(--sheet);
  font-size: 12px;
  color: var(--ink-soft);
  box-shadow: 0 2px 10px -6px var(--shadow);
}

.eyebrow__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
}

.meta-link {
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--rule);
  transition: text-decoration-color 160ms ease, color 160ms ease;
}

.meta-link:hover {
  color: var(--ink);
  text-decoration-color: var(--amber);
}

/* 互動示範面板強化 */

.chip-btn--interactive {
  cursor: pointer;
  font-family: inherit;
  transition:
    border-color 160ms ease,
    background-color 160ms ease,
    color 160ms ease,
    transform 160ms var(--ease);
}

.chip-btn--interactive:hover:not(:disabled) {
  border-color: var(--amber);
  color: var(--amber);
  background: var(--amber-bg);
}

.chip-btn--interactive:active:not(:disabled) {
  transform: scale(0.96);
}

.chip-btn--interactive:disabled {
  opacity: 0.65;
  cursor: wait;
}

.shot__bar {
  height: 2px;
  background: var(--hair);
  overflow: hidden;
  position: relative;
}

.shot__bar i {
  display: block;
  width: 38%;
  height: 100%;
  background: var(--amber);
  transform: translateX(-100%);
  opacity: 0;
}

.shot__bar.is-busy i {
  opacity: 1;
  animation: sweep 900ms var(--ease) infinite;
}

@keyframes sweep {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(360%); }
}

.shot__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 14px;
  border-top: 1px solid var(--rule);
  background: var(--paper);
  font-size: 10.5px;
  color: var(--muted);
}

.shot__diff {
  color: var(--green);
  font-family: var(--mono);
}

.shot__hint {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.trow.is-switching {
  animation: row-rise 260ms var(--ease) both;
}

/* 四欄核心工作流 */

.cols--4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.cols--4 .col {
  padding: 22px 18px 4px 18px;
}

.cols--4 .col:first-child {
  padding-left: 0;
}

.cols--4 .col:last-child {
  padding-right: 0;
}

/* 分類篩選器 */

.section-head--split {
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
}

.section-head--split > div p {
  margin-top: 4px;
}

.seg-filter {
  display: inline-flex;
  border: 1px solid var(--rule);
  border-radius: 6px;
  background: var(--sheet);
  padding: 2px;
  gap: 2px;
}

.seg-filter button {
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  padding: 5px 10px;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 160ms ease, color 160ms ease;
}

.seg-filter button:hover {
  color: var(--ink);
}

.seg-filter button.is-active {
  background: var(--ink);
  color: var(--btn-ink);
  font-weight: 500;
}

.chip.is-dimmed {
  opacity: 0.28;
  transform: scale(0.96);
}

/* SHA-256 校驗區塊 */

.verify-box {
  margin-top: 20px;
  padding: 18px 20px;
  border: 1px solid var(--rule);
  border-radius: 8px;
  background: var(--sheet);
}

.verify-box__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.verify-box h3 {
  margin: 0 0 4px;
  font-size: 14.5px;
}

.verify-box p {
  margin: 0;
  font-size: 12.5px;
  color: var(--muted);
}

.code-row {
  margin-top: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px 8px 14px;
  border: 1px solid var(--hair);
  border-radius: 6px;
  background: var(--slot);
}

.code-row code {
  flex: 1;
  border: 0;
  background: transparent;
  padding: 0;
  font-size: 12px;
  overflow-x: auto;
  white-space: nowrap;
}

@media (prefers-reduced-motion: no-preference) {
  .eyebrow { animation: rise 540ms var(--ease) both; }
  .eyebrow__dot { animation: glow 2800ms ease-in-out infinite; }
}

@media (max-width: 960px) {
  .cols--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cols--4 .col { border-right: 0; border-bottom: 1px solid var(--hair); padding: 18px 0; }
  .cols--4 .col:nth-child(odd) { padding-right: 18px; }
  .cols--4 .col:nth-child(even) { padding-left: 18px; }
}

@media (max-width: 600px) {
  .cols--4 { grid-template-columns: 1fr; }
  .cols--4 .col:nth-child(odd),
  .cols--4 .col:nth-child(even) { padding: 16px 0; }
  .shot__foot { flex-direction: column; align-items: flex-start; gap: 2px; }
  .code-row { flex-direction: column; align-items: stretch; }
}

/* ── 全新下載專區（第二部分）──────────────────────────── */

.dl-section {
  background: linear-gradient(
    to bottom,
    color-mix(in srgb, var(--plate) 45%, var(--paper)) 0%,
    var(--paper) 100%
  );
}

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

.dl-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 22px;
  border: 1px solid var(--rule);
  border-radius: 10px;
  background: var(--sheet);
  transition:
    border-color 200ms ease,
    transform 240ms var(--ease),
    box-shadow 240ms var(--ease);
}

.dl-card:hover {
  border-color: var(--faint);
  transform: translateY(-3px);
  box-shadow: 0 18px 34px -22px var(--shadow);
}

.dl-card--featured {
  border-color: color-mix(in srgb, var(--amber) 48%, var(--rule));
  box-shadow: 0 14px 30px -24px var(--shadow);
}

.dl-card--featured::before {
  content: "";
  position: absolute;
  left: 16px;
  right: 16px;
  top: -1px;
  height: 2px;
  background: var(--amber);
  border-radius: 0 0 2px 2px;
}

.dl-card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}

.dl-card__brand {
  display: flex;
  align-items: center;
  gap: 11px;
}

.dl-card__icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--hair);
  border-radius: 8px;
  background: var(--rail);
  color: var(--ink);
  flex: none;
}

.dl-card--featured .dl-card__icon {
  background: var(--amber-bg);
  border-color: var(--amber-line);
  color: var(--amber);
}

.dl-card h3 {
  margin: 0;
  font-size: 15.5px;
  font-weight: 620;
  line-height: 1.25;
}

.dl-card__arch {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  color: var(--muted);
}

.dl-badge {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  border: 1px solid var(--hair);
  border-radius: 999px;
  background: var(--slot);
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
  white-space: nowrap;
}

.dl-badge--amber {
  border-color: var(--amber-line);
  background: var(--amber-bg);
  color: var(--amber);
}

.dl-card__desc {
  margin: 0 0 20px;
  font-size: 13px;
  line-height: 1.65;
  color: var(--ink-soft);
  flex: 1;
}

.dl-card__btn {
  width: 100%;
  justify-content: space-between;
  height: 42px;
  padding: 0 14px;
}

/* ── 1 分鐘宣傳影片劇院框 ─────────────────────────────── */

.promo-stage {
  border: 1px solid var(--rule);
  border-radius: 12px;
  background: var(--sheet);
  box-shadow: 0 22px 48px -24px var(--shadow);
  overflow: hidden;
  transition: border-color 220ms ease, box-shadow 220ms ease;
}

.promo-stage:hover {
  border-color: var(--faint);
}

.promo-stage__bar {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 40px;
  padding: 0 16px;
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
}

.promo-stage__label {
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-soft);
}

.promo-stage__spec {
  margin-left: auto;
  font-size: 11px;
  color: var(--muted);
}

.promo-stage__frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #0d1012;
}

.promo-video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #0d1012;
}

@media (max-width: 900px) {
  .dl-grid {
    grid-template-columns: 1fr;
  }
}

/* ── GitHub Sponsors 贊助區塊 ─────────────────────────── */

.sponsor-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 28px 30px;
  border: 1px solid color-mix(in srgb, var(--amber) 38%, var(--rule));
  border-radius: 12px;
  background: linear-gradient(
    135deg,
    color-mix(in srgb, var(--amber-bg) 55%, var(--sheet)) 0%,
    var(--sheet) 65%
  );
  box-shadow: 0 16px 36px -26px var(--shadow);
}

.sponsor-card__body {
  max-width: 38em;
}

.sponsor-card__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
  font-size: 12px;
  font-weight: 600;
  color: var(--amber);
}

.sponsor-card h2 {
  margin: 0 0 8px;
  font-size: 20px;
  letter-spacing: -0.015em;
  font-weight: 620;
}

.sponsor-card p {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--ink-soft);
}

.sponsor-card__actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: none;
}

.sponsor-card__actions .btn {
  justify-content: center;
  min-width: 210px;
}

.btn--sponsor svg {
  color: #e56b8b;
  transition: transform 200ms var(--ease);
}

.btn--sponsor:hover svg {
  transform: scale(1.16);
}

@media (max-width: 820px) {
  .sponsor-card {
    flex-direction: column;
    align-items: stretch;
    padding: 22px;
  }
  .sponsor-card__actions {
    flex-direction: row;
    flex-wrap: wrap;
  }
  .sponsor-card__actions .btn {
    flex: 1 1 auto;
    min-width: 0;
  }
}

/* ── 隱私權政策頁 ───────────────────────────────────────── */

.legal-page {
  max-width: 760px;
  padding: 56px 0 72px;
}

.legal-page h1 {
  margin: 0 0 8px;
  font-size: clamp(26px, 3.6vw, 34px);
  letter-spacing: -0.025em;
}

.legal-page__meta {
  margin: 0 0 32px;
  font-size: 13px;
  color: var(--ink-mute);
}

.legal-page h2 {
  margin: 28px 0 10px;
  font-size: 18px;
  letter-spacing: -0.015em;
}

.legal-page p,
.legal-page li {
  font-size: 14.5px;
  line-height: 1.75;
  color: var(--ink-soft);
}

.legal-page ul {
  margin: 8px 0 16px;
  padding-left: 20px;
}

.legal-page a {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--rule);
}

.legal-page a:hover {
  text-decoration-color: var(--amber);
}
