/* LetterPick — design tokens
   Ink #22263B · Paper #FFFFFF · Page #EFF0ED · Postal blue #2B50AA · Postal red #D7263D · Muted #676D7C
   Display: Newsreader · Body: Public Sans · Utility: IBM Plex Mono */

:root {
  --ink: #22263b;
  --paper: #ffffff;
  --page: #eff0ed;
  --blue: #2b50aa;
  --red: #d7263d;
  --muted: #676d7c;
  --line: #d8dad4;
  --radius: 10px;
  --airmail: repeating-linear-gradient(
    -45deg,
    var(--blue) 0 14px, var(--paper) 14px 28px,
    var(--red) 28px 42px, var(--paper) 42px 56px
  );
}

* { box-sizing: border-box; margin: 0; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
  font-family: "Public Sans", system-ui, sans-serif;
  background: var(--page);
  color: var(--ink);
  line-height: 1.6;
  font-size: 16.5px;
}

/* Airmail edge — the signature. A letter, not a landing page. */
.airmail-edge { height: 8px; background: var(--airmail); }

.wrap { max-width: 1060px; margin: 0 auto; padding: 0 24px; }

a { color: var(--blue); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:focus-visible, button:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 2px;
}

/* ---------- header ---------- */
header.site {
  display: flex; align-items: baseline; justify-content: space-between;
  padding: 22px 0 18px; border-bottom: 1px solid var(--line);
}
.logo {
  font-family: "Newsreader", serif; font-size: 1.45rem; font-weight: 600;
  color: var(--ink); text-decoration: none; letter-spacing: -0.01em;
}
.logo .stamp { color: var(--red); }
header.site nav a {
  font-family: "IBM Plex Mono", monospace; font-size: 0.78rem;
  color: var(--muted); text-decoration: none; margin-left: 20px;
  text-transform: uppercase; letter-spacing: 0.06em;
}
header.site nav a:hover { color: var(--ink); }

/* ---------- hero ---------- */
.hero { padding: 64px 0 56px; display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
.hero h1 {
  font-family: "Newsreader", serif; font-weight: 500;
  font-size: clamp(2.1rem, 4.4vw, 3.3rem);
  line-height: 1.08; letter-spacing: -0.015em; text-wrap: balance;
}
.hero h1 em { font-style: italic; color: var(--blue); }
.hero .lede { margin-top: 18px; color: var(--muted); max-width: 46ch; }
.hero .meta {
  margin-top: 26px; font-family: "IBM Plex Mono", monospace;
  font-size: 0.76rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em;
}

/* ---------- the letter (quiz card) ---------- */
.letter {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: 0 14px 34px rgba(34, 38, 59, 0.10);
  overflow: hidden;
}
.letter .airmail-edge { height: 7px; }
.letter-head {
  padding: 16px 26px 12px; border-bottom: 1px dashed var(--line);
  font-family: "IBM Plex Mono", monospace; font-size: 0.78rem; color: var(--muted);
}
.letter-head div { display: flex; gap: 8px; }
.letter-head .k { color: var(--red); min-width: 62px; }
.letter-body { padding: 26px; }

.q-count {
  font-family: "IBM Plex Mono", monospace; font-size: 0.74rem; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 10px;
}
.q-text {
  font-family: "Newsreader", serif; font-size: 1.35rem; font-weight: 500;
  line-height: 1.25; margin-bottom: 18px;
}
.q-options { display: grid; gap: 10px; }
.q-options button {
  text-align: left; font: inherit; font-size: 0.97rem;
  padding: 13px 16px; background: var(--paper);
  border: 1.5px solid var(--line); border-radius: 8px;
  cursor: pointer; color: var(--ink); transition: border-color 120ms, background 120ms;
}
.q-options button:hover { border-color: var(--blue); background: #f5f7fc; }
.q-back {
  margin-top: 16px; background: none; border: none; cursor: pointer;
  font-family: "IBM Plex Mono", monospace; font-size: 0.76rem; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.06em; padding: 0;
}
.q-back:hover { color: var(--ink); }

/* result */
.result-badge {
  display: inline-block; font-family: "IBM Plex Mono", monospace; font-size: 0.72rem;
  color: var(--paper); background: var(--red); border-radius: 4px;
  padding: 3px 9px; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 12px;
}
.result-name {
  font-family: "Newsreader", serif; font-size: 2rem; font-weight: 500; line-height: 1.1;
}
.result-why { margin: 14px 0 6px; }
.result-why li { margin: 7px 0 7px 18px; }
.result-alt { margin-top: 14px; font-size: 0.92rem; color: var(--muted); }
.cta {
  display: inline-block; margin-top: 20px; padding: 13px 24px;
  background: var(--blue); color: var(--paper); text-decoration: none;
  border-radius: 8px; font-weight: 600; font-size: 1rem;
}
.cta:hover { background: #223f87; }
.cta.secondary { background: transparent; color: var(--blue); border: 1.5px solid var(--blue); }
.restart { display: block; margin-top: 14px; }

/* ---------- sections ---------- */
section { padding: 56px 0; }
.section-label {
  font-family: "IBM Plex Mono", monospace; font-size: 0.76rem; color: var(--red);
  text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 10px;
}
h2 {
  font-family: "Newsreader", serif; font-weight: 500; font-size: 1.9rem;
  letter-spacing: -0.01em; margin-bottom: 22px; text-wrap: balance;
}
h3 { font-family: "Newsreader", serif; font-weight: 600; font-size: 1.2rem; margin: 26px 0 8px; }

/* comparison table */
.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); }
table { border-collapse: collapse; width: 100%; min-width: 720px; font-size: 0.93rem; }
th, td { padding: 13px 16px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
thead th {
  font-family: "IBM Plex Mono", monospace; font-size: 0.74rem; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--muted); background: #f7f8f5;
}
tbody tr:last-child td { border-bottom: none; }
td.yes { color: #1a7a3c; }
td.no { color: var(--red); }

/* prose pages */
.prose { max-width: 720px; }
.prose p { margin: 14px 0; }
.prose .verdict {
  border-left: 4px solid var(--red); background: var(--paper);
  padding: 16px 20px; border-radius: 0 8px 8px 0; margin: 22px 0;
}

/* footer */
footer.site {
  border-top: 1px solid var(--line); margin-top: 40px; padding: 28px 0 40px;
  font-size: 0.85rem; color: var(--muted);
}
footer.site p { margin: 6px 0; }

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; gap: 36px; padding: 40px 0 40px; }
  section { padding: 40px 0; }
}

/* Byline — freshness + authorship signal on guide pages */
.byline {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin-top: 10px;
}
.byline a { color: var(--muted); }
