/* Markdown article body (Eleventy Resources) */
.article-body > *:first-child {
  margin-top: 0;
}

/* In-article links: body colour + bold underline (not brand primary) */
.article-body a:not(.btn):not(.stretched-link):not(.docs-page-link):not(.card-title) {
  color: var(--bs-body-color);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  text-decoration-color: color-mix(in srgb, var(--bs-body-color) 45%, transparent);
  transition:
    color 0.15s ease,
    text-decoration-color 0.15s ease,
    text-decoration-thickness 0.15s ease,
    text-underline-offset 0.15s ease;
}

.article-body a:not(.btn):not(.stretched-link):not(.docs-page-link):not(.card-title):hover,
.article-body a:not(.btn):not(.stretched-link):not(.docs-page-link):not(.card-title):focus {
  color: var(--bs-body-color);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.28em;
  text-decoration-color: var(--bs-body-color);
}

/* Page title: former global h2 size (2.75rem) */
.docs-layout .docs-main-col > h1,
.eleventy-article h1 {
  font-size: 2.75rem;
  line-height: 1.2;
}

/* Section rhythm: ~2× space above a heading vs below (article pages only) */
.article-body h2 {
  font-size: 2rem; /* between former h2 (2.75rem) and article h3 (1.25rem) */
  line-height: 1.25;
  margin-top: 2.75rem;
  margin-bottom: 1.35rem;
}

.article-body h3 {
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.35;
  margin-top: 2.25rem;
  margin-bottom: 1.1rem;
}

.article-body h4 {
  margin-top: 1.85rem;
  margin-bottom: 0.9rem;
}

.article-body h5,
.article-body h6 {
  margin-top: 1.6rem;
  margin-bottom: 0.8rem;
}

.article-body img {
  max-width: 100%;
  height: auto;
  border-radius: 0.5rem;
}

.article-body table {
  width: 100%;
  margin-bottom: 1.5rem;
  border-collapse: collapse;
}

.article-body th,
.article-body td {
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--bs-border-color, #dee2e6);
  vertical-align: top;
}

.article-body thead th {
  background: var(--bs-tertiary-bg, rgba(0, 0, 0, 0.04));
  font-weight: 600;
}

.article-body blockquote {
  margin: 1.25rem 0;
  padding: 0.75rem 1rem;
  border-left: 4px solid var(--bs-primary, #0d6efd);
  background: var(--bs-tertiary-bg, rgba(0, 0, 0, 0.04));
}

.article-body pre {
  padding: 1rem;
  overflow-x: auto;
  border-radius: 0.5rem;
  background: var(--bs-tertiary-bg, rgba(0, 0, 0, 0.06));
  margin-bottom: 1.25rem;
}

.article-body code {
  font-size: 0.9em;
}

.article-body pre code {
  font-size: 0.875em;
}

.article-body ul.contains-task-list,
.article-body ul.task-list {
  list-style: none;
  padding-left: 0;
}

.article-body li + li {
  margin-top: 0.25rem;
}

.article-body hr {
  margin: 2rem 0;
}

.article-body .article-callout {
  margin: 1.25rem 0;
}

.article-body .card .card-img-top {
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.article-body h2[id],
.article-body h3[id],
.article-body h4[id],
.article-body h5[id],
.article-body h6[id] {
  scroll-margin-top: 6rem;
}

.article-toc {
  padding: 0.35rem 0;
  border-top: 1px solid var(--bs-border-color, rgba(255, 255, 255, 0.15));
  border-bottom: 1px solid var(--bs-border-color, rgba(255, 255, 255, 0.15));
  border-radius: 0;
  background: transparent;
}

.article-toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.article-toc-list li {
  margin: 0;
}

.article-toc-link {
  display: block;
  width: 100%;
  padding: 0.3rem 0.75rem;
  font-size: 0.875rem;
  color: #8a919a;
  text-decoration: underline;
  text-decoration-color: rgba(138, 145, 154, 0.35);
  text-underline-offset: 0.2em;
  text-decoration-thickness: 1px;
  border-radius: 0.375rem;
  transition: background-color 0.15s ease, color 0.15s ease, text-decoration-color 0.15s ease;
}

.article-toc-link:hover,
.article-toc-link:focus {
  color: #6f7680;
  background-color: rgba(0, 0, 0, 0.06);
  text-decoration: underline;
  text-decoration-color: rgba(111, 118, 128, 0.55);
}

[data-bs-theme="dark"] .article-toc-link {
  color: #8e959e;
  text-decoration-color: rgba(142, 149, 158, 0.35);
}

[data-bs-theme="dark"] .article-toc-link:hover,
[data-bs-theme="dark"] .article-toc-link:focus {
  color: #aeb4bc;
  background-color: rgba(255, 255, 255, 0.08);
  text-decoration-color: rgba(174, 180, 188, 0.55);
}

/* Help docs layout (sidebar + article) */
.docs-sidebar-col {
  position: relative;
}

/* Mobile: article first, nav below with top rule */
@media (max-width: 991.98px) {
  .docs-sidebar-col {
    border-top: 1px solid var(--bs-border-color, rgba(255, 255, 255, 0.15));
    padding-top: 1.5rem;
    margin-top: 0.5rem;
  }
}

/* Desktop: aside left, vertical separator */
@media (min-width: 992px) {
  .docs-sidebar-col {
    border-right: 1px solid var(--bs-border-color, rgba(255, 255, 255, 0.15));
    padding-right: 1.5rem;
  }

  .docs-main-col {
    padding-left: 1.75rem;
  }

  .docs-sidebar {
    position: sticky;
    top: 6rem;
    max-height: calc(100vh - 7rem);
    overflow-y: auto;
    padding-right: 0.25rem;
  }
}

.docs-sidebar-parent {
  display: flex;
  align-items: center;
  gap: 0.15rem;
}

.docs-sidebar-parent-link {
  flex: 1 1 auto;
  min-width: 0;
  font-weight: 600;
}

.docs-sidebar-toggle {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  padding: 0;
  border: 0;
  border-radius: 0.375rem;
  background: transparent;
  color: #8a919a;
  line-height: 1;
}

.docs-sidebar-toggle:hover,
.docs-sidebar-toggle:focus {
  color: #e8eaed;
  background-color: rgba(255, 255, 255, 0.06);
}

.docs-sidebar-toggle .bi-chevron-right {
  transition: transform 0.15s ease;
  font-size: 0.85rem;
}

.docs-sidebar-toggle[aria-expanded="true"] .bi-chevron-right {
  transform: rotate(90deg);
}

.docs-sidebar-list {
  padding: 0.15rem 0 0.35rem 1.65rem;
}

.docs-sidebar-list li + li {
  margin-top: 0.1rem;
}

.docs-sidebar-link {
  display: block;
  padding: 0.3rem 0.5rem;
  font-size: 0.875rem;
  font-weight: 400;
  color: #8a919a;
  text-decoration: none;
  background: transparent;
  border: 0;
  border-radius: 0;
}

.docs-sidebar-link:hover,
.docs-sidebar-link:focus {
  color: #c5cad1;
  background: transparent;
  text-decoration: none;
}

.docs-sidebar-link.is-active {
  color: #e8eaed;
  font-weight: 700;
  background: transparent;
  border: 0;
}

[data-bs-theme="light"] .docs-sidebar-link {
  color: #5c636c;
}

[data-bs-theme="light"] .docs-sidebar-link:hover,
[data-bs-theme="light"] .docs-sidebar-link:focus {
  color: #2b3038;
  background: transparent;
}

[data-bs-theme="light"] .docs-sidebar-link.is-active {
  color: #1a1d21;
  font-weight: 700;
  background: transparent;
}

[data-bs-theme="light"] .docs-sidebar-toggle {
  color: #5c636c;
}

[data-bs-theme="light"] .docs-sidebar-toggle:hover,
[data-bs-theme="light"] .docs-sidebar-toggle:focus {
  color: #2b3038;
  background-color: rgba(0, 0, 0, 0.05);
}

.docs-updated-callout {
  margin-top: 0;
  margin-bottom: 1.25rem;
  font-size: 0.8125rem;
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}

.docs-main-col > .docs-updated-callout {
  width: 100%;
}

/* Help hub + section indexes — simple Notion-style link lists */
.docs-topic-title {
  color: inherit;
  text-decoration: none;
}

.docs-topic-title:hover,
.docs-topic-title:focus {
  color: var(--bs-primary, #f7c32e);
  text-decoration: underline;
}

.docs-page-links li {
  margin: 0;
}

.docs-page-links li + li {
  margin-top: 0.45rem;
}

.docs-page-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.95rem;
  color: #8a919a;
  text-decoration: underline;
  text-decoration-color: rgba(138, 145, 154, 0.35);
  text-underline-offset: 0.18em;
}

.docs-page-link-icon {
  flex-shrink: 0;
  text-decoration: none;
  opacity: 0.9;
}

.docs-page-link:hover,
.docs-page-link:focus {
  color: #e8eaed;
  text-decoration-color: rgba(232, 234, 237, 0.55);
}

[data-bs-theme="light"] .docs-page-link {
  color: #5c636c;
  text-decoration-color: rgba(92, 99, 108, 0.35);
}

[data-bs-theme="light"] .docs-page-link:hover,
[data-bs-theme="light"] .docs-page-link:focus {
  color: #2b3038;
  text-decoration-color: rgba(43, 48, 56, 0.55);
}
