:root {
  --page: #f7fafc;
  --surface: #ffffff;
  --surface-soft: #eef6f8;
  --text: #1f2937;
  --muted: #64748b;
  --primary: #227c9d;
  --primary-dark: #155e75;
  --accent: #4f9d69;
  --line: #dbe7ef;
  --code: #111827;
  --shadow: 0 18px 45px rgba(34, 124, 157, 0.10);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--page);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.7;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.container { width: min(1180px, calc(100% - 32px)); margin: 0 auto; }
.section { padding: 56px 0; }
.section.compact { padding: 26px 0; }
.soft { background: var(--surface-soft); }
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav-wrap { min-height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; flex: 0 0 auto; }
.brand-logo { width: auto; height: 32px; object-fit: contain; }
.nav-menu { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.nav-menu a { padding: 8px 12px; border-radius: 8px; color: #334155; font-size: 14px; }
.nav-menu a:hover, .nav-menu a.is-active { background: #e8f3f7; color: var(--primary-dark); }
.nav-toggle { display: none; border: 1px solid var(--line); background: #fff; border-radius: 8px; width: 42px; height: 38px; font-size: 20px; }
.breadcrumb-wrap { border-bottom: 1px solid var(--line); background: #fff; }
.breadcrumb { display: flex; gap: 8px; align-items: center; min-height: 44px; color: var(--muted); font-size: 13px; overflow-x: auto; white-space: nowrap; }
.page-banner {
  background: linear-gradient(135deg, #eef7f6 0%, #f8fbff 52%, #ffffff 100%);
  border-bottom: 1px solid var(--line);
}
.page-banner-inner {
  min-height: 156px;
  display: grid;
  align-items: center;
  padding-top: 28px;
  padding-bottom: 28px;
}
.page-banner h1 { font-size: 34px; }
.page-banner p { max-width: 760px; color: var(--muted); margin-bottom: 0; }
.page-banner .eyebrow { color: var(--primary-dark); margin-bottom: 8px; }

.hero { padding: 54px 0 34px; background: linear-gradient(180deg, #ffffff 0%, #eef7f6 100%); }
.home-top-section { padding: 24px 0 0; }
.home-top { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(300px, .55fr); gap: 18px; align-items: stretch; }
.home-slider, .latest-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, .04);
}
.home-slider { position: relative; min-height: 280px; overflow: hidden; }
.home-slide { position: absolute; inset: 0; display: block; opacity: 0; pointer-events: none; transition: opacity .24s ease; }
.home-slide.is-active { opacity: 1; pointer-events: auto; }
.home-slide img { width: 100%; height: 100%; object-fit: cover; }
.home-slide::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(15, 23, 42, .06), rgba(15, 23, 42, .68)); }
.home-slide span { position: absolute; z-index: 1; left: 24px; right: 24px; bottom: 24px; color: #fff; }
.home-slide strong { display: block; font-size: 25px; line-height: 1.25; }
.home-slide small { display: block; margin-top: 8px; color: rgba(255, 255, 255, .86); font-size: 14px; line-height: 1.6; }
.home-slide-dots { position: absolute; z-index: 2; right: 18px; bottom: 18px; display: flex; gap: 7px; }
.home-slide-dot { width: 9px; height: 9px; padding: 0; border: 0; border-radius: 99px; background: rgba(255,255,255,.58); cursor: pointer; }
.home-slide-dot.is-active { width: 24px; background: #fff; }
.home-slide-arrow {
  position: absolute;
  z-index: 2;
  top: 50%;
  width: 38px;
  height: 44px;
  transform: translateY(-50%);
  border: 1px solid rgba(255,255,255,.34);
  border-radius: 8px;
  background: rgba(15, 23, 42, .34);
  color: #fff;
  font-size: 32px;
  line-height: 1;
  cursor: pointer;
}
.home-slide-arrow:hover { background: rgba(15, 23, 42, .56); }
.home-slide-arrow.prev { left: 16px; }
.home-slide-arrow.next { right: 16px; }
.latest-panel { padding: 20px; }
.latest-head { border-bottom: 1px solid var(--line); padding-bottom: 12px; margin-bottom: 6px; }
.latest-head h2 { font-size: 22px; }
.latest-list { display: grid; }
.latest-item { display: grid; grid-template-columns: 46px minmax(0, 1fr); gap: 12px; min-width: 0; padding: 13px 0; border-bottom: 1px solid var(--line); align-items: center; }
.latest-item:last-child { border-bottom: 0; }
.latest-item:nth-child(n+7) { display: none; }
.latest-item span { color: var(--muted); font-size: 13px; font-weight: 800; }
.latest-item strong { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; line-height: 1.45; font-size: 15px; }
.latest-item:hover strong { color: var(--primary-dark); }
.pt-tight { padding-top: 24px; }
.tutorial-list-section { padding-top: 24px; }
.docs-detail-section { padding-top: 24px; }
.tutorial-groups { display: grid; gap: 42px; }
.tutorial-group { display: grid; gap: 18px; }
.group-head { display: flex; justify-content: space-between; align-items: end; gap: 18px; border-bottom: 1px solid var(--line); padding-bottom: 14px; }
.group-head p { color: var(--muted); margin-bottom: 0; }
.group-head .eyebrow { color: var(--primary-dark); margin-bottom: 8px; }
.home-catalog { display: grid; gap: 18px; }
.catalog-head { display: flex; align-items: end; justify-content: space-between; gap: 18px; }
.catalog-head h2 { font-size: 26px; }
.catalog-mode { display: inline-flex; gap: 6px; padding: 4px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.catalog-mode button { min-height: 34px; padding: 0 14px; border: 0; border-radius: 6px; background: transparent; color: var(--muted); font: inherit; font-weight: 800; cursor: pointer; }
.catalog-mode button.is-active { background: var(--primary); color: #fff; }
.catalog-view { display: none; }
.catalog-view.is-active { display: block; }
.catalog-all { display: grid; gap: 24px; }
.catalog-group { display: grid; gap: 12px; }
.catalog-group-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--line); padding-bottom: 10px; }
.catalog-group-head p { max-width: 620px; color: var(--muted); margin: 0; text-align: right; }
.home-tabs { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 22px; align-items: start; }
.home-tab-list { display: grid; gap: 8px; position: sticky; top: 86px; }
.home-tab {
  width: 100%;
  display: grid;
  gap: 3px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}
.home-tab span { font-weight: 900; }
.home-tab small { color: var(--muted); font-size: 12px; }
.home-tab:hover, .home-tab.is-active { border-color: rgba(34, 124, 157, .45); background: #e8f3f7; color: var(--primary-dark); }
.home-tab-content { min-width: 0; }
.home-tabs.is-ready .home-tab-panel { display: none; }
.home-tabs.is-ready .home-tab-panel.is-active { display: block; }
.home-tab-head { margin-bottom: 18px; }
.home-tab-head p { max-width: 720px; color: var(--muted); margin-bottom: 0; }
.book-grid.home-tab-books { grid-template-columns: repeat(3, 1fr); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.02fr) minmax(320px, .78fr); gap: 36px; align-items: center; }
.eyebrow { margin: 0 0 10px; color: var(--primary-dark); font-size: 13px; font-weight: 800; letter-spacing: 0; }
h1, h2, h3, p { overflow-wrap: anywhere; }
h1 { margin: 0; font-size: 42px; line-height: 1.18; letter-spacing: 0; }
h2 { margin: 0; font-size: 28px; line-height: 1.25; letter-spacing: 0; }
h3 { margin: 0; font-size: 18px; line-height: 1.35; letter-spacing: 0; }
.hero-desc { color: var(--muted); font-size: 17px; max-width: 680px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 26px; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; padding: 0 18px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--text); font-weight: 700; }
.btn.primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.hero-panel { display: grid; gap: 12px; }
.slide-card { position: relative; overflow: hidden; border-radius: 8px; min-height: 128px; box-shadow: var(--shadow); }
.slide-card img { width: 100%; height: 150px; object-fit: cover; }
.slide-card span { position: absolute; left: 16px; right: 16px; bottom: 14px; color: #fff; font-weight: 800; text-shadow: 0 2px 12px rgba(0,0,0,.45); }

.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 18px; }
.stat strong { display: block; font-size: 26px; color: var(--primary-dark); }
.stat span { color: var(--muted); }
.section-head { margin-bottom: 22px; }
.section-head p { max-width: 720px; color: var(--muted); }
.page-section { padding-top: 24px; }
.book-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.book-grid.in-list { grid-template-columns: repeat(2, 1fr); }
.book-grid.root-list { grid-template-columns: repeat(3, 1fr); gap: 18px; align-items: stretch; }
.book-card, .chapter-card, .feature-item, .process-card, .page-title-card, .reader, .message-card, .message-item, .book-sidebar {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, .04);
}
.book-card { display: block; overflow: hidden; color: inherit; transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease; }
.book-card:hover { border-color: rgba(34, 124, 157, .45); box-shadow: 0 14px 34px rgba(15, 23, 42, .08); transform: translateY(-2px); }
.book-card-body { display: grid; grid-template-columns: 80px minmax(0, 1fr); gap: 14px; align-items: start; padding: 18px; }
.book-icon { position: relative; width: 80px; height: 80px; border-radius: 8px; background: linear-gradient(135deg, #e8f3f7, #f7fbfd); border: 1px solid #cfe3ec; box-shadow: inset 0 -10px 0 rgba(34, 124, 157, .08); }
.book-icon::before { content: ""; position: absolute; left: 21px; top: 18px; width: 34px; height: 42px; border: 2px solid var(--primary); border-left-width: 8px; border-radius: 5px 7px 7px 5px; background: #fff; }
.book-icon::after { content: ""; position: absolute; left: 36px; top: 27px; width: 20px; height: 2px; background: #9bb8c4; box-shadow: 0 8px 0 #9bb8c4, 0 16px 0 #9bb8c4; }
.book-card-content { min-width: 0; }
.root-list .book-card-body { padding: 18px; }
.root-list .book-card h3 { font-size: 18px; }
.root-list .book-card p { margin: 12px 0 0; font-size: 15px; line-height: 1.7; }
.root-list .book-meta { margin-top: 16px; }
.book-card p { color: var(--muted); }
.book-meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 16px; font-size: 13px; color: var(--muted); }
.book-meta strong { color: var(--primary-dark); font-weight: 800; }
.split { display: grid; grid-template-columns: 280px 1fr; gap: 32px; align-items: start; }
.feature-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.feature-item { padding: 20px; }
.feature-item p, .process-card p, .chapter-card p { color: var(--muted); }
.chapter-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.chapter-card { overflow: hidden; }
.chapter-card img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.chapter-card > div { padding: 16px; }
.chapter-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.chapter-tags span { display: inline-flex; align-items: center; min-height: 24px; padding: 0 8px; border-radius: 6px; background: #edf7f1; color: #266848; font-size: 12px; font-weight: 700; }
.process-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.process-card { padding: 22px; }
.process-card span { color: var(--primary); font-size: 28px; font-weight: 900; }
.faq-grid { display: grid; grid-template-columns: 280px 1fr; gap: 32px; }
.faq-item { border-bottom: 1px solid var(--line); padding: 16px 0; }
.faq-item summary { cursor: pointer; font-weight: 800; }
.faq-item p { color: var(--muted); margin-bottom: 0; }

.docs-wide { width: min(1460px, calc(100% - 32px)); }
.docs-layout { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 24px; align-items: start; }
.docs-detail-layout { grid-template-columns: 280px minmax(0, 1fr) 220px; }
.book-sidebar { position: sticky; top: 86px; padding: 18px; max-height: calc(100vh - 110px); overflow: auto; }
.book-sidebar-toggle { display: none; width: 100%; min-height: 40px; border: 1px solid var(--line); border-radius: 8px; background: #f8fbff; color: var(--primary-dark); font: inherit; font-weight: 900; text-align: left; padding: 0 12px; cursor: pointer; }
.sidebar-title { font-weight: 900; margin-bottom: 14px; }
.book-group { border-top: 1px solid var(--line); padding-top: 12px; margin-top: 12px; }
.book-group:first-of-type { border-top: 0; padding-top: 0; margin-top: 0; }
.book-group summary { display: flex; justify-content: space-between; gap: 12px; cursor: pointer; font-weight: 800; list-style: none; }
.book-group summary::-webkit-details-marker { display: none; }
.book-group em { color: var(--muted); font-style: normal; font-size: 12px; }
.chapter-list { display: grid; gap: 6px; margin-top: 10px; }
.chapter-list a { display: grid; grid-template-columns: 28px 1fr; gap: 8px; padding: 9px; border-radius: 8px; color: #475569; font-size: 13px; }
.chapter-list a:hover, .chapter-list a.is-current { background: var(--primary); color: #fff; }
.chapter-list span { font-weight: 900; }
.docs-main { min-width: 0; }
.page-title-card { padding: 26px; margin-bottom: 18px; }
.page-title-card p { color: var(--muted); }
.chapter-list-main { display: grid; gap: 12px; }
.chapter-row { display: grid; grid-template-columns: 58px 1fr; gap: 16px; padding: 18px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: inherit; transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease; }
.chapter-row:hover { border-color: rgba(34, 124, 157, .45); box-shadow: 0 12px 30px rgba(15, 23, 42, .07); transform: translateY(-1px); }
.chapter-no { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 8px; background: #e8f3f7; color: var(--primary-dark); font-weight: 900; }
.chapter-row p { color: var(--muted); margin-bottom: 0; }
.book-chapter-index { display: grid; gap: 10px; margin-top: 8px; }
.book-chapter-link {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdff;
}
.book-chapter-link:hover { border-color: rgba(34, 124, 157, .45); background: #f2fafb; }
.book-chapter-link strong { display: block; font-size: 16px; line-height: 1.45; }
.book-chapter-link em { display: block; color: var(--muted); font-style: normal; font-size: 14px; margin-top: 3px; }
.book-chapter-link small { color: var(--muted); white-space: nowrap; }
.reader { padding: 34px; min-width: 0; }
.reader-head { border-bottom: 1px solid var(--line); padding-bottom: 20px; margin-bottom: 24px; }
.reader-head h1 { font-size: 30px; line-height: 1.28; }
.reader-head p, .reader-meta { color: var(--muted); }
.inline-toc { border: 1px solid var(--line); border-radius: 8px; padding: 14px; background: #f8fbff; margin-bottom: 22px; }
.inline-toc.is-hidden { display: none; }
.doc-toc-panel { position: sticky; top: 86px; max-height: calc(100vh - 110px); overflow: auto; margin-bottom: 0; background: var(--surface); box-shadow: 0 10px 30px rgba(15, 23, 42, .04); }
.toc-title { font-weight: 900; margin-bottom: 8px; }
.toc-list { display: grid; gap: 6px; }
.toc-list a { color: var(--primary-dark); font-size: 14px; }
.toc-list a.is-h3 { padding-left: 16px; color: var(--muted); }
.article-content { font-size: 14px; line-height: 1.78; }
.article-content h2 { margin-top: 26px; margin-bottom: 10px; font-size: 20px; scroll-margin-top: 92px; }
.article-content h3 { margin-top: 22px; margin-bottom: 8px; font-size: 17px; scroll-margin-top: 92px; }
.article-content p { margin: 0 0 13px; }
.article-content ul, .article-content ol { padding-left: 1.35em; margin-top: 0; margin-bottom: 13px; }
.article-content li + li { margin-top: 4px; }
.article-content code { background: #eef2f7; color: var(--text); border-radius: 6px; padding: 1px 5px; font-size: .92em; font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace; }
.article-content pre { position: relative; overflow-x: auto; background: var(--code); color: #e5e7eb; border-radius: 8px; padding: 14px 16px; font-size: 13px; line-height: 1.65; font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace; }
.article-content pre code { background: none; color: inherit; padding: 0; border-radius: 0; font-size: inherit; }
.article-content pre code * { color: inherit !important; background: none !important; }
.code-copy-btn { position: absolute; top: 8px; right: 8px; padding: 3px 10px; font-size: 12px; line-height: 1.6; color: #e5e7eb; background: rgba(255, 255, 255, 0.12); border: 1px solid rgba(255, 255, 255, 0.22); border-radius: 6px; cursor: pointer; opacity: 0; transition: opacity .15s, background .15s; }
.article-content pre:hover .code-copy-btn { opacity: 1; }
.code-copy-btn:hover { background: rgba(255, 255, 255, 0.24); }
.code-copy-btn.is-copied { color: #fff; background: var(--accent); border-color: var(--accent); opacity: 1; }
.article-content table { width: 100%; border-collapse: collapse; display: block; overflow-x: auto; }
.article-content th, .article-content td { border: 1px solid var(--line); padding: 8px 10px; white-space: nowrap; }
.article-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 28px; }
.article-tags a { background: #eef7f6; color: var(--primary-dark); padding: 5px 10px; border-radius: 6px; font-size: 13px; }
.prev-next { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--line); color: var(--muted); }
.prev-next a { color: var(--primary-dark); font-weight: 800; }
.category-section, .article-section, .message-section { padding-top: 24px; }
.article-list-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; align-items: start; }
.article-list-main {
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
.article-list-main { padding: 0; }
.article-list-head {
  padding: 26px 28px;
  margin-bottom: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 10px 30px rgba(15, 23, 42, .04);
}
.article-list-head p { max-width: 760px; color: var(--muted); }
.article-list-head h1 { font-size: 30px; line-height: 1.26; }
.article-list { display: grid; gap: 12px; }
.article-list-item {
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 10px 30px rgba(15, 23, 42, .04);
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.article-list-item:hover {
  border-color: rgba(34, 124, 157, .36);
  box-shadow: 0 14px 34px rgba(15, 23, 42, .075);
  transform: translateY(-1px);
}
.article-list-content { min-width: 0; }
.article-list-meta { display: flex; gap: 7px; flex-wrap: wrap; color: var(--muted); font-size: 12px; margin-bottom: 9px; }
.article-list-meta span { display: inline-flex; align-items: center; gap: 4px; }
.article-list-meta span + span::before { content: ""; width: 4px; height: 4px; border-radius: 99px; background: var(--line); }
.article-list-item h2 { font-size: 20px; margin-bottom: 9px; line-height: 1.35; }
.article-list-item h2 a:hover { color: var(--primary-dark); }
.article-list-item p { color: var(--muted); margin: 0 0 16px; max-width: 800px; font-size: 14px; line-height: 1.72; }
.article-list-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.article-chip { display: inline-flex; align-items: center; min-height: 26px; padding: 0 9px; border-radius: 6px; background: #eef7f6; color: var(--primary-dark); font-size: 12px; font-weight: 800; }
.read-more {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  margin-left: auto;
  padding: 0 10px;
  border-radius: 6px;
  color: var(--primary-dark);
  font-weight: 900;
  font-size: 13px;
}
.read-more:hover { background: #e8f3f7; }
.article-list-sidebar { position: sticky; top: 86px; display: grid; gap: 14px; }
.side-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, .04);
  padding: 18px;
}
.side-link-list, .side-article-list { display: grid; gap: 8px; }
.side-link-list a { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 11px; border-radius: 8px; color: #475569; line-height: 1.45; background: #f8fbff; }
.side-link-list small { color: var(--muted); font-size: 12px; }
.side-article-list a { display: grid; gap: 4px; padding: 11px 0; border-bottom: 1px solid var(--line); color: #475569; line-height: 1.45; }
.side-article-list a:last-child { border-bottom: 0; }
.side-article-list strong { font-size: 14px; color: var(--text); }
.side-article-list span { color: var(--muted); font-size: 12px; }
.side-link-list a:hover, .side-link-list a.is-current { background: #e8f3f7; color: var(--primary-dark); }
.side-article-list a:hover strong { color: var(--primary-dark); }
.article-page-layout { width: min(1180px, calc(100% - 32px)); display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; align-items: start; }
.article-reader { min-width: 0; }
.related-panel { border-top: 1px solid var(--line); margin-top: 28px; padding-top: 24px; }
.related-head { margin-bottom: 14px; }
.related-head h2 { font-size: 22px; }
.related-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.related-card { display: grid; gap: 6px; padding: 16px; border: 1px solid var(--line); border-radius: 8px; background: #fbfdff; }
.related-card span { color: var(--muted); font-size: 12px; font-weight: 800; }
.related-card strong { line-height: 1.45; }
.related-card em { color: var(--muted); font-style: normal; font-size: 13px; line-height: 1.55; }
.related-card:hover { border-color: rgba(34, 124, 157, .45); background: #f2fafb; }
.pager { display: flex; gap: 8px; justify-content: center; margin-top: 26px; flex-wrap: wrap; }
.pager a, .pager span { min-width: 36px; min-height: 36px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.pager .is-active { background: var(--primary); color: #fff; }
.empty-state { padding: 28px; border: 1px dashed var(--line); border-radius: 8px; background: #fff; color: var(--muted); text-align: center; }
.narrow-page { max-width: 880px; }
.contact-grid, .feedback-layout { display: grid; grid-template-columns: .9fr 1.1fr; gap: 22px; align-items: start; }
.contact-lines { display: grid; gap: 8px; margin-top: 18px; color: var(--text); }
.feedback-intro, .message-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, .04);
}
.feedback-intro { padding: 30px; }
.feedback-intro p { color: var(--muted); }
.feedback-points { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 20px; }
.feedback-points span { display: inline-flex; align-items: center; min-height: 28px; padding: 0 10px; border-radius: 6px; background: #e8f3f7; color: var(--primary-dark); font-weight: 800; font-size: 13px; }
.message-card { padding: 24px; }
.message-form { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.message-form label { display: grid; gap: 6px; font-weight: 700; color: #334155; }
.message-form .full { grid-column: 1 / -1; }
.message-form input, .message-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px 12px;
  font: inherit;
  background: #fff;
}
.captcha-field { grid-column: 1 / -1; }
.captcha-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.captcha-row input { width: min(180px, 100%); }
.captcha-row img { height: 42px; width: 112px; object-fit: contain; cursor: pointer; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.form-message { grid-column: 1 / -1; padding: 10px; border-radius: 8px; background: #eef7f6; }
.form-message.is-success { background: #ecfdf5; color: #047857; border: 1px solid #a7f3d0; }
.form-message.is-error { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.hidden { display: none; }
.messages { margin-top: 28px; }
.feedback-messages { display: grid; gap: 12px; }
.message-item { padding: 16px; margin-top: 12px; }
.message-item time { color: var(--muted); margin-left: 10px; font-size: 13px; }
.not-found { min-height: 360px; display: grid; align-content: center; justify-items: start; }
.site-footer { background: #0f172a; color: #dbe7ef; padding: 42px 0 18px; }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) .85fr .9fr .75fr; gap: 18px; align-items: start; }
.footer-about, .footer-panel { min-width: 0; }
.footer-brand { color: #fff; font-weight: 900; font-size: 22px; margin-bottom: 8px; }
.site-footer h3 { color: #fff; margin: 0 0 12px; font-size: 16px; }
.site-footer p { color: #b6c5d3; margin: 4px 0; }
.footer-about > p { max-width: 360px; }
.footer-badges { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.footer-badges span { display: inline-flex; align-items: center; min-height: 26px; padding: 0 9px; border-radius: 6px; background: rgba(34, 124, 157, .22); color: #dff6ff; font-size: 12px; font-weight: 800; }
.footer-nav, .footer-contact { display: grid; gap: 7px; }
.footer-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 14px; }
.footer-nav a { color: #b6c5d3; line-height: 1.5; }
.footer-nav a:hover { color: #fff; }
.friend-links { display: flex; flex-wrap: wrap; gap: 8px; }
.friend-links a { color: #dbe7ef; border: 1px solid rgba(255,255,255,.18); border-radius: 6px; padding: 5px 10px; font-size: 13px; background: rgba(255,255,255,.04); }
.friend-links a:hover { border-color: rgba(255,255,255,.36); background: rgba(255,255,255,.08); color: #fff; }
.footer-bottom { display: flex; align-items: center; justify-content: space-between; gap: 12px; border-top: 1px solid rgba(255,255,255,.12); margin-top: 30px; padding-top: 16px; color: #94a3b8; font-size: 13px; }

@media (max-width: 960px) {
  .hero-grid, .home-top, .home-tabs, .split, .faq-grid, .docs-layout, .contact-grid, .feedback-layout, .article-list-layout, .article-page-layout, .footer-grid { grid-template-columns: 1fr; }
  .home-slider { min-height: 240px; }
  .catalog-head, .catalog-group-head { align-items: start; flex-direction: column; }
  .catalog-group-head p { text-align: left; }
  .home-tab-list { position: static; display: flex; overflow-x: auto; padding-bottom: 4px; }
  .home-tab { min-width: 150px; }
  .book-grid, .book-grid.in-list, .book-grid.root-list, .book-grid.home-tab-books, .chapter-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-grid, .process-grid { grid-template-columns: repeat(2, 1fr); }
  .book-sidebar { position: static; max-height: none; }
  .doc-toc-panel, .article-list-sidebar { position: static; max-height: none; }
  .footer-bottom { align-items: flex-start; flex-direction: column; }
  h1 { font-size: 34px; }
}

@media (max-width: 680px) {
  .container { width: min(100% - 24px, 1180px); }
  .section { padding: 38px 0; }
  .nav-toggle { display: block; }
  .nav-wrap { flex-wrap: wrap; }
  .nav-menu { display: none; width: 100%; justify-content: flex-start; padding-bottom: 12px; }
  .nav-menu.is-open { display: flex; }
  .nav-menu a { width: 100%; }
  .page-banner-inner { min-height: 128px; }
  .page-banner h1 { font-size: 27px; }
  .hero { padding-top: 34px; }
  .home-slide span { left: 18px; right: 18px; bottom: 18px; }
  .home-slide strong { font-size: 21px; }
  .group-head { align-items: start; flex-direction: column; }
  h1 { font-size: 29px; }
  h2 { font-size: 24px; }
  .book-grid, .book-grid.in-list, .book-grid.root-list, .book-grid.home-tab-books, .chapter-grid, .feature-grid, .stats-grid, .process-grid, .related-grid { grid-template-columns: 1fr; }
  .reader { padding: 22px; }
  .reader-head h1 { font-size: 24px; line-height: 1.32; }
  .article-list-head { padding: 20px; }
  .article-list-head h1 { font-size: 24px; }
  .article-list-item { padding: 18px; }
  .article-list-item h2 { font-size: 18px; }
  .article-list-actions { align-items: flex-start; flex-direction: column; }
  .read-more { margin-left: 0; padding-left: 0; }
  .docs-detail-layout .doc-toc-panel { display: none; }
  .docs-detail-layout .book-sidebar { padding: 12px; overflow: visible; }
  .docs-detail-layout .book-sidebar-toggle { display: block; }
  .docs-detail-layout .book-sidebar .sidebar-title, .docs-detail-layout .book-sidebar .book-group { display: none; }
  .docs-detail-layout .book-sidebar.is-open .sidebar-title, .docs-detail-layout .book-sidebar.is-open .book-group { display: block; }
  .chapter-row { grid-template-columns: 1fr; }
  .book-chapter-link { grid-template-columns: 1fr; }
  .book-chapter-link small { white-space: normal; }
  .message-form { grid-template-columns: 1fr; }
  .prev-next { grid-template-columns: 1fr; }
}
