/* 支援、隱私權、條款、Pro 和活動頁。這些頁面會跟著系統的深色模式，深色時只換 site.css 的顏色變數。 */
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --canvas: #191816; --tint: #23211d; --butter: #3a3320; --blush: #3b2327; --stone: #2c2924;
    --ink: #f4eedd; --ink-80: #d9d2c0; --gray: #9a9384; --muted: #aaa392; --hairline: #3a362f; --pill: #2f2c27;
    --link: var(--y);
  }
  :focus-visible { outline-color: var(--y); }
  .subnav { background: rgba(25, 24, 22, .86); border-bottom-color: rgba(255, 249, 229, .12); }
  .heroband :focus-visible { outline-color: var(--k); }
}

.kicker { color: var(--r); font-size: 14px; font-weight: 700; }
@media (prefers-color-scheme: dark) { .kicker { color: var(--y); } }

/* ------------------------------------------------ 條款類頁面：目錄＋內文 */
.doc { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 64px; align-items: start; }
.toc { position: sticky; top: 24px; }
.toc ol { margin-top: 12px; counter-reset: toc; }
.toc li { counter-increment: toc; }
.toc a { display: flex; gap: 10px; min-height: 36px; align-items: center; color: var(--ink-80); font-size: 14px; }
.toc a::before { content: counter(toc); width: 18px; color: var(--gray); font-variant-numeric: tabular-nums; }
.doc__body { max-width: 720px; }
.doc__body > section { padding: 32px 0; border-top: 1px solid var(--hairline); }
.doc__body > section:first-of-type { border-top: 0; }
.doc__body h2 { font: 600 32px/1.15 var(--font-display); }
.doc__body p, .doc__body li { color: var(--ink-80); line-height: 1.6; }
.doc__body p { margin-top: 14px; }
.doc__body ul { margin-top: 14px; display: grid; gap: 10px; }
.doc__body li { position: relative; padding-left: 20px; }
.doc__body li::before { content: ""; position: absolute; left: 2px; top: .7em; width: 7px; height: 7px; border-radius: 50%; background: var(--r); }
.doc__body b { color: var(--ink); font-weight: 600; }
.doc__body a, .faq p a, .note a, .facts a { text-decoration: underline; text-underline-offset: 3px; }

.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.facts--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0; }
.facts > div { --sq: 30px; padding: 22px; border-radius: 18px; background: var(--tint); corner-shape: squircle; }
.facts b { font: 600 19px/1.25 var(--font-display); color: var(--ink); }
.facts p { margin-top: 6px; color: var(--ink-80); font-size: 15px; line-height: 1.5; }

.tbl { margin-top: 16px; overflow-x: auto; border: 1px solid var(--hairline); border-radius: 16px; }
.tbl table { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 1.45; }
.tbl th, .tbl td { padding: 12px 16px; text-align: left; vertical-align: top; border-top: 1px solid var(--hairline); }
.tbl thead th { border-top: 0; background: var(--tint); color: var(--muted); font-size: 13px; font-weight: 600; }
.tbl tbody th { color: var(--ink); font-weight: 600; }
.tbl td { color: var(--ink-80); }

/* ------------------------------------------------ 步驟 */
.steps--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.steps--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.sec:not(.sec--tint) .step { background: var(--tint); }
.step small { display: grid; place-items: center; width: 32px; height: 32px; margin-bottom: 16px; border-radius: 50%; background: var(--k); color: var(--y); font-size: 15px; font-weight: 700; }
@media (prefers-color-scheme: dark) { .step small { background: var(--y); color: var(--k); } }
.step p b { color: var(--ink); }
.shead .left { color: var(--r); }
@media (prefers-color-scheme: dark) { .shead .left { color: var(--y); } }

/* ------------------------------------------------ Pro：課文書架 */
.feature { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 460px); gap: 64px; align-items: center; }
.feature__txt .shead { margin-top: 10px; }
.feature__txt > p:not(.kicker):not(.note) { margin-top: 20px; max-width: 480px; color: var(--ink-80); font-size: 19px; line-height: 1.5; }
.bk { position: relative; padding: 28px; border-radius: 32px; background: #fffdf6; color: #262421; box-shadow: var(--product-shadow); corner-shape: squircle; }
.bk__bar { display: flex; justify-content: space-between; color: #7a7468; font-size: 12px; }
.bk__title { margin-top: 18px; font: 700 26px/1.2 Georgia, "Times New Roman", serif; }
.bk__text { margin-top: 12px; font: 400 18px/1.7 Georgia, "Times New Roman", serif; }
.bk__hit { padding: 1px 3px; border-radius: 4px; background: #ffcf00; }
.bk__fix { text-decoration: underline wavy #2f6b4f; text-underline-offset: 4px; }
.bk__pop { position: relative; display: inline-grid; margin-top: 22px; gap: 2px; min-width: 190px; padding: 12px 14px; border-radius: 14px; background: #262421; color: #fff9e5; font-size: 14px; box-shadow: 0 10px 30px rgba(0, 0, 0, .25); }
.bk__pop b { font: 600 18px/1.2 Georgia, serif; }
.bk__pop i { margin-top: 6px; color: #ffcf00; font-style: normal; font-weight: 600; }
.bk__pop::before { content: ""; position: absolute; left: 36px; top: -7px; width: 14px; height: 14px; background: inherit; transform: rotate(45deg); }
.bk__chip { display: table; margin-top: 14px; padding: 7px 12px; border-radius: 999px; background: #e3efe8; color: #2f6b4f; font-size: 13px; font-weight: 600; }

.free { padding: 36px 40px; border-radius: 28px; background: var(--butter); corner-shape: squircle; }
.free b { display: block; font: 600 28px/1.25 var(--font-display); }
.free p { margin-top: 8px; color: var(--ink-80); }

/* ------------------------------------------------ Pro：方案 */
.plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-top: 48px; align-items: stretch; }
.plan { --sq: 36px; position: relative; display: flex; flex-direction: column; padding: 32px 28px 28px; border-radius: 32px; background: var(--canvas); color: var(--ink); corner-shape: squircle; }
.plan.t-yellow { background: var(--y); color: var(--k); }
.plan h3 { font: 600 28px/1.15 var(--font-display); }
.plan__flag { position: absolute; top: 22px; right: 22px; padding: 5px 11px; border-radius: 999px; background: var(--r); color: #fff; font-size: 13px; font-weight: 700; }
.plan__price { margin-top: 18px; font-size: 17px; }
.plan__price b { font: 600 44px/1 var(--font-display); }
.plan__year { margin-top: 6px; color: var(--muted); font-size: 15px; }
.plan.t-yellow .plan__year, .plan.t-yellow .plan__note, .plan.t-yellow li { color: #45413a; }
.plan ul { display: grid; gap: 8px; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--hairline); }
.plan.t-yellow ul { border-color: rgba(38, 36, 33, .2); }
.plan li { position: relative; padding-left: 24px; color: var(--ink-80); }
.plan li::before { content: "✓"; position: absolute; left: 0; color: var(--r); font-weight: 700; }
.plan__note { margin-top: 16px; font-size: 14px; line-height: 1.45; color: var(--muted); }
.plan__how { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px; margin-top: auto; padding-top: 24px; font-size: 14px; color: var(--muted); }
.plan__how b { color: inherit; }
.plan.t-yellow .plan__how { color: #45413a; }
.plan__os { margin-top: 14px; font-size: 13px; opacity: .8; }
.plan__os b { margin-right: 6px; font-weight: 600; }

.cmp { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-top: 40px; align-items: start; }
.tbl--cmp { margin: 0; }
.tbl caption { padding: 16px; text-align: left; font: 600 21px/1.2 var(--font-display); color: var(--ink); }
.tbl--cmp td:last-child { color: var(--ink); font-weight: 500; }
.tbl em { display: inline-block; margin-left: 4px; padding: 1px 7px; border-radius: 999px; background: var(--pill); color: var(--muted); font-size: 11px; font-style: normal; font-weight: 600; vertical-align: 2px; }

.tip { display: grid; grid-template-columns: minmax(0, 1fr) 240px; gap: 48px; align-items: center; }
.tip p { margin-top: 20px; max-width: 620px; color: var(--ink-80); }
.tip__badge { display: grid; place-items: center; gap: 10px; aspect-ratio: 1; border-radius: 50%; background: var(--k); color: var(--y); text-align: center; }
.tip__badge span { font-size: 64px; line-height: 1; margin-top: 40px; }
.tip__badge b { margin-bottom: 52px; font-size: 17px; }

/* ------------------------------------------------ 窄螢幕 */
@media (max-width: 1068px) {
  .doc { grid-template-columns: 180px minmax(0, 1fr); gap: 40px; }
  .plans { grid-template-columns: 1fr; max-width: 560px; }
  .plans .t-yellow { order: -1; }
  .cmp { grid-template-columns: 1fr; }
  .steps--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .feature { grid-template-columns: 1fr; gap: 40px; }
  .bk { max-width: 460px; }
}
@media (max-width: 734px) {
  .doc { grid-template-columns: 1fr; gap: 8px; }
  .toc { position: static; padding: 18px 20px; border-radius: 18px; background: var(--tint); }
  .doc__body h2 { font-size: 26px; }
  .facts, .facts--2, .steps--2, .steps--4 { grid-template-columns: 1fr; }
  .free { padding: 26px 22px; }
  .free b { font-size: 22px; }
  .plan { padding: 26px 22px 22px; }
  .plan__price b { font-size: 38px; }
  .tip { grid-template-columns: 1fr; gap: 28px; }
  .tip__badge { width: 180px; justify-self: center; }
  .tip__badge span { font-size: 48px; margin-top: 30px; }
  .tip__badge b { margin-bottom: 38px; }
  .bk { padding: 22px 20px; }
  .bk__text { font-size: 16px; }
  .tbl th, .tbl td { padding: 10px 12px; }
}
@media (prefers-color-scheme: dark) {
  .plan:not(.t-yellow) li::before { color: var(--y); }
  .doc__body li::before { background: var(--y); }
}
