/* FOSS MEC Library — brand overrides for mdBook.
   Palette, logo and typography follow the FOSS MEC website theme:
   navy #0C2444, paper #F2F7FC, accent #FFD022, logo gradient #FDCE21 → #F69D1D.
   Only mdBook CSS variables and small component styles are overridden. */

@font-face {
  font-family: "Uncut Sans";
  src: url("../assets/fonts/UncutSans-Variable.ttf") format("truetype-variations");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Martian Mono";
  src: url("../assets/fonts/MartianMono-Variable.ttf") format("truetype-variations");
  font-weight: 100 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "DM Mono";
  src: url("../assets/fonts/DMMono-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --content-max-width: 900px;
  --page-padding: 22px;
  --foss-navy: #0c2444;
  --foss-navy-deep: #081a31;
  --foss-paper: #f2f7fc;
  --foss-yellow: #ffd022;
  --foss-amber: #f69d1d;
  --foss-radius: 12px;
  --foss-border: #dbe4ef;
  --foss-muted: #55708f;
  --foss-body: "Uncut Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --foss-display: "Martian Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;
  --foss-mono: "DM Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;
}

/* ---------- Light themes ---------- */

.light,
html:not(.js) {
  --bg: #ffffff;
  --fg: #14294a;

  --sidebar-bg: var(--foss-navy);
  --sidebar-fg: #d9e6f5;
  --sidebar-non-existant: #8fa6c0;
  --sidebar-active: var(--foss-yellow);
  --sidebar-spacer: rgba(255, 255, 255, 0.09);

  --scrollbar: #8fa6c0;
  --icons: #4a6280;
  --icons-hover: var(--foss-navy);
  --links: #0c4f8a;
  --inline-code-color: #8a3b0c;

  --theme-popup-bg: #ffffff;
  --theme-popup-border: var(--foss-border);
  --theme-hover: #eef3f8;

  --quote-bg: #f4f8fc;
  --quote-border: #d8e4f0;
  --warning-border: #b45309;

  --table-border-color: var(--foss-border);
  --table-header-bg: #edf3f9;
  --table-alternate-bg: #f8fafc;

  --searchbar-border-color: #b9cadd;
  --searchbar-bg: #ffffff;
  --searchbar-fg: #14294a;
  --searchbar-shadow-color: #b9cadd;
  --searchresults-header-fg: #55708f;
  --searchresults-border-color: var(--foss-border);
  --searchresults-li-bg: #f5f9fd;
  --search-mark-bg: #ffe38a;

  --color-scheme: light;
  --overlay-bg: rgba(12, 36, 68, 0.4);
  --footnote-highlight: #b45309;
  --sidebar-header-border-color: var(--foss-yellow);
}

/* Rust — warm paper, rust accents */
.rust {
  --bg: #fbf3e4;
  --fg: #3b2f2f;
  --sidebar-bg: #4a3428;
  --sidebar-fg: #f5e6d3;
  --sidebar-non-existant: #b99d84;
  --sidebar-active: #ffb86b;
  --sidebar-spacer: rgba(255, 255, 255, 0.1);
  --scrollbar: #b99d84;
  --icons: #7a5b47;
  --icons-hover: #4a3428;
  --links: #9a3e1f;
  --inline-code-color: #8a3b0c;
  --theme-popup-bg: #fff8ec;
  --theme-popup-border: #e4d2b8;
  --theme-hover: #f3e6d2;
  --quote-bg: #f8edda;
  --quote-border: #e4d2b8;
  --warning-border: #b45309;
  --table-border-color: #e4d2b8;
  --table-header-bg: #f3e6d2;
  --table-alternate-bg: #fdf7ee;
  --searchbar-border-color: #d8c3a5;
  --searchbar-bg: #fffdf8;
  --searchbar-fg: #3b2f2f;
  --searchbar-shadow-color: #d8c3a5;
  --searchresults-header-fg: #7a5b47;
  --searchresults-border-color: #e4d2b8;
  --searchresults-li-bg: #f8edda;
  --search-mark-bg: #ffd28a;
  --color-scheme: light;
  --overlay-bg: rgba(74, 52, 40, 0.4);
  --footnote-highlight: #9a3e1f;
  --sidebar-header-border-color: #ffb86b;
}

/* Material — light surfaces, indigo and amber */
.material {
  --bg: #fafafa;
  --fg: #212121;
  --sidebar-bg: #263238;
  --sidebar-fg: #eceff1;
  --sidebar-non-existant: #90a4ae;
  --sidebar-active: #ffca28;
  --sidebar-spacer: rgba(255, 255, 255, 0.1);
  --scrollbar: #90a4ae;
  --icons: #546e7a;
  --icons-hover: #263238;
  --links: #3f51b5;
  --inline-code-color: #c2185b;
  --theme-popup-bg: #ffffff;
  --theme-popup-border: #e0e0e0;
  --theme-hover: #f5f5f5;
  --quote-bg: #f5f5f5;
  --quote-border: #e0e0e0;
  --warning-border: #ef6c00;
  --table-border-color: #e0e0e0;
  --table-header-bg: #eeeeee;
  --table-alternate-bg: #fafafa;
  --searchbar-border-color: #b0bec5;
  --searchbar-bg: #ffffff;
  --searchbar-fg: #212121;
  --searchbar-shadow-color: #b0bec5;
  --searchresults-header-fg: #546e7a;
  --searchresults-border-color: #e0e0e0;
  --searchresults-li-bg: #f5f5f5;
  --search-mark-bg: #ffe082;
  --color-scheme: light;
  --overlay-bg: rgba(38, 50, 56, 0.4);
  --footnote-highlight: #3f51b5;
  --sidebar-header-border-color: #ffca28;
}

/* ---------- Dark themes ---------- */

.navy,
.coal,
.ayu,
.nord,
.everforest,
.pine {
  --quote-bg: rgba(255, 255, 255, 0.055);
  --quote-border: rgba(255, 255, 255, 0.14);
  --table-border-color: rgba(255, 255, 255, 0.16);
  --table-header-bg: rgba(255, 255, 255, 0.08);
  --table-alternate-bg: rgba(255, 255, 255, 0.035);
  --searchbar-border-color: rgba(255, 255, 255, 0.24);
  --searchbar-fg: var(--fg);
  --searchbar-shadow-color: rgba(0, 0, 0, 0.35);
  --searchresults-header-fg: #a9c0d8;
  --searchresults-border-color: rgba(255, 255, 255, 0.16);
  --searchresults-li-bg: rgba(255, 255, 255, 0.045);
  --color-scheme: dark;
  --overlay-bg: rgba(0, 0, 0, 0.55);
  --sidebar-spacer: rgba(255, 255, 255, 0.08);
  --icons-hover: var(--sidebar-active);
  --footnote-highlight: var(--sidebar-active);
  --sidebar-header-border-color: var(--sidebar-active);
}

/* Navy — the FOSS MEC brand dark theme */
.navy {
  --bg: var(--foss-navy);
  --fg: var(--foss-paper);
  --sidebar-bg: var(--foss-navy-deep);
  --sidebar-fg: #cfe0f2;
  --sidebar-non-existant: #7e97b3;
  --sidebar-active: var(--foss-yellow);
  --scrollbar: #5f7d9e;
  --icons: #a9c0d8;
  --links: var(--foss-yellow);
  --inline-code-color: #ffd98a;
  --theme-popup-bg: #102c52;
  --theme-popup-border: rgba(255, 255, 255, 0.18);
  --theme-hover: #173a66;
  --warning-border: var(--foss-yellow);
  --searchbar-bg: #102c52;
  --search-mark-bg: #9a6f00;
}

/* Coal — neutral charcoal */
.coal {
  --bg: #1b1b1b;
  --fg: #e0e0e0;
  --sidebar-bg: #121212;
  --sidebar-fg: #c8c8c8;
  --sidebar-non-existant: #7a7a7a;
  --sidebar-active: var(--foss-yellow);
  --scrollbar: #666666;
  --icons: #a0a0a0;
  --links: var(--foss-yellow);
  --inline-code-color: #ffd98a;
  --theme-popup-bg: #242424;
  --theme-popup-border: rgba(255, 255, 255, 0.16);
  --theme-hover: #2e2e2e;
  --warning-border: var(--foss-yellow);
  --searchbar-bg: #2a2a2a;
  --search-mark-bg: #7a5a00;
}

/* Ayu — warm dark with amber */
.ayu {
  --bg: #0f1419;
  --fg: #e6e1cf;
  --sidebar-bg: #0b0f14;
  --sidebar-fg: #c9c7be;
  --sidebar-non-existant: #6e7681;
  --sidebar-active: #ffb454;
  --scrollbar: #565b66;
  --icons: #a0a0a0;
  --links: #ffb454;
  --inline-code-color: #ffcc66;
  --theme-popup-bg: #1a1f26;
  --theme-popup-border: rgba(255, 255, 255, 0.16);
  --theme-hover: #252b33;
  --warning-border: #ffb454;
  --searchbar-bg: #1a1f26;
  --search-mark-bg: #7a5a00;
}

/* Nord — arctic blue */
.nord {
  --bg: #2e3440;
  --fg: #eceff4;
  --sidebar-bg: #242933;
  --sidebar-fg: #d8dee9;
  --sidebar-non-existant: #7b88a1;
  --sidebar-active: #88c0d0;
  --scrollbar: #4c566a;
  --icons: #a3be8c;
  --links: #88c0d0;
  --inline-code-color: #a3be8c;
  --theme-popup-bg: #3b4252;
  --theme-popup-border: rgba(255, 255, 255, 0.18);
  --theme-hover: #434c5e;
  --warning-border: #ebcb8b;
  --searchbar-bg: #3b4252;
  --search-mark-bg: #5e81ac;
}

/* Everforest — warm forest green */
.everforest {
  --bg: #2d353b;
  --fg: #d3c6aa;
  --sidebar-bg: #232a2e;
  --sidebar-fg: #d3c6aa;
  --sidebar-non-existant: #859289;
  --sidebar-active: #a7c080;
  --scrollbar: #4f585e;
  --icons: #a7c080;
  --links: #a7c080;
  --inline-code-color: #dbbc7f;
  --theme-popup-bg: #343f44;
  --theme-popup-border: rgba(255, 255, 255, 0.16);
  --theme-hover: #3d484d;
  --warning-border: #dbbc7f;
  --searchbar-bg: #343f44;
  --search-mark-bg: #8a7a3a;
}

/* Pine — deep evergreen and mint */
.pine {
  --bg: #1b2a26;
  --fg: #e6f0e8;
  --sidebar-bg: #14201d;
  --sidebar-fg: #c9ddd2;
  --sidebar-non-existant: #6f8f80;
  --sidebar-active: #7fd1ae;
  --scrollbar: #3f5a50;
  --icons: #9fc7b6;
  --links: #7fd1ae;
  --inline-code-color: #f0c674;
  --theme-popup-bg: #22332e;
  --theme-popup-border: rgba(255, 255, 255, 0.16);
  --theme-hover: #2c443c;
  --warning-border: #f0c674;
  --searchbar-bg: #22332e;
  --search-mark-bg: #6b5a2a;
}

/* ---------- Base typography ---------- */

body,
.content {
  font-family: var(--foss-body);
  font-size: 1.7rem;
  line-height: 1.7;
}

h1,
h2,
h3,
.menu-title,
.sidebar .chapter li a,
.sidebar .part-title {
  font-family: var(--foss-display);
  font-weight: 650;
  letter-spacing: -0.03em;
}

h1 {
  line-height: 1.25;
}

h2 {
  margin-top: 2.2em;
  padding-bottom: 0.35em;
  border-bottom: 2px solid var(--sidebar-active);
  line-height: 1.35;
}

h3 {
  line-height: 1.4;
}

code,
kbd,
pre {
  font-family: var(--foss-mono);
}

code {
  padding: 0.12em 0.32em;
  border-radius: 4px;
  background: var(--quote-bg);
  border: 1px solid var(--table-border-color);
}

pre code {
  border: 0;
  background: transparent;
  padding: 0;
}

:focus-visible {
  outline: 3px solid var(--foss-yellow);
  outline-offset: 2px;
}

.content a {
  text-decoration-color: var(--foss-amber);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.content a:hover {
  text-decoration-thickness: 3px;
}

/* ---------- Brand bar (theme/header.hbs) ---------- */

/* mdBook pulls .page up by the menu-bar height to compensate for its hover
   placeholder. The brand bar is real content above the menu, so remove that
   offset and the now-redundant placeholder. The menu bar remains sticky. */
.page {
  margin-block-start: 0;
}

#mdbook-menu-bar-hover-placeholder {
  display: none;
}

.foss-brandbar {
  position: relative;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 44px;
  margin: 0 calc(0px - var(--page-padding));
  padding: 5px var(--page-padding);
  background: var(--foss-navy-deep);
  color: var(--foss-paper);
  font-family: var(--foss-display);
  font-size: 1.15rem;
  letter-spacing: 0.02em;
}

.foss-brandbar a {
  color: var(--foss-paper);
  text-decoration: none;
}

.foss-brandbar a:hover {
  color: var(--foss-yellow);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.foss-brandbar__brand {
  position: relative;
  z-index: 31;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 700;
  white-space: nowrap;
}

.foss-brandbar__links {
  position: relative;
  z-index: 31;
}

.foss-brandbar__logo {
  position: relative;
  z-index: 32;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 4px;
  border-radius: 7px;
  background: #ffffff;
}

.foss-brandbar__logo img {
  display: block;
  width: 100%;
  height: 100%;
}

.foss-brandbar__divider {
  color: var(--foss-yellow);
  margin: 0 2px;
}

.foss-brandbar__links {
  display: flex;
  align-items: center;
  gap: 18px;
}

.foss-brandbar__cta {
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--foss-yellow);
  color: var(--foss-navy) !important;
  font-weight: 700;
}

.foss-brandbar__cta:hover {
  background: #ffe266;
  color: var(--foss-navy) !important;
  text-decoration: none;
}

@media only screen and (max-width: 760px) {
  .foss-brandbar__links a:not(.foss-brandbar__cta) {
    display: none;
  }

  .foss-brandbar {
    font-size: 1.05rem;
  }
}

/* Brand header inside the sidebar, shown on mobile where the page is slid
   aside. It keeps the logo visible while the page brand strip is hidden. */
.foss-sidebar-brand {
  display: none;
}

@media only screen and (max-width: 619px) {
  .foss-sidebar-brand {
    position: absolute;
    inset: 0 0 auto 0;
    z-index: 3;
    display: flex;
    align-items: center;
    gap: 9px;
    height: 56px;
    padding: 0 14px;
    background: var(--sidebar-bg);
    color: var(--sidebar-fg);
    border-bottom: 1px solid var(--sidebar-spacer);
    font-family: var(--foss-display);
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-decoration: none;
  }

  .foss-sidebar-brand:hover {
    color: var(--sidebar-active);
    text-decoration: none;
  }

  .foss-sidebar-brand__logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 4px;
    flex: 0 0 auto;
    border-radius: 7px;
    background: #ffffff;
  }

  .foss-sidebar-brand__logo img {
    display: block;
    width: 100%;
    height: 100%;
  }

  #mdbook-sidebar .sidebar-scrollbox {
    top: 56px;
  }

  /* When the sidebar is open, hide the page brand strip so the visible sliver
     shows the menu bar rather than clipped branding. */
  html.sidebar-visible .foss-brandbar,
  #mdbook-sidebar-toggle-anchor:checked ~ #mdbook-page-wrapper .foss-brandbar {
    display: none;
  }
}

.theme-popup {
  max-height: calc(100vh - var(--menu-bar-height) - 12px);
  overflow-y: auto;
}

/* ---------- Home page components ---------- */

.hero {
  position: relative;
  margin: 1.5rem 0 2.5rem;
  padding: clamp(1.6rem, 5vw, 3.2rem);
  border-radius: var(--foss-radius);
  background: var(--foss-navy);
  color: var(--foss-paper);
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto -120px -170px auto;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 208, 34, 0.22), transparent 68%);
  pointer-events: none;
}

.hero a {
  color: var(--foss-yellow);
}

.hero__logo-card {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 84px;
  height: 84px;
  margin-bottom: 1.2rem;
  padding: 12px;
  border-radius: 16px;
  background: #ffffff;
}

.hero__logo-card img {
  width: 100%;
  height: 100%;
}

.hero__eyebrow {
  margin: 0 0 0.5rem;
  font-family: var(--foss-display);
  font-size: 1.1rem;
  font-weight: 650;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--foss-yellow);
}

.hero h1 {
  margin: 0 0 0.8rem;
  font-size: clamp(2.7rem, 6vw, 4.4rem);
  color: #ffffff;
}

.hero__lede {
  max-width: 58ch;
  margin: 0 0 1.6rem;
  font-size: clamp(1.6rem, 2.6vw, 1.9rem);
  color: #dbe8f6;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  position: relative;
  z-index: 1;
}

.button {
  display: inline-block;
  padding: 9px 16px;
  border: 2px solid transparent;
  border-radius: 999px;
  font-family: var(--foss-display);
  font-size: 1.25rem;
  font-weight: 650;
  text-decoration: none !important;
  transition: transform 0.12s ease, background-color 0.12s ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button--primary {
  background: var(--foss-yellow);
  color: var(--foss-navy) !important;
}

.button--primary:hover {
  background: #ffe266;
}

.button--ghost {
  border-color: rgba(255, 255, 255, 0.45);
  color: var(--foss-paper) !important;
}

.button--ghost:hover {
  border-color: var(--foss-yellow);
  background: rgba(255, 255, 255, 0.07);
}

.eyebrow {
  margin: 2.4rem 0 0.4rem;
  font-family: var(--foss-display);
  font-size: 1.1rem;
  font-weight: 650;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--foss-muted);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 14px;
  margin: 1rem 0 2rem;
}

.card {
  display: flex;
  flex-direction: column;
  padding: 18px;
  border: 1px solid var(--foss-border);
  border-radius: var(--foss-radius);
  background: var(--bg);
  text-decoration: none !important;
  color: var(--fg) !important;
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.card:hover {
  border-color: var(--foss-amber);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(12, 36, 68, 0.09);
}

.card__kicker {
  font-family: var(--foss-display);
  font-size: 1.05rem;
  font-weight: 650;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--foss-muted);
}

.card__title {
  margin: 6px 0 6px;
  font-family: var(--foss-display);
  font-size: 1.65rem;
  font-weight: 650;
  line-height: 1.35;
  color: var(--fg);
}

.card__text {
  margin: 0;
  color: var(--fg);
  opacity: 0.86;
}

.card__arrow {
  margin-top: auto;
  padding-top: 12px;
  font-family: var(--foss-display);
  font-size: 1.15rem;
  font-weight: 650;
  color: var(--links);
}

:is(.navy, .coal, .ayu, .nord, .everforest, .pine) .card {
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.045);
}

:is(.navy, .coal, .ayu, .nord, .everforest, .pine) .card:hover {
  border-color: var(--foss-yellow);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
}

:is(.navy, .coal, .ayu, .nord, .everforest, .pine) .eyebrow {
  color: #a9c0d8;
}

/* ---------- Resource labels and tables ---------- */

.fmt {
  display: inline-block;
  padding: 1px 7px;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-family: var(--foss-display);
  font-size: 0.95rem;
  font-weight: 650;
  letter-spacing: 0.04em;
  line-height: 1.6;
  white-space: nowrap;
}

.fmt-notes { color: #0c6b46; }
.fmt-pdf { color: #b42318; }
.fmt-slides { color: #b45309; }
.fmt-docs { color: #0c4f8a; }
.fmt-book { color: #6d28d9; }
.fmt-video { color: #b91c5c; }
.fmt-repo { color: #334155; }
.fmt-course { color: #0f766e; }
.fmt-tool { color: #475569; }
.fmt-practice { color: #9a3412; }
.fmt-game { color: #7e22ce; }
.fmt-event { color: #a16207; }

:is(.navy, .coal, .ayu, .nord, .everforest, .pine) .fmt-notes { color: #6ee7b7; }
:is(.navy, .coal, .ayu, .nord, .everforest, .pine) .fmt-pdf { color: #fca5a5; }
:is(.navy, .coal, .ayu, .nord, .everforest, .pine) .fmt-slides { color: #fcd34d; }
:is(.navy, .coal, .ayu, .nord, .everforest, .pine) .fmt-docs { color: #93c5fd; }
:is(.navy, .coal, .ayu, .nord, .everforest, .pine) .fmt-book { color: #c4b5fd; }
:is(.navy, .coal, .ayu, .nord, .everforest, .pine) .fmt-video { color: #f9a8d4; }
:is(.navy, .coal, .ayu, .nord, .everforest, .pine) .fmt-repo { color: #cbd5e1; }
:is(.navy, .coal, .ayu, .nord, .everforest, .pine) .fmt-course { color: #5eead4; }
:is(.navy, .coal, .ayu, .nord, .everforest, .pine) .fmt-tool { color: #cbd5e1; }
:is(.navy, .coal, .ayu, .nord, .everforest, .pine) .fmt-practice { color: #fdba74; }
:is(.navy, .coal, .ayu, .nord, .everforest, .pine) .fmt-game { color: #d8b4fe; }
:is(.navy, .coal, .ayu, .nord, .everforest, .pine) .fmt-event { color: #fde047; }

table {
  font-size: 1.5rem;
}

table th {
  font-family: var(--foss-display);
  font-size: 1.15rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* ---------- Callouts and contribution bands ---------- */

.contribute-band {
  margin: 2.2rem 0;
  padding: 18px 20px;
  border: 1px solid var(--foss-border);
  border-left: 5px solid var(--foss-amber);
  border-radius: 8px;
  background: var(--quote-bg);
}

.contribute-band p {
  margin: 0.35rem 0;
}

:is(.navy, .coal, .ayu, .nord, .everforest, .pine) .contribute-band {
  border-color: rgba(255, 255, 255, 0.16);
  border-left-color: var(--foss-yellow);
}

.steps {
  counter-reset: step;
  list-style: none;
  padding-left: 0;
}

.steps > li {
  position: relative;
  margin: 0 0 1rem;
  padding-left: 42px;
  min-height: 28px;
}

.steps > li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--foss-yellow);
  color: var(--foss-navy);
  font-family: var(--foss-display);
  font-size: 1.1rem;
  font-weight: 700;
}

.small-note {
  font-size: 1.4rem;
  color: var(--foss-muted);
}

:is(.navy, .coal, .ayu, .nord, .everforest, .pine) .small-note {
  color: #a9c0d8;
}

/* ---------- Sidebar polish ---------- */

.sidebar {
  font-family: var(--foss-body);
}

.sidebar .chapter li a {
  font-size: 1.38rem;
  line-height: 1.5;
  padding: 5px 0;
}

.sidebar .chapter li.chapter-item {
  margin-top: 0.3em;
}

.sidebar .chapter li a.active {
  font-weight: 650;
}

.sidebar .part-title {
  margin-top: 1.8em;
  padding-bottom: 0.4em;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  font-size: 1.05rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--foss-yellow);
  opacity: 1;
}

/* ---------- Menu bar ---------- */

#mdbook-menu-bar {
  border-bottom: 1px solid var(--table-border-color);
}

.menu-title {
  font-size: 1.55rem;
  font-weight: 650;
  letter-spacing: -0.02em;
}

:is(.navy, .coal, .ayu, .nord, .everforest, .pine) .menu-title {
  color: var(--foss-paper);
}

/* ---------- 404 ---------- */

.not-found {
  padding: 3rem 0;
  text-align: center;
}

.not-found h1 {
  font-size: clamp(4rem, 12vw, 8rem);
  margin: 0;
  color: var(--links);
}

/* ---------- Print ---------- */

@media print {
  .foss-brandbar,
  .hero__actions,
  .button,
  #mdbook-menu-bar,
  #mdbook-sidebar {
    display: none !important;
  }

  .hero {
    background: #ffffff !important;
    color: #000000 !important;
    border: 1px solid #cccccc;
  }

  .hero h1,
  .hero__lede,
  .hero__eyebrow {
    color: #000000 !important;
  }
}
