:root {
  --paper: #f7f6ef;
  --surface: #ffffff;
  --surface-soft: #ecefe6;
  --ink: #2c3834;
  --muted: #6f7873;
  --line: #dcded4;
  --line-strong: #c6cbbb;
  --green: #285a4d;
  --green-dark: #163a32;
  --sage: #839673;
  --ochre: #b8832d;
  --white: #ffffff;
  --shadow: 0 16px 40px rgba(23, 35, 31, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family:
    "Inter", "PingFang SC", "Microsoft YaHei", "Noto Sans SC", Arial,
    sans-serif;
  line-height: 1.58;
}

img {
  display: block;
  max-width: 100%;
}

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  min-height: 68px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 0 5vw;
  border-bottom: 1px solid var(--line);
  background: rgba(247, 246, 239, 0.95);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  min-width: 220px;
}

.brand-mark {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 50%;
  color: var(--white);
  background: var(--green-dark);
  font-weight: 800;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.1;
}

.brand small {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0;
}

.primary-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  color: var(--muted);
  font-size: 13px;
}

.home-nav-menu {
  display: flex;
  align-items: stretch;
  gap: 22px;
}

.home-nav-group {
  position: relative;
  display: flex;
  align-items: center;
}

.home-nav-group > button,
.about-link {
  border: 0;
  padding: 0;
  color: var(--muted);
  background: transparent;
  font-size: 13px;
  cursor: pointer;
}

.home-nav-group > button::after {
  content: " ▼";
  font-size: 10px;
}

.home-nav-dropdown {
  position: absolute;
  top: calc(100% + 18px);
  left: -12px;
  z-index: 40;
  display: none;
  width: 210px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.home-nav-group:hover .home-nav-dropdown,
.home-nav-group:focus-within .home-nav-dropdown {
  display: grid;
}

.home-nav-dropdown a {
  overflow: hidden;
  border-radius: 4px;
  padding: 8px 9px;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.primary-nav a,
.home-nav-group > button {
  transition: color 160ms ease;
}

.primary-nav a:hover,
.home-nav-group > button:hover,
.home-nav-dropdown a:hover {
  color: var(--green-dark);
}

.home-nav-dropdown a:hover {
  background: var(--surface-soft);
}

.header-search {
  display: flex;
  width: min(330px, 28vw);
  min-height: 40px;
  align-items: center;
  gap: 9px;
  margin-left: auto;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface);
}

.header-search svg {
  width: 17px;
  height: 17px;
  color: var(--green);
}

.header-search input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
  font-size: 14px;
}

.about-link {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  justify-content: center;
  border: 0;
  padding: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 400;
}

.icon-button {
  display: none;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--ink);
  background: var(--surface);
  cursor: pointer;
}

svg {
  width: 18px;
  height: 18px;
  stroke-width: 2;
}

.hot-section,
.video-section,
.guide-section,
.all-section {
  padding: 38px 5vw;
}

.hot-section {
  padding-top: 28px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--ochre);
  font-size: 12px;
  font-weight: 750;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3,
h4,
strong {
  color: #26322e;
}

h1 {
  max-width: 820px;
  margin-bottom: 12px;
  font-size: clamp(32px, 4.2vw, 52px);
  line-height: 1.08;
  letter-spacing: 0;
  font-weight: 700;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(22px, 2.2vw, 30px);
  line-height: 1.16;
  letter-spacing: 0;
  font-weight: 700;
}

h3 {
  margin-bottom: 7px;
  font-size: 16px;
  line-height: 1.34;
  letter-spacing: 0;
  font-weight: 650;
}

.filter-tab {
  min-height: 34px;
  flex: 0 0 auto;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 6px 12px;
  color: var(--green-dark);
  background: var(--surface);
  font-size: 13px;
  font-weight: 650;
}

.section-heading {
  display: flex;
  max-width: 1180px;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin: 0 auto 18px;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--green-dark);
  font-size: 14px;
  font-weight: 700;
}

.hot-header {
  display: flex;
  max-width: 1180px;
  min-height: 46px;
  align-items: center;
  margin: 0 auto;
  padding: 0 24px;
  color: var(--white);
  background: #161713;
}

.hot-header h2 {
  margin: 0;
  color: var(--white);
  font-size: 17px;
  font-weight: 700;
}

.hot-feature-grid {
  display: grid;
  max-width: 1180px;
  grid-template-columns: repeat(3, minmax(0, 1fr)) 260px;
  gap: 0;
  margin: 0 auto;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.hot-feature {
  overflow: hidden;
  min-height: 290px;
  padding: 16px;
  border-right: 1px solid var(--line);
  background: var(--surface);
  cursor: pointer;
  transition: background 160ms ease;
}

.hot-feature img {
  width: 100%;
  aspect-ratio: 1.72;
  margin-bottom: 11px;
  border-radius: 6px;
  object-fit: cover;
}

.hot-feature h3 {
  font-size: 16px;
}

.hot-feature:hover,
.video-card:hover,
.category-article:hover,
.masonry-card:hover {
  background: #fafbf6;
}

.hot-side {
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 14px;
  background: #f0eee7;
}

.hot-side p {
  margin: 0 0 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.hot-side-card {
  display: grid;
  grid-template-columns: 1fr 16px;
  gap: 10px;
  align-items: center;
  min-height: 54px;
  padding: 12px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f9f7ef;
}

.hot-side-card svg {
  width: 16px;
  height: 16px;
  color: var(--muted);
}

.hot-side-card strong {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.25;
}

.hot-side-card.tint-green {
  background: #edf7ef;
}

.hot-side-card.tint-rose {
  background: #f8edf0;
}

.hot-side-card.tint-blue {
  background: #edf5f4;
}

.masonry-card p,
.video-card p {
  color: var(--muted);
}

.tag {
  display: inline-flex;
  width: fit-content;
  margin-bottom: 9px;
  color: var(--green);
  font-size: 11px;
  font-weight: 750;
}

.meta {
  color: var(--muted);
  font-size: 12px;
}

.video-section,
.all-section {
  background: var(--surface);
}

.video-row {
  display: grid;
  max-width: 1180px;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin: 0 auto;
}

.video-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: var(--surface);
  cursor: pointer;
  transition: background 160ms ease;
}

.video-thumb {
  position: relative;
  overflow: hidden;
  margin-bottom: 12px;
  border-radius: 6px;
}

.video-thumb img {
  width: 100%;
  aspect-ratio: 1.55;
  object-fit: cover;
}

.video-thumb span {
  position: absolute;
  right: 10px;
  bottom: 10px;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  color: var(--green-dark);
  background: rgba(255, 255, 255, 0.92);
}

.video-card h3 {
  font-size: 15px;
}

.video-card p {
  margin-bottom: 0;
  font-size: 13px;
}

.guide-section {
  background: var(--surface-soft);
}

.category-showcases {
  max-width: 1180px;
  margin: 0 auto;
}

.category-showcase {
  margin-bottom: 28px;
  border-bottom: 1px solid var(--line);
}

.category-showcase:last-child {
  margin-bottom: 0;
}

.category-header {
  display: flex;
  align-items: center;
  min-height: 48px;
  gap: 10px;
  padding: 0 18px;
  color: var(--white);
  background: #161713;
}

.category-header h3 {
  margin: 0;
  color: var(--white);
  font-size: 17px;
  font-weight: 700;
}

.category-header span {
  color: #b9c3b5;
  font-size: 14px;
}

.category-header span::before {
  content: "|";
  margin-right: 10px;
  color: var(--sage);
}

.category-header a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-left: auto;
  color: var(--white);
  font-size: 13px;
  font-weight: 700;
}

.category-header a svg {
  width: 15px;
  height: 15px;
}

.category-articles {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-right: 1px solid var(--line);
  border-left: 1px solid var(--line);
  background: var(--surface);
}

.category-article {
  min-height: 132px;
  padding: 16px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  cursor: pointer;
  transition: background 160ms ease;
}

.category-article:nth-child(4n) {
  border-right: 0;
}

.category-article.with-image {
  min-height: 314px;
}

.category-article img {
  width: 100%;
  aspect-ratio: 1.55;
  margin-bottom: 12px;
  border-radius: 6px;
  object-fit: cover;
}

.category-article h4 {
  margin: 0 0 7px;
  font-size: 15px;
  line-height: 1.36;
  letter-spacing: 0;
  font-weight: 650;
}

.category-article:not(.with-image) h4 {
  font-size: 15px;
  line-height: 1.34;
}

.category-article .tag {
  margin-bottom: 8px;
}

.all-heading {
  align-items: start;
}

.filter-tabs {
  display: flex;
  max-width: 640px;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.filter-tab {
  cursor: pointer;
}

.filter-tab.active {
  border-color: var(--green-dark);
  color: var(--white);
  background: var(--green-dark);
}

.masonry-grid {
  max-width: 1180px;
  columns: 4 240px;
  column-gap: 14px;
  margin: 0 auto;
}

.masonry-card {
  display: inline-block;
  width: 100%;
  overflow: hidden;
  margin: 0 0 14px;
  break-inside: avoid;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 0 16px;
  background: var(--surface);
  cursor: pointer;
  transition: background 160ms ease;
}

.masonry-card[hidden],
.article-item[hidden] {
  display: none;
}

.masonry-card img {
  width: 100%;
  aspect-ratio: 1.38;
  object-fit: cover;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.masonry-card.compact img {
  aspect-ratio: 1.8;
}

.masonry-card .tag,
.masonry-card h3,
.masonry-card p,
.masonry-card .meta {
  margin-right: 16px;
  margin-left: 16px;
}

.masonry-card p {
  margin-bottom: 12px;
  font-size: 13px;
}

.empty-state {
  max-width: 1180px;
  margin: 18px auto 0;
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  padding: 24px;
  color: var(--muted);
  text-align: center;
}

.site-footer {
  display: grid;
  grid-template-columns: minmax(260px, 1.4fr) repeat(3, minmax(150px, 0.7fr));
  gap: 30px;
  width: 100%;
  padding: 38px max(30px, calc((100vw - 1320px) / 2 + 30px)) 26px;
  border-top: 1px solid var(--line);
  color: #c5cbc7;
  background: #101613;
}

.site-footer strong {
  display: block;
  margin-bottom: 12px;
  color: #fff;
  font-size: 15px;
}

.footer-brand strong {
  font-size: 20px;
}

.footer-brand p {
  max-width: 390px;
  margin: 0;
  color: #aab2ad;
  font-size: 14px;
  line-height: 1.7;
}

.site-footer nav,
.footer-contact {
  display: grid;
  align-content: start;
  gap: 9px;
}

.site-footer nav a,
.footer-contact a,
.footer-contact span {
  color: #aab2ad;
  font-size: 13px;
}

.site-footer a:hover {
  color: #fff;
}

.footer-legal {
  display: flex;
  grid-column: 1 / -1;
  justify-content: space-between;
  gap: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 18px;
  color: #8b958f;
  font-size: 12px;
}

.footer-legal > span:last-child {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px 18px;
}

@media (max-width: 980px) {
  .icon-button {
    display: grid;
  }

  .header-search {
    width: min(360px, 42vw);
    margin-left: auto;
  }

  .primary-nav {
    position: fixed;
    top: 68px;
    right: 16px;
    left: 16px;
    display: grid;
    gap: 0;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: var(--shadow);
    transform: translateY(-12px);
    opacity: 0;
    pointer-events: none;
    transition:
      opacity 160ms ease,
      transform 160ms ease;
  }

  .primary-nav.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .primary-nav a {
    padding: 14px;
    border-bottom: 1px solid var(--line);
  }

  .primary-nav a:last-child {
    border-bottom: 0;
  }

  .consult-link {
    justify-content: flex-start;
    border: 0;
    border-radius: 0;
  }

  .home-nav-menu {
    display: grid;
    gap: 0;
  }

  .home-nav-group {
    display: grid;
    border-bottom: 1px solid var(--line);
  }

  .home-nav-group > button {
    min-height: 42px;
    padding: 0 14px;
    text-align: left;
  }

  .home-nav-dropdown {
    position: static;
    display: grid;
    width: auto;
    border: 0;
    border-top: 1px solid var(--line);
    border-radius: 0;
    padding: 4px 0 8px 14px;
    background: #f8f8f4;
    box-shadow: none;
  }

  .home-nav-dropdown a {
    padding: 8px 14px;
    border-bottom: 0;
  }

  .about-link {
    justify-content: flex-start;
    border: 0;
    border-radius: 0;
    padding: 14px;
  }

  .site-footer {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding-right: 24px;
    padding-left: 24px;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }

  .hot-feature-grid {
    grid-template-columns: 1fr;
  }

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

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

  .category-article:nth-child(4n) {
    border-right: 1px solid var(--line);
  }

  .category-article:nth-child(2n) {
    border-right: 0;
  }

  .section-heading,
  .all-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .filter-tabs {
    max-width: 100%;
  }
}

@media (max-width: 680px) {
  .site-header {
    min-height: 108px;
    flex-wrap: wrap;
    gap: 8px 12px;
    padding: 8px 20px;
  }

  .brand {
    min-width: 0;
  }

  .brand small {
    display: none;
  }

  .header-search {
    order: 3;
    width: 100%;
    flex-basis: 100%;
    min-height: 38px;
    margin-left: 0;
  }

  .primary-nav {
    top: 108px;
  }

  .hot-section,
  .video-section,
  .guide-section,
  .all-section {
    padding: 30px 20px;
  }

  h1 {
    font-size: 30px;
  }

  h2 {
    font-size: 24px;
  }

  .hot-feature {
    min-height: 0;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .hot-side {
    border-top: 0;
  }

  .video-row,
  .category-articles {
    grid-template-columns: 1fr;
  }

  .category-header {
    align-items: flex-start;
    flex-direction: column;
    padding: 12px 16px;
  }

  .category-header a {
    margin-left: 0;
  }

  .category-header span::before {
    content: "";
    margin-right: 0;
  }

  .category-article,
  .category-article:nth-child(2n),
  .category-article:nth-child(4n) {
    border-right: 0;
  }

  .masonry-grid {
    columns: 1;
  }

  .site-footer {
    align-items: flex-start;
    grid-template-columns: 1fr;
    padding: 30px 20px 24px;
  }

  .footer-brand,
  .footer-legal {
    grid-column: auto;
  }

  .footer-legal {
    flex-direction: column;
  }

  .footer-legal > span:last-child {
    justify-content: flex-start;
  }
}
