:root {
  color-scheme: light;
  --bg: #f5f7fb;
  --bg-soft: #eef2f8;
  --panel: rgba(255, 255, 255, 0.92);
  --panel-strong: rgba(255, 255, 255, 0.98);
  --panel-muted: rgba(247, 249, 253, 0.92);
  --line: rgba(96, 122, 172, 0.14);
  --line-strong: rgba(96, 122, 172, 0.24);
  --text: #1e2a42;
  --text-soft: #41506c;
  --muted: #70809f;
  --accent: #5e82e6;
  --accent-strong: #4e73d7;
  --accent-2: #33b394;
  --danger: #d96a6a;
  --shadow: 0 18px 48px rgba(61, 83, 125, 0.10);
  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 12px;
  --content-width: 1680px;
  --sidebar-width: 300px;
  --font-sans: "Inter", "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-mono: "JetBrains Mono", "Cascadia Code", "Consolas", monospace;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-sans);
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(94, 130, 230, 0.12), transparent 28%),
    radial-gradient(circle at top right, rgba(51, 179, 148, 0.08), transparent 24%),
    linear-gradient(180deg, #f8faff 0%, #f3f6fb 100%);
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

code,
pre {
  font-family: var(--font-mono);
}

.shell {
  width: min(var(--content-width), calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 28px;
}

.topbar {
  position: sticky;
  top: 14px;
  z-index: 50;
  width: 100%;
  max-width: 100%;
  height: 70px;
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  align-items: center;
  padding: 10px 12px;
  margin-bottom: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.topbar.is-collapsed {
  width: fit-content;
}

.topbar-brand {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-right: 6px;
  padding-right: 10px;
  border-right: 1px solid var(--line);
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #7aa2ff, #49c7a7);
  color: #ffffff;
  font-weight: 800;
  font-size: 13px;
}

.brand-copy strong {
  display: block;
  font-size: 13px;
  color: var(--text);
}

.brand-copy span {
  display: block;
  font-size: 11px;
  color: var(--muted);
}

.topbar-toggle {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--text-soft);
  cursor: pointer;
  transition: 160ms ease;
}

.topbar-toggle:hover {
  border-color: rgba(122, 162, 255, 0.3);
  background: rgba(122, 162, 255, 0.1);
  color: var(--text);
}

.topbar-toggle-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  color: var(--muted);
  font-size: 16px;
  line-height: 1;
}

.topbar-nav {
  position: absolute;
  top: 10px;
  left: 245px;
  right: 12px;
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  min-width: 0;
  height: 50px;
  align-items: flex-start;
  padding: 0 0 8px;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
  opacity: 1;
  pointer-events: auto;
  transition: opacity 160ms ease;
}

.topbar.is-collapsed .topbar-nav {
  opacity: 0;
  pointer-events: none;
}

.topbar-link {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
  color: var(--text-soft);
  font-size: 13px;
  white-space: nowrap;
  transition: 160ms ease;
}

.topbar-link:hover,
.topbar-link.is-active {
  border-color: rgba(122, 162, 255, 0.38);
  background: rgba(122, 162, 255, 0.12);
  color: var(--text);
}

.page-layout {
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  gap: 16px;
}

.sidebar {
  position: sticky;
  top: 82px;
  align-self: start;
  max-height: calc(100vh - 100px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--panel);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow);
  padding: 18px;
}

.sidebar-title {
  margin: 0 0 6px;
  font-size: 13px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.sidebar-page {
  margin: 0 0 14px;
  font-size: 20px;
  line-height: 1.25;
}

.sidebar-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 16px;
}

.meta-card {
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.78);
}

.meta-card strong {
  display: block;
  font-size: 16px;
  color: var(--text);
}

.meta-card span {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  color: var(--muted);
}

.toc-label {
  margin: 0 0 10px;
  font-size: 12px;
  color: var(--muted);
}

.toc {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 4px;
}

.toc a {
  display: block;
  padding: 8px 10px;
  border-radius: 12px;
  color: var(--text-soft);
  font-size: 13px;
  line-height: 1.4;
  transition: 160ms ease;
}

.toc a:hover {
  background: rgba(122, 162, 255, 0.10);
  color: var(--text);
}

.toc a.is-active,
.toc a[aria-current="location"] {
  background: rgba(122, 162, 255, 0.14);
  color: var(--text);
  font-weight: 600;
}

.toc .level-3 a {
  margin-left: 12px;
  font-size: 12px;
  color: var(--muted);
}

.content {
  min-width: 0;
}

.hero,
.doc-body,
.home-hero,
.home-grid {
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--panel);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow);
}

.hero,
.home-hero {
  padding: 24px 26px;
  margin-bottom: 16px;
}

.hero-kicker,
.home-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(94, 130, 230, 0.10);
  color: var(--accent-strong);
  font-size: 12px;
}

.hero h1,
.home-hero h1 {
  margin: 14px 0 10px;
  font-size: clamp(28px, 4vw, 38px);
  line-height: 1.14;
}

.hero p,
.home-hero p {
  margin: 0;
  color: var(--text-soft);
  font-size: 15px;
  line-height: 1.75;
}

.hero-strip,
.home-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.chip {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.82);
  color: var(--text-soft);
  font-size: 12px;
}

.doc-body {
  padding: 22px 26px 28px;
}

.doc-section {
  margin-bottom: 22px;
  scroll-margin-top: 92px;
}

.doc-section:last-child {
  margin-bottom: 0;
}

.section-head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.section-index {
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.10em;
}

.section-head h2 {
  margin: 0;
  font-size: 24px;
  line-height: 1.25;
}

.doc-body h3,
.doc-body h4 {
  margin: 18px 0 10px;
  line-height: 1.35;
  scroll-margin-top: 92px;
}

.doc-body h3 {
  font-size: 19px;
}

.doc-body h4 {
  font-size: 16px;
  color: var(--text-soft);
}

.doc-body p {
  margin: 0 0 12px;
  color: var(--text-soft);
  font-size: 14px;
  line-height: 1.82;
}

.doc-body ul,
.doc-body ol {
  margin: 0 0 14px 22px;
  padding-left: 18px;
  color: var(--text-soft);
}

.doc-body li {
  margin: 6px 0;
  line-height: 1.74;
}

.doc-body strong {
  color: var(--text);
}

.inline-code {
  padding: 2px 7px;
  border-radius: 8px;
  background: rgba(94, 130, 230, 0.10);
  color: #3158bf;
  font-size: 0.92em;
}

.doc-link {
  color: #4e73d7;
  text-decoration: underline;
  text-decoration-color: rgba(78, 115, 215, 0.32);
  text-underline-offset: 3px;
}

.doc-link:hover {
  color: #3158bf;
}

.download-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 10px;
  border: 1px solid rgba(94, 130, 230, 0.18);
  background: linear-gradient(180deg, #5e82e6 0%, #4e73d7 100%);
  color: #ffffff;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  box-shadow: 0 10px 24px rgba(78, 115, 215, 0.18);
  transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease;
}

.download-link:hover {
  color: #ffffff;
  filter: brightness(1.03);
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(78, 115, 215, 0.22);
}

.image-block {
  margin: 14px 0 16px;
  padding: 10px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(248, 250, 255, 0.92);
}

.image-block img {
  width: 100%;
  border-radius: 12px;
  object-fit: contain;
  background: rgba(255, 255, 255, 0.72);
}

.image-block figcaption {
  margin-top: 8px;
  font-size: 12px;
  color: var(--muted);
}

.code-block {
  margin: 0 0 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  background: #f6f8fc;
}

.code-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
  background: rgba(94, 130, 230, 0.06);
  color: var(--muted);
  font-size: 12px;
}

.code-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.copy-code-button {
  border: 1px solid rgba(94, 130, 230, 0.16);
  border-radius: 999px;
  padding: 4px 10px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--text-soft);
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
  transition: 160ms ease;
}

.copy-code-button:hover {
  border-color: rgba(94, 130, 230, 0.3);
  background: rgba(94, 130, 230, 0.1);
  color: var(--text);
}

.code-block pre {
  margin: 0;
  padding: 14px 16px;
  overflow: auto;
  font-size: 13px;
  line-height: 1.7;
  color: #22314f;
}

.mermaid-block {
  margin: 0 0 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  background: #f6f8fc;
}

.mermaid-block .code-head {
  border-bottom: 1px solid var(--line);
}

.mermaid-block pre.mermaid {
  margin: 0;
  padding: 14px 16px;
  overflow: auto;
  background: #ffffff;
}

.mermaid-block svg {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
}

.ascii-diagram-block {
  margin: 0 0 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  background: #f6f8fc;
}

.ascii-diagram-block .code-head {
  border-bottom: 1px solid var(--line);
}

.ascii-diagram-canvas {
  padding: 12px 14px 14px;
  overflow: auto;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(246, 249, 255, 0.98));
}

.ascii-diagram-canvas svg {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
}

.ascii-diagram-source {
  display: none;
}

.panel-diagram-block {
  margin: 0 0 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  background: #f6f8fc;
}

.panel-diagram-block .code-head {
  border-bottom: 1px solid var(--line);
}

.panel-diagram-wrap {
  padding: 20px 24px 24px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(246, 249, 255, 0.98));
}

.panel-diagram {
  display: grid;
  grid-template-columns: minmax(220px, 320px) minmax(120px, 180px) minmax(220px, 320px);
  gap: 20px;
  align-items: stretch;
  justify-content: center;
}

.panel-diagram-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #2c3e67;
  text-align: center;
}

.panel-diagram-label {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.2;
}

.panel-diagram-arrows {
  font-size: 34px;
  line-height: 1;
  letter-spacing: 6px;
}

.panel-card {
  border: 3px solid #2c3e67;
  background: #ffffff;
  display: grid;
  grid-template-rows: 1fr auto;
  min-height: 200px;
}

.panel-card-head {
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
}

.panel-card-title {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.2;
  color: #2c3e67;
}

.panel-card-subtitle {
  font-size: 16px;
  line-height: 1.25;
  color: #34476f;
}

.panel-card-divider {
  border-top: 3px solid #2c3e67;
}

.panel-card-list {
  margin: 0;
  padding: 16px 22px 18px 40px;
  color: #2c3e67;
  font-size: 16px;
  line-height: 1.45;
}

.panel-card-list li + li {
  margin-top: 6px;
}

.layer-stack-block {
  margin: 0 0 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  background: #f6f8fc;
}

.layer-stack-block .code-head {
  border-bottom: 1px solid var(--line);
}

.layer-stack-wrap {
  padding: 18px 22px 22px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(246, 249, 255, 0.98));
}

.layer-stack {
  display: grid;
  gap: 14px;
}

.layer-band {
  border: 2px solid #2c3e67;
  border-radius: 14px;
  background: #ffffff;
  padding: 14px 16px 16px;
}

.layer-band-title {
  font-size: 18px;
  font-weight: 700;
  color: #2c3e67;
  line-height: 1.3;
  margin-bottom: 12px;
}

.layer-app-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 12px;
}

.layer-protocol-card {
  border: 2px solid #2c3e67;
  border-radius: 12px;
  min-height: 92px;
  padding: 14px 12px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  background: #ffffff;
}

.layer-protocol-title {
  font-size: 18px;
  font-weight: 700;
  color: #2c3e67;
  line-height: 1.2;
}

.layer-protocol-subtitle {
  margin-top: 8px;
  font-size: 15px;
  color: #41506c;
  line-height: 1.25;
}

.layer-band-main {
  display: grid;
  grid-template-columns: minmax(220px, 360px) auto minmax(180px, 240px);
  gap: 18px;
  align-items: center;
  justify-content: center;
}

.layer-core-card {
  border: 2px solid #2c3e67;
  border-radius: 12px;
  min-height: 72px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  text-align: center;
  font-size: 20px;
  font-weight: 700;
  color: #2c3e67;
  line-height: 1.25;
}

.layer-side-note {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #2c3e67;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.3;
}

.layer-side-arrow {
  font-size: 26px;
  line-height: 1;
}

.layer-stack-down {
  display: flex;
  justify-content: center;
  align-items: center;
  color: #2c3e67;
  font-size: 26px;
  line-height: 1;
  margin-top: -4px;
}

.sequence-diagram-block,
.url-breakdown-block {
  margin: 0 0 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  background: #f6f8fc;
}

.sequence-diagram-block .code-head,
.url-breakdown-block .code-head {
  border-bottom: 1px solid var(--line);
}

.sequence-diagram-wrap,
.url-breakdown-wrap {
  padding: 22px 26px 24px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(246, 249, 255, 0.98));
}

.sequence-diagram {
  max-width: 700px;
  margin: 0 auto;
}

.sequence-diagram-head {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-bottom: 10px;
  color: #2c3e67;
  font-size: 18px;
  font-weight: 700;
}

.sequence-diagram-head span:last-child {
  text-align: right;
}

.sequence-diagram-body {
  position: relative;
  display: grid;
  gap: 16px;
  padding: 4px 0 0;
}

.sequence-diagram-body::before,
.sequence-diagram-body::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 0;
  border-left: 3px dashed #2c3e67;
}

.sequence-diagram-body::before {
  left: 28px;
}

.sequence-diagram-body::after {
  right: 28px;
}

.sequence-step {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  color: #2c3e67;
  min-height: 48px;
}

.sequence-step.is-left {
  justify-content: flex-end;
}

.sequence-arrow {
  flex: 1;
  height: 0;
  border-top: 2px solid #2c3e67;
  position: relative;
  min-width: 110px;
}

.sequence-step.is-right .sequence-arrow::after,
.sequence-step.is-left .sequence-arrow::before {
  content: "";
  position: absolute;
  top: -6px;
  width: 0;
  height: 0;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
}

.sequence-step.is-right .sequence-arrow::after {
  right: -1px;
  border-left: 10px solid #2c3e67;
}

.sequence-step.is-left .sequence-arrow::before {
  left: -1px;
  border-right: 10px solid #2c3e67;
}

.sequence-step-content {
  min-width: 220px;
  text-align: center;
}

.sequence-step-title {
  font-size: 16px;
  font-weight: 700;
  color: #2c3e67;
  line-height: 1.3;
}

.sequence-step-note {
  margin-top: 4px;
  font-size: 15px;
  color: #41506c;
  line-height: 1.25;
}

.url-breakdown {
  max-width: 980px;
  margin: 0 auto;
}

.url-breakdown-value {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  justify-content: center;
  padding: 14px 18px;
  border: 2px solid #2c3e67;
  border-radius: 14px;
  background: #ffffff;
  font-family: var(--font-mono);
  font-size: 22px;
  line-height: 1.35;
  color: #1f2f52;
}

.url-segment {
  padding: 0 2px;
}

.url-segment.protocol { color: #295ea8; }
.url-segment.domain { color: #0f766e; }
.url-segment.port { color: #b45309; }
.url-segment.path { color: #5b3fb3; }
.url-segment.query { color: #c2410c; }
.url-segment.fragment { color: #a21caf; }

.url-breakdown-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(110px, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.url-breakdown-item {
  border: 1px solid rgba(44, 62, 103, 0.18);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.86);
  padding: 12px 12px 14px;
  text-align: center;
}

.url-breakdown-item strong {
  display: block;
  margin-bottom: 6px;
  font-size: 15px;
  color: #2c3e67;
}

.url-breakdown-item span {
  display: block;
  font-size: 14px;
  line-height: 1.35;
  color: #4b5d7f;
  word-break: break-all;
}

@media (max-width: 900px) {
  .panel-diagram {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .panel-diagram-center {
    order: 2;
  }

  .layer-app-grid {
    grid-template-columns: repeat(2, minmax(120px, 1fr));
  }

  .layer-band-main {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .layer-side-note {
    justify-content: center;
  }

  .url-breakdown-grid {
    grid-template-columns: repeat(2, minmax(120px, 1fr));
  }
}

.math-block {
  margin: 0 0 14px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 10px 0;
}

.table-wrap {
  margin: 0 0 14px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.78);
}

.md-table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
}

.md-table th,
.md-table td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(137, 160, 214, 0.12);
  text-align: left;
  vertical-align: top;
  font-size: 13px;
  line-height: 1.65;
  color: var(--text-soft);
}

.md-table th {
  color: var(--text);
  background: rgba(94, 130, 230, 0.08);
  font-weight: 700;
}

.md-quote {
  margin: 0 0 14px;
  padding: 14px 16px;
  border-left: 4px solid var(--accent-2);
  border-radius: 14px;
  background: rgba(51, 179, 148, 0.08);
}

.md-quote p:last-child,
.md-quote ul:last-child,
.md-quote ol:last-child {
  margin-bottom: 0;
}

.home-grid {
  padding: 18px;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.doc-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 220px;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.76);
}

.doc-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.doc-card-index {
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.doc-card-tag {
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(94, 130, 230, 0.10);
  color: var(--accent-strong);
  font-size: 11px;
}

.doc-card h2 {
  margin: 0;
  font-size: 20px;
  line-height: 1.3;
}

.doc-card p {
  margin: 0;
  color: var(--text-soft);
  font-size: 14px;
  line-height: 1.72;
}

.doc-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
}

.doc-card-meta span {
  padding: 5px 8px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
}

.doc-card-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  margin-top: 2px;
  padding: 8px 12px;
  border-radius: 12px;
  background: rgba(94, 130, 230, 0.14);
  color: var(--text);
  font-size: 13px;
}

.doc-card-link:hover {
  background: rgba(94, 130, 230, 0.22);
}

@media (max-width: 1260px) {
  .page-layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    max-height: none;
  }

  .card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .shell {
    width: min(100%, calc(100% - 20px));
    padding-top: 10px;
  }

  .topbar {
    top: 8px;
    padding: 10px;
  }

  .topbar-brand {
    padding-right: 10px;
    margin-right: 4px;
  }

  .hero,
  .home-hero,
  .doc-body,
  .home-grid,
  .sidebar {
    padding: 16px;
  }

  .card-grid {
    grid-template-columns: 1fr;
  }

  .hero h1,
  .home-hero h1 {
    font-size: 26px;
  }

  .section-head h2 {
    font-size: 20px;
  }
}
