/* ============================================================
   THE SEALED VERDICT — Case Desk funnel
   Design system: vintage investigative archive.
   Mobile-first (traffic arrives via the book's QR, on phones).
   ============================================================ */

:root {
  --paper:        #F4EDDC;  /* cream paper            */
  --paper-deep:   #ECE3CC;  /* slightly darker cream  */
  --ink:          #1A1A1A;  /* near-black text        */
  --ink-soft:     #4A453B;  /* muted ink for captions */
  --red:          #7A1F1F;  /* oxidised red accent    */
  --red-deep:     #5E1717;  /* pressed / hover red    */
  --postit:       #F2D75C;  /* post-it yellow accent  */
  --rule:         #1A1A1A;  /* hairline rule colour   */

  --maxw: 40rem;

  --font-display: "Playfair Display", Georgia, "Times New Roman", serif;
  --font-label:   "Special Elite", "Courier New", monospace;
  --font-body:    "Crimson Pro", Georgia, serif;
}

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

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

body {
  margin: 0;
  background-color: var(--paper);
  /* very subtle paper grain — sober, no heavy texture */
  background-image:
    repeating-linear-gradient(0deg,
      rgba(26,26,26,0.012) 0px,
      rgba(26,26,26,0.012) 1px,
      transparent 1px,
      transparent 3px);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.125rem;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

/* ---------- layout shell ---------- */
.page {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 1.5rem 1.25rem 3rem;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main { flex: 1 0 auto; }

/* ---------- masthead ---------- */
.masthead {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding-bottom: 1.25rem;
  border-bottom: 2px solid var(--rule);
  margin-bottom: 2rem;
}

.masthead .seal { margin-bottom: 0.75rem; }

.kicker {
  font-family: var(--font-label);
  font-size: 0.8rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--red);
  margin: 0;
}

/* ---------- wax seal (pure CSS/SVG, no images) ---------- */
.seal {
  width: 64px;
  height: 64px;
  display: inline-block;
}
.seal svg { display: block; width: 100%; height: 100%; }

/* ---------- typography ---------- */
h1 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.1rem, 9vw, 3rem);
  line-height: 1.05;
  letter-spacing: 0.01em;
  margin: 0 0 0.5rem;
}

h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.4rem, 5.5vw, 1.8rem);
  line-height: 1.15;
  margin: 2.5rem 0 0.75rem;
}

.subtitle {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  font-size: 1.15rem;
  color: var(--ink-soft);
  margin: 0 0 1.5rem;
}

p { margin: 0 0 1.1rem; }

a { color: var(--red); }

strong { font-weight: 700; }

/* small spaced label used inline */
.label {
  font-family: var(--font-label);
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--red);
  display: block;
  margin-bottom: 1rem;
}

/* thin decorative rule */
.rule {
  border: 0;
  border-top: 1px solid var(--rule);
  margin: 2rem 0;
  opacity: 0.5;
}

/* ---------- buttons ---------- */
.btn {
  display: block;
  width: 100%;
  text-align: center;
  font-family: var(--font-label);
  font-size: 0.95rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 0.95rem 1.25rem;
  border: 2px solid var(--ink);
  border-radius: 2px;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.12s ease, color 0.12s ease;
  -webkit-tap-highlight-color: transparent;
}

.btn + .btn { margin-top: 0.85rem; }

.btn--primary {
  background: var(--red);
  border-color: var(--red);
  color: var(--paper);
}
.btn--primary:hover,
.btn--primary:focus-visible { background: var(--red-deep); border-color: var(--red-deep); }

.btn--secondary {
  background: transparent;
  color: var(--ink);
}
.btn--secondary:hover,
.btn--secondary:focus-visible { background: var(--ink); color: var(--paper); }

.actions { margin: 2rem 0 0.5rem; }

/* ---------- forms ---------- */
.field { margin-bottom: 1.25rem; }

.field label {
  font-family: var(--font-label);
  font-size: 0.74rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
  display: block;
  margin-bottom: 0.4rem;
}

.field input {
  width: 100%;
  font-family: var(--font-body);
  font-size: 1.1rem;
  color: var(--ink);
  background: var(--paper-deep);
  border: 1px solid var(--ink);
  border-radius: 2px;
  padding: 0.7rem 0.8rem;
}
.field input:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 1px;
}

/* hide number spinners — keeps the typewriter feel */
.field input[type="number"]::-webkit-outer-spin-button,
.field input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.field input[type="number"] { -moz-appearance: textfield; }

/* ---------- message area (verdict checker) ---------- */
.desk-message {
  font-family: var(--font-label);
  font-size: 1rem;
  line-height: 1.5;
  margin-top: 1.5rem;
  min-height: 1.5rem;
  padding: 0;
}
.desk-message:empty { margin-top: 0; }
.desk-message.is-closed   { color: var(--red); }
.desk-message.is-disagree { color: var(--ink); }
.desk-message a { font-family: var(--font-label); }

/* ---------- discreet link ---------- */
.discreet {
  font-family: var(--font-body);
  font-style: italic;
  font-size: 1rem;
  margin-top: 2.5rem;
  color: var(--ink-soft);
}
.discreet a { color: var(--red); }

/* ---------- microcopy under forms ---------- */
.microcopy {
  font-family: var(--font-label);
  font-size: 0.74rem;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
  margin-top: 0.9rem;
}

/* ---------- bullet list (solved page) ---------- */
.casefile-list {
  list-style: none;
  padding: 0;
  margin: 1.25rem 0;
}
.casefile-list li {
  position: relative;
  padding-left: 1.4rem;
  margin-bottom: 1rem;
}
.casefile-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 7px;
  height: 7px;
  background: var(--red);
  transform: rotate(45deg);
}

/* ---------- clues / accordion ---------- */
.qa { border-top: 1px solid rgba(26,26,26,0.25); }
.qa:last-of-type { border-bottom: 1px solid rgba(26,26,26,0.25); }

.qa details { margin: 0; }

.qa summary {
  list-style: none;
  cursor: pointer;
  padding: 1rem 2rem 1rem 0;
  position: relative;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  line-height: 1.3;
}
.qa summary::-webkit-details-marker { display: none; }
.qa summary::after {
  content: "+";
  position: absolute;
  right: 0.25rem;
  top: 0.9rem;
  font-family: var(--font-label);
  font-size: 1.3rem;
  color: var(--red);
  line-height: 1;
}
.qa details[open] summary::after { content: "\2013"; } /* en-dash */
.qa summary:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }

.qa .answer {
  padding: 0 0 1.1rem;
  color: var(--ink-soft);
}

/* ---------- opt-in block ---------- */
.optin {
  margin-top: 3rem;
  padding: 1.75rem 1.5rem;
  border: 2px solid var(--ink);
  border-radius: 2px;
  background: var(--paper-deep);
}
.optin h2 { margin-top: 0; }

/* ---------- footer ---------- */
.colophon {
  flex-shrink: 0;
  margin-top: 3rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--rule);
  font-family: var(--font-label);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
  text-align: center;
}

/* ---------- helpers ---------- */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}

.lede { font-size: 1.2rem; }

@media (min-width: 30rem) {
  .page { padding: 2.5rem 2rem 3.5rem; }
  .actions--row { display: flex; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
