/* ============================================================
   Write My Novel — guidance-first site
   Paper-and-ink theme, matched to the Deslop My Book design
   system (same palette, same serif-for-prose / sans-for-chrome
   split, same book-page measure). Theme-aware for night writers.
   Used by: index.html, bible.html, beats.html.
   The guided builder (builder.html) keeps its own index.css.
   ============================================================ */

: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;
  --column: 52rem;
  --gutter: clamp(1rem, 5vw, 3rem);
  --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 {
  font-family: var(--serif);
  font-size: 1.3rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-decoration: none;
  color: var(--ink);
}
.wordmark span { color: var(--accent); }

.site-header nav {
  display: flex;
  gap: 1.4rem;
  flex-wrap: wrap;
  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); }
.site-header nav a.active { color: var(--accent); font-weight: 600; }

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: 22ch;
}
h2 {
  font-size: 1.5rem;
  letter-spacing: -0.01em;
  margin: 3rem 0 0.8rem;
}
h3 { font-size: 1.1rem; margin: 1.8rem 0 0.4rem; }

.lede {
  font-size: 1.22rem;
  color: var(--ink-soft);
  max-width: var(--measure);
  margin-bottom: 1.4rem;
}
p, ul, ol { max-width: var(--measure); }
li { margin-bottom: 0.4rem; }

.hero { padding-top: 1rem; }

.kicker {
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 2.6rem 0 0.2rem;
}
.kicker + h1, .kicker + h2 { margin-top: 0.2rem; }

/* ── Buttons ────────────────────────────────────────────────────────── */

.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-lg { font-size: 1.05rem; padding: 0.9rem 1.8rem; }

.btn-quiet {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--rule);
}
.btn-quiet:hover { border-color: var(--accent); filter: none; }

.btn-row {
  display: flex;
  gap: 0.7rem;
  flex-wrap: wrap;
  align-items: center;
  margin: 1rem 0 0.4rem;
}

/* ── Landing: paths ─────────────────────────────────────────────────── */

.paths {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.2rem;
  margin: 1.6rem 0 0.5rem;
}

.path-card {
  background: var(--paper-raised);
  border: 1px solid var(--rule);
  border-radius: 10px;
  padding: 1.5rem 1.5rem 1.3rem;
  display: flex;
  flex-direction: column;
}
.path-card h3 { margin: 0 0 0.4rem; font-size: 1.2rem; }
.path-card p {
  font-size: 0.97rem;
  color: var(--ink-soft);
  margin: 0 0 1.1rem;
  flex-grow: 1;
}
.path-card .btn, .path-card .btn-quiet { align-self: flex-start; }
.path-card .also {
  font-family: var(--sans);
  font-size: 0.82rem;
  color: var(--ink-soft);
  margin-top: 0.9rem;
}
.path-card .also a { color: var(--accent); }

/* ── Promise strip (landing: the three-line summary) ────────────────── */
.promise-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin: 1.6rem 0 2.4rem;
}
.promise-point {
  background: var(--paper-raised);
  border: 1px solid var(--rule);
  border-top: 3px solid var(--accent);
  border-radius: 8px;
  padding: 1.05rem 1.2rem;
  font-family: var(--sans);
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--ink-soft);
}
.promise-point strong {
  display: block;
  font-size: 1.02rem;
  color: var(--ink);
  margin-bottom: 0.25rem;
}

/* ── Per-section pointer to the Submit page ─────────────────────────── */
.submit-hint {
  font-family: var(--sans);
  font-size: 0.92rem;
  margin: 1.1rem 0 0.2rem;
}
.submit-hint a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}
.submit-hint a:hover { text-decoration: underline; }

/* ── Steps (numbered) ───────────────────────────────────────────────── */

.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.85rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ── Guide-page components ──────────────────────────────────────────── */

/* The one-rule callout — the dial. */
.callout {
  border-left: 3px solid var(--accent);
  background: var(--accent-soft);
  padding: 1rem 1.2rem;
  border-radius: 0 8px 8px 0;
  max-width: var(--measure);
  margin: 1.6rem 0;
}
.callout p { margin: 0; }
.callout p + p { margin-top: 0.6rem; }

.callout-good { border-left-color: var(--ok); background: color-mix(in srgb, var(--ok) 8%, var(--paper-raised)); }
.callout-warn { border-left-color: var(--warn); background: color-mix(in srgb, var(--warn) 8%, var(--paper-raised)); }

/* Worked example — reads like a manuscript excerpt. */
.excerpt {
  background: var(--paper-raised);
  border: 1px solid var(--rule);
  border-radius: 10px;
  padding: 1.3rem 1.5rem;
  max-width: var(--measure);
  margin: 1.4rem 0;
  font-size: 1rem;
}
.excerpt .tag {
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  display: inline-block;
  margin-bottom: 0.6rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
}
.excerpt .tag-good { background: color-mix(in srgb, var(--ok) 16%, transparent); color: var(--ok); }
.excerpt .tag-bad  { background: color-mix(in srgb, var(--bad) 14%, transparent); color: var(--bad); }
.excerpt .tag-note { background: var(--accent-soft); color: var(--accent); }
.excerpt p { margin: 0; }
.excerpt p + p { margin-top: 0.7rem; }

/* Plain-text format sample (the beat-outline shape). */
pre.format {
  background: var(--paper-raised);
  border: 1px solid var(--rule);
  border-radius: 10px;
  padding: 1.2rem 1.4rem;
  max-width: var(--measure);
  overflow-x: auto;
  font-family: var(--sans);
  font-size: 0.9rem;
  line-height: 1.7;
  color: var(--ink);
  white-space: pre-wrap;
}
pre.format b { color: var(--accent); font-weight: 700; }

/* Field-fact lists on guide pages. */
.factlist { padding-left: 1.2rem; }
.factlist li { margin-bottom: 0.7rem; }
.factlist b { color: var(--ink); }

/* Download strip at the top of each guide. */
.take-it {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  background: var(--paper-raised);
  border: 1px solid var(--rule);
  border-radius: 10px;
  padding: 0.9rem 1.2rem;
  max-width: var(--measure);
  margin: 1.8rem 0;
  font-family: var(--sans);
  font-size: 0.92rem;
  color: var(--ink-soft);
}

/* Next-step footer nav between the two guides. */
.next-up {
  margin-top: 3.5rem;
  padding-top: 1.6rem;
  border-top: 1px solid var(--rule);
  font-family: var(--sans);
  font-size: 0.95rem;
}
.next-up a { color: var(--accent); }

/* ── Forms (submit page + result pages) ─────────────────────────────── */

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

.field { margin-bottom: 1.3rem; }
.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 label .req,
.field label .opt {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
  padding: 0.08rem 0.4rem;
  border-radius: 999px;
  margin-left: 0.35rem;
}
.field label .req { color: var(--accent); background: var(--accent-soft); }
.field label .opt { color: var(--ink-soft); background: color-mix(in srgb, var(--ink-soft) 12%, transparent); }
.field .hint {
  font-family: var(--sans);
  font-size: 0.82rem;
  color: var(--ink-soft);
  margin: 0.35rem 0 0;
  max-width: none;
}
.field .hint a { color: var(--accent); }

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; font-size: 0.9rem; }
input:focus, textarea:focus, select:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}
.btn[disabled] { opacity: 0.55; cursor: progress; }

/* Upload call-to-action strip used on the guide/landing pages. */
.cta-strip {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap;
  background: var(--accent-soft);
  border: 1px solid var(--rule);
  border-left: 3px solid var(--accent);
  border-radius: 0 10px 10px 0;
  padding: 1.1rem 1.3rem;
  max-width: var(--measure);
  margin: 1.8rem 0;
  font-family: var(--sans);
}
.cta-strip span { color: var(--ink); font-size: 0.95rem; }
.cta-strip .btn { flex-shrink: 0; }

/* ── Pricing table (landing) ────────────────────────────────────────── */
.table-scroll { overflow-x: auto; }
.pricing {
  border-collapse: collapse;
  width: 100%;
  max-width: 34rem;
  margin: 1rem 0 1.8rem;
  font-family: var(--sans);
}
.pricing td {
  padding: 0.75rem 0.4rem;
  border-bottom: 1px solid var(--rule);
  font-size: 1rem;
  vertical-align: baseline;
}
.pricing td span { display: block; font-size: 0.82rem; color: var(--ink-soft); margin-top: 0.15rem; }
.pricing td.price {
  text-align: right;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  font-size: 1.15rem;
  color: var(--accent);
}
.pricing tr:last-child td { border-bottom: 0; color: var(--ink-soft); }
.pricing tr:last-child td.price { color: var(--ink-soft); font-size: 1rem; }
