:root {
  --ink: #17131a;
  --muted: #6f6872;
  --paper: #fbfaf8;
  --paper-2: #f1eef2;
  --plum: #4b245f;
  --plum-dark: #21142d;
  --accent: #b986d1;
  --line: #d8d2d9;
  --shell: 1120px;
  --shell-wide: 1320px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans TC", "PingFang TC", sans-serif;
  font-size: 17px;
  line-height: 1.85;
  text-rendering: optimizeLegibility;
}
a { color: inherit; }
img { display: block; max-width: 100%; }
.shell { width: min(calc(100% - 48px), var(--shell)); margin-inline: auto; }
.shell-wide { width: min(calc(100% - 48px), var(--shell-wide)); margin-inline: auto; }

.reading-progress { position: fixed; inset: 0 0 auto; height: 3px; z-index: 50; }
.reading-progress span { display: block; width: 0; height: 100%; background: var(--accent); }

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in srgb, var(--paper) 94%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  width: min(calc(100% - 48px), var(--shell-wide));
  height: 78px;
  margin-inline: auto;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
}
.brand { display: inline-flex; align-items: center; gap: 11px; width: max-content; text-decoration: none; font-weight: 750; line-height: 1.15; }
.brand img { width: 34px; }
.brand small { display: block; margin-top: 4px; color: var(--muted); font-size: 9px; letter-spacing: .16em; font-weight: 650; }
.channel { font-size: 12px; letter-spacing: .18em; color: var(--muted); font-weight: 700; }
.header-link { justify-self: end; text-decoration: none; font-size: 14px; font-weight: 750; }
.header-link span { color: var(--plum); }

.article-head { padding: 80px 0 58px; }
.article-label { display: flex; align-items: center; gap: 16px; margin-bottom: 34px; font-size: 12px; font-weight: 750; letter-spacing: .14em; text-transform: uppercase; }
.article-label span:first-child { color: var(--plum); }
.article-label span + span { padding-left: 16px; border-left: 1px solid var(--line); color: var(--muted); }
h1 {
  max-width: 940px;
  margin: 0;
  font-size: clamp(2.9rem, 5vw, 4.8rem);
  line-height: 1.1;
  letter-spacing: -.052em;
  font-weight: 820;
}
.standfirst { max-width: 820px; margin: 34px 0 28px; color: #4d4750; font-size: clamp(1.18rem, 1.8vw, 1.45rem); line-height: 1.7; letter-spacing: -.012em; }
.byline { display: flex; flex-wrap: wrap; gap: 10px 24px; color: var(--muted); font-size: 13px; }
.byline span:first-child { color: var(--ink); font-weight: 700; }

.lead-image { margin-bottom: 74px; }
.lead-image img { width: 100%; aspect-ratio: 16 / 8.5; object-fit: cover; object-position: center 48%; filter: saturate(.78) contrast(1.05); }
.lead-image figcaption { display: flex; justify-content: space-between; padding-top: 10px; color: var(--muted); font-size: 11px; letter-spacing: .12em; }

.abstract { display: grid; grid-template-columns: 160px minmax(0, 820px); gap: 72px; padding: 0 0 74px; border-bottom: 1px solid var(--ink); }
.section-mark { margin: 0; font-size: 12px; font-weight: 800; letter-spacing: .17em; text-transform: uppercase; color: var(--plum); }
.abstract p { margin-top: 0; }
.abstract-lead { margin-bottom: 20px; font-family: ui-serif, "Noto Serif TC", "Songti TC", serif; font-size: clamp(1.65rem, 3vw, 2.35rem); line-height: 1.5; font-weight: 650; letter-spacing: -.025em; }
.abstract-lead + p { max-width: 760px; color: #4f4952; }

.article-layout { display: grid; grid-template-columns: 210px minmax(0, 820px); gap: 90px; justify-content: center; padding: 90px 0 130px; }
.article-rail { position: sticky; top: 112px; align-self: start; max-height: calc(100vh - 132px); overflow-y: auto; }
.article-rail > nav { position: static; }
.article-rail nav > p { margin: 0 0 18px; color: var(--muted); font-size: 11px; letter-spacing: .16em; font-weight: 750; }
.article-rail a { display: flex; gap: 12px; padding: 8px 0; color: #5e5860; font-size: 13px; text-decoration: none; border-bottom: 1px solid transparent; }
.article-rail a:hover { color: var(--plum); }
.article-rail a span { color: #a49ba7; font-variant-numeric: tabular-nums; }
.case-facts { margin: 38px 0 0; padding-top: 22px; border-top: 1px solid var(--line); }
.case-facts div { margin-bottom: 14px; }
.case-facts dt { color: var(--muted); font-size: 11px; }
.case-facts dd { margin: 2px 0 0; font-size: 13px; font-weight: 650; line-height: 1.5; }

.story-section { scroll-margin-top: 110px; margin-bottom: 112px; }
.story-section:last-child { margin-bottom: 0; }
.section-number { margin: 0 0 18px; color: var(--plum); font-size: 11px; letter-spacing: .17em; font-weight: 800; }
h2 { margin: 0 0 36px; font-size: clamp(2.15rem, 3.7vw, 3.35rem); line-height: 1.24; letter-spacing: -.04em; font-weight: 790; }
.article-body { font-size: 18px; }
.article-body > section > p:not(.section-number):not(.caption-note) { max-width: 720px; margin: 0 0 27px; line-height: 1.95; }
.dropcap::first-letter { float: left; margin: .12em .12em 0 0; color: var(--plum); font-family: Georgia, serif; font-size: 4.4em; line-height: .72; }
blockquote { margin: 54px 0; padding: 12px 0 12px 34px; border-left: 4px solid var(--plum); }
blockquote p { margin: 0; font-family: ui-serif, "Noto Serif TC", "Songti TC", serif; font-size: clamp(1.65rem, 3vw, 2.3rem); line-height: 1.55; font-weight: 650; }

.shift-line { display: grid; grid-template-columns: 1fr auto 1.25fr; gap: 22px; align-items: center; margin-top: 54px; padding: 24px 0; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); }
.shift-line div { display: grid; gap: 3px; }
.shift-line span { color: var(--muted); font-size: 11px; letter-spacing: .08em; }
.shift-line strong { font-size: 15px; line-height: 1.45; }
.shift-arrow { color: var(--plum) !important; font-size: 23px !important; }

.data-rule { display: grid; grid-template-columns: repeat(3, 1fr); margin: 54px 0 12px; border-top: 3px solid var(--plum-dark); border-bottom: 1px solid var(--line); }
.data-rule div { min-height: 150px; padding: 24px 20px 26px 0; border-right: 1px solid var(--line); }
.data-rule div + div { padding-left: 24px; }
.data-rule div:last-child { border-right: 0; }
.data-rule strong { display: block; font-size: clamp(2.4rem, 5vw, 4.25rem); line-height: 1; letter-spacing: -.06em; }
.data-rule span { display: block; margin-top: 14px; color: var(--muted); font-size: 12px; line-height: 1.45; }
.caption-note { margin: 0 0 54px; color: var(--muted); font-size: 12px; line-height: 1.7; }

.process-figure { margin: 58px 0 0; padding: 36px; color: white; background: var(--plum-dark); }
.process-figure figcaption { margin-bottom: 24px; font-size: 19px; font-weight: 720; }
.process-figure figcaption span { display: block; margin-bottom: 4px; color: var(--accent); font-size: 10px; letter-spacing: .16em; }
.process-figure ol { list-style: none; margin: 0; padding: 0; border-top: 1px solid rgba(255,255,255,.22); }
.process-figure li { position: relative; display: grid; grid-template-columns: 44px 1fr auto; align-items: center; gap: 14px; padding: 16px 0; border-bottom: 1px solid rgba(255,255,255,.18); }
.process-figure li > span { color: #aa9ab3; font-size: 11px; }
.process-figure li div { display: grid; line-height: 1.45; }
.process-figure li strong { font-size: 15px; }
.process-figure li small { color: #afa7b3; font-size: 11px; }
.process-figure li b { padding: 2px 8px; color: var(--plum-dark); background: var(--accent); font-size: 10px; letter-spacing: .12em; }
.process-figure > p { margin: 26px 0 0; color: #d8cfe0; font-family: ui-serif, "Noto Serif TC", serif; font-size: 20px; }

.findings { list-style: none; margin: 50px 0 64px; padding: 0; border-top: 1px solid var(--ink); }
.findings li { display: grid; grid-template-columns: 64px 1fr; gap: 20px; padding: 28px 0; border-bottom: 1px solid var(--line); }
.findings li > span { color: var(--plum); font-size: 12px; font-weight: 800; }
.findings h3 { margin: -4px 0 8px; font-size: 22px; line-height: 1.45; }
.findings p { margin: 0; color: #514b53; font-size: 15px; }
.method-note { display: grid; grid-template-columns: 130px 1fr; gap: 42px; padding: 36px 0; border-top: 3px solid var(--plum); border-bottom: 1px solid var(--line); }
.method-note h3 { margin: -8px 0 12px; font-size: 25px; line-height: 1.45; }
.method-note div p { margin: 0; color: #514b53; font-size: 15px; }

.decision-path { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; margin: 48px 0 28px; background: var(--line); border: 1px solid var(--line); }
.decision-path div { min-height: 168px; padding: 22px; background: white; }
.decision-path span { display: grid; place-items: center; width: 28px; height: 28px; margin-bottom: 30px; border: 1px solid var(--plum); border-radius: 50%; color: var(--plum); font-size: 11px; }
.decision-path small { display: block; margin-bottom: 3px; color: var(--muted); font-size: 10px; letter-spacing: .08em; }
.decision-path strong { display: block; font-size: 14px; line-height: 1.5; }
.status-note { padding: 20px 24px; background: var(--paper-2); border-left: 3px solid #94899a; }
.status-note strong { font-size: 13px; }
.status-note p { margin: 3px 0 0; color: var(--muted); font-size: 13px; line-height: 1.65; }

.conclusion { padding-top: 72px; border-top: 1px solid var(--ink); }
.conclusion h2 { color: var(--plum); font-family: ui-serif, "Noto Serif TC", "Songti TC", serif; font-weight: 680; }

.closing { padding: 94px 0; color: white; background: var(--plum-dark); }
.closing-inner { display: grid; grid-template-columns: 1.35fr .65fr; gap: 90px; align-items: end; }
.closing p:first-child { margin: 0 0 18px; color: var(--accent); font-size: 10px; font-weight: 750; letter-spacing: .17em; }
.closing h2 { margin: 0; font-size: clamp(2.2rem, 4vw, 3.8rem); }
.closing-inner > div:last-child > p { margin: 0 0 24px; color: #d5cdd9; font-size: 15px; }
.closing a { display: inline-flex; gap: 18px; padding: 14px 0 10px; border-bottom: 1px solid var(--accent); color: white; font-size: 14px; font-weight: 750; text-decoration: none; }
.closing a span { color: var(--accent); }

footer { padding: 24px 0; color: #89818c; background: #160e1e; font-size: 11px; }
footer .shell { display: flex; justify-content: space-between; gap: 20px; }

/* 矮視窗（約 1366×768 筆電）：收緊側欄間距，讓案例資料整塊放得進畫面 */
@media (min-width: 901px) and (max-height: 720px) {
  .article-rail { top: 96px; max-height: calc(100vh - 112px); }
  .case-facts { margin-top: 24px; padding-top: 16px; }
  .case-facts div { margin-bottom: 10px; }
}

@media (max-width: 900px) {
  .header-inner { grid-template-columns: 1fr auto; height: auto; min-height: 70px; padding: 14px 0; row-gap: 6px; }
  .channel { grid-column: 1 / -1; grid-row: 2; font-size: 10px; letter-spacing: .12em; white-space: normal; }
  .article-head { padding-top: 70px; }
  .abstract { grid-template-columns: 1fr; gap: 24px; }
  .article-layout { grid-template-columns: 1fr; padding-top: 70px; }
  .article-rail { display: none; }
  .closing-inner { grid-template-columns: 1fr; gap: 38px; }
}

@media (max-width: 620px) {
  body { font-size: 16px; line-height: 1.78; }
  .shell, .shell-wide { width: min(calc(100% - 32px), var(--shell)); }
  .header-inner { width: calc(100% - 32px); }
  .brand img { width: 29px; }
  .brand { font-size: 14px; }
  .header-link { font-size: 12px; }
  .article-head { padding: 54px 0 42px; }
  .article-label { gap: 10px; margin-bottom: 24px; font-size: 10px; }
  h1 { font-size: clamp(2.45rem, 11vw, 3.35rem); }
  .standfirst { margin-top: 26px; font-size: 1.12rem; }
  .lead-image { width: 100%; margin-bottom: 52px; }
  .lead-image img { aspect-ratio: 4 / 3; }
  .lead-image figcaption { padding-inline: 16px; }
  .abstract { padding-bottom: 52px; }
  .article-layout { padding: 62px 0 88px; }
  .story-section { margin-bottom: 84px; }
  h2 { margin-bottom: 28px; font-size: 2.15rem; }
  blockquote { margin: 42px 0; padding-left: 22px; }
  .shift-line { grid-template-columns: 1fr; gap: 12px; }
  .shift-arrow { transform: rotate(90deg); width: max-content; }
  .data-rule { grid-template-columns: 1fr; }
  .data-rule div, .data-rule div + div { min-height: auto; padding: 22px 0; border-right: 0; border-bottom: 1px solid var(--line); }
  .data-rule div:last-child { border-bottom: 0; }
  .process-figure { margin-inline: -16px; padding: 26px 20px; }
  .findings li { grid-template-columns: 44px 1fr; }
  .method-note { grid-template-columns: 1fr; gap: 22px; }
  .decision-path { grid-template-columns: 1fr; }
  .decision-path div { min-height: auto; }
  .decision-path span { margin-bottom: 16px; }
  .closing { padding: 72px 0; }
  footer .shell { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
