:root {
  --paper: #FAF7F2;
  --ink: #1C1C1C;
  --muted: #78736A;
  --rule: #E4DCCE;
  --accent: #9C6524;
  --accent-mark: #C6913E;
}

:root[data-theme="dark"] {
  --paper: #17161A;
  --ink: #E9E3D8;
  --muted: #989184;
  --rule: #2E2B27;
  --accent: #D9A455;
  --accent-mark: #C6913E;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #17161A;
    --ink: #E9E3D8;
    --muted: #989184;
    --rule: #2E2B27;
    --accent: #D9A455;
    --accent-mark: #C6913E;
  }
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background: var(--paper);
  color: var(--ink);
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.7;
}

.page {
  max-width: 800px;
  margin: 0 auto;
  padding: 52px 48px 0;
}

a {
  color: inherit;
}

/* Header */

.site-header {
  display: flex;
  justify-content: flex-end;
  gap: 22px;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.site-header a {
  text-decoration: none;
}

.site-header .home-link {
  color: var(--accent);
}

.site-header a:hover {
  color: var(--ink);
}

.theme-toggle {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  font: inherit;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.theme-toggle:hover {
  color: var(--ink);
}

.theme-toggle .label-dark,
:root[data-theme="dark"] .theme-toggle .label-light {
  display: none;
}

:root[data-theme="dark"] .theme-toggle .label-dark {
  display: inline;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .label-light {
    display: none;
  }

  :root:not([data-theme="light"]) .theme-toggle .label-dark {
    display: inline;
  }
}

/* Wordmark */

.wordmark-row {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  margin: 72px 0 96px;
}

h1.wordmark {
  font-size: 68px;
  line-height: 0.95;
  font-weight: 500;
  letter-spacing: -0.03em;
}

.mark-square {
  width: 10px;
  height: 10px;
  background: var(--accent-mark);
  margin-bottom: 6px;
  flex-shrink: 0;
}

/* Sections */

.item {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 24px;
  margin-top: 80px;
  padding-top: 16px;
  border-top: 1px solid var(--rule);
}

.item:first-of-type {
  margin-top: 0;
  border-top: 1px solid var(--ink);
}

.item-index {
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
}

.item h2 {
  margin: 0 0 22px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.item .lead {
  font-size: 19px;
  line-height: 1.62;
  max-width: 52ch;
}

.item p {
  font-size: 17px;
  line-height: 1.7;
  max-width: 58ch;
  margin-bottom: 18px;
}

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

.item .inline-link {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid rgba(156, 101, 36, 0.35);
  padding-bottom: 2px;
}

.item .inline-link:hover {
  border-bottom-color: var(--accent);
}

/* Footer */

.site-footer {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 24px;
  flex-wrap: wrap;
  margin-top: 96px;
  padding: 20px 0 56px;
  border-top: 1px solid var(--ink);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-mark {
  width: 7px;
  height: 7px;
  background: var(--accent-mark);
  flex-shrink: 0;
}

.footer-links {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.footer-links a {
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--ink);
}

/* Legal pages */

.legal {
  padding-top: 16px;
  border-top: 1px solid var(--ink);
}

.legal h2 {
  font-size: 23px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin-bottom: 24px;
  text-transform: none;
}

.legal h3 {
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.legal p {
  font-size: 17px;
  line-height: 1.7;
  color: var(--ink);
  max-width: 58ch;
  margin-bottom: 1rem;
}

.back-link {
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
}

.back-link:hover {
  color: var(--ink);
}

/* Mobile */

@media (max-width: 720px) {
  .page {
    padding: 32px 24px 0;
  }

  .wordmark-row {
    margin: 48px 0 64px;
  }

  h1.wordmark {
    font-size: 40px;
  }

  .item {
    display: block;
    margin-top: 56px;
    padding-top: 16px;
  }

  .item-index {
    display: block;
    margin-bottom: 8px;
  }

  .item .lead {
    font-size: 18px;
  }

  .item p {
    font-size: 16.5px;
  }

  .site-footer {
    margin-top: 56px;
  }
}
