/* The one stylesheet for every page. System fonts only: nothing is loaded from other sites. */

:root {
  color-scheme: light dark;
  --text: #1f2328;
  --muted: #59636e;
  --background: #ffffff;
  --surface: #f6f8fa;
  --border: #d1d9e0;
  --link: #0757ba;
  --link-visited: #6639ba;
}

@media (prefers-color-scheme: dark) {
  :root {
    --text: #e6edf3;
    --muted: #9198a1;
    --background: #0d1117;
    --surface: #151b23;
    --border: #3d444d;
    --link: #4493f8;
    --link-visited: #ab7df8;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  overflow-wrap: break-word;
}

/* Header, text and footer share one readable column. */
.site-header,
main,
.site-footer {
  max-width: 44rem;
  margin: 0 auto;
  padding-inline: 1rem;
}

.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25rem 0.6rem;
  padding-block: 1.25rem;
  border-bottom: 1px solid var(--border);
}

.brand {
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
}

.brand:visited {
  color: var(--text);
}

main {
  padding-block: 1.75rem 3rem;
}

h1 {
  font-size: 1.875rem;
  line-height: 1.25;
  margin: 0 0 1.5rem;
}

/* The "Last updated" date under the title, drawn close to it. */
h1 + .page-updated {
  margin: -1rem 0 1.5rem;
  color: var(--muted);
  font-size: 0.9375rem;
}

h2 {
  font-size: 1.375rem;
  line-height: 1.3;
  margin: 2.25rem 0 0.75rem;
}

h3 {
  font-size: 1.125rem;
  line-height: 1.35;
  margin: 1.75rem 0 0.5rem;
}

p,
ul,
ol,
dl,
table,
blockquote,
pre,
figure {
  margin: 0 0 1rem;
}

li + li {
  margin-top: 0.25rem;
}

a {
  color: var(--link);
  text-underline-offset: 0.15em;
}

a:visited {
  color: var(--link-visited);
}

:focus-visible {
  outline: 2px solid var(--link);
  outline-offset: 2px;
}

img {
  max-width: 100%;
  height: auto;
}

figure {
  margin-block: 1.5rem;
}

figcaption {
  margin-top: 0.4rem;
  color: var(--muted);
  font-size: 0.9375rem;
}

/* Wide tables scroll sideways on a phone instead of widening the page. */
table {
  display: block;
  max-width: 100%;
  overflow-x: auto;
  border-collapse: collapse;
}

th,
td {
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

th {
  background: var(--surface);
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9em;
  padding: 0.1em 0.3em;
  border-radius: 4px;
  background: var(--surface);
}

pre {
  padding: 1rem;
  overflow-x: auto;
  border-radius: 6px;
  background: var(--surface);
}

pre code {
  padding: 0;
  background: none;
}

blockquote {
  margin-inline: 0;
  padding-left: 1rem;
  border-left: 4px solid var(--border);
  color: var(--muted);
}

hr {
  margin: 2rem 0;
  border: 0;
  border-top: 1px solid var(--border);
}

.footnotes {
  color: var(--muted);
  font-size: 0.9375rem;
}

/* Logos above the title, from the page's `logos` header field, all the same
   height. Logos are drawn for a light background, so in dark mode they sit on
   a white panel. 2.5rem tall keeps three wide logos on one line in the text
   column, even inside that panel; on phones they wrap. */
.logos {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2rem;
  margin-bottom: 1.5rem;
}

.logos img {
  height: 2.5rem;
  object-fit: contain;
  object-position: left;
}

@media (prefers-color-scheme: dark) {
  .logos {
    padding: 0.75rem 1rem;
    border-radius: 6px;
    background: #fff;
  }
}

/* Links to the page's other languages, separated by dots. */
.languages {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  font-size: 0.9375rem;
}

/* inline-block, so the link's underline doesn't run under the dot. */
.languages > * + *::before {
  content: "·";
  display: inline-block;
  margin-right: 0.5rem;
  color: var(--muted);
}

.languages [aria-current] {
  font-weight: 600;
}

.site-footer {
  padding-block: 1.25rem 2.5rem;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.9375rem;
}

.site-footer p {
  margin: 0;
}

/* Printing: black on white, no header or language links, and links to other
   sites followed by their address. The "Last updated" date stays, so a printout
   shows which version it is; only the footer copy prints, so it appears once. */
@media print {
  :root {
    color-scheme: light;
    --text: #000;
    --muted: #333;
    --background: #fff;
    --surface: #fff;
    --border: #999;
    --link: #000;
    --link-visited: #000;
  }

  body {
    font-size: 11pt;
  }

  .site-header,
  .languages,
  .page-updated {
    display: none;
  }

  main,
  .site-footer {
    max-width: none;
    padding-inline: 0;
  }

  main a[href^="http"]::after {
    content: " (" attr(href) ")";
    font-size: 0.875em;
    overflow-wrap: anywhere;
  }

  table {
    display: table;
  }

  h2,
  h3 {
    break-after: avoid;
  }

  table,
  figure,
  img,
  pre {
    break-inside: avoid;
  }
}
