/* Swarmdesk: ledger paper, ballpoint ink, one canary slip. */
@font-face {
  font-family: "Bricolage";
  src: url("/fonts/bricolage.woff2") format("woff2-variations");
  font-weight: 200 800;
  font-stretch: 75% 100%;
  font-display: swap;
}
@font-face {
  font-family: "Public Sans";
  src: url("/fonts/public-sans.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Plex Mono";
  src: url("/fonts/plex-mono.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

:root {
  --paper: #e9f0e4;
  --sheet: #fbfcf8;
  --ink: #1b2c74;
  --ink-soft: #4c5a94;
  --rule: #b9c9b4;
  --canary: #fbe36a;
  --canary-deep: #e6c93a;
  --stamp-green: #1c6a45;
  --stamp-red: #b8322c;

  --display: "Bricolage", "Arial Narrow", sans-serif;
  --text: "Public Sans", system-ui, sans-serif;
  --mono: "Plex Mono", ui-monospace, monospace;

  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.3125rem;
  --step-2: 1.75rem;
  --step-3: 2.5rem;
  --step-4: clamp(2.75rem, 7.2vw, 5rem);

  --measure: 62ch;
  --gutter: clamp(1rem, 4vw, 2.5rem);
}

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

html {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--text);
  font-size: 100%;
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-size: var(--step-0);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

h1,
h2,
h3 {
  font-family: var(--display);
  font-stretch: 80%;
  font-weight: 750;
  line-height: 1.05;
  margin: 0;
  text-wrap: balance;
}
h1 {
  font-size: var(--step-3);
}
h2 {
  font-size: var(--step-2);
}
h3 {
  font-size: var(--step-1);
  font-stretch: 88%;
}

p {
  margin: 0;
  max-width: var(--measure);
}
p + p {
  margin-top: 0.75em;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}
a:hover {
  text-decoration-thickness: 2px;
}

:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
  border-radius: 2px;
}

code,
kbd,
pre {
  font-family: var(--mono);
  font-size: 0.92em;
}

.wrap {
  width: min(72rem, 100% - 2 * var(--gutter));
  margin-inline: auto;
}
.wrap.narrow {
  width: min(48rem, 100% - 2 * var(--gutter));
}

.quiet {
  color: var(--ink-soft);
}
.small {
  font-size: var(--step--1);
}
.num {
  font-variant-numeric: tabular-nums;
}

/* For keyboard users: the first Tab press offers a jump past the header. */
.skip {
  position: absolute;
  left: 0.5rem;
  top: -4rem;
  background: var(--ink);
  color: var(--sheet);
  padding: 0.5rem 0.9rem;
  border-radius: 3px;
  z-index: 10;
}
.skip:focus {
  top: 0.5rem;
}

/* Header and footer */
.masthead {
  border-bottom: 2px solid var(--ink);
  background: var(--paper);
}
.masthead .wrap {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  min-height: 3.75rem;
  flex-wrap: wrap;
}
.wordmark {
  font-family: var(--display);
  font-stretch: 78%;
  font-weight: 800;
  font-size: 1.6rem;
  letter-spacing: -0.01em;
  text-decoration: none;
  margin-right: auto;
}
.masthead nav {
  display: flex;
  gap: 1.25rem;
  align-items: center;
  flex-wrap: wrap;
}
.masthead .account form {
  display: flex;
  gap: 0.75rem;
  align-items: baseline;
}
.masthead .button {
  padding: 0.3rem 0.75rem;
}
@media (max-width: 40rem) {
  .masthead .wrap {
    gap: 0 1rem;
    padding-top: 0.6rem;
  }
  .wordmark {
    font-size: 1.4rem;
  }
  .masthead nav {
    order: 3;
    flex-basis: 100%;
    gap: 1.25rem;
    font-size: var(--step--1);
  }
  .masthead .button {
    font-size: var(--step--1);
  }
}
.masthead nav a {
  text-decoration: none;
  padding-block: 0.4rem;
  border-bottom: 2px solid transparent;
}
.masthead nav a:hover,
.masthead nav a[aria-current="page"] {
  border-bottom-color: var(--ink);
}

main {
  flex: 1;
  padding-block: clamp(1.75rem, 5vw, 3.5rem) 4rem;
}

.colophon {
  border-top: 1px solid var(--rule);
  padding-block: 1.5rem 2.5rem;
  font-size: var(--step--1);
  color: var(--ink-soft);
}
.colophon .links {
  display: flex;
  gap: 1.5rem;
}
.colophon .wrap {
  display: flex;
  gap: 0.5rem 2rem;
  flex-wrap: wrap;
  justify-content: space-between;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
