/* Storix docs: small theme tweaks. */

/* Landing banner: match the active documentation color scheme. */
.brand-banner {
  max-width: 900px;
  margin: 0 auto 1.5rem;
}
.brand-banner__image {
  display: block;
  width: 100%;
  border-radius: 0.5rem;
}
.brand-banner__image--light {
  display: none;
}
[data-md-color-scheme="default"] .brand-banner__image--dark {
  display: none;
}
[data-md-color-scheme="default"] .brand-banner__image--light {
  display: block;
}
[data-md-color-scheme="slate"] .brand-banner__image--dark {
  display: block;
}
[data-md-color-scheme="slate"] .brand-banner__image--light {
  display: none;
}

/* Minimalist heading anchor, like FastAPI: subtle, appears on hover. */
.md-typeset .headerlink {
  font-size: 0.7em;
  opacity: 0;
  transition: opacity 0.15s;
}
.md-typeset h1:hover .headerlink,
.md-typeset h2:hover .headerlink,
.md-typeset h3:hover .headerlink,
.md-typeset h4:hover .headerlink,
.md-typeset h5:hover .headerlink,
.md-typeset h6:hover .headerlink {
  opacity: 0.35;
}
.md-typeset .headerlink:hover {
  opacity: 0.9;
}

/* Keep code identifiers (import paths) on one line inside tables. */
.md-typeset table td code {
  white-space: nowrap;
}

/* Footer: a deep, intentional dark instead of a jarring lighter band. */
[data-md-color-scheme="slate"] {
  --md-footer-bg-color: #0b0e14;
  --md-footer-bg-color--dark: #08090d;
}

/* Mute the footer meta line (copyright + attribution) so it recedes. */
.md-footer-meta {
  font-size: 0.72rem;
  opacity: 0.55;
}

/* Repo link: GitHub icon + name only. Hide the injected star/fork/version
   facts, which are noise on a young project. */
.md-source__facts {
  display: none;
}

/* Header layout: search centered, GitHub + theme toggle grouped at the far right. */
.md-search {
  flex: 0 1 auto;
  margin: 0 auto;
}
.md-header__source {
  order: 90;
  margin-left: 0.4rem;
}
.md-header__option {
  order: 91;
  margin-left: 0.15rem;
}

/* Wide layout on large screens. The default 61rem grid strands the whole page
   in a narrow column in the middle of the viewport. Instead: navigation pinned
   near the left edge, the table of contents on the right, and the prose column
   capped at a readable measure and centred in the space between them. */
@media screen and (min-width: 76.25em) {
  .md-grid {
    max-width: 100%;
  }
  .md-header__inner,
  .md-main__inner,
  .md-footer__inner {
    padding-left: 1.2rem;
    padding-right: 1.2rem;
  }
  /* Both sidebars sit flush against their edge; the prose centres between them. */
  .md-content {
    max-width: 42rem;
    margin-inline: auto;
  }
  /* A page without a table of contents still reserves its column, so the prose
     lands in the same place on every page. */
  .md-sidebar--secondary[hidden] {
    display: block;
    visibility: hidden;
  }
}

/* Copy confirmation popup (md-dialog) and hover tooltips: match the theme
   instead of a bright default block. */
.md-dialog,
.md-tooltip {
  background-color: var(--md-default-bg-color);
  color: var(--md-default-fg-color);
  border: 1px solid var(--md-default-fg-color--lightest);
}
.md-dialog__inner {
  color: var(--md-default-fg-color);
}

/* Utility: hide an element (e.g. the home page's H1, kept only to suppress the
   auto-generated "Index" title). */
.hidden {
  display: none;
}
.storix-demo {
  margin: 2rem 0;
}

.storix-demo video {
  display: block;
  width: 100%;
  border: 1px solid var(--md-default-fg-color--lightest);
  border-radius: 0.6rem;
  background: #080b10;
}

.storix-demo figcaption {
  margin-top: 0.65rem;
  color: var(--md-default-fg-color--light);
  font-size: 0.8rem;
  text-align: center;
}
