/* Deslop My Book — the audience is novelists, so the page reads like a
   book page: generous measure, real serif for prose, sans only for UI
   chrome. Theme-aware because plenty of writers work at night. */

:root {
  --ink: #1a1714;
  --ink-soft: #5c554d;
  --paper: #faf8f5;
  --paper-raised: #ffffff;
  --rule: #e2dcd3;
  --accent: #8a2b1f;
  --accent-soft: #f2e6e3;
  --ok: #2f6b4f;
  --warn: #9a6a1a;
  --bad: #a33325;
  --measure: 34rem;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Helvetica, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #ece7e0;
    --ink-soft: #a49b90;
    --paper: #171513;
    --paper-raised: #201d1a;
    --rule: #332e29;
    --accent: #d9705f;
    --accent-soft: #2c1f1c;
    --ok: #6cc294;
    --warn: #d9a441;
    --bad: #e0705f;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.06rem;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
}

/* ── Chrome ─────────────────────────────────────────────────────────── */

.site-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding-block: 1.4rem;
  border-bottom: 1px solid var(--rule);
}

.wordmark {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--serif);
  font-size: 1.3rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-decoration: none;
  color: var(--ink);
}
/* The badge carries its own white field — the script lettering is dark
   green and needs it, so it is not made transparent to match the page. */
.wordmark img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  flex-shrink: 0;
}
.wordmark-text span { color: var(--accent); }

.site-header nav {
  display: flex;
  gap: 1.4rem;
  font-family: var(--sans);
  font-size: 0.88rem;
}
.site-header nav a { color: var(--ink-soft); text-decoration: none; }
.site-header nav a:hover { color: var(--accent); }

/* The text column stays at book measure for readability, but the column
   itself is centred — left-aligned against a 1600px viewport reads as a
   broken layout rather than a deliberate one.
   --gutter aligns the header and footer to the same column while letting
   their rules still span the full width. */
:root { --column: 52rem; --gutter: clamp(1rem, 5vw, 3rem); }

main {
  max-width: var(--column);
  margin: 0 auto;
  padding: 0 var(--gutter) 4rem;
}

.site-header,
.site-footer {
  padding-inline: max(var(--gutter), calc((100vw - var(--column)) / 2 + var(--gutter)));
}

.site-footer {
  border-top: 1px solid var(--rule);
  padding-block: 2rem 3rem;
  font-family: var(--sans);
  font-size: 0.85rem;
  color: var(--ink-soft);
}
.site-footer a { color: inherit; }
.site-footer .fine { max-width: var(--measure); margin-top: 0.4rem; }

/* ── Type ───────────────────────────────────────────────────────────── */

h1 {
  font-size: clamp(2rem, 5.5vw, 3.1rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 2.5rem 0 1rem;
  max-width: 18ch;
}
h2 {
  font-size: 1.5rem;
  letter-spacing: -0.01em;
  margin: 3rem 0 0.8rem;
}
h3 { font-size: 1.1rem; margin: 1.6rem 0 0.4rem; }

.lede {
  font-size: 1.22rem;
  color: var(--ink-soft);
  max-width: var(--measure);
  margin-bottom: 2rem;
}
p { max-width: var(--measure); }

.hero { padding-top: 1rem; }

/* ── Form ───────────────────────────────────────────────────────────── */

.card {
  background: var(--paper-raised);
  border: 1px solid var(--rule);
  border-radius: 10px;
  padding: clamp(1.2rem, 4vw, 2rem);
  max-width: 40rem;
  margin: 2rem 0;
}

.field { margin-bottom: 1.2rem; }
.field label {
  display: block;
  font-family: var(--sans);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 0.4rem;
}
.field .hint,
.card > .hint,
.link-card .hint {
  font-family: var(--sans);
  font-size: 0.82rem;
  color: var(--ink-soft);
  margin-top: 0.35rem;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 400;
}

input[type="text"], input[type="email"], input[type="file"], textarea, select {
  width: 100%;
  padding: 0.65rem 0.7rem;
  font-family: var(--sans);
  font-size: 0.95rem;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 6px;
}
input[type="file"] { padding: 0.5rem; }
input:focus, select:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.btn {
  display: inline-block;
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.75rem 1.4rem;
  border: 0;
  border-radius: 6px;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  text-decoration: none;
}
.btn:hover { filter: brightness(1.08); }
.btn[disabled] { opacity: 0.5; cursor: progress; }
.btn-lg { font-size: 1.05rem; padding: 0.9rem 1.8rem; }

.alert {
  border-left: 3px solid var(--bad);
  background: var(--accent-soft);
  padding: 0.9rem 1rem;
  border-radius: 0 6px 6px 0;
  font-family: var(--sans);
  font-size: 0.92rem;
  margin-bottom: 1.4rem;
  max-width: 40rem;
}

/* ── Report ─────────────────────────────────────────────────────────── */

/* A wayfinding cue on the words line: on a phone the verdict + buy button fill
   the first screen, so this accent line up top signals the evidence is below. */
.scroll-cue {
  display: block;
  margin-top: 0.4rem;
  font-family: var(--sans);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent);
}

.verdict {
  display: flex;
  align-items: baseline;
  gap: 0.8rem;
  flex-wrap: wrap;
  margin: 0.5rem 0 0.2rem;
}
.verdict .num {
  font-size: clamp(2.6rem, 9vw, 4rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1;
}
.verdict .unit {
  font-family: var(--sans);
  font-size: 0.9rem;
  color: var(--ink-soft);
  max-width: 16rem;
}

.level {
  display: inline-block;
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
}
/* Bands are the Slop Index's, not the seed-count's — measured against the
   shipped envelopes, where below 12 covers 71-95% of published work and no
   human chunk in any genre exceeded 60. */
.level-human    { background: color-mix(in srgb, var(--ok) 18%, transparent);   color: var(--ok); }
.level-low      { background: color-mix(in srgb, var(--warn) 16%, transparent); color: var(--warn); }
.level-moderate { background: color-mix(in srgb, var(--warn) 24%, transparent); color: var(--warn); }
.level-high     { background: color-mix(in srgb, var(--bad) 18%, transparent);  color: var(--bad); }

.offenders {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--sans);
  font-size: 0.9rem;
  margin: 1rem 0;
}
.offenders th {
  text-align: left;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
  border-bottom: 1px solid var(--rule);
  padding: 0 0.6rem 0.5rem 0;
}
.offenders td {
  padding: 0.6rem 0.6rem 0.6rem 0;
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
}
.offenders td:first-child { font-family: var(--serif); }
.offenders .n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.offenders .over { color: var(--bad); font-weight: 600; }

.table-scroll { overflow-x: auto; }

/* Landing pricing table — a plain two-column "word band → price" list. */
.pricing {
  border-collapse: collapse;
  margin: 1rem 0 0.4rem;
  width: 100%;
  max-width: 32rem;
  font-family: var(--sans);
}
.pricing td {
  padding: 0.6rem 0.4rem;
  border-bottom: 1px solid var(--rule);
  font-size: 1rem;
}
.pricing td.price {
  text-align: right;
  font-weight: 700;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.pricing tr:last-child td { border-bottom: 0; color: var(--ink-soft); }
.pricing td.price a { color: var(--accent); }
/* The pack ladder under it: same table, plus a muted per-clean column. Its last
   row is a real price, not the soft "contact us" line, so it keeps full ink. */
.pricing-packs { margin-top: 0.6rem; }
.pricing-packs tr:last-child td { color: inherit; }
.pricing-packs td.each,
.pricing-packs tr:last-child td.each {
  text-align: right;
  color: var(--ink-soft);
  font-size: 0.92rem;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.steps {
  list-style: none;
  counter-reset: step;
  padding: 0;
  max-width: var(--measure);
}
.steps li {
  counter-increment: step;
  position: relative;
  padding-left: 2.4rem;
  margin-bottom: 1rem;
}
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0.1rem;
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-family: var(--sans);
  font-size: 0.8rem;
  font-weight: 700;
  display: grid;
  place-items: center;
}

.muted { color: var(--ink-soft); font-size: 0.92rem; }
.center-cta { margin: 2rem 0; }

/* ── The waiting page: the teaser leads, then a calm "still reading" line ── */
/* Results-first (docs/results_first_flow_plan.md): the instant findings sit
   right under the headline — above the fold — so the payoff, not a progress
   bar, is the first thing a new visitor sees. The old samples-read bar is
   gone (a "0 of 5" that sat for minutes read as stalled). */

.instant-reads { margin: 0 0 2rem; }
.instant-reads h2 { margin-top: 0; margin-bottom: 0.5rem; }
/* The "two of three reads are already done" line — in thematic orange, so the
   strongest tease (real findings, whole manuscript, no wait) draws the eye. */
.instant-reads .reads-done {
  color: var(--accent);
  font-size: 1.02rem;
  margin: -0.15rem 0 0.9rem;
}

.still-reading { max-width: var(--measure); margin: 0 0 2rem; }
.still-reading .lede { margin-bottom: 0; }

/* ── The waiting page: value prop + the optional email service ──────── */
/* Results-first (docs/results_first_flow_plan.md): the "what to expect"
   block sells the full report, and the email field below it is a service,
   not a gate — styled deliberately quiet so nothing reads as required. */

.expect { margin: 0 0 2rem; }
.expect h2 { margin-bottom: 0.6rem; }
.expect-list {
  margin: 0;
  padding-left: 1.15rem;
  color: var(--ink-soft);
  font-size: 0.97rem;
  max-width: var(--measure);
}
.expect-list li { margin: 0.35rem 0; }

.email-service { margin: 0 0 2rem; }
.email-form {
  background: var(--paper-raised);
  border: 1px solid var(--rule);
  border-radius: 10px;
  padding: 1.1rem 1.3rem;
  max-width: 30rem;
}
.email-form .field { margin-bottom: 0.7rem; }
.email-form .btn { width: auto; }
.email-form .hint { margin-top: 0.55rem; }
.email-confirm {
  font-family: var(--sans);
  font-size: 0.95rem;
  color: var(--ink-soft);
  max-width: var(--measure);
  margin: 0;
}

/* ── Slop Index (loaded after the main report) ──────────────────────── */

.slop-slot { min-height: 4rem; }

.loading {
  font-family: var(--sans);
  font-size: 0.9rem;
}
.loading::after {
  content: "";
  display: inline-block;
  width: 0.6em;
  animation: dots 1.2s steps(4, end) infinite;
}
@keyframes dots { to { content: "…"; } }

@media (prefers-reduced-motion: reduce) {
  .loading::after { animation: none; content: "…"; }
}

.standout {
  border-left: 3px solid var(--accent);
  padding: 0.8rem 0 0.8rem 1rem;
  margin: 1.2rem 0;
  font-size: 1.08rem;
  max-width: var(--measure);
}

/* ── Admin ──────────────────────────────────────────────────────────── */

.admin-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }

.stat-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}
.stat {
  border: 1px solid var(--rule);
  border-radius: 8px;
  padding: 1rem;
  background: var(--paper-raised);
}
.stat-num {
  display: block;
  font-size: 1.9rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.stat-label {
  display: block;
  font-family: var(--sans);
  font-size: 0.78rem;
  color: var(--ink-soft);
  margin-top: 0.3rem;
}

/* Quota is the binding constraint, so it reads as a fuel gauge. */
.meter {
  height: 0.6rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--rule) 70%, transparent);
  overflow: hidden;
  max-width: var(--measure);
}
.meter-fill { height: 100%; background: var(--ok); transition: width .3s; }
.meter-hot  { background: var(--warn); }

/* The admin tables are denser than the reading pages, so the admin views get a
   wider content column (~100px) than the book-measure default. */
body.admin-page { --column: calc(52rem + 100px); }

/* Recent list collapses to the first 10 rows; the toggle reveals the rest. */
.recent-table tr.extra { display: none; }
.recent-table.show-all tr.extra { display: table-row; }
/* Rows that need a human are pinned to the top of Recent and washed in a pale
   yellow so a stuck order is impossible to miss. A literal warm yellow rather
   than --warn (a brown-gold that washes out to beige): mixed with transparent
   it reads as pastel yellow over the light paper and a soft amber over dark,
   text staying legible in both. They carry .attention-row, never .extra, so
   "Show all" can't hide them. */
.recent-table tr.attention-row > td { background: color-mix(in srgb, #f2c94c 18%, transparent); }
.recent-toggle { margin-top: 0.6rem; }

.admin-table { font-size: 0.84rem; }
.admin-table code { font-size: 0.8rem; color: var(--ink-soft); }
.admin-table .err { font-size: 0.78rem; }

.pill {
  display: inline-block;
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  white-space: nowrap;
}
.pill-done     { background: color-mix(in srgb, var(--ok) 18%, transparent);   color: var(--ok); }
.pill-running  { background: color-mix(in srgb, var(--warn) 20%, transparent); color: var(--warn); }
.pill-queued   { background: color-mix(in srgb, var(--rule) 60%, transparent); color: var(--ink-soft); }
.pill-failed,
.pill-refunded { background: color-mix(in srgb, var(--bad) 18%, transparent);  color: var(--bad); }
.pill-attention { background: color-mix(in srgb, var(--warn) 26%, transparent); color: var(--warn); }

.ok-tick { color: var(--ok); font-family: var(--sans); font-size: 0.8rem; }

.attention { max-width: var(--measure); font-family: var(--sans); font-size: 0.9rem; }
.attention li { margin-bottom: 0.5rem; }

/* Code entry sits under the buy button, deliberately understated — most
   customers don't have one and it shouldn't read as a missing discount. */
.coupon-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 0.9rem;
  font-family: var(--sans);
  font-size: 0.85rem;
  color: var(--ink-soft);
}
.coupon-row label { white-space: nowrap; }
.coupon-row input {
  width: 12rem;
  padding: 0.4rem 0.55rem;
  font-size: 0.85rem;
  text-transform: uppercase;
}
/* A free/discount code routes around Stripe, so the email must be collected
   here — but ONLY then. The field and its hint don't exist until a code is
   entered: JS adds .has-code to reveal them, and the CTA stays locked until
   the address is valid. */
.coupon-row { flex-wrap: wrap; }
.coupon-row .email-required,
.coupon-row .email-hint { display: none; }
.coupon-row.has-code .email-required { display: inline-block; }
.coupon-row.has-code .email-hint { display: block; flex-basis: 100%; }
.coupon-row input.email-required {
  border: 2px solid #ff3b30;   /* bright red — this box is required */
  text-transform: none;        /* an email is not uppercase */
}
.email-hint {
  color: #fff;
  white-space: nowrap;
  font-size: 0.8rem;
}
.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.created-code {
  border-left: 3px solid var(--ok);
  background: color-mix(in srgb, var(--ok) 8%, transparent);
  padding: 0.9rem 1rem;
  border-radius: 0 6px 6px 0;
  margin-bottom: 1.4rem;
  max-width: 40rem;
}
.big-code {
  font-size: 1.3rem;
  letter-spacing: 0.06em;
  font-weight: 600;
  user-select: all;   /* one click selects the whole code to copy */
}

/* Compact action column: small chip-buttons — real button affordance (border,
   fill, hover state) but sized down, so the already-wide Recent table doesn't
   overflow the way full-size buttons did. Stacked one per line in the narrow
   last column. */
.admin-table .admin-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.3rem;
}

/* Campaign subtotal row on the Codes page: a bucket header sitting inside the
   table, so twenty subreddit codes read as one campaign with its own
   uses/orders/revenue line above the codes that add up to it. */
.campaign-row td {
  background: var(--accent-soft);
  font-weight: 600;
  padding: 0.55rem 0.6rem 0.55rem 0;
  border-bottom: 1px solid var(--rule);
}
.campaign-row .muted { font-weight: 400; }
.campaign-row .n {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.admin-table .admin-actions form { display: block; margin: 0; }
.admin-table .admin-actions .actbtn {
  display: inline-block;
  font: 600 0.75rem var(--sans);
  padding: 0.24rem 0.6rem;
  border: 1px solid var(--rule);
  border-radius: 6px;
  background: var(--paper-raised);
  color: var(--ink-soft);
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
}
.admin-table .admin-actions .actbtn:hover { border-color: var(--accent); color: var(--accent); }
.admin-table .admin-actions .actbtn.danger { color: var(--bad); }
.admin-table .admin-actions .actbtn.danger:hover { border-color: var(--bad); color: var(--bad); }
.linkbtn {
  background: none;
  border: 0;
  padding: 0 0.35rem 0 0;
  font-family: var(--sans);
  font-size: 0.8rem;
  color: var(--accent);
  cursor: pointer;
  text-decoration: underline;
}
.linkbtn.danger { color: var(--bad); }

/* Standalone maintenance actions (outside the Recent table): the "Clear purged"
   button and the danger-zone reset. Mirrors the in-table .actbtn look but as a
   block-level form. */
.maint-form { margin: 0.9rem 0 0; }
.maint-form .actbtn {
  display: inline-block;
  font: 600 0.75rem var(--sans);
  padding: 0.32rem 0.7rem;
  border: 1px solid var(--rule);
  border-radius: 6px;
  background: var(--paper-raised);
  color: var(--ink-soft);
  cursor: pointer;
}
.maint-form .actbtn:hover { border-color: var(--accent); color: var(--accent); }
.maint-form .actbtn.danger { color: var(--bad); }
.maint-form .actbtn.danger:hover { border-color: var(--bad); color: var(--bad); }

.danger-zone {
  margin-top: 2.75rem;
  padding-top: 1rem;
  border-top: 1px solid var(--rule);
}
.danger-zone h2 { color: var(--bad); }
.danger-zone .maint-form { display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; }
/* Scoped under .danger-zone to outrank the global input[type="text"] rule,
   which is width:100% and would otherwise stretch the confirm box. */
.danger-zone .reset-input {
  flex: 0 0 auto;
  width: 9rem;
  font: 0.8rem var(--sans);
  padding: 0.4rem 0.6rem;
  border: 1px solid var(--rule);
  border-radius: 6px;
  background: var(--paper-raised);
  color: var(--ink);
}
.danger-zone .reset-input:focus { outline: none; border-color: var(--bad); }
.danger-zone .reset-keep { width: 12.5rem; }
.reset-error { color: var(--bad); font-size: 0.85rem; margin: 0.25rem 0 0; }

/* Admin preview banner — shown on the real landing page while the product
   is paused for V2 and only the operator can see it (see public.landing). */
.admin-banner {
  max-width: var(--measure, 42rem);
  margin: 1.25rem auto 0;
  padding: 0.7rem 1rem;
  border: 1px solid var(--rule);
  border-left: 3px solid var(--warn);
  border-radius: 6px;
  background: var(--paper-raised);
  color: var(--ink-soft);
  font-family: var(--sans);
  font-size: 0.9rem;
  line-height: 1.4;
}
.admin-banner strong { color: var(--ink); }
.admin-banner .admin-banner-links { white-space: nowrap; }
.admin-banner a { color: var(--accent); }

/* ── Free-assessment report (tiers) ─────────────────────────────────── */
.tiers {
  display: grid;
  gap: 1rem;
  margin-top: 1.2rem;
}
@media (min-width: 720px) {
  .tiers { grid-template-columns: repeat(3, 1fr); }
  /* Tiers are collapsed to a single outcome — one full-width card, not 1/3. */
  .tiers-single { grid-template-columns: 1fr; }
}
.tier {
  background: var(--paper-raised);
  border: 1px solid var(--rule);
  border-radius: 10px;
  padding: 1.1rem 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
/* W11: the accent belongs to the CTA button ALONE on the results page —
   the callout and the stat read in neutral ink, so the one coral thing on
   the page is the thing we want clicked. Global chrome is untouched. */
.tier-lead { border-color: var(--rule); box-shadow: none; }
.tier h3 {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.tier-range { margin: 0; font-size: 1.02rem; }
.tier-range strong { color: var(--ink); font-size: 1.15rem; }
.tier-blurb { margin: 0; color: var(--ink-soft); }
.tier-counts {
  margin: 0;
  padding-top: 0.5rem;
  border-top: 1px solid var(--rule);
  font-size: 0.92rem;
  color: var(--ink-soft);
}
.soon-card { margin-top: 2.2rem; }
.report-head h1 { margin-bottom: 0.4rem; }

/* ── Verdict + early ask (W1) ───────────────────────────────────────── */
.verdict-block {
  margin: 0.6rem 0 1.6rem;
  max-width: calc(var(--measure) + 2.8rem);
  box-sizing: border-box;
  padding: 1.05rem 1.3rem;
  border: 1.5px solid var(--ink);   /* loud callout: white in dark, ink in light */
  border-radius: 10px;
}
.verdict-block p { max-width: none; }
.verdict-block > :last-child { margin-bottom: 0; }
.verdict-line {
  font-size: 1.3rem;
  line-height: 1.35;
  margin-bottom: 0.3rem;
}
.verdict-stakes { margin-bottom: 0.9rem; }
.verdict-stakes strong { color: var(--ink); }   /* bolded clause reads full-strength */

.early-cta { margin: 0 0 2rem; }
.early-cta .hint { margin-top: 0.55rem; }
.early-cta s { opacity: 0.65; font-weight: 400; }

/* ── Pattern-table exemplar quotes (W2) ─────────────────────────────── */
.example-quote {
  display: block;
  margin-top: 0.3rem;
  font-family: var(--serif);
  font-style: italic;
  color: var(--ink-soft);
  font-size: 0.92rem;
  max-width: 36rem;
}

/* ── Tracked-change preview (W8) — an HTML/CSS mock of Word ─────────── */
.tracked-wrap { margin: 2.2rem 0 0.4rem; }
.tracked-preview {
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(0, 1.6fr) minmax(13rem, 1fr);
  align-items: start;
  margin-top: 0.8rem;
}
@media (max-width: 720px) {
  .tracked-preview { grid-template-columns: 1fr; }
}
.tp-doc {
  background: var(--paper-raised);
  border: 1px solid var(--rule);
  border-radius: 10px;
  padding: 1.2rem 1.4rem;
}
.tp-sentence { margin: 0; font-size: 1.05rem; }
.tp-cut {
  text-decoration: line-through;
  text-decoration-thickness: 1.5px;
  text-decoration-color: var(--bad);
}
.tp-comment {
  background: color-mix(in srgb, var(--warn) 8%, var(--paper-raised));
  border: 1px solid color-mix(in srgb, var(--warn) 35%, var(--rule));
  border-radius: 10px;
  padding: 0.8rem 1rem;
  font-family: var(--sans);
  font-size: 0.88rem;
}
.tp-comment-head {
  margin: 0 0 0.3rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.tp-comment-body { margin: 0; line-height: 1.5; }

/* ── Order box (W12): reassurance rows, collapsed code field ────────── */
.order-price { font-size: 1.15rem; margin: 0.2rem 0 0.6rem; }
.order-price strong { font-size: 1.25rem; }
.order-notes {
  margin: 0.4rem 0 1.2rem;
  padding-left: 1.15rem;
  color: var(--ink-soft);
  font-size: 0.92rem;
  max-width: 40rem;
}
.order-notes li { margin: 0.2rem 0; }
.coupon-toggle { margin-bottom: 1.2rem; font-family: var(--sans); }
.coupon-toggle summary {
  cursor: pointer;
  font-size: 0.88rem;
  color: var(--ink-soft);
  text-decoration: underline;
}
.coupon-toggle[open] summary { margin-bottom: 0.6rem; }
/* The 20%-for-updates opt-in beside the order box. */
.order-card .optin-label { margin: 0 0 0.9rem; }
.order-card .optin-email { margin: -0.3rem 0 1rem; }
.order-card .optin-email .hint { margin-top: 0.45rem; }
.order-card .optin-known-email { margin: -0.5rem 0 1rem; }
.pack-in-use { margin: -0.2rem 0 1rem; }
.pack-offer { margin-top: 1.25rem; text-align: center; }
.pack-offer > .muted { margin-bottom: 0.65rem; font-size: 0.86rem; }
.pack-buttons { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem; }
.pack-button { background: transparent; border: 1px solid var(--accent); color: var(--accent); }
.pack-button:hover { background: var(--accent); color: #fff; }
.pack-offer .hint { margin: 0.7rem auto 0; max-width: 38rem; text-align: left; }

/* ── Demoted caveat (W7): the honesty stays, as a footnote ──────────── */
.caveat-note {
  margin: 0.8rem 0 0;
  font-family: var(--sans);
  font-size: 0.85rem;
}
.caveat-note summary {
  cursor: pointer;
  color: var(--ink-soft);
  text-decoration: underline;
}
.caveat-note .hint { margin: 0.5rem 0 0; }

/* Repeated-phrase preview on the free assessment. */
.phrase-list {
  margin: 0.3rem 0 0.4rem;
  padding-left: 1.15rem;
  color: var(--ink-soft);
  font-size: 0.95rem;
}
.phrase-list li { margin: 0.15rem 0; }

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

/* ── Campaign welcome overlay (conversion interstitial) ──────────────── */
/* A visitor arriving on a live ?coupon= link gets the discount announced
   up front. Dismissable with no JavaScript: the checkbox starts checked
   (overlay showing) and either label — the × or the CTA — unchecks it,
   which collapses the overlay via the :checked ~ sibling rule. */
.offer-toggle { position: absolute; left: -9999px; }
.offer-overlay { display: none; }
.offer-toggle:checked ~ .offer-overlay {
  display: flex; position: fixed; inset: 0; z-index: 1000;
  align-items: center; justify-content: center; padding: 1rem;
  background: rgba(0, 0, 0, .55);
}
/* Card styling to match .card (same tokens: raised paper, rule border,
   10px radius) rather than inventing new ones. */
.offer-modal {
  position: relative;
  max-width: 30rem;
  width: 100%;
  background: var(--paper-raised);
  border: 1px solid var(--rule);
  border-radius: 10px;
  padding: clamp(1.2rem, 4vw, 2rem);
  text-align: center;
}
.offer-modal h2 { margin: 0 0 0.6rem; }
.offer-close {
  position: absolute; top: .5rem; right: .75rem;
  font-family: var(--sans); font-size: 1.3rem; line-height: 1;
  color: var(--ink-soft); cursor: pointer;
}
.offer-close:hover { color: var(--ink); }
.offer-lede { font-size: 1.15rem; margin: 0 0 0.4rem; }
.offer-note {
  font-family: var(--sans); font-size: 0.88rem;
  color: var(--ink-soft); margin: 0 0 1.3rem;
}

/* ── "Send me the link" (the phone path) ─────────────────────────────── */
/* Ad traffic is 100% phone and the manuscript usually lives on a computer,
   so below the site's 720px breakpoint the landing leads with a card that
   emails the visitor a link instead of losing them. The card (and the other
   phone-only bits) are in the DOM at every width but display:none above it —
   no JavaScript, no user-agent sniffing; tablets and desktops keep today's
   layout exactly. */
.phone-only { display: none; }

.link-card {
  background: var(--paper-raised);
  border: 1px solid var(--rule);
  border-radius: 10px;
  padding: clamp(1.2rem, 4vw, 2rem);
  max-width: 40rem;
  margin: 1.4rem 0;
}
.link-card h2 { margin: 0 0 0.5rem; }
.link-card .lede { font-size: 1.05rem; margin-bottom: 1rem; }
.link-card .offer-line { font-size: 1.02rem; margin: 0 0 1rem; }
.link-card .btn { width: 100%; }
.optin-label {
  display: flex;
  gap: 0.55rem;
  align-items: baseline;
  margin: 0.9rem 0 0.4rem;
  font-family: var(--sans);
  font-size: 0.9rem;
  color: var(--ink-soft);
  cursor: pointer;
}
.optin-label input {
  width: auto;
  flex: none;
  accent-color: var(--accent);
}
.link-arrival-note {
  font-family: var(--sans);
  font-size: 0.92rem;
  color: var(--ink-soft);
  margin: 0 0 0.6rem;
}

@media (max-width: 720px) {
  .phone-only { display: block; }

  /* The welcome overlay is a desktop first-touch surface: on a phone the
     card carries the same offer inline, and a modal stacked over the card
     fights the one action that matters. Same specificity as the :checked
     rule above, later in the file, so it wins below the breakpoint. */
  .offer-toggle:checked ~ .offer-overlay { display: none; }

  /* One-row header. The nav used to wrap below the wordmark, costing ~75px
     (15% of the first phone screen). Shrink the mark and the gaps instead
     of wrapping; 100% phone traffic pays this back on every visit. */
  .site-header {
    flex-wrap: nowrap;
    padding-block: 0.55rem;
    gap: 0.6rem;
  }
  .wordmark { font-size: 1.05rem; gap: 0.45rem; }
  .wordmark img { width: 32px; height: 32px; }
  .site-header nav { gap: 0.9rem; font-size: 0.84rem; }

  /* First-screen density: 100% of ad traffic is phone, and the card's
     SEND button must land on screen one with room for a real browser's
     toolbars (~650px of an 812px viewport). The hero and the card shed
     their print-like air on phones only; desktop keeps the generous type.
     LANDING PAGE ONLY (.landing-page, set by landing.html's body_class): the
     report page is read on a phone too, and its type was tuned by eye. */
  .landing-page h1 { font-size: 1.75rem; line-height: 1.15; margin: 1.1rem 0 0.5rem; }
  .landing-page .lede { font-size: 1.02rem; line-height: 1.5; margin-bottom: 1rem; }
  .landing-page .hero { padding-top: 0.3rem; }
  /* The waiting page (.waiting-page) rides the same phone traffic straight off
     the landing card, and its whole job is to put the first FINDING on screen
     one — so it sheds the same print-like air as the landing. The finished
     report the page turns into keeps its own tuned type (it is not
     .waiting-page). */
  .waiting-page h1 { font-size: 1.75rem; line-height: 1.15; margin: 1.1rem 0 0.5rem; }
  .waiting-page .lede { font-size: 1.02rem; line-height: 1.5; margin-bottom: 0.9rem; }
  .waiting-page .hero { padding-top: 0.3rem; }
  .waiting-page .instant-reads h2 { font-size: 1.3rem; }
  .link-card { padding: 1.05rem 1rem 1.1rem; margin: 0.9rem 0 0.7rem; }
  .link-card h2 { font-size: 1.2rem; margin-bottom: 0.3rem; }
  .link-card .lede { font-size: 0.98rem; margin-bottom: 0.6rem; }
  .link-card .offer-line { font-size: 0.95rem; line-height: 1.45;
                           margin-bottom: 0.65rem; }
  .link-card .field { margin-bottom: 0.75rem; }
  .link-card .btn { font-size: 1rem; padding: 0.8rem 1.2rem; }

  /* The phone-only upload heading sits tight under the link card. */
  .phone-only#upload-h, h2.phone-only { margin: 1.2rem 0 0.3rem; }
}
