@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@400;500;600;700&family=IBM+Plex+Mono:wght@400;500;600&display=swap");

:root {
  --bg: #f7f8ff;
  --bg-elevated: #ffffff;
  --bg-subtle: #eef3ff;
  --bg-code: #0f172a;
  --line: #dbe5f4;
  --line-strong: #bfcee4;
  --text: #0f172a;
  --text-soft: #334155;
  --text-faint: #64748b;
  --brand: #2563eb;
  --brand-strong: #1d4ed8;
  --brand-soft: #dbeafe;
  --accent: #f97316;
  --accent-soft: #ffedd5;
  --mint-soft: #dcfce7;
  --success: #059669;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --shadow-sm: 0 2px 12px rgba(37, 99, 235, 0.08);
  --shadow-md: 0 16px 34px rgba(30, 64, 175, 0.16);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: "IBM Plex Sans", "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 10% -5%, rgba(249, 115, 22, 0.2) 0, rgba(249, 115, 22, 0) 32%),
    radial-gradient(circle at 100% 0%, rgba(37, 99, 235, 0.25) 0, rgba(37, 99, 235, 0) 35%),
    linear-gradient(180deg, #ffffff 0%, var(--bg) 52%);
  color: var(--text);
  font-size: 15px;
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
}

.sidebar {
  border-right: 1px solid var(--line);
  padding: 16px 12px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  background:
    radial-gradient(circle at 0% 0%, rgba(251, 146, 60, 0.16) 0, rgba(251, 146, 60, 0) 35%),
    radial-gradient(circle at 100% 0%, rgba(59, 130, 246, 0.16) 0, rgba(59, 130, 246, 0) 35%),
    rgba(247, 250, 255, 0.95);
  backdrop-filter: blur(8px);
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: linear-gradient(140deg, #ffffff 0%, #f8fbff 100%);
  box-shadow: var(--shadow-sm);
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.sidebar-brand:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.18);
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  font-weight: 700;
  background: linear-gradient(135deg, #1d4ed8 0%, #0ea5e9 60%, #22d3ee 100%);
  color: #ffffff;
  font-size: 12px;
}

.sidebar-brand strong {
  font-size: 13px;
  font-weight: 700;
}

.sidebar-brand p {
  margin: 0;
  color: var(--text-faint);
  font-size: 12px;
}

.nav-group {
  border-bottom: 1px solid var(--line);
  padding: 8px 0;
}

.nav-group-btn {
  width: 100%;
  border: 0;
  background: #ffffff;
  color: var(--text-faint);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid var(--line);
}

.nav-group-btn:hover {
  background: linear-gradient(90deg, var(--brand-soft) 0%, #eff6ff 100%);
  color: var(--text-soft);
  border-color: #bfd0e8;
}

.nav-group-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.nav-group-icon {
  width: 20px;
  height: 20px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  font-size: 14px;
  line-height: 1;
  color: var(--brand-strong);
  background: #eef2ff;
  border: 1px solid #c7d2fe;
  transition: transform 0.18s ease;
}

.nav-group-btn[data-open="true"] .nav-group-icon {
  transform: rotate(90deg);
}

.nav-items {
  list-style: none;
  margin: 0;
  padding: 8px 0 8px;
}

.nav-items.hidden {
  display: none;
}

.nav-link {
  display: block;
  padding: 8px 12px 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--text-soft);
  margin-left: 8px;
  border-left: 2px solid #dbe5f4;
}

.nav-link:hover {
  background: linear-gradient(90deg, #eef2ff 0%, #f0f9ff 100%);
  color: var(--text);
  border-left-color: #93c5fd;
}

.nav-link.active {
  background: linear-gradient(90deg, #dbeafe 0%, #ffedd5 100%);
  color: #1e3a8a;
  font-weight: 600;
  border: 1px solid #c7d2fe;
  border-left: 3px solid var(--brand);
}

.content-shell {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.topbar {
  min-height: 66px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 24px;
  position: sticky;
  top: 0;
  z-index: 12;
  background: rgba(248, 250, 255, 0.84);
  backdrop-filter: blur(10px);
}

.topbar-app-btn {
  border: 1px solid #1e40af;
  background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 100%);
  color: #ffffff;
  border-radius: 10px;
  padding: 9px 14px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  box-shadow: 0 6px 14px rgba(37, 99, 235, 0.26);
}

.topbar-app-btn:hover {
  background: linear-gradient(135deg, #1e3a8a 0%, #1d4ed8 100%);
}

.mobile-menu-btn {
  display: none;
  border: 1px solid var(--line-strong);
  background: #ffffff;
  border-radius: var(--radius-sm);
  padding: 7px 10px;
  font-weight: 500;
  color: var(--text-soft);
}

.breadcrumb {
  display: flex;
  gap: 8px;
  align-items: center;
  color: var(--text-faint);
  font-size: 13px;
  min-width: 0;
}

.breadcrumb span:last-child {
  color: var(--text);
  font-weight: 600;
}

.search-wrap {
  margin-left: auto;
  position: relative;
  width: min(460px, 100%);
}

.search-wrap input {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
  background: #ffffff;
  color: var(--text);
}

.search-wrap input:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.16);
}

.search-results {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #ffffff;
  box-shadow: var(--shadow-md);
  max-height: 360px;
  overflow-y: auto;
  display: none;
  z-index: 20;
}

.search-results.open {
  display: block;
}

.search-item {
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  text-align: left;
  padding: 10px 12px;
  cursor: pointer;
}

.search-item:last-child {
  border-bottom: 0;
}

.search-item:hover {
  background: linear-gradient(90deg, #eff6ff 0%, #fff7ed 100%);
}

.search-item b {
  display: block;
  color: var(--text);
  font-size: 14px;
}

.search-item span {
  color: var(--text-faint);
  font-size: 12px;
}

.content {
  padding: 28px 36px 36px;
  max-width: 1120px;
  width: 100%;
}

.hero {
  background:
    radial-gradient(circle at 10% 20%, rgba(251, 146, 60, 0.22) 0, rgba(251, 146, 60, 0) 34%),
    radial-gradient(circle at 95% 15%, rgba(59, 130, 246, 0.22) 0, rgba(59, 130, 246, 0) 34%),
    linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 30px;
  box-shadow: var(--shadow-md);
}

.kicker {
  display: inline-block;
  border: 1px solid #fed7aa;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 11px;
  font-weight: 600;
  color: #9a3412;
  background: linear-gradient(90deg, #fff7ed 0%, #ffedd5 100%);
  margin-bottom: 12px;
}

.hero h1 {
  margin: 0 0 10px;
  font-size: clamp(28px, 3vw, 42px);
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.hero p {
  margin: 0;
  color: var(--text-soft);
  font-size: 17px;
  max-width: 860px;
}

.cta-row {
  display: flex;
  gap: 10px;
  margin-top: 22px;
  flex-wrap: wrap;
}

.btn {
  border-radius: 10px;
  border: 1px solid var(--line-strong);
  padding: 9px 13px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  background: #ffffff;
  color: var(--text-soft);
}

.btn.primary {
  border-color: #1d4ed8;
  background: linear-gradient(135deg, #2563eb 0%, #0ea5e9 100%);
  color: #ffffff;
  box-shadow: 0 10px 22px rgba(37, 99, 235, 0.28);
}

.btn.primary:hover {
  background: linear-gradient(135deg, #1d4ed8 0%, #0284c7 100%);
}

.btn.secondary:hover {
  background: linear-gradient(90deg, #eff6ff 0%, #fff7ed 100%);
}

.feature-row {
  margin-top: 22px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.feature-item {
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.feature-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: 1px solid #fdba74;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 700;
  color: #9a3412;
  background: linear-gradient(135deg, #ffedd5 0%, #fed7aa 100%);
}

.feature-item p {
  margin: 0;
  font-size: 13px;
  color: var(--text-soft);
}

.section-head {
  margin: 28px 0 12px;
}

.section-head h2 {
  margin: 0;
  font-size: 22px;
  letter-spacing: -0.01em;
}

.section-head p {
  margin: 6px 0 0;
  color: var(--text-soft);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.doc-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  cursor: pointer;
  text-align: left;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.doc-card:hover {
  border-color: #93c5fd;
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.doc-card h3 {
  margin: 8px 0 6px;
  font-size: 15px;
}

.doc-card p {
  margin: 0;
  color: var(--text-soft);
  font-size: 13px;
}

.doc-layout h1 {
  margin: 0 0 8px;
  font-size: clamp(28px, 2.5vw, 36px);
  letter-spacing: -0.02em;
}

.doc-meta {
  color: var(--text-faint);
  margin: 0 0 20px;
  font-size: 13px;
}

.doc-section {
  margin: 0 0 18px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  box-shadow: var(--shadow-sm);
}

.doc-section h2 {
  margin: 0 0 12px;
  font-size: 20px;
  line-height: 1.35;
}

.doc-section p {
  margin: 0;
  color: var(--text-soft);
  line-height: 1.65;
}

.doc-section p + p {
  margin-top: 10px;
}

.doc-list {
  margin: 12px 0 0;
  padding-left: 18px;
  color: var(--text-soft);
}

.doc-list li {
  margin-bottom: 8px;
  line-height: 1.6;
}

.step-block {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px;
  margin-bottom: 10px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.step-block h3 {
  margin: 0 0 6px;
  font-size: 15px;
}

.step-block p {
  margin: 0 0 10px;
  color: var(--text-soft);
}

.image-placeholder {
  width: 100%;
  border: 1px dashed var(--line-strong);
  border-radius: 10px;
  background: linear-gradient(90deg, #eff6ff 0%, #fff7ed 100%);
  color: #334155;
  padding: 14px;
  text-align: left;
  font-size: 13px;
  cursor: zoom-in;
}

.image-placeholder:hover {
  border-color: #60a5fa;
  background: linear-gradient(90deg, #dbeafe 0%, #ffedd5 100%);
}

.image-placeholder.has-preview {
  padding: 10px;
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.image-placeholder.has-preview img {
  width: 100%;
  display: block;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #ffffff;
}

.image-placeholder.has-preview .image-hint {
  font-size: 12px;
  color: #334155;
}

.video-placeholder {
  border: 1px dashed var(--line-strong);
  background: linear-gradient(120deg, #eff6ff 0%, #fff7ed 100%);
  border-radius: 12px;
  padding: 24px;
  color: #475569;
  text-align: center;
  font-weight: 500;
}

.video-embed {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #ffffff;
  padding: 12px;
  display: grid;
  gap: 10px;
}

.integration-video {
  width: 100%;
  border-radius: 10px;
  border: 1px solid var(--line-strong);
  background: #000000;
}

.video-zoom-btn {
  justify-self: start;
  border: 1px solid #1d4ed8;
  background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 100%);
  color: #ffffff;
  border-radius: 8px;
  padding: 7px 12px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.video-zoom-btn:hover {
  background: linear-gradient(135deg, #1e3a8a 0%, #1d4ed8 100%);
}

.code-block {
  border: 1px solid #1e293b;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 10px;
}

.code-head {
  background: #1e293b;
  border-bottom: 1px solid #334155;
  color: #cbd5e1;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 8px 12px;
}

.code-block pre {
  margin: 0;
  padding: 12px;
  overflow: auto;
  font-family: "IBM Plex Mono", Consolas, monospace;
  font-size: 12.5px;
  line-height: 1.5;
  color: #e2e8f0;
  background: var(--bg-code);
}

.trouble-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.trouble-item {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.trouble-item h4 {
  margin: 0 0 6px;
  font-size: 14px;
}

.trouble-item p {
  margin: 0;
  color: var(--text-soft);
  font-size: 13px;
}

.footer {
  border-top: 1px solid var(--line);
  margin-top: auto;
  padding: 16px 24px 22px;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  color: var(--text-faint);
  font-size: 12px;
  background: linear-gradient(90deg, rgba(239, 246, 255, 0.9) 0%, rgba(255, 247, 237, 0.9) 100%);
}

.footer a:hover {
  color: var(--brand-strong);
}

.zoom-modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.72);
  display: grid;
  place-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 40;
}

.zoom-modal.open {
  opacity: 1;
  pointer-events: auto;
}

.zoom-close {
  position: absolute;
  top: 18px;
  right: 18px;
  border: 1px solid var(--line-strong);
  background: #ffffff;
  border-radius: 8px;
  padding: 7px 10px;
  cursor: pointer;
}

.zoom-figure {
  margin: 0;
  width: min(900px, 92vw);
}

.zoom-figure img {
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  background: #ffffff;
}

.zoom-figure video {
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  background: #000000;
}

.zoom-figure figcaption {
  margin-top: 8px;
  color: #e2e8f0;
  font-size: 13px;
  text-align: center;
}

@media (max-width: 1140px) {
  .feature-row,
  .card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 960px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: fixed;
    left: -320px;
    top: 0;
    bottom: 0;
    width: 300px;
    z-index: 30;
    transition: left 0.2s ease;
    box-shadow: var(--shadow-md);
  }

  .sidebar.open {
    left: 0;
  }

  .mobile-menu-btn {
    display: inline-flex;
  }

  .content {
    padding: 20px 14px 26px;
  }
}

@media (max-width: 700px) {
  .topbar {
    min-height: auto;
    padding: 12px;
    flex-wrap: wrap;
  }

  .breadcrumb {
    width: 100%;
    order: 2;
  }

  .topbar-app-btn {
    order: 3;
  }

  .search-wrap {
    width: 100%;
    order: 4;
  }

  .hero {
    padding: 20px;
  }

  .hero p {
    font-size: 15px;
  }

  .feature-row,
  .card-grid,
  .trouble-grid {
    grid-template-columns: 1fr;
  }
}
