/* ── Colour scheme: dark navy primary, indigo accent ── */
:root {
  --md-default-bg-color: #f8f8f8;
  --md-primary-fg-color: #1a1a2e;
  --md-primary-fg-color--light: #2d2d4a;
  --md-primary-fg-color--dark: #0f0f1e;
  --md-accent-fg-color: #4051b5;
  --md-accent-fg-color--transparent: rgba(64, 81, 181, 0.1);
}

[data-md-color-scheme="slate"] {
  --md-primary-fg-color: #1a1a2e;
  --md-primary-fg-color--light: #2d2d4a;
  --md-primary-fg-color--dark: #0f0f1e;
  --md-accent-fg-color: #4051b5;
  --md-accent-fg-color--transparent: rgba(64, 81, 181, 0.1);
}

/* ── Typography: 18px body, 720px max width ── */
:root {
  --md-text-font: "Inter", sans-serif;
  --md-code-font: "Roboto Mono", monospace;
}

.md-typeset {
  font-size: 18px;
  line-height: 1.6;
}

h1, h2, h3, h4, h5, h6,
.md-typeset h1,
.md-typeset h2,
.md-typeset h3,
.md-typeset h4,
.md-typeset h5,
.md-typeset h6 {
  font-family: "Inter", sans-serif;
}

/* Max content width: 720px */
.md-content__inner {
  max-width: 720px;
  margin: auto;
  padding-top: 0.5rem;
}

/* Tighten h1 margins so hero content sits closer */
.md-typeset h1 {
  margin-top: 0;
  margin-bottom: 0.15em;
}

/* First paragraph after h1: close the gap */
.md-typeset h1 + p {
  margin-top: 0;
  margin-bottom: 0.25em;
}

/* Hide heading permalink anchors until hover */
.headerlink { opacity: 0; transition: opacity 0.2s; }
*:hover > .headerlink { opacity: 1; }

/* SVG images: scale to container instead of overflowing */
img[src$=".svg"] {
  max-width: 100%;
  height: auto;
}

/* ── Homepage styles ── */

/* Homepage: hide the auto-generated page title (only when .home-subtitle follows) */
.md-content__inner > h1:first-child:has(+ .home-subtitle) {
  display: none;
}

/* Hero tagline */
.home-subtitle {
  text-align: center;
  color: var(--md-default-fg-color);
  max-width: 38rem;
  margin: 1rem auto 2rem;
}

.home-subtitle strong {
  display: block;
  font-size: 1.85rem;
  line-height: 1.3;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 0.5rem;
}

.home-subtitle p {
  font-size: 1.1rem;
  line-height: 1.5;
  font-weight: 400;
  color: var(--md-default-fg-color--light);
}

/* Pull quote */
.pull-quote {
  text-align: center;
  margin: 0 auto 2.5rem;
  max-width: 32rem;
}

.pull-quote blockquote {
  border-left: none !important;
  font-size: 1.25rem;
  line-height: 1.5;
  color: var(--md-default-fg-color--light);
  padding: 0;
  margin: 0;
}

/* Stacked clickable paths at bottom of homepage */
.home-paths {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin: 2rem 0 1rem;
}

.home-path {
  border: 1px solid var(--md-default-fg-color--lightest);
  border-radius: 0.5rem;
  padding: 1.25rem 1.5rem;
  background: var(--md-code-bg-color);
}

.home-path h4 {
  margin-top: 0 !important;
  margin-bottom: 0.25rem;
  font-size: 1.05rem;
  color: var(--md-accent-fg-color);
}

.home-path p:last-of-type {
  margin-bottom: 0.5rem;
}

.home-path .md-button {
  align-self: flex-start;
  white-space: nowrap;
}

/* ── Cross-site callout ── */
.runtime-callout {
  border: 2px solid var(--md-accent-fg-color);
  border-radius: 0.5rem;
  padding: 1.5rem 2rem;
  margin: 2.5rem 0 1.5rem;
  background: var(--md-accent-fg-color--transparent);
  text-align: center;
}

.runtime-callout p {
  margin: 0;
}

.runtime-callout .runtime-callout__label {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--md-accent-fg-color);
  margin-bottom: 0.5rem;
}

.runtime-callout .runtime-callout__title {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--md-default-fg-color);
  margin-bottom: 0.35rem;
}

.runtime-callout .runtime-callout__desc {
  font-size: 0.92rem;
  color: var(--md-default-fg-color--light);
  margin-bottom: 1rem;
}

.runtime-callout .md-button {
  font-size: 0.85rem;
}

/* ── Architecture diagram ── */
.arch-diagram {
  display: block;
  margin: 1.5rem auto;
  max-width: 38rem;
}

/* ── Mobile: inset content from screen edges ── */
@media (max-width: 768px) {
  .md-content__inner {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }
}

/* ── Mobile: tighten tables ── */
@media (max-width: 768px) {
  .md-typeset table:not([class]) {
    font-size: 0.8rem;
  }

  .md-typeset table:not([class]) td,
  .md-typeset table:not([class]) th {
    padding: 0.4em 0.5em;
  }
}

@media (max-width: 480px) {
  .md-typeset table:not([class]) {
    font-size: 0.72rem;
  }

  .md-typeset table:not([class]) td,
  .md-typeset table:not([class]) th {
    padding: 0.3em 0.4em;
  }
}

/* ── SbD indigo dot logo ── */
.sbd-dot {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  min-width: 32px;
  border-radius: 50%;
  background-color: #4051b5;
  color: #fff !important;
  font-family: var(--md-text-font);
  font-size: 0.5rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-decoration: none;
  line-height: 1;
  margin-right: 0.5rem;
  flex-shrink: 0;
}

.sbd-dot:hover {
  background-color: #3545a0;
  text-decoration: none;
}

/* ── Single-row navbar ── */
.md-header {
  box-shadow: none;
  background-color: var(--md-default-bg-color) !important;
  border-bottom: 1px solid var(--md-default-fg-color--lightest);
}

.md-header__inner {
  display: flex;
  flex-direction: row;
  align-items: center;
}

.md-header .md-logo img,
.md-header .md-logo svg {
  filter: none;
}

.md-header .md-icon {
  color: var(--md-default-fg-color) !important;
}

.md-header__title,
.md-header__topic {
  color: var(--md-default-fg-color) !important;
  font-family: var(--md-text-font);
}

/* Inline nav tabs inside the header row */
.md-header-tabs {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 0.25rem;
  flex: 1;
  justify-content: center;
  align-items: center;
}

.md-header-tabs__link {
  color: var(--md-default-fg-color);
  font-family: var(--md-text-font);
  font-size: 0.82rem;
  font-weight: 500;
  padding: 0.4rem 0.75rem;
  text-decoration: none;
  white-space: nowrap;
  border-radius: 0.25rem;
  transition: color 0.15s, background-color 0.15s;
}

.md-header-tabs__link--active {
  color: var(--md-default-fg-color);
  font-weight: 600;
}

.md-header-tabs__link:hover {
  color: var(--md-default-fg-color);
  background-color: rgba(0, 0, 0, 0.05);
}

/* Hide inline tabs on mobile — drawer takes over */
@media (max-width: 76.25em) {
  .md-header-tabs {
    display: none;
  }
}

/* Old tabs bar is now empty — hide it */
.md-tabs {
  display: none;
}

/* Mobile drawer: remove accent colour, use black throughout */
.md-nav--primary {
  --md-accent-fg-color: var(--md-default-fg-color);
  --md-accent-fg-color--transparent: transparent;
}

.md-nav__link--active,
.md-nav__link:focus,
.md-nav__link:hover,
.md-nav__item--active > .md-nav__link,
.md-nav--primary .md-nav__link--active,
.md-nav--primary .md-nav__item--active > .md-nav__link,
[data-md-level] .md-nav__link--active,
.md-nav__link[data-md-state="current"] {
  color: var(--md-default-fg-color) !important;
}

/* Footer */
.md-footer {
  background-color: #f5f5f5;
  color: var(--md-default-fg-color);
}

.md-footer-meta {
  background-color: #e8e8e8;
}

.md-footer-nav__link,
.md-footer-prev .md-footer-nav__link,
.md-footer-next .md-footer-nav__link,
.md-footer__link {
  color: var(--md-default-fg-color) !important;
}

.md-footer-nav__direction,
.md-footer__direction {
  color: var(--md-default-fg-color--light) !important;
}

.md-footer-meta__inner {
  color: var(--md-default-fg-color--light);
}

.md-footer-meta__inner a,
.md-social__link {
  color: var(--md-default-fg-color) !important;
}

.md-copyright {
  color: var(--md-default-fg-color--light);
}
