@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: #eef1ea;
  --ink: #141711;
  --accent: #2f5d46;
  --muted: #525a4f;
  --quiet-ink: #252a22;
  --rule: rgba(20, 23, 17, 0.17);
  --rule-soft: rgba(20, 23, 17, 0.07);
  --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);
  --gutter: max(var(--pad), calc((100% - 72rem) / 2 + var(--pad)));
}

*,
*::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: #f2f5ee; }

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;
  padding: clamp(2.25rem, 5vh, 3.5rem) var(--gutter) clamp(2.5rem, 6vh, 3.75rem);
  border-bottom: 1px solid var(--rule);
}

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

.label {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0 0 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(3rem, 21vw, 11rem);
  font-weight: 400;
  line-height: 0.9;
  letter-spacing: -0.04em;
  white-space: nowrap;
}

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

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

.hero__band {
  position: relative;
  display: grid;
  gap: 1.9rem;
  margin-top: clamp(1.5rem, 4vh, 2.25rem);
  align-items: start;
}

.lede {
  max-width: 32ch;
  margin: 0;
  font-size: clamp(1.1rem, 2.1vw, 1.35rem);
  line-height: 1.45;
  color: var(--quiet-ink);
  text-wrap: pretty;
}

.docket {
  border-top: 1px solid var(--rule);
  padding-top: 1.3rem;
}

.docket__label {
  margin: 0;
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}

.price {
  margin: 0.15rem 0 0;
  font-size: clamp(2.5rem, 5.5vw, 3.4rem);
  line-height: 1;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

.price--request {
  font-size: clamp(1.95rem, 4.4vw, 2.7rem);
  letter-spacing: -0.02em;
}

.price__unit {
  margin-left: 0.5rem;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  color: var(--muted);
}

.docket__note {
  margin: 0.55rem 0 1.15rem;
  font-family: var(--mono);
  font-size: 0.6875rem;
  line-height: 1.9;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.docket__note span { display: block; }
.docket__note span + span::before { content: none; }

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin: 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.875rem;
  padding: 0.75rem 1.3rem;
  border: 1px solid var(--ink);
  border-radius: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--mono);
  font-size: 0.72rem;
  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: #f2f5ee;
}

.btn--quiet {
  background: transparent;
  border-color: rgba(20, 23, 17, 0.4);
  color: var(--ink);
}

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

.docket .actions { flex-direction: column; align-items: stretch; }
.docket .btn { width: 100%; }

.note {
  margin: 0.85rem 0 0;
  font-style: italic;
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--muted);
}

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

@media (min-width: 56rem) {
  .hero__band {
    grid-template-columns: minmax(0, 1fr) 22rem;
    gap: clamp(2rem, 5vw, 4rem);
  }
  .lede { padding-top: 0.4rem; }
  .docket {
    border-top: 0;
    border-left: 1px solid var(--rule);
    padding-top: 0;
    padding-left: clamp(1.5rem, 3vw, 2.25rem);
  }
}

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

main { display: block; }

.chapter {
  max-width: 72rem;
  margin: 0 auto;
  padding: clamp(2.4rem, 5vw, 3.5rem) var(--pad) 0;
  border-top: 1px solid var(--rule);
}

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

.chapter .label {
  margin-bottom: 0.85rem;
}

h2 {
  margin: 0 0 1.3rem;
  font-size: clamp(1.6rem, 3.4vw, 2.25rem);
  font-weight: 400;
  line-height: 1.12;
  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: 36rem;
  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: 36rem;
  margin: 0 0 1.8rem;
  font-size: 1.12rem;
  line-height: 1.5;
  color: var(--quiet-ink);
  text-wrap: pretty;
}

.fit {
  display: grid;
  gap: 1.05rem;
  max-width: 46rem;
  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.66em;
  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: 56rem) {
  .chapter {
    position: relative;
    display: grid;
    grid-template-columns: 11rem minmax(0, 1fr);
    column-gap: clamp(2rem, 5vw, 4rem);
    align-items: start;
  }

  .chapter::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: calc(var(--pad) + 11rem + clamp(2rem, 5vw, 4rem) / 2);
    width: 1px;
    background: var(--rule);
  }

  .chapter .label {
    padding-top: 0.55rem;
    margin-bottom: 0;
  }
}

@media (min-width: 72rem) {
  .fit { grid-template-columns: 1fr 1fr; gap: 1.2rem 2.5rem; max-width: none; }
}

/* ---------- spec, ledger style ---------- */

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

.spec__row {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.9rem;
  align-items: baseline;
  padding: 0.66rem 0;
  background-image: radial-gradient(circle, rgba(20, 23, 17, 0.34) 1px, transparent 1.2px);
  background-size: 6px 6px;
  background-position: 0 calc(100% - 2px);
  background-repeat: repeat-x;
}

.spec dt,
.spec dd {
  background: var(--paper);
}

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

.spec dd {
  justify-self: end;
  margin: 0;
  padding-left: 0.6rem;
  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.55rem;
  max-width: 42rem;
}

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

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

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

.chapter--close .actions { margin-top: 1.5rem; }

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

.foot {
  border-top: 1px solid var(--rule);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.35rem 2.5rem;
  padding: 1.6rem var(--gutter) 2.75rem;
  font-family: var(--mono);
  font-size: 0.6875rem;
  line-height: 2;
  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(20, 23, 17, 0.32);
  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;
  padding: 3rem var(--gutter);
}

.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(2.25rem, 8vw, 5rem);
  line-height: 0.95;
  letter-spacing: -0.035em;
}

.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: 26rem) {
  .actions { flex-direction: column; align-items: stretch; }
  .spec__row { grid-template-columns: 1fr; gap: 0.1rem; }
  .spec dd { justify-self: start; text-align: left; padding-left: 0; }
  .spec dt { padding-right: 0; }
}
