/* Reading typography for the free chapter. Used by /sample.html and, through
   the same .ch-* classes, by the preview modal on the sales page — one
   stylesheet so the chapter looks identical wherever it is read.

   Thai needs a taller line-height than Latin because of stacked vowel and tone
   marks; 2.0 here is deliberate, not a rounding of 1.7. */

.reader-body { background: var(--bg); }

.reader-top {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: 760px;
  margin: 0 auto;
  padding: 12px 20px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.reader-top .brand { text-decoration: none; }
.reader-top-cta { padding: 9px 18px; font-size: 0.88rem; }

.reader {
  max-width: 660px;
  margin: 0 auto;
  padding: 44px 20px 20px;
  font-size: 1.06rem;
  line-height: 2;
  color: #2A2C43;
}
.reader-loading { color: var(--ink-faint); text-align: center; padding: 60px 0; }

/* ---- chapter body (shared with the sales-page modal) ------------------- */

.ch-eyebrow {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--accent-dark);
  text-transform: uppercase;
}
.ch-title {
  font-size: clamp(1.9rem, 5vw, 2.6rem);
  line-height: 1.25;
  margin: 8px 0 10px;
  letter-spacing: -0.01em;
}
.ch-person {
  color: var(--ink-faint);
  font-size: 0.94rem;
  padding-bottom: 26px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 8px;
}

.ch-beat {
  display: inline-block;
  margin: 40px 0 4px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  color: var(--primary-dark);
  background: var(--primary-soft);
  padding: 5px 14px;
  border-radius: 999px;
}
.reader p + p,
.ch-modal-body p + p { margin-top: 1.15em; }
.reader .ch-beat + p,
.ch-modal-body .ch-beat + p { margin-top: 0.7em; }

.ch-drop {
  font-size: 1.22rem;
  font-weight: 700;
  line-height: 1.75;
  color: var(--ink);
  border-left: 4px solid var(--yellow);
  padding-left: 18px;
  margin-top: 1.4em !important;
}

.ch-quote {
  margin: 1.6em 0;
  padding: 24px 26px;
  background: var(--bg-soft);
  border-radius: var(--radius);
  font-size: 1.12rem;
  font-weight: 600;
  line-height: 1.85;
  color: var(--primary-dark);
}

.ch-rules,
.ch-try {
  margin: 1.3em 0;
  padding-left: 0;
  list-style: none;
  counter-reset: chstep;
}
.ch-rules li,
.ch-try li {
  counter-increment: chstep;
  position: relative;
  /* min-width guard is not enough here: the marker sits in the padding, so the
     text box itself must never be narrower than the Thai run it holds. */
  padding: 0 0 0 46px;
  margin-bottom: 16px;
  line-height: 1.9;
}
.ch-rules li::before,
.ch-try li::before {
  content: counter(chstep);
  position: absolute;
  left: 0;
  top: 4px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ch-rules li { font-weight: 600; }
.ch-try-lead {
  color: var(--ink-faint);
  font-size: 0.95rem;
  margin-top: 0.7em !important;
}

.ch-end {
  margin-top: 44px;
  padding: 26px;
  background: var(--bg-warm);
  border: 1px solid var(--yellow);
  border-radius: var(--radius);
  font-size: 1rem;
  line-height: 1.9;
}

/* ---- what comes after the free chapter ---------------------------------- */

.reader-after {
  margin-top: 56px;
  padding: 56px 0 64px;
  background: var(--bg-soft);
  border-top: 1px solid var(--border);
}
.reader-after h2 { font-size: 1.7rem; text-align: center; }
.reader-after-lead {
  text-align: center;
  color: var(--ink-soft);
  margin: 12px auto 32px;
  max-width: 46ch;
}
.reader-toc { list-style: none; margin: 0 0 34px; padding: 0; }
.reader-toc li {
  display: flex;
  align-items: baseline;
  gap: 14px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  margin-bottom: 10px;
}
.rt-n { font-weight: 800; color: var(--primary); flex: none; }
.rt-body { min-width: 0; }
.rt-body strong { font-weight: 700; }
.rt-body em {
  font-style: normal;
  color: var(--ink-soft);
  font-size: 0.92rem;
  display: block;
}
.reader-after-cta { text-align: center; }
.reader-after-cta .btn { width: auto; }
.reader-after-note {
  margin-top: 14px;
  font-size: 0.88rem;
  color: var(--ink-faint);
}

@media (max-width: 640px) {
  .reader { font-size: 1.02rem; line-height: 1.95; padding-top: 32px; }
  .reader-top-cta { padding: 8px 14px; font-size: 0.82rem; }
}
