/* Bases are black #000000 and white #ffffff.
   Gold #9a6814 is the heading. Red #c73b36 is the small identity mark.
   The hex values are contrast choices. */

:root {
  color-scheme: light;
  --paper: #ffffff;
  --ink: #000000;
  --gold: #9a6814;
  --red: #c73b36;
  --sans: system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
}

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

html {
  background: var(--paper);
  color: var(--ink);
  scroll-behavior: auto;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  overflow-wrap: break-word;
  hyphens: manual;
}

@media (pointer: fine) {
  html {
    overscroll-behavior: none;
  }
}

[id] {
  scroll-margin-top: 1.5rem;
}

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

::selection {
  background: var(--ink);
  color: var(--paper);
}

.skip {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip:focus,
.skip:focus-visible {
  left: max(0.75rem, env(safe-area-inset-left));
  top: max(0.75rem, env(safe-area-inset-top));
  z-index: 2;
  width: auto;
  height: auto;
  min-height: 44px;
  margin: 0;
  padding: 0.75rem 1rem;
  overflow: visible;
  clip: auto;
  clip-path: none;
  white-space: normal;
  background: var(--paper);
  color: var(--ink);
}

a:link,
a:visited {
  color: var(--ink);
  text-decoration-line: underline;
  text-decoration-thickness: 1px;
  text-decoration-color: currentColor;
  text-underline-offset: 0.18em;
}

a {
  touch-action: manipulation;
  -webkit-tap-highlight-color: rgba(154, 104, 20, 0.28);
}

a:active {
  text-decoration-thickness: 3px;
  text-decoration-color: var(--gold);
}

@media (hover: hover) and (pointer: fine) {
  a:hover {
    text-decoration-thickness: 2px;
    text-decoration-color: var(--gold);
  }
}

a[aria-current="page"] {
  font-weight: 700;
  text-decoration-thickness: 2px;
}

.wrap {
  width: min(42rem, 100%);
  margin-inline: auto;
  padding-left: max(1.25rem, env(safe-area-inset-left));
  padding-right: max(1.25rem, env(safe-area-inset-right));
}

.site-header {
  padding-top: env(safe-area-inset-top);
  border-bottom: 1px solid var(--ink);
}

.site-header .wrap {
  padding-top: 0.2rem;
  padding-bottom: 0.2rem;
}

.bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  column-gap: 1.5rem;
  row-gap: 0;
}

.wordmark,
.primary,
.legal {
  min-width: 0;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-right: auto;
  padding-top: 0.35rem;
  padding-bottom: 0.35rem;
  font-weight: 650;
  letter-spacing: 0.01em;
}

.primary,
.legal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  max-width: 100%;
}

.primary {
  gap: 0.1rem 1rem;
}

.legal {
  gap: 0.1rem 1.15rem;
}

.primary a,
.legal a,
.wordmark,
main a,
.colophon a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding-top: 0.45rem;
  padding-bottom: 0.45rem;
}

main {
  padding-top: clamp(2.5rem, 6vw, 4.5rem);
  padding-bottom: clamp(3rem, 7vw, 5rem);
}

.kicker {
  margin: 0 0 0.75rem;
  font-size: 1rem;
  line-height: 1.5;
}

.mark {
  color: var(--red);
  font-weight: 700;
}

h1 {
  margin: 0;
  color: var(--gold);
  font-family: var(--serif);
  font-size: clamp(3rem, 8vw, 5.25rem);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: 0;
  text-wrap: balance;
}

h2 {
  margin: 0 0 0.75rem;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.25rem;
  font-weight: 650;
  line-height: 1.35;
  letter-spacing: 0;
  text-wrap: balance;
}

.lede {
  margin: 1.15rem 0 0;
  max-width: 36rem;
  font-size: 1.25rem;
  line-height: 1.5;
  text-wrap: pretty;
}

section {
  margin-top: clamp(2.25rem, 5vw, 3.25rem);
}

section p,
.note,
.colophon {
  max-width: 38rem;
  margin: 0 0 0.9rem;
}

section p:last-child,
.note:last-child {
  margin-bottom: 0;
}

.site-footer {
  border-top: 1px solid var(--ink);
  padding-top: 1.15rem;
  padding-bottom: max(1.75rem, env(safe-area-inset-bottom));
}

.colophon {
  margin-top: 0.85rem;
}

@media (prefers-contrast: more) {
  :root {
    --gold: #6b4e0c;
    --red: #8d1c18;
  }
}

@media (forced-colors: active) {
  h1,
  .mark,
  a:link,
  a:visited,
  a:hover,
  a:active {
    color: CanvasText;
    text-decoration-color: CanvasText;
  }

  a:link,
  a:visited {
    color: LinkText;
  }

  .site-header,
  .site-footer {
    border-color: CanvasText;
  }

  .skip:focus,
  .skip:focus-visible {
    background: Canvas;
    color: LinkText;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
