:root {
  --ink: #172033;
  --muted: #627087;
  --line: #e2e7f0;
  --surface: #ffffff;
  --soft: #f5f7fb;
  --soft-purple: #f2efff;
  --brand: #5636e8;
  --brand-dark: #3e24bd;
  --blue: #167fc4;
  --radius: 18px;
  --shadow: 0 16px 45px rgba(31, 35, 72, .09);
  --container: 1180px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--surface);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif;
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; }
a { color: var(--brand-dark); text-decoration-thickness: .08em; text-underline-offset: .18em; }
a:hover { color: var(--blue); }
button, input { font: inherit; }

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

.narrow { max-width: 820px; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  z-index: 100;
  left: 18px;
  top: 12px;
  transform: translateY(-160%);
  padding: 10px 16px;
  border-radius: 8px;
  color: #fff;
  background: var(--brand-dark);
}

.skip-link:focus { transform: none; }

.site-header {
  position: relative;
  z-index: 20;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, .97);
}

.top-contact-bar { color: #e9e6ff; background: #241a55; }
.top-contact-row { min-height: 36px; display: flex; align-items: center; justify-content: flex-end; }
.top-contact-row a { display: inline-flex; align-items: baseline; gap: 4px; color: #fff; font-size: 14px; text-decoration: none; }
.top-contact-row a:hover { color: #9fddff; }
.top-contact-row strong { font-size: 16px; letter-spacing: .02em; }

.header-row {
  min-height: 86px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.brand { display: inline-flex; align-items: center; text-decoration: none; }
.brand img { display: block; width: 181px; height: 64px; object-fit: contain; }

.header-search {
  display: flex;
  width: min(100%, 420px);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px;
  background: var(--soft);
}

.header-search:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(86, 54, 232, .12); }
.header-search input { min-width: 0; flex: 1; border: 0; outline: 0; padding: 8px 14px; background: transparent; }
.header-search button { border: 0; border-radius: 999px; padding: 7px 18px; color: #fff; background: var(--brand); cursor: pointer; }

.site-nav { border-top: 1px solid var(--line); }
.nav-scroll { display: flex; align-items: center; gap: 7px; overflow-x: auto; scrollbar-width: none; }
.nav-scroll::-webkit-scrollbar { display: none; }
.nav-link {
  flex: none;
  padding: 11px 14px;
  color: #3d4960;
  border-radius: 9px;
  font-size: 15px;
  font-weight: 650;
  text-decoration: none;
}
.nav-link:hover, .nav-link[aria-current="page"] { color: var(--brand-dark); background: var(--soft-purple); }

.hero {
  position: relative;
  overflow: hidden;
  padding: 72px 0;
  background:
    radial-gradient(circle at 85% 15%, rgba(54, 179, 241, .22), transparent 30%),
    radial-gradient(circle at 8% 100%, rgba(124, 85, 248, .17), transparent 34%),
    linear-gradient(135deg, #f7f5ff, #f5fbff 62%, #fff);
}

.hero-grid { display: grid; grid-template-columns: minmax(0, 1.06fr) minmax(340px, .94fr); gap: 56px; align-items: center; }
.eyebrow { margin: 0 0 8px; color: var(--brand); font-size: 14px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.hero h1 { max-width: 740px; margin: 0; font-size: clamp(38px, 5vw, 64px); line-height: 1.12; letter-spacing: -.035em; }
.hero-summary { max-width: 720px; margin: 24px 0 0; color: #526077; font-size: clamp(17px, 2vw, 20px); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }

.button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 9px 20px;
  font-weight: 750;
  text-decoration: none;
  cursor: pointer;
}
.button-primary { color: #fff; background: var(--brand); box-shadow: 0 10px 22px rgba(86, 54, 232, .22); }
.button-primary:hover { color: #fff; background: var(--brand-dark); }
.button-quiet { color: var(--brand-dark); border-color: #d8d0ff; background: #fff; }

.hero-feature {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .8);
  border-radius: 24px;
  background: #fff;
  box-shadow: var(--shadow);
  transform: rotate(1deg);
}
.hero-feature img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; background: var(--soft-purple); }
.hero-feature-body { padding: 24px 26px 28px; }
.hero-feature h2 { margin: 8px 0 10px; font-size: clamp(21px, 2.5vw, 29px); line-height: 1.34; }
.hero-feature h2 a { color: var(--ink); text-decoration: none; }
.hero-feature p { margin: 0; color: var(--muted); }

.section { padding: 72px 0; }
.section-tint { background: var(--soft); }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 30px; }
.section-heading h2 { margin: 0; font-size: clamp(29px, 4vw, 40px); letter-spacing: -.025em; line-height: 1.2; }
.text-link { font-weight: 750; text-decoration: none; }

.topic-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.topic-card {
  min-height: 175px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 23px;
  color: inherit;
  background: #fff;
  text-decoration: none;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.topic-card:hover { transform: translateY(-3px); border-color: #cfc5ff; box-shadow: var(--shadow); color: inherit; }
.topic-card h3 { margin: 0 0 8px; font-size: 20px; }
.topic-card p { margin: 0; color: var(--muted); font-size: 14px; }
.topic-card span { margin-top: 18px; color: var(--brand); font-weight: 750; }

.article-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.article-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  content-visibility: auto;
  contain-intrinsic-size: 430px;
}
.article-card > a { display: block; }
.article-card img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; background: var(--soft-purple); }
.article-card-body { padding: 20px 20px 22px; }
.card-meta { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 10px; color: var(--muted); font-size: 13px; }
.card-meta a { font-weight: 700; text-decoration: none; }
.article-card h3 { margin: 0; font-size: 19px; line-height: 1.45; }
.article-card h3 a { color: var(--ink); text-decoration: none; }
.article-card h3 a:hover { color: var(--brand); }
.article-card p { margin: 10px 0 0; color: var(--muted); font-size: 14px; }

.compact-list { border-top: 1px solid var(--line); }
.compact-item { display: grid; grid-template-columns: 120px minmax(0, 1fr) auto; gap: 20px; align-items: center; padding: 18px 0; border-bottom: 1px solid var(--line); }
.compact-item time, .compact-item span { color: var(--muted); font-size: 14px; }
.compact-item h3 { margin: 0; font-size: 18px; line-height: 1.45; }
.compact-item h3 a { color: var(--ink); text-decoration: none; }
.compact-item h3 a:hover { color: var(--brand); }

.geo-note { padding-top: 40px; text-align: center; background: linear-gradient(180deg, #fff, var(--soft-purple)); }
.geo-note h2 { font-size: 30px; }
.geo-note p { font-size: 18px; }
.geo-note .muted { font-size: 14px; }
.muted { color: var(--muted); }

.breadcrumbs { display: flex; gap: 8px; align-items: center; overflow-x: auto; margin: 24px 0 0; color: var(--muted); font-size: 14px; white-space: nowrap; }
.breadcrumbs ol { display: flex; gap: 8px; align-items: center; margin: 0; padding: 0; list-style: none; }
.breadcrumbs li:not(:last-child)::after { margin-left: 8px; color: #a5adbb; content: "/"; }
.breadcrumbs a { color: var(--muted); text-decoration: none; }

.page-header { max-width: 800px; padding: 60px 0 42px; }
.page-header h1 { margin: 0; font-size: clamp(36px, 5vw, 54px); line-height: 1.16; letter-spacing: -.03em; }
.page-header > p:not(.eyebrow, .result-count) { margin: 18px 0 0; color: var(--muted); font-size: 18px; }
.result-count { margin: 12px 0 0; color: var(--brand); font-size: 14px; font-weight: 750; }

.listing-grid, .article-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 54px; align-items: start; padding-bottom: 80px; }
.list-stack { border-top: 1px solid var(--line); }
.list-card { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 24px; padding: 24px 0; border-bottom: 1px solid var(--line); }
.list-card img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; border-radius: 13px; object-fit: cover; background: var(--soft-purple); }
.list-card h2 { margin: 6px 0 8px; font-size: 22px; line-height: 1.4; }
.list-card h2 a { color: var(--ink); text-decoration: none; }
.list-card h2 a:hover { color: var(--brand); }
.list-card p { margin: 0; color: var(--muted); font-size: 14px; }
.list-card .card-meta { justify-content: flex-start; }
.empty-state { padding: 46px 0; color: var(--muted); }

.sidebar { position: sticky; top: 24px; }
.side-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; background: var(--soft); }
.side-card + .side-card { margin-top: 20px; }
.side-card h2 { margin: 0 0 14px; font-size: 18px; }
.side-links { display: grid; gap: 4px; }
.side-links a { display: flex; justify-content: space-between; gap: 10px; border-radius: 8px; padding: 8px 10px; color: #40506a; text-decoration: none; }
.side-links a:hover, .side-links a[aria-current="page"] { color: var(--brand-dark); background: #fff; }
.side-links span { color: var(--muted); font-size: 13px; }

.pagination { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 30px; }
.pagination a, .pagination span { min-width: 42px; min-height: 42px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line); border-radius: 9px; padding: 5px 12px; text-decoration: none; }
.pagination [aria-current="page"] { color: #fff; border-color: var(--brand); background: var(--brand); }

.article-layout { grid-template-columns: minmax(0, 800px) 300px; justify-content: space-between; padding-top: 46px; }
.article-header h1 { margin: 14px 0 18px; font-size: clamp(34px, 5vw, 52px); line-height: 1.22; letter-spacing: -.03em; }
.category-pill { display: inline-flex; border-radius: 999px; padding: 4px 11px; color: var(--brand-dark); background: var(--soft-purple); font-size: 14px; font-weight: 750; text-decoration: none; }
.article-deck { margin: 0; color: #506079; font-size: 19px; line-height: 1.75; }
.article-meta { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 20px; color: var(--muted); font-size: 13px; }
.article-cover { margin: 32px 0; }
.article-cover img { display: block; width: 100%; height: auto; max-height: 560px; border-radius: var(--radius); object-fit: cover; background: var(--soft-purple); }
.article-cover figcaption { margin-top: 7px; color: var(--muted); font-size: 12px; text-align: center; }

.direct-answer { margin: 32px 0; border: 1px solid #dcd5ff; border-left: 5px solid var(--brand); border-radius: 15px; padding: 23px 25px; background: #faf9ff; }
.direct-answer h2 { margin: 0 0 9px; font-size: 22px; }
.direct-answer p:last-child { margin: 0; }

.toc { margin: 30px 0; border-radius: 15px; padding: 21px 24px; background: var(--soft); }
.toc > p { margin: 0 0 8px; font-weight: 800; }
.toc ol { display: grid; gap: 7px; margin: 0; padding-left: 22px; }
.toc .toc-h3 { margin-left: 18px; }
.toc a { color: #46536a; text-decoration: none; }
.toc a:hover { color: var(--brand); }
.article-sidebar .toc { margin: 0 0 20px; font-size: 14px; }

.prose { color: #202b3f; font-size: 17px; overflow-wrap: anywhere; }
.prose > :first-child { margin-top: 0; }
.prose h2, .prose h3, .prose h4 { scroll-margin-top: 24px; color: #172033; line-height: 1.35; }
.prose h2 { margin: 2.25em 0 .8em; border-bottom: 1px solid var(--line); padding-bottom: .38em; font-size: 27px; }
.prose h3 { margin: 1.8em 0 .65em; font-size: 22px; }
.prose h4 { margin: 1.6em 0 .55em; font-size: 19px; }
.prose p { margin: 1em 0; }
.prose ul, .prose ol { padding-left: 1.5em; }
.prose li + li { margin-top: .35em; }
.prose blockquote { margin: 1.5em 0; border-left: 4px solid #c9bfff; padding: .3em 1.2em; color: #536079; background: var(--soft-purple); }
.prose img { display: block; width: auto; height: auto; max-width: 100%; margin: 24px auto; border-radius: 12px; }
.prose figure { margin: 24px 0; }
.prose figcaption { color: var(--muted); font-size: 13px; text-align: center; }
.prose table { display: block; width: max-content; max-width: 100%; overflow-x: auto; border-collapse: collapse; font-size: 15px; }
.prose th, .prose td { min-width: 110px; border: 1px solid var(--line); padding: 9px 12px; vertical-align: top; }
.prose th { background: var(--soft); }
.prose pre { overflow-x: auto; border-radius: 10px; padding: 16px; color: #eef3ff; background: #182237; }
.prose hr { height: 1px; border: 0; background: var(--line); }

.article-footer { margin-top: 48px; border-top: 1px solid var(--line); padding-top: 22px; color: var(--muted); font-size: 14px; }
.keyword-list { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 16px; }
.keyword-list span { border-radius: 999px; padding: 4px 10px; background: var(--soft); }
.prev-next { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 30px; }
.prev-next a, .prev-next span { min-height: 100px; display: block; border: 1px solid var(--line); border-radius: 13px; padding: 15px; color: var(--ink); text-decoration: none; }
.prev-next small { display: block; margin-bottom: 6px; color: var(--muted); }
.prev-next .disabled { color: #a0a8b5; background: var(--soft); }
.side-article-list { display: grid; gap: 14px; }
.side-article { border-top: 1px solid var(--line); padding-top: 13px; }
.side-article:first-child { border-top: 0; padding-top: 0; }
.side-article a { color: var(--ink); font-size: 14px; font-weight: 700; line-height: 1.5; text-decoration: none; }
.side-article time { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; }

.search-page { min-height: 66vh; padding-bottom: 80px; }
.search-form { border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; background: var(--soft); }
.search-form label { display: block; margin-bottom: 9px; font-weight: 750; }
.search-control { display: flex; gap: 10px; }
.search-control input { min-width: 0; flex: 1; border: 1px solid #cbd3df; border-radius: 11px; padding: 11px 14px; outline: 0; background: #fff; }
.search-control input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(86, 54, 232, .12); }
.search-status { margin: 24px 0 12px; color: var(--muted); }
.search-results { border-top: 1px solid var(--line); }
.search-result { padding: 23px 0; border-bottom: 1px solid var(--line); }
.search-result h2 { margin: 5px 0 7px; font-size: 21px; line-height: 1.4; }
.search-result h2 a { color: var(--ink); text-decoration: none; }
.search-result p { margin: 0; color: var(--muted); font-size: 14px; }
.search-result-meta { color: var(--brand); font-size: 13px; font-weight: 700; }
.notice { border-radius: 10px; padding: 15px; background: #fff3cd; }

.not-found { min-height: 64vh; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; padding-block: 70px; }
.error-code { margin: 0; color: var(--brand); font-size: clamp(80px, 18vw, 170px); font-weight: 900; line-height: .9; letter-spacing: -.06em; }
.not-found h1 { margin: 24px 0 4px; font-size: 38px; }

.site-footer { border-top: 1px solid #29344b; color: #c5ccda; background: #182033; }
.footer-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 70px; padding-block: 48px 32px; }
.footer-brand, .footer-title { margin: 0 0 10px; color: #fff; font-size: 18px; font-weight: 800; }
.footer-grid p:not(.footer-brand, .footer-title) { max-width: 560px; margin: 0; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.footer-links a { color: #d9deea; text-decoration: none; }
.footer-links a:hover { color: #fff; }
.legal { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 20px; border-top: 1px solid #313c53; padding-block: 20px 28px; font-size: 13px; }
.legal p { margin: 0; }
.legal a { color: inherit; }

@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-feature { max-width: 680px; transform: none; }
  .topic-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .article-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .listing-grid, .article-layout { grid-template-columns: minmax(0, 1fr); gap: 38px; }
  .sidebar { position: static; }
  .article-sidebar > .toc { display: none; }
}

@media (max-width: 680px) {
  .container { width: min(calc(100% - 28px), var(--container)); }
  .header-row { min-height: 74px; }
  .brand img { width: 145px; height: auto; }
  .header-search { width: auto; }
  .header-search input { width: 120px; }
  .header-search button { padding-inline: 13px; }
  .hero { padding: 50px 0; }
  .hero-grid { gap: 38px; }
  .section { padding: 52px 0; }
  .topic-grid, .article-grid { grid-template-columns: 1fr; }
  .section-heading { align-items: flex-start; }
  .text-link { display: none; }
  .compact-item { grid-template-columns: 1fr; gap: 5px; }
  .compact-item > span { display: none; }
  .page-header { padding: 44px 0 30px; }
  .list-card { grid-template-columns: 116px minmax(0, 1fr); gap: 14px; padding: 18px 0; }
  .list-card h2 { margin-top: 3px; font-size: 17px; }
  .list-card p { display: none; }
  .list-card .card-meta span:last-child { display: none; }
  .article-layout { padding-top: 34px; }
  .article-header h1 { font-size: 34px; }
  .article-deck { font-size: 17px; }
  .article-meta { display: grid; gap: 4px; }
  .direct-answer { padding: 19px; }
  .prose { font-size: 16px; }
  .prose h2 { font-size: 24px; }
  .prev-next { grid-template-columns: 1fr; }
  .search-control { align-items: stretch; }
  .footer-grid { grid-template-columns: 1fr; gap: 30px; }
  .legal { display: grid; }
}

@media (max-width: 430px) {
  .header-search input { display: none; }
  .header-search button { min-height: 38px; }
  .list-card { grid-template-columns: 96px minmax(0, 1fr); }
}

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

@media print {
  .site-header, .site-footer, .sidebar, .breadcrumbs, .hero-actions { display: none !important; }
  body { color: #000; font-size: 12pt; }
  .article-layout { display: block; padding: 0; }
  .article-page { max-width: none; }
  a { color: inherit; text-decoration: none; }
}
