:root {
  --ink: #111417;
  --paper: #f5f1e8;
  --paper-strong: #fffaf0;
  --line: rgba(17, 20, 23, 0.16);
  --signal: #6da58d;
  --signal-dark: #285d4a;
  --ember: #c95332;
  --blueprint: #26465f;
  --muted: #62615c;
  --shadow: 0 24px 80px rgba(17, 20, 23, 0.18);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px clamp(18px, 4vw, 56px);
  background: rgba(245, 241, 232, 0.9);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 28px;
  color: var(--paper-strong);
  background: var(--ink);
  letter-spacing: 0;
  font-size: 0.78rem;
}

nav {
  display: flex;
  gap: clamp(14px, 3vw, 32px);
  font-size: 0.95rem;
}

.hero {
  position: relative;
  min-height: 92svh;
  display: grid;
  align-items: end;
  overflow: hidden;
  background: #151515;
}

.hero-media,
.hero-media video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-media video {
  object-fit: cover;
  opacity: 0.72;
  filter: saturate(0.82) contrast(1.08);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(6, 9, 12, 0.88), rgba(6, 9, 12, 0.42) 48%, rgba(6, 9, 12, 0.2)),
    linear-gradient(0deg, rgba(6, 9, 12, 0.74), rgba(6, 9, 12, 0) 46%);
}

.hero-content {
  position: relative;
  width: min(980px, calc(100% - 36px));
  margin: 0 auto;
  padding: 0 0 12svh;
  color: var(--paper-strong);
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--signal);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: "Noto Serif TC", "Songti TC", "PMingLiU", serif;
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: 0;
}

h1 {
  max-width: 860px;
  font-size: clamp(2.7rem, 6vw, 6.2rem);
}

h2 {
  font-size: clamp(2rem, 4vw, 4.5rem);
}

h3 {
  font-size: 1.35rem;
}

.hero-copy {
  max-width: 760px;
  margin: 22px 0 0;
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  line-height: 1.75;
  color: rgba(255, 250, 240, 0.86);
}

.hero-actions,
.filters,
.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-actions {
  margin-top: 30px;
}

.button,
.filter,
.card-actions a,
.card-actions button {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px 16px;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.button.primary {
  background: var(--paper-strong);
  color: var(--ink);
}

.button.secondary {
  border-color: rgba(255, 250, 240, 0.38);
  color: var(--paper-strong);
  background: rgba(255, 250, 240, 0.08);
}

.stats-band {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--paper-strong);
}

.stat {
  padding: 24px clamp(16px, 4vw, 44px);
  border-right: 1px solid var(--line);
}

.stat:last-child {
  border-right: 0;
}

.stat strong {
  display: block;
  color: var(--blueprint);
  font-size: clamp(2rem, 4vw, 4.25rem);
  line-height: 1;
  font-family: Georgia, serif;
}

.stat span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-weight: 700;
}

.stat.warning strong {
  color: var(--ember);
}

.section {
  width: min(1220px, calc(100% - 36px));
  margin: 0 auto;
  padding: 86px 0;
}

.intro-grid,
.archive-heading,
.tracker {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1.1fr);
  gap: clamp(28px, 6vw, 86px);
  align-items: start;
}

.intro-copy {
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.9;
}

.section-heading {
  margin-bottom: 28px;
}

.story-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 18px;
}

.story-card {
  position: relative;
  min-height: 460px;
  grid-column: span 4;
  display: flex;
  align-items: end;
  overflow: hidden;
  border-radius: 8px;
  background: var(--ink);
  box-shadow: var(--shadow);
}

.story-card:first-child {
  grid-column: span 8;
}

.story-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.74;
  transition: transform 0.45s ease;
}

.story-card:hover img {
  transform: scale(1.04);
}

.story-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(7, 9, 11, 0.9), rgba(7, 9, 11, 0.1) 60%);
}

.story-body {
  position: relative;
  z-index: 1;
  padding: 24px;
  color: var(--paper-strong);
}

.story-body p {
  color: rgba(255, 250, 240, 0.82);
  line-height: 1.7;
}

.archive-section {
  width: min(1320px, calc(100% - 36px));
}

.search-box {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-weight: 800;
}

.search-box input {
  width: min(520px, 100%);
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 14px;
  background: var(--paper-strong);
  color: var(--ink);
  font: inherit;
}

.filter {
  background: transparent;
  color: var(--ink);
}

.filter.active {
  background: var(--ink);
  color: var(--paper-strong);
}

.archive-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin-top: 24px;
}

.archive-card {
  display: flex;
  flex-direction: column;
  min-height: 270px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 250, 240, 0.64);
  overflow: hidden;
}

.archive-thumb {
  height: 154px;
  background: linear-gradient(135deg, var(--blueprint), var(--signal-dark));
}

.archive-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.archive-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.archive-body h3 {
  font-family: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
  font-size: 1.05rem;
  line-height: 1.42;
}

.archive-body p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.card-actions {
  margin-top: auto;
}

.card-actions a,
.card-actions button {
  min-height: 36px;
  padding: 8px 11px;
  background: var(--ink);
  color: var(--paper-strong);
  font-size: 0.86rem;
}

.card-actions a.secondary {
  background: transparent;
  color: var(--ink);
}

.tracker {
  width: 100%;
  max-width: none;
  padding-inline: clamp(18px, 4vw, 56px);
  background: var(--ink);
  color: var(--paper-strong);
}

.tracker-copy {
  max-width: 720px;
}

.tracker-copy p:not(.eyebrow) {
  color: rgba(255, 250, 240, 0.72);
  line-height: 1.9;
}

.missing-list {
  max-height: 520px;
  overflow: auto;
  border: 1px solid rgba(255, 250, 240, 0.16);
  border-radius: 8px;
}

.missing-item {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255, 250, 240, 0.12);
}

.missing-item:last-child {
  border-bottom: 0;
}

.missing-item strong {
  display: block;
}

.missing-item span {
  display: block;
  margin-top: 4px;
  color: rgba(255, 250, 240, 0.62);
  font-size: 0.9rem;
}

.detail-panel {
  position: fixed;
  inset: 0 0 0 auto;
  z-index: 20;
  width: min(720px, 100%);
  transform: translateX(100%);
  transition: transform 0.28s ease;
  overflow: auto;
  background: var(--paper-strong);
  box-shadow: -30px 0 80px rgba(17, 20, 23, 0.28);
}

.detail-panel.open {
  transform: translateX(0);
}

.close-button {
  position: sticky;
  top: 14px;
  left: calc(100% - 58px);
  z-index: 1;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--paper-strong);
  color: var(--ink);
  font-size: 1.6rem;
  cursor: pointer;
}

.detail-hero img,
.detail-hero video {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
  background: var(--ink);
}

.detail-copy {
  padding: 28px;
}

.detail-copy p {
  color: var(--muted);
  line-height: 1.9;
}

.source-list {
  display: grid;
  gap: 10px;
  margin-top: 20px;
}

@media (max-width: 840px) {
  .site-header {
    align-items: flex-start;
    gap: 12px;
    flex-direction: column;
  }

  .stats-band,
  .intro-grid,
  .archive-heading,
  .tracker {
    grid-template-columns: 1fr;
  }

  .stat {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .story-card,
  .story-card:first-child {
    grid-column: 1 / -1;
  }

  .hero-content {
    padding-bottom: 8svh;
  }
}
