/* Shared type for the course. All fonts are served with the lesson files. */
@font-face {
  font-family: "Source Sans 3";
  src: url("fonts/SourceSans3-Regular.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Source Sans 3";
  src: url("fonts/SourceSans3-Medium.woff2") format("woff2");
  font-style: normal;
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "Source Sans 3";
  src: url("fonts/SourceSans3-Semibold.woff2") format("woff2");
  font-style: normal;
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: "Source Sans 3";
  src: url("fonts/SourceSans3-It.woff2") format("woff2");
  font-style: italic;
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Source Serif 4";
  src: url("fonts/SourceSerif4-Regular.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Source Serif 4";
  src: url("fonts/SourceSerif4-It.woff2") format("woff2");
  font-style: italic;
  font-weight: 400;
  font-display: swap;
}

:root {
  --font-ui: "Source Sans 3", sans-serif;
  --font-math: "Source Serif 4", serif;
  --font-code: ui-monospace, "Cascadia Code", "SFMono-Regular", Consolas, monospace;
  --type-body: 19px;
  --type-lead: 19px;
  --type-h1: 22px;
  --type-h2: 21px;
  --type-h3: 20px;
  --type-note: 17px;
  --type-label: 17px;
  --type-value: 21px;
}

body {
  font-family: var(--font-ui);
  font-size: var(--type-body);
  font-weight: 400;
  line-height: 1.65;
  font-synthesis: none;
}
button, input, select, textarea {
  font-family: var(--font-ui);
}
b, strong { font-weight: 600; }
/* Sizes stay close (22/21/20px), so headings differ by weight and spacing:
   the page title and section headings are semibold, subsection headings
   medium and close to the text they introduce. */
h1, h2, h3 {
  font-family: var(--font-ui);
  font-weight: 600;
  letter-spacing: -.015em;
}
h1, .hero h1, .method-hero h1 {
  font-size: var(--type-h1);
  font-weight: 600;
  line-height: 1.16;
  letter-spacing: -.02em;
}
h2 { font-size: var(--type-h2); line-height: 1.24; }
h3 { font-size: var(--type-h3); line-height: 1.3; font-weight: 500; }

/* Readouts remain ordinary type, with aligned digits for changing values. */
output,
.readouts strong,
.parameters dd,
.operating strong,
.score strong,
.check-metrics dd,
.settings-grid dd,
.moments dd,
.entry-overview dd,
.metrics dd,
.frame-readout dd,
.current-cpu-baseline > strong,
.current-benchmark-notes p strong,
table {
  font-family: var(--font-ui);
  font-variant-numeric: lining-nums tabular-nums;
  letter-spacing: normal;
}

/* Only source code uses a monospace face. Formulas keep --font-math. */
code, pre, .code, .opt-code, .method-section code {
  font-family: var(--font-code);
}

@media (max-width: 700px) {
  :root {
    --type-lead: 19px;
    --type-h1: 22px;
    --type-h2: 21px;
    --type-h3: 20px;
    --type-value: 21px;
  }
  h1, .hero h1, .method-hero h1 {
    font-size: var(--type-h1);
    line-height: 1.18;
    letter-spacing: -.015em;
  }
}
