/* Custom color scheme variables */
:root {
  --md-primary-fg-color: #0891b2;
  --md-primary-fg-color--light: #22d3ee;
  --md-primary-fg-color--dark: #0e7490;
  --md-accent-fg-color: #6366f1;
}

/* Adjust base font size for content to match home page text scale */
.md-typeset {
  font-size: 0.95rem;
}

[data-md-color-scheme="slate"] {
  --md-primary-fg-color: #22d3ee;
  --md-primary-fg-color--light: #67e8f9;
  --md-primary-fg-color--dark: #06b6d4;
  --md-accent-fg-color: #818cf8;
  --md-default-bg-color: #0f172a;
  --md-default-bg-color--light: #1e293b;
}

/* Hero gradient for home page */
.tx-container {
  background: linear-gradient(135deg, var(--md-primary-fg-color) 0%, var(--md-accent-fg-color) 100%);
}

/* Feature cards styling */
.feature-card {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.feature-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

/* Code block styling */
.md-typeset pre > code {
  font-size: 0.85em;
}

/* Top header bar: use the darker cyan for depth at the top of the page */
.md-header {
  background-color: var(--md-primary-fg-color--dark);
}

/* Menu tabs sit below the header in the lighter primary cyan — flipped from
   Material's default so the gradient runs dark-to-light top-to-bottom. */
.md-tabs {
  background-color: var(--md-primary-fg-color);
}

/* Use the full starkite wordmark SVG as the header brand. The SVG already
   contains the "Starkite" lettering, so the separate site-name text is
   hidden — the logo carries both icon and wordmark. */
.md-header .md-header__button.md-logo {
  padding: 0.25rem 0.4rem;
}
.md-header .md-header__button.md-logo img,
.md-header .md-header__button.md-logo svg {
  height: 2rem;
  width: auto;
  max-width: none;
}
.md-header .md-header__title {
  display: none;
}

/* Menu tabs: bolder text + full opacity so labels read clearly against the
   lighter cyan tab strip. Active link gets a heavier weight + underline. */
.md-tabs__link {
  font-weight: 700;
  opacity: 1;
  color: #ffffff;
}
.md-tabs__link--active,
.md-tabs__item--active > .md-tabs__link {
  font-weight: 800;
  color: #ffffff;
}

/* Admonition styling */
.md-typeset .admonition {
  border-radius: 0.5rem;
}

/* Table styling */
.md-typeset table:not([class]) {
  border-radius: 0.5rem;
  overflow: hidden;
  font-size: 0.95rem;
}

.md-typeset table:not([class]) th {
  background-color: var(--md-primary-fg-color);
  color: var(--md-primary-bg-color);
}

/* Button styling */
.md-button {
  border-radius: 0.375rem;
  font-weight: 500;
}

/* Footer — single continuous gradient covers both the sitemap and the
   copyright/social bar so they read as one visual block. Inverted from the
   hero gradient (lighter at top, deepest navy at bottom) to anchor the page. */
.md-footer {
  background: linear-gradient(180deg, #18293f 0%, #0a1628 55%, #04101e 100%);
}
.md-footer-meta {
  background: transparent;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.md-footer-meta__inner {
  padding: 1.25rem 0.8rem;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}
.md-copyright {
  text-align: center;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.78rem;
  line-height: 1.6;
}
.md-copyright__highlight {
  color: rgba(255, 255, 255, 0.92);
}
.md-footer-meta .md-social__link {
  color: rgba(255, 255, 255, 0.7);
}
.md-footer-meta .md-social__link:hover {
  color: #ffffff;
}

/* Footer sitemap — brand cell on the left, 3 link columns to the right */
.md-footer-sitemap {
  display: grid;
  grid-template-columns: minmax(140px, 200px) repeat(3, 1fr);
  gap: 2.5rem;
  padding: 3rem 0.8rem 2.5rem;
  align-items: start;
  color: rgba(255, 255, 255, 0.85);
}
.md-footer-sitemap__brand a {
  display: inline-block;
}
.md-footer-sitemap__brand img {
  height: 2.25rem;
  width: auto;
  display: block;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.3));
}
.md-footer-sitemap__col h4 {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.55);
  margin: 0 0 0.9rem 0;
}
.md-footer-sitemap__col ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.md-footer-sitemap__col li {
  margin-bottom: 0.45rem;
}
.md-footer-sitemap__col a {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  font-size: 0.86rem;
  transition: color 0.15s ease;
}
.md-footer-sitemap__col a:hover {
  color: #67e8f9;
}
@media (max-width: 50em) {
  .md-footer-sitemap {
    grid-template-columns: 1fr;
    gap: 1.75rem;
    padding: 2rem 0.8rem 1.5rem;
  }
}

/* Sidebar nav: top-level group headers (Fundamentals, Core Modules, …) are
   `navigation.sections` items — render them as bold heading labels. These are
   the only labels that should read as section titles. */
.md-nav--primary .md-nav__item--section > label.md-nav__link {
  color: var(--md-default-fg-color);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

[data-md-color-scheme="slate"] .md-nav--primary .md-nav__item--section > label.md-nav__link {
  color: var(--md-default-fg-color);
}

/* Nested subsection toggles that are NOT top-level sections (e.g. Security,
   HTTP) render as normal nav links, not headings — only the chevron marks them
   as expandable. `navigation.expand` keeps their children visible inline. */
.md-nav--primary .md-nav__item--nested:not(.md-nav__item--section) > label.md-nav__link {
  font-weight: 400;
  font-size: inherit;
  letter-spacing: normal;
}

/* Mobile-drawer subsection title (visible when the nav slides out on small
   screens) styled to match desktop section labels. */
.md-nav--primary .md-nav__title {
  color: var(--md-default-fg-color);
  font-size: 0.82rem;
  font-weight: 700;
}

/* On desktop (tabs visible), `navigation.tabs` lifts the active tab's label
   ("Docs") to the top of the left sidebar. The header tab already names the
   section, so the lifted label is redundant and crowds the top — hide it, the
   way Deno/Bun do. Only at the tabs breakpoint; the mobile drawer keeps the
   label for back-navigation. */
@media screen and (min-width: 76.25em) {
  .md-nav--lifted > .md-nav__list > .md-nav__item--active > .md-nav__link {
    display: none;
  }
}

/* Sizing overrides for tabbed content sets (Installation tabs, etc.) */
.tabbed-labels label {
  font-size: 0.95rem !important;
  font-weight: 700 !important;
  padding: 0.75rem 1.25rem !important;
}

/* Align the search box to the right side of the header on desktop viewports */
@media screen and (min-width: 60em) {
  .md-search {
    margin-left: auto;
  }
}
