/* 功能頁（/workflow/、/memory/、/quota/、/pro/）：建立在 site.css 的設計元素上，只加功能頁自己的版面 */

.fx .nav a[aria-current="page"] {
  color: var(--ink);
  font-weight: 600;
}

.fx-crumbs {
  display: flex;
  gap: 8px;
  font-size: var(--step-small);
  color: var(--soft);
}

.fx-crumbs a {
  color: var(--soft);
}

.fx-crumbs a:hover {
  color: var(--accent);
}

/* 頁首 */
.fx-hero {
  padding-block: clamp(32px, 5vw, 64px) clamp(56px, 8vw, 112px);
}

.fx-eyebrow {
  display: inline-block;
  padding: 4px 10px;
  background: var(--accent-tint);
  color: var(--accent);
  font-size: var(--step-small);
  font-weight: 600;
}

.fx-hero h1 {
  margin-top: 20px;
  font-size: var(--step-display);
  max-width: 13em;
}

.fx-lede {
  margin-top: 24px;
  max-width: 58ch;
  font-size: var(--step-lead);
  line-height: 1.45;
  color: var(--soft);
}

.fx-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.fx-facts {
  list-style: none;
  margin: clamp(40px, 6vw, 72px) 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
}

.fx-facts li {
  padding-top: 14px;
  border-top: 2px solid var(--ink);
  display: grid;
  gap: 6px;
  align-content: start;
}

.fx-facts strong {
  font-size: var(--step-head);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--accent);
}

.fx-facts span {
  font-size: var(--step-small);
  color: var(--soft);
}

/* 內容段落：左文右圖，偶數段左右對調 */
.fx-sec {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: clamp(12px, 2vw, 32px);
  row-gap: 32px;
  align-items: start;
  padding-block: clamp(56px, 7vw, 104px);
  border-top: 1px solid var(--tone);
  scroll-margin-top: 24px;
}

.fx-copy {
  grid-column: 1 / 6;
}

.fx-media {
  grid-column: 7 / 13;
  display: grid;
  gap: 16px;
}

.fx-sec.is-flip .fx-copy {
  grid-column: 8 / 13;
  grid-row: 1;
}

.fx-sec.is-flip .fx-media {
  grid-column: 1 / 7;
  grid-row: 1;
}

.fx-sec.is-wide .fx-copy {
  grid-column: 1 / 9;
}

.fx-sec.is-wide .fx-media {
  grid-column: 1 / -1;
}

.fx-copy h2 {
  font-size: var(--step-head);
  line-height: 1.15;
}

.fx-copy > p {
  margin-top: 18px;
  max-width: 56ch;
  color: var(--soft);
}

.fx-copy > p strong {
  color: var(--ink);
  font-weight: 600;
}

.fx-copy code,
.fx-faq code,
.fx-table code {
  font-size: 0.9em;
  padding: 0.1em 0.3em;
  border-radius: 4px;
  background: var(--tone);
  color: var(--ink);
  overflow-wrap: anywhere;
}

.fx-list {
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 12px;
  font-size: var(--step-small);
  color: var(--soft);
}

.fx-list li {
  position: relative;
  padding-left: 18px;
}

.fx-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 7px;
  height: 7px;
  background: var(--orange);
}

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

.fx-tag {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 8px;
  border: 1px solid #f0cf9c;
  border-radius: 999px;
  background: #fdf5e8;
  color: #a6600a;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.5;
  vertical-align: 2px;
}

.fx-tag.is-free {
  border-color: #b9dcc7;
  background: var(--green-tint);
  color: var(--green);
}

/* 編號步驟 */
.fx-steps {
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 18px;
  counter-reset: fx-step;
}

.fx-steps li {
  counter-increment: fx-step;
  display: grid;
  grid-template-columns: 2.4em minmax(0, 1fr);
  column-gap: 10px;
  font-size: var(--step-small);
  color: var(--soft);
}

.fx-steps li::before {
  content: counter(fx-step, decimal-leading-zero);
  font-size: var(--step-lead);
  line-height: 1;
  color: var(--accent);
}

.fx-steps strong {
  display: block;
  margin-bottom: 4px;
  font-size: var(--step-body);
  font-weight: 600;
  color: var(--ink);
}

/* App 元件的模擬畫面（沿用 site.css 的 [data-ui]） */
.fx-media [data-ui] {
  overflow: hidden;
  transition:
    transform 220ms var(--ease),
    box-shadow 220ms var(--ease);
}

.fx-media [data-ui]:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 40px -24px rgba(21, 19, 31, 0.4);
}

.fx-head {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 12px;
  border-bottom: 1px solid #ecebf0; /* taste-skill-ignore：App 元件（data-ui）本身的樣式 */
}

.fx-head .spacer {
  flex: 1;
}

.fx-rows > .ui-row + .ui-row {
  border-top: 1px solid #ecebf0; /* taste-skill-ignore：App 元件（data-ui）本身的樣式 */
}

.fx-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 10px;
}

.fx-line .spacer {
  flex: 1;
}

.fx-note {
  font-size: 13px;
  color: #6b6878;
}

.fx-meter {
  display: grid;
  grid-template-columns: 7.5em minmax(0, 1fr) 3.2em;
  align-items: center;
  gap: 12px;
}

.fx-bar {
  height: 8px;
  border-radius: 999px;
  background: #ecebf0;
  overflow: hidden;
}

.fx-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--green);
}

.fx-bar i.is-warn {
  background: #e0a028;
}

.fx-bar i.is-bad {
  background: var(--red);
}

.fx-num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.fx-diff {
  margin: 0;
  padding: 10px 0;
  border-radius: 8px;
  background: #f7f6fa;
  overflow-x: auto;
  font-size: 12.5px;
  line-height: 1.6;
}

.fx-diff code {
  display: block;
  white-space: normal;
}

.fx-diff .ln {
  display: block;
  padding: 0 12px;
  white-space: pre;
}

.fx-diff .add {
  background: #e7f6ec;
  color: #17643a;
}

.fx-media .ui-button {
  padding: 5px 12px;
  font-size: 13px;
}

/* 免費與 Pro 的對照表 */
.fx-table {
  grid-column: 1 / -1;
  overflow-x: auto;
}

.fx-table table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--step-small);
}

.fx-table th,
.fx-table td {
  text-align: left;
  vertical-align: top;
  padding: 14px 16px;
  border-bottom: 1px solid var(--tone);
}

.fx-table thead th {
  font-size: var(--step-body);
  font-weight: 600;
  border-bottom: 2px solid var(--ink);
}

.fx-table tbody th {
  font-weight: 600;
  width: 22%;
}

.fx-table .is-pro {
  background: var(--accent-tint);
}

.fx-table thead .is-pro {
  color: var(--accent);
}

/* 模擬畫面裡的表格：照 App 元件的字級 */
[data-ui] .fx-table th,
[data-ui] .fx-table td {
  padding: 9px 16px;
  font-size: 13px;
  border-bottom: 1px solid #ecebf0; /* taste-skill-ignore：App 元件（data-ui）本身的樣式 */
}

[data-ui] .fx-table thead th {
  font-weight: 400;
  color: #6b6878;
}

[data-ui] .fx-table tbody th {
  width: auto;
}

[data-ui] .fx-table tbody tr:last-child > * {
  border-bottom: 0;
}

/* 常見問題 */
.fx-faq {
  padding-block: clamp(56px, 7vw, 104px);
  border-top: 1px solid var(--tone);
  scroll-margin-top: 24px;
}

.fx-faq h2 {
  font-size: var(--step-head);
}

.fx-faq-list {
  margin-top: 28px;
  max-width: 860px;
  border-top: 1px solid var(--tone);
}

.fx-q {
  border-bottom: 1px solid var(--tone);
}

.fx-q summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 0;
  font-size: var(--step-body);
  font-weight: 600;
}

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

.fx-q summary::after {
  content: "+";
  flex: none;
  color: var(--accent);
  font-weight: 400;
  transition: transform 200ms var(--ease);
}

.fx-q[open] summary::after {
  transform: rotate(45deg);
}

.fx-q summary:hover {
  color: var(--accent);
}

.fx-q > div {
  padding-bottom: 22px;
  max-width: 72ch;
  color: var(--soft);
}

.fx-q > div p + p {
  margin-top: 10px;
}

/* 結尾：下載與相關頁面 */
.fx-cta {
  padding-block: clamp(40px, 5vw, 72px);
}

.fx-cta-box {
  padding: clamp(28px, 5vw, 64px);
  background: var(--accent);
  color: var(--accent-ink);
}

.fx-cta-box h2 {
  font-size: var(--step-head);
}

.fx-cta-box p {
  margin-top: 14px;
  max-width: 60ch;
  opacity: 0.9;
}

.fx-cta-box .button {
  background: var(--ink);
}

.fx-cta-box .button:hover {
  background: #000000;
}

.fx-cta-box .button.is-light {
  background: var(--ground);
  color: var(--ink);
}

.fx-related {
  padding-block: clamp(24px, 4vw, 56px) clamp(48px, 6vw, 88px);
}

.fx-related h2 {
  font-size: var(--step-lead);
  font-weight: 600;
}

.fx-related ul {
  list-style: none;
  margin: 20px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
}

.fx-related a {
  display: grid;
  gap: 6px;
  padding-top: 14px;
  border-top: 2px solid var(--ink);
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  transition: border-color 200ms var(--ease);
}

.fx-related a:hover {
  border-top-color: var(--accent);
  color: var(--accent);
}

.fx-related-text {
  font-size: var(--step-small);
  font-weight: 400;
  color: var(--soft);
}

.fx-foot {
  padding-block: 32px 48px;
  border-top: 1px solid var(--tone);
  display: grid;
  gap: 8px;
  font-size: var(--step-small);
  color: var(--soft);
}

.fx-foot a {
  color: var(--soft);
}

.fx-foot a:hover {
  color: var(--accent);
}

/* Pro 頁的客群卡片：桌面三欄，窄螢幕一欄 */
.fx-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(12px, 2vw, 24px);
}

.fx-card {
  padding: clamp(18px, 2vw, 28px);
  background: var(--tone);
  display: grid;
  align-content: start;
  gap: 10px;
}

.fx-card h3 {
  font-size: var(--step-lead);
  line-height: 1.3;
  font-weight: 600;
}

.fx-card p {
  font-size: var(--step-small);
  color: var(--soft);
}

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

@media (max-width: 1100px) {
  .fx-facts,
  .fx-related ul {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .fx-copy,
  .fx-media,
  .fx-sec.is-flip .fx-copy,
  .fx-sec.is-flip .fx-media,
  .fx-sec.is-wide .fx-copy {
    grid-column: 1 / -1;
    grid-row: auto;
  }

  .fx-related ul {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .fx-facts {
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }

  .fx-meter {
    grid-template-columns: 6em minmax(0, 1fr) 3em;
    gap: 8px;
  }

  .fx-table th,
  .fx-table td {
    padding: 10px 8px;
  }

  .fx-table tbody th {
    width: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .fx-media [data-ui],
  .fx-q summary::after {
    transition: none !important;
    transform: none !important;
  }
}

/* ==== 下載頁（/download/）：自動下載提示、SmartScreen 示意、校驗碼 ==== */
.dl-hero .fx-actions {
  align-items: center;
}

.dl-hero .meta {
  font-size: var(--step-small);
  color: var(--soft);
}

.dl-started {
  margin-top: 20px;
  padding: 12px 16px;
  border-radius: 10px;
  background: var(--green-tint);
  color: var(--green);
  font-weight: 600;
  max-width: 40em;
}

.dl-trust {
  margin-top: 18px;
  font-size: var(--step-small);
  color: var(--soft);
}

.dl-shot {
  margin: 0;
}

/* SmartScreen 對話框示意：照 Windows 的藍底白字，不跟網站配色 */
.dl-dialog {
  padding: 28px 28px 22px;
  border-radius: 6px;
  background: #1f5fa8;
  color: #ffffff;
  font-family: "Segoe UI", system-ui, sans-serif;
  box-shadow: 0 18px 40px rgba(21, 19, 31, 0.18);
}

.dl-dialog p {
  margin: 0;
}

.dl-dialog-title {
  font-size: 1.6rem;
  font-weight: 300;
  line-height: 1.2;
}

.dl-dialog-text {
  margin-top: 14px !important;
  font-size: 0.875rem;
  line-height: 1.5;
}

.dl-dialog-more {
  margin-top: 12px !important;
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.dl-dialog-meta {
  margin-top: 18px !important;
  font-size: 0.875rem;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.dl-dialog-buttons {
  margin-top: 26px;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.dl-dialog-buttons > span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 18px;
  border: 2px solid rgba(255, 255, 255, 0.85);
  font-size: 0.875rem;
}

.dl-dialog-run {
  outline: 3px solid #ffd54a;
  outline-offset: 3px;
}

.dl-mark {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #ffd54a;
  color: #15131f;
  font-size: 0.75rem;
  font-weight: 700;
  flex: none;
}

.dl-dialog-more .dl-mark + u {
  outline: 3px solid #ffd54a;
  outline-offset: 3px;
}

.dl-shot figcaption {
  margin-top: 12px;
}

.dl-code {
  margin: 16px 0 0;
  padding: 14px 16px;
  border-radius: 10px;
  background: var(--ink);
  color: #ffffff;
  font-size: 0.875rem;
  overflow-x: auto;
}

.dl-hash {
  margin-top: 14px;
  display: grid;
  gap: 4px;
}

.dl-hash span {
  font-size: var(--step-small);
  color: var(--soft);
}

.dl-hash code {
  overflow-wrap: anywhere;
  font-size: 0.875rem;
}

.dl-code code {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font-size: inherit;
}

/* ==== 攻略頁（/guides/）：長文閱讀版面 ==== */
.gd {
  max-width: 46rem;
  padding-bottom: clamp(32px, 5vw, 64px);
}

.gd-head {
  padding-block: clamp(24px, 4vw, 48px) clamp(20px, 3vw, 32px);
}

.gd-head h1 {
  margin-top: 18px;
  font-size: clamp(2.25rem, 1.6rem + 2.6vw, 3.5rem);
  line-height: 1.08;
}

.gd-head .fx-lede {
  margin-top: 18px;
}

.gd-updated {
  margin-top: 14px;
  font-size: var(--step-small);
  color: var(--soft);
}

.gd-short {
  margin-top: 8px;
  padding: 20px 22px;
  border-left: 4px solid var(--accent);
  border-radius: 0 12px 12px 0;
  background: var(--accent-tint);
}

.gd-short h2 {
  font-size: var(--step-small);
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--accent);
}

.gd-short p,
.gd-short li {
  font-size: var(--step-body);
  line-height: 1.6;
}

.gd-short p {
  margin-top: 8px;
}

.gd-sec {
  margin-top: clamp(40px, 6vw, 64px);
}

.gd-sec h2 {
  font-size: var(--step-head);
  line-height: 1.15;
}

.gd-sec h3 {
  margin-top: 28px;
  font-size: var(--step-lead);
  font-weight: 600;
}

.gd-sec > p,
.gd-sec > ul,
.gd-sec > ol,
.gd-sec > .gd-table,
.gd-sec > pre {
  margin-top: 16px;
}

.gd-sec p {
  font-size: var(--step-body);
  line-height: 1.7;
}

.gd-sec .fx-list li,
.gd-sec .fx-steps li {
  font-size: var(--step-body);
  line-height: 1.65;
}

.gd-sec .fx-steps li {
  color: var(--ink);
}

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

.gd code {
  padding: 1px 5px;
  border-radius: 5px;
  background: var(--tone);
  font-size: 0.9em;
}

.gd-code {
  padding: 14px 16px;
  border-radius: 10px;
  background: var(--ink);
  color: #ffffff;
  font-size: 0.875rem;
  line-height: 1.6;
  overflow-x: auto;
}

.gd-code code {
  padding: 0;
  background: none;
  color: inherit;
  font-size: inherit;
}

.gd-note {
  padding: 12px 16px;
  border-radius: 10px;
  background: var(--orange-tint);
  font-size: var(--step-small) !important;
}

.gd-table {
  overflow-x: auto;
}

.gd-table table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--step-small);
}

.gd-table th,
.gd-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--tone);
  text-align: left;
  vertical-align: top;
}

.gd-table thead th {
  border-bottom: 2px solid var(--ink);
  font-weight: 600;
}

.gd-pyloxa {
  padding: 24px 24px 28px;
  border-radius: 16px;
  background: var(--tone);
}

.gd-sources ol {
  padding-left: 1.4em;
}

.gd-sources li {
  margin-top: 6px;
  font-size: var(--step-small);
  color: var(--soft);
  overflow-wrap: anywhere;
}

.gd-page .fx-related ul {
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}

/* 攻略索引頁 */
.gd-index {
  padding-bottom: clamp(32px, 5vw, 64px);
}

.gd-cards {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.gd-cards a {
  height: 100%;
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 22px;
  border-radius: 16px;
  background: #ffffff;
  border: 1px solid var(--tone);
  color: var(--ink);
  text-decoration: none;
  transition:
    border-color 200ms var(--ease),
    transform 200ms var(--ease);
}

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

.gd-card-title {
  font-size: var(--step-lead);
  font-weight: 600;
  line-height: 1.25;
}

.gd-card-text {
  font-size: var(--step-small);
  color: var(--soft);
}

.gd-card-more {
  font-size: var(--step-small);
  font-weight: 600;
  color: var(--accent);
}

@media (prefers-reduced-motion: reduce) {
  .gd-cards a {
    transition: none;
  }
  .gd-cards a:hover {
    transform: none;
  }
}
