.signature-gradient {
  background: linear-gradient(135deg, #1a3967 0%, #294775 100%);
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.brand-mark::before {
  content: "";
  width: 0.46rem;
  height: 0.46rem;
  border-radius: 9999px;
  background: linear-gradient(135deg, #6ffcb9 0%, #1a3967 100%);
}

.brand-mark-word {
  font-weight: 800;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, #1a3967 0%, #2f5b96 55%, #1f8a66 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.glass-nav {
  background: rgba(249, 249, 255, 0.92);
  backdrop-filter: blur(20px);
}

body[data-spa-only="true"] {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.doc-sidebar {
  width: 16rem;
  flex-shrink: 0;
  position: sticky;
  top: 4rem;
  height: calc(100vh - 4rem);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #e8eeff transparent;
  overflow-anchor: none;
}

.doc-sidebar::-webkit-scrollbar {
  width: 4px;
}

.doc-sidebar::-webkit-scrollbar-thumb {
  background: #e8eeff;
  border-radius: 4px;
}

.sidebar-section-title {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #5b6473;
  padding: 0.8rem 0.75rem 0.45rem;
}

.sidebar-link {
  display: block;
  padding: 0.45rem 0.75rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  color: #43474f;
  text-decoration: none;
  transition: all 120ms;
  line-height: 1.45;
}

.sidebar-link:hover {
  background: #e8eeff;
  color: #00234e;
}

.sidebar-link.active {
  background: #e8eeff;
  color: #00234e;
  font-weight: 600;
}

.docs-article-shell,
.docs-content-layout {
  align-items: flex-start;
}

.docs-article-shell .prose,
.docs-content-layout .prose {
  width: 100%;
  max-width: 68rem !important;
}

/* Lock visual rhythm to match what-is-remok.html across all docs pages */
.docs-article-shell .prose > h1 {
  margin-top: 0 !important;
  margin-bottom: 0.5rem !important;
}

.docs-article-shell .prose > h1 + p {
  margin-top: 0 !important;
  margin-bottom: 1.5rem !important;
}

/* Lock heading separator rhythm: divider -> first paragraph spacing */
.docs-article-shell .prose h2 {
  margin-top: 2rem !important;
  margin-bottom: 0.75rem !important;
  padding-bottom: 0.5rem !important;
  border-bottom: 1px solid #e8eeff;
  font-size: 1.3125rem;
  font-weight: 700;
  color: #00234e;
}

.docs-article-shell .prose h3 {
  font-size: 1.0625rem;
  font-weight: 600;
  color: #00234e;
  margin: 1.5rem 0 0.5rem;
}

.docs-article-shell .prose p {
  color: #43474f;
  line-height: 1.75;
  margin-bottom: 0.875rem;
  font-size: 0.9375rem;
}

.docs-article-shell .prose ul,
.docs-article-shell .prose ol {
  padding-left: 1.5rem;
  margin-bottom: 0.875rem;
  color: #43474f;
  line-height: 1.75;
  font-size: 0.9375rem;
}

.docs-article-shell .prose ul {
  list-style: disc;
}

.docs-article-shell .prose ol {
  list-style: decimal;
}

.docs-article-shell .prose li {
  margin-bottom: 0.3rem;
}

.docs-article-shell .prose strong {
  color: #001b3e;
}

.docs-article-shell .prose a {
  color: #00234e;
  text-decoration: underline;
}

.docs-article-shell .prose pre {
  background: #0e1420;
  color: #c8d6f0;
  padding: 1rem 1.25rem;
  border-radius: 0.625rem;
  overflow-x: auto;
  font-size: 0.8125rem;
  line-height: 1.65;
  margin: 1rem 0;
}

.docs-article-shell .prose code {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

.docs-article-shell .prose :not(pre) > code {
  background: #f1f3ff;
  color: #00234e;
  padding: 0.15em 0.4em;
  border-radius: 0.3rem;
  font-size: 0.875em;
}

/* Hard-align docs article width with what-is-remok.html even if JS class sync is delayed */
#page-content article.prose {
  max-width: 68rem !important;
}

.doc-page-nav {
  width: 100%;
  max-width: 68rem !important;
}

/* Keep table rendering stable across SPA docs navigation (no per-page style dependency) */
.docs-article-shell .prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  margin: 1rem 0;
}

.docs-article-shell .prose th {
  background: #f1f3ff;
  color: #00234e;
  font-weight: 600;
  padding: 0.6rem 0.875rem;
  text-align: left;
  border: 1px solid #e8eeff;
}

.docs-article-shell .prose td {
  padding: 0.55rem 0.875rem;
  border: 1px solid #e8eeff;
  color: #43474f;
}

.docs-article-shell .prose tr:nth-child(even) td {
  background: #f9f9ff;
}

.docs-article-shell .tip {
  padding: 0.85rem 1rem;
  border-radius: 0.625rem;
  font-size: 0.875rem;
  margin: 1rem 0;
  line-height: 1.6;
}

.docs-article-shell .tip-success {
  background: #e8f9ef;
  border-left: 3px solid #006c47;
  color: #004d31;
}

.docs-article-shell .tip-warning {
  background: #fff8e6;
  border-left: 3px solid #d97706;
  color: #7c4a00;
}

.docs-article-shell .tip-info {
  background: #eaf3ff;
  border-left: 3px solid #2563eb;
  color: #1e3a8a;
}

.docs-article-shell .tip-danger {
  background: #fff0f0;
  border-left: 3px solid #dc2626;
  color: #7f1d1d;
}

/* Keep prev/next width aligned with what-is-remok.html */
#page-content .flex.justify-between.mt-12 {
  max-width: 68rem !important;
}

.doc-toc {
  width: 14rem;
  max-width: 14rem;
  min-width: 14rem;
  flex-shrink: 0;
  position: sticky;
  top: 6rem;
  align-self: flex-start;
  justify-self: end;
  display: none;
}

@media (min-width: 1280px) {
  body > div.pt-16.flex.w-full.bg-white {
    display: grid !important;
    grid-template-columns: 16rem minmax(0, 1fr);
    column-gap: 1.25rem;
  }

  .doc-sidebar {
    width: 16rem;
    min-width: 16rem;
    max-width: 16rem;
    position: sticky;
    top: 4rem;
    align-self: start;
    height: calc(100vh - 4rem);
    overflow-y: auto;
  }

  #page-content {
    min-width: 0;
  }

  #page-content > .flex-1 {
    padding-left: clamp(1.25rem, 1.8vw, 2.5rem) !important;
    padding-right: clamp(1.25rem, 1.8vw, 2.5rem) !important;
  }

  .docs-article-shell {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 14rem;
    column-gap: 2rem;
    align-items: start;
    width: 100%;
    max-width: none;
    margin: 0;
  }

  .docs-article-shell .prose {
    width: 100%;
    max-width: none !important;
  }

  #page-content article.prose {
    max-width: none !important;
  }

  .doc-page-nav,
  #page-content .flex.justify-between.mt-12 {
    max-width: none !important;
    grid-column: 1;
  }

  .doc-toc {
    display: block;
    justify-self: end;
  }
}

.toc-title {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #5b6473;
  margin-bottom: 0.75rem;
  text-transform: uppercase;
}

.toc-link {
  display: block;
  padding: 0.35rem 0;
  color: #5b6473;
  font-size: 0.875rem;
  line-height: 1.45;
  text-decoration: none;
  border-left: 2px solid transparent;
  padding-left: 0.75rem;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.toc-link:hover {
  color: #00234e;
  border-left-color: #c4c6d0;
}

.toc-link.active {
  color: #00234e;
  border-left-color: #2563eb;
  font-weight: 600;
}

.toc-link.toc-link-sub {
  font-size: 0.8125rem;
  padding-left: 1.25rem;
}

.prose h2[id],
.prose h3[id] {
  scroll-margin-top: 6rem;
}

.docs-mobile-menu-btn {
  display: none;
}

.docs-mobile-sidebar-btn {
  display: none;
}

.docs-mobile-actions {
  display: none;
}

.docs-mobile-menu-icon {
  display: inline-block;
  font-size: 1.18rem;
  line-height: 1;
  transform: translateY(-0.5px);
}

.docs-mobile-menu {
  position: absolute;
  top: calc(100% + 1px);
  left: 0;
  right: 0;
  background: #ffffff;
  border-top: 1px solid #e8eeff;
  border-bottom: 1px solid #e8eeff;
  box-shadow: 0 8px 24px rgba(0, 35, 78, 0.08);
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 60;
}

.docs-mobile-menu.open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.docs-mobile-menu a {
  display: block;
  padding: 0.7rem 1.25rem;
  font-size: 0.9rem;
  color: #43474f;
  text-decoration: none;
}

.docs-mobile-menu a:hover {
  background: #f1f3ff;
  color: #1a3967;
}

@media (max-width: 1023px) {
  body > div.pt-16.flex.w-full.bg-white {
    display: block !important;
  }

  .doc-sidebar {
    display: block !important;
    position: fixed;
    top: 4rem;
    left: 0;
    bottom: 0;
    width: min(18rem, 88vw);
    z-index: 70;
    background: #ffffff;
    border-right: 1px solid #e8eeff;
    transform: translateX(-100%);
    transition: transform 0.24s ease;
    overflow-y: auto;
    box-shadow: 0 12px 28px rgba(0, 35, 78, 0.14);
  }

  .doc-sidebar.open {
    transform: translateX(0);
  }

  .docs-mobile-sidebar-overlay {
    position: fixed;
    inset: 0;
    top: 4rem;
    background: rgba(5, 16, 35, 0.28);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 65;
  }

  .docs-mobile-sidebar-overlay.open {
    opacity: 1;
    pointer-events: auto;
  }

  #page-content {
    width: 100%;
  }

  #page-content > .flex-1 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }

  .docs-article-shell {
    display: block !important;
  }

  .doc-toc {
    display: none !important;
  }

  .docs-mobile-menu-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.5rem;
    border: 1px solid #e8eeff;
    color: #1a3967;
    background: #ffffff;
    font-size: 1.1rem;
    line-height: 1;
  }

  .docs-mobile-sidebar-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 2.5rem;
    padding: 0 0.65rem;
    border-radius: 0.5rem;
    border: 1px solid #e8eeff;
    color: #1a3967;
    background: #ffffff;
    font-size: 0.82rem;
    font-weight: 600;
    line-height: 1;
  }

  .docs-mobile-actions {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
  }
}

@media (min-width: 1920px) {
  body[data-spa-only="true"] {
    font-size: 17px;
  }

  .doc-sidebar {
    width: 17rem;
    min-width: 17rem;
    max-width: 17rem;
  }

  .doc-toc {
    width: 15rem;
    min-width: 15rem;
    max-width: 15rem;
  }

  .docs-article-shell {
    grid-template-columns: minmax(0, 1fr) 15rem;
    column-gap: 2.25rem;
  }

  body > div.pt-16.flex.w-full.bg-white {
    column-gap: 1.75rem;
    grid-template-columns: 17rem minmax(0, 1fr);
  }

  .toc-link {
    font-size: 0.94rem;
    line-height: 1.5;
  }

  .sidebar-link {
    font-size: 0.96rem;
  }

  .sidebar-section-title {
    font-size: 0.86rem;
    letter-spacing: 0.04em;
  }

  header.fixed.top-0 a[href="/demo.html"],
  header.fixed.top-0 a[href="/pricing.html"] {
    font-size: 0.96rem !important;
    padding: 0.65rem 1.1rem !important;
  }
}

@media (min-width: 2560px) {
  body[data-spa-only="true"] {
    font-size: 20px;
  }

  .doc-sidebar {
    width: 21rem;
    min-width: 21rem;
    max-width: 21rem;
  }

  .doc-toc {
    width: 19rem;
    min-width: 19rem;
    max-width: 19rem;
  }

  .docs-article-shell {
    grid-template-columns: minmax(0, 1fr) 19rem;
    column-gap: 3.5rem;
  }

  body > div.pt-16.flex.w-full.bg-white {
    grid-template-columns: 21rem minmax(0, 1fr);
    column-gap: 2.75rem;
  }

  #page-content > .flex-1 {
    padding-left: 3.5rem !important;
    padding-right: 3.5rem !important;
  }
}
