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

html {
  color-scheme: light dark;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.55;
}

:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}

.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.site-header__inner,
.site-main,
.site-footer__inner {
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding-inline: var(--space-4);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  min-height: 64px;
}

.brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  color: var(--text);
  text-decoration: none;
}

.brand__logo {
  height: 32px;
  width: auto;
}

.brand__name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--text-lg);
  letter-spacing: -0.01em;
  padding-left: var(--space-3);
  border-left: 1px solid var(--border);
}

/* The wordmark in ink on light backgrounds, in white on dark ones */
.brand__logo--on-dark {
  display: none;
}

:root[data-theme='dark'] .brand__logo--on-light {
  display: none;
}

:root[data-theme='dark'] .brand__logo--on-dark {
  display: block;
}

@media (prefers-color-scheme: dark) {
  :root[data-theme='auto'] .brand__logo--on-light {
    display: none;
  }

  :root[data-theme='auto'] .brand__logo--on-dark {
    display: block;
  }
}

.site-main {
  flex: 1;
  padding-block: var(--space-7);
}

.site-footer {
  border-top: 1px solid var(--border);
}

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding-block: var(--space-4);
  color: var(--muted);
  font-size: var(--text-sm);
}

@media (max-width: 480px) {
  .brand__name {
    font-size: var(--text-base);
  }

  .site-main {
    padding-block: var(--space-6);
  }
}
