/* The SIPhon family look for the documentation site: colours from the brand kit's tokens
   (siphon-project/brand, tokens/siphon.css) and the console's own typefaces, served from this site. */

@font-face {
  font-family: "Inter";
  src: url("../fonts/InterVariable.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("../fonts/JetBrainsMono-Regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("../fonts/JetBrainsMono-Medium.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "Space Grotesk";
  src: url("../fonts/SpaceGrotesk-Regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Space Grotesk";
  src: url("../fonts/SpaceGrotesk-Bold.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

:root {
  --siphon-ink: #11161c;
  --siphon-accent: #e8541e;
  --siphon-ground: #f3f4f6;
  --siphon-muted: #4b5563;
  --siphon-muted-on-dark: #9ca3af;

  --md-text-font-family: "Inter", system-ui, sans-serif;
  --md-code-font-family: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
}

[data-md-color-primary="custom"] {
  --md-primary-fg-color: var(--siphon-ink);
  --md-primary-fg-color--light: #2a323c;
  --md-primary-fg-color--dark: #0a0d11;
  --md-primary-bg-color: #ffffff;
  --md-primary-bg-color--light: rgba(255, 255, 255, 0.7);
}

[data-md-color-accent="custom"] {
  --md-accent-fg-color: var(--siphon-accent);
  --md-accent-fg-color--transparent: rgba(232, 84, 30, 0.1);
}

/* Orange on white is too faint for running text, so a link is ink with an orange underline and turns
   orange only under the pointer. */
[data-md-color-scheme="default"] {
  --md-typeset-a-color: var(--siphon-ink);
}
[data-md-color-scheme="slate"] {
  --md-default-bg-color: var(--siphon-ink);
  --md-typeset-a-color: #ffffff;
}
.md-typeset a {
  text-decoration: underline;
  text-decoration-color: var(--siphon-accent);
  text-underline-offset: 0.2em;
}
.md-typeset a:hover {
  color: var(--siphon-accent);
}
.md-typeset a.headerlink {
  text-decoration: none;
}

.md-header__title,
.md-typeset h1,
.md-typeset h2,
.md-typeset h3 {
  font-family: "Space Grotesk", system-ui, sans-serif;
}
.md-typeset h1 {
  font-weight: 700;
  color: inherit;
}
.md-typeset h2,
.md-typeset h3 {
  font-weight: 700;
}

[data-md-color-scheme="slate"] .md-header,
[data-md-color-scheme="slate"] .md-tabs {
  border-bottom: 1px solid #262d36;
}

.md-typeset .admonition,
.md-typeset details,
.md-typeset pre > code,
.md-typeset table:not([class]) {
  border-radius: 10px;
}

.md-typeset code,
.md-typeset kbd {
  font-variant-numeric: tabular-nums;
}

/* The header lockup on the home page follows the reader's theme. */
[data-md-color-scheme="slate"] .siphon-lockup--light,
[data-md-color-scheme="default"] .siphon-lockup--dark {
  display: none;
}

/* Buttons: the one primary action is orange, as in the console; the others are outlined in ink. */
.md-typeset .md-button {
  text-decoration: none;
  border-radius: 10px;
}
.md-typeset .md-button--primary,
.md-typeset .md-button--primary:hover {
  background-color: var(--siphon-accent);
  border-color: var(--siphon-accent);
  color: #ffffff;
}

/* A heading for screen readers and search where the page shows the lockup instead. */
.siphon-visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
[data-md-color-scheme="slate"] .md-typeset .md-button--primary {
  color: var(--siphon-ink);
}
