:root {
  --cream: #f3eee4;
  --cream-ink: #ebe4d6;
  --paper: #faf6ee;
  --steel: #5c6570;
  --steel-line: #b7bdc4;
  --steel-soft: #8a929b;
  --ink: #16181b;
  --ink-soft: #2a2e33;
  --error: #7a2e2e;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--cream);
  color: var(--ink);
}

body {
  font-family: "Iowan Old Style", "Palatino Linotype", Palatino, "Times New Roman", serif;
  line-height: 1.45;
  min-height: 100vh;
}

.page {
  width: min(38rem, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1.75rem 0 2.5rem;
}

.mast {
  border-bottom: 1px solid var(--steel-line);
  padding-bottom: 1.15rem;
  margin-bottom: 1.35rem;
}

.mark {
  margin: 0 0 0.55rem;
  font-family: "IBM Plex Mono", "SFMono-Regular", ui-monospace, Menlo, Consolas, monospace;
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--steel);
}

h1 {
  margin: 0;
  font-size: clamp(2.4rem, 9vw, 3.4rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 0.95;
}

.line {
  margin: 0.65rem 0 0;
  font-size: 1.05rem;
  color: var(--ink-soft);
}

.why {
  margin: 0.7rem 0 0;
  font-family: "IBM Plex Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 0.92rem;
  color: var(--steel);
}

.field-label {
  display: block;
  font-family: "IBM Plex Mono", "SFMono-Regular", ui-monospace, Menlo, Consolas, monospace;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--steel);
  margin-bottom: 0.4rem;
}

textarea {
  width: 100%;
  min-height: 6.5rem;
  resize: vertical;
  display: block;
  background: var(--paper);
  color: var(--ink);
  border: 1px solid var(--steel-line);
  border-radius: 2px;
  padding: 0.85rem 0.9rem;
  font-family: "IBM Plex Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.45;
}

textarea::placeholder { color: var(--steel-soft); }
textarea:focus {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

.go,
.buy,
.print,
.download {
  font-family: "IBM Plex Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
  cursor: pointer;
}

.go {
  width: 100%;
  min-height: 3rem;
  margin-top: 0.9rem;
  background: var(--ink);
  color: var(--cream);
  border: 1px solid var(--ink);
  border-radius: 2px;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
}

.go:hover { background: var(--ink-soft); }
.go:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

.error {
  margin: 0.7rem 0 0;
  color: var(--error);
  font-family: "IBM Plex Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 0.95rem;
}

.out {
  margin-top: 1.4rem;
  display: grid;
  gap: 0.85rem;
}

.card {
  background: var(--paper);
  border: 1px solid var(--steel-line);
  border-radius: 2px;
  padding: 0.9rem 1rem;
}

.card h2,
.tag {
  margin: 0 0 0.4rem;
  font-family: "IBM Plex Mono", "SFMono-Regular", ui-monospace, Menlo, Consolas, monospace;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--steel);
}

.card p { margin: 0; }

.rate {
  font-size: 2rem;
  letter-spacing: 0.02em;
  line-height: 1.1;
}

.leak {
  font-size: 1.85rem;
  letter-spacing: 0.01em;
  line-height: 1.1;
}

.method {
  margin-top: 0.45rem;
  font-family: "IBM Plex Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 0.88rem;
  color: var(--steel);
}

.fine {
  font-size: 1.35rem;
}

.compare {
  font-family: "IBM Plex Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 0.92rem;
  color: var(--ink-soft);
}

.gate {
  background: var(--ink);
  color: var(--cream);
  border: 1px solid var(--ink);
  border-radius: 2px;
  padding: 1rem 1.05rem 1.1rem;
  display: grid;
  gap: 0.65rem;
}

.gate p {
  margin: 0;
  font-family: "IBM Plex Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 0.95rem;
  color: var(--cream-ink);
}

.buy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0.45rem 1rem;
  background: var(--cream);
  color: var(--ink);
  border: 1px solid var(--cream);
  border-radius: 2px;
  text-decoration: none;
  font-size: 1rem;
  width: 100%;
  text-align: center;
}

.buy:hover { background: var(--cream-ink); }
.buy:focus-visible {
  outline: 2px solid var(--cream);
  outline-offset: 3px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.9rem 0 1.2rem;
}

.print,
.download {
  min-height: 2.5rem;
  padding: 0.4rem 0.85rem;
  background: var(--ink);
  color: var(--cream);
  border: 1px solid var(--ink);
  border-radius: 2px;
  font-size: 0.92rem;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

.print:hover,
.download:hover { background: var(--ink-soft); }

.letter {
  background: var(--paper);
  border: 1px solid var(--steel-line);
  border-radius: 2px;
  padding: 1.15rem 1.2rem 1.3rem;
}

.letter h2 {
  margin: 1.2rem 0 0.45rem;
  font-size: 1.05rem;
}

.letter h2:first-child { margin-top: 0; }

.letter p { margin: 0 0 0.7rem; }

.letter ol,
.letter ul {
  margin: 0 0 0.8rem;
  padding-left: 1.2rem;
}

.letter li { margin: 0 0 0.4rem; }

.letter .sig {
  margin-top: 1rem;
  color: var(--steel);
}

.fallback {
  margin: 0.85rem 0 0;
  font-family: "IBM Plex Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 0.85rem;
  color: var(--steel);
  line-height: 1.4;
}

.gate .fallback {
  color: var(--cream-ink);
  margin: 0;
  font-size: 0.82rem;
}

.thanks-back {
  margin: 1.4rem 0 0;
  font-family: "IBM Plex Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

.thanks-back a { color: var(--ink); }


.xsell {
  margin: 0 0 0.75rem;
  padding: 0.5rem 0.7rem;
  background: var(--cream-ink);
  color: var(--ink);
  border: 1px solid var(--steel-line);
  border-radius: 2px;
  font-size: 0.82rem;
  line-height: 1.4;
}

.xsell a {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.xsell a:hover,
.xsell a:focus-visible {
  color: var(--ink-soft);
}

footer {
  margin-top: 2.25rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--steel-line);
  font-family: "IBM Plex Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 0.8rem;
  color: var(--steel);
}

@media (min-width: 640px) {
  .page { padding-top: 2.5rem; }
}

@media print {
  body { background: #fff; }
  .page { width: 100%; padding: 0; }
  .actions, footer, .thanks-back, .mark { display: none; }
  .letter { border: 0; padding: 0; }
  h1 { font-size: 1.6rem; }
}
