:root {
  color-scheme: light;
  --ink: #17201b;
  --muted: #66716a;
  --paper: #fbfbf6;
  --panel: #ffffff;
  --line: #dde4dc;
  --leaf: #2f6b4f;
  --leaf-dark: #1d4d39;
  --mint: #e5f0e6;
  --rose: #9d3f35;
  --gold: #b47a2a;
  --shadow: 0 18px 45px rgba(24, 42, 32, 0.12);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans",
    "Noto Sans TC", "Microsoft JhengHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    linear-gradient(180deg, rgba(229, 240, 230, 0.82), rgba(251, 251, 246, 0.94) 360px),
    var(--paper);
  color: var(--ink);
  line-height: 1.6;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 74px;
  padding: 12px clamp(18px, 4vw, 54px);
  border-bottom: 1px solid rgba(221, 228, 220, 0.82);
  background: rgba(251, 251, 246, 0.9);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  text-decoration: none;
}

.brand img {
  width: 44px;
  height: 44px;
  border: 1px solid rgba(23, 32, 27, 0.08);
  border-radius: 8px;
  object-fit: cover;
}

.brand span {
  display: grid;
  gap: 0;
}

.brand strong {
  font-size: clamp(1rem, 1.4vw, 1.2rem);
  letter-spacing: 0;
  line-height: 1.2;
}

.brand small {
  color: var(--muted);
  font-size: 0.75rem;
}

.language-switcher,
.filter-group {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.7);
}

.lang-button,
.filter-button {
  min-height: 36px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-weight: 700;
}

.lang-button {
  min-width: 46px;
}

.filter-button {
  padding: 0 14px;
}

.lang-button.is-active,
.filter-button.is-active {
  background: var(--leaf);
  color: #fff;
}

.hero-band {
  padding: clamp(34px, 6vw, 72px) clamp(18px, 4vw, 54px) 26px;
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 430px);
  align-items: end;
  gap: clamp(24px, 5vw, 70px);
  max-width: 1240px;
  margin: 0 auto;
}

.hero-copy {
  max-width: 760px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 12px;
  border: 1px solid rgba(47, 107, 79, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  color: var(--leaf-dark);
  font-size: 0.82rem;
  font-weight: 800;
}

.hero-copy h1 {
  margin: 18px 0 16px;
  max-width: 880px;
  font-size: clamp(2.45rem, 6vw, 5.9rem);
  line-height: 0.96;
  letter-spacing: 0;
}

html[lang="zh-Hant"] .hero-copy h1 {
  font-size: clamp(2.2rem, 5.1vw, 4.9rem);
  line-height: 1.08;
  word-break: keep-all;
}

.hero-copy p {
  max-width: 680px;
  margin: 0;
  color: #4d5f53;
  font-size: clamp(1.02rem, 1.65vw, 1.28rem);
}

.source-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(221, 228, 220, 0.9);
  border-radius: 8px;
  background: var(--line);
  box-shadow: var(--shadow);
}

.source-summary div {
  min-width: 0;
  padding: 18px;
  background: rgba(255, 255, 255, 0.92);
}

.source-summary dt {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.source-summary dd {
  margin: 4px 0 0;
  color: var(--leaf-dark);
  font-size: clamp(1.25rem, 2vw, 1.55rem);
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}

.toolbar {
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: 1240px;
  margin: 0 auto;
  padding: 16px clamp(18px, 4vw, 54px) 20px;
}

.search-box {
  position: relative;
  flex: 1 1 360px;
  min-width: 220px;
}

.search-box span {
  position: absolute;
  top: 50%;
  left: 16px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  transform: translateY(-50%);
}

.search-box input {
  width: 100%;
  min-height: 46px;
  padding: 0 16px 0 72px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  color: var(--ink);
  outline: 0;
}

.search-box input:focus {
  border-color: rgba(47, 107, 79, 0.58);
  box-shadow: 0 0 0 4px rgba(47, 107, 79, 0.12);
}

.source-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 16px;
  border: 1px solid rgba(47, 107, 79, 0.24);
  border-radius: 8px;
  background: rgba(229, 240, 230, 0.72);
  color: var(--leaf-dark);
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.article-shell {
  display: grid;
  grid-template-columns: minmax(390px, 0.86fr) minmax(0, 1.14fr);
  align-items: start;
  gap: 22px;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 clamp(18px, 4vw, 54px) clamp(44px, 6vw, 76px);
}

body.is-reader .hero-band,
body.is-reader .toolbar,
body.is-reader .article-list-panel {
  display: none;
}

body.is-reader .article-shell {
  grid-template-columns: minmax(0, 980px);
  justify-content: center;
  padding-top: clamp(22px, 4vw, 44px);
}

body.is-reader .detail-panel {
  position: static;
}

.article-list-panel,
.detail-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 12px 30px rgba(24, 42, 32, 0.08);
}

.article-list-panel {
  min-width: 0;
  overflow: hidden;
}

.list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 18px 12px;
  border-bottom: 1px solid var(--line);
}

.list-header h2 {
  margin: 0;
  font-size: 1rem;
}

.list-header span {
  min-width: 42px;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 800;
  text-align: right;
}

.article-list {
  display: grid;
  gap: 1px;
  max-height: calc(100vh - 208px);
  overflow: auto;
  background: var(--line);
}

.article-card {
  display: grid;
  grid-template-columns: 144px minmax(0, 1fr);
  gap: 14px;
  width: 100%;
  min-height: 122px;
  padding: 14px;
  border: 0;
  background: #fff;
  color: inherit;
  text-align: left;
}

.article-card:hover,
.article-card:focus-visible {
  position: relative;
  z-index: 1;
  outline: 0;
  background: #f7faf6;
}

.article-card.is-active {
  background: var(--mint);
}

.thumb-wrap {
  position: relative;
  display: block;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 16 / 9;
  align-self: center;
  border-radius: 8px;
  background: #d8ddd5;
}

.article-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 180ms ease;
}

.article-card:hover .article-thumb {
  transform: scale(1.04);
}

.video-badge {
  position: absolute;
  right: 8px;
  bottom: 8px;
  display: none;
  min-height: 24px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(157, 63, 53, 0.94);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 900;
}

.article-card.has-video .video-badge {
  display: inline-flex;
  align-items: center;
}

.card-copy {
  display: grid;
  align-content: center;
  gap: 6px;
  min-width: 0;
}

.card-title {
  color: var(--ink);
  font-size: 1.03rem;
  font-weight: 900;
  line-height: 1.25;
}

.card-excerpt {
  display: -webkit-box;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.9rem;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.card-meta {
  color: var(--gold);
  font-size: 0.76rem;
  font-weight: 900;
}

.detail-panel {
  position: sticky;
  top: 96px;
  align-self: start;
  min-width: 0;
  overflow: hidden;
}

.reader-nav {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 14px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.94);
}

body.is-reader .detail-hero {
  aspect-ratio: 16 / 7;
}

.detail-hero {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 8.4;
  background: #d8ddd5;
}

.detail-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-hero::after {
  position: absolute;
  inset: auto 0 0;
  height: 46%;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.58));
  content: "";
}

.detail-status {
  position: absolute;
  right: 16px;
  bottom: 16px;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--leaf-dark);
  font-size: 0.78rem;
  font-weight: 900;
}

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

.detail-kicker {
  margin: 0 0 8px;
  color: var(--gold);
  font-size: 0.8rem;
  font-weight: 900;
  text-transform: uppercase;
}

.detail-body h2 {
  margin: 0 0 12px;
  color: var(--ink);
  font-size: clamp(1.85rem, 3.8vw, 3rem);
  line-height: 1.05;
  letter-spacing: 0;
}

.detail-excerpt {
  margin: 0 0 18px;
  color: #44534a;
  font-size: 1.05rem;
}

.detail-preview {
  display: grid;
  gap: 12px;
  margin: 18px 0;
}

.detail-preview p {
  margin: 0;
  color: var(--muted);
}

.section-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.section-pills li {
  max-width: 100%;
  padding: 7px 10px;
  border: 1px solid rgba(47, 107, 79, 0.18);
  border-radius: 999px;
  background: rgba(229, 240, 230, 0.62);
  color: var(--leaf-dark);
  font-size: 0.82rem;
  font-weight: 800;
}

.video-panel {
  margin-top: 24px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #101411;
}

.video-frame {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
}

.video-actions,
.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.video-actions {
  padding: 12px;
  margin: 0;
  background: #fff;
}

.action-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid rgba(47, 107, 79, 0.25);
  border-radius: 8px;
  background: #fff;
  color: var(--leaf-dark);
  font-size: 0.92rem;
  font-weight: 900;
  text-decoration: none;
  cursor: pointer;
}

.action-link.primary {
  border-color: var(--leaf);
  background: var(--leaf);
  color: #fff;
}

.notice {
  margin: 18px 0 0;
  padding: 12px 14px;
  border: 1px solid rgba(180, 122, 42, 0.26);
  border-radius: 8px;
  background: rgba(255, 248, 235, 0.76);
  color: #705023;
  font-size: 0.9rem;
}

.empty-state {
  padding: 28px;
  background: #fff;
  color: var(--muted);
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  padding: 26px 18px 34px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.88rem;
  text-align: center;
}

.site-footer a {
  color: var(--leaf-dark);
  font-weight: 900;
  text-decoration: none;
}

@media (max-width: 980px) {
  .hero-inner,
  .article-shell {
    grid-template-columns: 1fr;
  }

  .source-summary {
    max-width: 520px;
  }

  .detail-panel {
    position: static;
  }

  .article-list {
    max-height: none;
  }
}

@media (max-width: 720px) {
  .site-header {
    min-height: 66px;
    padding: 10px 14px;
  }

  .brand img {
    width: 38px;
    height: 38px;
  }

  .brand small {
    display: none;
  }

  .hero-band {
    padding-top: 28px;
  }

  .source-summary {
    grid-template-columns: 1fr;
  }

  .toolbar {
    flex-wrap: wrap;
  }

  .filter-group,
  .source-link,
  .search-box {
    width: 100%;
  }

  .filter-button {
    flex: 1;
  }

  .article-card {
    grid-template-columns: 118px minmax(0, 1fr);
    gap: 12px;
    min-height: 112px;
    padding: 12px;
  }

  .detail-body {
    padding: 20px;
  }
}

@media (max-width: 430px) {
  .article-card {
    grid-template-columns: 96px minmax(0, 1fr);
  }

  .card-title {
    font-size: 0.94rem;
  }

  .card-excerpt {
    font-size: 0.82rem;
  }
}
