/* Fadenstack brand on the Zensical theme. Tokens follow brand/tokens: navy and paper, Frost for the UI,
   rose only for the thread, Sora for headings, IBM Plex for text and code, one 12px radius. */

:root {
  --md-text-font: "IBM Plex Sans";
  --md-code-font: "IBM Plex Mono";
  --fs-thread: #ff4d6d;
  --fs-radius: 12px;
}

/* the header is navy in both themes, like the website */
[data-md-color-primary="custom"] {
  --md-primary-fg-color: #0a0e1a;
  --md-primary-fg-color--light: #172033;
  --md-primary-fg-color--dark: #070b15;
  --md-primary-bg-color: #f3f4f6;
  --md-primary-bg-color--light: #b9c0cc;
}
[data-md-color-accent="custom"] {
  --md-accent-fg-color: #486a91;
  --md-accent-fg-color--transparent: rgba(72, 106, 145, 0.1);
  --md-accent-bg-color: #ffffff;
  --md-accent-bg-color--light: rgba(255, 255, 255, 0.7);
}

[data-md-color-scheme="default"] {
  --md-default-bg-color: #ffffff;
  --md-default-fg-color: rgba(10, 14, 26, 0.87);
  --md-default-fg-color--light: rgba(10, 14, 26, 0.6);
  --md-default-fg-color--lighter: rgba(10, 14, 26, 0.32);
  --md-default-fg-color--lightest: rgba(10, 14, 26, 0.08);
  --md-typeset-color: #343b4c;
  --md-typeset-a-color: #486a91;
  --md-code-bg-color: #f1f4f9;
  --md-code-fg-color: #1c2336;
  --md-footer-bg-color: #0a0e1a;
  --md-footer-bg-color--dark: #070b15;
  --fs-thread: #e2325a;
}

[data-md-color-scheme="slate"] {
  --md-hue: 225deg;
  --md-default-bg-color: #0a0e1a;
  --md-default-bg-color--light: rgba(10, 14, 26, 0.54);
  --md-default-fg-color: rgba(243, 244, 246, 0.87);
  --md-default-fg-color--light: rgba(243, 244, 246, 0.62);
  --md-default-fg-color--lighter: rgba(243, 244, 246, 0.32);
  --md-default-fg-color--lightest: rgba(243, 244, 246, 0.1);
  --md-typeset-color: #b9c0cc;
  --md-typeset-a-color: #81a1c1;
  --md-accent-fg-color: #a5bfd9;
  --md-accent-fg-color--transparent: rgba(129, 161, 193, 0.14);
  --md-code-bg-color: #111827;
  --md-code-fg-color: #e5e9f0;
  --md-footer-bg-color: #0d1220;
  --md-footer-bg-color--dark: #070b15;
}

/* type */
.md-typeset h1,
.md-typeset h2,
.md-typeset h3,
.md-typeset h4,
.md-header__topic:first-child,
.md-nav__title,
.md-tabs__link {
  font-family: "Sora", var(--md-text-font-family);
}
.md-typeset h1 {
  font-weight: 600;
  letter-spacing: -0.025em;
  color: var(--md-default-fg-color);
}
.md-typeset h2 {
  font-weight: 600;
  letter-spacing: -0.015em;
}
.md-typeset h3 {
  font-weight: 600;
}
/* the thread: a short rose line under each page title */
.md-typeset h1::after {
  content: "";
  display: block;
  width: 36px;
  height: 3px;
  margin-top: 0.7rem;
  border-radius: 2px;
  background: var(--fs-thread);
}

/* one radius everywhere */
.md-typeset pre > code,
.md-typeset .highlight,
.md-typeset .admonition,
.md-typeset details,
.md-typeset .tabbed-set,
.md-typeset .md-button,
.md-typeset .grid.cards > ul > li,
.md-typeset .grid > .card,
.md-search__form,
.md-search__output {
  border-radius: var(--fs-radius);
}
.md-typeset .highlight pre > code {
  border-radius: var(--fs-radius);
}
.md-typeset__table table:not([class]) {
  border-radius: var(--fs-radius);
  overflow: hidden;
}

/* the sites every Fadenstack docs page links to: Website, Help, Developers */
.fs-sites {
  display: flex;
  align-items: center;
  gap: 0.1rem;
  margin: 0 0.4rem;
  flex: none;
}
/* The header takes the page's background (navy in the dark scheme, white in the light one), so the links and
   the mark follow the scheme. */
.fs-sites a {
  padding: 0.3rem 0.6rem;
  border-radius: var(--fs-radius);
  color: var(--md-default-fg-color--light);
  font-size: 0.7rem;
  font-weight: 500;
  white-space: nowrap;
}
.fs-sites a:hover,
.fs-sites a:focus-visible {
  color: var(--md-default-fg-color);
  background: var(--md-default-fg-color--lightest);
}
.fs-sites a[aria-current] {
  color: var(--md-default-fg-color);
  background: var(--md-default-fg-color--lightest);
}
/* The phone menu's title shows the mark through a more specific theme rule, so these match it as closely. */
[data-md-color-scheme="default"] .md-logo img.fs-logo--dark,
[data-md-color-scheme="slate"] .md-logo img.fs-logo--light,
[data-md-color-scheme="default"] .md-nav .md-nav__title[for="__drawer"] .md-logo img.fs-logo--dark,
[data-md-color-scheme="slate"] .md-nav .md-nav__title[for="__drawer"] .md-logo img.fs-logo--light {
  display: none;
}
@media screen and (max-width: 59.9844em) {
  .fs-sites {
    display: none;
  }
}

/* the home page's entry points */
.md-typeset .fs-lead {
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--md-default-fg-color--light);
  max-width: 38rem;
}
.md-typeset .grid.cards > ul > li:hover {
  border-color: var(--md-accent-fg-color--transparent);
}

/* labels for features that are planned, not shipped */
.md-typeset .fs-planned {
  display: inline-block;
  padding: 0 0.5em;
  border: 1px dashed currentColor;
  border-radius: 999px;
  font-size: 0.7em;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  vertical-align: middle;
  opacity: 0.8;
}

@media screen and (min-width: 60em) {
  .md-typeset .grid.cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* code in tables breaks between words only, and names in the first column stay whole */
.md-typeset table:not([class]) code {
  word-break: normal;
}
.md-typeset table:not([class]) td:first-child code {
  white-space: nowrap;
}

/* screenshots in a page: the one radius, and a hairline so a dark screen does not melt into a dark page */
.md-typeset p > img,
.md-typeset li > img,
.md-typeset li > p > img {
  border-radius: var(--fs-radius);
  border: 1px solid var(--md-default-fg-color--lightest);
}
