/* ═══════════════════════════════════════════════════════════════
   成果與數據 /results/ — 頁面專屬樣式
   只用 site.css 的代幣；共用元件（.sec / .kpi / .tag / .btn / .grid）不在這裡重定義。
   ═══════════════════════════════════════════════════════════════ */

/* ── 進場：site.js 在元素進視窗時加 .in；<html class="js"> 由本頁 head_extra 的一行腳本加上，
      沒有 JS 時元素照常顯示；prefers-reduced-motion 直接顯示 ── */
.js .reveal{ opacity:0; transform:translateY(12px); transition:opacity .5s ease, transform .5s ease; }
.js .reveal.in{ opacity:1; transform:none; }
.js .grid > .reveal:nth-child(2), .js .tl-items > .reveal:nth-child(2){ transition-delay:.08s; }
.js .grid > .reveal:nth-child(3), .js .tl-items > .reveal:nth-child(3){ transition-delay:.16s; }
.js .grid > .reveal:nth-child(4), .js .tl-items > .reveal:nth-child(4){ transition-delay:.24s; }
@media (prefers-reduced-motion:reduce){ .js .reveal{ opacity:1; transform:none; transition:none; } }

/* ── 1. 開場 ── */
.res-hero{ padding-top:clamp(28px,5vw,64px); padding-bottom:clamp(20px,3vw,40px); overflow:hidden; }
.res-hero-in{ position:relative; z-index:1; display:grid; gap:32px; align-items:center; }
@media (min-width:900px){ .res-hero-in{ grid-template-columns:minmax(0,1.15fr) minmax(0,.85fr); gap:56px; } }
.res-h1{ font-size:var(--fs-h1); font-weight:900; margin:4px 0 18px; }
.res-h1 b{ color:var(--blue); font-weight:900; }
.res-facts{ list-style:none; padding:0; margin:22px 0 0; display:flex; flex-wrap:wrap; gap:8px; }
.res-facts li{ background:var(--card); border:1px solid var(--line); border-radius:var(--r-pill); padding:5px 12px; font-size:var(--fs-xs); font-weight:700; color:var(--ink); line-height:1.6; }
.res-facts li b{ color:var(--ink-dim); font-weight:700; margin-right:6px; }
.res-hero-fig{ margin:0; max-width:520px; }
.res-hero-fig picture{ border-radius:var(--r); overflow:hidden; box-shadow:var(--shadow-lg); background:var(--card); transform:rotate(-1.5deg); }
.res-hero-fig figcaption{ margin-top:14px; font-size:var(--fs-xs); color:var(--ink-dim); line-height:1.7; }
@media (min-width:900px){ .res-hero-fig{ justify-self:end; width:100%; } }

/* 成果頁快速導覽：在長頁面中保留方向感，44px 以上點擊區 */
.page-results section[id]{ scroll-margin-top:calc(var(--topbar-h) + 68px); }
.res-jump{ position:sticky; top:var(--topbar-h); z-index:8; background:rgba(255,255,255,.94); border-top:1px solid var(--line); border-bottom:1px solid var(--line); backdrop-filter:blur(12px); }
.res-jump-in{ display:flex; gap:6px; padding-top:9px; padding-bottom:9px; overflow-x:auto; scrollbar-width:none; }
.res-jump-in::-webkit-scrollbar{ display:none; }
.res-jump a{ min-height:44px; padding:9px 14px; display:flex; align-items:center; border-radius:var(--r-pill); color:var(--ink-dim); font-size:var(--fs-small); font-weight:900; white-space:nowrap; }
.res-jump a:first-child{ color:var(--blue); background:var(--blue-tint); }
.res-jump a:hover{ color:var(--blue); background:var(--blue-tint); text-decoration:none; }

/* ── 2. 四大數字 ── */
@media (max-width:479px){ .res-kpis.grid-4{ grid-template-columns:1fr; } }   /* 最窄手機：數字不換行 */
.kpi-en{ margin:0 0 2px; font-size:10.5px; font-weight:700; letter-spacing:.2em; color:var(--ink-dim); text-transform:uppercase; }

.how{ margin-top:clamp(24px,3vw,40px); display:grid; gap:24px; align-items:start; }
@media (min-width:900px){ .how{ grid-template-columns:minmax(0,1fr) minmax(0,1.25fr); gap:48px; } }
.how h3{ font-size:var(--fs-h3); font-weight:900; margin:0 0 10px; }
.how-link{ font-weight:900; }
.layers{ list-style:none; margin:0; padding:0; display:grid; gap:10px; }
.layers li{ background:var(--card); border-radius:var(--r-sm); box-shadow:var(--shadow); padding:14px 16px; display:grid; grid-template-columns:28px minmax(0,1fr); gap:12px; align-items:start; }
.ly-n{ width:28px; height:28px; border-radius:50%; background:var(--blue-tint); color:var(--blue); font-weight:900; font-size:13px; display:grid; place-items:center; margin-top:2px; }
.layers b{ font-weight:900; color:var(--ink); }
.ly-val{ color:var(--blue); font-weight:900; margin-left:8px; white-space:nowrap; }
.ly-val small{ font-size:.8em; font-weight:900; }
.ly-desc{ display:block; color:var(--ink-dim); font-size:var(--fs-small); line-height:1.7; margin-top:2px; }

.data-panels{ margin-top:clamp(24px,3vw,40px); display:grid; gap:12px; }
.data-panel{ background:var(--card); border:1px solid var(--line); border-radius:var(--r); box-shadow:var(--shadow); overflow:hidden; }
.data-panel > summary{ min-height:78px; padding:16px 20px; display:flex; align-items:center; justify-content:space-between; gap:16px; cursor:pointer; list-style:none; }
.data-panel > summary::-webkit-details-marker{ display:none; }
.data-panel > summary span{ display:grid; gap:2px; }
.data-panel > summary b{ font-size:var(--fs-h3); font-weight:900; color:var(--ink); }
.data-panel > summary small{ color:var(--ink-dim); font-size:var(--fs-xs); line-height:1.6; }
.data-panel > summary strong{ flex:0 0 auto; color:var(--blue); font-size:var(--fs-small); font-weight:900; }
.data-panel > summary strong::after{ content:"＋"; display:inline-grid; place-items:center; width:28px; height:28px; margin-left:8px; border-radius:50%; background:var(--blue-tint); font-size:18px; vertical-align:middle; }
.data-panel[open] > summary strong::after{ content:"－"; }
.data-panel[open] > summary{ border-bottom:1px solid var(--line); }
.data-panel-body{ padding:16px 20px 20px; }
@media (max-width:639px){
  .data-panel > summary{ padding:14px 16px; align-items:flex-start; }
  .data-panel > summary strong{ font-size:0; }
  .data-panel > summary strong::after{ margin-left:0; font-size:18px; }
  .data-panel-body{ padding:12px 14px 16px; }
}
.bd-wrap{ background:var(--card); border-radius:var(--r); box-shadow:var(--shadow); overflow:hidden; }
.bd-tbl{ width:100%; border-collapse:collapse; font-size:var(--fs-small); }
.bd-tbl th,.bd-tbl td{ padding:12px 16px; text-align:left; vertical-align:top; border-top:1px solid var(--line); }
.bd-tbl thead th{ border-top:0; background:var(--blue-tint); color:var(--blue); font-size:var(--fs-xs); letter-spacing:.08em; font-weight:900; white-space:nowrap; }
.bd-tbl .num{ text-align:right; white-space:nowrap; font-weight:900; color:var(--blue); font-size:var(--fs-body); }
.bd-tbl .num small{ font-size:.75em; margin:0 .05em; }
.bd-tbl .who{ min-width:12em; }
.bd-tbl .who b{ display:block; font-weight:700; color:var(--ink); }
.bd-tbl .who small{ display:block; color:var(--ink-dim); font-size:var(--fs-xs); line-height:1.6; margin-top:2px; }
.bd-tbl .who .tag{ margin-top:8px; }
.bd-tbl .fx{ color:var(--ink-dim); line-height:1.7; }
.bd-note{ margin-top:10px; font-size:var(--fs-xs); color:var(--ink-dim); line-height:1.7; }
@media (max-width:719px){   /* 手機：每列疊成一張小卡（role 屬性保住表格語意） */
  .bd-tbl thead{ display:none; }
  .bd-tbl tbody tr{ display:grid; grid-template-columns:minmax(0,1fr) auto; gap:4px 14px; padding:14px 16px; border-top:1px solid var(--line); }
  .bd-tbl tbody tr:first-child{ border-top:0; }
  .bd-tbl td{ display:block; padding:0; border:0; }
  .bd-tbl td.num{ grid-column:2; grid-row:1; }
  .bd-tbl td.fx{ grid-column:1 / -1; }
}

/* ── 3. 我們這樣做 ── */
.why{ list-style:none; padding:0; margin:0 0 clamp(24px,3vw,36px); display:grid; gap:12px; max-width:880px; }
@media (min-width:640px){ .why{ grid-template-columns:1fr 1fr; } }
.why li{ position:relative; background:var(--page); border-radius:var(--r-sm); padding:14px 16px 14px 50px; }
.why li::before{ content:"✓"; position:absolute; left:14px; top:14px; width:26px; height:26px; border-radius:50%; background:var(--blue); color:var(--card); font-weight:900; font-size:14px; line-height:26px; text-align:center; }
.why b{ display:block; font-weight:900; color:var(--ink); }
.why span{ color:var(--ink-dim); font-size:var(--fs-small); line-height:1.7; }
.ch-lead{ margin-bottom:16px; }
.ch{ background:var(--card); border:1px solid var(--line); border-radius:var(--r); box-shadow:var(--shadow); padding:20px; display:flex; flex-direction:column; gap:12px; }
.ch-top{ display:flex; align-items:center; gap:14px; }
.ch-logo{ flex:0 0 72px; width:72px; height:72px; border-radius:var(--r-sm); background:var(--page); padding:8px; }
.ch-logo picture{ width:100%; height:100%; }
.ch-logo img{ width:100%; height:100%; object-fit:contain; }
.ch h3{ font-size:var(--fs-h3); font-weight:900; margin-bottom:6px; }
.ch p{ color:var(--ink-dim); font-size:var(--fs-small); line-height:1.75; flex:1; }
.ch-link{ font-weight:900; font-size:var(--fs-small); }

/* ── 4. 20 for future 聯盟 ── */
.al{ display:grid; gap:32px; align-items:start; }
@media (min-width:900px){ .al{ grid-template-columns:minmax(0,.95fr) minmax(0,1.05fr); gap:56px; } }
.al-brand{ display:flex; align-items:center; gap:16px; margin-bottom:18px; }
.al-brand picture{ width:96px; flex:0 0 96px; }
.al-founding{ margin-top:14px; color:var(--ink-dim); font-size:var(--fs-small); line-height:1.75; max-width:60ch; }
.al-pr h3{ font-size:var(--fs-h3); font-weight:900; margin-bottom:12px; }
.pr{ list-style:none; counter-reset:pr; padding:0; margin:0; display:grid; gap:12px; }
@media (min-width:640px){ .pr{ grid-template-columns:1fr 1fr; } }
.pr li{ counter-increment:pr; background:var(--card); border-radius:var(--r); box-shadow:var(--shadow); padding:18px 20px; }
.pr li::before{ content:"0" counter(pr); display:block; font-size:var(--fs-xs); letter-spacing:.2em; font-weight:900; color:var(--blue); margin-bottom:6px; }
.pr li b{ font-weight:900; color:var(--ink); line-height:1.6; }

/* ── 5. 公益沿革時間軸：手機單欄（左側細線）；桌機左欄年份、右欄條目 ── */
.tl-legend{ list-style:none; padding:0; margin:14px 0 0; display:flex; flex-wrap:wrap; gap:8px; }
.tl{ list-style:none; padding:0; margin:0; }
.tl-year{ position:relative; padding-left:34px; margin-bottom:28px; }
.tl-year::before{ content:""; position:absolute; left:8px; top:10px; bottom:-28px; width:2px; background:var(--line); }
.tl-year:last-child::before{ bottom:0; }
.tl-year::after{ content:""; position:absolute; left:0; top:3px; width:18px; height:18px; border-radius:50%; background:var(--blue); box-shadow:0 0 0 4px var(--card); }
.tl-y{ font-size:clamp(24px,3vw,30px); font-weight:900; color:var(--blue); line-height:1; margin:0 0 12px; letter-spacing:-.01em; }
.tl-items{ list-style:none; padding:0; margin:0; display:grid; gap:10px; }
.tl-item{ background:var(--page); border-radius:var(--r-sm); padding:14px 16px; display:flex; align-items:flex-start; gap:14px; }
.tl-body{ flex:1; min-width:0; display:grid; gap:6px; }
.tl-meta{ display:flex; flex-wrap:wrap; align-items:center; gap:8px; }
.tl-meta time{ font-size:var(--fs-xs); font-weight:900; color:var(--ink-dim); letter-spacing:.04em; }
.tl-title{ font-size:var(--fs-body); font-weight:900; color:var(--ink); line-height:1.5; text-wrap:pretty; }
.tl-detail{ font-size:var(--fs-small); color:var(--ink-dim); line-height:1.7; }
.tl-src{ font-size:var(--fs-xs); color:var(--ink-dim); }
.tl-src a{ font-weight:700; }
.tl-img{ flex:0 0 84px; width:84px; height:84px; border-radius:var(--r-sm); overflow:hidden; background:var(--card); border:1px solid var(--line); }
.tl-img picture,.tl-img img{ width:100%; height:100%; }
.tl-img img{ object-fit:cover; }
@media (min-width:900px){
  .tl-year{ display:grid; grid-template-columns:132px minmax(0,1fr); column-gap:40px; padding-left:0; margin-bottom:40px; }
  .tl-year::before{ left:151px; top:14px; bottom:-40px; }
  .tl-year::after{ left:143px; top:14px; }
  .tl-y{ position:sticky; top:calc(var(--topbar-h) + 24px); align-self:start; font-size:44px; margin:0; padding-top:2px; }
  .tl-items{ gap:12px; }
  .tl-item{ padding:16px 20px; gap:20px; }
  .tl-img{ flex-basis:120px; width:120px; height:120px; }
}

/* ── 6. CTA ── */
.res-cta .sec-head{ margin-left:auto; margin-right:auto; text-align:center; max-width:40ch; }
.res-cta-actions{ position:relative; z-index:1; display:flex; flex-wrap:wrap; justify-content:center; align-items:center; gap:14px 22px; }
.res-cta-link{ color:var(--card); font-weight:900; text-decoration:underline; text-underline-offset:4px; text-decoration-color:var(--sky); }
.res-cta-link:hover{ color:var(--sky); }
@media (max-width:639px){ .res-cta .deco{ display:none; } }   /* 窄版：裝飾方塊會壓到 CTA 連結，收起 */

/* ── 2b. 歷年捐款：堆疊直條，純 CSS。條寬 ≤ 24px、段與段之間 2px 底色縫、頂端 4px 圓角、底部齊平 ── */
.dn{ margin:clamp(32px,4vw,56px) 0 0; background:var(--card); border-radius:var(--r); box-shadow:var(--shadow); padding:20px 20px 16px; --dn-co:#0032F0; --dn-ch:#3D8FE8; }
.dn-head{ display:flex; flex-wrap:wrap; align-items:flex-end; justify-content:space-between; gap:8px 20px; margin-bottom:18px; }
.dn-head h3{ font-size:var(--fs-h3); font-weight:900; }
.dn-head p{ font-size:var(--fs-xs); color:var(--ink-dim); margin-top:2px; }
.dn-legend{ list-style:none; padding:0; margin:0; display:flex; gap:16px; font-size:var(--fs-xs); font-weight:700; color:var(--ink-dim); }
.dn-legend li{ display:flex; align-items:center; gap:6px; }
.dn-key{ width:10px; height:10px; border-radius:3px; display:inline-block; flex:0 0 10px; }
.dn-co{ background:var(--dn-co); } .dn-ch{ background:var(--dn-ch); }
.dn-plot{ position:relative; height:220px; margin:0 0 0 44px; padding-bottom:22px; }
.dn-axis{ position:absolute; inset:0 0 22px 0; pointer-events:none; }
.dn-tick{ position:absolute; left:0; right:0; border-top:1px solid var(--line); }
.dn-tick i{ position:absolute; right:100%; margin-right:8px; transform:translateY(-50%); font-style:normal; font-size:11px; color:var(--ink-dim); font-variant-numeric:tabular-nums; white-space:nowrap; }
.dn-cols{ list-style:none; margin:0; padding:0 4px; position:absolute; inset:0 0 22px 0; display:flex; align-items:flex-end; justify-content:space-between; gap:2px; }
.dn-col{ position:relative; flex:1 1 0; min-width:0; height:100%; display:flex; flex-direction:column; justify-content:flex-end; align-items:center; outline:none; cursor:default; }
.dn-stack{ position:relative; width:min(24px,80%); display:flex; flex-direction:column; gap:2px; }
.dn-seg{ display:block; min-height:0; }
.dn-seg:first-child{ border-radius:4px 4px 0 0; }
.dn-seg[style*="flex:0 "]{ display:none; }
.dn-col.is-partial .dn-seg{ opacity:.55; }
.dn-val{ position:absolute; bottom:100%; left:50%; transform:translateX(-50%); margin-bottom:4px; font-size:11px; font-weight:900; color:var(--ink); white-space:nowrap; font-variant-numeric:tabular-nums; }
.dn-x{ position:absolute; top:100%; margin-top:6px; font-size:11px; color:var(--ink-dim); white-space:nowrap; font-variant-numeric:tabular-nums; }
.dn-x-short{ display:none; }
.dn-tip{ position:absolute; bottom:calc(100% + 6px); left:50%; transform:translateX(-50%); z-index:3; display:none; flex-direction:column; gap:3px; background:var(--ink); color:var(--card); border-radius:var(--r-sm); padding:8px 10px; font-size:12px; line-height:1.5; white-space:nowrap; box-shadow:var(--shadow-lg); pointer-events:none; }
.dn-tip b{ font-weight:900; margin-bottom:2px; }
.dn-tip span{ display:flex; align-items:center; gap:6px; }
.dn-tip .dn-key{ box-shadow:0 0 0 2px var(--card); }
.dn-tip-total{ font-weight:900; border-top:1px solid rgba(255,255,255,.2); padding-top:3px; margin-top:2px; }
.dn-col:hover .dn-tip,.dn-col:focus-visible .dn-tip{ display:flex; }
.dn-col:hover .dn-seg,.dn-col:focus-visible .dn-seg{ filter:brightness(1.12); }
.dn-col:focus-visible .dn-stack{ box-shadow:0 0 0 2px var(--card),0 0 0 4px var(--blue); }
.dn-cols li:first-child .dn-tip{ left:0; transform:none; } .dn-cols li:last-child .dn-tip{ left:auto; right:0; transform:none; }
.dn-note{ margin-top:14px; font-size:var(--fs-xs); color:var(--ink-dim); line-height:1.7; }
.dn-table{ margin-top:10px; font-size:var(--fs-small); }
.dn-table summary{ min-height:44px; cursor:pointer; font-weight:900; color:var(--blue); font-size:var(--fs-small); width:max-content; display:flex; align-items:center; }
.dn-table-wrap{ overflow-x:auto; margin-top:10px; }
.dn-table table{ border-collapse:collapse; width:100%; min-width:420px; font-variant-numeric:tabular-nums; }
.dn-table th,.dn-table td{ padding:7px 10px; text-align:right; border-top:1px solid var(--line); white-space:nowrap; }
.dn-table th[scope=row]{ text-align:left; font-weight:700; }
.dn-table thead th{ border-top:0; color:var(--ink-dim); font-size:var(--fs-xs); font-weight:900; }
@media (max-width:719px){
  .dn{ padding:16px 12px 14px; }
  .dn-plot{ height:190px; margin-left:38px; }
  .dn-x-full{ display:none; } .dn-x-short{ display:inline; }
  .dn-col:nth-child(even) .dn-x{ visibility:hidden; }   /* 窄版：年份隔一顯示，避免擠在一起 */
  .dn-val{ font-size:10px; }
}

/* ── 2a. 數字怎麼長大：各年公開數字的對照表 ── */
.sn-wrap{ background:var(--card); border-radius:var(--r); box-shadow:var(--shadow); overflow-x:auto; }
.sn-tbl{ width:100%; border-collapse:collapse; font-size:var(--fs-small); font-variant-numeric:tabular-nums; }
.sn-tbl th,.sn-tbl td{ padding:12px 16px; text-align:left; border-top:1px solid var(--line); white-space:nowrap; }
.sn-tbl thead th{ border-top:0; background:var(--blue-tint); color:var(--blue); font-size:var(--fs-xs); letter-spacing:.08em; font-weight:900; }
.sn-tbl th[scope=row]{ font-weight:900; color:var(--ink); }
.sn-num{ font-weight:900; color:var(--blue); }
.sn-src a{ font-weight:700; font-size:var(--fs-xs); }
.sn-note{ margin-top:10px; font-size:var(--fs-xs); color:var(--ink-dim); line-height:1.7; }
@media (max-width:719px){
  .sn-tbl thead{ display:none; }
  .sn-tbl,.sn-tbl tbody,.sn-tbl tr,.sn-tbl th,.sn-tbl td{ display:block; white-space:normal; }
  .sn-tbl tr{ padding:12px 16px; border-top:1px solid var(--line); }
  .sn-tbl tr:first-child{ border-top:0; }
  .sn-tbl th,.sn-tbl td{ padding:0; border:0; }
  .sn-tbl th[scope=row]{ margin-bottom:6px; font-size:var(--fs-body); }
  .sn-tbl td{ display:grid; grid-template-columns:6.5em minmax(0,1fr); gap:8px; margin-top:3px; }
  .sn-tbl td::before{ content:attr(data-l); color:var(--ink-dim); font-size:var(--fs-xs); font-weight:900; padding-top:2px; }
}

/* 近四年先顯示；完整歷史保留在可展開資料層 */
.tl-archive{ margin-top:24px; }
.tl-archive > summary{ min-height:52px; padding:12px 16px; display:flex; align-items:center; justify-content:center; border:1px solid var(--blue); border-radius:var(--r-pill); color:var(--blue); background:var(--card); font-size:var(--fs-small); font-weight:900; cursor:pointer; list-style:none; }
.tl-archive > summary::-webkit-details-marker{ display:none; }
.tl-archive > summary::after{ content:"＋"; margin-left:8px; font-size:18px; }
.tl-archive[open] > summary::after{ content:"－"; }
.tl-archive[open] > summary{ margin-bottom:32px; }
