:root {
  --ink: #182230;
  --muted: #667085;
  --line: #dbe3ec;
  --paper: #f7f9fc;
  --surface: #ffffff;
  --accent: #1f6feb;
  --accent-deep: #1457b8;
  --accent-soft: #eaf2ff;
  --shadow: 0 16px 36px rgba(24, 34, 48, 0.07);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Noto Sans SC", system-ui, sans-serif;
  line-height: 1.65;
}
a { color: inherit; text-decoration: none; }
a:focus-visible { outline: 3px solid rgba(31, 111, 235, 0.35); outline-offset: 4px; }
button, a { touch-action: manipulation; }
.site-shell { min-height: 100vh; display: flex; flex-direction: column; }
.container { width: min(1120px, calc(100% - 40px)); margin: 0 auto; }

.skip-link { position: absolute; top: 12px; left: 14px; z-index: 20; padding: 9px 13px; border-radius: 8px; color: #fff; background: var(--ink); font-size: 0.82rem; font-weight: 750; transform: translateY(-180%); transition: transform 160ms ease; }
.skip-link:focus { transform: translateY(0); }

.site-header { border-bottom: 1px solid var(--line); background: rgba(247, 249, 252, 0.94); backdrop-filter: blur(12px); }
.nav-wrap { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-size: 0.98rem; font-weight: 760; letter-spacing: -0.02em; white-space: nowrap; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; color: #fff; background: var(--ink); font-size: 0.72rem; letter-spacing: 0.04em; }
.nav-tools { display: flex; align-items: center; justify-content: flex-end; gap: 16px; min-width: 0; }
.site-nav { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px 18px; color: var(--muted); font-size: 0.86rem; }
.site-nav a { padding: 4px 0; transition: color 160ms ease; }
.site-nav a:hover { color: var(--accent); }
.language-toggle { display: inline-flex; align-items: center; min-height: 30px; padding: 0 10px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); background: rgba(255, 255, 255, 0.68); font: inherit; font-size: 0.76rem; font-weight: 760; letter-spacing: 0.02em; white-space: nowrap; cursor: pointer; transition: color 160ms ease, border-color 160ms ease, background 160ms ease; }
.language-toggle:hover { color: var(--accent); border-color: #b9c7d8; background: #fff; }
.language-toggle:focus-visible { outline: 3px solid rgba(31, 111, 235, 0.35); outline-offset: 3px; }
.language-toggle [data-language-option] { opacity: 0.55; }
html[data-site-language="en"] .language-toggle [data-language-option="en"], html[data-site-language="zh"] .language-toggle [data-language-option="zh"] { color: var(--ink); opacity: 1; }

.hero { padding: 96px 0 86px; background: linear-gradient(135deg, #edf4ff 0%, #f7f9fc 60%, #f7f9fc 100%); border-bottom: 1px solid var(--line); }
.hero-inner { max-width: 820px; }
.kicker { margin: 0 0 12px; color: var(--accent-deep); font-size: 0.72rem; font-weight: 800; letter-spacing: 0.14em; line-height: 1.4; }
.hero h1, .page-heading h1, .article-heading h1 { margin: 0; color: var(--ink); font-size: clamp(2.5rem, 7vw, 5.4rem); font-weight: 790; letter-spacing: -0.065em; line-height: 1.02; }
.hero-lede { max-width: 660px; margin: 24px 0 0; color: var(--muted); font-size: clamp(1.05rem, 2vw, 1.28rem); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 18px; border: 1px solid transparent; border-radius: 9px; font-size: 0.9rem; font-weight: 700; transition: transform 160ms ease, background 160ms ease, border-color 160ms ease; }
.button:hover { transform: translateY(-1px); }
.button--primary { color: #fff; background: var(--accent); }
.button--primary:hover { background: var(--accent-deep); }
.button--quiet { color: var(--ink); border-color: var(--line); background: rgba(255, 255, 255, 0.7); }
.button--quiet:hover { border-color: #b9c7d8; background: #fff; }
.button-arrow { margin-left: 7px; }

.section-block { padding: 72px 0 0; }
.section-block--recent { padding-bottom: 12px; }
.section-block--explore { padding-bottom: 80px; }
.section-block--compact { padding-top: 48px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 24px; }
.section-heading h2 { margin: 0; font-size: clamp(1.45rem, 3vw, 2rem); letter-spacing: -0.045em; line-height: 1.1; }
.section-note { max-width: 310px; margin: 0; color: var(--muted); font-size: 0.9rem; text-align: right; }
.text-link { color: var(--accent-deep); font-size: 0.88rem; font-weight: 750; }
.text-link:hover { color: var(--accent); }

.explore-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.explore-card { display: flex; flex-direction: column; min-height: 176px; padding: 22px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease; }
.explore-card:hover { transform: translateY(-3px); border-color: #b6c7dd; box-shadow: var(--shadow); }
.explore-card h3 { margin: 20px 0 7px; font-size: 1.03rem; letter-spacing: -0.025em; line-height: 1.25; }
.explore-card p { margin: 0; color: var(--muted); font-size: 0.84rem; line-height: 1.55; }

.card-grid, .category-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.category-card, .post-card { display: flex; flex-direction: column; min-height: 220px; padding: 24px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); box-shadow: 0 4px 14px rgba(24, 34, 48, 0.025); transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease; }
.category-card:hover, .post-card:hover { transform: translateY(-3px); border-color: #b6c7dd; box-shadow: var(--shadow); }
.category-card--active { border-color: #b7d0f5; background: linear-gradient(150deg, #fff 0%, #f1f6ff 100%); }
.card-index { color: var(--accent); font-size: 0.72rem; font-weight: 800; letter-spacing: 0.1em; }
.category-card h3, .post-card h3 { margin: 24px 0 8px; font-size: 1.08rem; letter-spacing: -0.025em; line-height: 1.25; }
.category-card p, .post-card p { margin: 0; color: var(--muted); font-size: 0.88rem; line-height: 1.6; }
.card-link { display: inline-flex; align-items: center; gap: 7px; margin-top: auto; padding-top: 20px; color: var(--accent-deep); font-size: 0.8rem; font-weight: 780; }
.card-arrow { transition: transform 160ms ease; }
.category-card:hover .card-arrow, .explore-card:hover .card-arrow, .post-card:hover .card-arrow { transform: translateX(3px); }
.category-card--small { min-height: 188px; }
.category-card--small h3 { margin-top: 17px; }

.post-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.post-card { min-height: 205px; }
.post-card-meta, .article-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; color: var(--muted); font-size: 0.76rem; }
.post-card-section { color: var(--accent-deep); font-weight: 700; }
.post-card h3 { margin-top: 20px; }
.post-card-title { color: var(--ink); }
.post-card-title:hover { color: var(--accent-deep); }
.post-card-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-top: auto; }
.post-card-actions .card-link { margin-top: 0; padding-top: 20px; }
.card-link--enhanced { color: var(--muted); }

.page-shell { flex: 1; padding-top: 72px; padding-bottom: 88px; }
.page-heading { max-width: 780px; }
.page-heading h1, .article-heading h1 { font-size: clamp(2.25rem, 6vw, 4.4rem); }
.page-lede { max-width: 700px; margin: 18px 0 0; color: var(--muted); font-size: 1.05rem; }
.page-intro { max-width: 800px; margin-top: 30px; }
.article { max-width: 780px; margin: 0 auto; }
.article-heading { padding-bottom: 32px; border-bottom: 1px solid var(--line); }
.article-heading h1 { margin-bottom: 16px; }
.article-meta { margin-top: 22px; }
.article-type { color: var(--accent-deep); font-weight: 700; }
.tag-list { display: flex; flex-wrap: wrap; gap: 7px; padding: 0; margin: 17px 0 0; list-style: none; }
.tag-list li { padding: 3px 9px; border-radius: 999px; color: var(--accent-deep); background: var(--accent-soft); font-size: 0.74rem; font-weight: 700; }
.article-details { display: grid; gap: 10px; margin: 28px 0 0; padding: 18px 20px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255, 255, 255, 0.62); }
.article-details div { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 16px; }
.article-details dt { color: var(--muted); font-size: 0.78rem; font-weight: 750; }
.article-details dd { margin: 0; color: var(--ink); font-size: 0.88rem; }
.enhanced-page-callout { margin-top: 28px; padding: 20px; border: 1px solid #b7d0f5; border-radius: 12px; background: linear-gradient(135deg, #f1f6ff, #fff); }
.enhanced-page-callout .kicker { margin-bottom: 10px; }
.article-resources { margin-top: 20px; }
.article-content { padding-top: 34px; }
.article-footer { margin-top: 44px; padding-top: 22px; border-top: 1px solid var(--line); }

.prose { color: #303b4b; }
.prose > :first-child { margin-top: 0; }
.prose h2, .prose h3 { color: var(--ink); letter-spacing: -0.035em; line-height: 1.2; }
.prose h2 { margin-top: 2.2em; font-size: 1.55rem; }
.prose h3 { margin-top: 1.8em; font-size: 1.18rem; }
.prose p, .prose ul, .prose ol, .prose blockquote, .prose pre { margin: 1.1em 0; }
.prose ul, .prose ol { padding-left: 1.35rem; }
.prose li + li { margin-top: 0.45rem; }
.prose strong { color: var(--ink); }
.prose code { padding: 0.16em 0.38em; border-radius: 5px; color: #18477e; background: #edf3fa; font-size: 0.9em; }
.prose pre { overflow-x: auto; padding: 16px 18px; border-radius: 10px; color: #e7effa; background: #172333; }
.prose pre code { padding: 0; color: inherit; background: transparent; }
.prose blockquote { padding: 4px 18px; border-left: 3px solid #a7c5ef; color: var(--muted); }
.prose a { color: var(--accent-deep); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.prose .button { color: #fff; text-decoration: none; }
.prose .button--quiet { color: var(--ink); }
.prose img { max-width: 100%; height: auto; border-radius: 10px; }

.site-footer { margin-top: auto; border-top: 1px solid var(--line); background: #fff; }
.footer-wrap { display: flex; justify-content: space-between; gap: 18px; padding: 22px 0; color: var(--muted); font-size: 0.76rem; }
.footer-wrap p { margin: 0; }

@media (max-width: 920px) {
  .explore-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 820px) {
  .nav-wrap { align-items: flex-start; flex-direction: column; padding-top: 17px; padding-bottom: 17px; }
  .nav-tools { width: 100%; justify-content: space-between; align-items: flex-start; gap: 12px 16px; }
  .site-nav { flex: 1 1 auto; justify-content: flex-start; gap: 4px 14px; }
  .hero { padding: 72px 0 66px; }
  .card-grid, .category-grid, .post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .container { width: min(100% - 28px, 1120px); }
  .hero { padding: 58px 0 54px; }
  .section-block { padding-top: 52px; }
  .section-heading { align-items: flex-start; flex-direction: column; gap: 12px; }
  .section-note { max-width: none; text-align: left; }
  .explore-grid, .card-grid, .category-grid, .post-list { grid-template-columns: 1fr; }
  .category-card, .post-card { min-height: 190px; }
  .article-details div { grid-template-columns: 1fr; gap: 2px; }
  .footer-wrap { align-items: flex-start; flex-direction: column; padding: 18px 0; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
