/* Modern doc pages — shares landing chrome, dark readable content */
body.jr-docs {
  margin: 0;
  background: #070f1c;
  color: #f5f7ff;
  font-family: "DM Sans", "Segoe UI", system-ui, sans-serif;
  line-height: 1.55;
  /* clip avoids horizontal bleed without breaking position:sticky sidebars */
  overflow-x: clip;
}

body.jr-docs a.github-fork-ribbon,
body.jr-docs #header,
body.jr-docs #navmenu,
body.jr-docs #catcher,
body.jr-docs #catcherTitle,
body.jr-docs #catcherContent,
body.jr-docs #docHeader,
body.jr-docs #footer {
  display: none !important;
}

body.jr-docs .app-screenshot img {
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35) !important;
}

body.jr-docs #container,
body.jr-docs #page {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  overflow: visible !important;
}

body.jr-docs #page {
  color: #f5f7ff;
}

body.jr-docs #page a {
  color: #31baff;
}

body.jr-docs .jr-doc-shell {
  width: min(920px, calc(100% - 2.5rem));
  margin: 0 auto;
  padding: 7rem 0 3.5rem;
}

body.jr-docs .jr-doc-shell h1,
body.jr-docs .jr-doc-shell h2,
body.jr-docs .jr-doc-shell h3,
body.jr-docs .jr-doc-shell h4 {
  font-family: "Outfit", "Segoe UI", system-ui, sans-serif;
  color: #f5f7ff !important;
  line-height: 1.2;
}

body.jr-docs .jr-doc-shell h1 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 800;
  margin: 0 0 1.25rem;
}

body.jr-docs .jr-doc-shell h2 {
  font-size: 1.45rem;
  font-weight: 700;
  margin: 2rem 0 0.75rem;
  color: #ffb447 !important;
}

body.jr-docs .jr-doc-shell h3 {
  font-size: 1.15rem;
  margin: 1.5rem 0 0.55rem;
}

body.jr-docs .jr-doc-shell p,
body.jr-docs .jr-doc-shell li {
  color: #c9d4e5;
  font-size: 1.02rem;
}

body.jr-docs .jr-doc-shell ul,
body.jr-docs .jr-doc-shell ol {
  padding-left: 1.25rem;
}

body.jr-docs .jr-doc-shell pre,
body.jr-docs .jr-doc-shell .source,
body.jr-docs .jr-doc-shell .verbatim {
  background: rgba(12, 28, 48, 0.85) !important;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 1rem 1.1rem;
  overflow-x: auto;
  color: #e8eef8;
}

body.jr-docs .jr-doc-shell code,
body.jr-docs .jr-doc-shell tt {
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  font-size: 0.92em;
}

body.jr-docs .jr-doc-shell table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.25rem 0;
}

body.jr-docs .jr-doc-shell th,
body.jr-docs .jr-doc-shell td {
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0.55rem 0.7rem;
  text-align: left;
}

body.jr-docs .jr-doc-shell th {
  background: rgba(255, 110, 32, 0.12);
  color: #ffb447;
}

body.jr-docs .jr-doc-shell tr:nth-child(even) td {
  background: rgba(255, 255, 255, 0.03);
}

body.jr-docs .jr-header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(16px);
  background: rgba(7, 15, 28, 0.9);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

/* Doc pages: horizontal logo in height-constrained header */
body.jr-docs .jr-brand-logo {
  height: 52px;
  max-width: min(280px, 48vw);
}

@media (max-width: 760px) {
  body.jr-docs .jr-doc-shell {
    padding-top: 5.5rem;
  }
}

/* Contribute / Support card grids */
body.jr-docs .jr-contrib-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.1rem;
  margin: 1.75rem 0 0.5rem;
}
body.jr-docs .jr-contrib-card {
  margin: 0;
  padding: 1.25rem 1.3rem 1.35rem;
  border-radius: 16px;
  border: 1px solid rgba(49, 186, 255, 0.2);
  background: linear-gradient(165deg, rgba(14, 32, 54, 0.92), rgba(7, 15, 28, 0.96));
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.28);
}
body.jr-docs .jr-contrib-title {
  margin: 0 0 0.65rem !important;
  color: #ffb447 !important;
  font-family: "Outfit", "Segoe UI", system-ui, sans-serif;
  font-size: 1.15rem !important;
  font-weight: 700;
  line-height: 1.25;
}
body.jr-docs .jr-contrib-card p {
  margin: 0 0 0.7rem !important;
  color: #c9d4e5;
  font-size: 0.98rem;
}
body.jr-docs .jr-contrib-card p:last-child {
  margin-bottom: 0 !important;
}
body.jr-docs .jr-contrib-card a {
  color: #31baff;
  font-weight: 600;
  text-decoration: none;
  word-break: break-word;
}
body.jr-docs .jr-contrib-card a:hover {
  text-decoration: underline;
  color: #7ad4ff;
}
body.jr-docs .jr-contrib-card code {
  color: #ffb447;
  background: rgba(255, 180, 71, 0.1);
  padding: 0.12rem 0.4rem;
  border-radius: 6px;
  font-size: 0.88em;
}
@media (max-width: 760px) {
  body.jr-docs .jr-contrib-grid {
    grid-template-columns: 1fr;
  }
}

/* Doc pages with sticky left TOC sidebar (all /doc/* pages that have a TOC) */
body.jr-docs .jr-doc-shell.jr-has-sidebar-toc {
  width: min(1280px, calc(100% - 2rem));
}

body.jr-docs .jr-doc-shell.jr-has-sidebar-toc > .jr-doc-layout {
  display: grid;
  grid-template-columns: minmax(200px, 272px) minmax(0, 1fr);
  column-gap: 2rem;
  align-items: start;
}

body.jr-docs .jr-doc-sidebar {
  position: sticky;
  top: 5.5rem;
  align-self: start;
  z-index: 5;
  max-height: calc(100vh - 6.5rem);
  overflow: hidden;
}

body.jr-docs .jr-doc-sidebar > ul.toc {
  margin: 0;
  padding: 0.85rem 0.75rem 1rem 0.9rem;
  max-height: calc(100vh - 6.5rem);
  overflow-x: hidden;
  overflow-y: auto;
  list-style: none;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: linear-gradient(180deg, rgba(14, 32, 54, 0.94), rgba(7, 15, 28, 0.96));
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.28);
  scrollbar-width: thin;
  scrollbar-color: rgba(49, 186, 255, 0.35) transparent;
}

body.jr-docs .jr-doc-sidebar > ul.toc::before {
  content: "On this page";
  display: block;
  margin: 0 0 0.75rem;
  padding: 0 0.15rem 0.55rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  color: #ffb447;
  font-family: "Outfit", "Segoe UI", system-ui, sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

body.jr-docs .jr-doc-sidebar > ul.toc ul {
  list-style: none;
  margin: 0.15rem 0 0.35rem;
  padding: 0 0 0 0.7rem;
  border-left: 1px solid rgba(49, 186, 255, 0.18);
}

body.jr-docs .jr-doc-sidebar > ul.toc li {
  margin: 0;
  padding: 0;
  color: #c9d4e5;
  font-size: 0.86rem;
  line-height: 1.35;
}

body.jr-docs .jr-doc-sidebar > ul.toc > li {
  margin-bottom: 0.2rem;
}

body.jr-docs .jr-doc-sidebar > ul.toc li.jr-toc-empty {
  display: none;
}

body.jr-docs .jr-doc-sidebar > ul.toc a {
  display: block;
  padding: 0.28rem 0.35rem;
  border-radius: 6px;
  color: #c9d4e5;
  text-decoration: none;
  transition: color 0.15s ease, background 0.15s ease;
}

body.jr-docs .jr-doc-sidebar > ul.toc > li > a {
  color: #f5f7ff;
  font-weight: 600;
  font-size: 0.9rem;
}

body.jr-docs .jr-doc-sidebar > ul.toc a:hover,
body.jr-docs .jr-doc-sidebar > ul.toc a.is-active {
  color: #7ad4ff;
  background: rgba(49, 186, 255, 0.1);
}

body.jr-docs .jr-doc-main {
  min-width: 0;
}

body.jr-docs .jr-doc-shell.jr-has-sidebar-toc h1,
body.jr-docs .jr-doc-shell.jr-has-sidebar-toc h2,
body.jr-docs .jr-doc-shell.jr-has-sidebar-toc h3,
body.jr-docs .jr-doc-shell.jr-has-sidebar-toc h4,
body.jr-docs .jr-doc-shell.jr-has-sidebar-toc [id] {
  scroll-margin-top: 5.75rem;
}

@media (max-width: 960px) {
  body.jr-docs .jr-doc-shell.jr-has-sidebar-toc > .jr-doc-layout {
    grid-template-columns: 1fr;
  }

  body.jr-docs .jr-doc-sidebar {
    position: relative;
    top: auto;
    max-height: none;
  }

  body.jr-docs .jr-doc-sidebar > ul.toc {
    max-height: min(42vh, 22rem);
    margin-bottom: 0.5rem;
  }
}

/* Previous / TOC / Next — top + bottom pagers on atomic doc pages */
body.jr-docs .jr-doc-top-anchor {
  position: relative;
  top: -5.5rem;
  height: 0;
  width: 0;
  overflow: hidden;
  pointer-events: none;
}

body.jr-docs .bottomLinks,
body.jr-docs .topLinks {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 0.85rem;
  align-items: stretch;
  margin: 2.75rem 0 1rem;
  padding: 0;
  clear: both;
}

body.jr-docs .topLinks {
  margin: 0 0 1.5rem;
}

body.jr-docs .bottomLinks .previousDocPage,
body.jr-docs .bottomLinks .nextDocPage,
body.jr-docs .bottomLinks .tocDocPage,
body.jr-docs .topLinks .previousDocPage,
body.jr-docs .topLinks .nextDocPage,
body.jr-docs .topLinks .tocDocPage {
  float: none;
  width: auto;
  margin: 0;
  padding: 0;
  position: static;
  background: none;
  height: auto;
  line-height: normal;
  display: block;
}

body.jr-docs .bottomLinks .previousDocPage,
body.jr-docs .topLinks .previousDocPage {
  grid-column: 1;
  justify-self: start;
}

body.jr-docs .bottomLinks .tocDocPage,
body.jr-docs .topLinks .tocDocPage {
  grid-column: 2;
  justify-self: center;
  text-align: center;
}

body.jr-docs .bottomLinks .nextDocPage,
body.jr-docs .topLinks .nextDocPage {
  grid-column: 3;
  justify-self: end;
  text-align: right;
}

body.jr-docs .bottomLinks a,
body.jr-docs .topLinks a {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 7.5rem;
  max-width: 16rem;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: linear-gradient(165deg, rgba(14, 32, 54, 0.92), rgba(7, 15, 28, 0.96));
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.22);
  text-decoration: none !important;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}

body.jr-docs .bottomLinks .nextDocPage a,
body.jr-docs .topLinks .nextDocPage a {
  align-items: flex-end;
  text-align: right;
}

body.jr-docs .bottomLinks .tocDocPage a,
body.jr-docs .topLinks .tocDocPage a {
  align-items: center;
  text-align: center;
  min-width: 5.5rem;
}

body.jr-docs .bottomLinks a:hover,
body.jr-docs .topLinks a:hover {
  border-color: rgba(49, 186, 255, 0.35);
  background: linear-gradient(165deg, rgba(20, 44, 72, 0.95), rgba(10, 22, 40, 0.98));
  transform: translateY(-1px);
}

body.jr-docs .bottomLinks .jr-doc-nav-dir,
body.jr-docs .topLinks .jr-doc-nav-dir {
  color: #ffb447;
  font-family: "Outfit", "Segoe UI", system-ui, sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

body.jr-docs .bottomLinks .previousDocPage .jr-doc-nav-dir::before,
body.jr-docs .topLinks .previousDocPage .jr-doc-nav-dir::before {
  content: "← ";
}

body.jr-docs .bottomLinks .nextDocPage .jr-doc-nav-dir::after,
body.jr-docs .topLinks .nextDocPage .jr-doc-nav-dir::after {
  content: " →";
}

body.jr-docs .bottomLinks .jr-doc-nav-title,
body.jr-docs .topLinks .jr-doc-nav-title {
  color: #f5f7ff;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.3;
}

body.jr-docs .bottomLinks a:hover .jr-doc-nav-title,
body.jr-docs .topLinks a:hover .jr-doc-nav-title {
  color: #7ad4ff;
}

/* Fixed Top control — does not scroll away with the page */
body.jr-docs .jr-back-to-top {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 60;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.1rem;
  min-width: 3.4rem;
  padding: 0.65rem 0.7rem 0.55rem;
  border-radius: 999px;
  border: 1px solid rgba(49, 186, 255, 0.35);
  background: linear-gradient(165deg, rgba(14, 32, 54, 0.96), rgba(7, 15, 28, 0.98));
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
  color: #f5f7ff;
  text-decoration: none !important;
  opacity: 1;
  pointer-events: auto;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

body.jr-docs .jr-back-to-top:hover {
  border-color: rgba(255, 180, 71, 0.55);
  color: #7ad4ff;
}

body.jr-docs .jr-back-to-top-dir {
  font-family: "Outfit", "Segoe UI", system-ui, sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #ffb447;
}

body.jr-docs .jr-back-to-top-icon {
  font-size: 1.05rem;
  line-height: 1;
  color: inherit;
}

@media (max-width: 760px) {
  body.jr-docs .bottomLinks,
  body.jr-docs .topLinks {
    grid-template-columns: 1fr;
  }

  body.jr-docs .bottomLinks .previousDocPage,
  body.jr-docs .bottomLinks .tocDocPage,
  body.jr-docs .bottomLinks .nextDocPage,
  body.jr-docs .topLinks .previousDocPage,
  body.jr-docs .topLinks .tocDocPage,
  body.jr-docs .topLinks .nextDocPage {
    grid-column: 1;
    justify-self: stretch;
  }

  body.jr-docs .bottomLinks a,
  body.jr-docs .bottomLinks .nextDocPage a,
  body.jr-docs .bottomLinks .tocDocPage a,
  body.jr-docs .topLinks a,
  body.jr-docs .topLinks .nextDocPage a,
  body.jr-docs .topLinks .tocDocPage a {
    align-items: flex-start;
    text-align: left;
    max-width: none;
  }

  body.jr-docs .jr-back-to-top {
    right: 0.85rem;
    bottom: 0.85rem;
  }
}
