*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  --bg: #0f1419;
  --bg-rgb: 15, 20, 25;
  --card: #1a1f26;
  --card-rgb: 26, 31, 38;
  --panel: #11171d;
  --panel-soft: rgba(15, 20, 25, 0.5);
  --border: #1f2937;
  --border-soft: rgba(31, 41, 55, 0.72);
  --primary: #1e88e5;
  --primary-rgb: 30, 136, 229;
  --purple: #a855f7;
  --green: #22c55e;
  --orange: #f97316;
  --yellow: #eab308;
  --text: #f8fafc;
  --text-secondary: #b0bec5;
  --text-muted: #78909c;
  --container: 1184px;
  --radius: 8px;
  --shadow-hover: 0 6px 20px rgba(var(--primary-rgb), 0.25);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

html {
  scroll-behavior: smooth;
  scrollbar-color: rgba(120, 144, 156, 0.52) rgba(var(--bg-rgb), 0.35);
  scrollbar-width: thin;
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: rgba(var(--bg-rgb), 0.35);
}

::-webkit-scrollbar-thumb {
  border: 2px solid rgba(var(--bg-rgb), 0.35);
  border-radius: 999px;
  background: rgba(120, 144, 156, 0.48);
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(148, 163, 184, 0.7);
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 20% 0%, rgba(var(--primary-rgb), 0.09), transparent 28rem),
    radial-gradient(circle at 85% 20%, rgba(34, 197, 94, 0.05), transparent 32rem);
  opacity: 0.55;
  z-index: -1;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

img {
  display: block;
  max-width: 100%;
}

.container {
  width: min(100% - 48px, var(--container));
  margin: 0 auto;
}

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  height: 56px;
  background: rgba(var(--card-rgb), 0.92);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(12px);
}

.nav-wrap {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
}

.brand-logo {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  overflow: hidden;
  background: var(--primary);
  box-shadow: 0 0 18px rgba(var(--primary-rgb), 0.38);
}

.brand-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.nav-link {
  padding: 8px 14px;
  border-radius: var(--radius);
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 600;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: #fff;
  background: rgba(15, 20, 25, 0.64);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.social-icon {
  width: 20px;
  height: 20px;
  display: inline-grid;
  place-items: center;
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 800;
  opacity: 0.92;
  transition: color 0.2s ease, transform 0.2s ease;
}

.social-icon img {
  width: 18px;
  height: 18px;
  display: block;
}

.social-icon:hover {
  color: #fff;
  transform: translateY(-1px);
}

.social-icon:hover img {
  filter: brightness(1.5);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 38px;
  padding: 9px 16px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  transition: opacity 0.2s ease, transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
  opacity: 0.92;
  transform: translateY(-1px);
}

.btn-secondary {
  background: rgba(15, 20, 25, 0.55);
  border-color: var(--border);
}

.menu-toggle {
  display: none;
  width: 38px;
  height: 38px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(15, 20, 25, 0.55);
  color: #fff;
}

.menu-toggle span,
.menu-toggle::before,
.menu-toggle::after {
  content: "";
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: currentColor;
  border-radius: 999px;
}

.page-main {
  padding-top: 56px;
}

.page-shell {
  padding: 112px 0 80px;
  min-height: calc(100vh - 420px);
}

.page-title {
  margin-bottom: 48px;
}

.page-title h1 {
  margin: 0 0 12px;
  font-size: clamp(36px, 4vw, 48px);
  line-height: 1.08;
  letter-spacing: 0;
  font-weight: 900;
}

.page-title p,
.section-heading p,
.muted {
  color: var(--text-secondary);
}

.section {
  padding: 80px 0;
}

.section-card {
  background: var(--card);
}

.section-gradient-down {
  background: linear-gradient(180deg, var(--bg), var(--card));
}

.section-gradient-up {
  background: linear-gradient(180deg, var(--card), var(--bg));
}

.section-heading {
  margin: 0 auto 42px;
  text-align: center;
}

.section-heading h2 {
  margin: 0 0 10px;
  font-size: clamp(32px, 4.4vw, 44px);
  line-height: 1.1;
  font-weight: 900;
}

.section-heading p {
  margin: 0;
  font-size: 15px;
}

.hero {
  position: relative;
  height: min(800px, 52vw);
  min-height: 520px;
  overflow: hidden;
  background: #0a0e13;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  opacity: 0;
  transform: scale(1.015);
  transition: opacity 0.7s ease, transform 0.9s ease;
  background-image: var(--hero-bg);
  background-size: cover;
  background-position: center;
}

.hero-slide.is-active {
  opacity: 1;
  transform: scale(1);
}

.hero-slide::before,
.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero-slide::before {
  background: linear-gradient(180deg, rgba(var(--bg-rgb), 0.76), rgba(var(--bg-rgb), 0.54), rgba(var(--bg-rgb), 0.76));
}

.hero-slide::after {
  background: linear-gradient(90deg, rgba(var(--primary-rgb), 0.08), rgba(168, 85, 247, 0.08));
}

.hero-copy {
  position: relative;
  z-index: 2;
  max-width: 760px;
  padding: 0 24px;
  text-align: center;
  text-shadow: 0 4px 24px rgba(0, 0, 0, 0.45);
}

.hero-copy h1 {
  margin: 0 0 10px;
  font-size: clamp(44px, 6vw, 72px);
  line-height: 1.05;
  letter-spacing: 0;
  font-weight: 900;
}

.hero-copy p {
  margin: 0;
  color: rgba(248, 250, 252, 0.76);
  font-size: clamp(16px, 2vw, 20px);
}

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 5;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(var(--bg-rgb), 0.42);
  color: var(--text-secondary);
  backdrop-filter: blur(4px);
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.hero-control:hover {
  border-color: var(--primary);
  background: rgba(var(--primary-rgb), 0.2);
  color: #fff;
  transform: translateY(-50%) scale(1.05);
}

.hero-control.prev {
  left: 16px;
  transform: translateY(-50%);
}

.hero-control.next {
  right: 16px;
  transform: translateY(-50%);
}

.hero-dots {
  position: absolute;
  left: 50%;
  bottom: 24px;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 10px;
  transform: translateX(-50%);
}

.hero-dot {
  width: 7px;
  height: 7px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: var(--text-muted);
  transition: width 0.3s ease, background 0.3s ease;
}

.hero-dot.is-active {
  width: 24px;
  background: var(--primary);
}

.hero-progress {
  position: absolute;
  inset: auto 0 0;
  z-index: 5;
  height: 1px;
  background: rgba(var(--bg-rgb), 0.2);
}

.hero-progress span {
  display: block;
  width: 0;
  height: 100%;
  background: rgba(var(--primary-rgb), 0.5);
}

.hero-progress.is-running span {
  animation: hero-progress 5.5s linear forwards;
}

@keyframes hero-progress {
  from { width: 0; }
  to { width: 100%; }
}

.launch-strip {
  background: var(--card);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 20px 0;
  color: #d5b45a;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}

.grid {
  display: grid;
  gap: 24px;
}

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

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

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

.glow-card {
  position: relative;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(var(--bg-rgb), 0.5);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  isolation: isolate;
}

.glow-card::after {
  content: "";
  position: absolute;
  inset: -2px;
  z-index: -1;
  border-radius: inherit;
  background: radial-gradient(circle at 50% 0%, rgba(var(--primary-rgb), 0.35), transparent 70%);
  filter: blur(14px);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.glow-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-hover);
}

.glow-card:hover {
  transform: translateY(-4px) scale(1.015);
}

.glow-card:hover::after {
  opacity: 0.62;
}

.feature-card,
.entry-card,
.doc-card,
.repo-card,
.release-card,
.issue-card,
.topic-card,
.info-panel,
.compat-panel {
  padding: 28px;
}

.feature-card h3,
.entry-card h3,
.doc-card h3,
.repo-card h3,
.release-card h3,
.issue-card h3,
.topic-card h3,
.info-panel h2,
.compat-panel h2 {
  margin: 0 0 10px;
  color: #fff;
  font-size: 18px;
  font-weight: 800;
}

.feature-card p,
.entry-card p,
.doc-card p,
.repo-card p,
.release-card p,
.issue-card p,
.topic-card p,
.compat-panel p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 14px;
}

.icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  margin-bottom: 20px;
  color: var(--primary);
  font-size: 30px;
  font-weight: 900;
  line-height: 1;
}

.icon-code::before { content: "</>"; font-size: 21px; }
.icon-chip::before { content: "▦"; }
.icon-nodes::before { content: "✣"; }
.icon-book::before { content: "▤"; }
.icon-users::before { content: "♣"; }
.icon-gear::before { content: "⚙"; }
.icon-wifi::before { content: "◜"; }
.icon-github::before {
  content: "";
  display: block;
  width: 28px;
  height: 28px;
  background: url("../img/icon-github.svg") center / contain no-repeat;
}
.icon-alert::before { content: "△"; }
.icon-factory::before { content: "▰"; }
.icon-bag::before { content: "▣"; }
.icon-lab::before { content: "▥"; }

.partner-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 24px;
}

.partner-card {
  min-height: 86px;
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.partner-card img {
  width: 76px;
  height: 38px;
  object-fit: cover;
  filter: grayscale(1);
  opacity: 0.55;
  transition: filter 0.2s ease, opacity 0.2s ease, transform 0.2s ease;
}

.partner-card:hover img {
  filter: grayscale(0);
  opacity: 1;
  transform: scale(1.04);
}

.partner-card span {
  color: var(--text-secondary);
  font-size: 12px;
}

.scene-card {
  overflow: hidden;
}

.scene-image {
  position: relative;
  height: 188px;
  overflow: hidden;
}

.scene-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.scene-image::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent, var(--bg));
}

.scene-card:hover .scene-image img {
  transform: scale(1.05);
}

.scene-body {
  padding: 24px 28px 28px;
}

.platform-pill {
  padding: 26px;
  border-radius: var(--radius);
  text-align: center;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.platform-pill:hover {
  transform: scale(1.05);
  box-shadow: var(--shadow-hover);
}

.blue-soft { background: rgba(59, 130, 246, 0.1); border: 1px solid rgba(59, 130, 246, 0.2); color: #60a5fa; }
.purple-soft { background: rgba(168, 85, 247, 0.1); border: 1px solid rgba(168, 85, 247, 0.2); color: #c084fc; }
.green-soft { background: rgba(34, 197, 94, 0.1); border: 1px solid rgba(34, 197, 94, 0.2); color: #4ade80; }
.orange-soft { background: rgba(249, 115, 22, 0.1); border: 1px solid rgba(249, 115, 22, 0.2); color: #fb923c; }

.quick-grid .entry-card {
  display: block;
}

.site-footer {
  background: #0b1014;
  border-top: 1px solid var(--border);
  padding: 56px 0 32px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 72px;
}

.footer-brand {
  align-items: flex-start;
}

.footer-brand .brand-logo {
  width: 32px;
  height: 32px;
}

.footer-desc {
  max-width: 270px;
  margin: 18px 0;
  color: var(--text-secondary);
  font-size: 14px;
}

.footer-col h3 {
  margin: 0 0 16px;
  font-size: 15px;
  font-weight: 800;
}

.footer-col ul {
  display: grid;
  gap: 12px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.footer-col a {
  color: var(--text-secondary);
  font-size: 14px;
  transition: color 0.2s ease;
}

.footer-col a:hover {
  color: #fff;
}

.footer-bottom {
  margin-top: 48px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  color: var(--text-muted);
  font-size: 13px;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
  gap: 32px;
}

.panel {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(var(--bg-rgb), 0.38);
  padding: 28px;
}

.panel h2 {
  margin: 0 0 24px;
  font-size: 24px;
  font-weight: 900;
}

.topic-list,
.update-list,
.issue-list,
.repo-list,
.release-list {
  display: grid;
  gap: 16px;
}

.topic-card,
.update-card,
.issue-card,
.repo-card,
.release-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(var(--bg-rgb), 0.42);
}

.topic-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  padding: 18px 20px;
}

.topic-card h3 {
  font-size: 17px;
}

.topic-card:hover h3,
.update-card:hover h3 {
  color: var(--primary);
}

.topic-meta,
.repo-meta,
.issue-meta,
.update-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  color: var(--text-muted);
  font-size: 13px;
}

.topic-time {
  color: var(--text-muted);
  white-space: nowrap;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(120, 144, 156, 0.12);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 700;
}

.badge-hot {
  background: rgba(234, 179, 8, 0.12);
  color: #d5b45a;
}

.badge-blue {
  background: rgba(var(--primary-rgb), 0.12);
  color: #60a5fa;
}

.badge-green {
  background: rgba(34, 197, 94, 0.12);
  color: #4ade80;
}

.badge-yellow {
  background: rgba(234, 179, 8, 0.12);
  color: #d5b45a;
}

.side-stack {
  display: grid;
  gap: 24px;
}

.category-list,
.stats-list {
  display: grid;
  gap: 24px;
}

.category-row,
.stat-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  color: var(--text-secondary);
}

.category-row strong,
.stat-row strong {
  color: #fff;
}

.stat-row .online {
  color: #4ade80;
}

.search-box {
  position: relative;
  width: min(100%, 620px);
  margin-top: 44px;
}

.search-box input {
  width: 100%;
  height: 48px;
  padding: 0 20px 0 46px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(var(--bg-rgb), 0.42);
  color: #fff;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-box input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.16);
}

.search-box::before {
  content: "⌕";
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-weight: 800;
}

.doc-card ul,
.platform-card ul,
.release-card ul {
  display: grid;
  gap: 8px;
  padding: 0;
  margin: 16px 0 0;
  list-style: none;
  color: var(--text-secondary);
  font-size: 14px;
}

.update-card {
  padding: 20px;
}

.update-card h3 {
  margin: 0 0 6px;
  font-size: 17px;
}

.github-title {
  display: flex;
  align-items: center;
  gap: 18px;
}

.github-title .icon {
  width: 42px;
  height: 42px;
  margin: 0;
  color: #fff;
  font-size: 18px;
}

.repo-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
}

.repo-lang {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.repo-lang::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: currentColor;
}

.repo-lang.c { color: #3b82f6; }
.repo-lang.md { color: #94a3b8; }
.repo-lang.py { color: #eab308; }

.release-card {
  padding: 22px;
}

.release-card header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 8px;
}

.release-card time {
  color: #d5b45a;
  font-size: 14px;
}

.release-card li::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 9px;
  border-radius: 999px;
  background: var(--primary);
  vertical-align: middle;
}

.issue-card {
  padding: 18px 20px;
}

.issue-card h3 {
  font-size: 16px;
}

.contribute-panel,
.compat-panel {
  margin-top: 40px;
}

.panel-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 22px;
}

.platform-card {
  min-height: 286px;
  padding: 30px;
  border-radius: var(--radius);
}

.platform-card .icon {
  color: currentColor;
}

.platform-card h3 {
  margin: 0 0 10px;
  font-size: 20px;
  color: #fff;
}

.platform-card p {
  margin: 0 0 16px;
  color: var(--text-secondary);
  font-size: 14px;
}

.printer-card {
  min-height: 144px;
  padding: 26px;
}

.printer-card header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.tag {
  padding: 5px 9px;
  border-radius: 5px;
  background: rgba(120, 144, 156, 0.1);
  color: var(--text-secondary);
  font-size: 12px;
}

.not-found {
  display: none;
  margin-top: 18px;
  color: var(--text-muted);
  font-size: 14px;
}

.wiki-title {
  max-width: 860px;
}

.wiki-module-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  align-items: start;
}

.wiki-module {
  overflow: hidden;
}

.wiki-module-head {
  width: 100%;
  min-height: 86px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 22px 24px;
  border: 0;
  background: transparent;
  color: #fff;
  text-align: left;
}

.wiki-module-head .icon {
  margin: 0;
  width: 32px;
  height: 32px;
  font-size: 28px;
}

.wiki-module-head > span:nth-child(2) {
  min-width: 0;
  font-size: 18px;
  font-weight: 850;
  letter-spacing: 0;
}

.wiki-module-mark {
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--text-muted);
  font-size: 18px;
  line-height: 1;
}

.wiki-module-mark::before {
  content: "+";
}

.wiki-module.is-open .wiki-module-mark::before {
  content: "-";
}

.wiki-module-body {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  border-top: 1px solid transparent;
  transition: max-height 0.26s ease, opacity 0.2s ease, border-color 0.2s ease;
}

.wiki-module:hover .wiki-module-body,
.wiki-module:focus-within .wiki-module-body,
.wiki-module.is-open .wiki-module-body {
  max-height: 900px;
  opacity: 1;
  border-top-color: var(--border);
}

.wiki-module-content {
  padding: 22px 24px 24px;
}

.wiki-module-content p,
.wiki-module-content li,
.wiki-module-content td,
.wiki-module-content th {
  overflow-wrap: anywhere;
}

.wiki-module-content p {
  margin: 0 0 14px;
  color: var(--text-secondary);
  font-size: 14px;
}

.wiki-module-content ul,
.wiki-module-content ol {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 20px;
  color: var(--text-secondary);
  font-size: 14px;
}

.wiki-link-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.wiki-link-grid a {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(var(--card-rgb), 0.46);
  color: #60a5fa;
  font-size: 13px;
  font-weight: 750;
}

.wiki-title p,
.knowledge-card p,
.wiki-section header p,
.wiki-article p,
.wiki-article li,
.wiki-callout {
  overflow-wrap: anywhere;
}

.wiki-index {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
}

.knowledge-card {
  min-height: 238px;
  padding: 26px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.knowledge-card h3 {
  margin: 0 0 10px;
  color: #fff;
  font-size: 19px;
  font-weight: 850;
}

.knowledge-card p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 14px;
}

.knowledge-card > span:last-child {
  margin-top: auto;
  padding-top: 18px;
  color: #60a5fa;
  font-size: 13px;
  font-weight: 800;
}

.wiki-overview {
  margin-top: 48px;
}

.wiki-overview p {
  max-width: 880px;
  margin-bottom: 22px;
}

.wiki-section {
  scroll-margin-top: 86px;
  margin-top: 64px;
}

.wiki-section > header {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 24px;
}

.wiki-section > header .icon {
  flex: 0 0 auto;
  margin: 2px 0 0;
}

.wiki-section h2 {
  margin: 0 0 8px;
  color: #fff;
  font-size: clamp(28px, 3vw, 38px);
  line-height: 1.12;
  font-weight: 900;
}

.wiki-section header p {
  max-width: 880px;
  margin: 0;
  color: var(--text-secondary);
}

.wiki-detail-grid,
.wiki-checks {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.wiki-detail-grid.compact {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 22px;
}

.wiki-article {
  padding: 24px;
}

.wiki-article h3 {
  margin: 0 0 12px;
  color: #fff;
  font-size: 18px;
  font-weight: 850;
}

.wiki-article p,
.wiki-article li {
  color: var(--text-secondary);
  font-size: 14px;
}

.wiki-article p {
  margin: 0 0 14px;
}

.wiki-article ul {
  display: grid;
  gap: 8px;
  margin: 14px 0 0;
  padding-left: 18px;
}

.wiki-callout {
  margin-top: 18px;
  padding: 13px 15px;
  border-left: 3px solid var(--primary);
  border-radius: 0 var(--radius) var(--radius) 0;
  background: rgba(var(--primary-rgb), 0.1);
  color: #d7e3ea;
  font-size: 13px;
}

.wiki-table-wrap {
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.wiki-table {
  width: 100%;
  min-width: 780px;
  border-collapse: collapse;
  background: rgba(var(--bg-rgb), 0.34);
}

.wiki-table th,
.wiki-table td {
  padding: 13px 14px;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
  text-align: left;
  vertical-align: top;
  font-size: 14px;
}

.wiki-table th {
  color: #fff;
  background: rgba(var(--card-rgb), 0.76);
  font-weight: 850;
}

.wiki-table td:first-child {
  color: #fff;
  font-weight: 800;
}

.material-table td:first-child {
  color: #60a5fa;
}

.docs-page {
  padding: 88px 0 56px;
}

.docs-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: end;
  margin-bottom: 28px;
}

.docs-hero h1 {
  margin: 0 0 10px;
  font-size: clamp(34px, 4vw, 48px);
  line-height: 1.1;
  font-weight: 900;
}

.docs-hero p {
  margin: 0;
  color: var(--text-secondary);
}

.docs-count {
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(var(--bg-rgb), 0.42);
  color: var(--text-secondary);
  font-size: 13px;
  white-space: nowrap;
}

.docs-layout {
  display: grid;
  grid-template-columns: 318px minmax(0, 1fr) 228px;
  gap: 24px;
  align-items: start;
}

.docs-sidebar,
.docs-toc,
.docs-reader {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(var(--bg-rgb), 0.46);
}

.docs-sidebar,
.docs-toc {
  position: sticky;
  top: 80px;
  max-height: calc(100vh - 104px);
  overflow: auto;
}

.docs-sidebar {
  padding: 18px;
}

.docs-search {
  position: sticky;
  top: 0;
  z-index: 1;
  padding-bottom: 14px;
  background: linear-gradient(180deg, rgba(var(--bg-rgb), 0.96), rgba(var(--bg-rgb), 0.72));
}

.docs-search span {
  display: block;
  margin-bottom: 8px;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 800;
}

.docs-search input {
  width: 100%;
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(var(--card-rgb), 0.75);
  color: #fff;
  outline: none;
}

.docs-search input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.16);
}

.docs-group {
  margin-top: 18px;
}

.docs-group h3 {
  margin: 0 0 8px;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.doc-nav-item {
  width: 100%;
  display: grid;
  gap: 3px;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: transparent;
  color: var(--text-secondary);
  text-align: left;
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.doc-nav-item span {
  color: #fff;
  font-size: 14px;
  font-weight: 750;
}

.doc-nav-item small {
  color: var(--text-muted);
  font-size: 11px;
}

.doc-nav-item:hover,
.doc-nav-item.is-active {
  border-color: rgba(var(--primary-rgb), 0.55);
  background: rgba(var(--primary-rgb), 0.1);
}

.docs-empty {
  margin: 16px 0 0;
  color: var(--text-muted);
  font-size: 13px;
}

.docs-reader {
  min-width: 0;
  overflow: hidden;
}

.docs-reader-header {
  padding: 30px 34px 24px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(var(--card-rgb), 0.8), rgba(var(--bg-rgb), 0.24));
}

.docs-reader-header h2 {
  margin: 0 0 8px;
  font-size: clamp(28px, 3vw, 42px);
  line-height: 1.12;
  font-weight: 900;
}

.docs-reader-header p {
  margin: 0;
  color: var(--text-muted);
  font-size: 13px;
}

.doc-markdown {
  padding: 34px;
  color: var(--text-secondary);
  font-size: 15px;
}

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

.doc-markdown h1,
.doc-markdown h2,
.doc-markdown h3,
.doc-markdown h4,
.doc-markdown h5,
.doc-markdown h6 {
  color: #fff;
  scroll-margin-top: 82px;
  letter-spacing: 0;
}

.doc-markdown h1 {
  margin: 0 0 24px;
  font-size: 36px;
  line-height: 1.12;
}

.doc-markdown h2 {
  margin: 40px 0 14px;
  padding-top: 8px;
  border-top: 1px solid rgba(31, 41, 55, 0.8);
  font-size: 25px;
}

.doc-markdown h3 {
  margin: 30px 0 12px;
  font-size: 20px;
}

.doc-markdown h4 {
  margin: 24px 0 10px;
  font-size: 17px;
}

.doc-markdown p {
  margin: 0 0 16px;
}

.doc-markdown a {
  color: #60a5fa;
  text-decoration: none;
  border-bottom: 1px solid rgba(96, 165, 250, 0.32);
}

.doc-markdown a:hover {
  color: #93c5fd;
  border-bottom-color: currentColor;
}

.doc-markdown ul,
.doc-markdown ol {
  margin: 0 0 18px;
  padding-left: 24px;
}

.doc-markdown li {
  margin: 7px 0;
}

.doc-markdown code {
  padding: 2px 6px;
  border: 1px solid rgba(31, 41, 55, 0.85);
  border-radius: 5px;
  background: rgba(var(--card-rgb), 0.75);
  color: #dbeafe;
  font-family: "SF Mono", Consolas, "Liberation Mono", monospace;
  font-size: 0.92em;
}

.doc-markdown pre {
  position: relative;
  margin: 20px 0;
  padding: 18px;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #090e13;
}

.doc-markdown pre code {
  padding: 0;
  border: 0;
  background: transparent;
  color: #cbd5e1;
  font-size: 13px;
  line-height: 1.65;
}

.doc-markdown blockquote {
  margin: 20px 0;
  padding: 14px 18px;
  border-left: 3px solid var(--primary);
  border-radius: 0 var(--radius) var(--radius) 0;
  background: rgba(var(--primary-rgb), 0.08);
  color: #d7e3ea;
}

.doc-markdown hr {
  margin: 28px 0;
  border: 0;
  border-top: 1px solid var(--border);
}

.doc-markdown img {
  max-width: 100%;
  margin: 18px 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(var(--card-rgb), 0.65);
}

.doc-image-missing {
  display: block;
  margin: 14px 0;
  padding: 12px 14px;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  color: var(--text-muted);
  font-size: 13px;
}

.md-table-wrap {
  margin: 20px 0;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.doc-markdown table {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
  background: rgba(var(--card-rgb), 0.42);
}

.doc-markdown th,
.doc-markdown td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  border-right: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

.doc-markdown th {
  color: #fff;
  background: rgba(var(--card-rgb), 0.78);
}

.docs-toc {
  padding: 18px;
}

.docs-toc h3 {
  margin: 0 0 12px;
  font-size: 14px;
}

.docs-toc nav {
  display: grid;
  gap: 8px;
}

.docs-toc a,
.docs-toc span {
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.35;
}

.docs-toc a {
  transition: color 0.2s ease;
}

.docs-toc a:hover {
  color: #fff;
}

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

@media (max-width: 1000px) {
  .container {
    width: min(100% - 32px, var(--container));
  }

  .site-nav {
    position: fixed;
    top: 56px;
    left: 0;
    right: 0;
    display: none;
    padding: 14px 16px 18px;
    background: rgba(var(--card-rgb), 0.98);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    align-items: stretch;
  }

  .site-nav.is-open {
    display: flex;
  }

  .nav-link {
    text-align: center;
  }

  .menu-toggle {
    display: block;
    position: fixed;
    top: 9px;
    right: 16px;
    z-index: 70;
    flex: 0 0 38px;
    background: rgba(15, 20, 25, 0.88);
  }

  .site-header .header-actions {
    margin-left: auto;
    min-width: 38px;
  }

  .site-header .header-actions .social-icon {
    display: none;
  }

  .hero {
    height: 620px;
    min-height: 560px;
  }

  .grid-4,
  .grid-3,
  .grid-2,
  .partner-grid,
  .content-grid,
  .footer-grid,
  .wiki-index,
  .wiki-module-grid,
  .wiki-detail-grid,
  .wiki-checks,
  .wiki-detail-grid.compact {
    grid-template-columns: 1fr;
  }

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

  .wiki-index {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .wiki-module-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }

  .page-shell {
    padding-top: 96px;
  }

  .docs-page {
    padding-top: 96px;
  }

  .docs-hero {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .docs-count {
    width: fit-content;
  }

  .docs-layout {
    grid-template-columns: minmax(240px, 0.42fr) minmax(0, 1fr);
  }

  .docs-sidebar,
  .docs-toc {
    position: static;
    max-height: none;
  }

  .docs-toc {
    display: none;
  }
}

@media (max-width: 560px) {
  .brand {
    font-size: 16px;
  }

  .brand-logo {
    width: 32px;
    height: 32px;
  }

  .site-header .header-actions .btn {
    display: none;
  }

  .section,
  .page-shell {
    padding-left: 0;
    padding-right: 0;
  }

  .section {
    padding-top: 64px;
    padding-bottom: 64px;
  }

  .hero {
    height: 560px;
    min-height: 520px;
  }

  .hero-control {
    display: none;
  }

  .topic-card,
  .repo-card {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    gap: 32px;
  }

  .wiki-index,
  .wiki-module-grid,
  .wiki-detail-grid,
  .wiki-checks,
  .wiki-detail-grid.compact {
    grid-template-columns: 1fr;
  }

  .knowledge-card {
    min-height: 0;
    padding: 22px;
  }

  .wiki-module-head {
    min-height: 76px;
    padding: 18px 20px;
  }

  .wiki-module-content {
    padding: 18px 20px 22px;
  }

  .wiki-link-grid {
    grid-template-columns: 1fr;
  }

  .wiki-section {
    margin-top: 48px;
  }

  .wiki-section > header {
    gap: 14px;
  }

  .wiki-article {
    padding: 20px;
  }

  .docs-page {
    padding-top: 82px;
  }

  .docs-layout {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .docs-sidebar {
    padding: 14px;
    max-height: 430px;
    overflow: auto;
  }

  .docs-reader-header,
  .doc-markdown {
    padding: 22px 18px;
  }

  .doc-markdown h1 {
    font-size: 28px;
  }

  .doc-markdown h2 {
    font-size: 22px;
  }
}
