:root {
  --paper: #f3eee6;
  --ink: #221c17;
  --accent: #7c3426;
  --accent-hover: #5c2419;
  --focus: #7c3426;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: "Avenir Next", Avenir, "Segoe UI", sans-serif;
  --measure: 37.5rem;
  color-scheme: light;
}

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

html {
  overflow-x: clip;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.125rem;
  line-height: 1.65;
  font-weight: 400;
  text-rendering: optimizeLegibility;
}

.threshold {
  height: 0.4rem;
  background: var(--accent);
}

.page {
  width: min(var(--measure), calc(100% - 2.5rem));
  margin-inline: auto;
  padding-block: clamp(4.25rem, 12vh, 7.75rem) clamp(4.75rem, 14vh, 8.5rem);
}

h1,
h2,
p {
  text-wrap: pretty;
}

h1,
h2 {
  font-weight: 400;
  letter-spacing: -0.02em;
}

h1 {
  margin: 0 0 1.35rem;
  font-size: clamp(2.65rem, 11vw, 4.35rem);
  line-height: 1.05;
  text-wrap: balance;
}

h2 {
  margin: 0 0 1.15rem;
  font-size: clamp(1.55rem, 3vw, 1.9rem);
  line-height: 1.2;
}

p {
  margin: 0 0 1.05em;
}

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

.dek {
  font-size: clamp(1.28rem, 2.4vw, 1.45rem);
  line-height: 1.45;
  margin-bottom: 1.15em;
}

.welcome + section,
section + section {
  margin-top: clamp(4rem, 10vh, 6.75rem);
}

.rate strong {
  font-weight: 600;
}

.write {
  margin-top: 2.15rem;
}

.write a {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.4rem;
  color: inherit;
  text-decoration: none;
  max-width: 100%;
}

.write-label {
  color: var(--accent);
  font-size: 1.2rem;
  line-height: 1.3;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
}

.write-address {
  font-family: var(--sans);
  font-size: 0.98rem;
  letter-spacing: 0.01em;
  line-height: 1.4;
}

.write a:hover .write-label,
.write a:hover .write-address,
.return a:hover {
  color: var(--accent-hover);
}

.return {
  margin-top: 1.75rem;
}

.return a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
}

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

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

@media (max-width: 420px) {
  body {
    font-size: 1.0625rem;
  }

  .page {
    width: min(var(--measure), calc(100% - 2rem));
  }
}

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

@media print {
  body {
    background: #fff;
  }

  .threshold {
    print-color-adjust: exact;
  }
}
