@font-face {
  font-family: "Newsreader";
  src: url("/assets/fonts/newsreader-roman.woff2") format("woff2");
  font-weight: 400 600;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Newsreader";
  src: url("/assets/fonts/newsreader-italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --paper: #f4efe6;
  --ink: #171512;
  --accent: #b4462f;
  --muted: #5c574d;
  --quiet-ink: #2b2621;
  --rule: rgba(23, 21, 18, 0.16);
  --rule-soft: rgba(23, 21, 18, 0.075);
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --serif: "Newsreader", Georgia, "Iowan Old Style", "Times New Roman", serif;
  --pad: clamp(1.25rem, 5vw, 3rem);
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.0625rem;
  line-height: 1.62;
  font-optical-sizing: none;
  -webkit-font-synthesis: none;
  font-synthesis-weight: none;
}

::selection { background: var(--accent); color: #fdf7ee; }

a { color: inherit; }

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

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 10;
  background: var(--paper);
  color: var(--ink);
  padding: 0.75rem 1rem;
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.skip:focus { left: 1rem; top: 1rem; }

.vh {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* ---------- hero ---------- */

.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: min(90svh, 54rem);
  padding: clamp(3.25rem, 9vh, 6rem) var(--pad) clamp(2.75rem, 7vh, 4rem);
  text-align: center;
  border-bottom: 1px solid var(--rule);
}

.ruled::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: repeating-linear-gradient(
    to bottom,
    var(--rule-soft) 0 1px,
    transparent 1px 2.125rem
  );
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 58%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 0%, #000 58%, transparent 100%);
}

.label {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  margin: 0 0 1.1rem;
  font-family: var(--mono);
  font-size: 0.6875rem;
  line-height: 1.3;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  text-wrap: balance;
}

.dot {
  flex: none;
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 50%;
  background: var(--accent);
}

.wordmark {
  position: relative;
  margin: 0;
  font-size: clamp(2.35rem, 14vw, 8.4rem);
  font-weight: 400;
  line-height: 0.95;
  letter-spacing: -0.035em;
  white-space: nowrap;
}

.wordmark .tld {
  letter-spacing: -0.045em;
}

.period {
  color: var(--accent);
}

.lede {
  position: relative;
  max-width: 30ch;
  margin: 1.6rem auto 0;
  font-size: clamp(1.15rem, 2.5vw, 1.5rem);
  line-height: 1.42;
  color: var(--quiet-ink);
  text-wrap: balance;
}

.actions {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.7rem;
  margin: 2rem 0 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.875rem;
  padding: 0.75rem 1.35rem;
  border: 1px solid var(--ink);
  border-radius: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--mono);
  font-size: 0.75rem;
  line-height: 1.1;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

.btn:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fdf7ee;
}

.btn--quiet {
  background: transparent;
  border-color: rgba(23, 21, 18, 0.38);
  color: var(--ink);
}

.btn--quiet:hover {
  background: transparent;
  border-color: var(--ink);
  color: var(--accent);
}

.terms {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0;
  margin: 1.35rem 0 0;
  font-family: var(--mono);
  font-size: 0.6875rem;
  line-height: 2;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
}

.terms > *:not(:last-child)::after {
  content: "·";
  padding: 0 0.7rem;
  color: var(--muted);
}

.terms span,
.terms a { white-space: nowrap; }

.terms strong { font-weight: 400; color: var(--ink); }

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

.note {
  position: relative;
  margin: 0.55rem 0 0;
  font-style: italic;
  font-size: 0.9375rem;
  color: var(--muted);
}

.note a { color: var(--accent); }

/* ---------- chapters ---------- */

main { display: block; }

.chapter {
  max-width: 47rem;
  margin: 0 auto;
  padding: clamp(2.5rem, 5.5vw, 3.9rem) var(--pad) 0;
  border-top: 1px solid var(--rule);
}

.chapter:first-child { border-top: 0; }

.chapter .label {
  justify-content: flex-start;
  margin-bottom: 0.7rem;
}

h2 {
  margin: 0 0 1.35rem;
  font-size: clamp(1.7rem, 4vw, 2.45rem);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.018em;
  text-wrap: balance;
}

h3 {
  margin: 0;
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: -0.005em;
}

.prose p {
  max-width: 34rem;
  margin: 0 0 1.05em;
  color: var(--quiet-ink);
}

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

.prose em { font-style: italic; }

.prose strong { font-weight: 600; color: var(--ink); }

.nowrap { white-space: nowrap; }

.intro {
  max-width: 34rem;
  margin: 0 0 1.75rem;
  font-size: 1.15rem;
  line-height: 1.5;
  color: var(--quiet-ink);
  text-wrap: pretty;
}

.fit {
  display: grid;
  gap: 1.15rem;
  max-width: 40rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.fit li {
  position: relative;
  padding-left: 1.4rem;
  color: var(--quiet-ink);
}

.fit li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 0.38rem;
  height: 0.38rem;
  border-radius: 50%;
  background: var(--accent);
}

.fit strong {
  display: block;
  font-weight: 600;
  color: var(--ink);
}

@media (min-width: 46rem) {
  .fit {
    grid-template-columns: 1fr 1fr;
    gap: 1.35rem 2.25rem;
  }
}

/* ---------- spec ---------- */

.spec {
  margin: 0 0 1.9rem;
  border-top: 1px solid var(--rule);
}

.spec__row {
  display: grid;
  grid-template-columns: minmax(7.5rem, auto) 1fr;
  gap: 1rem;
  align-items: baseline;
  padding: 0.72rem 0;
  border-bottom: 1px dotted rgba(23, 21, 18, 0.3);
}

.spec dt {
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--muted);
}

.spec dd {
  margin: 0;
  text-align: right;
  font-family: var(--mono);
  font-size: 0.8125rem;
  letter-spacing: 0.01em;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}

/* ---------- faq ---------- */

.faq {
  display: grid;
  gap: 1.6rem;
  max-width: 40rem;
}

.faq__item p {
  margin: 0.3rem 0 0;
  color: var(--quiet-ink);
}

/* ---------- close + footer ---------- */

.chapter--close {
  padding-bottom: clamp(2.75rem, 6vw, 4.5rem);
}

.chapter--close .actions { justify-content: flex-start; }

.chapter--close .note { margin-top: 1rem; }

.foot {
  border-top: 1px solid var(--rule);
  padding: 1.7rem var(--pad) 2.75rem;
  text-align: center;
  font-family: var(--mono);
  font-size: 0.6875rem;
  line-height: 2.1;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
}

.foot p { margin: 0; }

.foot a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: rgba(23, 21, 18, 0.3);
  text-underline-offset: 0.24em;
}

.foot a:hover { color: var(--accent); }

@media (prefers-reduced-motion: reduce) {
  .btn { transition: none; }
}

/* ---------- 404 ---------- */

.notfound {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 3rem var(--pad);
  text-align: center;
}

.notfound .code {
  margin: 0;
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.notfound h1 {
  max-width: none;
  margin: 1rem 0 0.75rem;
  font-size: clamp(2rem, 7vw, 4rem);
  line-height: 1;
  letter-spacing: -0.03em;
}

.notfound p {
  max-width: 30ch;
  margin: 0 0 1.75rem;
  color: var(--quiet-ink);
}

.notfound .actions {
  max-width: none;
  margin-top: 0;
}

@media (max-width: 30rem) {
  .hero {
    min-height: auto;
    padding-block: 3rem 2.6rem;
  }
  .terms {
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
  }
  .terms > * + *::before { content: none; }
  .terms > *:not(:last-child)::after { content: none; }
}

@media (max-width: 26rem) {
  .spec__row { grid-template-columns: 1fr; gap: 0.15rem; }
  .spec dd { text-align: left; }
  .actions { flex-direction: column; align-items: stretch; }
  .chapter--close .actions { align-items: stretch; }
}
