:root {
  --bg: #f5f7fb;
  --panel: #ffffff;
  --text: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --primary: #2563eb;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Avenir Next", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--text);
  background: #fff8ee;
  line-height: 1.6;
}

.container {
  width: min(1080px, 92vw);
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  gap: 16px;
}

.logo {
  font-weight: 800;
  color: var(--text);
  text-decoration: none;
}

nav {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
}

.hero {
  position: relative;
  overflow: hidden;
  padding: 96px 0 64px;
  background: transparent;
}

.hero .container {
  position: relative;
  z-index: 2;
}

.dawn-bg {
  display: none;
}

.sun-glow {
  position: absolute;
  width: 460px;
  height: 460px;
  left: 50%;
  bottom: -300px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(251, 191, 36, 0.5) 0%, rgba(254, 240, 138, 0.28) 44%, rgba(255, 255, 255, 0) 100%);
}

.sun {
  position: absolute;
  width: 150px;
  height: 150px;
  left: 50%;
  bottom: -50px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff8dc 0%, #fde68a 44%, #f59e0b 100%);
  box-shadow: 0 0 40px rgba(245, 158, 11, 0.42);
}

.horizon {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 84px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, rgba(254, 243, 199, 0.42) 56%, rgba(251, 191, 36, 0.24) 100%);
}

h1 {
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.15;
  margin: 0;
}

.subtitle {
  max-width: 760px;
  color: #1f2937;
  margin-top: 12px;
  font-family: "STKaiti", "Kaiti SC", "Songti SC", "Times New Roman", serif;
  font-size: clamp(18px, 2.2vw, 24px);
  line-height: 1.8;
  letter-spacing: 0.5px;
  font-style: italic;
  background: linear-gradient(105deg, #1f3b57 0%, #2f5b84 34%, #3f7096 58%, #9a5b1a 82%, #b56a00 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.2);
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

.btn {
  display: inline-block;
  text-decoration: none;
  border-radius: 10px;
  padding: 10px 16px;
  font-weight: 600;
}

.btn.primary {
  background: var(--primary);
  color: #fff;
}

.btn.ghost {
  border: 1px solid var(--line);
  color: var(--text);
  background: #fff;
}

.section {
  padding: 22px 0 36px;
}

#topics {
  border-top: 1px solid rgba(180, 146, 84, 0.22);
}

#topic,
#latest {
  border-top: 1px solid rgba(180, 146, 84, 0.18);
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}

.topic-banner .tabs {
  margin-top: 14px;
  margin-bottom: 12px;
}

#topics .topic-banner {
  border: 0;
  background: transparent;
  padding: 0;
}

.home-tabs-block {
  --home-tab-active-bg: #ffc291;
  --home-tab-active-text: #7a4a1b;
  --home-tab-intro-bg: #ffd6b3;
  --home-tab-intro-text: #6f4318;
  background: linear-gradient(180deg, #fff3e6 0%, #ffe7ce 100%);
  border-radius: 14px;
  padding: 8px;
  box-shadow: 0 8px 22px rgba(255, 138, 61, 0.12);
}

.tabs-home {
  display: flex;
  flex-wrap: nowrap;
  gap: 10px;
  width: 100%;
  padding: 0;
}

.tabs-home .tab-link {
  display: inline-block;
  flex: 1 1 0;
  text-align: center;
  width: auto;
  border: 0;
  border-radius: 999px;
  background: #ffe8d2;
  padding: 11px 12px;
  min-height: 42px;
  color: #8b5626;
  font-weight: 700;
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.tab-intro-active {
  margin-top: 0;
  padding: 12px 14px 10px;
  background: var(--home-tab-intro-bg);
  border-top: 0;
  border-radius: 0 0 12px 12px;
}

.tab-intro-active h3 {
  margin: 0 0 4px;
  font-size: 16px;
  color: #5a3d00;
}

.tab-intro-active p {
  margin: 0;
  color: var(--home-tab-intro-text);
  font-size: 14px;
  line-height: 1.75;
  white-space: pre-line;
}

.tabs-home .tab-link:focus-visible {
  outline: 2px solid rgba(255, 138, 61, 0.45);
  outline-offset: 1px;
}

.tab-link {
  display: inline-block;
  padding: 10px 18px;
  border-radius: 8px;
  border: 1px solid #e6cf9f;
  background: #fff9eb;
  color: #7a5200;
  text-decoration: none;
  font-weight: 700;
  font-size: 15px;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.tab-link:hover {
  background: #fff2d2;
  border-color: #d9b66f;
}

.tab-link.active {
  background: var(--home-tab-active-bg);
  color: var(--home-tab-active-text);
  transform: none;
}

.home-tabs-block .tabs-home {
  margin: 0;
}

.tabs-home .tab-link:hover {
  background: #ffd7b6;
  border-color: transparent;
  transform: translateY(-1px);
}

.tabs-home .tab-link.active,
.tabs-home .tab-link.active:hover {
  background: var(--home-tab-active-bg);
  color: var(--home-tab-active-text);
  border-top-left-radius: 15px;
  border-top-right-radius: 15px;
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  box-shadow: 0 6px 14px rgba(255, 160, 95, 0.24);
  transform: none;
}

.home-link {
  margin-left: auto;
}

.tab-tip {
  margin: 0 0 12px;
  font-size: 13px;
  color: #7a6b4f;
}

.topic-overview {
  margin-bottom: 12px;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid #f1ddb0;
  background: rgba(255, 248, 230, 0.76);
}

.topic-overview h2 {
  margin: 0 0 6px;
  font-size: 20px;
}

.topic-overview p {
  margin: 0;
  color: #6b5b3f;
}

.topic-banner {
  margin-bottom: 10px;
  padding: 24px;
  border-radius: 16px;
  border: 1px solid #f0d8a3;
  background: #fff7e5;
}

.banner-split {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(220px, 0.7fr);
  gap: 18px;
  align-items: stretch;
}

.banner-kicker {
  margin: 0 0 6px;
  color: #8f6a18;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.8px;
}

.topic-banner h2 {
  margin: 0 0 8px;
  font-size: clamp(24px, 3vw, 32px);
  color: #4a3200;
}

.banner-desc {
  margin: 0;
  max-width: 760px;
  color: #6c5330;
}

.banner-points {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.banner-points span {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid #e8cf99;
  color: #7a5612;
  font-size: 13px;
  font-weight: 600;
}

.banner-visual {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  min-height: 190px;
  border: 1px solid #efd9ae;
  background: #fff3d8;
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
}

.banner-visual p {
  margin: 0;
  padding: 16px;
  font-size: 18px;
  letter-spacing: 1.4px;
  font-weight: 800;
  color: rgba(98, 63, 4, 0.72);
}

.visual-dot {
  position: absolute;
  width: 92px;
  height: 92px;
  right: 16px;
  top: 16px;
  border-radius: 50%;
  background: #f8c24e;
}

.section.alt {
  background: transparent;
  border-top: 0;
  border-bottom: 0;
}

h2 {
  margin: 0 0 14px;
  font-size: 24px;
}

.grid {
  display: grid;
  gap: 14px;
}

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

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

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

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

.card {
  background: rgba(255, 245, 228, 0.58);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px;
}

.card h3 {
  margin: 0 0 8px;
  font-size: 18px;
}

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

.meta {
  font-size: 12px;
  color: #374151;
  margin-bottom: 8px;
}

.topic {
  background: rgba(255, 245, 228, 0.58);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px;
}

.topic ul {
  margin: 10px 0 16px;
  padding-left: 18px;
}

.faq {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px;
}

.faq p {
  margin: 0 0 12px;
  color: #374151;
}

.faq p:last-child {
  margin-bottom: 0;
}

.site-footer {
  padding: 24px 0 30px;
  color: var(--muted);
  font-size: 14px;
}

.beian-link {
  margin-left: 10px;
  color: #8b6b2c;
  text-decoration: none;
}

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

@media (max-width: 980px) {
  .grid-5,
  .grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

@media (max-width: 640px) {
  .hero {
    padding-top: 72px;
    padding-bottom: 48px;
  }

  .grid-5,
  .grid-4,
  .grid-3,
  .grid-2 {
    grid-template-columns: 1fr;
  }

  h2 {
    font-size: 21px;
  }

  .topic-banner {
    padding: 18px;
  }

  .banner-split {
    grid-template-columns: 1fr;
  }

  .banner-visual {
    min-height: 150px;
  }

  .home-link {
    margin-left: 0;
  }

  .tabs-home .tab-link {
    flex: 0 0 auto;
    min-width: 84px;
    font-size: 13px;
    padding: 9px 14px;
    white-space: nowrap;
  }

  .tabs-home {
    overflow-x: auto;
    gap: 8px;
    scrollbar-width: none;
  }

  .tabs-home::-webkit-scrollbar {
    display: none;
  }

  .tabs-home .tab-link.active,
  .tabs-home .tab-link.active:hover {
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
  }
}
