:root {
  color-scheme: light;
  --bg: #f7f7f2;
  --paper: #fffefa;
  --ink: #15251f;
  --muted: #54615a;
  --line: #d4ddd3;
  --green: #15553d;
  --brand: #24835c;
  --accent: #c6ed8b;
  --chip: #eaf1e7;
  --dark-paper: #142c23;
  --serif: Georgia, "Songti TC", "Noto Serif CJK TC", "PMingLiU", serif;
  --sans: system-ui, -apple-system, BlinkMacSystemFont, "PingFang HK", "Microsoft JhengHei", sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #121c17; --paper: #1c2a23; --ink: #eaf2e8; --muted: #b4c5bb;
    --line: #394b40; --green: #afebb5; --brand: #8bd6a9; --chip: #283a30;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #121c17; --paper: #1c2a23; --ink: #eaf2e8; --muted: #b4c5bb;
  --line: #394b40; --green: #afebb5; --brand: #8bd6a9; --chip: #283a30;
}
*, *::before, *::after { box-sizing: border-box; }
body {
  background: var(--bg);
  color: var(--ink);
  font: 1rem/1.65 var(--sans);
  margin: 0;
}
h1, h2, h3, p, ul, figure { margin: 0; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--green); }
button, input, select { color: inherit; font: inherit; }
button { cursor: pointer; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 4px; }
.wrap { width: min(1180px, calc(100% - 72px)); margin-inline: auto; }
.sr-only, .skip:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  clip-path: inset(50%);
  overflow: hidden;
  white-space: nowrap;
}
.skip:focus { position: absolute; z-index: 5; background: var(--paper); padding: .8rem; }

.topbar { background: #122b21; color: #e0ece2; }
.topbar-inner {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: .8125rem;
}
.theme {
  display: flex;
  align-items: center;
  gap: .4rem;
  padding: 0 .1rem;
  color: inherit;
  background: none;
  border: 0;
  min-height: 36px;
}
.theme:hover { color: var(--accent); }
.theme:focus-visible { outline-color: var(--accent); }
.masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 108px;
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
}
.wordmark {
  font: 700 clamp(2.15rem, 5vw, 4.05rem)/.98 var(--serif);
  letter-spacing: -.075em;
  white-space: nowrap;
}
.wordmark span { font-style: italic; color: var(--brand); }
.header-search {
  display: flex;
  align-items: stretch;
  width: min(100%, 16.75rem);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 5px;
}
.header-search input {
  width: 100%;
  min-width: 0;
  padding: .52rem .65rem;
  background: transparent;
  border: 0;
  border-radius: 5px;
}
.header-search input::placeholder { color: var(--muted); }
.header-search button { min-width: 43px; padding: 0 .6rem; background: transparent; border: 0; }
.lens {
  position: relative;
  display: inline-block;
  vertical-align: middle;
  border: 1.8px solid currentColor;
  border-radius: 100%;
  height: 12px;
  width: 12px;
}
.lens::after {
  content: "";
  position: absolute;
  width: 6px;
  height: 2px;
  background: currentColor;
  transform: rotate(45deg);
  top: 9px;
  left: 8px;
}
.main-nav { display: flex; flex-wrap: wrap; gap: .2rem clamp(1.1rem, 3.2vw, 2.6rem); border-bottom: 1px solid var(--line); }
.main-nav a { padding: .8rem 0 .7rem; border-bottom: 3px solid transparent; font-weight: 700; }
.main-nav [aria-current] { color: var(--green); border-color: var(--brand); }

.main { padding-block: 2rem 3.8rem; min-height: 62vh; }
.front { display: grid; grid-template-columns: minmax(0, 2.35fr) minmax(0, 1fr); gap: 1.8rem; align-items: start; }
.lead {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  color: #fffef7;
  background: var(--dark-paper);
  border: 1px solid #234b3b;
  border-radius: 6px;
}
.lead-visual { display: block; background: #0c1d16; border-bottom: 1px solid #234b3b; }
.lead-visual img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: contain; }
.lead-copy { padding: clamp(1.25rem, 3vw, 1.9rem); width: 100%; }
.lead-copy h2 {
  margin-block: .55rem .72rem;
  font: 750 clamp(1.45rem, 2.6vw, 2.15rem)/1.22 var(--sans);
  letter-spacing: -.025em;
  overflow-wrap: anywhere;
}
.lead-copy p { color: #e4efe7; max-width: 48rem; }
.lead-copy .meta { color: #c7ddd0; }
.lead-copy a:hover { color: var(--accent); }
.lead-copy a:focus-visible { outline-color: var(--accent); }
.lead-copy .meta a, .read {
  color: #183223;
  background: var(--accent);
  border-radius: 3px;
  padding: .22rem .55rem;
}
.lead-copy .meta a:hover, .lead-copy .read:hover { color: #101b14; background: #e4ffc0; }
.read { display: inline-block; margin-top: 1rem; padding: .46rem .85rem; font-weight: 720; font-size: .875rem; }

.front-sidebar { min-width: 0; padding: 1.12rem 1.35rem; border: 1px solid var(--line); background: var(--paper); border-radius: 6px; }
.front-sidebar h2, .section-head h2 { line-height: 1.25; font-size: 1.22rem; }
.latest article {
  display: grid;
  grid-template-columns: 4.5rem minmax(0, 1fr);
  align-items: center;
  gap: .7rem;
  padding: .85rem 0;
  border-bottom: 1px solid var(--line);
}
.mini-cover {
  display: block;
  width: 4.5rem;
  overflow: hidden;
  border-radius: 4px;
  background: #0d1f18;
}
.mini-cover img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: contain; }
.latest h3 { line-height: 1.43; font-size: .96rem; margin-top: .28rem; }
.latest h3 a:hover, .card h3 a:hover { text-decoration: underline; text-underline-offset: .18em; }
.trending { margin-top: 1.05rem; }
.trending h2 { font-size: .95rem; margin-bottom: .58rem; }
.edition-pills { display: flex; flex-wrap: wrap; gap: .4rem; list-style: none; padding: 0; margin-top: .5rem; }
.edition-pills a {
  display: inline-block;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--green);
  font-size: .8125rem;
  font-weight: 680;
  border-radius: 4px;
  padding: .22rem .55rem;
}
.edition-pills a:hover { border-color: var(--brand); }

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: .2rem .55rem;
  align-items: center;
  color: var(--muted);
  font-size: .8125rem;
}
.meta a { color: var(--green); font-weight: 760; }
.meta a:hover { text-decoration: underline; }

.home-section { margin-top: 2.7rem; }
.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: .5rem 1rem;
  padding-bottom: .65rem;
  border-bottom: 2px solid var(--brand);
  margin-bottom: 1rem;
}
.section-head h2 { font-size: clamp(1.35rem, 3vw, 1.65rem); }
.section-head > a, .parent, .search-meta > a {
  color: var(--green); font-size: .875rem; font-weight: 720;
}
.section-head a:hover, .parent:hover, .search-meta > a:hover { text-decoration: underline; }
.card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.card {
  min-width: 0;
  overflow: hidden;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 6px;
}
.card-image { display: block; background: #0d1f18; border-bottom: 1px solid var(--line); }
.card-image img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: contain; }
.card-copy { padding: 1rem 1.08rem; }
.card h3 { font-size: 1.1rem; line-height: 1.4; margin: .45rem 0; overflow-wrap: anywhere; }
.card p { color: var(--muted); overflow-wrap: anywhere; font-size: .9375rem; }
.card .chips { margin-top: .8rem; }
.chips { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: .35rem; }
.chips a, .tag-directory a {
  display: inline-block;
  border: 1px solid transparent;
  background: var(--chip);
  color: var(--green);
  font-size: .8125rem;
  font-weight: 680;
  border-radius: 4px;
  padding: .2rem .47rem;
  overflow-wrap: anywhere;
}
.chips a:hover, .tag-directory a:hover { border-color: var(--brand); }

.page-heading { padding-block: .75rem 1.6rem; }
.page-heading h1, .article-header h1 {
  font-size: clamp(1.75rem, 4.5vw, 2.85rem);
  letter-spacing: -.03em;
  line-height: 1.2;
  overflow-wrap: anywhere;
}
.page-heading p { margin-top: .6rem; color: var(--muted); }
.page-heading .eyebrow { color: var(--green); font-size: .875rem; font-weight: 750; margin: 0 0 .4rem; }
.page-heading .parent { display: inline-block; margin-bottom: .45rem; }
.archive-group { border-top: 1px solid var(--line); padding: 1.15rem 0; }
.archive-group-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: .5rem 1rem; margin-bottom: .7rem; }
.archive-group h2 { font-size: 1.08rem; color: var(--ink); }
.archive-group .edition-link { font-size: .875rem; font-weight: 700; color: var(--green); }
.archive-group .edition-link:hover { text-decoration: underline; }
.archive-group ul { display: grid; gap: .65rem; list-style: none; padding: 0; }
.archive-group li a { display: flex; align-items: center; gap: .75rem; }
.archive-group li a:hover { text-decoration: underline; }

.article-body, .related { width: min(100%, 820px); margin: 0 auto; }
.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  color: var(--green);
  font-weight: 720;
  font-size: .875rem;
  margin-bottom: .85rem;
}
.breadcrumbs a:hover { text-decoration: underline; }
.article-summary { color: var(--muted); font-size: 1.16rem; line-height: 1.65; margin-top: .75rem; }
.article-date { display: flex; flex-wrap: wrap; gap: .35rem 1.1rem; color: var(--muted); font-size: .875rem; margin: .85rem 0; }
.article-image { margin-top: 1.4rem; }
.article-image img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  background: #0d1f18;
  border-radius: 6px;
  border: 1px solid var(--line);
}
.article-image figcaption { color: var(--muted); margin-top: .35rem; font-size: .8125rem; }
.edition-note {
  margin-top: 1.2rem;
  padding: .75rem 1rem;
  border: 1px solid var(--line);
  border-left: 4px solid var(--brand);
  border-radius: 4px;
  background: var(--paper);
  color: var(--muted);
  font-size: .9rem;
}
.prose { max-width: 72ch; margin-top: 1.55rem; }
.prose section + section { margin-top: 1.45rem; }
.prose h2 { font-size: 1.28rem; line-height: 1.35; margin-bottom: .4rem; }
.prose p { font-size: 1.06rem; line-height: 1.82; overflow-wrap: anywhere; }
.sources { padding-top: 1rem; border-top: 1px solid var(--line); }
.sources ul { padding-left: 1.25rem; margin-top: .45rem; }
.sources li + li { margin-top: .35rem; }
.sources a { text-decoration: underline; color: var(--green); overflow-wrap: anywhere; }
.related { margin-top: 2.5rem; }
.tag-directory { display: flex; flex-wrap: wrap; list-style: none; gap: .6rem; padding: 0; }
.tag-directory a { font-size: 1rem; padding: .48rem .75rem; }
.tag-directory span { margin-left: .22rem; color: var(--muted); font-size: .85rem; }
.search-page { display: grid; grid-template-columns: minmax(0, 1fr) minmax(8.25rem, auto) auto; gap: .55rem; }
.search-page label { grid-column: 1 / -1; font-weight: 700; }
.search-page input, .search-page select, .search-page button {
  min-width: 0;
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: 4px;
  padding: .55rem .65rem;
}
.search-page button { background: var(--green); color: var(--bg); font-weight: 700; }
.search-meta { min-height: 3rem; display: flex; justify-content: space-between; gap: .75rem; align-items: center; }
.search-meta p, .empty { color: var(--muted); }
.site-footer { background: #122b21; color: #ecf5ea; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: .5rem 1rem; min-height: 78px; }
.footer-name { font: bold 1.25rem var(--serif); }
.footer-inner nav { display: flex; flex-wrap: wrap; gap: .5rem 1rem; font-size: .875rem; }
.site-footer a:hover { color: var(--accent); }

@media (max-width: 900px) {
  .wrap { width: calc(100% - 44px); }
  .front { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 1rem; }
  .front-sidebar { padding-inline: .9rem; }
  .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
  .wrap { width: calc(100% - 32px); }
  .masthead { display: grid; min-height: auto; gap: .85rem; }
  .wordmark { font-size: clamp(2.1rem, 9.5vw, 3.2rem); }
  .header-search { width: min(100%, 23rem); }
  .main-nav { gap: .15rem .9rem; }
  .main-nav a { font-size: .92rem; padding: .65rem 0 .55rem; }
  .main { padding-top: 1rem; }
  .front { grid-template-columns: minmax(0, 1fr); }
  .lead-copy { padding: 1.05rem; }
  .lead-copy p { font-size: .9375rem; }
  .front-sidebar { padding: 1rem; }
  .card-grid { grid-template-columns: minmax(0, 1fr); }
  .search-page { grid-template-columns: minmax(0, 1fr) auto; }
  .search-page input { grid-column: 1 / -1; }
  .search-meta { padding: .5rem 0; }
}
