/* CarbonPlan palette: https://carbonplan.org/design/color
   carbon #1b1e23, chalk #ebebec, teal #64b9c4 */

/* Relative typeface, served from fonts.carbonplan.org.
   Requires the CDN referer rule to allow carbonplan.github.io. */
@font-face {
  font-family: "Relative";
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  src: url("https://fonts.carbonplan.org/relative/relative-book-pro.woff2") format("woff2"),
       url("https://fonts.carbonplan.org/relative/relative-book-pro.woff") format("woff"),
       url("https://fonts.carbonplan.org/relative/relative-book-pro.ttf") format("truetype");
}

@font-face {
  font-family: "Relative";
  font-weight: 500;
  font-style: normal;
  font-display: swap;
  src: url("https://fonts.carbonplan.org/relative/relative-medium-pro.woff2") format("woff2"),
       url("https://fonts.carbonplan.org/relative/relative-medium-pro.woff") format("woff"),
       url("https://fonts.carbonplan.org/relative/relative-medium-pro.ttf") format("truetype");
}

@font-face {
  font-family: "Relative";
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  src: url("https://fonts.carbonplan.org/relative/relative-bold-pro.woff2") format("woff2"),
       url("https://fonts.carbonplan.org/relative/relative-bold-pro.woff") format("woff"),
       url("https://fonts.carbonplan.org/relative/relative-bold-pro.ttf") format("truetype");
}

@font-face {
  font-family: "Relative Mono";
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  src: url("https://fonts.carbonplan.org/relative/relative-mono-11-pitch-pro.woff2") format("woff2"),
       url("https://fonts.carbonplan.org/relative/relative-mono-11-pitch-pro.woff") format("woff"),
       url("https://fonts.carbonplan.org/relative/relative-mono-11-pitch-pro.ttf") format("truetype");
}

:root {
  --md-text-font: "Relative";
  --md-code-font: "Relative Mono";
  --cp-carbon: #1b1e23;
  --cp-chalk: #ebebec;
  --cp-teal: #64b9c4;
  --cp-teal-dark: #3e8893;
}

/* Headings in Relative Medium; Material's default 300 weight has no Relative cut */
.md-typeset h1,
.md-typeset h2 {
  font-weight: 500;
}

/* Larger logo; Material default is 1.2rem */
.md-header__button.md-logo img {
  height: 2rem;
  width: auto;
}

/* Hide site name in header; logo and sidebar already carry it.
   visibility (not display) so the flex spacer keeps search/repo right-aligned. */
.md-header__title {
  visibility: hidden;
}

/* Header stays carbon in both modes so the logo blends in */
.md-header,
.md-tabs {
  background-color: var(--cp-carbon);
  color: var(--cp-chalk);
}

/* Light mode: carbon on white, darker teal for contrast */
[data-md-color-scheme="default"] {
  --md-primary-fg-color: #1b1e23;
  --md-primary-fg-color--light: #2d3239;
  --md-primary-fg-color--dark: #0f1114;
  --md-accent-fg-color: #3e8893;
  --md-typeset-a-color: #3e8893;
  --md-default-fg-color: #1b1e23;
  --md-default-fg-color--light: rgba(27, 30, 35, 0.74);
  --md-default-fg-color--lighter: rgba(27, 30, 35, 0.4);
}

/* Dark mode: chalk on carbon, teal accent */
[data-md-color-scheme="slate"] {
  --md-primary-fg-color: #1b1e23;
  --md-primary-fg-color--light: #2d3239;
  --md-primary-fg-color--dark: #0f1114;
  --md-accent-fg-color: #64b9c4;
  --md-typeset-a-color: #64b9c4;
  --md-default-bg-color: #1b1e23;
  --md-default-fg-color: #ebebec;
  --md-default-fg-color--light: rgba(235, 235, 236, 0.74);
  --md-default-fg-color--lighter: rgba(235, 235, 236, 0.4);
  --md-default-fg-color--lightest: rgba(235, 235, 236, 0.14);
  --md-code-bg-color: #24282f;
  --md-footer-bg-color: #14171b;
  --md-footer-bg-color--dark: #0f1114;
}
