:root {
  --brand: #6F5AE8;
  --brand-soft: #9A8CF2;
  --ink: #242433;
  --text: #30303A;
  --muted: #70707D;
  --bg: #F8F8FC;
  --panel: #F0EEFA;
  --accent: #F29A4A;
  --white: #ffffff;
  --line: #DDD9F0;
  --shadow: 0 18px 44px rgba(36, 36, 51, .08);
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --max: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button { cursor: pointer; }
.container { width: min(calc(100% - 40px), var(--max)); margin: 0 auto; }
.skip-link { position: fixed; left: 14px; top: -60px; z-index: 2000; background: var(--ink); color: #fff; padding: 10px 14px; border-radius: 8px; }
.skip-link:focus { top: 14px; }

.site-header { position: sticky; top: 0; z-index: 1000; background: rgba(248,248,252,.94); backdrop-filter: blur(14px); border-bottom: 1px solid rgba(221,217,240,.85); }
.header-inner { min-height: 76px; display: flex; align-items: center; gap: 22px; }
.brand { display: inline-flex; align-items: center; gap: 12px; min-width: 220px; }
.brand img { width: 42px; height: 42px; object-fit: contain; border-radius: 12px; background: var(--white); }
.brand span { display: flex; flex-direction: column; line-height: 1.2; }
.brand strong { color: var(--ink); font-size: 17px; letter-spacing: .02em; }
.brand small { color: var(--muted); font-size: 11px; margin-top: 5px; }
.main-nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.main-nav a { padding: 9px 12px; border-radius: 10px; color: #545463; font-size: 14px; white-space: nowrap; }
.main-nav a:hover, .main-nav a.is-active { color: var(--brand); background: #eeebff; }
.search-button, .menu-button { border: 0; border-radius: 11px; padding: 10px 14px; background: var(--ink); color: #fff; }
.menu-button { display: none; }

.hero { padding: 78px 0 54px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(320px, .85fr); align-items: center; gap: 54px; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--brand); background: #eeeaff; border: 1px solid #ddd6ff; border-radius: 999px; padding: 6px 10px; margin-bottom: 16px; }
.hero h1, .page-hero h1 { margin: 0; color: var(--ink); font-size: clamp(38px, 5vw, 68px); line-height: 1.07; letter-spacing: -.045em; }
.hero p.lead, .page-hero p.lead { font-size: 19px; color: #565666; max-width: 720px; margin: 24px 0 0; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 0 18px; border-radius: 12px; font-weight: 700; border: 1px solid transparent; }
.button-primary { background: var(--accent); color: #2b2017; }
.button-secondary { background: var(--white); color: var(--ink); border-color: var(--line); }
.button-text { color: var(--brand); padding-inline: 0; }
.hero-visual { position: relative; }
.hero-visual::before { content: ""; position: absolute; inset: -18px 22px 28px -18px; background: var(--panel); border-radius: 34px; z-index: -1; transform: rotate(-2deg); }
.hero-visual img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 28px; box-shadow: var(--shadow); background: #ebe8f8; }

.section { padding: 62px 0; }
.section-tight { padding: 40px 0; }
.section-panel { background: var(--panel); border-block: 1px solid #e3def6; }
.section-dark { background: var(--ink); color: #ececf4; }
.section-dark h2, .section-dark h3 { color: #fff; }
.section-header { display: grid; grid-template-columns: minmax(0, .9fr) minmax(320px, 1.1fr); gap: 28px; align-items: end; margin-bottom: 30px; }
.section-header h2 { margin: 0; font-size: clamp(28px, 3vw, 42px); color: var(--ink); line-height: 1.15; letter-spacing: -.025em; }
.section-header p { margin: 0; color: var(--muted); }
.section-dark .section-header p { color: #bdbdcb; }
.kicker { color: var(--brand); font-weight: 800; letter-spacing: .06em; text-transform: uppercase; font-size: 12px; }

.card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.topic-card { background: var(--white); border: 1px solid #e6e3f3; border-radius: var(--radius-md); overflow: hidden; transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.topic-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: #d6cff8; }
.topic-card img { width: 100%; aspect-ratio: 16/9; object-fit: cover; background: #e9e6f4; }
.topic-card .card-body { padding: 22px; }
.topic-card h3 { margin: 0 0 9px; color: var(--ink); font-size: 20px; line-height: 1.3; }
.topic-card p { margin: 0; color: var(--muted); }
.topic-card .card-link { display: inline-block; margin-top: 16px; color: var(--brand); font-weight: 700; }

.editorial-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 22px; }
.editorial-main, .editorial-side { background: var(--white); border: 1px solid #e5e1f1; border-radius: var(--radius-lg); padding: 28px; }
.editorial-main h2, .editorial-side h2 { margin-top: 0; color: var(--ink); }
.editorial-main p, .editorial-side p { color: #5f5f6d; }
.editorial-main img { border-radius: 18px; margin: 22px 0; aspect-ratio: 16/8; object-fit: cover; }
.mini-list { list-style: none; padding: 0; margin: 0; }
.mini-list li { padding: 16px 0; border-bottom: 1px solid #eceaf3; }
.mini-list li:last-child { border-bottom: 0; }
.mini-list a { display: block; }
.mini-list strong { display: block; color: var(--ink); margin-bottom: 5px; }
.mini-list span { color: var(--muted); font-size: 14px; }

.step-list { counter-reset: steps; list-style: none; padding: 0; margin: 28px 0 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.step-list li { counter-increment: steps; background: var(--white); border: 1px solid #e5e1f1; border-radius: 16px; padding: 20px; }
.step-list li::before { content: counter(steps, decimal-leading-zero); display: block; color: var(--brand); font-weight: 800; font-size: 13px; margin-bottom: 10px; }
.step-list strong { display: block; color: var(--ink); margin-bottom: 7px; }
.step-list span { color: var(--muted); font-size: 14px; }

.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 1fr); gap: 44px; align-items: center; }
.split.reverse .split-media { order: 2; }
.split-media img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 24px; background: #ebe8f8; }
.split-copy h2 { margin: 0 0 18px; color: var(--ink); font-size: clamp(29px, 3vw, 42px); line-height: 1.16; }
.split-copy h3 { color: var(--ink); margin-top: 26px; }
.split-copy p { color: #60606e; }
.check-list { list-style: none; padding: 0; margin: 20px 0 0; }
.check-list li { position: relative; padding-left: 28px; margin: 10px 0; }
.check-list li::before { content: "✓"; position: absolute; left: 0; top: 0; color: var(--brand); font-weight: 900; }

.callout { background: var(--ink); color: #e8e8f0; border-radius: 28px; padding: 34px; display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center; }
.callout h2 { margin: 0 0 8px; color: #fff; }
.callout p { margin: 0; color: #c5c5cf; }

.page-hero { padding: 62px 0 34px; }
.page-hero h1 { font-size: clamp(36px, 4vw, 56px); }
.breadcrumb { margin-top: 24px; }
.breadcrumb ol { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0; font-size: 13px; color: var(--muted); }
.breadcrumb li:not(:last-child)::after { content: "/"; margin-left: 8px; color: #aaa8b4; }
.breadcrumb a:hover { color: var(--brand); }

.content-shell { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 36px; align-items: start; }
.content-main { min-width: 0; }
.sidebar { position: sticky; top: 100px; }
.sidebar-box { background: var(--white); border: 1px solid #e5e1f1; border-radius: 16px; padding: 20px; margin-bottom: 16px; }
.sidebar-box h2, .sidebar-box h3 { margin: 0 0 10px; color: var(--ink); font-size: 17px; }
.sidebar-box p { color: var(--muted); font-size: 14px; margin: 0; }
.sidebar-box a { display: block; padding: 9px 0; color: #50505f; border-bottom: 1px solid #efedf4; }
.sidebar-box a:last-child { border-bottom: 0; }
.sidebar-box a:hover { color: var(--brand); }

.prose { background: var(--white); border: 1px solid #e5e1f1; border-radius: 24px; padding: clamp(24px, 4vw, 46px); }
.prose h2 { margin: 42px 0 14px; color: var(--ink); font-size: 28px; line-height: 1.25; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin: 30px 0 10px; color: var(--ink); font-size: 20px; }
.prose p { margin: 0 0 18px; color: #50505d; }
.prose ul, .prose ol { padding-left: 1.35em; color: #50505d; }
.prose li { margin: 8px 0; }
.prose a { color: var(--brand); text-decoration: underline; text-underline-offset: 3px; }
.prose img { margin: 26px 0; border-radius: 18px; background: #ece9f7; }
.note { padding: 18px 20px; border-left: 4px solid var(--brand); background: #f3f1fb; border-radius: 0 12px 12px 0; margin: 22px 0; }
.note strong { color: var(--ink); }
.warning { border-left-color: var(--accent); background: #fff5ea; }
.meta-row { display: flex; flex-wrap: wrap; gap: 10px 18px; margin: 20px 0; font-size: 13px; color: var(--muted); }
.tag { display: inline-flex; background: #eeeaff; color: var(--brand); padding: 5px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; }

.comparison { width: 100%; border-collapse: collapse; margin: 24px 0; background: #fff; }
.comparison th, .comparison td { text-align: left; vertical-align: top; padding: 14px 16px; border: 1px solid #e5e1f1; }
.comparison th { color: var(--ink); background: #f2f0fa; }
.comparison td { color: #565664; }

.link-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.link-list a { display: block; background: var(--white); border: 1px solid #e4e0f2; border-radius: 15px; padding: 18px; height: 100%; }
.link-list a:hover { border-color: #cfc6ff; box-shadow: 0 10px 28px rgba(36,36,51,.06); }
.link-list strong { display: block; color: var(--ink); margin-bottom: 5px; }
.link-list span { display: block; color: var(--muted); font-size: 14px; }

.guide-list { display: grid; gap: 14px; }
.guide-item { display: grid; grid-template-columns: 150px minmax(0,1fr); gap: 24px; align-items: start; padding: 22px 0; border-bottom: 1px solid #e8e5f0; }
.guide-item:last-child { border-bottom: 0; }
.guide-item .guide-meta { color: var(--brand); font-size: 13px; font-weight: 800; }
.guide-item h2, .guide-item h3 { margin: 0 0 8px; color: var(--ink); }
.guide-item p { margin: 0; color: var(--muted); }
.guide-item a:hover h2, .guide-item a:hover h3 { color: var(--brand); }

.faq-list { display: grid; gap: 12px; }
.faq-item { background: var(--white); border: 1px solid #e4e0f2; border-radius: 14px; overflow: hidden; }
.faq-question { width: 100%; border: 0; background: transparent; display: flex; justify-content: space-between; gap: 16px; text-align: left; padding: 18px 20px; color: var(--ink); font-weight: 800; }
.faq-question::after { content: "+"; color: var(--brand); font-size: 20px; }
.faq-item.is-open .faq-question::after { content: "−"; }
.faq-answer { display: none; padding: 0 20px 20px; color: #5b5b68; }
.faq-item.is-open .faq-answer { display: block; }
.no-js-faq .faq-answer { display: block; }

.search-modal[hidden] { display: none !important; }
.search-modal { position: fixed; inset: 0; z-index: 1500; display: grid; place-items: start center; padding: 10vh 20px 20px; }
.search-backdrop { position: absolute; inset: 0; background: rgba(20,20,30,.58); }
.search-panel { position: relative; width: min(680px, 100%); background: var(--white); border-radius: 24px; padding: 30px; box-shadow: 0 30px 90px rgba(0,0,0,.24); }
.search-panel h2 { margin-top: 0; color: var(--ink); }
.search-panel p { color: var(--muted); }
.modal-close { position: absolute; top: 16px; right: 16px; width: 36px; height: 36px; border-radius: 50%; border: 0; background: #f0eef7; color: var(--ink); font-size: 22px; }
.search-form label { display: block; font-weight: 700; margin-bottom: 8px; }
.search-row { display: grid; grid-template-columns: 1fr auto; gap: 10px; }
.search-row input { width: 100%; min-width: 0; border: 1px solid #cbc6df; border-radius: 12px; padding: 12px 14px; background: #fff; }
.search-row button { border: 0; border-radius: 12px; background: var(--brand); color: #fff; padding: 0 20px; font-weight: 800; }
.modal-open { overflow: hidden; }

.search-results { display: grid; gap: 14px; margin-top: 26px; }
.search-result { background: var(--white); border: 1px solid #e4e0f2; border-radius: 14px; padding: 18px; }
.search-result h2 { margin: 0 0 8px; font-size: 20px; color: var(--ink); }
.search-result p { margin: 0; color: var(--muted); }
.empty-state { background: #fff; border: 1px dashed #ccc6e2; border-radius: 18px; padding: 28px; color: var(--muted); }

.site-footer { margin-top: 70px; background: #1f1f2c; color: #d5d5df; padding: 52px 0 22px; }
.footer-grid { display: grid; grid-template-columns: 1.2fr .8fr .8fr; gap: 36px; }
.site-footer h2, .site-footer h3 { color: #fff; margin-top: 0; }
.site-footer p { color: #aaaab8; max-width: 520px; }
.site-footer a { display: block; color: #c6c6d0; margin: 8px 0; }
.site-footer a:hover { color: #fff; }
.footer-bottom { margin-top: 34px; padding-top: 20px; border-top: 1px solid #353545; display: flex; justify-content: space-between; gap: 16px; color: #8f8f9f; font-size: 13px; }
.footer-bottom a { margin: 0; }
.back-top { position: fixed; right: 20px; bottom: 20px; width: 42px; height: 42px; border: 0; border-radius: 50%; background: var(--brand); color: #fff; box-shadow: 0 10px 26px rgba(111,90,232,.35); }
.back-top[hidden] { display: none; }

@media (max-width: 1024px) {
  .main-nav { position: absolute; left: 20px; right: 20px; top: 70px; display: none; flex-direction: column; align-items: stretch; padding: 12px; background: var(--white); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); }
  .main-nav.is-open { display: flex; }
  .main-nav a { padding: 12px; }
  .menu-button { display: inline-block; margin-left: auto; background: var(--white); color: var(--ink); border: 1px solid var(--line); }
  .search-button { margin-left: 0; }
  .hero-grid, .split, .section-header, .content-shell { grid-template-columns: 1fr; }
  .hero { padding-top: 54px; }
  .hero-visual { max-width: 720px; }
  .sidebar { position: static; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
  .sidebar-box { margin: 0; }
  .step-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 768px) {
  .container { width: min(calc(100% - 28px), var(--max)); }
  .header-inner { min-height: 68px; gap: 10px; }
  .brand { min-width: 0; }
  .brand img { width: 36px; height: 36px; }
  .brand small { display: none; }
  .search-button { font-size: 0; width: 42px; height: 42px; padding: 0; position: relative; }
  .search-button::after { content: "⌕"; font-size: 22px; }
  .hero, .page-hero { padding-top: 46px; }
  .hero-grid { gap: 34px; }
  .card-grid, .editorial-grid, .footer-grid { grid-template-columns: 1fr; }
  .section { padding: 46px 0; }
  .split.reverse .split-media { order: initial; }
  .callout { grid-template-columns: 1fr; }
  .link-list { grid-template-columns: 1fr; }
  .guide-item { grid-template-columns: 1fr; gap: 8px; }
  .sidebar { grid-template-columns: 1fr; }
  .comparison { display: block; overflow-x: auto; }
}

@media (max-width: 600px) {
  .hero h1, .page-hero h1 { font-size: 36px; }
  .hero p.lead, .page-hero p.lead { font-size: 17px; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .button { width: 100%; }
  .step-list { grid-template-columns: 1fr; }
  .prose { padding: 22px; border-radius: 18px; }
  .search-panel { padding: 24px 20px; }
  .search-row { grid-template-columns: 1fr; }
  .search-row button { min-height: 46px; }
  .footer-bottom { flex-direction: column; }
}

@media (max-width: 375px) {
  .container { width: min(calc(100% - 22px), var(--max)); }
  .brand strong { font-size: 15px; }
  .menu-button { padding: 8px 10px; }
  .hero h1, .page-hero h1 { font-size: 32px; }
  .topic-card .card-body { padding: 18px; }
}
