:root {
  color-scheme: light;
  --paper: #fffaf5;
  --surface: #fffcf8;
  --ink: #241812;
  --muted: #6e5b50;
  --accent: #a84214;
  --accent-dark: #83300b;
  --tint: #f9e8da;
  --line: #e8d9cc;
  --radius: 16px;
}

*, *::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(--accent); 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; gap: .65rem; align-items: center; align-self: flex-start; text-decoration: none; }
.brand strong { display: block; font-size: 1.35rem; font-weight: 800; line-height: 1.2; letter-spacing: .04em; }
.brand small { display: block; margin-top: .18rem; color: var(--muted); font-size: .62rem; font-weight: 700; letter-spacing: .24em; }
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, .feature h2 a:hover, .story-title:hover { color: var(--accent); }

.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(--accent); 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: #a8421f 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(--tint); color: var(--accent-dark); 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(--accent); color: white; font-size: .875rem; font-weight: 700; text-decoration: none; }
.read-link:hover { background: var(--accent-dark); }

.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(--accent); }
.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 #d6bba7; 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(--accent); color: var(--accent-dark); }
.subscribe { padding: 1.25rem 1.5rem; border-radius: var(--radius); background: var(--tint); }
.subscribe h2 { font-size: 1.05rem; }
.subscribe p { margin-top: .25rem; color: var(--muted); }

.site-footer { padding-block: 2rem 1.25rem; border-top: 1px solid var(--line); background: var(--surface); }
.footer-name { font-weight: 800; }
.about { margin-block: .4rem 1.35rem; color: var(--muted); }
.footer-meta { display: flex; justify-content: space-between; flex-wrap: wrap; gap: .5rem 1.5rem; padding-top: 1rem; border-top: 1px solid var(--line); color: var(--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(--accent-dark); font-size: .875rem; text-underline-offset: .2em; }
.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; border-left: 3px solid var(--accent); }
.key-points { background: var(--tint); }
.signal { background: var(--surface); border-block: 1px solid var(--line); border-right: 1px solid var(--line); }
.key-points h2, .signal h2, .sources a { color: var(--accent-dark); }
.sources ul { margin: 0; padding-inline-start: 1.25rem; }
.sources a { overflow-wrap: anywhere; text-underline-offset: .18em; }

@media (min-width: 720px) {
  .shell { width: min(100% - 4rem, 1120px); }
  .masthead { flex-direction: row; justify-content: space-between; align-items: center; padding-block: 1rem; }
  .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; }
}
