:root {
  --bg: #faf8f4;
  --surface: #ffffff;
  --ink: #1f1d1a;
  --muted: #68625a;
  --subtle: #91887d;
  --line: #e5ded4;
  --accent: #ad3d32;
  --accent-soft: #f4e6e2;
  --link: #255f90;
  --max: 1080px;
  --reading: 760px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", sans-serif;
  line-height: 1.75;
  overflow-x: hidden;
}

img {
  display: block;
  max-width: 100%;
}

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

p,
h1,
h2,
h3 {
  margin-top: 0;
  overflow-wrap: anywhere;
}

.site-header {
  border-bottom: 1px solid var(--line);
  background: rgba(250, 248, 244, 0.92);
  backdrop-filter: blur(14px);
  position: sticky;
  top: 0;
  z-index: 10;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
  padding: 16px 0;
}

.brand {
  color: var(--ink);
  font-size: 15px;
  font-weight: 800;
  text-decoration: none;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 16px;
  color: var(--muted);
  font-size: 14px;
}

.nav-links a {
  color: inherit;
  text-decoration: none;
}

.nav-links a:hover {
  color: var(--ink);
}

.container {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
}

.home-hero {
  padding: 72px 0 44px;
}

.archive-hero {
  padding: 64px 0 34px;
}

.eyebrow {
  margin-bottom: 14px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
}

h1 {
  max-width: 760px;
  margin-bottom: 18px;
  font-size: clamp(36px, 6vw, 70px);
  line-height: 1.08;
  letter-spacing: 0;
}

.lead {
  max-width: 720px;
  margin-bottom: 26px;
  color: var(--muted);
  font-size: 19px;
  line-height: 1.8;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 9px 16px;
  border: 1px solid var(--ink);
  border-radius: 6px;
  background: var(--ink);
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
}

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

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.section {
  padding: 42px 0;
  border-top: 1px solid var(--line);
}

.search-field {
  display: grid;
  gap: 8px;
  max-width: 620px;
  margin-top: 28px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.search-field input {
  width: 100%;
  min-height: 48px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-weight: 500;
}

.search-field input:focus {
  border-color: var(--accent);
  outline: 3px solid var(--accent-soft);
}

.archive-meta {
  margin-bottom: 16px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.section-title {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

.section-title h2 {
  margin-bottom: 0;
  font-size: clamp(26px, 4vw, 42px);
  line-height: 1.2;
}

.section-title p {
  max-width: 520px;
  margin-bottom: 0;
  color: var(--muted);
}

.latest-card {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(300px, 1.05fr);
  gap: 0;
  overflow: hidden;
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}

.article-grid {
  display: grid;
  gap: 18px;
}

.article-card {
  display: grid;
  grid-template-columns: minmax(280px, 0.52fr) minmax(0, 1fr);
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}

.article-card[hidden] {
  display: none;
}

.article-card-media {
  display: block;
  min-height: 260px;
  background: #eee8df;
}

.article-card-media img {
  width: 100%;
  height: 100%;
  min-height: 260px;
  object-fit: cover;
  object-position: top center;
}

.article-card-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  padding: clamp(22px, 4vw, 36px);
}

.article-card h2 {
  margin-bottom: 12px;
  font-size: clamp(26px, 4vw, 38px);
  line-height: 1.18;
}

.article-card h2 a {
  color: var(--ink);
  text-decoration: none;
}

.article-card h2 a:hover {
  color: var(--link);
}

.article-card p {
  color: var(--muted);
}

.empty-state {
  margin: 0;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--muted);
}

.latest-card > *,
.resource > * {
  min-width: 0;
}

.latest-media {
  min-height: 340px;
  background: #eee8df;
}

.latest-media img {
  width: 100%;
  height: 100%;
  min-height: 340px;
  object-fit: cover;
  object-position: top center;
}

.latest-body {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 22px;
  min-width: 0;
  padding: clamp(24px, 4vw, 42px);
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 3px 9px;
  border-radius: 999px;
  background: #f1ece5;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.tag.strong {
  background: var(--accent-soft);
  color: var(--accent);
}

.latest-body h2 {
  margin-bottom: 12px;
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1.15;
}

.latest-body p,
.resource p,
.candidate p {
  color: var(--muted);
}

.candidate,
.resource {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}

.candidate h3 {
  margin-bottom: 8px;
  font-size: 18px;
  line-height: 1.35;
}

.candidate-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.candidate-list {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  list-style: none;
}

.candidate-list li {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr) 56px;
  gap: 18px;
  align-items: start;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}

.candidate-list li:last-child {
  border-bottom: 0;
}

.candidate-list strong {
  line-height: 1.45;
}

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

.candidate-list a {
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
}

.candidate {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
}

.candidate figure {
  margin: 0;
  aspect-ratio: 16 / 9;
  border-bottom: 1px solid var(--line);
  background: #eee8df;
}

.candidate img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

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

.candidate .source-link {
  margin-top: auto;
}

.source-link {
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
}

.source-link:hover {
  text-decoration: underline;
}

.article-header {
  width: min(var(--reading), calc(100% - 32px));
  margin: 0 auto;
  padding: 62px 0 34px;
}

.article-header h1 {
  max-width: none;
  font-size: clamp(34px, 5.5vw, 62px);
}

.article-meta {
  color: var(--subtle);
  font-size: 14px;
}

.article-layout {
  display: grid;
  grid-template-columns: minmax(0, var(--reading)) 220px;
  gap: 64px;
  align-items: start;
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
  padding-bottom: 64px;
}

.article {
  min-width: 0;
}

.toc {
  position: sticky;
  top: 88px;
  color: var(--muted);
  font-size: 14px;
}

.toc strong {
  display: block;
  margin-bottom: 10px;
  color: var(--ink);
}

.toc a {
  display: block;
  margin: 8px 0;
  color: var(--muted);
  text-decoration: none;
}

.toc a:hover {
  color: var(--ink);
}

.intro {
  margin-bottom: 34px;
  padding: 22px;
  border-left: 4px solid var(--accent);
  background: #fff;
  color: var(--muted);
}

.resource {
  overflow: hidden;
  margin-bottom: 26px;
}

.resource figure {
  margin: 0;
  border-bottom: 1px solid var(--line);
  background: #eee8df;
}

.resource figure img {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
  object-position: top center;
}

.embed-box {
  display: grid;
  place-items: center;
  min-height: 320px;
  padding: 18px;
  background: #fff;
}

.resource-body {
  padding: clamp(20px, 4vw, 34px);
}

.resource h2 {
  margin-bottom: 12px;
  font-size: clamp(26px, 4vw, 40px);
  line-height: 1.22;
}

.talk-points {
  display: grid;
  gap: 8px;
  margin: 18px 0 0;
  padding-left: 1.1em;
  color: var(--muted);
}

.article-footer {
  margin-top: 34px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 28px 0;
  color: var(--subtle);
  font-size: 13px;
}

@media (max-width: 920px) {
  .latest-card,
  .article-card,
  .article-layout {
    grid-template-columns: 1fr;
  }

  .toc {
    position: static;
    order: -1;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--surface);
  }

  .candidate-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .candidate-list li {
    grid-template-columns: 1fr;
    gap: 6px;
  }
}

@media (max-width: 620px) {
  .nav {
    align-items: flex-start;
    flex-direction: column;
  }

  .nav-links {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .nav-links a {
    white-space: nowrap;
  }

  .home-hero {
    padding-top: 46px;
  }

  .archive-hero {
    padding-top: 46px;
  }

  .container,
  .article-header,
  .article-layout,
  .nav {
    width: min(100% - 32px, 358px);
    max-width: 358px;
  }

  h1,
  .article-header h1 {
    font-size: 30px;
    line-height: 1.18;
    word-break: break-all;
  }

  .latest-body h2,
  .resource h2 {
    font-size: 26px;
    word-break: break-all;
  }

  .lead {
    font-size: 17px;
  }

  .section-title {
    align-items: flex-start;
    flex-direction: column;
  }

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