@font-face {
  font-family: "Public Sans";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/fonts/public-sans.woff2") format("woff2");
}

:root {
  --background: #fff;
  --ink: #262420;
  --paper: #fbf9f4;
  --paper-2: #f2eee3;
  --line: #d8d0bc;
  --mute-1: #6b6558;
  --mute-2: #9c9484;
  --accent: #a99857;
  --accent-dark: #8c7c41;

  --font-sans: "Public Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "Fira Code", Consolas, monospace;
}

* {
  box-sizing: border-box;
}

html {
  /* 1rem = 16px, the guide's scale is built on this */
  font-size: 100%;
}

body {
  margin: 0;
  background: var(--background);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.5;
}

a {
  color: var(--accent-dark);
}

a:hover {
  color: var(--ink);
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-sans);
  font-weight: 700;
  scroll-margin-top: 1.5rem;
}

h1 {
  font-size: 2.25rem;
  line-height: 1.25;
  margin: 4rem 0 1rem;
}

h2 {
  font-size: 1.75rem;
  line-height: 1.25;
  margin: 3rem 0 1rem;
}

h3 {
  font-size: 1.375rem;
  line-height: 1.25;
  margin: 2rem 0 1rem;
}

h4 {
  font-size: 1.125rem;
  line-height: 1.33;
  margin: 1.5rem 0 1rem;
}

h5,
h6 {
  font-size: 1rem;
  line-height: 1.5;
  margin: 1.5rem 0 1rem;
}

h1:first-child,
h2:first-child,
h3:first-child,
h4:first-child,
h5:first-child,
h6:first-child {
  margin-top: 0;
}

@media (min-width: 48rem) {
  h1 {
    font-size: 3rem;
  }

  h2 {
    font-size: 2rem;
  }

  h3 {
    font-size: 1.5rem;
    line-height: 1.33;
  }

  h4 {
    font-size: 1.25rem;
    line-height: 1.4;
  }
}

p,
ul,
ol,
dl {
  margin: 1rem 0;
}

ul,
ol {
  padding-left: 1.5rem;
}

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

dt {
  font-weight: 700;
}

dd {
  margin: 0 0 0.5rem;
}

small {
  display: inline-block;
  font-size: 0.875rem;
  line-height: 1.35;
}

strong,
b {
  font-weight: 700;
}

em,
i {
  font-style: italic;
}

code {
  font-family: var(--font-mono);
  background: var(--paper-2);
  padding: 0.15em 0.35em;
  border-radius: 3px;
  font-size: 0.9em;
}

pre {
  background: var(--paper-2);
  padding: 1em;
  border-radius: 6px;
  overflow-x: auto;
}

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

blockquote {
  margin: 1rem 0;
  padding: 0.25em 1em;
  border-left: 3px solid var(--accent);
  color: var(--mute-1);
}

blockquote cite {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.875rem;
  font-style: normal;
  color: var(--mute-2);
}

table {
  border-collapse: collapse;
  width: 100%;
  margin: 1.5em 0;
}

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

th {
  background: var(--paper-2);
}

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

.site-header,
.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 2cm;
}

.site-footer {
  border-bottom: none;
  border-top: 1px solid var(--line);
  font-size: 0.85rem;
  color: var(--mute-1);
}

.site-header .brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

.site-header .brand-logo {
  height: 2rem;
  max-width: 12rem;
  width: auto;
  object-fit: contain;
}

.site-header nav a {
  margin-left: 1.25rem;
  text-decoration: none;
  font-size: 0.9rem;
}

.site-header nav a:hover {
  text-decoration: underline;
}

main {
  max-width: 210mm;
  margin: 0 auto;
  padding: 2.5cm 2cm 4cm;
}

.meta {
  color: var(--mute-1);
  font-size: 0.9rem;
  border-bottom: 1px solid var(--line);
  padding-bottom: 1rem;
  margin-bottom: 2rem;
}


@media (max-width: 40rem) {
  .site-header,
  .site-footer {
    padding: 1rem 1.25rem;
  }

  main {
    padding: 2rem 1.25rem 3rem;
  }
}

@media print {
  @page {
    size: A4;
    margin: 2cm;
  }

  main {
    max-width: none;
    padding: 0;
  }

  .site-header nav {
    display: none;
  }

  a {
    color: var(--ink);
  }

  main a[href^="http"]::after {
    content: " (" attr(href) ")";
    font-size: 0.8em;
    color: var(--mute-1);
  }

  h1,
  h2,
  h3,
  h4,
  h5,
  h6 {
    page-break-after: avoid;
  }

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