:root {
  color-scheme: light;
  --paper: #f4f7f5;
  --surface: #ffffff;
  --ink: #142033;
  --muted: #59677a;
  --line: #ccd7d5;
  --sea: #1d6159;
  --sea-soft: #dcece7;
  --sun: #e6a93d;
  --alert: #8a3f43;
  --measure: 74ch;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang TC", "Noto Sans TC", sans-serif;
  background: var(--paper);
  color: var(--ink);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    linear-gradient(90deg, transparent 0 7%, rgba(29, 97, 89, 0.08) 7% calc(7% + 1px), transparent calc(7% + 1px)),
    var(--paper);
}

a {
  color: var(--sea);
}

a:focus-visible,
select:focus-visible {
  outline: 3px solid var(--sun);
  outline-offset: 3px;
}

.masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: 1.15rem clamp(1.2rem, 5vw, 5rem);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(12px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  color: var(--ink);
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 2.7rem;
  height: 2.7rem;
  place-items: center;
  border-radius: 50%;
  background: var(--sea);
  color: white;
  font-family: "Songti TC", "Noto Serif TC", serif;
  font-size: 1.25rem;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-family: "Songti TC", "Noto Serif TC", serif;
  font-size: 1.08rem;
  letter-spacing: 0.04em;
}

.brand small {
  margin-top: 0.15rem;
  color: var(--muted);
  font-size: 0.76rem;
}

.edition-picker {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--muted);
  font-size: 0.82rem;
}

select {
  max-width: 11rem;
  border: 1px solid var(--line);
  border-radius: 0.35rem;
  padding: 0.55rem 2rem 0.55rem 0.7rem;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
}

main,
footer {
  width: min(1120px, calc(100% - 2.4rem));
  margin-inline: auto;
}

.edition-heading {
  display: grid;
  grid-template-columns: 8rem minmax(0, 1fr);
  gap: clamp(1.5rem, 5vw, 4rem);
  align-items: center;
  padding: clamp(3rem, 8vw, 6rem) 0 clamp(2.5rem, 6vw, 4rem);
}

.date-block {
  display: grid;
  place-items: center;
  min-height: 8rem;
  border: 1px solid var(--sea);
  color: var(--sea);
}

.date-block span {
  font-size: 0.82rem;
}

.date-block strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 4.5rem;
  font-weight: 400;
  line-height: 0.85;
}

.edition-date {
  margin: 0 0 0.55rem;
  color: var(--sea);
  font-size: 0.9rem;
  font-weight: 650;
}

h1 {
  max-width: 14ch;
  margin: 0;
  font-family: "Songti TC", "Noto Serif TC", serif;
  font-size: clamp(2.35rem, 6vw, 5.3rem);
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 1.06;
}

.edition-intro {
  max-width: 42rem;
  margin: 1.35rem 0 0;
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.15rem);
  line-height: 1.75;
}

.status {
  margin: 0 0 2rem 12rem;
  padding: 1rem 1.2rem;
  border-left: 4px solid var(--sun);
  background: #fff8e8;
  color: #59471f;
}

.status[hidden] {
  display: none;
}

.status.error {
  border-left-color: var(--alert);
  background: #f9e9e8;
  color: var(--alert);
}

.articles {
  counter-reset: article;
  border-top: 1px solid var(--ink);
}

.article {
  counter-increment: article;
  display: grid;
  grid-template-columns: 8rem minmax(0, 1fr);
  gap: clamp(1.5rem, 5vw, 4rem);
  padding: clamp(2.5rem, 7vw, 5rem) 0;
  border-bottom: 1px solid var(--line);
}

.article-number {
  color: var(--sea);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(3.5rem, 8vw, 6.5rem);
  line-height: 0.8;
}

.article-number::before {
  content: counter(article, decimal-leading-zero);
}

.article h2 {
  max-width: 24ch;
  margin: 0;
  font-family: "Songti TC", "Noto Serif TC", serif;
  font-size: clamp(1.65rem, 3.6vw, 2.8rem);
  line-height: 1.25;
}

.article-meta {
  margin: 0.75rem 0 1.7rem;
  color: var(--muted);
  font-size: 0.84rem;
}

.summary {
  max-width: var(--measure);
  margin: 0 0 2rem;
  font-size: 1.1rem;
  font-weight: 580;
  line-height: 1.85;
}

.analysis-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.8rem 2.5rem;
  max-width: 900px;
}

.analysis-block {
  border-top: 2px solid var(--sea-soft);
  padding-top: 0.9rem;
}

.analysis-block h3 {
  margin: 0 0 0.45rem;
  color: var(--sea);
  font-size: 0.86rem;
}

.analysis-block p,
.analysis-block li {
  margin: 0;
  color: #334155;
  line-height: 1.78;
}

.analysis-block ul {
  margin: 0;
  padding-left: 1.25rem;
}

.source-link {
  display: inline-block;
  margin-top: 2rem;
  padding-bottom: 0.2rem;
  border-bottom: 1px solid currentColor;
  font-weight: 650;
  text-decoration: none;
}

.source-link:hover {
  color: var(--ink);
}

footer {
  padding: 2.5rem 0 4rem 12rem;
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.7;
}

@media (max-width: 720px) {
  body {
    background: var(--paper);
  }

  .masthead {
    align-items: flex-start;
    flex-direction: column;
    gap: 1rem;
  }

  .brand small {
    max-width: 30ch;
  }

  .edition-picker {
    width: 100%;
    justify-content: space-between;
  }

  .edition-heading,
  .article {
    grid-template-columns: 1fr;
    gap: 1.2rem;
  }

  .date-block {
    grid-template-columns: auto auto;
    justify-content: start;
    gap: 0.7rem;
    min-height: auto;
    border: 0;
  }

  .date-block strong {
    font-size: 2rem;
  }

  h1 {
    max-width: 12ch;
  }

  .status,
  footer {
    margin-left: 0;
    padding-left: 1rem;
  }

  .article-number {
    font-size: 3rem;
  }

  .analysis-grid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
  }
}
