:root {
  --font-family-base: AlibabaPuHuiTi-2-55-Regular, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --color-accent: #fdd000;
  --color-accent-dark: #424242;
  --color-accent-soft: #fafafa;
  --color-ink: #424242;
  --color-muted: rgba(66, 66, 66, 0.6);
  --color-line: #e5e5e5;
  --color-panel: #fafafa;
  --color-white: #fff;
  --color-footer: #424242;
  --shadow-card: 0 4px 20px rgba(66, 66, 66, 0.08);
  --radius-large: 16px;
  --radius-medium: 10px;
  --site-width: 1200px;
  --article-width: 760px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  color: var(--color-ink);
  background: var(--color-white);
  font-family: var(--font-family-base);
  font-size: 16px;
  line-height: 1.72;
  -webkit-font-smoothing: antialiased;
}

body.nav-open {
  overflow: hidden;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

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

button,
summary {
  font: inherit;
}

button,
a,
summary {
  -webkit-tap-highlight-color: transparent;
}

:focus-visible {
  outline: 3px solid rgba(66, 66, 66, 0.24);
  outline-offset: 3px;
}

.site-container {
  width: min(calc(100% - 40px), var(--site-width));
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 10px;
  left: 12px;
  padding: 9px 14px;
  border-radius: 8px;
  color: var(--color-white);
  background: var(--color-accent-dark);
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header__inner {
  display: flex;
  width: min(calc(100% - 32px), 1280px);
  min-height: 72px;
  align-items: center;
  justify-content: space-between;
  margin-inline: auto;
  gap: 40px;
}

.site-header {
  position: sticky;
  z-index: 50;
  top: 0;
  border-bottom: 1px solid #eee;
  background: #fff;
}

.brand-logo {
  display: block;
  width: 117px;
  height: 38px;
}

.primary-navigation {
  display: flex;
  align-items: stretch;
  align-self: stretch;
  gap: 28px;
}

.primary-navigation a {
  position: relative;
  display: flex;
  align-items: center;
  color: var(--color-ink);
  font-size: 16px;
  text-decoration: none;
}

.primary-navigation a:hover,
.primary-navigation a.is-current {
  color: var(--color-ink);
}

.primary-navigation a.is-current::after {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 2px;
  background: var(--color-accent);
  content: "";
}

.menu-toggle {
  display: none;
  align-items: center;
  gap: 7px;
  border: 0;
  color: var(--color-ink);
  background: transparent;
  cursor: pointer;
}

.menu-toggle svg,
.back-to-top svg {
  width: 23px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.guide-hero {
  border-bottom: 1px solid #eee;
  background: #fff;
}

.guide-hero__inner {
  padding-block: 78px 70px;
  text-align: center;
}

.guide-hero h1 {
  margin: 0;
  font-family: AlibabaPuHuiTi-2-65-Medium, var(--font-family-base);
  font-size: clamp(38px, 5vw, 56px);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.18;
}

.guide-hero p {
  max-width: 750px;
  margin: 18px auto 0;
  color: var(--color-muted);
  font-size: 17px;
  line-height: 1.75;
}

.guide-hero__count {
  display: inline-flex;
  margin-top: 26px;
  padding: 8px 18px;
  border: 0;
  border-radius: 10px;
  color: var(--color-ink);
  background: var(--color-accent);
  font-weight: 600;
}

.section-block {
  padding-block: 56px 20px;
}

.section-block--last {
  padding-bottom: 90px;
}

.section-heading {
  margin-bottom: 24px;
}

.section-heading--row {
  display: flex;
  justify-content: space-between;
  gap: 20px;
}

.section-heading h2 {
  margin: 0;
  font-family: AlibabaPuHuiTi-2-65-Medium, var(--font-family-base);
  font-size: 30px;
  font-weight: 600;
  line-height: 1.35;
}

.section-heading p {
  margin: 7px 0 0;
  color: var(--color-muted);
}

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

.category-card {
  position: relative;
  min-height: 250px;
  padding: 28px;
  overflow: hidden;
  border: 1px solid #f0f0f0;
  border-radius: var(--radius-large);
  background: var(--color-white);
  transition: background-color 200ms ease, box-shadow 200ms ease, transform 200ms ease;
}

.category-card:hover {
  border-color: #e5e5e5;
  box-shadow: var(--shadow-card);
  transform: translateY(-2px);
}

.category-card__number {
  margin-bottom: 28px;
  color: var(--color-muted);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.08em;
}

.category-card h3 {
  margin: 0;
  font-family: AlibabaPuHuiTi-2-65-Medium, var(--font-family-base);
  font-size: 22px;
  line-height: 1.4;
}

.category-card h3 a {
  text-decoration: none;
}

.category-card h3 a::after {
  position: absolute;
  inset: 0;
  content: "";
}

.category-card p {
  min-height: 56px;
  margin: 10px 0 20px;
  color: var(--color-muted);
  font-size: 14px;
  line-height: 1.75;
}

.text-link {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--color-accent);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

.text-link::after {
  position: absolute;
  right: -10px;
  left: -10px;
  bottom: -6px;
  height: 4px;
  border-radius: 999px;
  background: currentColor;
  content: "";
  opacity: 0.28;
}

.inline-icon {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.6;
  transition: transform 160ms ease;
}

.text-link:hover .inline-icon,
.article-card__meta a:hover .inline-icon {
  transform: translateX(3px);
}

.recent-list {
  border-top: 1px solid var(--color-line);
}

.recent-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 175px;
  gap: 40px;
  padding-block: 25px;
  border-bottom: 1px solid var(--color-line);
}

.recent-row > div:first-child > a {
  font-size: 18px;
  font-weight: 650;
  line-height: 1.45;
  text-decoration: none;
}

.recent-row > div:first-child > a:hover {
  color: var(--color-accent);
}

.recent-row p {
  display: -webkit-box;
  margin: 8px 0 0;
  overflow: hidden;
  color: var(--color-muted);
  font-size: 14px;
  line-height: 1.7;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.recent-row__meta {
  display: flex;
  align-items: flex-end;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  color: var(--color-muted);
  font-size: 13px;
  text-align: right;
}

.recent-row__meta a {
  color: var(--color-accent);
  text-decoration: none;
}

.page-main {
  min-height: 70vh;
  padding-bottom: 90px;
}

.breadcrumb {
  padding-block: 24px 20px;
  color: var(--color-muted);
  font-size: 13px;
}

.breadcrumb ol {
  display: flex;
  align-items: center;
  gap: 3px;
  margin: 0;
  padding: 0;
  overflow: hidden;
  list-style: none;
  white-space: nowrap;
}

.breadcrumb li {
  display: flex;
  min-width: 0;
  align-items: center;
}

.breadcrumb a {
  color: #5e5752;
  text-decoration: none;
}

.breadcrumb a:hover {
  color: var(--color-accent);
}

.breadcrumb span {
  overflow: hidden;
  text-overflow: ellipsis;
}

.breadcrumb__icon {
  width: 16px;
  height: 16px;
  margin-inline: 3px;
  flex: 0 0 auto;
  fill: none;
  stroke: #aaa19a;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.5;
}

.category-header {
  max-width: 830px;
  padding-block: 34px 50px;
}

.category-header h1 {
  margin: 0;
  font-family: Georgia, "Songti SC", "SimSun", serif;
  font-size: clamp(36px, 5vw, 52px);
  font-weight: 600;
  line-height: 1.25;
}

.category-header p {
  margin: 17px 0 0;
  color: var(--color-muted);
  font-size: 17px;
  line-height: 1.8;
}

.category-header__count {
  margin-top: 18px;
  color: #8c827b;
  font-size: 13px;
}

.listing-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 250px;
  gap: 68px;
  align-items: start;
}

.article-list {
  border-top: 1px solid var(--color-line);
}

.article-card {
  padding-block: 30px;
  border-bottom: 1px solid var(--color-line);
}

.article-card h2 {
  margin: 0;
  font-size: 22px;
  line-height: 1.45;
}

.article-card h2 a {
  text-decoration: none;
}

.article-card h2 a:hover {
  color: var(--color-accent);
}

.article-card p {
  margin: 11px 0 18px;
  color: var(--color-muted);
  font-size: 15px;
}

.article-card__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: #8a817b;
  font-size: 13px;
}

.article-card__meta a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--color-accent);
  font-weight: 600;
  text-decoration: none;
}

.listing-sidebar,
.article-sidebar {
  position: sticky;
  top: 100px;
}

.listing-sidebar {
  padding-top: 5px;
}

.listing-sidebar h2,
.sidebar-section h2 {
  margin: 0 0 13px;
  color: #5d5550;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.category-links,
.sidebar-links {
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--color-line);
  list-style: none;
}

.category-links li,
.sidebar-links li {
  border-bottom: 1px solid var(--color-line);
}

.category-links a,
.sidebar-links--compact a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-block: 13px;
  color: #49433f;
  font-size: 14px;
  text-decoration: none;
}

.category-links a:hover,
.sidebar-links a:hover {
  color: var(--color-accent);
}

.category-links small,
.sidebar-links small {
  color: #9a918b;
  font-size: 12px;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, var(--article-width)) 260px;
  gap: 74px;
  align-items: start;
  justify-content: space-between;
}

.article-page {
  min-width: 0;
}

.article-header {
  padding-block: 30px 38px;
  border-bottom: 1px solid var(--color-line);
}

.article-header h1 {
  margin: 0;
  font-family: AlibabaPuHuiTi-2-65-Medium, var(--font-family-base);
  font-size: clamp(34px, 4.6vw, 48px);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.35;
}

.article-dates {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin-top: 22px;
  color: var(--color-muted);
  font-size: 13px;
}

.answer-summary {
  margin-block: 34px;
  padding: 24px 26px;
  border: 1px solid #e5e5e5;
  border-left: 4px solid var(--color-accent);
  background: #fafafa;
}

.answer-summary h2 {
  margin: 0 0 8px;
  color: var(--color-ink);
  font-size: 15px;
  letter-spacing: 0.04em;
}

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

.article-toc {
  margin: 30px 0 40px;
  padding: 0 22px;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-medium);
  background: #fff;
}

.article-toc summary {
  padding-block: 16px;
  color: #443e3a;
  font-weight: 700;
  cursor: pointer;
}

.article-toc ol {
  margin: -2px 0 20px;
  padding: 0;
  columns: 2;
  column-gap: 36px;
  list-style: none;
}

.article-toc li {
  margin: 7px 0;
  break-inside: avoid;
  color: var(--color-muted);
  font-size: 14px;
}

.article-toc .toc-level-3 {
  margin-left: 13px;
  font-size: 13px;
}

.article-toc a {
  text-decoration: none;
}

.article-toc a:hover,
.article-toc a[aria-current="true"] {
  color: var(--color-accent);
}

.article-content {
  color: #302b28;
  font-size: 17px;
  line-height: 1.92;
}

.article-content h2,
.article-content h3 {
  scroll-margin-top: 98px;
  color: var(--color-ink);
  font-weight: 700;
}

.article-content h2 {
  margin: 2.25em 0 0.72em;
  padding-top: 0.2em;
  font-family: Georgia, "Songti SC", "SimSun", serif;
  font-size: 29px;
  line-height: 1.45;
}

.article-content h3 {
  margin: 1.9em 0 0.65em;
  font-size: 21px;
  line-height: 1.5;
}

.article-content > h2:first-child,
.article-content > h3:first-child {
  margin-top: 0;
}

.article-content p {
  margin: 0 0 1.35em;
}

.article-content figure {
  margin: 34px 0 38px;
}

.article-content figure img {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: 760px;
  margin-inline: auto;
  border: 1px solid var(--color-line);
  border-radius: 10px;
}

.article-content figcaption {
  margin-top: 10px;
  color: var(--color-muted);
  font-size: 13px;
  line-height: 1.7;
  text-align: center;
}

.article-content strong {
  color: #211d1a;
  font-weight: 700;
}

.article-content code {
  padding: 0.12em 0.35em;
  border-radius: 4px;
  background: #f1ece8;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.88em;
}

.article-content ul {
  margin: 0 0 1.5em;
  padding-left: 1.4em;
}

.article-content li {
  margin: 0.45em 0;
  padding-left: 0.22em;
}

.article-content li::marker {
  color: var(--color-accent);
}

.article-content hr {
  margin-block: 42px;
  border: 0;
  border-top: 1px solid var(--color-line);
}

.article-figure {
  margin: 34px 0 38px;
}

.article-figure img {
  width: auto;
  max-height: 760px;
  margin-inline: auto;
  border: 1px solid #e6e0dc;
  border-radius: 10px;
  background: #f6f2ef;
  box-shadow: 0 8px 24px rgba(45, 36, 30, 0.07);
}

.article-figure figcaption {
  margin-top: 10px;
  color: #837a74;
  font-size: 13px;
  line-height: 1.6;
  text-align: center;
}

.table-scroll {
  max-width: 100%;
  margin: 28px 0 34px;
  overflow-x: auto;
  border: 1px solid var(--color-line);
  border-radius: 10px;
}

.article-content table {
  width: 100%;
  min-width: 540px;
  border-collapse: collapse;
  font-size: 15px;
  line-height: 1.65;
}

.article-content th,
.article-content td {
  padding: 13px 15px;
  border-right: 1px solid var(--color-line);
  border-bottom: 1px solid var(--color-line);
  text-align: left;
  vertical-align: top;
}

.article-content th {
  background: var(--color-panel);
  font-weight: 700;
}

.article-content tr:last-child td {
  border-bottom: 0;
}

.article-content th:last-child,
.article-content td:last-child {
  border-right: 0;
}

.faq-section {
  margin-top: 58px;
  padding-top: 42px;
  border-top: 1px solid var(--color-line);
  scroll-margin-top: 98px;
}

.faq-section > h2 {
  margin: 0 0 22px;
  font-family: Georgia, "Songti SC", "SimSun", serif;
  font-size: 29px;
  line-height: 1.4;
}

.faq-list {
  border-top: 1px solid var(--color-line);
}

.faq-item {
  border-bottom: 1px solid var(--color-line);
}

.faq-item summary {
  position: relative;
  padding: 19px 38px 19px 0;
  font-weight: 650;
  line-height: 1.55;
  cursor: pointer;
  list-style: none;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  position: absolute;
  top: 20px;
  right: 4px;
  color: var(--color-accent);
  content: "+";
  font-size: 23px;
  font-weight: 400;
  line-height: 1;
}

.faq-item[open] summary::after {
  content: "−";
}

.faq-item p {
  margin: -4px 0 20px;
  color: var(--color-muted);
}

.article-sidebar {
  padding-top: 34px;
}

.sidebar-section + .sidebar-section {
  margin-top: 36px;
}

.sidebar-links:not(.sidebar-links--compact) a {
  display: block;
  padding-block: 12px;
  color: #49433f;
  font-size: 14px;
  line-height: 1.55;
  text-decoration: none;
}

.sidebar-more {
  margin-top: 15px;
  line-height: 1.55;
}

.back-to-top {
  position: fixed;
  z-index: 25;
  right: 24px;
  bottom: 24px;
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid #e5e5e5;
  border-radius: 50%;
  color: var(--color-ink);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 6px 20px rgba(66, 66, 66, 0.1);
  cursor: pointer;
}

.back-to-top[hidden] {
  display: none;
}

.site-footer {
  color: var(--color-ink);
  background: #fafafa;
}

.site-footer__inner {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 60px;
  padding-block: 44px 34px;
}

.site-footer__brand {
  color: var(--color-ink);
  font-family: AlibabaPuHuiTi-2-65-Medium, var(--font-family-base);
  font-size: 19px;
  font-weight: 600;
  text-decoration: none;
}

.site-footer__inner p {
  margin: 10px 0 0;
  color: var(--color-muted);
  font-size: 13px;
}

.footer-navigation {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px 24px;
  align-content: start;
}

.footer-navigation a,
.site-footer__bottom a {
  color: var(--color-ink);
  font-size: 13px;
  text-decoration: none;
}

.footer-navigation a:hover,
.site-footer__bottom a:hover {
  color: var(--color-ink);
  text-decoration: underline;
}

.site-footer__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 18px;
  border-top: 1px solid #e5e5e5;
  color: var(--color-muted);
  font-size: 12px;
}

.empty-page {
  min-height: 64vh;
  padding-block: 110px;
  text-align: center;
}

.empty-page__code {
  margin: 0;
  color: #c6a69c;
  font-family: Georgia, serif;
  font-size: 18px;
  letter-spacing: 0.15em;
}

.empty-page h1 {
  margin: 10px 0 0;
  font-family: Georgia, "Songti SC", "SimSun", serif;
  font-size: 42px;
}

.empty-page > p:not(.empty-page__code) {
  color: var(--color-muted);
}

.primary-link {
  display: inline-flex;
  margin-top: 18px;
  padding: 10px 20px;
  border-radius: 999px;
  color: #fff;
  background: var(--color-accent);
  font-weight: 650;
  text-decoration: none;
}

.primary-link:hover {
  background: var(--color-accent-dark);
}

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

  .listing-layout,
  .detail-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 58px;
  }

  .listing-sidebar,
  .article-sidebar {
    position: static;
    padding-top: 0;
  }

  .listing-sidebar,
  .article-sidebar {
    padding: 26px;
    border: 1px solid var(--color-line);
    border-radius: var(--radius-medium);
    background: var(--color-panel);
  }

  .detail-layout {
    display: flex;
    flex-direction: column;
  }

  .article-page,
  .article-sidebar {
    width: 100%;
  }

  .site-footer__inner {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

@media (max-width: 680px) {
  .site-container {
    width: min(calc(100% - 32px), var(--site-width));
  }

  .site-header__inner {
    min-height: 62px;
  }

  .brand {
    font-size: 24px;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .primary-navigation {
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    display: none;
    height: calc(100vh - 62px);
    height: calc(100dvh - 62px);
    align-items: stretch;
    flex-direction: column;
    gap: 0;
    padding: 18px 24px;
    overflow-y: auto;
    background: rgba(255, 255, 255, 0.99);
  }

  .primary-navigation.is-open {
    display: flex;
  }

  .primary-navigation a {
    flex: 0 0 auto;
    min-height: 56px;
    border-bottom: 1px solid var(--color-line);
    font-size: 16px;
  }

  .primary-navigation a.is-current::after {
    display: none;
  }

  .guide-hero__inner {
    padding-block: 58px 56px;
  }

  .guide-hero h1 {
    font-size: 42px;
    letter-spacing: -0.04em;
  }

  .guide-hero p {
    margin-top: 18px;
    font-size: 16px;
  }

  .section-block {
    padding-top: 52px;
  }

  .section-block--last {
    padding-bottom: 64px;
  }

  .section-heading h2 {
    font-size: 27px;
  }

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

  .category-card {
    min-height: 230px;
    padding: 25px;
  }

  .category-card__number {
    margin-bottom: 25px;
  }

  .recent-row {
    grid-template-columns: 1fr;
    gap: 13px;
  }

  .recent-row__meta {
    align-items: center;
    flex-direction: row;
    justify-content: flex-start;
    text-align: left;
  }

  .breadcrumb {
    padding-block: 17px 13px;
  }

  .category-header {
    padding-block: 25px 36px;
  }

  .category-header h1 {
    font-size: 36px;
  }

  .category-header p {
    font-size: 16px;
  }

  .page-main {
    padding-bottom: 64px;
  }

  .article-card {
    padding-block: 25px;
  }

  .article-card h2 {
    font-size: 20px;
  }

  .article-card__meta {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .article-header {
    padding-block: 24px 30px;
  }

  .article-header h1 {
    font-size: 32px;
    line-height: 1.38;
  }

  .answer-summary {
    margin-block: 26px;
    padding: 20px;
  }

  .article-toc {
    margin-block: 25px 34px;
  }

  .article-toc ol {
    columns: 1;
  }

  .article-content {
    font-size: 16px;
    line-height: 1.9;
  }

  .article-content h2,
  .faq-section > h2 {
    font-size: 25px;
  }

  .article-content h3 {
    font-size: 20px;
  }

  .article-figure {
    margin-inline: -4px;
  }

  .article-figure img {
    border-radius: 7px;
  }

  .faq-section {
    margin-top: 48px;
  }

  .back-to-top {
    right: 16px;
    bottom: 16px;
  }

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

  .site-footer__bottom {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
