/* Shared prose styling for Markdown documentation pages.
   Load this after legacy assets so it becomes the final baseline. */

:root,
[data-md-color-scheme="default"] {
  --nubra-docs-link: #0d47a1;
  --nubra-docs-link-hover: #1565c0;
  --nubra-docs-border: rgba(15, 23, 42, 0.08);
  --nubra-docs-border-strong: rgba(15, 23, 42, 0.14);
  --nubra-docs-code-bg: rgba(15, 23, 42, 0.045);
  --nubra-docs-quote-bg: rgba(13, 71, 161, 0.05);
  --nubra-docs-quote-border: rgba(13, 71, 161, 0.24);
}

[data-md-color-scheme="slate"] {
  --nubra-docs-link: #8ab4ff;
  --nubra-docs-link-hover: #b6d0ff;
  --nubra-docs-border: rgba(255, 255, 255, 0.08);
  --nubra-docs-border-strong: rgba(255, 255, 255, 0.14);
  --nubra-docs-code-bg: rgba(255, 255, 255, 0.06);
  --nubra-docs-quote-bg: rgba(138, 180, 255, 0.08);
  --nubra-docs-quote-border: rgba(138, 180, 255, 0.28);
}

.md-content__inner {
  padding-top: 0.35rem;
}

.md-content__inner > .md-typeset {
  max-width: 78ch;
}

.md-typeset > h1,
.md-typeset > h2,
.md-typeset > h3,
.md-typeset > h4,
.md-typeset > h5,
.md-typeset > h6 {
  line-height: 1.18;
  letter-spacing: -0.01em;
  font-weight: 700;
  scroll-margin-top: 5rem;
}

.md-typeset > h1 {
  margin: 0 0 1rem;
  font-size: 2.1rem;
}

.md-typeset > h2 {
  margin: 2.25rem 0 0.9rem;
  padding-top: 1rem;
  border-top: 1px solid var(--nubra-docs-border);
  font-size: 1.35rem;
}

.md-typeset > h3 {
  margin: 1.5rem 0 0.65rem;
  font-size: 1.08rem;
}

.md-typeset > h4,
.md-typeset > h5,
.md-typeset > h6 {
  margin: 1.15rem 0 0.5rem;
}

.md-typeset > p,
.md-typeset > ul,
.md-typeset > ol,
.md-typeset > blockquote,
.md-typeset > table,
.md-typeset > .highlight,
.md-typeset > pre,
.md-typeset > details,
.md-typeset > hr,
.md-typeset > iframe,
.md-typeset > .tabbed-set {
  margin: 0 0 1rem;
}

.md-typeset > ul,
.md-typeset > ol {
  padding-left: 1.2rem;
}

.md-typeset li + li {
  margin-top: 0.35rem;
}

.md-typeset p,
.md-typeset li,
.md-typeset td,
.md-typeset th {
  line-height: 1.72;
}

.md-typeset strong {
  font-weight: 650;
}

.md-typeset a {
  color: var(--nubra-docs-link);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.14em;
}

.md-typeset a:hover {
  color: var(--nubra-docs-link-hover);
}

.md-typeset hr {
  border: 0;
  border-top: 1px solid var(--nubra-docs-border-strong);
}

.md-typeset blockquote {
  padding: 0.85rem 1rem;
  border-left: 3px solid var(--nubra-docs-quote-border);
  background: var(--nubra-docs-quote-bg);
  border-radius: 0 12px 12px 0;
}

.md-typeset .admonition.important-rules,
.md-typeset details.important-rules {
  border: 1px solid rgba(124, 58, 237, 0.24);
  background: linear-gradient(180deg, rgba(168, 85, 247, 0.13), rgba(168, 85, 247, 0.05));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
  border-radius: 16px;
}

.md-typeset .important-rules > .admonition-title,
.md-typeset .important-rules > summary {
  background: rgba(124, 58, 237, 0.14);
  border-radius: 16px 16px 0 0;
  font-weight: 700;
}

.md-typeset .important-rules > .admonition-title::before,
.md-typeset .important-rules > summary::before {
  background-color: rgb(109, 40, 217);
}

[data-md-color-scheme="slate"] .md-typeset .admonition.important-rules,
[data-md-color-scheme="slate"] .md-typeset details.important-rules {
  border-color: rgba(192, 132, 252, 0.24);
  background: linear-gradient(180deg, rgba(88, 28, 135, 0.34), rgba(59, 7, 100, 0.2));
  box-shadow: none;
}

[data-md-color-scheme="slate"] .md-typeset .important-rules > .admonition-title,
[data-md-color-scheme="slate"] .md-typeset .important-rules > summary {
  background: rgba(168, 85, 247, 0.16);
}

.md-typeset code {
  border-radius: 0.4rem;
  background: var(--nubra-docs-code-bg);
  padding: 0.12rem 0.36rem;
}

.md-typeset pre > code {
  padding: 0;
  background: transparent;
}

.md-typeset .highlight,
.md-typeset pre {
  margin: 0 0 1rem;
  border: 1px solid var(--nubra-docs-border);
  border-radius: 14px;
  overflow: hidden;
}

.md-typeset .highlight pre,
.md-typeset pre {
  padding: 0.9rem 1rem;
  background: var(--md-code-bg-color);
}

.md-typeset .highlight pre code,
.md-typeset pre code {
  background: transparent;
  padding: 0;
  border-radius: 0;
}

.md-typeset .tabbed-set {
  margin: 0 0 1rem;
}

.md-typeset .tabbed-labels {
  margin-bottom: 0.35rem;
}

.md-typeset .tabbed-labels > label {
  border-radius: 999px;
}

.md-typeset .tabbed-content > .tabbed-block > .highlight:last-child,
.md-typeset .tabbed-content > .tabbed-block > pre:last-child {
  margin-bottom: 0;
}

.md-typeset table:not([class]) {
  border: 1px solid var(--nubra-docs-border);
  border-radius: 12px;
  overflow: hidden;
}

.md-typeset table:not([class]) th {
  font-weight: 650;
}

.md-typeset img,
.md-typeset iframe {
  display: block;
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
  border-radius: 16px;
}

.md-typeset iframe {
  border: 1px solid var(--nubra-docs-border);
}

@media (max-width: 760px) {
  .md-typeset > h1 {
    font-size: 1.8rem;
  }

  .md-typeset > h2 {
    font-size: 1.22rem;
  }

  .md-typeset iframe {
    width: 100%;
    min-height: 220px;
    height: auto;
    aspect-ratio: 16 / 9;
  }
}
