:root {
  color-scheme: light;

  /* 60% 中性：暖白紙、墨色字、淺線 */
  --paper: #fffaf5;
  --surface: #fffcf8;
  --ink: #241812;
  --muted: #6e5b50;
  --line: #e8d9cc;
  --radius: 16px;

  /* 30% 品牌藍：從 Logo 色條取樣（約 #0a6fb8 → 青 #12a6d6） */
  --blue-50: #e7f5fa;
  --blue-100: #c6e7f2;
  --blue-200: #8ed0e4;
  --blue-300: #4db4d4;
  --blue-400: #12a6d6;
  --blue-500: #0a8ec4;
  --blue-600: #0a6fb8;
  --blue-700: #085a96;
  --blue-800: #0a3f6c;
  --blue-900: #0a1e33;

  /* 10% 強調橘：CTA、標籤、重點（沿用既有 #a84214 家族） */
  --orange-50: #fdf6f0;
  --orange-100: #f9e8da;
  --orange-200: #f0d0b8;
  --orange-300: #e3a67a;
  --orange-400: #d4723a;
  --orange-500: #c4531d;
  --orange-600: #a84214;
  --orange-700: #83300b;
  --orange-800: #5c2108;
  --orange-900: #3a1506;

  /* 語意：藍與橘不畫在同一個元件上 */
  --brand: var(--blue-600);
  --brand-strong: var(--blue-700);
  --link: var(--blue-700);
  --link-hover: var(--blue-800);
  --cta: var(--orange-600);
  --cta-hover: var(--orange-700);
  --cta-text: #ffffff;
  --tag-bg: var(--orange-100);
  --tag-text: var(--orange-700);
  --rule: var(--blue-600);
  --highlight: var(--orange-600);
  --surface-tint: var(--blue-50);
  --band: var(--blue-900);
  --band-text: #f4f7fa;
  --band-muted: #b7c4d0;
  --key-bg: var(--orange-100);
  --signal-bg: var(--blue-50);

  /* 舊名對應，避免漏改 */
  --accent: var(--orange-600);
  --accent-dark: var(--orange-700);
  --tint: var(--orange-100);
}

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Noto Sans TC", system-ui, sans-serif;
  line-height: 1.65;
}

h1, h2, h3, p { margin: 0; }
h1, h2, h3 { line-height: 1.35; }
a { color: inherit; }
a:focus-visible { outline: 2px solid var(--brand); outline-offset: 4px; }

.shell { width: min(100% - 2.5rem, 1120px); margin-inline: auto; }
.skip { position: absolute; top: .5rem; left: .5rem; padding: .5rem 1rem; background: var(--surface); z-index: 1; }
.skip:not(:focus) { clip-path: inset(50%); }

.site-header { background: var(--surface); border-bottom: 1px solid var(--line); }
.masthead { display: flex; flex-direction: column; gap: .85rem; padding-block: 1rem .8rem; }
.brand { display: inline-flex; align-items: center; align-self: flex-start; text-decoration: none; line-height: 0; }
.brand img { display: block; height: 36px; width: auto; }
nav { display: flex; flex-wrap: wrap; gap: .25rem clamp(.65rem, 3vw, 1.85rem); }
nav a { padding-block: .28rem; color: var(--muted); font-size: .875rem; font-weight: 600; text-decoration: none; }
nav a:hover, nav a:target { color: var(--link); }
.feature h2 a:hover, .story-title:hover { color: var(--link); }

.intro { padding-block: 2.75rem 2.25rem; text-align: center; }
.intro h1 { font-size: clamp(1.55rem, 5.9vw, 3.65rem); font-weight: 800; letter-spacing: -.04em; }
.intro span { color: var(--highlight); white-space: nowrap; }
.lede { margin: .85rem auto 0; max-width: 28rem; color: var(--muted); font-size: 1rem; line-height: 1.8; }

.feature, .story-card {
  display: grid;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.wave-art {
  min-height: 10rem;
  background: var(--blue-800) url("../images/wave.svg") center / cover no-repeat;
}

.feature .wave-art { min-height: clamp(12rem, 51vw, 20rem); }
.feature-copy { padding: clamp(1.25rem, 4vw, 3rem); }
.story-meta { display: flex; gap: .75rem; align-items: center; color: var(--muted); font-size: .79rem; }
.tag { padding: .18rem .65rem; border-radius: 100px; background: var(--tag-bg); color: var(--tag-text); font-weight: 700; text-decoration: none; }
.tag:hover { text-decoration: underline; }
.feature h2 { margin-block: .7rem .75rem; font-size: clamp(1.5rem, 3.3vw, 2.45rem); font-weight: 800; letter-spacing: -.025em; }
.feature h2 { text-wrap: pretty; }
.article-header h1 { text-wrap: pretty; }
.feature h2 a, .story-title { text-decoration: none; }
.summary { color: var(--muted); font-size: .94rem; line-height: 1.8; }
.read-link { display: inline-flex; gap: .75rem; align-items: center; margin-top: 1.4rem; padding: .6rem .9rem; border-radius: 7px; background: var(--cta); color: var(--cta-text); font-size: .875rem; font-weight: 700; text-decoration: none; }
.read-link:hover { background: var(--cta-hover); }

.home-section { margin-top: clamp(2.5rem, 6vw, 4rem); }
.section-heading { display: flex; align-items: center; gap: .6rem; margin-bottom: 1rem; font-size: 1.45rem; font-weight: 800; }
.section-heading::before { content: ""; width: .22rem; height: 1em; border-radius: 2px; background: var(--rule); }
.card-grid { display: grid; gap: 1.25rem; }
.story-card { align-content: start; }
.story-card .wave-art { aspect-ratio: 2.1; background-position: 70% 47%; }
.card-copy { padding: 1.1rem 1.25rem 1.35rem; }
.card-copy h3 { margin-block: .65rem .45rem; font-size: 1.16rem; }
.empty-state { padding: 1.25rem 1.5rem; border: 1px dashed var(--line); border-radius: var(--radius); color: var(--muted); }
.empty-state strong { color: var(--ink); }

.category-section { display: grid; gap: 1.5rem; padding-bottom: clamp(2.75rem, 7vw, 5rem); }
.category-list { display: flex; flex-wrap: wrap; gap: .5rem; }
.category-list a { padding: .4rem .75rem; border: 1px solid var(--line); border-radius: 100px; background: var(--surface); font-size: .875rem; text-decoration: none; scroll-margin: 5rem; }
.category-list a:hover, .category-list a:target { border-color: var(--brand); color: var(--link); }
.subscribe { padding: 1.25rem 1.5rem; border-radius: var(--radius); background: var(--surface-tint); }
.subscribe h2 { font-size: 1.05rem; }
.subscribe p { margin-top: .25rem; color: var(--muted); }

.site-footer { padding-block: 2.25rem 1.5rem; background: var(--band); color: var(--band-text); }
.footer-brand { display: inline-block; margin-bottom: .55rem; text-decoration: none; line-height: 0; }
.footer-brand img { display: block; height: 36px; width: auto; }
.about { margin-block: .35rem 1.35rem; color: var(--band-muted); }
.footer-meta { display: flex; justify-content: space-between; flex-wrap: wrap; gap: .5rem 1.5rem; padding-top: 1rem; border-top: 1px solid rgba(255, 255, 255, .14); color: var(--band-muted); font-size: .82rem; }

.article { max-width: 42rem; margin-inline: auto; padding-block: 2rem 4rem; font-size: 1.0625rem; line-height: 1.85; }
.back { display: inline-block; margin-bottom: 1.35rem; color: var(--link); font-size: .875rem; text-underline-offset: .2em; }
.back:hover { color: var(--link-hover); }
.article-header h1 { margin-top: .65rem; font-size: clamp(1.85rem, 4.8vw, 3.2rem); font-weight: 800; letter-spacing: -.025em; }
.story-section { margin-top: 2rem; }
.story-section h2 { margin-bottom: .85rem; font-size: 1.35rem; }
.story-section p + p { margin-top: 1em; }
.key-points, .signal { padding: clamp(1rem, 4vw, 1.6rem); border-radius: 0 var(--radius) var(--radius) 0; }
.key-points { background: var(--key-bg); border-left: 3px solid var(--highlight); }
.signal { background: var(--signal-bg); border-left: 3px solid var(--rule); }
.key-points h2 { color: var(--orange-700); }
.signal h2 { color: var(--brand-strong); }
.sources a { color: var(--link); overflow-wrap: anywhere; text-underline-offset: .18em; }
.sources a:hover { color: var(--link-hover); }
.sources ul { margin: 0; padding-inline-start: 1.25rem; }

@media (min-width: 720px) {
  .shell { width: min(100% - 4rem, 1120px); }
  .masthead { flex-direction: row; justify-content: space-between; align-items: center; padding-block: 1rem; }
  .brand img { height: 52px; }
  .footer-brand img { height: 44px; }
  .intro { padding-block: 3.65rem 2.75rem; }
  .feature { grid-template-columns: 1.08fr 1fr; }
  .feature .wave-art { min-height: 22rem; }
  .feature-copy { align-self: center; }
  .card-grid, .category-section { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .category-section { align-items: end; }
  .article { padding-top: 2.65rem; }
}

@media (min-width: 1040px) {
  .card-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: no-preference) {
  a { transition: color .15s ease, background-color .15s ease, border-color .15s ease; }
}
