:root {
  color-scheme: light;
  --ink: #172019;
  --muted: #5d675f;
  --line: #d8ded8;
  --paper: #fafafa;
  --wash: #edf3ef;
  --accent: #b3261e;
  --accent-2: #1f7a61;
  --gold: #a47b20;
  --white: #ffffff;
  font-family: "Noto Serif TC", "Songti TC", "SimSun", Georgia, serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
}

.hero {
  position: relative;
  min-height: 76vh;
  display: flex;
  align-items: flex-end;
  padding: 48px clamp(20px, 5vw, 72px);
  overflow: hidden;
}

.hero__image,
.hero__shade {
  position: absolute;
  inset: 0;
}

.hero__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(0.2) contrast(1.05);
}

.hero__shade {
  background: linear-gradient(90deg, rgba(8, 13, 10, 0.82), rgba(8, 13, 10, 0.44) 46%, rgba(8, 13, 10, 0.12));
}

.hero__content {
  position: relative;
  max-width: 760px;
  color: var(--white);
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.38);
}

.eyebrow {
  margin: 0 0 14px;
  font-family: Arial, sans-serif;
  font-size: 14px;
  letter-spacing: 0;
  color: #f0d897;
}

h1 {
  margin: 0;
  font-size: clamp(48px, 8vw, 96px);
  line-height: 1.03;
  letter-spacing: 0;
}

.lede {
  max-width: 680px;
  margin: 22px 0 0;
  font-size: clamp(18px, 2vw, 24px);
  line-height: 1.7;
}

.credit {
  position: absolute;
  right: 18px;
  bottom: 14px;
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 12px;
}

main {
  padding: 28px clamp(16px, 4vw, 56px) 64px;
}

.toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1.4fr) repeat(3, minmax(150px, 0.6fr));
  gap: 14px;
  align-items: end;
  margin: 0 auto 22px;
  max-width: 1180px;
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 14px;
}

input,
select,
button {
  font: inherit;
}

input,
select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  color: var(--ink);
  padding: 9px 12px;
}

.stats {
  max-width: 1180px;
  margin: 0 auto 28px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-block: 1px solid var(--line);
}

.stats div {
  padding: 18px 12px;
  display: grid;
  gap: 4px;
  border-right: 1px solid var(--line);
}

.stats div:last-child {
  border-right: 0;
}

.stats strong {
  font-family: Arial, sans-serif;
  font-size: 28px;
  color: var(--accent);
}

.stats span {
  color: var(--muted);
}

.layout {
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 28px;
}

.rail {
  position: sticky;
  top: 18px;
  align-self: start;
  padding-top: 2px;
}

h2 {
  margin: 0 0 14px;
  font-size: 22px;
  letter-spacing: 0;
}

.decade-nav {
  display: grid;
  gap: 8px;
}

.decade-nav button {
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--ink);
  text-align: left;
  border-radius: 8px;
  padding: 9px 10px;
  cursor: pointer;
}

.decade-nav button.active,
.decade-nav button:hover {
  border-color: var(--accent-2);
  color: var(--accent-2);
}

.timeline-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: baseline;
  margin-bottom: 10px;
}

.timeline-head p {
  margin: 0;
  color: var(--muted);
}

.timeline-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-left: 2px solid var(--line);
}

.event {
  position: relative;
  padding: 0 0 22px 26px;
}

.event::before {
  content: "";
  position: absolute;
  left: -7px;
  top: 7px;
  width: 12px;
  height: 12px;
  border: 2px solid var(--accent);
  border-radius: 50%;
  background: var(--paper);
}

.event-card {
  width: 100%;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  padding: 16px 18px;
  cursor: pointer;
  transition: border-color 160ms ease, transform 160ms ease;
}

.event-card:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}

.event-date {
  font-family: Arial, sans-serif;
  color: var(--accent);
  font-weight: 700;
}

.event-title {
  display: block;
  margin-top: 6px;
  font-size: 21px;
  line-height: 1.35;
  color: var(--ink);
}

.event-summary {
  margin: 9px 0 12px;
  color: var(--muted);
  line-height: 1.75;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.chip {
  border-radius: 8px;
  background: var(--wash);
  color: #28483d;
  padding: 4px 8px;
  font-size: 13px;
}

.method {
  max-width: 1180px;
  margin: 34px auto 0;
  padding-block: 22px;
  border-top: 1px solid var(--line);
}

.method p {
  margin: 0;
  color: var(--muted);
  line-height: 1.85;
  max-width: 840px;
}

.event-dialog {
  width: min(720px, calc(100vw - 28px));
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 24px;
  color: var(--ink);
}

.event-dialog::backdrop {
  background: rgba(0, 0, 0, 0.42);
}

.close {
  position: absolute;
  right: 12px;
  top: 10px;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  cursor: pointer;
}

.dialog-date {
  color: var(--accent);
  font-family: Arial, sans-serif;
  font-weight: 700;
}

.dialog-source {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  line-height: 1.7;
  word-break: break-word;
}

@media (max-width: 820px) {
  .hero {
    min-height: 70vh;
    padding: 36px 18px 48px;
  }

  .hero__shade {
    background: linear-gradient(0deg, rgba(8, 13, 10, 0.86), rgba(8, 13, 10, 0.18));
  }

  .toolbar,
  .layout,
  .stats {
    grid-template-columns: 1fr;
  }

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

  .stats div:last-child {
    border-bottom: 0;
  }

  .rail {
    position: static;
  }

  .decade-nav {
    grid-template-columns: repeat(3, 1fr);
  }

  .timeline-head {
    display: block;
  }
}
