/* Treadstone Law — Guide READER page styles (Sprint BQ, Prompt 8 fix).
   Generated by tools/build-guide-readers.js — DO NOT hand-edit this file on
   disk; it is overwritten on every generator run. Edit the READ_CSS template
   literal in the tool instead. (This is the fix for the regeneration-clobber
   that deleted the original hand-authored read.css — see the tool's header
   comment for the incident writeup.)

   Scope: only the reader-page-specific chrome (.readwrap / .rd-*) below.
   Sitewide nav/footer/buttons/tokens come from /styles.css, already loaded
   by every reader page — this file must not redefine them, only extend them
   for the reading-column layout. Tokens referenced below (--tsl-*, --font-*,
   --radius-sm, --shadow-*, --dur, --ease-out) are the REAL custom properties
   declared in treadstone-law-site/styles.css :root. */

/* ---- Reading column ------------------------------------------------- */
.readwrap{max-width:720px;margin:0 auto;padding:52px 24px 0}

/* ---- Hero ------------------------------------------------------------ */
.rd-hero{padding-bottom:32px;margin-bottom:36px;border-bottom:1px solid var(--tsl-line)}
.rd-back{margin-bottom:22px}
.rd-backlink{display:inline-flex;align-items:center;gap:8px;font-size:13px;font-weight:600;color:var(--tsl-ink-soft);background:var(--tsl-surface);border:1px solid var(--tsl-line-2);border-radius:100px;padding:8px 16px}
.rd-backlink:hover{color:var(--tsl-crimson);border-color:var(--tsl-gold-soft)}
.rd-backlink .a{color:var(--tsl-crimson);font-weight:700}
.rd-eyebrow{font-size:11.5px;font-weight:700;letter-spacing:.14em;text-transform:uppercase;color:var(--tsl-gold)}
.rd-hero h1{font-family:var(--font-display);font-weight:var(--fw-display);font-size:clamp(30px,4.6vw,48px);line-height:1.1;letter-spacing:-.02em;color:var(--tsl-ink);margin:14px 0 0;max-width:19ch}
.rd-lede{font-size:18px;line-height:1.55;color:var(--tsl-ink-soft);margin-top:16px;max-width:60ch}
.rd-reviewed{font-size:12.5px;color:var(--tsl-ink-soft);opacity:.85;margin-top:12px;letter-spacing:.01em}

/* ---- Body: base typography -------------------------------------------- */
.rd-body{font-size:17px;line-height:1.7;color:var(--tsl-ink)}
.rd-body>*+*{margin-top:0}
.rd-body p{margin:0 0 20px}
.rd-body p:last-child{margin-bottom:0}
.rd-body strong{color:var(--tsl-ink);font-weight:600}
.rd-body em{font-style:italic}
.rd-body a{color:var(--tsl-crimson);text-decoration:underline;text-decoration-color:var(--tsl-gold-soft);text-underline-offset:2px}
.rd-body a:hover{text-decoration-color:var(--tsl-crimson)}
.rd-body hr{border:none;border-top:1px solid var(--tsl-line);margin:36px 0}

/* ---- Headings ----------------------------------------------------------
   Sitewide h1/h2 sizes (clamp up to 46–70px) are tuned for marketing hero
   sections, not a dense reading column, so section headings are re-set here
   at a body-appropriate scale with generous top margin as the section-break
   rhythm (guides already insert an <hr> before most h2s, so no extra rule
   is added here — that would double the visual break). */
.rd-body h2{font-family:var(--font-display);font-weight:500;font-size:clamp(23px,3vw,30px);line-height:1.22;letter-spacing:-.015em;color:var(--tsl-ink);margin:8px 0 16px}
.rd-body h2:first-child{margin-top:0}
.rd-body h3{font-family:var(--font-display);font-weight:500;font-size:20px;line-height:1.3;color:var(--tsl-ink);margin:26px 0 10px}

/* ---- Lists -------------------------------------------------------------- */
.rd-body ul,.rd-body ol{margin:0 0 20px;padding-left:24px;display:flex;flex-direction:column;gap:10px}
.rd-body li{padding-left:4px;line-height:1.65}
.rd-body li::marker{color:var(--tsl-gold)}
.rd-body ul.rd-sub{margin:8px 0 0;padding-left:20px;gap:6px}
.rd-body ul.rd-sub li{font-size:14.5px;color:var(--tsl-ink-soft)}

/* Checkbox list items ("- [ ] …" in the source markdown) — the literal
   "[ ]" is stripped by the generator and replaced with this class; render a
   real checkbox glyph via ::before so checklists still read as checklists. */
.rd-body li.task{list-style:none;position:relative;padding-left:30px}
.rd-body li.task::before{content:"";position:absolute;left:0;top:3px;width:17px;height:17px;border:1.5px solid var(--tsl-gold);border-radius:4px;background:#fff}

/* ---- Blockquotes: plain quote / callout box / milestone marker --------- */
.rd-body blockquote{margin:24px 0}
.rd-body blockquote p{margin:0}
.rd-body blockquote p+p{margin-top:10px}

.rd-body .rd-quote{border-left:3px solid var(--tsl-gold);background:var(--tsl-surface);border-radius:0 6px 6px 0;padding:16px 20px;color:var(--tsl-ink-soft)}
.rd-body .rd-quote strong{color:var(--tsl-ink)}

.rd-body .rd-callout{background:var(--tsl-gold-soft);border-left:4px solid var(--tsl-gold);border-radius:6px;padding:16px 20px;color:var(--tsl-ink)}

/* Bare milestone-marker paragraphs (✅ done-when / 📞 call-to-action lines
   that are NOT wrapped in a blockquote by the source markdown) get a
   lighter left-accent treatment — no full box, just an indicator rule. */
.rd-body p.rd-marker{border-left:3px solid var(--tsl-gold);padding:2px 0 2px 16px;margin:22px 0;color:var(--tsl-ink)}
/* When a marker paragraph is nested INSIDE a callout (the common case — a
   ⚖️/⚠️/✅-led blockquote), the callout box already supplies the accent, so
   cancel the marker's own border/padding to avoid a double treatment. */
.rd-body .rd-callout .rd-marker{border:none;padding:0;margin:0}

/* ---- Tables --------------------------------------------------------------
   .rd-table-wrap is the scroll container the generator always wraps a table
   in; overflow-x:auto here is what keeps a wide table from ever blowing out
   the page — the table itself stays full-width and reflows inside it. */
.rd-table-wrap{overflow-x:auto;-webkit-overflow-scrolling:touch;margin:26px 0;border:1px solid var(--tsl-line);border-radius:8px}
.rd-table-wrap table{width:100%;border-collapse:collapse;font-size:14.5px}
.rd-table-wrap th{text-align:left;font-weight:600;color:var(--tsl-ink);background:var(--tsl-surface);padding:11px 14px;border-bottom:2px solid var(--tsl-line-2);white-space:nowrap}
.rd-table-wrap td{padding:11px 14px;border-bottom:1px solid var(--tsl-line);color:var(--tsl-ink-soft);vertical-align:top}
.rd-table-wrap tr:last-child td{border-bottom:none}

/* ---- Fenced code / ASCII worksheets --------------------------------------
   .rd-pre-wrap is the scroll container the generator wraps every fenced
   code block (and worksheet fill-in-the-blank block) in — this is the
   containment fix for the reported bug: a wide, unbreakable worksheet line
   (long underscore runs, ASCII decision trees) now scrolls INSIDE the box
   instead of stretching the page. white-space:pre is deliberate — these are
   fixed-width worksheets where wrapping would destroy the alignment. */
.rd-pre-wrap{overflow-x:auto;-webkit-overflow-scrolling:touch;margin:22px 0;background:var(--tsl-surface);border:1px solid var(--tsl-line);border-radius:6px;padding:16px}
.rd-pre-wrap pre{margin:0;white-space:pre;font-family:'SFMono-Regular',Consolas,'Liberation Mono',Menlo,monospace;font-size:13px;line-height:1.65;color:var(--tsl-ink)}

/* Inline code spans outside a pre block (e.g. a short literal in a
   sentence) — reset back to plain text when it's actually inside a
   .rd-pre-wrap block so the box isn't double-styled. */
.rd-body code{background:var(--tsl-surface);border:1px solid var(--tsl-line);border-radius:4px;padding:2px 6px;font-size:.9em;font-family:'SFMono-Regular',Consolas,'Liberation Mono',Menlo,monospace}
.rd-pre-wrap code{background:none;border:none;padding:0;font-size:inherit;font-family:inherit}

/* ---- Closer CTA ------------------------------------------------------- */
.rd-closer{margin:52px 0 26px}
.rd-closer-box{background:linear-gradient(155deg,var(--tsl-navy),var(--tsl-navy-2));border-radius:16px;padding:34px 36px;color:#fff;position:relative;overflow:hidden;display:flex;align-items:center;justify-content:space-between;gap:26px;flex-wrap:wrap}
.rd-closer-box::after{content:'';position:absolute;right:-60px;bottom:-90px;width:220px;height:220px;background:radial-gradient(circle,rgba(169,133,60,.2),transparent 64%)}
.rd-closer-box .txt{position:relative;z-index:1;max-width:480px}
.rd-closer-box .eyebrow{color:var(--tsl-gold-soft);margin-bottom:8px}
.rd-closer-box h2{font-family:var(--font-display);font-weight:300;font-size:24px;line-height:1.18;letter-spacing:-.02em;color:#fff;margin:0}
.rd-closer-box h2 em{font-style:italic;color:var(--tsl-gold-soft)}
.rd-closer-box p{font-size:13.5px;color:rgba(255,255,255,.78);margin-top:8px}
/* The generator emits a bare "btn-primary" (no "btn") on this link, matching
   the capture-page pattern in guides/guide.css — sitewide styles.css only
   supplies color/shadow for .btn-primary (layout comes from .btn), so this
   context supplies its own display/padding/radius or the CTA renders as
   unstyled inline text. */
.rd-closer-box .btn-primary{position:relative;z-index:1;display:inline-flex;align-items:center;justify-content:center;gap:8px;padding:14px 28px;border-radius:var(--radius-sm);font-weight:600;font-size:14.5px;white-space:nowrap}

/* ---- Fineprint ---------------------------------------------------------- */
.rd-fineprint{max-width:640px;margin:0 auto;padding:0 0 8px;font-size:12px;color:var(--tsl-ink-soft);line-height:1.6;text-align:center}

/* ---- Mobile (owner directive: explicit ≤600px authorship, ≥16px body) -- */
@media(max-width:900px){
  .readwrap{padding-top:40px}
}
@media(max-width:600px){
  .readwrap{padding:32px 20px 0}
  .rd-hero{padding-bottom:26px;margin-bottom:26px}
  .rd-back{margin-bottom:18px}
  .rd-lede{font-size:16.5px}
  .rd-body{font-size:16px;line-height:1.65}
  .rd-body h2{font-size:22px;margin:6px 0 14px}
  .rd-body h3{font-size:18px;margin:22px 0 8px}
  .rd-table-wrap table{font-size:13.5px}
  .rd-table-wrap th,.rd-table-wrap td{padding:9px 10px}
  .rd-pre-wrap{padding:14px}
  .rd-pre-wrap pre{font-size:12.5px}
  .rd-closer-box{padding:26px 22px;gap:20px}
  .rd-closer-box h2{font-size:21px}
  .rd-closer-box .btn-primary{width:100%}
  .rd-fineprint{padding:0 4px 8px}
}

/* ---- Reduced motion — this stylesheet adds no animation; this block is a
   defensive backstop in case a future edit adds one. ------------------- */
@media(prefers-reduced-motion:reduce){
  .rd-body *{transition:none!important;animation:none!important}
}
