/* =============================================================================
 * AWTL 公開網站 v3 樣式「財經數據平台」（2026-11-28 上線；原深色版封存於 /www/backup/site_theme_archive_20261128/）
 *
 * 參考使用者指定的 MacroMicro（白底資料卡、藍色主調、會員金色標示、圖表卡片格）
 * 與 WantGoo（頂部行情列、分頁籤排行表、模組化卡片、高資訊密度）。
 *
 * 取代 site.css + pages.css。只換外觀，網址、title、H1、內文一律沿用正式版。
 * 預設淺色，html[data-theme="dark"] 為夜間；深藍帶狀區塊（頁尾、系統特色、行動呼籲）用 .band 規則就地反轉變數。
 * ========================================================================== */

:root {
  --bg: #f2f5f9;
  --bg-2: #e8edf4;
  --card: #ffffff;
  --card-2: #f7f9fc;
  --text: #1b2533;
  --text-2: #475467;
  --text-3: #788496;
  --text-4: #a3adbb;
  --line: #e2e7ee;
  --line-2: #cfd7e2;
  --brand: #0f2a4f;
  --band: #0f2a4f;
  --primary: #1663d6;
  --primary-2: #0f4fb0;
  --primary-soft: #eaf2ff;
  --primary-line: #bfd5f7;
  --gold: #e3a21a;
  --gold-2: #b77d06;
  --gold-soft: #fff5dc;
  --up: #e5383b;
  --down: #10a06a;
  --flat: #8a94a3;
  --up-soft: #fdeced;
  --down-soft: #e6f6ef;
  --shadow-sm: 0 1px 2px rgba(16,24,40,0.06);
  --shadow: 0 1px 3px rgba(16,24,40,0.07), 0 10px 26px -14px rgba(16,24,40,0.18);
  --radius: 10px;
  --radius-sm: 6px;
  --nav-h: 64px;
  --strip-h: 36px;
  --head-h: calc(var(--nav-h) + var(--strip-h));

  --f-sans: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", system-ui, sans-serif;
  --f-num: "Inter", "Noto Sans TC", system-ui, sans-serif;

  /* 舊變數名稱：內文 .inc 與 PHP 的 inline style 仍在用 */
  --teal: var(--primary);
  --teal2: var(--primary-2);
  --teal3: var(--primary);
  --muted: var(--text-3);
  --gray: var(--bg-2);
  --gray2: var(--line);
  --navy: var(--brand);
  --navy2: var(--brand);
  --white: var(--card);
  --l-border: var(--line);
  --l-surface: var(--card);
  --l-t1: var(--text);
  --l-t2: var(--text-2);
  --l-t3: var(--text-3);
  color-scheme: light;
}

html[data-theme="dark"] {
  --bg: #0b111c;
  --bg-2: #0f1726;
  --card: #131c2c;
  --card-2: #172235;
  --text: #e5eaf1;
  --text-2: #b3bdcb;
  --text-3: #8290a4;
  --text-4: #5e6b80;
  --line: #222e42;
  --line-2: #2e3d56;
  --brand: #e5eaf1;
  --band: #0e2140;
  --primary: #4f8ff0;
  --primary-2: #7aabf5;
  --primary-soft: rgba(79,143,240,0.14);
  --primary-line: rgba(79,143,240,0.42);
  --gold: #f0b443;
  --gold-2: #f0b443;
  --gold-soft: rgba(240,180,67,0.14);
  --up: #ff5a5f;
  --down: #25c48b;
  --up-soft: rgba(255,90,95,0.13);
  --down-soft: rgba(37,196,139,0.13);
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.4);
  --shadow: 0 12px 30px -16px rgba(0,0,0,0.8);
  color-scheme: dark;
}

/* 深藍帶狀區塊（會員感，參考 MacroMicro 的 Prime 區） */
footer, .features-section.dark, .cta-band, .band {
  --text: #f1f5fb;
  --text-2: rgba(241,245,251,0.78);
  --text-3: rgba(241,245,251,0.58);
  --text-4: rgba(241,245,251,0.4);
  --line: rgba(255,255,255,0.13);
  --line-2: rgba(255,255,255,0.24);
  --card: rgba(255,255,255,0.06);
  --card-2: rgba(255,255,255,0.09);
  --primary: #8bb8ff;
  --primary-2: #a9cbff;
  --primary-soft: rgba(139,184,255,0.15);
  --primary-line: rgba(139,184,255,0.4);
  --brand: #f1f5fb;
  background: var(--band);
  color: var(--text);
}

/* ---------- 基礎 ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; overflow-x: hidden; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--f-sans); font-size: 15.5px; line-height: 1.7;
  color: var(--text); background: var(--bg); overflow-x: clip; -webkit-font-smoothing: antialiased;
}
::selection { background: var(--primary-soft); }
a { color: inherit; text-decoration: none; }
/* height:auto 必要：<img> 帶 width/height 屬性時，只設寬度會沿用屬性高度把圖拉變形（11/28 使用者發現） */
img { max-width: 100%; height: auto; display: block; }
button { font-family: inherit; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.container { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 24px; }
@media (max-width: 480px) { .container { padding: 0 14px; } }
section { position: relative; }
.fade-in { opacity: 0; transform: translateY(10px); transition: opacity .45s ease, transform .45s ease; }
.fade-in.visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .fade-in { opacity: 1; transform: none; transition: none; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- 按鈕 ---------- */
.btn-primary-hero, .btn-outline-hero {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: 8px; font-size: 15px; font-weight: 700; line-height: 1.3;
  border: 1px solid transparent; cursor: pointer; transition: background .15s, border-color .15s, color .15s, box-shadow .15s;
}
.btn-primary-hero { background: var(--primary); color: #fff; box-shadow: 0 6px 16px -8px rgba(22,99,214,0.7); }
.btn-primary-hero:hover { background: var(--primary-2); }
.btn-outline-hero { background: var(--card); color: var(--text); border-color: var(--line-2); }
.btn-outline-hero:hover { border-color: var(--primary); color: var(--primary); }

/* ---------- 頁首：導覽列 + 行情列 ---------- */
#navbar { position: fixed; top: 0; left: 0; right: 0; z-index: 1000; background: var(--card); border-bottom: 1px solid var(--line); transition: box-shadow .2s; }
html[data-theme="dark"] #navbar { background: #0f1828; }
#navbar.scrolled { box-shadow: 0 6px 20px -12px rgba(16,24,40,0.35); }
.nav-inner { height: var(--nav-h); display: flex; align-items: center; gap: 14px; }
.nav-logo { flex-shrink: 0; }
.nav-logo img { height: 38px; width: auto; border-radius: 4px; }
.nav-links { display: flex; align-items: center; gap: 2px; list-style: none; margin-left: auto; }
.nav-links a { display: block; padding: 7px 11px; border-radius: 6px; font-size: 15px; font-weight: 500; color: var(--text-2); white-space: nowrap; transition: background .15s, color .15s; }
.nav-links a:hover { background: var(--bg); color: var(--text); }
.nav-links a.active { background: var(--primary-soft); color: var(--primary); font-weight: 700; }
.nav-links .btn-login, .nav-links .btn-register { margin-left: 6px; padding: 7px 14px; border-radius: 8px; font-weight: 700; }
.nav-links .btn-login { border: 1px solid var(--primary-line); color: var(--primary); }
.nav-links .btn-login:hover { background: var(--primary-soft); color: var(--primary); }
.nav-links .btn-register { background: var(--primary); color: #fff; }
.nav-links .btn-register:hover { background: var(--primary-2); color: #fff; }
.theme-toggle { flex-shrink: 0; width: 36px; height: 36px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; background: var(--bg); border: 1px solid var(--line); color: var(--text-2); font-size: 14px; cursor: pointer; }
.theme-toggle:hover { color: var(--primary); border-color: var(--primary-line); }
.nav-toggle { display: none; flex-direction: column; justify-content: center; gap: 5px; width: 40px; height: 40px; padding: 9px; background: none; border: 0; cursor: pointer; }
.nav-toggle span { display: block; width: 22px; height: 2px; border-radius: 1px; background: var(--text); }

/* 行情列（WantGoo 式指數列）：靜態佔位在 nav.inc，chip-widgets-v3.js 填入數字 */
.mkt-strip { height: var(--strip-h); background: var(--card-2); border-top: 1px solid var(--line); }
html[data-theme="dark"] .mkt-strip { background: #0c1421; }
.mkt-strip-inner { height: 100%; display: flex; align-items: center; gap: 0; overflow-x: auto; scrollbar-width: none; white-space: nowrap; }
.mkt-strip-inner::-webkit-scrollbar { display: none; }
.ms-item { display: inline-flex; align-items: baseline; gap: 7px; padding: 0 16px; font-size: 13px; border-left: 1px solid var(--line); line-height: 1; }
.ms-item:first-child { padding-left: 0; border-left: 0; }
a.ms-item:hover .ms-name { color: var(--primary); text-decoration: underline; text-underline-offset: 3px; }
.ms-name { color: var(--text-3); }
.ms-val { font: 600 13.5px var(--f-num); color: var(--text); font-variant-numeric: tabular-nums; }
.ms-unit { font-size: 12px; color: var(--text-3); }
.ms-chg { font: 600 12.5px var(--f-num); font-variant-numeric: tabular-nums; }
.ms-val.up, .ms-chg.up { color: var(--up); } .ms-val.down, .ms-chg.down { color: var(--down); } .ms-chg.flat { color: var(--flat); }
.ms-date { margin-left: auto; padding-left: 16px; font: 500 12px var(--f-num); color: var(--text-4); }
/* 跑馬燈模式（chip-widgets-v3.js 加 .is-marquee）：一組內容重複數份，整條往左移一組寬度後無縫重來；滑鼠移上去暫停 */
.mkt-strip-inner.is-marquee { overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 28px, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(90deg, transparent, #000 28px, #000 calc(100% - 28px), transparent); }
.ms-track { display: flex; align-items: center; width: max-content; animation: ms-scroll 25s linear infinite; will-change: transform; }
.is-marquee:hover .ms-track, .is-marquee:focus-within .ms-track { animation-play-state: paused; }
.ms-set { display: flex; align-items: center; flex-shrink: 0; padding-right: 16px; }
.is-marquee .ms-item:first-child { padding-left: 16px; border-left: 1px solid var(--line); }
.is-marquee .ms-date { margin-left: 0; padding-right: 8px; }
@keyframes ms-scroll { from { transform: translateX(0); } to { transform: translateX(var(--ms-shift, -50%)); } }
@media (prefers-reduced-motion: reduce) { .ms-track { animation: none; } }
@media (max-width: 600px) { .is-marquee .ms-item:first-child { padding-left: 12px; } }

@media (max-width: 1140px) {
  .nav-toggle { display: flex; }
  .theme-toggle { margin-left: auto; }
  .nav-links {
    display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 2px;
    background: var(--card); border-bottom: 1px solid var(--line); padding: 10px 16px 16px; box-shadow: var(--shadow);
    max-height: calc(100vh - var(--head-h)); overflow-y: auto;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 12px; font-size: 16px; }
  .nav-links .btn-login, .nav-links .btn-register { margin: 6px 0 0; text-align: center; }
}
@media (max-width: 600px) { :root { --nav-h: 58px; --strip-h: 32px; } .nav-logo img { height: 34px; } .ms-item { font-size: 12.5px; padding: 0 12px; } }

/* ---------- 首頁英雄區 ---------- */
#home {
  position: relative; overflow: hidden;
  padding: calc(var(--head-h) + 44px) 0 52px;
  background: linear-gradient(180deg, var(--card) 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--line);
}
.hero-bg { position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(var(--line-2) 1px, transparent 1.2px); background-size: 22px 22px;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 75%); mask-image: linear-gradient(180deg, #000 0%, transparent 75%); opacity: .7; }
.hero-grid { position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse 45% 55% at 88% 18%, var(--primary-soft), transparent 70%), radial-gradient(ellipse 30% 40% at 8% 90%, var(--gold-soft), transparent 70%); }
.ticker-strip { display: none !important; }   /* 改由頁首行情列呈現 */

.hero-content { position: relative; z-index: 2; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); column-gap: clamp(28px, 4vw, 56px); align-items: start; }
.hero-content > * { grid-column: 1; }
.hero-content > .awtlgpt-hero-wrap { grid-column: 2; grid-row: 1 / span 6; align-self: center; }
.hero-dateline { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; justify-self: start; margin-bottom: 18px; padding: 5px 14px 5px 12px; border-radius: 999px; background: var(--primary-soft); color: var(--primary); font-size: 13px; font-weight: 600; }
.hero-dateline::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--down); box-shadow: 0 0 0 3px var(--down-soft); }
.hero-dateline span + span::before { content: '·'; margin-right: 10px; color: var(--primary-line); }
.hero-badge { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 12px; font-size: 14px; font-weight: 700; color: var(--text-3); }
.hero-badge i { color: var(--primary); }
.hero-title { font-size: clamp(32px, 4.4vw, 52px); font-weight: 900; line-height: 1.2; letter-spacing: -0.01em; color: var(--brand); margin-bottom: 18px; }
.hero-title span { display: block; margin-top: 4px; font-size: .62em; font-weight: 800; color: var(--primary); }
.hero-desc { max-width: 36em; margin-bottom: 26px; font-size: 16.5px; line-height: 1.9; color: var(--text-2); }
.hero-btns { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 18px; }
.hero-donate { display: flex; flex-wrap: wrap; }
.hero-promo { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 8px; background: var(--gold-soft); border: 1px solid rgba(227,162,26,0.35); color: var(--text-2); font-size: 14px; }
.hero-promo i { color: var(--gold); }
.hero-promo strong { font: 800 15.5px var(--f-num); color: var(--gold-2); }
.hero-promo:hover { border-color: var(--gold); }

.awtlgpt-hero-wrap { width: 100%; }
.awtlgpt-section { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 24px 22px 22px; box-shadow: var(--shadow); }
.awtlgpt-intro h3 { margin-bottom: 6px; font-size: 19px; font-weight: 800; line-height: 1.45; color: var(--text); }
.awtlgpt-intro h3 span { color: var(--primary); }
.awtlgpt-intro p { margin-bottom: 16px; font-size: 14px; line-height: 1.8; color: var(--text-2); }
.plan-mini { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.plan-mini-card { position: relative; display: flex; flex-direction: column; padding: 16px 16px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card-2); }
.plan-mini-card.hot { background: var(--card); border: 2px solid var(--primary); }
.plan-mini-card.hot::before { content: '推薦'; position: absolute; top: -11px; right: 12px; padding: 1px 10px; border-radius: 999px; background: var(--gold); color: #fff; font-size: 12px; font-weight: 700; }
.plan-mini-name { margin-bottom: 4px; font-size: 13px; font-weight: 700; color: var(--text-3); }
.plan-mini-name i { margin-right: 4px; }
.plan-mini-price { margin-bottom: 10px; font: 800 26px/1.2 var(--f-num); color: var(--text); }
.plan-mini-price small { font: 500 12.5px var(--f-sans); color: var(--text-3); }
.plan-mini-list { flex: 1; list-style: none; font-size: 13px; line-height: 1.6; color: var(--text-2); }
.plan-mini-list li { display: flex; gap: 7px; padding: 3px 0; }
.plan-mini-list i { flex-shrink: 0; margin-top: 4px; font-size: 11px; color: var(--primary); }
.plan-mini-cta { display: inline-flex; align-items: center; justify-content: center; gap: 6px; margin-top: 12px; padding: 8px 12px; border-radius: 8px; background: var(--primary-soft); color: var(--primary); font-size: 13.5px; font-weight: 700; }
.plan-mini-card.hot .plan-mini-cta { background: var(--primary); color: #fff; }
.plan-mini-cta:hover { filter: brightness(0.96); }
@media (max-width: 980px) {
  .hero-content { grid-template-columns: minmax(0, 1fr); }
  .hero-content > .awtlgpt-hero-wrap { grid-column: 1; grid-row: auto; margin-top: 32px; }
}
@media (max-width: 520px) {
  .hero-btns { flex-direction: column; align-items: stretch; }
  .plan-mini { grid-template-columns: minmax(0, 1fr); }
  .awtlgpt-section { padding: 20px 16px; }
}

/* ---------- 區段與模組標題 ---------- */
.sc-wrap, .market-section, .features-section, .learn-section, .faq-section, .testimonials-section,
.about-section, .contact-section, .performance-section, .chipdata-section { padding: 52px 0; background: var(--bg); }
.chipdata-section { padding-top: 40px; }
.section-header { margin-bottom: 22px; padding-bottom: 14px; border-bottom: 1px solid var(--line); text-align: left; }
.section-tag { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 8px; padding: 2px 10px; border-radius: 999px; background: var(--primary-soft); color: var(--primary); font-size: 12.5px; font-weight: 700; }
.section-title { font-size: clamp(22px, 2.6vw, 28px); font-weight: 800; line-height: 1.4; color: var(--text); }
.section-desc { margin-top: 6px; max-width: 820px; font-size: 15px; line-height: 1.85; color: var(--text-2); }
.section-desc strong { color: var(--text); }
.section-title.light, .section-desc.light { color: inherit; }
.section-desc.light { color: var(--text-2); }
.section-more { margin-top: 22px; text-align: right; }
.section-more a { display: inline-flex; align-items: center; gap: 6px; font-size: 14.5px; font-weight: 700; color: var(--primary); }
.section-more a:hover { text-decoration: underline; text-underline-offset: 3px; }
.section-more a i { font-size: 12px; transition: transform .2s; }
.section-more a:hover i { transform: translateX(3px); }

/* ---------- 今日籌碼快報 / 數據框 ---------- */
.chip-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; align-items: stretch; }
@media (max-width: 1080px) { .chip-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } .chip-card.topics { grid-column: 1 / -1; } }
@media (max-width: 700px) { .chip-cards { grid-template-columns: minmax(0, 1fr); } }
.chip-card, .chip-widget { position: relative; display: flex; flex-direction: column; min-width: 0; padding: 18px 20px 16px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.chip-card:hover { box-shadow: var(--shadow); }
.cw-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.cw-title { font-size: 16.5px; font-weight: 800; line-height: 1.4; color: var(--text); }
.cw-date { flex-shrink: 0; padding: 2px 9px; border-radius: 999px; background: var(--bg); font: 500 12px var(--f-num); color: var(--text-3); white-space: nowrap; }
.cw-kicker { display: inline-block; margin-bottom: 10px; padding: 2px 10px; border-radius: 999px; background: var(--gold-soft); color: var(--gold-2); font-size: 12.5px; font-weight: 700; }
.cw-label { font-size: 13px; color: var(--text-3); }
.cw-big { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin: 2px 0 10px; }
.cw-num { font: 700 clamp(30px, 3vw, 36px)/1.1 var(--f-num); letter-spacing: -0.02em; color: var(--text); font-variant-numeric: tabular-nums; }
.cw-num.up { color: var(--up); } .cw-num.down { color: var(--down); }
.cw-unit { font-size: 14px; color: var(--text-3); }
.cw-delta { padding: 2px 8px; border-radius: 6px; font: 600 12.5px var(--f-num); }
.cw-delta.up { color: var(--up); background: var(--up-soft); } .cw-delta.down { color: var(--down); background: var(--down-soft); }
.cw-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 0 0 12px; }
.cw-stats > div { padding: 8px 10px; border-radius: 8px; background: var(--card-2); border: 1px solid var(--line); }
.cw-stats dt { font-size: 12px; color: var(--text-3); }
.cw-stats dd { font: 700 15px/1.4 var(--f-num); color: var(--text); font-variant-numeric: tabular-nums; }
.cw-stats dd.up { color: var(--up); } .cw-stats dd.down { color: var(--down); }
.cw-chart { margin: 2px 0 4px; }
.cw-chart svg { display: block; width: 100%; height: 60px; }
.cw-chart rect { opacity: .45; } .cw-chart rect.last { opacity: 1; }
.cw-chart .b-up { fill: var(--up); } .cw-chart .b-dn { fill: var(--down); }
.cw-chart .b-zero { stroke: var(--line-2); stroke-width: 1; }
.cw-chart-cap { display: flex; justify-content: space-between; font: 500 11.5px var(--f-num); color: var(--text-4); }
.cw-tables { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 10px; }
.cw-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.cw-table caption { padding: 4px 8px; margin-bottom: 2px; text-align: left; border-radius: 6px; font-size: 12px; font-weight: 700; }
.cw-table caption.up { color: var(--up); background: var(--up-soft); } .cw-table caption.down { color: var(--down); background: var(--down-soft); }
.cw-table td { padding: 5px 2px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.cw-table tr:last-child td { border-bottom: 0; }
.cw-table td:first-child { max-width: 0; width: 100%; overflow: hidden; text-overflow: ellipsis; padding-right: 6px; }
.cw-table td.n { text-align: right; font: 600 12.5px var(--f-num); font-variant-numeric: tabular-nums; }
.cw-table td.n.up { color: var(--up); } .cw-table td.n.down { color: var(--down); }
.cw-table .sid { margin-left: 4px; font: 500 11px var(--f-num); color: var(--text-4); }
.cw-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin-top: auto; padding-top: 12px; border-top: 1px dashed var(--line); font-size: 13.5px; }
.cw-foot a { font-weight: 700; color: var(--primary); }
.cw-foot a:hover { text-decoration: underline; text-underline-offset: 3px; }
.cw-foot .cw-lock { color: var(--text-3); }
.cw-foot .cw-lock i { color: var(--gold); }
.cw-loading, .cw-error { padding: 18px 0; font-size: 13.5px; color: var(--text-3); }
.cw-loading i { margin-right: 6px; animation: spin 1.2s linear infinite; }
.chip-topics { list-style: none; counter-reset: topic; }
.chip-topics li { counter-increment: topic; border-top: 1px solid var(--line); }
.chip-topics li:first-child { border-top: 0; }
.chip-topics a { display: grid; grid-template-columns: 26px 1fr auto; gap: 2px 8px; align-items: center; padding: 10px 0; }
.chip-topics a::before { content: counter(topic); grid-row: 1 / span 2; width: 22px; height: 22px; display: flex; align-items: center; justify-content: center; border-radius: 6px; background: var(--primary-soft); color: var(--primary); font: 700 12px var(--f-num); }
.chip-topics li:nth-child(-n+3) a::before { background: var(--primary); color: #fff; }
.chip-topics b { font-size: 15px; font-weight: 700; color: var(--text); }
.chip-topics small { grid-column: 2; font-size: 12.5px; line-height: 1.5; color: var(--text-3); }
.chip-topics i { grid-row: 1 / span 2; grid-column: 3; font-size: 12px; color: var(--text-4); transition: transform .2s, color .2s; }
.chip-topics a:hover b { color: var(--primary); }
.chip-topics a:hover i { color: var(--primary); transform: translateX(3px); }
/* 教學頁頂端（放在文章卡片裡） */
.prose .chip-widget, .chip-widget.wide { margin: 0 0 28px; background: var(--card-2); box-shadow: none; }
.prose .chip-widget { font-size: 15px; line-height: 1.6; }
.prose .chip-widget > * + * { margin-top: 0; }
.prose .cw-table { display: table; margin: 0; font-size: 13px; overflow: visible; }
.prose .cw-table td { padding: 5px 2px; border-top: 0; vertical-align: middle; background: none !important; }
.prose .cw-table td:first-child { padding-right: 6px; }
.prose .cw-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.prose .cw-stats dt { font-weight: 400; color: var(--text-3); }
.prose .cw-stats dd { margin: 0; }
.prose .cw-stats > div { background: var(--card); }
.prose .cw-foot a { text-decoration: none; }
@media (max-width: 560px) { .cw-tables { grid-template-columns: minmax(0, 1fr); } }

/* ---------- 系統畫面輪播（白色模組卡） ---------- */
.sc-carousel { position: relative; display: flex; align-items: center; gap: 12px; }
.sc-viewport { flex: 1 1 auto; min-width: 0; overflow: hidden; touch-action: pan-y; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.sc-track { display: flex; transition: transform .45s cubic-bezier(.4, 0, .2, 1); will-change: transform; }
.sc-slide { flex: 0 0 100%; display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.65fr); gap: 32px; align-items: center; padding: 22px; }
.sc-img img { width: 100%; height: auto; border: 1px solid var(--line); border-radius: 8px; background: var(--card-2); }
.sc-cat { display: inline-block; margin-bottom: 10px; padding: 2px 10px; border-radius: 999px; background: var(--primary-soft); color: var(--primary); font-size: 12.5px; font-weight: 700; }
.sc-title { margin-bottom: 10px; font-size: clamp(20px, 2.2vw, 26px); font-weight: 800; line-height: 1.35; color: var(--text); }
.sc-desc { font-size: 15.5px; line-height: 1.9; color: var(--text-2); }
.sc-arrow { flex: 0 0 auto; width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; border-radius: 50%; border: 1px solid var(--line); background: var(--card); color: var(--text-2); font-size: 22px; line-height: 1; cursor: pointer; box-shadow: var(--shadow-sm); }
.sc-arrow:hover { background: var(--primary); border-color: var(--primary); color: #fff; }
.sc-dots { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 16px; }
.sc-dot { width: 8px; height: 8px; padding: 0; border: 0; border-radius: 4px; background: var(--line-2); cursor: pointer; transition: width .25s, background .2s; }
.sc-dot.on { width: 24px; background: var(--primary); }
@media (max-width: 860px) { .sc-arrow { display: none; } .sc-slide { grid-template-columns: minmax(0, 1fr); gap: 14px; padding: 14px; } }

/* ---------- 統計數字 ---------- */
.stats-section { padding: 0 0 4px; background: var(--bg); }
.stats-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.stat-item { padding: 18px 20px; border-left: 1px solid var(--line); }
.stat-item:first-child { border-left: 0; }
.stat-number { font: 800 clamp(24px, 2.6vw, 32px)/1.15 var(--f-num); color: var(--primary); font-variant-numeric: tabular-nums; }
.stat-label { margin-top: 4px; font-size: 13.5px; color: var(--text-3); }
@media (max-width: 860px) {
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat-item { border-left: 0; border-top: 1px solid var(--line); }
  .stat-item:nth-child(-n+2) { border-top: 0; }
  .stat-item:nth-child(even) { border-left: 1px solid var(--line); }
  .stat-item:last-child { grid-column: 1 / -1; }
}

/* ---------- 首頁行情區（儀表板） ---------- */
.market-updated { margin: -10px 0 16px; font: 500 12.5px var(--f-num); color: var(--text-3); }
.market-updated i { margin-right: 6px; color: var(--primary); }
.market-top-grid { display: grid; grid-template-columns: 1.5fr 1fr 1.25fr; gap: 16px; margin-bottom: 16px; }
.market-intl-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.market-card { position: relative; min-width: 0; overflow: hidden; padding: 18px 20px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); transition: box-shadow .2s, border-color .2s; }
.market-card:hover { box-shadow: var(--shadow); border-color: var(--primary-line); }
.market-card.featured { padding: 20px 22px; }
.mc-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.mc-name { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 15px; font-weight: 700; color: var(--text); }
.market-card.featured .mc-name { font-size: 16.5px; }
.mc-region { padding: 1px 8px; border-radius: 999px; background: var(--bg); color: var(--text-3); font-size: 11.5px; font-weight: 600; }
.mc-date { font: 500 12px var(--f-num); color: var(--text-4); white-space: nowrap; }
.mc-price { margin-bottom: 8px; font: 700 28px/1.05 var(--f-num); letter-spacing: -0.02em; color: var(--text); font-variant-numeric: tabular-nums; }
.market-card.featured .mc-price { font-size: 40px; }
.mc-chg { display: inline-flex; align-items: center; gap: 6px; padding: 2px 8px; border-radius: 6px; font: 600 13px var(--f-num); }
.mc-chg.up { color: var(--up); background: var(--up-soft); } .mc-chg.down { color: var(--down); background: var(--down-soft); } .mc-chg.flat { color: var(--flat); background: var(--bg); }
.mc-spark { margin-top: 12px; } .mc-spark svg { width: 100%; height: 48px; display: block; } .market-card.featured .mc-spark svg { height: 72px; }
.mc-kchart { position: relative; width: 100%; height: 110px; margin-top: 12px; } .market-card.featured .mc-kchart { height: 160px; }
.mc-kchart-legend { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 8px; font-size: 11.5px; color: var(--text-3); }
.mc-kchart-legend i { display: inline-block; width: 12px; height: 2px; margin-right: 4px; vertical-align: middle; }
.mc-sub { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 10px; font-size: 13px; color: var(--text-3); }
.mc-sub b { font: 700 13.5px var(--f-num); color: var(--text); }
.inst-rows { display: flex; flex-direction: column; gap: 12px; margin-top: 6px; }
.inst-row { display: flex; align-items: center; gap: 10px; }
.inst-name { width: 40px; flex-shrink: 0; font-size: 13px; color: var(--text-2); }
.inst-bar-wrap { position: relative; flex: 1; height: 14px; overflow: hidden; border-radius: 4px; background: var(--bg); }
.inst-bar-wrap::before { content: ''; position: absolute; left: 50%; top: 0; bottom: 0; width: 1px; background: var(--line-2); }
.inst-bar { position: absolute; top: 0; bottom: 0; border-radius: 3px; }
.inst-bar.pos { left: 50%; background: var(--up); } .inst-bar.neg { right: 50%; background: var(--down); }
.inst-val { width: 82px; flex-shrink: 0; text-align: right; font: 700 13px var(--f-num); }
.inst-val.up { color: var(--up); } .inst-val.down { color: var(--down); }
.breadth-card { margin-bottom: 16px; }
.breadth-bar { display: flex; height: 12px; margin: 12px 0 10px; overflow: hidden; border-radius: 6px; background: var(--bg); }
.breadth-bar .seg-up { background: var(--up); } .breadth-bar .seg-flat { background: var(--line-2); } .breadth-bar .seg-down { background: var(--down); }
.breadth-legend { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; font-size: 13px; color: var(--text-2); }
.breadth-legend b { font-family: var(--f-num); }
.breadth-legend .up b { color: var(--up); } .breadth-legend .down b { color: var(--down); } .breadth-legend .flat b { color: var(--flat); }
.worldmap-card { margin-bottom: 16px; padding: 18px 20px 16px; overflow: hidden; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.wm-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.wm-title { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 16.5px; font-weight: 800; color: var(--text); }
.wm-title i { color: var(--primary); }
.wm-title .wm-sub { font-size: 12.5px; font-weight: 400; color: var(--text-3); }
.wm-legend { display: flex; align-items: center; gap: 14px; font-size: 12.5px; color: var(--text-2); }
.wm-legend i { display: inline-block; width: 10px; height: 10px; margin-right: 5px; vertical-align: middle; border-radius: 2px; }
.wm-legend .up i { background: var(--up); } .wm-legend .down i { background: var(--down); }
.wm-tooltip { position: fixed; z-index: 50; display: none; min-width: 150px; padding: 10px 14px; pointer-events: none; border-radius: 8px; background: #101a2b; border: 1px solid rgba(255,255,255,0.14); color: #e5eaf1; font-size: 12.5px; box-shadow: 0 12px 34px rgba(0,0,0,0.4); }
.wm-tooltip .t-name { margin-bottom: 4px; font-weight: 700; color: #fff; }
.wm-tooltip .t-row { display: flex; justify-content: space-between; gap: 16px; line-height: 1.7; font-family: var(--f-num); }
.wm-tooltip .up { color: #ff7c80; font-weight: 700; } .wm-tooltip .down { color: #4fd8a4; font-weight: 700; }
.globe-layout { display: flex; gap: 16px; }
.globe-stage { position: relative; flex: 1 1 60%; min-width: 0; height: 520px; overflow: hidden; cursor: grab; border-radius: 8px; background: radial-gradient(circle at 50% 40%, rgba(60,120,190,0.28), transparent 68%), #081120; }
.globe-stage:active { cursor: grabbing; } .globe-stage canvas { display: block; }
.globe-hint { position: absolute; left: 12px; bottom: 12px; z-index: 4; display: flex; align-items: center; gap: 6px; padding: 4px 10px; pointer-events: none; border-radius: 999px; background: rgba(8,17,32,0.7); border: 1px solid rgba(255,255,255,0.12); color: rgba(229,234,241,0.7); font-size: 11.5px; }
.globe-loading { position: absolute; inset: 0; z-index: 5; display: flex; align-items: center; justify-content: center; gap: 10px; color: rgba(229,234,241,0.75); font-size: 13.5px; }
.globe-loading i { animation: spin 1s linear infinite; }
.globe-mk { display: flex; align-items: center; gap: 4px; padding: 2px 7px 2px 5px; border-radius: 999px; white-space: nowrap; cursor: pointer; user-select: none; font: 700 11px/1 var(--f-num); color: #e5eaf1; background: rgba(8,17,32,0.82); border: 1px solid rgba(255,255,255,0.18); box-shadow: 0 4px 12px rgba(0,0,0,0.45); transition: opacity .25s, background .15s; will-change: opacity; }
.globe-mk:hover { background: rgba(22,40,70,0.96); }
.globe-mk .gmk-flag { font-size: 13px; }
.globe-mk.up { border-color: rgba(255,90,95,0.6); } .globe-mk.up .gmk-pct { color: #ff8a8e; }
.globe-mk.down { border-color: rgba(37,196,139,0.55); } .globe-mk.down .gmk-pct { color: #5fe0b0; }
.globe-mk.home { border-color: var(--gold); box-shadow: 0 0 12px rgba(227,162,26,0.55); }
.globe-mk.active { outline: 2px solid #8bb8ff; outline-offset: 1px; }
.globe-panel { flex: 0 0 360px; display: flex; flex-direction: column; min-height: 520px; max-height: 520px; overflow-y: auto; padding: 16px; border-radius: 8px; background: var(--card-2); border: 1px solid var(--line); }
.gp-empty-state { margin: auto; padding: 20px; text-align: center; font-size: 13px; line-height: 1.9; color: var(--text-3); }
.gp-empty-state i { display: block; margin-bottom: 12px; font-size: 28px; color: var(--primary); }
.gp-head { display: flex; align-items: center; gap: 12px; }
.gp-flag { font-size: 30px; line-height: 1; }
.gp-titles { min-width: 0; }
.gp-country { font-size: 18px; font-weight: 800; color: var(--text); }
.gp-index { margin-top: 2px; font-size: 12.5px; color: var(--text-3); }
.gp-quote { display: flex; flex-wrap: wrap; align-items: baseline; gap: 12px; margin: 12px 0 4px; }
.gp-price { font: 700 26px var(--f-num); color: var(--text); }
.gp-chg { font: 700 14px var(--f-num); } .gp-chg.up { color: var(--up); } .gp-chg.down { color: var(--down); }
.gp-chart { width: 100%; height: 150px; margin: 8px 0 4px; }
.gp-spark { width: 100%; height: 90px; } .gp-spark svg { width: 100%; height: 100%; }
.gp-sub { display: flex; align-items: center; gap: 6px; margin: 12px 0 6px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 13px; font-weight: 700; color: var(--text-2); }
.gp-sub i { color: var(--primary); }
.gp-events { display: flex; flex-direction: column; }
.gp-event { display: flex; align-items: baseline; gap: 8px; padding: 7px 2px; border-bottom: 1px solid var(--line); }
.gp-event:last-of-type { border-bottom: 0; }
.gp-ev-dot { flex-shrink: 0; width: 5px; height: 5px; border-radius: 50%; background: var(--primary); transform: translateY(-2px); }
.gp-ev-title { font-size: 13px; line-height: 1.6; color: var(--text-2); }
.gp-more { display: flex; align-items: center; gap: 7px; margin-top: 12px; padding: 9px 11px; border-radius: 8px; background: var(--gold-soft); border: 1px solid rgba(227,162,26,0.35); color: var(--gold-2); font-size: 12.5px; font-weight: 600; }
.gp-more:hover { border-color: var(--gold); }
.gp-empty { padding: 6px 2px; font-size: 12.5px; color: var(--text-3); }
@media (max-width: 900px) { .globe-layout { flex-direction: column; } .globe-stage { flex: none; width: 100%; height: 340px; } .globe-panel { flex: none; width: 100%; min-height: 0; max-height: none; } }
/* 排行：分頁籤 + 資料表（WantGoo 式） */
.rank-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 28px 0 12px; }
.rank-tab { padding: 7px 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--text-2); font-size: 14px; font-weight: 700; cursor: pointer; transition: background .15s, color .15s, border-color .15s; }
.rank-tab:hover { border-color: var(--primary-line); color: var(--primary); }
.rank-tab.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.rank-table-wrap { overflow-x: auto; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
table.rank-table { width: 100%; border-collapse: collapse; }
.rank-table th { padding: 10px 16px; text-align: right; white-space: nowrap; background: var(--card-2); border-bottom: 1px solid var(--line); font-size: 12.5px; font-weight: 700; color: var(--text-3); }
.rank-table th:nth-child(1), .rank-table th:nth-child(2) { text-align: left; }
.rank-table td { padding: 10px 16px; text-align: right; white-space: nowrap; border-bottom: 1px solid var(--line); font: 500 14px var(--f-num); color: var(--text); font-variant-numeric: tabular-nums; }
.rank-table td:nth-child(1), .rank-table td:nth-child(2) { text-align: left; }
.rank-table tbody tr:hover td { background: var(--primary-soft); }
.rank-table tbody tr:last-child td { border-bottom: 0; }
.rank-no { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 6px; background: var(--bg); color: var(--text-3); font: 700 12px var(--f-num); }
.rank-no.top3 { background: var(--primary); color: #fff; }
.rank-stock-name { font-family: var(--f-sans); font-weight: 700; }
.rank-stock-id { margin-left: 6px; font-size: 12px; color: var(--text-4); }
.rank-pct.up, .rank-net.up { color: var(--up); font-weight: 700; }
.rank-pct.down, .rank-net.down { color: var(--down); font-weight: 700; }
.rank-pct.flat { color: var(--flat); }
.rank-note { margin-top: 8px; text-align: right; font-size: 12px; color: var(--text-4); }
.market-note { margin-top: 22px; font-size: 12.5px; line-height: 1.8; color: var(--text-4); }
.market-skeleton { padding: 60px 0; text-align: center; font-size: 14px; color: var(--text-3); }
.market-skeleton i { display: block; margin-bottom: 14px; font-size: 26px; color: var(--primary); animation: spin 1.2s linear infinite; }
@media (max-width: 1024px) { .market-intl-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .market-top-grid { grid-template-columns: 1fr 1fr; } .market-top-grid .market-card.featured { grid-column: 1 / -1; } }
@media (max-width: 768px) { .market-top-grid { grid-template-columns: minmax(0, 1fr); } .market-card.featured .mc-price { font-size: 32px; } .rank-table th, .rank-table td { padding: 9px 10px; font-size: 13px; } .worldmap-card { padding: 14px 12px; } }
@media (max-width: 540px) { .market-intl-grid { grid-template-columns: minmax(0, 1fr); } .mc-price { font-size: 24px; } }

/* ---------- 特色卡片 ---------- */
.feature-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.feature-card { padding: 22px 20px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); transition: box-shadow .2s, border-color .2s; }
.feature-card:hover { box-shadow: var(--shadow); border-color: var(--primary-line); }
.feature-icon { width: 44px; height: 44px; margin-bottom: 14px; display: flex; align-items: center; justify-content: center; border-radius: 10px; background: var(--primary-soft); color: var(--primary); font-size: 18px; }
.feature-title { margin-bottom: 8px; font-size: 17px; font-weight: 800; line-height: 1.45; color: var(--text); }
.feature-desc { font-size: 14px; line-height: 1.85; color: var(--text-2); }
.features-section.dark .feature-card { box-shadow: none; }
.features-section.dark .feature-icon { background: rgba(227,162,26,0.16); color: var(--gold); }
.features-section.dark .section-header { border-bottom-color: var(--line); }
.features-section.dark .section-tag { background: rgba(227,162,26,0.16); color: var(--gold); }
@media (max-width: 1024px) { .feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .feature-grid { grid-template-columns: minmax(0, 1fr); } }

/* ---------- 系統畫面（圖表卡片格，參考 MacroMicro） ---------- */
.shots-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.shot-card { display: flex; flex-direction: column; min-width: 0; overflow: hidden; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); transition: box-shadow .2s, transform .2s, border-color .2s; }
.shot-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--primary-line); }
.shot-card img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top left; border-bottom: 1px solid var(--line); background: var(--card-2); cursor: zoom-in; }
.shot-body { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px 14px; }
.shot-cat { align-self: flex-start; padding: 1px 9px; border-radius: 999px; background: var(--primary-soft); color: var(--primary); font-size: 12px; font-weight: 700; }
.shot-title { margin-top: 4px; font-size: 15.5px; font-weight: 800; line-height: 1.45; color: var(--text); }
.shot-desc { font-size: 13px; line-height: 1.75; color: var(--text-3); }
@media (max-width: 1080px) { .shots-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 780px) { .shots-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .shots-grid { grid-template-columns: minmax(0, 1fr); } }
.shot-lb { position: fixed; inset: 0; z-index: 2000; display: none; align-items: center; justify-content: center; padding: 24px; background: rgba(8,14,26,0.88); cursor: zoom-out; }
.shot-lb.show { display: flex; }
.shot-lb img { max-width: 100%; max-height: 100%; border-radius: 8px; box-shadow: 0 30px 80px rgba(0,0,0,0.6); }
.shot-lb-close { position: absolute; top: 14px; right: 22px; font-size: 38px; line-height: 1; color: #fff; cursor: pointer; }

/* ---------- 學習資源卡片 ---------- */
.lg-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.lg-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.lg-grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.lg-card { display: flex; flex-direction: column; gap: 8px; min-width: 0; padding: 20px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); transition: box-shadow .2s, border-color .2s, transform .2s; }
.lg-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--primary-line); }
.lg-icon { width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; border-radius: 10px; background: var(--primary-soft); color: var(--primary); font-size: 16px; }
.lg-card h3 { font-size: 17px; font-weight: 800; line-height: 1.45; color: var(--text); }
.lg-card p { flex: 1; font-size: 14px; line-height: 1.8; color: var(--text-2); }
.lg-card .lg-more { font-size: 13.5px; font-weight: 700; color: var(--primary); }
.lg-card .lg-more i { margin-left: 4px; transition: transform .2s; }
.lg-card:hover .lg-more i { transform: translateX(4px); }
.lg-card img { border: 1px solid var(--line); border-radius: 6px; }
@media (max-width: 980px) { .lg-grid, .lg-grid.four { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .lg-grid, .lg-grid.two, .lg-grid.four { grid-template-columns: minmax(0, 1fr); } }

/* ---------- 首頁 FAQ ---------- */
.faq-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.faq-item { align-self: start; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); overflow: hidden; }
.faq-btn { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 16px 18px; background: none; border: 0; text-align: left; cursor: pointer; font-size: 15.5px; font-weight: 700; line-height: 1.5; color: var(--text); }
.faq-btn:hover { color: var(--primary); }
.faq-icon { flex-shrink: 0; width: 26px; height: 26px; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--bg); color: var(--text-3); font-size: 11px; transition: transform .3s, background .2s, color .2s; }
.faq-btn.open .faq-icon { transform: rotate(180deg); background: var(--primary); color: #fff; }
.faq-body { max-height: 0; overflow: hidden; padding: 0 18px; font-size: 14.5px; line-height: 1.85; color: var(--text-2); transition: max-height .35s ease, padding .35s ease; }
.faq-body.open { max-height: 360px; padding-bottom: 16px; }
@media (max-width: 768px) { .faq-grid { grid-template-columns: minmax(0, 1fr); } }

/* ---------- 學員評價 ---------- */
.testimonials-grid, .rv-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.testimonial-card, .rv-card { position: relative; padding: 20px 20px 18px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.testimonial-quote, .rv-card .rv-q { position: absolute; top: 12px; right: 16px; font-size: 0; }
.testimonial-quote::before, .rv-card .rv-q::before { content: '\201D'; font: 900 44px/1 Georgia, serif; color: var(--primary-soft); }
html[data-theme="dark"] .testimonial-quote::before, html[data-theme="dark"] .rv-card .rv-q::before { color: var(--line-2); }
.testimonial-stars, .rv-stars { margin-bottom: 10px; color: var(--gold); font-size: 12.5px; letter-spacing: 2px; }
.testimonial-text, .rv-card p { font-size: 14.5px; line-height: 1.85; color: var(--text); }
@media (max-width: 980px) { .testimonials-grid, .rv-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .testimonials-grid, .rv-grid { grid-template-columns: minmax(0, 1fr); } }

/* ---------- 關於 ---------- */
.about-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr); gap: 36px; align-items: center; padding: clamp(20px, 3vw, 36px); background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.about-content > .section-tag { margin-bottom: 4px; }
.about-content .section-title { margin: 6px 0 16px !important; }
.about-text { font-size: 15.5px; line-height: 1.95; color: var(--text-2); }
.about-text strong { color: var(--text); }
.about-image img { width: 100%; height: auto; border-radius: 10px; }
@media (max-width: 860px) { .about-grid { grid-template-columns: minmax(0, 1fr); } .about-image { max-width: 380px; } }

/* ---------- 聯繫 ---------- */
.contact-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.contact-card { display: flex; gap: 14px; align-items: flex-start; min-width: 0; padding: 18px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.contact-icon { flex-shrink: 0; width: 42px; height: 42px; display: flex; align-items: center; justify-content: center; border-radius: 10px; background: var(--primary-soft); color: var(--primary); font-size: 17px; }
.contact-title { margin-bottom: 2px; font-size: 14px; font-weight: 800; color: var(--text); }
.contact-text { font-size: 14px; line-height: 1.8; color: var(--text-2); overflow-wrap: anywhere; }
.contact-text a { font-weight: 700; color: var(--primary); }
.contact-text a:hover { text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 980px) { .contact-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .contact-grid { grid-template-columns: minmax(0, 1fr); } }

.perf-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.perf-card { padding: 6px; background: var(--card); border: 1px solid var(--line); border-radius: 8px; }
/* 對帳單截圖尺寸不一：統一正方形框、完整顯示不裁切 */
.perf-img-wrap { aspect-ratio: 1 / 1; overflow: hidden; border-radius: 4px; background: var(--card-2); }
.perf-img-wrap img { width: 100%; height: 100%; object-fit: contain; }
.perf-info { display: flex; justify-content: space-between; padding: 8px 4px 2px; font-size: 12px; }
.perf-amount { font-weight: 700; color: var(--up); }

/* ---------- 頁尾 ---------- */
footer { padding: 48px 0 24px; }
.footer-inner { display: flex; flex-wrap: wrap; gap: 32px 48px; padding-bottom: 28px; margin-bottom: 18px; border-bottom: 1px solid var(--line); }
.footer-brand { flex: 0 1 300px; }
.footer-brand img { height: 40px; width: auto; border-radius: 6px; }
.footer-brand p { margin-top: 14px; font-size: 13.5px; line-height: 1.85; color: var(--text-2); }
.site-links { flex: 1 1 560px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
.site-links h5 { margin-bottom: 12px; font-size: 14px; font-weight: 800; color: var(--text); }
.site-links ul { list-style: none; }
.site-links li { margin-bottom: 8px; font-size: 13.5px; color: var(--text-3); }
.site-links a { color: var(--text-2); }
.site-links a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.footer-disclaimer { margin-bottom: 10px; font-size: 12px; line-height: 1.8; color: var(--text-3); }
.footer-bottom { font-size: 12.5px; color: var(--text-3); }
@media (max-width: 860px) { .site-links { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
#back-to-top { position: fixed; right: 18px; bottom: 18px; z-index: 900; width: 42px; height: 42px; display: flex; align-items: center; justify-content: center; border: 0; border-radius: 50%; background: var(--primary); color: #fff; cursor: pointer; box-shadow: 0 6px 18px -6px rgba(22,99,214,0.7); opacity: 0; visibility: hidden; transform: translateY(10px); transition: opacity .25s, transform .25s, visibility .25s; }
#back-to-top.visible { opacity: 1; visibility: visible; transform: none; }

/* ===================== 子頁 ===================== */
.page-hero { position: relative; padding: calc(var(--head-h) + 26px) 0 26px; background: var(--card); border-bottom: 1px solid var(--line); }
html[data-theme="dark"] .page-hero { background: #0f1828; }
.page-hero.compact { padding-bottom: 20px; }
.breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 14px; list-style: none; font-size: 13px; color: var(--text-3); }
.breadcrumb a { color: var(--text-2); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb li + li::before { content: '›'; margin-right: 6px; color: var(--text-4); }
.page-kicker { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 10px; padding: 2px 10px; border-radius: 999px; background: var(--primary-soft); color: var(--primary); font-size: 12.5px; font-weight: 700; }
.page-title { max-width: 980px; font-size: clamp(26px, 3.6vw, 40px); font-weight: 900; line-height: 1.3; color: var(--text); }
.page-title span { color: var(--primary); }
.page-lead { max-width: 860px; margin-top: 12px; font-size: 16px; line-height: 1.9; color: var(--text-2); }
.page-meta { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 14px; font-size: 13px; color: var(--text-3); }
.page-meta i { margin-right: 5px; color: var(--primary); }

.page-body { padding: 28px 0 64px; background: var(--bg); }
.page-body.soft { background: var(--bg-2); }
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; align-items: start; }
.layout.single { grid-template-columns: minmax(0, 920px); justify-content: center; }
.layout:not(.single) > div:first-child { padding: clamp(18px, 3vw, 36px); background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); min-width: 0; }
.aside { position: sticky; top: calc(var(--head-h) + 16px); display: flex; flex-direction: column; gap: 16px; }
@media (max-width: 1024px) { .layout { grid-template-columns: minmax(0, 1fr); } .aside { position: static; } }
.card { padding: 16px 18px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.card h4 { display: flex; align-items: center; gap: 8px; margin: -2px 0 6px; padding-bottom: 10px; border-bottom: 1px solid var(--line); font-size: 15px; font-weight: 800; color: var(--text); }
.card h4 i { color: var(--primary); }
.card ul { list-style: none; }
.card li { padding: 8px 0; border-bottom: 1px dashed var(--line); font-size: 14px; line-height: 1.55; }
.card li:last-child { border-bottom: 0; }
.card li a { color: var(--text); }
.card li a:hover { color: var(--primary); }
.card li small { display: block; margin-top: 2px; font-size: 12.5px; color: var(--text-3); }
.card p { color: var(--text-2) !important; }

.prose { font-size: 16.5px; line-height: 1.9; color: var(--text); }
.prose > * + * { margin-top: 1em; }
.prose h2 { margin-top: 2em; padding-left: 12px; border-left: 4px solid var(--primary); font-size: clamp(20px, 2.4vw, 24px); font-weight: 800; line-height: 1.45; color: var(--text); scroll-margin-top: calc(var(--head-h) + 16px); }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin-top: 1.6em; font-size: clamp(17px, 2vw, 19px); font-weight: 800; line-height: 1.5; color: var(--text); }
.prose p { margin-top: 1em; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li { margin-top: .4em; }
.prose li::marker { color: var(--primary); font-weight: 700; }
.prose strong { font-weight: 700; color: var(--text); }
.prose a { color: var(--primary); text-decoration: underline; text-decoration-color: var(--primary-line); text-underline-offset: 3px; }
.prose a:hover { text-decoration-color: var(--primary); }
.prose figure { margin: 1.6em 0; }
.prose figure img, .prose > img { width: 100%; height: auto; border: 1px solid var(--line); border-radius: 8px; background: var(--card-2); }
.prose figcaption { margin-top: 8px; text-align: center; font-size: 13px; line-height: 1.6; color: var(--text-3); }
.prose blockquote { margin: 1.4em 0; padding: 14px 18px; border-left: 4px solid var(--gold); border-radius: 0 8px 8px 0; background: var(--gold-soft); color: var(--text); font-size: 15.5px; }
.prose table { display: block; width: 100%; margin: 1.4em 0; overflow-x: auto; border-collapse: collapse; font-size: 14.5px; }
.prose thead th { padding: 10px 14px; text-align: left; white-space: nowrap; background: var(--card-2); border-bottom: 1px solid var(--line-2); font-weight: 700; color: var(--text-2); }
.prose tbody td { padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose tbody tr:hover td { background: var(--primary-soft); }
.prose .note, .prose .warn { padding: 14px 18px; border-radius: 8px; font-size: 15px; line-height: 1.85; }
.prose .note { background: var(--primary-soft); border: 1px solid var(--primary-line); }
.prose .note strong { color: var(--primary-2); }
.prose .warn { background: var(--up-soft); border: 1px solid rgba(229,56,59,0.3); }
.prose .warn strong { color: var(--up); }
.prose .steps { list-style: none; padding-left: 0; counter-reset: step; }
.prose .steps li { position: relative; counter-increment: step; margin-top: .9em; padding-left: 44px; }
.prose .steps li::before { content: counter(step); position: absolute; left: 0; top: 2px; width: 30px; height: 30px; display: flex; align-items: center; justify-content: center; border-radius: 8px; background: var(--primary); color: #fff; font: 700 14px var(--f-num); }
.prose dl { display: grid; grid-template-columns: max-content 1fr; gap: 8px 18px; }
.prose dt { font-weight: 700; color: var(--primary); }
.prose dd { margin: 0; }
@media (max-width: 600px) { .prose { font-size: 16px; } .prose dl { grid-template-columns: 1fr; } .prose dd { margin-bottom: 8px; } }
.kw-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 26px; padding-top: 16px; border-top: 1px solid var(--line); }
.kw-tags span, .kw-tags a { padding: 3px 11px; border-radius: 999px; background: var(--bg); color: var(--text-2); font-size: 12.5px; font-weight: 500; }
.kw-tags a:hover { background: var(--primary-soft); color: var(--primary); }
.toc ol { list-style: none; counter-reset: toc; }
.toc li { counter-increment: toc; display: flex; gap: 8px; padding: 7px 0; border-bottom: 1px dashed var(--line); font-size: 14px; line-height: 1.55; }
.toc li:last-child { border-bottom: 0; }
.toc li::before { content: counter(toc); flex-shrink: 0; width: 20px; height: 20px; display: flex; align-items: center; justify-content: center; margin-top: 1px; border-radius: 5px; background: var(--primary-soft); color: var(--primary); font: 700 11.5px var(--f-num); }
.toc a { color: var(--text); }
.toc a:hover { color: var(--primary); }

.cta-band { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; margin-top: 40px; padding: 32px 36px; border-radius: 14px; background: linear-gradient(120deg, var(--band) 0%, #163a6b 100%); box-shadow: var(--shadow); }
html[data-theme="dark"] .cta-band { background: linear-gradient(120deg, #0e2140 0%, #15325c 100%); }
.cta-band h3 { margin-bottom: 6px; font-size: clamp(19px, 2.4vw, 24px); font-weight: 800; line-height: 1.4; color: var(--text); }
.cta-band p { max-width: 580px; font-size: 14.5px; line-height: 1.8; color: var(--text-2); }
.cta-band .cta-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.cta-band .btn-primary-hero { background: var(--gold); color: #1b2533; box-shadow: none; white-space: nowrap; }
.cta-band .btn-primary-hero:hover { background: #f1b534; }
.cta-band .btn-outline-hero { background: transparent; color: #fff; border-color: rgba(255,255,255,0.4); white-space: nowrap; }
.cta-band .btn-outline-hero:hover { border-color: #fff; color: #fff; background: rgba(255,255,255,0.08); }
.cta-band .cta-price { margin-top: 6px; font-size: 13px; color: var(--text-3); }
@media (max-width: 600px) { .cta-band { padding: 26px 20px; } .cta-band .cta-actions { width: 100%; } .cta-band .cta-actions a { flex: 1 1 auto; } }

.plans { display: grid; grid-template-columns: repeat(2, minmax(0, 420px)); gap: 22px; justify-content: center; }
.plan-card { position: relative; display: flex; flex-direction: column; padding: 30px 28px 26px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-sm); }
.plan-card.hot { border: 2px solid var(--primary); box-shadow: var(--shadow); }
.plan-badge { position: absolute; top: -13px; left: 24px; padding: 3px 12px; border-radius: 999px; background: var(--gold); color: #fff; font-size: 12.5px; font-weight: 700; }
.plan-name { margin-bottom: 8px; font-size: 15px; font-weight: 800; color: var(--text-3); }
.plan-price { font: 800 44px/1.05 var(--f-num); color: var(--text); letter-spacing: -0.02em; }
.plan-price small { font: 500 14px var(--f-sans); color: var(--text-3); letter-spacing: 0; }
.plan-sub { margin: 10px 0 16px; font-size: 14px; line-height: 1.75; color: var(--text-2); }
.plan-list { flex: 1; margin-bottom: 22px; list-style: none; }
.plan-list li { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; border-bottom: 1px dashed var(--line); font-size: 14.5px; line-height: 1.6; color: var(--text); }
.plan-list li:last-child { border-bottom: 0; }
.plan-list i { flex-shrink: 0; margin-top: 5px; font-size: 12px; color: var(--primary); }
.plan-list li.dim, .plan-list li.dim i { color: var(--text-4); }
.plan-cta { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 13px 18px; border-radius: 8px; background: var(--primary); color: #fff; font-size: 15px; font-weight: 700; transition: background .15s; }
.plan-cta:hover { background: var(--primary-2); }
.plan-cta.ghost { background: var(--primary-soft); color: var(--primary); }
.plan-cta.ghost:hover { background: var(--primary); color: #fff; }
.plan-note { margin-top: 10px; text-align: center; font-size: 13px; color: var(--text-3); }
@media (max-width: 860px) { .plans { grid-template-columns: minmax(0, 480px); } }
.cmp-wrap { overflow-x: auto; }
.cmp { width: 100%; margin-top: 32px; border-collapse: separate; border-spacing: 0; overflow: hidden; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); font-size: 14.5px; }
.cmp th, .cmp td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--line); }
.cmp thead th { background: var(--card-2); font-weight: 700; color: var(--text-2); }
.cmp tbody tr:last-child td { border-bottom: 0; }
.cmp td.ok { color: var(--down); font-weight: 700; }
.cmp td.no { color: var(--text-4); }

.qa-group { margin-top: 28px; padding: 4px 22px 8px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.qa-group:first-child { margin-top: 0; }
.qa-group h2 { padding: 16px 0 12px; border-bottom: 1px solid var(--line); font-size: 19px; font-weight: 800; color: var(--text); }
.qa-item { padding: 16px 0; border-bottom: 1px dashed var(--line); }
.qa-item:last-child { border-bottom: 0; }
.qa-item h3 { display: flex; gap: 10px; font-size: 16px; font-weight: 800; line-height: 1.55; color: var(--text); }
.qa-item h3::before { content: 'Q'; flex-shrink: 0; width: 24px; height: 24px; margin-top: 1px; display: flex; align-items: center; justify-content: center; border-radius: 6px; background: var(--primary); color: #fff; font: 700 12.5px var(--f-num); }
.qa-item p { margin-top: 6px; padding-left: 34px; font-size: 15px; line-height: 1.85; color: var(--text-2); }
.qa-item p a { color: var(--primary); text-decoration: underline; text-underline-offset: 3px; }

.cat-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.cat-tabs a { padding: 6px 15px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--text-2); font-size: 14px; font-weight: 700; transition: background .15s, color .15s, border-color .15s; }
.cat-tabs a:hover { border-color: var(--primary-line); color: var(--primary); }
.cat-tabs a.on { background: var(--primary); border-color: var(--primary); color: #fff; }
.art-list { display: flex; flex-direction: column; overflow: hidden; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.art-card { display: block; padding: 16px 20px; border-bottom: 1px solid var(--line); transition: background .15s; }
.art-card:last-child { border-bottom: 0; }
.art-card:hover { background: var(--card-2); }
.art-card:hover h2, .art-card:hover h3 { color: var(--primary); }
.art-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin-bottom: 6px; font-size: 12.5px; color: var(--text-3); }
.art-cat { padding: 1px 9px; border-radius: 999px; background: var(--primary-soft); color: var(--primary); font-size: 12px; font-weight: 700; }
.art-cat.c-mystery { background: var(--gold-soft); color: var(--gold-2); }
.art-cat.c-tech { background: rgba(99,102,241,0.12); color: #4f46e5; }
.art-cat.c-world { background: rgba(14,165,233,0.12); color: #0369a1; }
.art-cat.c-brief { background: var(--down-soft); color: var(--down); }
html[data-theme="dark"] .art-cat.c-tech { color: #a5b4fc; }
html[data-theme="dark"] .art-cat.c-world { color: #7dd3fc; }
.art-card h2, .art-card h3 { font-size: 17px; font-weight: 800; line-height: 1.5; color: var(--text); transition: color .15s; }
.art-card p { margin-top: 6px; font-size: 14px; line-height: 1.75; color: var(--text-2); }
.art-lock { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--text-3); }
.art-lock i { color: var(--gold); }
.pager { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px; margin-top: 24px; }
.pager a, .pager span { min-width: 36px; height: 36px; padding: 0 12px; display: inline-flex; align-items: center; justify-content: center; border-radius: 8px; border: 1px solid var(--line); background: var(--card); font: 600 13.5px var(--f-num); color: var(--text); }
.pager a:hover { border-color: var(--primary); color: var(--primary); }
.pager .on { background: var(--primary); border-color: var(--primary); color: #fff; }
.pager .dots { border: 0; background: transparent; color: var(--text-3); }

.teaser { padding: 18px 22px; border-radius: var(--radius); background: var(--primary-soft); border: 1px solid var(--primary-line); }
.teaser-tag { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 8px; font-size: 12.5px; font-weight: 800; color: var(--primary); }
.teaser p { margin: 0; font-size: 16px; line-height: 1.9; color: var(--text); }
.skel { position: relative; margin-top: 24px; padding: 6px 2px 0; }
.skel .bar { height: 13px; margin: 14px 0; border-radius: 6px; background: linear-gradient(90deg, var(--bg) 0%, var(--card-2) 50%, var(--bg) 100%); background-size: 200% 100%; animation: skel-shine 2.4s linear infinite; }
.skel .bar.h { height: 22px; width: 58%; }
.skel .bar.w90 { width: 90%; } .skel .bar.w85 { width: 85%; } .skel .bar.w75 { width: 75%; } .skel .bar.w60 { width: 60%; } .skel .bar.w45 { width: 45%; }
.skel .bar.chart { height: 150px; border-radius: 8px; }
.skel-fade { position: absolute; left: 0; right: 0; bottom: 0; height: 180px; pointer-events: none; background: linear-gradient(180deg, transparent 0%, var(--card) 85%); }
@keyframes skel-shine { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.art-summary { padding: 18px 22px; border-radius: var(--radius); background: var(--primary-soft); border: 1px solid var(--primary-line); font-size: 16px; line-height: 1.9; }
.art-excerpt { position: relative; margin-top: 24px; }
.art-excerpt .fade { position: absolute; left: 0; right: 0; bottom: 0; height: 120px; pointer-events: none; background: linear-gradient(180deg, transparent 0%, var(--card) 90%); }
.paywall { position: relative; z-index: 2; margin-top: -20px; padding: 30px 26px; text-align: center; border-radius: 14px; background: var(--card); border: 2px solid var(--gold); box-shadow: var(--shadow); }
.paywall .pw-icon { width: 52px; height: 52px; margin: 0 auto 12px; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--gold); color: #fff; font-size: 20px; }
.paywall h3 { margin-bottom: 6px; font-size: 20px; font-weight: 800; color: var(--text); }
.paywall p { max-width: 560px; margin: 0 auto; font-size: 14.5px; line-height: 1.8; color: var(--text-2); }
.paywall .pw-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 18px; }
.paywall .pw-login { margin-top: 12px; font-size: 14px; color: var(--text-3); }
.paywall .pw-login a { color: var(--primary); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.art-nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 28px; }
.art-nav a { display: block; padding: 12px 16px; border-radius: var(--radius); background: var(--card-2); border: 1px solid var(--line); font-size: 14px; line-height: 1.55; color: var(--text); }
.art-nav a small { display: block; margin-bottom: 4px; font-size: 12px; color: var(--text-3); }
.art-nav a:hover { border-color: var(--primary-line); color: var(--primary); }
.art-nav a.next { text-align: right; }
@media (max-width: 600px) { .art-nav { grid-template-columns: minmax(0, 1fr); } }

.ct-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.ct-card { display: flex; gap: 16px; align-items: flex-start; min-width: 0; padding: 20px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.ct-icon { flex-shrink: 0; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; border-radius: 10px; background: var(--primary-soft); color: var(--primary); font-size: 18px; }
.ct-card h3 { margin-bottom: 4px; font-size: 16px; font-weight: 800; color: var(--text); }
.ct-card p { font-size: 14.5px; line-height: 1.8; color: var(--text-2); overflow-wrap: anywhere; }
.ct-card p a, .ct-card p strong { font-weight: 700; color: var(--primary); }
@media (max-width: 700px) { .ct-grid { grid-template-columns: minmax(0, 1fr); } }

.about-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 28px 0; }
.about-stats div { padding: 16px 14px; text-align: center; border-radius: var(--radius); background: var(--card-2); border: 1px solid var(--line); }
.about-stats b { display: block; font: 800 28px/1.15 var(--f-num); color: var(--primary); }
.about-stats span { display: block; margin-top: 4px; font-size: 13px; color: var(--text-3); }
@media (max-width: 700px) { .about-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- 會員登入／註冊（login.php、register.php；11/28 使用者要求與全站風格一致） ----------
 * 頁首、頁尾、日夜主題與全站共用（PHP readfile 同一份 partials）。左側深藍帶＝會員功能說明，右側白卡＝表單；手機改上下排、表單在前。 */
.auth-main { padding: calc(var(--head-h) + 40px) 0 64px; background: var(--bg); }
.auth-shell { display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); max-width: 940px; margin: 0 auto; background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); overflow: hidden; }
.auth-card { min-width: 0; padding: 36px 40px 28px; }
.auth-side { order: -1; position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 14px; padding: 40px 34px; }
.auth-side::after { content: ""; position: absolute; right: -90px; bottom: -90px; width: 280px; height: 280px; border-radius: 50%; background: radial-gradient(circle, rgba(139,184,255,0.22), transparent 70%); pointer-events: none; }
.auth-side-kicker { font: 700 12.5px var(--f-num); letter-spacing: .08em; color: var(--gold); }
.auth-side h2 { font-size: 22px; font-weight: 800; line-height: 1.45; color: var(--text); }
.auth-side ul { list-style: none; display: flex; flex-direction: column; gap: 11px; margin-top: 4px; }
.auth-side li { display: flex; align-items: flex-start; gap: 10px; font-size: 14.5px; line-height: 1.6; color: var(--text-2); }
.auth-side li i { margin-top: 6px; font-size: 12px; color: var(--gold); }
.auth-side-note { position: relative; z-index: 1; margin-top: auto; padding-top: 16px; border-top: 1px solid var(--line); font-size: 13.5px; color: var(--text-3); }
.auth-side-note a { color: var(--gold); font-weight: 700; }
.auth-side-note a:hover { text-decoration: underline; text-underline-offset: 3px; }

.auth-head { margin-bottom: 22px; }
.auth-kicker { display: inline-flex; align-items: center; gap: 6px; padding: 3px 11px; border-radius: 999px; background: var(--primary-soft); color: var(--primary); font-size: 12.5px; font-weight: 700; }
.auth-head h1 { margin-top: 12px; font-size: 26px; font-weight: 900; line-height: 1.35; color: var(--text); }
.auth-head p { margin-top: 4px; font-size: 14.5px; color: var(--text-3); }

.auth-steps { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: -6px 0 22px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--card-2); font-size: 12.5px; color: var(--text-4); }
.auth-steps .on { display: inline-flex; align-items: center; gap: 6px; color: var(--primary); font-weight: 700; }
.auth-steps .num { width: 20px; height: 20px; border-radius: 50%; background: var(--primary); color: #fff; font: 700 11px/20px var(--f-num); text-align: center; }
.auth-steps .arr { font-size: 9px; color: var(--line-2); }

.auth-field { margin-bottom: 16px; }
.auth-field label { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; margin-bottom: 7px; font-size: 13.5px; font-weight: 700; color: var(--text); }
.auth-field .req { margin-left: -4px; color: var(--up); }
.auth-field .hint { font-size: 12px; font-weight: 400; color: var(--text-3); }
.auth-warn { color: var(--gold-2); font-weight: 700; }
.auth-input { position: relative; }
.auth-input > i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); font-size: 14px; color: var(--text-4); pointer-events: none; transition: color .15s; }
.auth-input:focus-within > i { color: var(--primary); }
.auth-input input { width: 100%; height: 46px; padding: 0 46px 0 40px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--card); color: var(--text); font: 500 15px var(--f-sans); outline: none; -webkit-appearance: none; appearance: none; transition: border-color .15s, box-shadow .15s; }
.auth-input input::placeholder { color: var(--text-4); }
.auth-input input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.auth-input input:-webkit-autofill { -webkit-text-fill-color: var(--text); caret-color: var(--text); box-shadow: 0 0 0 40px var(--card) inset; }
.auth-input input:-webkit-autofill:focus { box-shadow: 0 0 0 40px var(--card) inset, 0 0 0 3px var(--primary-soft); }
.auth-eye { position: absolute; right: 5px; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; border: 0; border-radius: 6px; background: none; color: var(--text-4); font-size: 14px; cursor: pointer; transition: color .15s, background .15s; }
.auth-eye:hover { color: var(--primary); background: var(--primary-soft); }
.auth-divider { height: 1px; margin: 20px 0; background: var(--line); }

.auth-captcha { display: flex; justify-content: center; min-height: 78px; margin: 4px 0 16px; }
.auth-error { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; padding: 10px 14px; border: 1px solid rgba(229,56,59,0.32); border-radius: 8px; background: var(--up-soft); color: var(--up); font-size: 13.5px; font-weight: 500; animation: auth-shake .4s; }
@keyframes auth-shake { 10%, 90% { transform: translateX(-1px); } 20%, 80% { transform: translateX(2px); } 30%, 50%, 70% { transform: translateX(-4px); } 40%, 60% { transform: translateX(4px); } }
.auth-remember { display: flex; align-items: center; gap: 8px; margin-bottom: 18px; font-size: 13.5px; color: var(--text-2); cursor: pointer; user-select: none; }
.auth-remember input { flex-shrink: 0; width: 16px; height: 16px; accent-color: var(--primary); cursor: pointer; }
.auth-remember .hint { font-size: 12px; color: var(--text-4); }
.auth-submit { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; height: 48px; border: 0; border-radius: 8px; background: var(--primary); color: #fff; font: 700 16px var(--f-sans); letter-spacing: .06em; cursor: pointer; box-shadow: 0 6px 16px -8px rgba(22,99,214,0.7); transition: background .15s, transform .1s; }
.auth-submit:hover { background: var(--primary-2); }
.auth-submit:active { transform: scale(.99); }
.auth-submit:disabled { opacity: .65; cursor: not-allowed; transform: none; }
html[data-theme="dark"] .auth-submit:hover { background: #3b7fe6; }
.auth-links { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 12px; margin-top: 18px; font-size: 13.5px; }
.auth-links a { color: var(--primary); font-weight: 500; }
.auth-links a:hover { text-decoration: underline; text-underline-offset: 3px; }
.auth-trust { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 16px; font-size: 12px; color: var(--text-4); }
.auth-foot { margin: 24px -40px -28px; padding: 16px 40px; border-top: 1px solid var(--line); background: var(--card-2); text-align: center; font-size: 12.5px; line-height: 1.7; color: var(--text-3); }
.auth-foot .donate-img { display: inline-block; height: 34px; width: auto; margin-top: 8px; opacity: .85; transition: opacity .15s; }
.auth-foot .donate-img:hover { opacity: 1; }
/* oauth_buttons.php 自帶的樣式是舊配色，這裡蓋成 v3（它的 color 有 !important，所以這裡也要） */
.auth-card .oauth-btn { height: 46px; padding: 0 12px; border-radius: 8px; font-size: 14.5px; }
.auth-card .oauth-google { background: var(--card); color: var(--text) !important; border-color: var(--line-2); }
.auth-card .oauth-divider { color: var(--text-4); }
.auth-card .oauth-divider::before, .auth-card .oauth-divider::after { background: var(--line); }

@media (max-width: 860px) {
  .auth-main { padding: calc(var(--head-h) + 20px) 0 40px; }
  .auth-shell { grid-template-columns: minmax(0, 1fr); max-width: 520px; }
  .auth-side { order: 0; padding: 28px 24px; }
}
@media (max-width: 480px) {
  .auth-card { padding: 26px 18px 22px; }
  .auth-foot { margin: 22px -18px -22px; padding: 14px 18px; }
  .auth-head h1 { font-size: 23px; }
}
@media (max-width: 370px) { .auth-captcha .g-recaptcha { transform: scale(.86); } }
