/* RCM Desk Help — modern knowledge base UI */

:root,
[data-theme="light"] {
  --font: "Plus Jakarta Sans", ui-sans-serif, system-ui, sans-serif;
  --bg: #f5f6f8;
  --bg-2: #eef0f4;
  --surface: #ffffff;
  --surface-2: #fbfbfc;
  --text: #0f172a;
  --muted: #64748b;
  --faint: #94a3b8;
  --line: rgba(15, 23, 42, 0.08);
  --line-strong: rgba(15, 23, 42, 0.12);
  --accent: #0f766e;
  --accent-2: #0d9488;
  --accent-soft: rgba(13, 148, 136, 0.1);
  --demo: #111827;
  --demo-hover: #000;
  --header: rgba(255, 255, 255, 0.78);
  --shadow: 0 1px 0 rgba(15, 23, 42, 0.04), 0 18px 40px rgba(15, 23, 42, 0.06);
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
  --radius: 14px;
  --radius-sm: 10px;
  --max: 1120px;
  --header-h: 4.25rem;
}

[data-theme="dark"] {
  --bg: #070a10;
  --bg-2: #0b1018;
  --surface: rgba(255, 255, 255, 0.055);
  --surface-2: rgba(255, 255, 255, 0.035);
  --text: #f1f5f9;
  --muted: #94a3b8;
  --faint: #64748b;
  --line: rgba(255, 255, 255, 0.1);
  --line-strong: rgba(255, 255, 255, 0.16);
  --accent: #5eead4;
  --accent-2: #2dd4bf;
  --accent-soft: rgba(45, 212, 191, 0.12);
  --demo: #f8fafc;
  --demo-hover: #fff;
  --header: rgba(8, 12, 20, 0.55);
  --shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
  --shadow-sm: 0 1px 0 rgba(255, 255, 255, 0.04);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.page-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(900px 420px at 0% -5%, rgba(13, 148, 136, 0.08), transparent 55%),
    radial-gradient(700px 380px at 100% 0%, rgba(15, 23, 42, 0.04), transparent 50%),
    var(--bg);
}
[data-theme="dark"] .page-bg {
  background:
    radial-gradient(1000px 520px at 8% -15%, rgba(45, 212, 191, 0.14), transparent 55%),
    radial-gradient(800px 480px at 100% 0%, rgba(56, 189, 248, 0.1), transparent 50%),
    radial-gradient(700px 420px at 50% 110%, rgba(99, 102, 241, 0.08), transparent 45%),
    #070a10;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-2); }
img { max-width: 100%; height: auto; display: block; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); border: 0;
}
.skip-link {
  position: absolute; left: 1rem; top: -4rem; z-index: 100;
  padding: 0.55rem 0.8rem; border-radius: 999px;
  background: var(--demo); color: #fff;
}
.skip-link:focus { top: 0.75rem; }

.shell {
  width: min(var(--max), calc(100% - 2rem));
  margin-inline: auto;
}

/* —— Header —— */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--line);
  background: var(--header);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
}
.site-header__inner {
  min-height: var(--header-h);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
}
.site-header__left {
  justify-self: start;
  min-width: 0;
}
.brand {
  display: inline-flex;
  align-items: center;
  color: inherit;
  min-width: 0;
}
.brand:hover { color: inherit; }
.brand__logo {
  height: 28px;
  width: auto;
  max-width: 148px;
  object-fit: contain;
}
.brand__logo--light { display: none; }
.brand__logo--dark { display: block; }
[data-theme="light"] .brand__logo--light { display: block; }
[data-theme="light"] .brand__logo--dark { display: none; }
.brand__wordmark {
  font-weight: 800;
  letter-spacing: -0.03em;
  font-size: 1.05rem;
}

.site-nav {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  justify-self: center;
}
.site-nav__link {
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 600;
  transition: background 0.15s ease, color 0.15s ease;
}
.site-nav__link:hover,
.site-nav__link.is-active {
  color: var(--text);
  background: color-mix(in srgb, var(--text) 5%, transparent);
}

.site-header__right {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}

.theme-btn,
.menu-btn {
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
[data-theme="dark"] .theme-btn,
[data-theme="dark"] .menu-btn {
  background: rgba(255,255,255,0.05);
  backdrop-filter: blur(12px);
}
.theme-btn:hover,
.menu-btn:hover {
  border-color: var(--line-strong);
  transform: translateY(-1px);
}
[data-theme="light"] .theme-icon--moon { display: none; }
[data-theme="dark"] .theme-icon--sun { display: none; }

.menu-btn {
  flex-direction: column;
  gap: 4px;
}
.menu-btn span {
  display: block;
  width: 14px;
  height: 1.5px;
  border-radius: 2px;
  background: currentColor;
}

.btn-demo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 2.4rem;
  padding: 0 1rem;
  border-radius: 999px;
  background: var(--demo);
  color: #fff !important;
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}
[data-theme="dark"] .btn-demo {
  color: #0b1220 !important;
}
.btn-demo:hover {
  background: var(--demo-hover);
  transform: translateY(-1px);
  color: inherit;
}
.btn-demo--block { width: 100%; margin-top: 0.85rem; }

.mobile-nav {
  display: grid;
  gap: 0.25rem;
  padding: 0.35rem 1rem 1rem;
}
.mobile-nav[hidden] { display: none !important; }
.mobile-nav a {
  padding: 0.8rem 0.9rem;
  border-radius: 12px;
  color: var(--text);
  font-weight: 600;
  background: var(--surface);
  border: 1px solid var(--line);
}
[data-theme="dark"] .mobile-nav a {
  background: rgba(255,255,255,0.04);
  backdrop-filter: blur(12px);
}

/* —— Main —— */
.main {
  width: 100%;
  margin: 0 auto;
  padding: 1.75rem 0 3rem;
}
.content-shell {
  width: min(var(--max), calc(100% - 2rem));
  margin-inline: auto;
}

.hero {
  margin-bottom: 1.5rem;
  padding: 1.75rem 0 0.5rem;
}
.hero--center {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.hero__eyebrow {
  margin: 0 0 0.65rem;
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.hero__title {
  margin: 0 0 0.55rem;
  font-size: clamp(1.9rem, 4.4vw, 2.75rem);
  line-height: 1.08;
  letter-spacing: -0.045em;
  font-weight: 800;
  max-width: 16ch;
}
.hero--center .hero__title { max-width: 18ch; }
.hero__lead {
  margin: 0 0 1.35rem;
  max-width: 34rem;
  color: var(--muted);
  font-size: 1.05rem;
}
.hero--center .hero__lead { margin-left: auto; margin-right: auto; }

.search-bar {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  width: 100%;
  max-width: 40rem;
  padding: 0.35rem 0.35rem 0.35rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.search-bar--center {
  margin-inline: auto;
}
[data-theme="dark"] .search-bar {
  background: rgba(255,255,255,0.06);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  border-color: rgba(255,255,255,0.12);
}
.search-bar:focus-within {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
  box-shadow: 0 0 0 4px var(--accent-soft), var(--shadow);
}
.search-bar__icon { color: var(--faint); display: inline-flex; }
.search-bar input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 0.98rem;
  padding: 0.7rem 0;
}
.search-bar__btn {
  border: 0;
  cursor: pointer;
  height: 2.55rem;
  padding: 0 1.15rem;
  border-radius: 999px;
  background: var(--demo);
  color: #fff;
  font: inherit;
  font-weight: 700;
  font-size: 0.86rem;
}
[data-theme="dark"] .search-bar__btn { color: #0b1220; }

.product-picker {
  margin: 0 auto 1.5rem;
  text-align: center;
}
.product-picker__label {
  margin: 0 0 0.75rem;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.product-picker__list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
}
.product-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.55rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 700;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}
.product-pill:hover {
  border-color: color-mix(in srgb, var(--accent) 35%, var(--line));
  color: var(--accent);
  transform: translateY(-1px);
}
.product-pill.is-active {
  background: var(--demo);
  border-color: transparent;
  color: #fff !important;
}
[data-theme="dark"] .product-pill.is-active {
  color: #0b1220 !important;
}

.docs-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 1.25rem;
  align-items: start;
}
.docs-layout--equal {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.docs-col { min-width: 0; }
.category-stack {
  display: grid;
  gap: 0.75rem;
}

.product-panel,
.side-card,
.side-search,
.article-page,
.article-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 2px);
  box-shadow: var(--shadow-sm);
}
[data-theme="dark"] .product-panel,
[data-theme="dark"] .side-card,
[data-theme="dark"] .side-search,
[data-theme="dark"] .article-page,
[data-theme="dark"] .article-panel {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(20px) saturate(150%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06), var(--shadow);
}

.product-panel {
  padding: 1.15rem 1.2rem 1.3rem;
  margin-bottom: 0;
}
.product-panel__head { margin-bottom: 1rem; }
.product-panel__title {
  margin: 0;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  font-weight: 800;
}
.product-panel__desc {
  margin: 0.3rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.category-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.85rem;
}
.category-card {
  padding: 0.95rem 1rem;
  border-radius: var(--radius);
  background: var(--surface-2);
  border: 1px solid var(--line);
  transition: border-color 0.15s ease, transform 0.15s ease, background 0.15s ease;
}
[data-theme="dark"] .category-card {
  background: rgba(255,255,255,0.03);
}
.category-card:hover {
  border-color: color-mix(in srgb, var(--accent) 30%, var(--line));
  transform: translateY(-1px);
}
.category-card__title,
.category-sub__title {
  margin: 0 0 0.55rem;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
  font-size: 0.92rem;
  font-weight: 750;
  letter-spacing: -0.01em;
}
.category-card__title a { color: var(--text); }
.category-card__title a:hover { color: var(--accent); }
.category-card__icon {
  width: 1.55rem;
  height: 1.55rem;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #d97706;
  background: rgba(245, 158, 11, 0.12);
  flex-shrink: 0;
}
.category-card__count {
  margin-left: auto;
  min-width: 1.4rem;
  height: 1.4rem;
  padding: 0 0.4rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 750;
  color: var(--muted);
  background: color-mix(in srgb, var(--text) 5%, transparent);
}
.category-sub { margin-top: 0.75rem; padding-top: 0.65rem; border-top: 1px dashed var(--line); }
.category-sub__title { color: var(--muted); font-size: 0.86rem; }

.article-list { list-style: none; margin: 0; padding: 0; }
.article-list li + li { margin-top: 0.1rem; }
.article-list a {
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
  padding: 0.4rem 0.35rem;
  border-radius: 8px;
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 550;
  transition: background 0.12s ease, color 0.12s ease;
}
.article-list a:hover {
  background: var(--accent-soft);
  color: var(--accent);
}
.article-list__icon {
  color: var(--faint);
  margin-top: 0.12rem;
  flex-shrink: 0;
}
.article-list--lg a span:last-child {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.article-list--lg small { color: var(--muted); font-size: 0.82rem; font-weight: 500; }
.article-list--lg strong { font-weight: 700; }

.docs-sidebar {
  display: grid;
  gap: 0.85rem;
  position: sticky;
  top: calc(var(--header-h) + 1rem);
  align-self: start;
}
.side-card { padding: 1.1rem 1.15rem 1.2rem; }
.side-card--fill { min-height: 100%; }
.side-card--soft { background: linear-gradient(180deg, var(--surface), var(--surface-2)); }
.side-card__label {
  margin: 0 0 0.35rem;
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.side-card__title {
  margin: 0 0 0.35rem;
  font-size: 1.02rem;
  letter-spacing: -0.02em;
  font-weight: 800;
}
.side-card__text {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}
.side-card__link {
  display: inline-flex;
  margin-top: 0.75rem;
  font-weight: 700;
  font-size: 0.88rem;
}
.side-search {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 0.85rem;
}
.side-search__icon { color: var(--faint); display: inline-flex; }
.side-search input {
  flex: 1;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--text);
  font: inherit;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 600;
}
.docs-heading {
  margin: 0 0 1rem;
  font-size: 1.35rem;
  letter-spacing: -0.03em;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}
.article-page,
.article-panel { padding: 1.35rem 1.4rem 1.6rem; }
.article-page__head { margin-bottom: 1.1rem; }
.article-page__head h1 {
  margin: 0 0 0.4rem;
  font-size: clamp(1.55rem, 3vw, 1.9rem);
  letter-spacing: -0.035em;
  font-weight: 800;
}
.article-page__summary { margin: 0; color: var(--muted); }
.muted { color: var(--muted); }

.prose h2, .prose h3 { margin: 1.35rem 0 0.5rem; letter-spacing: -0.02em; }
.prose p { margin: 0 0 0.9rem; color: color-mix(in srgb, var(--text) 88%, var(--muted)); }
.prose ul { margin: 0 0 0.9rem; padding-left: 1.15rem; }
.prose code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.86em;
  padding: 0.12rem 0.35rem;
  border-radius: 6px;
  background: var(--accent-soft);
}
.prose .doc-code {
  padding: 1rem 1.05rem;
  overflow: auto;
  border-radius: 12px;
  background: #0b1220;
  color: #e2e8f0;
  border: 1px solid rgba(255,255,255,0.08);
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 1rem 0 1.25rem;
  margin-top: auto;
  background: transparent;
}
.site-footer__inner {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.site-footer__copy {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.01em;
}

@media (min-width: 920px) {
  .site-nav { display: inline-flex; }
  .menu-btn { display: none; }
  .mobile-nav { display: none !important; }
}

@media (max-width: 920px) {
  .site-header__inner {
    grid-template-columns: 1fr auto;
  }
  .site-nav { display: none; }
  .docs-layout,
  .docs-layout--equal { grid-template-columns: 1fr; }
  .docs-sidebar { position: static; }
  .hero__title { max-width: none; }
}

@media (max-width: 560px) {
  .btn-demo { padding: 0 0.85rem; font-size: 0.8rem; }
  .search-bar { padding-left: 0.85rem; }
  .search-bar__btn { padding: 0 0.9rem; }
}
