/* 主動式 ETF 持股異動 — 手機優先、純靜態、無外部資源 */
:root {
  color-scheme: dark;
  --bg: #0b0e14;
  --surface-1: #141821;
  --surface-2: #1b2130;
  --surface-3: #242c3f;
  --line: rgba(255, 255, 255, .09);
  --line-strong: rgba(255, 255, 255, .18);
  --text-primary: #f1f3f8;
  --text-secondary: #b9c0d0;
  --text-muted: #8791a6;
  --accent: #6aa9ff;
  --accent-2: #7ce0d0;
  /* 台股慣例：紅＝增加、綠＝減少；一律搭配 ▲▼ 與文字，不單靠顏色 */
  --up: #e66767;
  --down: #199e70;
  --up-ink: #ffb1ae;
  --down-ink: #7fdcb9;
  --neutral: #383f50;
  /* 基金識別色（固定跟著基金，不跟排名） */
  --fund-00981A: #3987e5;
  --fund-00980A: #c98500;
  --fund-00982A: #d55181;
  --warn: #fab219;
  --radius: 16px;
  --radius-sm: 10px;
  --font: "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", system-ui, -apple-system, "Segoe UI", sans-serif;
  --num: "SF Pro Display", "Inter", "Helvetica Neue", Arial, var(--font);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0; background: var(--bg); color: var(--text-primary);
  font: 16px/1.65 var(--font); min-width: 0;
  background-image:
    radial-gradient(900px 480px at 85% -8%, rgba(57, 135, 229, .22), transparent 60%),
    radial-gradient(700px 420px at -10% 4%, rgba(124, 224, 208, .10), transparent 60%);
  background-repeat: no-repeat;
}
h1, h2, h3, p { margin: 0; }
button, input, select { font: inherit; color: inherit; }
a { color: var(--accent); }
.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.skip { position: absolute; left: -999px; top: 0; background: #fff; color: #000; padding: 8px 12px; z-index: 99; }
.skip:focus { left: 8px; top: 8px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.num { font-family: var(--num); font-variant-numeric: tabular-nums; }

/* ---------- 頂列 ---------- */
.topbar { position: sticky; top: 0; z-index: 30; background: rgba(11, 14, 20, .82); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.topbar__in { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 56px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text-primary); text-decoration: none; font-size: 15px; white-space: nowrap; min-width: 0; }
.brand b { font-weight: 700; }
.brand__mark { width: 22px; height: 22px; border-radius: 7px; flex: none; background: conic-gradient(from 210deg, var(--fund-00981A), var(--accent-2), var(--fund-00982A), var(--fund-00980A), var(--fund-00981A)); box-shadow: 0 0 18px rgba(106, 169, 255, .5); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 20px; border-radius: 999px; border: 1px solid transparent; font-weight: 700; cursor: pointer; text-decoration: none; white-space: nowrap; transition: transform .15s, box-shadow .15s, background .15s; }
.btn--sm { min-height: 40px; padding: 0 14px; font-size: 14px; }
.btn--primary { background: linear-gradient(135deg, #7db6ff, #4f8ff0 55%, #3b6fe0); color: #07101f; box-shadow: 0 6px 22px rgba(79, 143, 240, .35); }
.btn--primary:hover { transform: translateY(-1px); box-shadow: 0 10px 28px rgba(79, 143, 240, .5); }
.btn--ghost { background: transparent; border-color: var(--line-strong); color: var(--text-primary); }
.btn--block { width: 100%; margin-top: 12px; }

/* ---------- Hero ---------- */
.hero { padding-top: 28px; }
.eyebrow { color: var(--accent-2); font-size: 13px; letter-spacing: .08em; }
h1 { font-size: clamp(26px, 7.2vw, 46px); line-height: 1.25; letter-spacing: .01em; margin-top: 8px; font-weight: 800; background: linear-gradient(180deg, #fff 30%, #b9d3ff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero__sub { margin-top: 12px; color: var(--text-secondary); max-width: 40em; }
.hero__sub b { color: var(--text-primary); }
.notice { display: flex; gap: 10px; align-items: flex-start; margin-top: 16px; padding: 12px 14px; border-radius: var(--radius-sm); background: rgba(250, 178, 25, .09); border: 1px solid rgba(250, 178, 25, .35); color: var(--text-secondary); font-size: 14px; line-height: 1.6; }
.notice b { color: #ffd98a; }
.notice__icon { flex: none; width: 20px; height: 20px; border-radius: 50%; background: var(--warn); color: #201400; font-weight: 800; font-size: 13px; display: grid; place-items: center; margin-top: 2px; }

.controls { display: grid; gap: 12px; margin-top: 20px; }
.datebar { display: grid; grid-template-columns: 48px minmax(0, 1fr) 48px; gap: 8px; align-items: stretch; }
.iconbtn { height: 56px; border-radius: var(--radius-sm); border: 1px solid var(--line-strong); background: var(--surface-1); font-size: 24px; line-height: 1; cursor: pointer; }
.iconbtn:disabled { opacity: .35; cursor: not-allowed; }
.datebar__main { display: flex; flex-direction: column; justify-content: center; padding: 6px 14px; border-radius: var(--radius-sm); border: 1px solid var(--line-strong); background: var(--surface-1); min-width: 0; }
.datebar__label { font-size: 12px; color: var(--text-muted); line-height: 1.2; }
.datebar select { appearance: none; -webkit-appearance: none; background: transparent; border: 0; font: 700 19px/1.3 var(--num); padding: 0; width: 100%; cursor: pointer; }
.datebar select option { background: var(--surface-1); }
.fundfilter { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.fundchip { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 8px 10px; min-height: 52px; border-radius: var(--radius-sm); border: 1px solid var(--line-strong); background: var(--surface-1); cursor: pointer; text-align: left; min-width: 0; }
.fundchip__id { font: 700 14px/1.2 var(--num); display: flex; align-items: center; gap: 6px; }
.fundchip__name { font-size: 12px; color: var(--text-muted); line-height: 1.2; }
.fundchip[aria-pressed="false"] { opacity: .45; background: transparent; }
.fundchip[aria-pressed="true"] { border-color: var(--c); box-shadow: inset 0 0 0 1px var(--c); }
.swatch { width: 10px; height: 10px; border-radius: 3px; background: var(--c); flex: none; display: inline-block; }

.strip { display: flex; align-items: flex-end; gap: 3px; height: 74px; margin-top: 16px; padding: 10px 2px 0; }
.strip__bar { flex: 1 1 0; min-width: 0; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 3px; background: none; border: 0; padding: 0; cursor: pointer; position: relative; }
.strip__bar i { display: block; width: 100%; border-radius: 4px 4px 0 0; background: var(--surface-3); min-height: 3px; transition: background .2s; }
.strip__bar:hover i { background: #3a4660; }
.strip__bar[aria-current="true"] i { background: linear-gradient(180deg, #8ec0ff, #3f7fe6); }
.strip__bar b { width: 6px; height: 6px; border-radius: 50%; background: var(--warn); flex: none; }
.strip__bar b.off { visibility: hidden; }
.strip__cap { margin-top: 6px; font-size: 12px; color: var(--text-muted); line-height: 1.6; }
.dotkey { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--warn); vertical-align: middle; margin: 0 2px; }

.alert { display: flex; gap: 10px; margin-top: 12px; padding: 12px 14px; border-radius: var(--radius-sm); border: 1px solid rgba(236, 131, 90, .55); background: rgba(236, 131, 90, .12); font-size: 14px; line-height: 1.6; }
.alert b { color: #ffc3a8; }

/* ---------- 區塊 ---------- */
.section { margin-top: 44px; }
.section__head { margin-bottom: 14px; }
h2 { font-size: 22px; font-weight: 800; letter-spacing: .02em; }
.section__desc { color: var(--text-muted); font-size: 14px; margin-top: 4px; line-height: 1.6; }
.subhead { font-size: 15px; color: var(--text-secondary); margin: 26px 0 10px; font-weight: 700; }
.footnote { font-size: 12px; color: var(--text-muted); margin-top: 10px; }

/* 今日重點 */
.hl { display: grid; gap: 12px; }
.hlcard { background: linear-gradient(180deg, var(--surface-2), var(--surface-1)); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; position: relative; overflow: hidden; min-width: 0; }
.hlcard::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: var(--k); }
.hlcard__top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.hlcard__title { font-size: 15px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.hlcard__glyph { color: var(--k-ink); font-size: 13px; }
.hlcard__n { font: 800 40px/1 var(--num); }
.hlcard__n small { font: 500 13px var(--font); color: var(--text-muted); margin-left: 4px; }
.hlcard__empty { color: var(--text-muted); font-size: 14px; margin-top: 10px; }
.hlitems { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 8px; }
.hlitem { width: 100%; text-align: left; background: rgba(255, 255, 255, .035); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 12px; cursor: pointer; display: block; min-height: 48px; }
.hlitem:hover { border-color: var(--line-strong); background: rgba(255, 255, 255, .06); }
.hlitem__name { font-weight: 700; display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.hlitem__name .num { color: var(--text-muted); font-size: 13px; font-weight: 500; }
.hlitem__funds { display: grid; gap: 2px; margin-top: 6px; font-size: 13px; color: var(--text-secondary); }
.hlitem__funds span { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.fallback { margin-top: 12px; padding: 12px 14px; border-radius: var(--radius-sm); border: 1px dashed var(--line-strong); color: var(--text-secondary); font-size: 14px; display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; justify-content: space-between; }
.linkbtn { background: none; border: 0; color: var(--accent); font-weight: 700; cursor: pointer; padding: 10px 0; min-height: 44px; }

.fundtiles { display: grid; gap: 12px; }
.ftile { background: var(--surface-1); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; min-width: 0; border-left: 0; position: relative; }
.ftile__head { display: flex; align-items: center; gap: 8px; font-weight: 700; flex-wrap: wrap; }
.ftile__head .num { font-size: 16px; }
.ftile__name { color: var(--text-muted); font-size: 13px; font-weight: 500; }
.ftile__rank { margin-left: auto; font-size: 12px; color: var(--text-muted); border: 1px solid var(--line); border-radius: 999px; padding: 1px 8px; white-space: nowrap; }
.ftile__aum { font: 800 26px/1.2 var(--num); margin-top: 8px; }
.ftile__aum small { font: 500 13px var(--font); color: var(--text-muted); margin-left: 4px; }
.ftile__meta { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.acts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin-top: 12px; }
.act { background: var(--surface-2); border-radius: 8px; padding: 6px 4px; text-align: center; min-width: 0; }
.act b { display: block; font: 700 18px/1.2 var(--num); }
.act span { font-size: 12px; color: var(--text-muted); white-space: nowrap; }
.act--zero b { color: var(--text-muted); font-weight: 500; }
.ftile--off { border-style: dashed; }
.ftile__warn { margin-top: 10px; font-size: 13px; color: #ffc3a8; }

/* 工具列 */
.toolbar { display: flex; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.toolbar--wrap { align-items: center; justify-content: space-between; }
.seg { display: inline-grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); background: var(--surface-1); border: 1px solid var(--line-strong); border-radius: 999px; padding: 3px; max-width: 100%; }
.seg button { border: 0; background: transparent; border-radius: 999px; padding: 0 12px; min-height: 40px; font-size: 14px; cursor: pointer; color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.seg button[aria-pressed="true"], .seg button[aria-checked="true"] { background: var(--surface-3); color: var(--text-primary); font-weight: 700; box-shadow: inset 0 0 0 1px var(--line-strong); }
.seg--fund, .seg--full { display: grid; width: 100%; }
.seg[hidden] { display: none; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { border: 1px solid var(--line-strong); background: transparent; border-radius: 999px; padding: 0 12px; min-height: 36px; font-size: 13px; cursor: pointer; color: var(--text-secondary); white-space: nowrap; }
.chip[aria-pressed="true"] { background: var(--text-primary); color: #0b0e14; border-color: transparent; font-weight: 700; }
.chip .num { opacity: .7; margin-left: 2px; }
.selectwrap { font-size: 13px; color: var(--text-muted); display: flex; align-items: center; gap: 6px; }
.selectwrap select { background: var(--surface-1); border: 1px solid var(--line-strong); border-radius: 999px; min-height: 36px; padding: 0 12px; font-size: 13px; max-width: 100%; }

/* 熱度圖 */
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12px; color: var(--text-secondary); margin-bottom: 10px; align-items: center; }
.legend i { display: inline-block; width: 14px; height: 14px; border-radius: 4px; vertical-align: -2px; margin-right: 5px; }
.legend .ramp { display: inline-flex; align-items: center; gap: 6px; }
.legend .ramp span.bar { width: 96px; height: 10px; border-radius: 5px; display: inline-block; }
.heat { display: grid; gap: 2px; background: var(--surface-1); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; }
.heat__row { display: grid; grid-template-columns: minmax(84px, 1.15fr) repeat(var(--n), minmax(0, 1fr)); gap: 2px; align-items: stretch; }
.heat__row--head { position: sticky; top: 56px; z-index: 5; background: var(--surface-1); padding-bottom: 6px; }
.heat__fh { font: 700 12px/1.3 var(--num); text-align: center; color: var(--text-secondary); display: flex; flex-direction: column; align-items: center; gap: 3px; }
.heat__fh small { font: 500 11px var(--font); color: var(--text-muted); }
.heat__name { border: 0; background: none; text-align: left; padding: 4px 6px 4px 2px; cursor: pointer; min-width: 0; min-height: 46px; display: flex; flex-direction: column; justify-content: center; border-radius: 6px; }
.heat__name:hover { background: rgba(255, 255, 255, .05); }
.heat__name b { font-size: 14px; font-weight: 700; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.heat__name span { font: 500 11px/1.2 var(--num); color: var(--text-muted); }
.heat__name em { font-style: normal; color: var(--warn); margin-left: 4px; }
.cell { border-radius: 6px; min-height: 46px; display: flex; flex-direction: column; align-items: center; justify-content: center; font: 700 12.5px/1.25 var(--num); color: var(--text-primary); background: var(--cbg, rgba(255, 255, 255, .03)); text-align: center; padding: 2px; min-width: 0; cursor: default; animation: pop .35s both; animation-delay: var(--d, 0ms); }
.cell small { font: 500 10.5px/1.2 var(--font); color: var(--text-secondary); white-space: nowrap; }
.cell--none { background: transparent; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06); color: var(--text-muted); font-weight: 400; }
.cell--hold { background: rgba(255, 255, 255, .05); color: var(--text-muted); font-weight: 500; }
.cell--miss { background: repeating-linear-gradient(135deg, rgba(236, 131, 90, .22) 0 6px, transparent 6px 12px); color: #ffc3a8; }
@keyframes pop { from { opacity: 0; transform: scale(.9); } to { opacity: 1; transform: none; } }
.empty { padding: 28px 16px; text-align: center; color: var(--text-muted); font-size: 14px; }
.morebtn { width: 100%; margin-top: 10px; min-height: 48px; border-radius: var(--radius-sm); border: 1px dashed var(--line-strong); background: transparent; color: var(--text-secondary); cursor: pointer; }

/* 排行 */
.ranksum { font-size: 13px; color: var(--text-muted); margin-bottom: 8px; }
.ranklist { display: grid; gap: 8px; }
.rrow { background: var(--surface-1); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px; cursor: pointer; text-align: left; width: 100%; display: block; min-width: 0; }
.rrow:hover { border-color: var(--line-strong); }
.rrow__top { display: flex; align-items: center; gap: 8px; min-width: 0; }
.rrow__name { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.rrow__code { font: 500 12px var(--num); color: var(--text-muted); flex: none; }
.badge { margin-left: auto; flex: none; font-size: 12px; font-weight: 700; border-radius: 999px; padding: 2px 9px; white-space: nowrap; border: 1px solid; }
.badge--new, .badge--add { color: var(--up-ink); border-color: rgba(230, 103, 103, .6); }
.badge--new { background: rgba(230, 103, 103, .22); }
.badge--reduce, .badge--exit { color: var(--down-ink); border-color: rgba(25, 158, 112, .7); }
.badge--exit { background: rgba(25, 158, 112, .25); }
.badge--hold, .badge--na { color: var(--text-muted); border-color: var(--line-strong); }
.dbar { position: relative; height: 8px; margin: 10px 0 8px; background: linear-gradient(90deg, transparent calc(50% - .5px), var(--line-strong) calc(50% - .5px) calc(50% + .5px), transparent calc(50% + .5px)); }
.dbar i { position: absolute; top: 0; bottom: 0; }
.dbar i.up { left: 50%; background: var(--up); border-radius: 0 4px 4px 0; }
.dbar i.down { right: 50%; background: var(--down); border-radius: 4px 0 0 4px; }
.dbar--seq { background: var(--surface-3); border-radius: 4px; }
.dbar--seq i { left: 0; background: var(--accent); border-radius: 4px; }
.rrow__vals { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 12px; font-size: 13px; }
.kv { min-width: 0; }
.kv span { display: block; font-size: 11px; color: var(--text-muted); line-height: 1.3; }
.kv b { font: 700 14px/1.35 var(--num); }
.kv small { font: 500 12px var(--num); color: var(--text-muted); margin-left: 4px; white-space: nowrap; }
.t-up { color: var(--up-ink); }
.t-down { color: var(--down-ink); }

/* 個股 */
.search { position: relative; }
.search input { width: 100%; min-height: 52px; border-radius: var(--radius-sm); border: 1px solid var(--line-strong); background: var(--surface-1); padding: 0 16px; font-size: 16px; }
.suggest { position: absolute; z-index: 10; left: 0; right: 0; top: 56px; list-style: none; margin: 0; padding: 6px; background: var(--surface-2); border: 1px solid var(--line-strong); border-radius: var(--radius-sm); max-height: 280px; overflow: auto; box-shadow: 0 18px 40px rgba(0, 0, 0, .5); }
.suggest li { padding: 10px 12px; border-radius: 8px; cursor: pointer; display: flex; gap: 10px; align-items: baseline; min-height: 44px; }
.suggest li:hover, .suggest li[aria-selected="true"] { background: var(--surface-3); }
.suggest li .num { color: var(--text-muted); font-size: 13px; }
.sd { margin-top: 14px; background: var(--surface-1); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; min-width: 0; }
.sd__title { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.sd__title h3 { font-size: 24px; font-weight: 800; }
.sd__title .num { color: var(--text-muted); }
.sd__tag { font-size: 12px; border-radius: 999px; padding: 2px 10px; background: rgba(250, 178, 25, .15); color: #ffd98a; border: 1px solid rgba(250, 178, 25, .4); }
.sd__grid { display: grid; gap: 8px; margin-top: 14px; }
.sdf { background: var(--surface-2); border-radius: var(--radius-sm); padding: 12px; min-width: 0; }
.sdf__head { display: flex; align-items: center; gap: 8px; font: 700 14px var(--num); }
.sdf__head .badge { margin-left: auto; }
.sdf .rrow__vals { margin-top: 8px; }
.sdf--off { color: var(--text-muted); font-size: 13px; }
.chartbox { margin-top: 18px; min-width: 0; }
.chartbox h4 { margin: 0 0 2px; font-size: 15px; }
.chartbox p { font-size: 12px; color: var(--text-muted); }
.clegend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12.5px; color: var(--text-secondary); margin: 8px 0 4px; }
.clegend span { display: inline-flex; align-items: center; gap: 6px; }
.clegend i { width: 14px; height: 3px; border-radius: 2px; background: var(--c); display: inline-block; }
svg.chart { display: block; width: 100%; height: auto; touch-action: pan-y; }
svg.chart text { font: 500 11px var(--num); fill: var(--text-muted); }
.mini { display: grid; gap: 10px; margin-top: 8px; }
.mini__item { background: var(--surface-2); border-radius: var(--radius-sm); padding: 10px 10px 4px; min-width: 0; }
.mini__head { display: flex; gap: 8px; align-items: center; font: 700 13px var(--num); }
.mini__head small { margin-left: auto; font: 500 12px var(--num); color: var(--text-muted); }
details.tbl { margin-top: 14px; }
details.tbl summary, details.proto summary { cursor: pointer; color: var(--accent); font-size: 14px; min-height: 44px; display: flex; align-items: center; }
.tscroll { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--line); border-radius: var(--radius-sm); }
table { border-collapse: collapse; width: 100%; font-size: 13px; }
th, td { padding: 8px 10px; text-align: right; white-space: nowrap; border-bottom: 1px solid var(--line); font-family: var(--num); font-variant-numeric: tabular-nums; }
th { color: var(--text-muted); font-weight: 500; background: var(--surface-2); }
th:first-child, td:first-child { text-align: left; }

/* CTA / footer */
.cta__box { display: grid; gap: 14px; background: linear-gradient(135deg, rgba(57, 135, 229, .22), rgba(124, 224, 208, .10)); border: 1px solid rgba(106, 169, 255, .35); border-radius: var(--radius); padding: 20px; }
.cta__box p { color: var(--text-secondary); font-size: 14px; margin-top: 4px; }
.footer { margin-top: 56px; padding: 36px 0 48px; border-top: 1px solid var(--line); background: rgba(255, 255, 255, .02); }
.footer__title { font-size: 18px; }
.exits { display: grid; gap: 10px; margin-top: 14px; }
.exit { display: flex; gap: 12px; align-items: center; padding: 14px; min-height: 72px; background: var(--surface-1); border: 1px solid var(--line); border-radius: var(--radius); color: var(--text-primary); text-decoration: none; transition: border-color .15s, transform .15s; min-width: 0; }
.exit:hover { border-color: var(--accent); transform: translateY(-2px); }
.exit__icon { font-size: 26px; flex: none; }
.exit__body { display: grid; min-width: 0; }
.exit__body span { font-size: 13px; color: var(--text-muted); line-height: 1.5; }
.exit__go { margin-left: auto; color: var(--accent); flex: none; }
.sources { margin-top: 28px; font-size: 13px; color: var(--text-secondary); line-height: 1.8; }
.sources h3 { font-size: 14px; color: var(--text-primary); margin-bottom: 4px; }
.sources ul { margin: 6px 0; padding-left: 18px; }
.sources a { word-break: break-all; }
.legal { margin-top: 18px; font-size: 12.5px; color: var(--text-muted); line-height: 1.8; }
.legal b { color: #ffd98a; font-size: 14px; }

/* Modal */
.modal { border: 0; padding: 0; background: transparent; color: var(--text-primary); width: min(440px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); }
.modal::backdrop { background: rgba(4, 6, 10, .72); backdrop-filter: blur(4px); }
.modal__box { position: relative; background: var(--surface-2); border: 1px solid var(--line-strong); border-radius: 20px; padding: 22px 18px 18px; }
.modal__close { position: absolute; right: 8px; top: 8px; width: 44px; height: 44px; border: 0; background: none; font-size: 26px; cursor: pointer; color: var(--text-muted); }
.modal h2 { font-size: 20px; padding-right: 36px; }
.modal__lead { color: var(--text-secondary); font-size: 14px; margin-top: 6px; }
.field { border: 0; padding: 0; margin: 14px 0 0; min-width: 0; }
.field label, .field legend { display: block; font-size: 13px; color: var(--text-secondary); margin-bottom: 6px; padding: 0; }
.field input[type="text"], .field input[type="email"] { width: 100%; min-height: 48px; border-radius: var(--radius-sm); border: 1px solid var(--line-strong); background: var(--surface-1); padding: 0 14px; font-size: 16px; }
.field input[aria-invalid="true"] { border-color: var(--up); }
.field__err { color: var(--up-ink); font-size: 13px; margin-top: 6px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; color: var(--text-secondary); margin-top: 12px; line-height: 1.55; cursor: pointer; }
.check input { width: 20px; height: 20px; flex: none; margin: 1px 0 0; accent-color: #4f8ff0; }
.modal__fine { font-size: 12px; color: var(--text-muted); margin-top: 10px; text-align: center; }
.proto pre { background: var(--surface-1); border-radius: var(--radius-sm); padding: 12px; font-size: 12px; overflow: auto; margin: 0; white-space: pre-wrap; word-break: break-all; }

.tip { position: fixed; z-index: 60; pointer-events: none; background: #05070b; border: 1px solid var(--line-strong); border-radius: 10px; padding: 8px 10px; font-size: 12.5px; line-height: 1.55; color: var(--text-primary); max-width: min(280px, calc(100vw - 16px)); box-shadow: 0 12px 30px rgba(0, 0, 0, .55); }
.tip b { font-family: var(--num); }
.tip .row { display: flex; gap: 8px; align-items: center; white-space: nowrap; }
[hidden] { display: none !important; }

/* ---------- 寬螢幕 ---------- */
@media (min-width: 720px) {
  .wrap { padding: 0 28px; }
  .hero { padding-top: 48px; }
  .controls { grid-template-columns: minmax(260px, 340px) minmax(0, 1fr); }
  .hl { grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; }
  .fundtiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .seg--fund { width: auto; display: inline-grid; }
  .ranklist { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sd__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .mini { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .exits { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cta__box { grid-template-columns: minmax(0, 1fr) auto; align-items: center; padding: 28px; }
  .heat { padding: 16px; }
  .heat__row { grid-template-columns: minmax(150px, 220px) repeat(var(--n), minmax(0, 1fr)); }
  .heat__name { flex-direction: row; align-items: baseline; justify-content: flex-start; gap: 8px; }
  .cell { flex-direction: row; gap: 8px; font-size: 13.5px; }
  .cell small { font-size: 12px; }
  h2 { font-size: 26px; }
}
@media (min-width: 1000px) {
  .ranklist { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
