:root {
  --bg: #f6f1e7;
  --paper: #fffdf8;
  --ink: #182033;
  --muted: #5f6d82;
  --line: rgba(24, 32, 51, .12);
  --accent: #0f6b63;
  --w: min(1160px, calc(100vw - 32px));
  --shadow: 0 18px 45px rgba(15, 25, 40, .08)
}

* {
  box-sizing: border-box
}

html {
  scroll-behavior: smooth
}

body {
  margin: 0;
  font-family: "Manrope", "Noto Sans TC", sans-serif;
  color: var(--ink);
  background: radial-gradient(circle at top left, rgba(184, 138, 45, .15), transparent 28%), linear-gradient(180deg, #faf7f0 0%, var(--bg) 100%)
}

a {
  text-decoration: none;
  color: inherit
}

.wrap {
  width: var(--w);
  margin: 0 auto
}

.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(250, 247, 240, .88);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(24, 32, 51, .08)
}

.nav-row {
  width: var(--w);
  margin: 0 auto;
  min-height: 72px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px
}

.brand {
  display: flex;
  gap: 14px;
  align-items: center
}

.mark {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #13314f, #0f6b63);
  color: #fff;
  font: 900 1rem "Noto Serif TC", serif;
  letter-spacing: .08em
}

.brand strong,
.eyebrow,
.section-eyebrow {
  display: block;
  letter-spacing: .16em;
  text-transform: uppercase;
  font-size: .72rem
}

.brand span:last-child {
  color: var(--muted);
  font-size: .92rem
}

.links {
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
  justify-content: flex-end
}

.links a,
.links button {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: var(--muted);
  cursor: pointer
}

.hero,
.panel,
.explorer,
.feature,
.card,
.about article,
.footer {
  background: rgba(255, 253, 248, .9);
  border: 1px solid rgba(24, 32, 51, .08);
  border-radius: 28px;
  box-shadow: var(--shadow)
}

.hero-grid,
.feature,
.about {
  display: grid;
  gap: 22px
}

.hero-wrap {
  padding: 52px 0 20px
}

.hero-grid {
  grid-template-columns: minmax(0, 1.18fr) minmax(300px, .82fr)
}

.hero {
  padding: 38px
}

.hero h1,
.title,
.card h3,
.about h3 {
  font-family: "Noto Serif TC", serif
}

.hero h1 {
  margin: 14px 0 18px;
  font-size: clamp(2.4rem, 5vw, 4.6rem);
  line-height: 1.06;
  max-width: 11ch
}

.hero p,
.panel p,
.feature p,
.card p,
.about p,
.footer p {
  margin: 0;
  color: var(--muted);
  line-height: 1.8
}

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

.btn,
.btn-alt,
.pill,
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px
}

.btn {
  padding: 14px 22px;
  background: var(--accent);
  color: #fff;
  font-weight: 800
}

.btn-alt {
  padding: 14px 22px;
  background: rgba(15, 107, 99, .07);
  border: 1px solid rgba(15, 107, 99, .16);
  color: #0a504a;
  font-weight: 800
}

.pill {
  padding: 8px 12px;
  background: rgba(24, 32, 51, .05);
  font-size: .88rem;
  font-weight: 700
}

.chip {
  padding: 9px 13px;
  background: #fff;
  border: 1px solid rgba(15, 107, 99, .14);
  color: #0a504a;
  font-weight: 700;
  font-size: .92rem
}

.panel {
  padding: 28px;
  background: linear-gradient(180deg, rgba(19, 49, 79, .96), rgba(15, 107, 99, .92));
  color: #fff
}

.panel h2 {
  margin: 10px 0 8px;
  font-size: 1.42rem;
  line-height: 1.35
}

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

.stat {
  padding: 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .12)
}

.stat strong {
  display: block;
  font-size: 1.4rem;
  margin-bottom: 6px
}

section {
  padding: 16px 0 22px
}

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

.section-eyebrow {
  color: var(--accent);
  font-weight: 800;
  margin-bottom: 8px
}

.title {
  margin: 0;
  font-size: clamp(1.8rem, 3vw, 2.7rem);
  line-height: 1.15
}

.note {
  max-width: 44ch;
  margin: 0;
  color: var(--muted);
  line-height: 1.75
}

.explorer {
  padding: 28px
}

.explorer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(250px, .75fr);
  gap: 22px
}

.search {
  padding: 16px 18px;
  display: flex;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff
}

.search input {
  width: 100%;
  border: 0;
  outline: 0;
  background: none;
  font: inherit;
  color: var(--ink)
}

.aside {
  padding: 22px;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(215, 238, 231, .72), rgba(255, 250, 242, .95));
  border: 1px solid rgba(15, 107, 99, .1)
}

/* ── Explorer article list (below search grid) ── */
.explorer-articles {
  border-top: 1px solid var(--line);
  margin: 22px -28px -28px;
  padding: 22px 28px 0
}

.explorer-articles-head {
  margin-bottom: 16px
}

.article-row {
  padding: 16px 0;
  border-bottom: 1px solid var(--line)
}

.article-row:last-child {
  border-bottom: 0;
  padding-bottom: 8px
}

.article-row-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 10px
}

.article-row h4 {
  margin: 0;
  font: 700 1.08rem "Noto Serif TC", serif
}

.article-row p {
  margin: 0;
  color: var(--muted);
  line-height: 1.8
}

/* ─────────────────────────────── */

.feature {
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, .85fr);
  overflow: hidden
}

.feature-main,
.feature-side {
  padding: 32px
}

.feature-side {
  border-left: 1px solid rgba(24, 32, 51, .08);
  background: linear-gradient(180deg, rgba(15, 107, 99, .08), rgba(184, 138, 45, .09))
}

.feature ul {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.8
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px
}

.card {
  padding: 24px
}

.about {
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, .85fr)
}

.about article {
  padding: 28px
}

.contact {
  margin-top: 16px;
  display: grid;
  gap: 12px
}

.box {
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(24, 32, 51, .04)
}

.footer {
  width: var(--w);
  margin: 12px auto 28px;
  padding: 22px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px
}

dialog {
  border: 0;
  padding: 0;
  border-radius: 26px;
  background: transparent;
  max-width: min(720px, calc(100vw - 24px));
  width: 100%
}

dialog::backdrop {
  background: rgba(15, 23, 42, .45);
  backdrop-filter: blur(6px)
}

.dialog-body {
  padding: 28px;
  background: var(--paper);
  border: 1px solid rgba(24, 32, 51, .08);
  border-radius: 26px;
  box-shadow: var(--shadow)
}

@media (max-width:960px) {

  .hero-grid,
  .explorer-grid,
  .feature,
  .about {
    grid-template-columns: 1fr
  }

  .feature-side {
    border-left: 0;
    border-top: 1px solid rgba(24, 32, 51, .08)
  }
}

@media (max-width:760px) {
  .nav-row {
    padding: 12px 0;
    align-items: flex-start;
    flex-direction: column
  }

  .hero,
  .panel,
  .explorer,
  .feature-main,
  .feature-side,
  .card,
  .about article,
  .footer,
  .dialog-body {
    padding: 24px
  }

  .explorer-articles {
    margin-left: -24px;
    margin-right: -24px;
    padding-left: 24px;
    padding-right: 24px
  }

  .section-head,
  .footer {
    flex-direction: column;
    align-items: flex-start
  }

  .hero-wrap {
    padding-top: 34px
  }
}

/* ── Featured Carousel ───────────────────────────────────── */
.carousel {
  position: relative;
  background: rgba(255, 253, 248, .9);
  border: 1px solid rgba(24, 32, 51, .08);
  border-radius: 28px;
  box-shadow: var(--shadow);
  overflow: hidden
}

.carousel-track {
  display: flex;
  transition: transform .45s cubic-bezier(.4, 0, .2, 1)
}

.carousel-slide {
  flex: 0 0 100%;
  min-width: 0
}

/* cancel the double-border / shadow when .feature is inside carousel */
.carousel .feature {
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: transparent
}

.carousel-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 14px
}

.carousel-btn {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid rgba(15, 107, 99, .2);
  background: var(--paper);
  color: var(--accent);
  cursor: pointer;
  font-size: 1.1rem;
  display: grid;
  place-items: center;
  transition: background .2s, border-color .2s
}

.carousel-btn:hover {
  background: rgba(15, 107, 99, .08);
  border-color: rgba(15, 107, 99, .4)
}

.carousel-btn:disabled {
  opacity: .35;
  cursor: default
}

.carousel-dots {
  display: flex;
  gap: 8px;
  align-items: center
}

.carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  border: 0;
  padding: 0;
  background: rgba(15, 107, 99, .2);
  cursor: pointer;
  transition: width .25s ease, background .25s ease
}

.carousel-dot.active {
  width: 22px;
  background: var(--accent)
}

/* ── Search ─────────────────────────────────────────────── */
.search-clear {
  display: none;
  background: none;
  border: 0;
  padding: 2px 6px;
  color: var(--muted);
  cursor: pointer;
  font-size: .9rem;
  line-height: 1;
  flex-shrink: 0;
  border-radius: 999px
}

.search-clear:hover {
  background: rgba(24, 32, 51, .06);
  color: var(--ink)
}

.search-clear.visible {
  display: block
}

.search-status {
  margin: 10px 0 0;
  font-size: .86rem;
  color: var(--accent);
  font-weight: 700;
  min-height: 1.4em
}

mark {
  background: rgba(15, 107, 99, .15);
  color: inherit;
  border-radius: 3px;
  padding: 0 2px
}

#explore {
  scroll-margin-top: 80px
}

