:root {
  color-scheme: light dark;
  --background: #fffaf3;
  --surface: #ffffff;
  --text: #241708;
  --muted: #675b4d;
  --accent: #c75a0a;
  --accent-strong: #934005;
  --border: #ddcbb7;
  --focus: #0067c5;
  --notice: #fff2d8;
}

* {
  box-sizing: border-box;
}

html {
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  font-size: 100%;
  line-height: 1.6;
}

body {
  margin: 0;
  background: var(--background);
  color: var(--text);
}

a {
  color: var(--accent-strong);
  text-decoration-thickness: 0.12em;
  text-underline-offset: 0.18em;
}

a:hover {
  text-decoration-thickness: 0.18em;
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -5rem;
  z-index: 20;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  background: var(--text);
  color: var(--surface);
}

.skip-link:focus {
  top: 1rem;
}

.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.site-header__inner,
.page,
.site-footer__inner {
  width: min(100% - 2rem, 52rem);
  margin-inline: auto;
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4.5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--text);
  font-weight: 800;
  text-decoration: none;
}

.brand img {
  width: 2.5rem;
  height: 2.5rem;
}

.site-header nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}

.page {
  padding-block: clamp(2rem, 6vw, 4rem);
}

.page h1 {
  max-width: 22ch;
  margin: 0 0 0.75rem;
  font-size: clamp(2rem, 6vw, 3.2rem);
  line-height: 1.12;
}

.page h2 {
  margin: 2.25rem 0 0.65rem;
  font-size: clamp(1.3rem, 3vw, 1.65rem);
  line-height: 1.25;
}

.page h3 {
  margin: 1.5rem 0 0.4rem;
  font-size: 1.1rem;
}

.lede {
  max-width: 70ch;
  margin-top: 0;
  color: var(--muted);
  font-size: 1.1rem;
}

.metadata,
.muted {
  color: var(--muted);
}

.notice,
.card {
  margin-block: 1.5rem;
  padding: 1.1rem 1.25rem;
  border: 1px solid var(--border);
  border-radius: 0.8rem;
  background: var(--surface);
}

.notice {
  border-left: 0.35rem solid var(--accent);
  background: var(--notice);
}

.card h2,
.card h3 {
  margin-top: 0;
}

li + li {
  margin-top: 0.45rem;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-block: 1.5rem;
}

.button {
  display: inline-flex;
  min-height: 3rem;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1rem;
  border: 2px solid var(--accent-strong);
  border-radius: 0.65rem;
  background: var(--accent-strong);
  color: #ffffff;
  font: inherit;
  font-weight: 750;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

.button--secondary {
  background: transparent;
  color: var(--accent-strong);
}

.button[hidden] {
  display: none;
}

.site-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
}

.site-footer__inner {
  padding-block: 1.5rem 2rem;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1rem;
}

.site-footer p {
  color: var(--muted);
}

code {
  overflow-wrap: anywhere;
}

@media (max-width: 40rem) {
  .site-header__inner {
    align-items: flex-start;
    flex-direction: column;
    padding-block: 0.85rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

@media (prefers-color-scheme: dark) {
  :root {
    --background: #171008;
    --surface: #21170d;
    --text: #fff8ee;
    --muted: #d6c3ad;
    --accent: #ff9b4c;
    --accent-strong: #ffad6d;
    --border: #60472f;
    --focus: #66b5ff;
    --notice: #352713;
  }

  .button {
    background: #ffad6d;
    color: #241708;
  }

  .button--secondary {
    background: transparent;
    color: var(--accent-strong);
  }
}
