:root {
  --ink: #1a1814;
  --muted: #5c564c;
  --paper: #f6f3ec;
  --sheet: #fffcf7;
  --line: #e4ddd0;
  --stamp: #8f2d2a;
  --page: 48rem;
  --gutter: 1.25rem;
  color-scheme: light;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Avenir Next", "Segoe UI", sans-serif;
  font-size: 1.0625rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: "Iowan Old Style", Palatino, "Palatino Linotype", Georgia, serif;
  font-weight: 600;
  letter-spacing: -0.02em;
  text-wrap: balance;
  line-height: 1.15;
}

p { text-wrap: pretty; }

a { color: inherit; }

.wrap {
  width: min(var(--page), calc(100% - 2 * var(--gutter)));
  margin-inline: auto;
}

header.site {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  width: 100%;
  min-height: 4.25rem;
  padding-top: max(0.65rem, env(safe-area-inset-top));
  padding-bottom: 0.65rem;
  padding-left: max(var(--gutter), env(safe-area-inset-left), calc((100% - var(--page)) / 2));
  padding-right: max(var(--gutter), env(safe-area-inset-right), calc((100% - var(--page)) / 2));
  background: #efeae0;
  border-bottom: 1px solid var(--line);
}

.mark {
  font-family: "Iowan Old Style", Palatino, Georgia, serif;
  text-decoration: none;
  font-size: 1.15rem;
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
}

nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

nav a {
  color: var(--muted);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding: 0 0.75rem;
  border-radius: 0.35rem;
}

nav a:hover { color: var(--ink); background: rgba(26, 24, 20, 0.05); }

.mark:focus-visible,
nav a:focus-visible,
.buy:focus-visible,
.questions a:focus-visible,
form input:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

.skip {
  position: absolute;
  left: var(--gutter);
  top: 0;
  transform: translateY(-120%);
  background: var(--sheet);
  color: var(--ink);
  padding: 0.55rem 0.8rem;
  z-index: 6;
}

.skip:focus {
  transform: none;
}

.hero { padding: 4.5rem 0 2rem; }

.hero h1 {
  font-size: clamp(2.6rem, 6vw, 4.4rem);
  margin: 0 0 1rem;
}

.lede,
.note,
section p,
article.post p {
  max-width: 42rem;
}

.lede {
  font-size: 1.25rem;
  margin: 0 0 1.75rem;
}

.buy {
  display: inline-block;
  background: var(--ink);
  color: var(--sheet);
  text-decoration: none;
  padding: 0.85rem 1.15rem;
  border-radius: 0.4rem;
  font-weight: 600;
  transition-property: scale, background-color;
  transition-duration: 160ms;
  transition-timing-function: cubic-bezier(0.2, 0, 0, 1);
}

.buy:hover { background: #2a261f; }
.buy:active { scale: 0.96; }

.price {
  display: block;
  margin-top: 0.7rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

form label {
  display: block;
  margin: 0 0 0.85rem;
  font-size: 0.92rem;
  color: var(--muted);
}

form input {
  display: block;
  width: 100%;
  margin-top: 0.3rem;
  padding: 0.7rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 0.4rem;
  background: var(--sheet);
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
  min-height: 2.75rem;
}

form input:focus {
  outline: 2px solid var(--ink);
  outline-offset: 1px;
}

button.buy,
a.buy {
  border: 0;
  cursor: pointer;
  font: inherit;
  min-height: 2.75rem;
}

button.buy:disabled {
  opacity: 0.55;
  cursor: wait;
}

.form-status { min-height: 1.4em; }

.proof {
  background: var(--sheet);
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  overflow: hidden;
  margin: 2.5rem 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}

.proof-note {
  margin: 0;
  padding: 0.7rem 1rem 0.85rem;
  color: var(--muted);
  font-size: 0.85rem;
}

th, td {
  text-align: left;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--line);
  vertical-align: baseline;
}

th {
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}

tr:last-child td { border-bottom: 0; }

.stamp {
  display: inline-block;
  border: 1.5px solid var(--stamp);
  color: var(--stamp);
  border-radius: 0.2rem;
  padding: 0.12rem 0.4rem;
  font-size: 0.92rem;
  font-weight: 600;
}

.note {
  color: var(--muted);
  font-size: 0.95rem;
}

section { padding: 1.25rem 0 2rem; }

#demo,
#questions { scroll-margin-top: 5.25rem; }

h2 { font-size: 2rem; margin: 0 0 0.75rem; }

.questions {
  list-style: none;
  margin: 0;
  padding: 0;
}

.questions li {
  padding: 0.95rem 0;
  border-top: 1px solid var(--line);
}

.questions a {
  font-family: "Iowan Old Style", Palatino, Georgia, serif;
  font-size: 1.2rem;
  line-height: 1.3;
  text-decoration: none;
  text-wrap: balance;
}

.questions a:hover { text-decoration: underline; }

.questions p {
  margin: 0.35rem 0 0;
  color: var(--muted);
}

ul.plain { padding-left: 1.1rem; }

footer.site {
  border-top: 1px solid var(--line);
  margin-top: 2rem;
  padding: 1.5rem 0 calc(2.75rem + env(safe-area-inset-bottom));
  color: var(--muted);
  font-size: 0.95rem;
}

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

article.post h1 { font-size: clamp(2.1rem, 4vw, 3.2rem); margin-top: 2.5rem; }

.answer {
  font-size: 1.2rem;
  margin-top: 0;
}

.meta { color: var(--muted); font-size: 0.92rem; }

@media (max-width: 720px) {
  header.site { flex-wrap: wrap; row-gap: 0; }
  .hero { padding: 2rem 0 1.25rem; }
  .hero h1 { font-size: 2.35rem; }
  .lede { font-size: 1.1rem; }
  a.buy, button.buy { display: flex; width: 100%; align-items: center; justify-content: center; }
  .proof { margin: 1.5rem 0; }
  .proof table, .proof tbody, .proof tr, .proof td { display: block; width: 100%; }
  .proof thead { display: none; }
  .proof tr { padding: 0.85rem 0.9rem; border-bottom: 1px solid var(--line); }
  .proof tr:last-child { border-bottom: 0; }
  .proof td { border: 0; padding: 0.12rem 0; }
  .proof td:nth-child(2) { color: var(--muted); font-size: 0.95rem; }
  .proof-note { padding: 0.15rem 0.9rem 0.9rem; }
  article.post h1 { margin-top: 1.25rem; font-size: 2rem; }
  .stamp { white-space: normal; }
  h2 { font-size: 1.65rem; }
  .questions a { font-size: 1.12rem; }
}
