:root {
  color-scheme: light;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang HK", "Noto Sans TC", sans-serif;
  --green: #143c2d;
  --green-soft: #1e533e;
  --orange: #da8134;
  --orange-dark: #a95720;
  --white: #ffffff;
  --paper: #f7f3e9;
  --paper-deep: #eee7d8;
  --gold-light: #fff4c4;
  --gold: #e4bd5d;
  --gold-dark: #a97920;
  --text-muted: #4f655a;
  --line: rgb(20 60 45 / 15%);
  --shadow-card: 0 16px 42px rgb(20 60 45 / 8%);
  --shadow-raised: 0 24px 70px rgb(20 60 45 / 16%);
  --radius-large: 24px;
  --radius-card: 18px;
  --tap-size: 52px;
  background: var(--paper);
  color: var(--green);
  font-size: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 112px;
}

body {
  background:
    radial-gradient(circle at 12% 8%, rgb(255 255 255 / 78%), transparent 25rem),
    linear-gradient(180deg, var(--paper) 0%, #f3eee2 100%);
  margin: 0;
  min-height: 100vh;
}

a {
  color: var(--orange-dark);
  font-weight: 800;
  text-decoration-thickness: 2px;
  text-underline-offset: 5px;
}

a:focus-visible,
button:focus-visible {
  border-radius: 8px;
  outline: 4px solid var(--gold);
  outline-offset: 4px;
}

.skipLink {
  background: var(--white);
  border: 2px solid var(--orange);
  color: var(--green);
  left: 16px;
  min-height: var(--tap-size);
  padding: 12px 18px;
  position: fixed;
  top: 12px;
  transform: translateY(-160%);
  transition: transform 160ms ease;
  z-index: 11000;
}

.skipLink:focus {
  transform: translateY(0);
}

.siteHeader {
  background: var(--green);
  border-bottom: 1px solid rgb(255 255 255 / 16%);
  padding: 14px 24px;
}

.siteHeaderInner {
  align-items: center;
  display: flex;
  gap: 20px;
  justify-content: space-between;
  margin: 0 auto;
  max-width: 1080px;
}

.brandLink {
  align-items: center;
  color: var(--white);
  display: flex;
  gap: 12px;
  min-width: 0;
  text-decoration: none;
}

.brandLink img {
  flex: 0 0 auto;
}

.brandLink > span {
  display: grid;
  gap: 2px;
}

.brandLink strong {
  font-family: "Songti TC", "Noto Serif TC", serif;
  font-size: 1.25rem;
  line-height: 1.2;
}

.brandLink small {
  color: #f3d990;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.35;
}

.headerHomeLink {
  align-items: center;
  border: 1px solid rgb(255 255 255 / 34%);
  border-radius: 999px;
  color: var(--white);
  display: inline-flex;
  flex: 0 0 auto;
  gap: 8px;
  min-height: var(--tap-size);
  padding: 10px 18px;
  text-decoration: none;
}

.headerHomeLink span {
  color: #f3d990;
  font-size: 1.25rem;
}

main {
  margin: 0 auto;
  max-width: 1080px;
  padding: 44px 24px 78px;
}

.hero {
  background: linear-gradient(135deg, var(--green) 0%, var(--green-soft) 72%, var(--green) 100%);
  border: 1px solid rgb(238 209 135 / 52%);
  border-radius: var(--radius-large);
  box-shadow: var(--shadow-raised);
  color: var(--white);
  overflow: hidden;
  padding: clamp(34px, 5vw, 56px);
  position: relative;
}

.hero::before {
  background: linear-gradient(180deg, var(--gold-light), var(--orange));
  border-radius: 999px;
  content: "";
  inset: 34px auto 34px 0;
  position: absolute;
  width: 5px;
}

.hero::after {
  background: radial-gradient(circle, rgb(255 246 190 / 48%) 0%, rgb(255 214 100 / 12%) 35%, transparent 72%);
  content: "";
  height: 270px;
  pointer-events: none;
  position: absolute;
  right: -68px;
  top: -104px;
  width: 270px;
}

.eyebrow,
.sectionHeading p {
  color: var(--orange);
  font-size: 1rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  margin: 0 0 10px;
}

.hero .eyebrow {
  color: #f3d990;
}

h1,
h2,
h3 {
  font-family: "Songti TC", "Noto Serif TC", serif;
}

h1 {
  font-size: clamp(2.65rem, 6.8vw, 4.4rem);
  letter-spacing: 0.025em;
  line-height: 1.08;
  margin: 0;
  max-width: 820px;
  position: relative;
  z-index: 1;
}

.lead {
  color: #f8f5ed;
  font-size: clamp(1.1rem, 2.4vw, 1.28rem);
  line-height: 1.72;
  margin: 22px 0 0;
  max-width: 800px;
  position: relative;
  z-index: 1;
}

.heroMeta {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  margin-top: 22px;
  position: relative;
  z-index: 1;
}

.updated,
.articleTotal {
  font-size: 1rem;
  margin: 0;
}

.updated {
  color: #ded2b4;
}

.articleTotal {
  background: rgb(255 255 255 / 10%);
  border: 1px solid rgb(243 217 144 / 44%);
  border-radius: 999px;
  color: #f7dfa1;
  font-weight: 800;
  padding: 7px 13px;
}

.categoryNav {
  align-items: stretch;
  backdrop-filter: blur(14px);
  background: rgb(255 255 255 / 92%);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: 0 14px 40px rgb(20 60 45 / 9%);
  display: grid;
  gap: 12px;
  grid-template-columns: 160px minmax(0, 1fr);
  margin: 18px 0 50px;
  padding: 11px;
  position: sticky;
  top: 12px;
  z-index: 20;
}

.categoryNavLabel {
  align-content: center;
  border-right: 1px solid var(--line);
  display: grid;
  padding: 6px 16px 6px 10px;
}

.categoryNavLabel span {
  color: var(--orange-dark);
  font-size: 0.9rem;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.categoryNavLabel strong {
  color: var(--green);
  font-family: "Songti TC", "Noto Serif TC", serif;
  font-size: 1.18rem;
}

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

.categoryNavLinks a {
  align-items: center;
  border-radius: 12px;
  color: var(--green);
  display: grid;
  gap: 10px;
  grid-template-columns: auto minmax(0, 1fr);
  min-height: 60px;
  padding: 8px 14px;
  text-decoration: none;
  transition: background 160ms ease, color 160ms ease;
}

.categoryNavLinks a > span {
  align-items: center;
  background: linear-gradient(145deg, var(--gold-light), var(--gold) 68%, #fff7d8);
  border: 1px solid #c89a35;
  border-radius: 50%;
  color: var(--green);
  display: inline-flex;
  font-size: 0.9rem;
  font-variant-numeric: tabular-nums;
  height: 34px;
  justify-content: center;
  width: 34px;
}

.categoryNavLinks strong {
  font-size: 1rem;
}

.contentSection {
  scroll-margin-top: 112px;
}

.contentSection + .contentSection {
  border-top: 1px solid var(--line);
  margin-top: 54px;
  padding-top: 54px;
}

.sectionHeading {
  align-items: end;
  display: flex;
  gap: 24px;
  justify-content: space-between;
  margin-bottom: 24px;
}

.sectionHeading h2 {
  font-size: clamp(2rem, 4.6vw, 2.85rem);
  line-height: 1.12;
  margin: 0;
}

.sectionCount {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text-muted);
  flex: 0 0 auto;
  font-size: 1rem;
  font-weight: 800;
  margin-bottom: 4px;
  padding: 9px 14px;
}

.articleGrid,
.topicGrid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.articleCard,
.topicGrid article {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 28px;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.articleCard {
  border-top: 5px solid var(--gold);
}

.articleCard.featured {
  border-top-color: var(--orange);
}

.cardMeta {
  align-items: center;
  color: #61736a;
  display: flex;
  flex-wrap: wrap;
  font-size: 1rem;
  gap: 10px;
  justify-content: space-between;
  margin: 0 0 17px;
}

.cardMeta span {
  background: rgb(218 129 52 / 10%);
  border-radius: 999px;
  color: var(--orange-dark);
  font-weight: 900;
  padding: 6px 11px;
}

.cardMeta time {
  font-variant-numeric: tabular-nums;
}

.articleCard h3,
.topicGrid h3 {
  font-size: 1.5rem;
  line-height: 1.38;
  margin: 0 0 12px;
}

.articleCard h3 a {
  color: var(--green);
  text-decoration-color: rgb(218 129 52 / 48%);
}

.articleCard > p:not(.cardMeta),
.topicGrid p,
.boundary p {
  color: #344c41;
  font-size: 1.05rem;
  line-height: 1.78;
  margin: 0;
}

.readMore,
.topicLink {
  align-items: center;
  border-top: 1px solid var(--line);
  display: inline-flex;
  gap: 7px;
  margin-top: auto;
  min-height: var(--tap-size);
  padding-top: 18px;
}

.articleCard > p:not(.cardMeta) + .readMore,
.topicGrid p + .topicLink {
  margin-top: 22px;
}

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

.topicNumber {
  align-items: center;
  background: linear-gradient(145deg, var(--gold-light), var(--gold) 64%, #fff7d7);
  border: 1px solid #c89a35;
  border-radius: 50%;
  box-shadow: 0 0 22px rgb(228 189 93 / 32%);
  color: var(--green);
  display: inline-flex;
  font-family: "Songti TC", "Noto Serif TC", serif;
  font-size: 1.12rem;
  font-weight: 900;
  height: 42px;
  justify-content: center;
  margin-bottom: 18px;
  width: 42px;
}

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

.toolLinks a {
  background: linear-gradient(145deg, var(--green) 0%, #184b37 100%);
  border: 1px solid rgb(243 217 144 / 42%);
  border-radius: var(--radius-card);
  box-shadow: 0 16px 42px rgb(20 60 45 / 14%);
  color: var(--white);
  display: flex;
  flex-direction: column;
  gap: 24px;
  justify-content: space-between;
  min-height: 150px;
  overflow: hidden;
  padding: 24px;
  position: relative;
  text-decoration: none;
  transition: box-shadow 160ms ease, transform 160ms ease;
}

.toolLinks a::after {
  background: radial-gradient(circle, rgb(255 244 190 / 34%), transparent 68%);
  content: "";
  height: 150px;
  pointer-events: none;
  position: absolute;
  right: -62px;
  top: -70px;
  width: 150px;
}

.toolLinks strong {
  font-family: "Songti TC", "Noto Serif TC", serif;
  font-size: 1.3rem;
  line-height: 1.4;
  position: relative;
  z-index: 1;
}

.toolLinks a > span {
  align-items: center;
  color: #f5d982;
  display: flex;
  font-size: 1rem;
  gap: 10px;
  justify-content: space-between;
}

.toolLinks b {
  font-size: 1.35rem;
}

.closingPanel {
  align-items: stretch;
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 280px);
  margin-top: 54px;
}

.boundary {
  background: linear-gradient(135deg, #fff9e3 0%, var(--gold-light) 100%);
  border: 1px solid #d7ad50;
  border-radius: var(--radius-card);
  padding: 26px;
}

.boundary > strong {
  display: block;
  font-family: "Songti TC", "Noto Serif TC", serif;
  font-size: 1.38rem;
  line-height: 1.4;
  margin-bottom: 8px;
}

.pageLinks {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 10px;
  justify-content: center;
  padding: 18px;
}

.pageLinks a {
  align-items: center;
  border-radius: 12px;
  display: inline-flex;
  justify-content: center;
  min-height: var(--tap-size);
  padding: 10px 16px;
  text-align: center;
}

.pageLinks .primaryLink {
  background: var(--orange);
  color: var(--white);
  gap: 8px;
  text-decoration: none;
}

.privacyLink {
  color: var(--green);
}

footer {
  align-items: center;
  background: var(--green);
  color: var(--white);
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 32px 24px;
  text-align: center;
}

footer strong {
  font-family: "Songti TC", "Noto Serif TC", serif;
  font-size: 1.3rem;
}

footer small {
  color: #f3d990;
  font-size: 1rem;
}

.analyticsConsentPanel {
  border-width: 1px;
  border-radius: var(--radius-card);
}

.analyticsSettingsButton {
  border-radius: 999px;
  bottom: 14px;
  font-size: 1rem;
  left: auto;
  min-height: 48px;
  right: 14px;
}

@media (hover: hover) {
  .headerHomeLink:hover,
  .categoryNavLinks a:hover {
    background: rgb(243 217 144 / 14%);
  }

  .articleCard:hover,
  .topicGrid article:hover,
  .toolLinks a:hover {
    box-shadow: 0 22px 52px rgb(20 60 45 / 13%);
    transform: translateY(-3px);
  }

  .articleCard:hover,
  .topicGrid article:hover {
    border-color: rgb(218 129 52 / 48%);
  }
}

@media (max-width: 820px) {
  .categoryNav {
    grid-template-columns: 1fr;
  }

  .categoryNavLabel {
    display: none;
  }

  .articleGrid,
  .topicGrid,
  .toolLinks {
    grid-template-columns: 1fr;
  }

  .toolLinks a {
    min-height: 126px;
  }

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

  .pageLinks {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
  }
}

@media (max-width: 600px) {
  html {
    scroll-padding-top: 90px;
  }

  .siteHeader {
    padding: 12px 16px;
  }

  .siteHeaderInner {
    gap: 12px;
  }

  .brandLink {
    gap: 9px;
  }

  .brandLink img {
    height: 48px;
    width: 48px;
  }

  .brandLink strong {
    font-size: 1.12rem;
  }

  .brandLink small {
    display: none;
  }

  .headerHomeLink {
    font-size: 0.95rem;
    min-height: 48px;
    padding: 8px 12px;
  }

  main {
    padding: 28px 16px 64px;
  }

  .hero {
    border-radius: 20px;
    padding: 28px;
  }

  .hero::before {
    inset: 28px auto 28px 0;
    width: 4px;
  }

  h1 {
    font-size: clamp(2.1rem, 10vw, 2.35rem);
  }

  .lead {
    font-size: 1.08rem;
    line-height: 1.72;
    margin-top: 18px;
  }

  .heroMeta {
    align-items: flex-start;
    flex-direction: column;
    margin-top: 18px;
  }

  .categoryNav {
    border-radius: 16px;
    margin: 14px 0 38px;
    padding: 7px;
    top: 8px;
  }

  .categoryNavLinks {
    gap: 4px;
  }

  .categoryNavLinks a {
    gap: 4px;
    grid-template-columns: 1fr;
    justify-items: center;
    min-height: 64px;
    padding: 6px 4px;
    text-align: center;
  }

  .categoryNavLinks a > span {
    background: transparent;
    border: 0;
    color: var(--orange-dark);
    height: auto;
    width: auto;
  }

  .categoryNavLinks strong {
    font-size: 0.95rem;
  }

  .contentSection {
    scroll-margin-top: 90px;
  }

  .contentSection + .contentSection {
    margin-top: 44px;
    padding-top: 44px;
  }

  .sectionHeading {
    gap: 12px;
    margin-bottom: 20px;
  }

  .sectionHeading h2 {
    font-size: 1.85rem;
  }

  .sectionCount {
    font-size: 0.95rem;
    padding: 8px 11px;
  }

  .articleCard,
  .topicGrid article {
    border-radius: 16px;
    padding: 22px;
  }

  .articleCard h3,
  .topicGrid h3 {
    font-size: 1.38rem;
  }

  .toolLinks a {
    border-radius: 16px;
    min-height: 118px;
    padding: 22px;
  }

  .closingPanel {
    margin-top: 44px;
  }

  .boundary {
    padding: 22px;
  }

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

  .analyticsConsentPanel {
    padding: 18px;
  }

  .analyticsSettingsButton {
    bottom: 10px;
    right: 10px;
  }
}

@media (max-width: 370px) {
  .headerHomeLink {
    font-size: 0.9rem;
    padding-inline: 10px;
  }

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

  .sectionCount {
    margin: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
