:root {
  color-scheme: light dark;
  --bg: #ffffff;
  --fg: #1a1a1a;
  --muted: #555555;
  --border: #e2e2e2;
  --card: #fafafa;
  --link: #0b57d0;
  --badge-bg: #eef2f8;
  --badge-fg: #2c3e5c;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111111;
    --fg: #ececec;
    --muted: #a8a8a8;
    --border: #2c2c2c;
    --card: #191919;
    --link: #8ab4f8;
    --badge-bg: #22293a;
    --badge-fg: #c9d6ee;
  }
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
}

.wrap {
  max-width: 42rem;
  margin: 0 auto;
  padding: 0 1.25rem;
}

header.site {
  padding: 3.5rem 0 2rem;
}

header.site .brand {
  color: inherit;
  text-decoration: none;
}

h1 {
  font-size: clamp(1.75rem, 6vw, 2.5rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 0 0 0.5rem;
}

h2 {
  font-size: 1.25rem;
  letter-spacing: -0.01em;
  margin: 0 0 1rem;
}

h3 {
  font-size: 1.0625rem;
  margin: 0;
}

p {
  margin: 0 0 1rem;
}

.lead {
  color: var(--muted);
  font-size: 1.1875rem;
  margin: 0;
}

main section {
  padding: 2rem 0;
  border-top: 1px solid var(--border);
}

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

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

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 1.25rem;
}

.card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.card p {
  color: var(--muted);
  margin-bottom: 0.75rem;
}

.card p:last-child {
  margin-bottom: 0;
}

.badge {
  background: var(--badge-bg);
  color: var(--badge-fg);
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 0.125rem 0.625rem;
  white-space: nowrap;
}

dl.contact {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 0.25rem 1.25rem;
  margin: 0;
}

dl.contact dt {
  color: var(--muted);
}

dl.contact dd {
  margin: 0;
  overflow-wrap: anywhere;
}

footer.site {
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.875rem;
  padding: 1.5rem 0 3rem;
}

footer.site p {
  margin: 0 0 0.25rem;
}

@media (max-width: 400px) {
  dl.contact {
    grid-template-columns: 1fr;
  }

  dl.contact dd {
    margin-bottom: 0.5rem;
  }
}
