html {
  scrollbar-gutter: stable;
}

* {
  box-sizing: border-box;
}

:root {
  color-scheme: light;
  --bg: #f5f7fb;
  --panel: #ffffff;
  --panel-2: #f8fbff;
  --line: #dfe7f4;
  --line-strong: #c7d5ec;
  --text: #142033;
  --muted: #5f6f86;
  --brand: #2563eb;
  --brand-soft: #e8f0ff;
  --good: #0f9d58;
  --warn: #ff9800;
  --nav-height: 122px;
  --shadow: 0 16px 40px rgba(31, 60, 136, 0.12);
}

body {
  margin: 0;
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: linear-gradient(180deg, #eff5ff 0%, var(--bg) 220px);
  color: var(--text);
}

button,
input {
  font: inherit;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(18px);
  background: rgba(245, 247, 251, 0.88);
  border-bottom: 1px solid rgba(37, 99, 235, 0.1);
}

.topbar__inner {
  max-width: 1680px;
  min-height: var(--nav-height);
  margin: 0 auto;
  padding: 14px 24px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 16px;
}

.topbar__brand {
  display: flex;
  align-items: center;
}

.topbar__brand-copy {
  min-width: 0;
  display: grid;
  gap: 10px;
}

.topbar__brand h1 {
  margin: 0;
  font-size: 28px;
  line-height: 1.1;
}

.topbar__nav {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.06);
  border: 1px solid rgba(37, 99, 235, 0.08);
}

.topbar__nav-link {
  padding: 10px 16px;
  border-radius: 999px;
  color: var(--muted);
  text-decoration: none;
  font-weight: 700;
  transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.topbar__nav-link:hover {
  transform: translateY(-1px);
  color: var(--brand);
}

.topbar__nav-link.is-active {
  background: #fff;
  color: var(--brand);
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.14);
}

.topbar__nav-link--button {
  border: none;
  background: transparent;
  cursor: pointer;
}

.topbar__actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.app-shell {
  max-width: 1680px;
  margin: 0 auto;
  padding: 18px 24px 40px;
}

.sidebar-card,
.detail-card,
.feature-card,
.drawer__panel,
.modal__panel {
  background: var(--panel);
  border: 1px solid rgba(37, 99, 235, 0.08);
  border-radius: 20px;
  box-shadow: var(--shadow);
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--brand);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero__stats .stat-chip {
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand);
  font-weight: 700;
  font-size: 13px;
}

.topbar__stats {
  margin-top: 2px;
  max-width: 960px;
}

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

.sidebar,
.content {
  min-width: 0;
}

.sidebar {
  position: sticky;
  top: calc(var(--nav-height) + 18px);
  display: flex;
  flex-direction: column;
  gap: 16px;
  height: calc(100vh - var(--nav-height) - 26px);
  min-height: 0;
}

.sidebar-card,
.detail-card {
  padding: 20px;
}

.sidebar-card--filters {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}

.sidebar-card h2,
.detail-card h2 {
  margin: 0 0 16px;
  font-size: 18px;
}

.sidebar-title-row,
.toolbar,
.feature-card__head,
.detail-card__head,
.code-block__head,
.demo-box__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.nav-btn,
.text-btn,
.filter-chip,
.feature-card__action,
.copy-btn,
.demo-btn,
.drawer__close {
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.nav-btn:hover,
.text-btn:hover,
.filter-chip:hover,
.feature-card__action:hover,
.copy-btn:hover,
.demo-btn:hover,
.drawer__close:hover {
  transform: translateY(-1px);
}

.nav-btn {
  padding: 11px 16px;
  background: #fff;
  color: var(--brand);
  font-weight: 700;
  box-shadow: 0 10px 24px rgba(10, 37, 95, 0.18);
}

.nav-btn--ghost {
  background: rgba(37, 99, 235, 0.08);
  color: var(--brand);
  box-shadow: none;
}

.text-btn {
  padding: 0;
  color: var(--brand);
  background: transparent;
}

.search-box {
  display: grid;
  gap: 10px;
  color: var(--muted);
  font-size: 14px;
}

.search-box input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  outline: none;
  background: var(--panel-2);
}

.search-box input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.filter-list,
.feature-card__tags,
.feature-card__badges,
.detail-card__tags,
.detail-meta,
.demo-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.filter-list {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding-right: 4px;
  align-content: flex-start;
}

.filter-chip {
  width: 100%;
  padding: 12px 14px;
  text-align: left;
  background: #f6f8fc;
  color: var(--text);
}

.filter-chip.is-active {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.22);
}

.feature-card__tags span,
.detail-card__tags span {
  padding: 8px 12px;
  border-radius: 999px;
  background: #f3f6fc;
  color: var(--muted);
  font-size: 13px;
}

.content {
  min-height: 100vh;
}

.toolbar {
  margin-bottom: 22px;
  position: sticky;
  top: calc(var(--nav-height) + 18px);
  z-index: 30;
  padding: 18px 20px;
  background: var(--panel);
  border: 1px solid rgba(37, 99, 235, 0.12);
  border-radius: 20px;
  box-shadow: 0 14px 28px rgba(31, 60, 136, 0.08);
  overflow: hidden;
}

.toolbar::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -14px;
  height: 24px;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 1) 0%,
    rgba(255, 255, 255, 0.96) 58%,
    rgba(255, 255, 255, 0) 100%
  );
  pointer-events: none;
}

.toolbar h2 {
  margin: 0 0 8px;
}

.toolbar__meta {
  margin: 0;
  color: var(--muted);
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  color: var(--muted);
  font-size: 14px;
}

.dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 6px;
  border-radius: 50%;
}

.dot--ready {
  background: var(--good);
}

.dot--demo {
  background: var(--brand);
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
  padding-top: 6px;
}

.ad-banner {
  margin-bottom: 18px;
  padding: 16px 18px;
  background: var(--panel);
  border: 1px solid rgba(37, 99, 235, 0.08);
  border-radius: 20px;
  box-shadow: var(--shadow);
}

.ad-banner__meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 14px;
}

.ad-banner__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: #fff4df;
  color: #b06b00;
  font-size: 12px;
  font-weight: 700;
}

.ad-banner__text {
  margin: 0;
}

.ad-banner__slot {
  min-height: 0;
}

.feature-card {
  padding: 20px;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.feature-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 36px rgba(31, 60, 136, 0.14);
}

.feature-card__title {
  margin: 12px 0 10px;
  font-size: 18px;
  line-height: 1.4;
}

.feature-card__desc {
  min-height: 66px;
  margin: 0 0 16px;
  color: var(--muted);
  line-height: 1.7;
}

.feature-card__meta {
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 14px;
  word-break: break-word;
}

.feature-card__badges span {
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.badge--category {
  background: #eef4ff;
  color: var(--brand);
}

.badge--level {
  background: #edf9f1;
  color: var(--good);
}

.feature-card__action,
.copy-btn,
.demo-btn {
  padding: 10px 14px;
  background: var(--brand);
  color: #fff;
}

.feature-card__action {
  white-space: nowrap;
}

.detail-card {
  min-height: 100%;
}

.detail-card--drawer {
  border: none;
  border-radius: 0;
  box-shadow: none;
  padding: 0 0 24px;
}

.detail-overview {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
}

.detail-overview__title {
  margin: 0 0 10px;
  font-size: 24px;
  line-height: 1.25;
}

.detail-overview__desc {
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
}

.detail-placeholder {
  display: grid;
  place-items: center;
  min-height: 300px;
  color: var(--muted);
  text-align: center;
  line-height: 1.8;
}

.detail-card__title {
  margin: 0;
  font-size: 28px;
}

.detail-card__desc {
  color: var(--muted);
  line-height: 1.75;
}

.detail-sections {
  display: grid;
  gap: 16px;
  margin-top: 18px;
}

.detail-section {
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
}

.detail-section h3 {
  margin: 0 0 10px;
  font-size: 17px;
}

.detail-section__eyebrow {
  display: inline-block;
  margin-bottom: 10px;
  padding: 6px 10px;
  border-radius: 999px;
  background: #eef4ff;
  color: var(--brand);
  font-size: 12px;
  font-weight: 700;
}

.detail-list {
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
  line-height: 1.75;
}

.detail-meta {
  margin-top: 14px;
}

.detail-meta span {
  padding: 8px 12px;
  border-radius: 999px;
  background: #f3f7ff;
  color: var(--brand);
  font-size: 13px;
  font-weight: 700;
}

.code-block,
.demo-box {
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  background: #0f172a;
  color: #d9e7ff;
}

.code-block__head,
.demo-box__head {
  padding: 14px 16px;
  background: rgba(148, 163, 184, 0.12);
}

.code-block__head strong,
.demo-box__head strong {
  color: #fff;
}

.code-block pre,
.demo-box__content {
  margin: 0;
  padding: 16px;
  overflow: auto;
}

.code-block code {
  font-family: Consolas, "Courier New", monospace;
  font-size: 13px;
  line-height: 1.7;
}

.copy-btn {
  background: #1d4ed8;
}

.copy-btn.is-copied {
  background: var(--good);
}

.demo-box {
  background: #fff;
  color: var(--text);
}

.demo-box__head {
  background: #f5f8ff;
}

.demo-box__content {
  color: var(--muted);
  line-height: 1.75;
}

.demo-console {
  margin-top: 12px;
  padding: 14px;
  border-radius: 14px;
  background: #0f172a;
  color: #d9e7ff;
  font-family: Consolas, "Courier New", monospace;
  font-size: 13px;
  white-space: pre-wrap;
}

.demo-actions {
  margin-top: 14px;
}

.demo-btn {
  background: var(--brand);
}

.demo-btn--secondary {
  background: #64748b;
}

.drawer,
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  pointer-events: none;
}

.drawer[hidden],
.modal[hidden] {
  display: none;
}

.drawer.is-open,
.modal.is-open {
  pointer-events: auto;
}

.drawer__backdrop,
.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.42);
  opacity: 0;
  transition: opacity 0.22s ease;
}

.drawer.is-open .drawer__backdrop,
.modal.is-open .modal__backdrop {
  opacity: 1;
}

.drawer__panel {
  position: absolute;
  top: 0;
  right: 0;
  width: min(680px, 100vw);
  height: 100vh;
  border-radius: 24px 0 0 24px;
  transform: translateX(100%);
  transition: transform 0.24s ease;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 0;
}

.drawer.is-open .drawer__panel {
  transform: translateX(0);
}

.drawer__header,
.modal__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 24px 18px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
}

.drawer__eyebrow {
  margin: 0 0 8px;
  color: var(--brand);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.drawer__header h2,
.modal__header h2 {
  margin: 0;
  font-size: 26px;
  line-height: 1.2;
}

.drawer__close {
  padding: 10px 14px;
  background: #eff4ff;
  color: var(--brand);
  font-weight: 700;
}

.drawer .detail-card {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 24px;
}

.modal {
  display: grid;
  place-items: center;
  padding: 24px;
}

.modal__panel {
  position: relative;
  z-index: 1;
  width: min(720px, 100%);
  max-height: min(80vh, 760px);
  overflow: auto;
}

.modal__panel--contact {
  width: min(920px, 100%);
}

.about-content {
  padding: 0 24px 24px;
}

.about-content p {
  font-size: 15px;
}

.about-section + .about-section {
  margin-top: 22px;
}

.about-section h3 {
  margin: 0 0 10px;
  font-size: 18px;
}

.about-section p {
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
}

.body--locked {
  overflow: hidden;
  padding-right: var(--scrollbar-width, 0px);
}

.contact-content {
  padding: 0 24px 24px;
}

.contact-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 24px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: linear-gradient(180deg, #fbfdff 0%, #ffffff 100%);
}

.contact-card__copy h3 {
  margin: 0 0 12px;
  font-size: 22px;
}

.contact-card__copy p {
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
}

.contact-list {
  margin: 18px 0 0;
  padding-left: 20px;
  color: var(--muted);
  line-height: 1.9;
}

.contact-qr {
  display: grid;
  gap: 14px;
}

.contact-qr__frame {
  min-height: 360px;
  display: grid;
  place-items: center;
  padding: 18px;
  border-radius: 20px;
  background: #f4f8ff;
  border: 1px dashed rgba(37, 99, 235, 0.26);
}

.contact-qr__image {
  width: 100%;
  max-width: 280px;
  height: auto;
  display: block;
  border-radius: 20px;
  box-shadow: 0 18px 38px rgba(37, 99, 235, 0.14);
}

.contact-qr__image.is-hidden {
  display: none;
}

.contact-qr__fallback {
  text-align: center;
  color: var(--muted);
  line-height: 1.8;
}

.contact-qr__fallback strong {
  display: block;
  margin-bottom: 8px;
  color: var(--text);
}

.contact-qr__fallback p {
  margin: 0;
}

.contact-qr__caption {
  margin: 0;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}

.empty-state {
  padding: 48px 24px;
  border: 1px dashed var(--line-strong);
  border-radius: 20px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.7);
  text-align: center;
}

@media (max-width: 1380px) {
  .feature-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1024px) {
  .topbar__inner {
    grid-template-columns: 1fr;
    justify-items: start;
  }

  .layout {
    grid-template-columns: 1fr;
  }

  .topbar__inner,
  .toolbar {
    top: auto;
  }

  .sidebar {
    position: static;
    height: auto;
  }

  .feature-grid {
    grid-template-columns: 1fr;
  }

  .filter-list {
    max-height: 320px;
  }

  .contact-card {
    grid-template-columns: 1fr;
  }

  .ad-banner__meta {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 720px) {
  .app-shell {
    padding: 20px 14px 32px;
  }

  .topbar__inner {
    padding: 14px;
    min-height: auto;
    align-items: flex-start;
    gap: 14px;
  }

  .topbar__brand h1 {
    font-size: 24px;
  }

  .topbar__nav {
    width: 100%;
    flex-wrap: wrap;
  }

  .sidebar-card,
  .detail-card,
  .feature-card,
  .modal__panel {
    border-radius: 18px;
  }

  .sidebar-card,
  .detail-card,
  .feature-card {
    padding: 18px;
  }

  .detail-overview__title,
  .drawer__header h2,
  .modal__header h2 {
    font-size: 22px;
  }

  .feature-card__head,
  .toolbar,
  .detail-card__head,
  .code-block__head,
  .demo-box__head,
  .drawer__header,
  .modal__header {
    flex-direction: column;
    align-items: flex-start;
  }

  .drawer__panel {
    width: 100vw;
    border-radius: 0;
  }

  .drawer .detail-card,
  .about-content,
  .contact-content {
    padding: 18px;
  }

  .contact-card {
    padding: 18px;
  }

  .contact-card__copy h3 {
    font-size: 20px;
  }
}
