/* pages.css — 關於我們、隱私權政策、服務條款這類獨立說明頁共用的樣式（不載入網站程式，也不用外部字體，頁面很輕） */
:root { --green: #087958; --green-dark: #065c43; --gold: #f5b301; --ink: #13362b; --muted: #4d6a5f; --cream: #fffaf0; --line: #d5e2db; --soft: #eef6f2; }
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--cream); color: var(--ink); font-family: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", system-ui, sans-serif; line-height: 1.85; -webkit-font-smoothing: antialiased; }
a { color: var(--green-dark); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 4px; }
/* 頁首跟首頁用同一份（css/landing.css 的 #landing-screen 規則），這裡只把整頁高度的限制拿掉 */
#landing-screen.page-head-host { min-height: 0; background: transparent; }
main { max-width: 860px; margin: 0 auto; padding: 40px 20px 72px; }
h1 { margin: 0 0 8px; font-size: 34px; line-height: 1.3; color: #0b4d3a; font-weight: 900; }
.lead { margin: 0 0 8px; font-size: 18px; color: var(--muted); }
.updated { margin: 0 0 32px; font-size: 14px; color: var(--muted); }
h2 { margin: 40px 0 8px; font-size: 24px; color: #0b4d3a; line-height: 1.4; padding-left: 12px; border-left: 6px solid var(--gold); }
h3 { margin: 22px 0 4px; font-size: 18px; color: #0b4d3a; }
p, li { font-size: 16px; }
ul, ol { padding-left: 1.4em; }
li { margin: 4px 0; }
.card { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 18px 20px; margin: 16px 0; }
.note { background: #fff7dd; border: 1px solid #f0d98a; border-radius: 12px; padding: 12px 16px; font-size: 15px; color: #4a3a00; }
table { width: 100%; border-collapse: collapse; margin: 12px 0; font-size: 15px; background: #fff; border: 1px solid var(--line); }
th, td { text-align: left; vertical-align: top; padding: 8px 12px; border-bottom: 1px solid var(--line); }
th { background: var(--soft); color: #0b4d3a; white-space: nowrap; }
.cta { display: inline-flex; align-items: center; min-height: 48px; margin-top: 12px; padding: 0 28px; border-radius: 999px; background: var(--green); color: #fff !important; text-decoration: none; font-weight: 800; }
footer.page-foot { background: var(--green-dark); color: #cfe8dc; }
.page-foot-in { max-width: 860px; margin: 0 auto; padding: 22px 20px; font-size: 14px; display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: center; }
.page-foot a { color: #fff; display: inline-flex; align-items: center; min-height: 44px; }
@media (max-width: 600px) {
  h1 { font-size: 28px; } h2 { font-size: 21px; } main { padding-top: 28px; }
  /* 手機上表格改成一列一張卡片：欄位名稱放在每格前面，不用擠成窄窄的三欄 */
  table, tbody, tr, td { display: block; }
  tr:first-child { display: none; }
  tr { padding: 10px 14px; border-bottom: 1px solid var(--line); }
  tr:last-child { border-bottom: 0; }
  td { border: 0; padding: 3px 0; }
  td::before { content: attr(data-label) "："; font-weight: 700; color: #0b4d3a; }
}

/* 理財小學堂文章頁：麵包屑、一句話重點、常見問題 */
.crumbs { margin: 0 0 14px; font-size: 14px; color: var(--muted); }
.crumbs a { display: inline-flex; align-items: center; min-height: 44px; }
.takeaway { background: var(--soft); border: 1px solid var(--line); border-left: 6px solid var(--green); border-radius: 12px; padding: 12px 16px; margin: 0 0 8px; color: #0b4d3a; }
.faq-item { background: #fff; border: 1px solid var(--line); border-radius: 12px; margin: 10px 0; padding: 0 16px; }
.faq-item summary { cursor: pointer; font-weight: 700; color: #0b4d3a; padding: 12px 0; min-height: 44px; }
.faq-item summary:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 6px; }
.faq-item p { margin: 0 0 14px; }
.card h3 { margin-top: 0; }
.card p { margin-bottom: 0; color: var(--muted); }
.note { margin: 16px 0; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
.promo { background: #fff; border: 2px solid var(--green); border-radius: 16px; padding: 4px 20px 20px; margin: 32px 0 16px; }
.promo h2 { margin-top: 16px; }
.promo-tip { font-size: 15px; color: var(--muted); }
/* 上一則／下一則：固定兩格，沒有的那一側留空，另一個按鈕位置不會跑掉 */
.prevnext { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 28px 0 0; }
.prevnext a { display: flex; flex-direction: column; gap: 2px; justify-content: center; min-height: 64px; padding: 10px 16px; background: #fff; border: 1px solid var(--line); border-radius: 12px; text-decoration: none; color: var(--ink); }
.prevnext a:hover { border-color: var(--green); }
.pn-next { text-align: right; align-items: flex-end; }
.pn-label { font-size: 14px; color: var(--muted); }
.pn-title { font-weight: 700; color: #0b4d3a; line-height: 1.4; }
@media (max-width: 600px) { .prevnext { grid-template-columns: 1fr; } .pn-empty { display: none; } }
.step-fig { margin: 12px 0 20px; }
.step-fig img { display: block; width: 100%; max-width: 360px; height: auto; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.step-fig figcaption { margin-top: 6px; font-size: 14px; color: var(--muted); }

/* 短影片播放器（js/demo-player.js）：舞台固定大小，換頁時下面的控制列不會跑位；沒有 JS 時各張直接排下來 */
.demo-player { margin: 24px 0; max-width: 380px; }
.dp-stage { position: relative; }
.dp-frame { margin: 0 0 16px; background: #fff; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.dp-frame img { display: block; width: 100%; height: auto; }
.dp-cap { margin: 0; padding: 10px 14px; font-size: 15px; font-weight: 700; color: #0b4d3a; background: var(--soft); border-top: 1px solid var(--line); }
.dp-end { padding: 28px 18px; text-align: center; }
.dp-end p { margin: 8px 0; }
.demo-player.ready .dp-stage { aspect-ratio: 540 / 840; background: #fff; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.demo-player.ready .dp-frame { position: absolute; inset: 0; margin: 0; border: 0; border-radius: 0; display: flex; flex-direction: column; justify-content: space-between; opacity: 0; visibility: hidden; transition: opacity .35s; }
.demo-player.ready .dp-frame.on { opacity: 1; visibility: visible; }
.demo-player.ready .dp-frame img { flex: 0 1 auto; min-height: 0; object-fit: contain; object-position: top; }
.demo-player.ready .dp-end { flex: 1; display: flex; flex-direction: column; justify-content: center; }
.demo-player.ready .dp-cap { flex: 0 0 auto; min-height: 64px; display: flex; align-items: center; }
.demo-player.no-motion .dp-frame { transition: none; }
.dp-big { position: absolute; right: 14px; bottom: 78px; width: 56px; height: 56px; border-radius: 50%; border: 3px solid #fff; background: rgba(8, 121, 88, .95); color: #fff; font-size: 22px; cursor: pointer; box-shadow: 0 8px 20px -6px rgba(0,0,0,.5); }
.demo-player.playing .dp-big, .demo-player.at-end .dp-big { display: none; }
.dp-big:focus-visible, .dp-btn:focus-visible, .dp-dot:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
.dp-ctl { display: flex; align-items: center; gap: 6px; margin-top: 10px; }
.dp-btn { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: #fff; color: #0b4d3a; font-size: 18px; cursor: pointer; }
.dp-play { background: var(--green); color: #fff; border-color: var(--green); }
.dp-dots { display: flex; gap: 2px; flex: 1; justify-content: center; }
.dp-dot { width: 24px; height: 44px; border: 0; background: transparent; cursor: pointer; position: relative; padding: 0; }
.dp-dot::after { content: ""; position: absolute; left: 4px; right: 4px; top: 20px; height: 5px; border-radius: 3px; background: var(--line); }
.dp-dot.on::after { background: var(--green); }
.dp-count { font-size: 14px; color: var(--muted); min-width: 40px; text-align: right; }
