:root {
  --bg: #f4efe4;
  --paper: rgba(255, 252, 246, 0.9);
  --paper-strong: #fffdfa;
  --paper-soft: rgba(255, 250, 242, 0.78);
  --ink: #1f2937;
  --muted: #5a6472;
  --forest: #17352d;
  --forest-soft: #21463c;
  --gold: #b9812d;
  --gold-soft: rgba(185, 129, 45, 0.12);
  --teal: #0f5f73;
  --line: rgba(31, 41, 55, 0.1);
  --shadow: 0 24px 60px rgba(15, 23, 42, 0.12);
  --shadow-soft: 0 18px 40px rgba(15, 23, 42, 0.08);
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 14px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(185, 129, 45, 0.18), transparent 26%),
    radial-gradient(circle at bottom right, rgba(23, 53, 45, 0.14), transparent 24%),
    linear-gradient(180deg, #f7f2e7 0%, #efe7d8 100%);
  font-family: "PingFang SC", "Hiragino Sans GB", "Noto Sans CJK SC", "Microsoft YaHei", sans-serif;
}

a {
  color: inherit;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent),
    linear-gradient(180deg, var(--forest) 0%, #10261f 100%);
  color: rgba(255, 255, 255, 0.94);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-inner {
  height: 100%;
  padding: 24px 18px 18px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.sidebar-kicker,
.topbar-kicker,
.article-kicker,
.toc-kicker {
  margin: 0 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 12px;
  font-weight: 700;
  color: var(--gold);
}

.sidebar-brand h1,
.article-header h2,
.toc-card h3 {
  margin: 0;
  font-family: "Songti SC", "STSong", "Noto Serif CJK SC", serif;
  letter-spacing: 0.01em;
}

.sidebar-brand h1 {
  font-size: 34px;
  line-height: 1.18;
}

.sidebar-subtitle,
.sidebar-footer p,
.article-description,
.topbar-title {
  margin: 0;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.74);
  font-size: 14px;
}

.search-wrap {
  display: grid;
  gap: 8px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.78);
}

.search-wrap input {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  padding: 12px 14px;
  font: 500 14px "PingFang SC", sans-serif;
  color: white;
  background: rgba(255, 255, 255, 0.08);
  outline: none;
}

.search-wrap input::placeholder {
  color: rgba(255, 255, 255, 0.42);
}

.nav-tree {
  flex: 1;
  overflow: auto;
  padding-right: 6px;
}

.nav-tree::-webkit-scrollbar {
  width: 8px;
}

.nav-tree::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 999px;
}

.nav-section {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
}

.nav-section-title {
  padding: 0 10px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
}

.nav-group {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.04);
}

.nav-group[open] {
  background: rgba(255, 255, 255, 0.07);
}

.nav-summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 14px 14px 13px;
  font-weight: 700;
  font-size: 14px;
}

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

.nav-summary::after {
  content: "+";
  font-size: 18px;
  color: rgba(255, 255, 255, 0.58);
}

.nav-group[open] .nav-summary::after {
  content: "−";
}

.nav-links {
  display: grid;
  gap: 4px;
  padding: 0 8px 8px;
}

.nav-link {
  display: block;
  text-decoration: none;
  padding: 10px 12px;
  border-radius: 12px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 14px;
  line-height: 1.45;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover {
  background: rgba(255, 255, 255, 0.08);
  color: white;
}

.nav-link.is-active {
  background: linear-gradient(135deg, rgba(185, 129, 45, 0.22), rgba(255, 255, 255, 0.08));
  color: white;
  transform: translateX(2px);
}

.nav-link small {
  display: block;
  margin-top: 2px;
  color: rgba(255, 255, 255, 0.46);
}

.sidebar-footer {
  padding: 12px 10px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-footer a {
  display: inline-block;
  margin-top: 8px;
  color: #f9e1b5;
  text-decoration: none;
  font-size: 14px;
}

.main-panel {
  min-width: 0;
  padding: 18px 24px 32px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 7;
  max-height: 360px;
  padding: 10px 0 18px;
  overflow: clip;
  background: linear-gradient(180deg, rgba(244, 239, 228, 0.92), rgba(244, 239, 228, 0.55) 72%, transparent);
  backdrop-filter: blur(8px);
  transition: max-height 0.28s ease, padding 0.28s ease;
}

.topbar.is-compact {
  max-height: 82px;
  padding-top: 4px;
  padding-bottom: 8px;
}

.topbar-surface {
  position: relative;
  width: 100%;
  padding: 16px 18px;
  border-radius: 26px;
  background:
    radial-gradient(circle at top left, rgba(185, 129, 45, 0.08), transparent 20%),
    linear-gradient(180deg, rgba(255, 252, 247, 0.94), rgba(255, 255, 255, 0.98));
  border: 1px solid rgba(23, 53, 45, 0.08);
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.08);
  overflow: visible;
  transition: padding 0.28s ease, border-radius 0.28s ease, box-shadow 0.28s ease, background 0.28s ease;
}

.topbar.is-compact .topbar-surface {
  padding: 8px 12px;
  border-radius: 18px;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.05);
}

.topbar-stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  align-items: center;
}

.nav-toggle {
  display: none;
  border: 0;
  border-radius: 999px;
  padding: 10px 16px;
  background: var(--forest);
  color: white;
  font: 600 14px "PingFang SC", sans-serif;
}

.topic-chip {
  border: 1px solid rgba(23, 53, 45, 0.1);
  border-radius: 999px;
  padding: 8px 12px;
  background: rgba(23, 53, 45, 0.04);
  color: var(--forest-soft);
  font: 600 12px "PingFang SC", sans-serif;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.topic-chip:hover {
  background: rgba(185, 129, 45, 0.12);
  border-color: rgba(185, 129, 45, 0.24);
}

.topbar-search {
  width: 100%;
  position: relative;
}

.search-card {
  position: relative;
  display: grid;
  gap: 10px;
  padding-left: 2px;
  padding-right: 2px;
  transition: gap 0.24s ease;
}

.topbar.is-compact .search-card {
  gap: 0;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
}

.search-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  transition: opacity 0.2s ease;
}

.topbar.is-compact .search-card-head {
  display: inline-flex;
  justify-content: flex-start;
  gap: 8px;
  min-width: 0;
}

.content-search-wrap {
  position: relative;
  display: block;
}

.content-search-wrap::before {
  content: "⌕";
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(23, 53, 45, 0.4);
  font-size: 18px;
  line-height: 1;
}

.content-search-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(23, 53, 45, 0.72);
}

.search-shortcut {
  flex: none;
  border-radius: 999px;
  padding: 6px 10px;
  background: rgba(23, 53, 45, 0.06);
  color: rgba(23, 53, 45, 0.66);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.content-search-wrap input {
  width: 100%;
  border: 1px solid rgba(23, 53, 45, 0.12);
  border-radius: 18px;
  padding: 16px 18px 16px 46px;
  font: 600 18px "PingFang SC", sans-serif;
  color: var(--forest);
  background: rgba(255, 255, 255, 0.96);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.8),
    0 10px 24px rgba(15, 23, 42, 0.05);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease, padding 0.24s ease, font-size 0.24s ease, border-radius 0.24s ease;
}

.content-search-wrap input:focus {
  border-color: rgba(185, 129, 45, 0.42);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 14px 28px rgba(15, 23, 42, 0.08),
    0 0 0 4px rgba(185, 129, 45, 0.1);
  transform: translateY(-1px);
}

.content-search-wrap input::placeholder {
  color: rgba(31, 41, 55, 0.34);
}

.search-status {
  margin: 0;
  font-size: 12px;
  line-height: 1.6;
  color: rgba(23, 53, 45, 0.72);
}

.topic-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  transition: opacity 0.2s ease;
}

.topbar.is-compact .topic-strip,
.topbar.is-compact .search-status {
  display: none;
}

.topbar.is-compact .content-search-wrap input {
  border-radius: 12px;
  padding: 10px 14px 10px 38px;
  font-size: 14px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

.topbar.is-compact .content-search-wrap::before {
  left: 14px;
  font-size: 14px;
}

.topbar.is-compact .content-search-label {
  font-size: 11px;
  letter-spacing: 0.08em;
}

.topbar.is-compact .search-shortcut {
  padding: 5px 9px;
  font-size: 10px;
}

.topbar.is-compact .search-card-head .content-search-label::before {
  content: "⌕";
  display: inline-block;
  margin-right: 6px;
  color: rgba(23, 53, 45, 0.5);
}

.search-results-panel {
  position: absolute;
  top: calc(100% + 12px);
  left: 0;
  right: 0;
  z-index: 9;
  padding: 10px;
  border-radius: 22px;
  background: rgba(255, 253, 248, 0.98);
  border: 1px solid rgba(23, 53, 45, 0.08);
  box-shadow: 0 22px 44px rgba(15, 23, 42, 0.16);
  max-height: min(70vh, 560px);
  overflow: auto;
}

.search-result {
  display: grid;
  gap: 8px;
  padding: 14px 14px 13px;
  border-radius: 16px;
  text-decoration: none;
  transition: background 0.2s ease, transform 0.2s ease;
}

.search-result + .search-result {
  margin-top: 6px;
}

.search-result:hover {
  background: rgba(23, 53, 45, 0.05);
  transform: translateY(-1px);
}

.search-result-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.search-result-title,
.search-result-desc,
.search-result-snippet {
  margin: 0;
}

.search-result-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--forest);
}

.search-result-chip {
  flex: none;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #7a4b12;
  border-radius: 999px;
  padding: 6px 10px;
  background: rgba(185, 129, 45, 0.14);
}

.search-result-desc {
  font-size: 13px;
  color: var(--muted);
}

.search-result-snippet {
  font-size: 14px;
  line-height: 1.6;
  color: #314152;
}

.search-empty {
  padding: 16px 14px;
  border-radius: 16px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.74);
}

.search-result mark,
.search-highlight {
  background: rgba(185, 129, 45, 0.24);
  color: inherit;
  padding: 0 0.18em;
  border-radius: 0.25em;
}

.content-shell {
  max-width: 1380px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 20px;
}

.article-wrap,
.doc-aside {
  min-width: 0;
}

.article-card {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.75), rgba(255, 255, 255, 0.94)),
    linear-gradient(135deg, rgba(185, 129, 45, 0.06), transparent 40%);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 28px 30px 34px;
}

.article-card.is-landing {
  background:
    linear-gradient(180deg, rgba(255, 252, 246, 0.9), rgba(255, 255, 255, 0.96)),
    radial-gradient(circle at top right, rgba(23, 53, 45, 0.06), transparent 28%),
    radial-gradient(circle at bottom left, rgba(185, 129, 45, 0.12), transparent 28%);
}

.article-header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.article-header h2 {
  font-size: clamp(32px, 3.3vw, 50px);
  line-height: 1.12;
  color: #15221e;
}

.article-description {
  margin-top: 12px;
  color: var(--muted);
  font-size: 16px;
  max-width: 760px;
}

.article-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.action-pill {
  border: 1px solid rgba(23, 53, 45, 0.12);
  border-radius: 999px;
  padding: 10px 14px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  color: var(--forest);
  background: rgba(255, 255, 255, 0.8);
}

.action-pill.is-current {
  background: var(--forest);
  color: white;
  border-color: var(--forest);
}

.action-pill.is-resource {
  color: #7a4b12;
  border-color: rgba(185, 129, 45, 0.18);
  background: rgba(255, 246, 229, 0.92);
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 18px 0 4px;
}

.meta-chip {
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--forest);
  background: rgba(23, 53, 45, 0.07);
}

.doc-aside {
  position: relative;
}

.toc-card {
  position: sticky;
  top: 106px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0.95)),
    linear-gradient(135deg, rgba(185, 129, 45, 0.06), transparent 50%);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 24px;
  box-shadow: var(--shadow-soft);
  padding: 20px 18px;
}

.toc-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.toc-toggle {
  display: none;
  flex: none;
  align-items: center;
  justify-content: center;
  min-width: 64px;
  border: 1px solid rgba(23, 53, 45, 0.12);
  border-radius: 999px;
  padding: 9px 12px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--forest);
  font: 700 12px "PingFang SC", sans-serif;
}

.toc-description {
  margin: 10px 0 0;
  font-size: 13px;
  line-height: 1.6;
  color: var(--muted);
}

.toc-body {
  margin-top: 16px;
}

.page-toc {
  display: grid;
  gap: 6px;
}

.toc-link {
  display: block;
  text-decoration: none;
  color: #425062;
  border-radius: 12px;
  padding: 10px 12px;
  line-height: 1.45;
  font-size: 14px;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.toc-link:hover {
  background: rgba(23, 53, 45, 0.06);
  color: var(--forest);
}

.toc-link.is-active {
  background: rgba(23, 53, 45, 0.09);
  color: var(--forest);
  transform: translateX(2px);
}

.toc-level-3 {
  padding-left: 24px;
}

.toc-level-4 {
  padding-left: 34px;
}

.toc-empty {
  font-size: 14px;
  line-height: 1.6;
  color: var(--muted);
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(23, 53, 45, 0.05);
}

.markdown-body {
  padding-top: 6px;
  color: #22303d;
  font-size: 18px;
  line-height: 1.82;
}

.markdown-body > :first-child {
  margin-top: 0;
}

.markdown-body h1,
.markdown-body h2,
.markdown-body h3,
.markdown-body h4,
.markdown-body h5,
.markdown-body h6 {
  font-family: "Songti SC", "STSong", "Noto Serif CJK SC", serif;
  line-height: 1.32;
  letter-spacing: 0.01em;
  color: #13211c;
  scroll-margin-top: 120px;
}

.markdown-body h1 {
  font-size: 34px;
  margin: 1.5em 0 0.7em;
}

.markdown-body h2 {
  font-size: 28px;
  margin: 1.55em 0 0.65em;
  padding-top: 0.25em;
}

.markdown-body h3 {
  font-size: 23px;
  margin: 1.3em 0 0.55em;
}

.markdown-body h4 {
  font-size: 20px;
  margin: 1.2em 0 0.45em;
}

.markdown-body p,
.markdown-body ul,
.markdown-body ol,
.markdown-body blockquote,
.markdown-body pre,
.markdown-body .table-wrap {
  margin: 0 0 1em;
}

.markdown-body ul,
.markdown-body ol {
  padding-left: 1.4em;
}

.markdown-body li + li {
  margin-top: 0.34em;
}

.markdown-body code {
  font-family: "SFMono-Regular", "Menlo", "Monaco", "Consolas", monospace;
  font-size: 0.92em;
  padding: 0.14em 0.42em;
  border-radius: 8px;
  background: rgba(23, 53, 45, 0.08);
}

.markdown-body pre {
  overflow: auto;
  padding: 16px 18px;
  border-radius: 16px;
  background: #11231f;
  color: rgba(255, 255, 255, 0.95);
}

.markdown-body pre code {
  padding: 0;
  background: transparent;
  color: inherit;
}

.markdown-body blockquote {
  padding: 16px 18px;
  border-left: 4px solid var(--gold);
  border-radius: 0 16px 16px 0;
  background: rgba(185, 129, 45, 0.08);
  color: #4f5764;
}

.markdown-body img {
  display: block;
  width: 100%;
  max-width: 940px;
  margin: 22px auto;
  border-radius: 20px;
  border: 1px solid rgba(31, 41, 55, 0.08);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
  background: white;
}

.markdown-body .table-wrap {
  overflow-x: auto;
  border-radius: 18px;
  border: 1px solid rgba(23, 53, 45, 0.08);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.05);
}

.markdown-body table {
  width: 100%;
  border-collapse: collapse;
  min-width: 420px;
}

.markdown-body thead {
  background: rgba(23, 53, 45, 0.08);
}

.markdown-body th,
.markdown-body td {
  padding: 14px 16px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid rgba(31, 41, 55, 0.08);
}

.markdown-body th {
  font-size: 15px;
  font-weight: 700;
  color: var(--forest);
}

.markdown-body td {
  font-size: 16px;
  line-height: 1.72;
}

.markdown-body tbody tr:nth-child(even) {
  background: rgba(185, 129, 45, 0.04);
}

.markdown-body tbody tr:last-child td {
  border-bottom: 0;
}

.markdown-body a {
  color: var(--teal);
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.empty-state,
.error-state {
  border-radius: 20px;
  padding: 28px;
  margin-top: 12px;
  background: rgba(255, 255, 255, 0.8);
  border: 1px dashed rgba(23, 53, 45, 0.16);
  color: var(--muted);
}

.landing-page {
  display: grid;
  gap: 24px;
}

.landing-hero,
.landing-section,
.landing-publish-card {
  border-radius: 26px;
}

.landing-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap: 20px;
  padding: 26px;
  background:
    linear-gradient(135deg, rgba(23, 53, 45, 0.96), rgba(23, 53, 45, 0.82)),
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.12), transparent 30%);
  color: white;
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.14);
}

.landing-eyebrow,
.landing-section-kicker {
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #e9c27a;
}

.landing-hero h1,
.landing-section h2,
.landing-roadmap-item h3 {
  margin: 0;
  font-family: "Songti SC", "STSong", "Noto Serif CJK SC", serif;
  letter-spacing: 0.01em;
}

.landing-hero h1 {
  font-size: clamp(34px, 4vw, 54px);
  line-height: 1.12;
  max-width: 13em;
}

.landing-lead {
  margin: 16px 0 0;
  max-width: 46em;
  font-size: 16px;
  line-height: 1.86;
  color: rgba(255, 255, 255, 0.82);
}

.landing-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}

.landing-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
}

.landing-button.is-primary {
  color: #10261f;
  border-color: transparent;
  background: linear-gradient(135deg, #f3d39a, #f6e2be);
}

.landing-hero-side {
  display: grid;
  gap: 12px;
}

.landing-stat {
  padding: 18px 18px 16px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.landing-stat span {
  display: block;
  font-size: 32px;
  font-weight: 800;
  color: #f3d39a;
}

.landing-stat strong,
.landing-route-card strong,
.landing-chapter-link strong {
  display: block;
  margin-top: 6px;
  font-size: 18px;
  line-height: 1.4;
}

.landing-stat p,
.landing-route-card p,
.landing-roadmap-item p,
.landing-section-head p,
.landing-publish-list p {
  margin: 8px 0 0;
  line-height: 1.72;
}

.landing-stat p {
  color: rgba(255, 255, 255, 0.74);
}

.landing-section {
  padding: 24px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.76), rgba(255, 255, 255, 0.96)),
    linear-gradient(135deg, rgba(185, 129, 45, 0.06), transparent 55%);
  border: 1px solid rgba(255, 255, 255, 0.56);
  box-shadow: var(--shadow-soft);
}

.landing-section-head h2 {
  font-size: clamp(28px, 3vw, 40px);
  color: #15221e;
}

.landing-section-head p:last-child {
  color: var(--muted);
}

.landing-route-grid,
.landing-chapter-grid {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.landing-route-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.landing-route-card,
.landing-chapter-link {
  display: block;
  padding: 18px;
  border-radius: 20px;
  text-decoration: none;
  color: inherit;
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(23, 53, 45, 0.08);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.landing-route-card:hover,
.landing-chapter-link:hover {
  transform: translateY(-2px);
  border-color: rgba(185, 129, 45, 0.26);
  box-shadow: 0 18px 34px rgba(15, 23, 42, 0.08);
}

.landing-route-card span,
.landing-chapter-link span,
.landing-roadmap-chapters,
.landing-chapter-link em {
  display: block;
  margin-top: 8px;
  font-style: normal;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8c611f;
}

.landing-roadmap {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.landing-roadmap-item {
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr);
  gap: 16px;
  padding: 18px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(23, 53, 45, 0.08);
}

.landing-roadmap-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 68px;
  height: 68px;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(185, 129, 45, 0.16), rgba(23, 53, 45, 0.08));
  color: var(--forest);
  font-size: 22px;
  font-weight: 800;
}

.landing-roadmap-item h3 {
  font-size: 24px;
}

.landing-roadmap-chapters {
  margin-top: 8px;
}

.landing-chapter-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.landing-publish-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  padding: 20px;
  background: linear-gradient(180deg, rgba(255, 248, 236, 0.92), rgba(255, 255, 255, 0.96));
  border: 1px solid rgba(185, 129, 45, 0.16);
  box-shadow: var(--shadow-soft);
}

.landing-publish-list {
  display: grid;
  gap: 10px;
}

.landing-publish-list p {
  position: relative;
  padding-left: 18px;
}

.landing-publish-list p::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.8em;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--gold);
}

.landing-publish-actions {
  display: grid;
  align-content: start;
  gap: 10px;
}

.pager {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 18px;
}

.pager-link {
  min-height: 88px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  text-decoration: none;
  padding: 16px 18px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid rgba(255, 255, 255, 0.52);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
}

.pager-link span {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
}

.pager-link strong {
  color: var(--forest);
  font-size: 16px;
  line-height: 1.45;
}

.pager-link.is-empty {
  visibility: hidden;
}

.sidebar-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.38);
  z-index: 8;
}

@media (max-width: 1240px) {
  .content-shell {
    grid-template-columns: 1fr;
  }

  .doc-aside {
    order: -1;
  }

  .toc-card {
    position: static;
  }

  .landing-route-grid,
  .landing-chapter-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1080px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: min(88vw, 340px);
    transform: translateX(-100%);
    transition: transform 0.22s ease;
    z-index: 10;
  }

  body.nav-open .sidebar {
    transform: translateX(0);
  }

  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .main-panel {
    padding: 14px 14px 28px;
  }

  .topbar {
    max-height: 440px;
  }

  .topbar.is-compact {
    max-height: 74px;
  }

  .topbar-surface {
    padding: 14px;
  }

  .topbar-stage {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .topbar-search {
    width: 100%;
  }

  .article-card {
    padding: 22px 18px 26px;
    border-radius: 24px;
  }

  .article-header {
    flex-direction: column;
  }

  .article-actions {
    justify-content: flex-start;
  }

  .landing-hero,
  .landing-publish-card {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .topbar {
    max-height: 232px;
    padding: 6px 0 12px;
  }

  .topbar.is-compact {
    max-height: 66px;
    padding-top: 2px;
    padding-bottom: 6px;
  }

  .topbar-surface {
    padding: 12px;
    border-radius: 22px;
  }

  .search-card {
    gap: 8px;
  }

  .search-shortcut,
  .topic-strip,
  .search-status {
    display: none;
  }

  .content-search-label {
    font-size: 11px;
    letter-spacing: 0.08em;
  }

  .pager,
  .landing-route-grid,
  .landing-chapter-grid {
    grid-template-columns: 1fr;
  }

  .content-search-wrap input {
    padding: 12px 14px 12px 40px;
    font-size: 15px;
    border-radius: 14px;
  }

  .content-search-wrap::before {
    left: 14px;
    font-size: 15px;
  }

  .search-card-head {
    gap: 8px;
  }

  .content-shell {
    gap: 14px;
  }

  .article-card {
    padding: 18px 14px 22px;
    border-radius: 20px;
  }

  .article-header {
    gap: 14px;
    padding-bottom: 14px;
  }

  .article-header h2 {
    font-size: clamp(26px, 8vw, 32px);
  }

  .article-description {
    margin-top: 8px;
    font-size: 14px;
    line-height: 1.65;
  }

  .article-actions {
    flex-wrap: nowrap;
    overflow-x: auto;
    width: calc(100% + 4px);
    margin-inline: -2px;
    padding-bottom: 4px;
    justify-content: flex-start;
    scrollbar-width: none;
  }

  .article-actions::-webkit-scrollbar {
    display: none;
  }

  .action-pill {
    white-space: nowrap;
    padding: 9px 12px;
    font-size: 12px;
  }

  .article-meta {
    gap: 8px;
    padding-top: 14px;
  }

  .meta-chip {
    padding: 7px 10px;
    font-size: 11px;
  }

  .markdown-body {
    font-size: 16px;
    line-height: 1.78;
  }

  .markdown-body h1 {
    font-size: 30px;
  }

  .markdown-body h2 {
    font-size: 24px;
  }

  .markdown-body h3 {
    font-size: 20px;
  }

  .markdown-body blockquote,
  .markdown-body pre {
    padding: 14px;
  }

  .markdown-body img {
    margin: 18px auto;
    border-radius: 16px;
  }

  .doc-aside {
    order: 1;
  }

  .toc-card {
    border-radius: 18px;
    padding: 16px 14px;
  }

  .toc-head {
    align-items: center;
  }

  .toc-description {
    margin-top: 6px;
    font-size: 12px;
  }

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

  .toc-body {
    display: none;
    margin-top: 14px;
  }

  .toc-card.is-open .toc-body {
    display: block;
  }

  .toc-link {
    padding: 9px 10px;
    font-size: 13px;
  }

  .toc-empty {
    padding: 8px 10px;
    font-size: 13px;
  }

  .pager-link {
    min-height: 74px;
    padding: 14px;
  }

  .pager-link strong {
    font-size: 15px;
  }

  .landing-roadmap-item {
    grid-template-columns: 1fr;
  }

  .landing-roadmap-index {
    width: 56px;
    height: 56px;
    border-radius: 18px;
  }
}
