/* ===========================================================================
   Solver Guides — shares the main site's design system (Ecosystem Solver).
   Same tokens, fonts, buttons, nav, footer. Article styles layered on top.
   =========================================================================== */
:root{
  --ink:#0d1b16;
  --moss:#1f3a2e;
  --leaf:#2f6b4f;
  --lime:#9be564;
  --gold:#e7c46b;
  --cream:#f6f3ea;
  --paper:#fbfaf4;
  --mist:#e9efe8;
  --danger:#c14b3a;
}
*{box-sizing:border-box}
html,body{margin:0;padding:0}
body{
  font-family:'Inter',system-ui,-apple-system,sans-serif;
  color:var(--ink);
  background:var(--paper);
  line-height:1.6;
  -webkit-font-smoothing:antialiased;
}
h1,h2,h3,h4,.serif{font-family:'Fraunces',Georgia,serif;font-weight:600;letter-spacing:-0.01em;line-height:1.15}
a{color:inherit}
.wrap{max-width:1140px;margin:0 auto;padding:0 24px}

/* Buttons (same as main site) */
/* the .btn base + .btn-ghost look live in /css/ui.css now (#1313/#1630);
   ui.css's :where(.btn-sm) is the ONE size variant too (#1661) */

/* Eyebrow label used INSIDE article body copy (light background). The hero
   masthead uses layout.css's .hero-eyebrow; this plain .eyebrow is only for
   article-internal labels on the cream page. */
.eyebrow{
  display:inline-block;font-size:13px;font-weight:600;letter-spacing:.12em;
  text-transform:uppercase;color:var(--leaf);background:var(--mist);
  padding:6px 14px;border-radius:999px;
}

/* Hero header — canonical component in /css/layout.css (single source of
   truth): .hero-inner + .hero-eyebrow + .hero-lede + .hero-meta. Guide
   articles use header.hero.article-hero (compact H1 masthead) — the masthead
   itself carries no hero copy; the article headline sits in the body below.
   nav + footer styles: see /css/layout.css */

/* Sections */
section{padding:84px 0}
.section-head{max-width:680px}
.section-head h2{font-size:clamp(30px,3.6vw,44px);margin:14px 0 14px}
.section-head p{font-size:17px;color:rgba(13,27,22,.7)}

/* Guides grid — reuses main site .step card pattern */
.guide-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:24px;margin-top:32px}
.gcard{
  display:block;background:var(--paper);border:1px solid rgba(13,27,22,.08);border-radius:16px;padding:28px;
  text-decoration:none;color:var(--ink);position:relative;transition:transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.gcard:hover{transform:translateY(-4px);box-shadow:0 18px 40px rgba(13,27,22,.08);border-color:rgba(47,107,79,.3)}
.gcard .ic{
  width:42px;height:42px;border-radius:11px;display:grid;place-items:center;
  background:var(--mist);color:var(--leaf);font-family:'Fraunces',serif;font-weight:800;font-size:20px;
}

/* Category filters (hub) */
.guide-filters{display:flex;flex-wrap:wrap;gap:10px;margin-top:32px}
.gf-chip{
  background:var(--paper);border:1.5px solid rgba(13,27,22,.15);border-radius:999px;padding:9px 18px;
  font-family:'Inter',sans-serif;font-size:14px;font-weight:600;color:var(--moss);cursor:pointer;
  transition:border-color .15s ease, background .15s ease, color .15s ease;
}
.gf-chip:hover{border-color:var(--leaf);color:var(--leaf)}
.gf-chip[aria-pressed="true"]{background:var(--ink);border-color:var(--ink);color:var(--lime)}
.gf-chip:focus-visible{outline:3px solid rgba(47,107,79,.4);outline-offset:2px}
/* #1102: per-chip guide counts (JS-only; a .gf-chip-n span appended at boot) */
.gf-chip .gf-chip-n{margin-left:7px;padding:1px 8px;border-radius:999px;background:rgba(13,27,22,.08);font-size:12px;font-weight:700;color:var(--moss)}
.gf-chip[aria-pressed="true"] .gf-chip-n{background:rgba(155,229,100,.22);color:var(--lime)}
.gf-count{font-size:14px;color:var(--text-2);margin:16px 0 0}
.guide-empty{background:var(--mist);border-radius:14px;padding:26px 28px;font-size:15.5px;color:var(--moss);margin-top:24px}

/* Card category tags */
.gcard .tags{display:flex;flex-wrap:wrap;gap:6px;margin:12px 0 0}
.gcard .tag{
  font-size:11px;font-weight:700;letter-spacing:.05em;text-transform:uppercase;
  color:var(--moss);background:var(--mist);border-radius:999px;padding:4px 10px;
}
.gcard[hidden]{display:none}
/* #1186: card titles are h2 (no skip after the page h1); guides.css's shared
   h1-h4 rule gives h2 the same Fraunces/600 stack, so the cascade is unchanged. */
.gcard h2{font-size:21px;margin:14px 0 8px}
.gcard p{color:rgba(13,27,22,.7);font-size:15px;margin:0 0 18px}
.gcard .more{font-size:13px;font-weight:600;color:var(--leaf);letter-spacing:.06em;text-transform:uppercase}
/* #1345: reading time + updated month, derived from the article byline. */
.gcard .gcard-meta{display:block;font-size:12.5px;color:var(--text-3);margin:0 0 12px;letter-spacing:.02em}
/* Per-firm hub sections (#1345): a heading per firm, hidden whole when a
   filter empties it (the filter script toggles the hidden attribute). */
.firm-sec{margin:44px 0 0}
.firm-sec[hidden]{display:none}
.firm-sec .firm-title{font-size:24px;margin:0 0 6px}
/* Hero meta items (#1345): each bullet+fact pair is one unbreakable unit so
   the row never wraps into an orphan bullet. */
.hero-meta .hm-item{display:inline-flex;align-items:center;gap:10px;white-space:nowrap}

/* CTA banner (advanced — same as main site) */
.cta-banner{
  background:linear-gradient(135deg,var(--lime),var(--gold));
  color:var(--ink);border-radius:28px;padding:56px 48px;text-align:center;
  position:relative;overflow:hidden;
}
.cta-banner::before{content:'';position:absolute;inset:0;background:radial-gradient(ellipse at 30% 10%,rgba(255,255,255,.5),transparent 55%);pointer-events:none}
.cta-banner h2{font-size:clamp(28px,3.4vw,40px);margin:0 0 12px;color:var(--ink)}
.cta-banner p{margin:0 auto 30px;max-width:560px;color:rgba(13,27,22,.7);font-size:17px}
.cta-row{display:flex;gap:14px;justify-content:center;flex-wrap:wrap;align-items:center}

/* Footer: see /css/layout.css */

/* ===========================================================================
   Article layout (individual guides)
   =========================================================================== */
.article{max-width:760px;margin:0 auto;padding:64px 0 96px}
.article .meta{font-size:13px;color:var(--text-2);margin:14px 0 0;letter-spacing:.02em}
.article h1{font-size:clamp(32px,4vw,46px);margin:14px 0 0}
.article h2{font-size:28px;margin:44px 0 14px}
.article h3{font-size:20px;margin:30px 0 10px}
.article p{font-size:17px;color:rgba(13,27,22,.85);margin:0 0 18px}
.article ul,.article ol{font-size:17px;color:rgba(13,27,22,.85);margin:0 0 18px;padding-left:24px}
.article li{margin-bottom:8px}
.article a{color:var(--leaf);text-decoration:none;border-bottom:1px solid rgba(47,107,79,.3)}
.article a:hover{color:var(--moss);border-bottom-color:var(--moss)}
.article blockquote{
  border-left:3px solid var(--leaf);background:var(--mist);
  padding:16px 20px;border-radius:0 12px 12px 0;margin:0 0 20px;
  font-style:italic;color:var(--moss);
}
.article .table-scroll{overflow-x:auto;-webkit-overflow-scrolling:touch;margin:0 0 22px}
.article .table-scroll table{margin:0}
.article table{width:100%;border-collapse:collapse;margin:0 0 22px;font-size:15px;min-width:480px}
.article th,.article td{padding:11px 14px;border:1px solid rgba(13,27,22,.1);text-align:left}
.article th{background:var(--mist);font-weight:600;font-size:13px;letter-spacing:.04em}
.article code{background:var(--mist);padding:2px 7px;border-radius:6px;font-size:14px;font-family:ui-monospace,SFMono-Regular,Menlo,monospace}

/* TOC */
.toc{background:var(--mist);border:1px solid rgba(13,27,22,.1);border-radius:14px;padding:20px 24px;margin:28px 0 36px}
.article .toc h2{margin:0 0 10px;font-size:15px;font-family:'Inter',sans-serif;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--moss)}
/* #1345: inside markers + tabular numerals so "10." aligns with "1.".."9."
   instead of hanging left of the column at double digits. */
.toc ol{margin:0;padding-left:0;font-size:15px;list-style-position:inside;font-variant-numeric:tabular-nums}
.toc li{margin-bottom:6px}
.toc a{border-bottom:none}
/* scroll-spy current section (GuideLayout toggles .toc-current) */
.toc a.toc-current{color:var(--leaf);font-weight:700}

/* #1345: mobile collapsed ToC — GuideLayout wraps the .toc in a
   <details class="toc-details"> below 1200px; the summary owns the label, so
   the block's own heading hides inside it. */
.toc-details{margin:24px 0 28px}
.toc-details summary{cursor:pointer;font-size:15px;font-weight:700;color:var(--moss);background:var(--mist);border:1px solid rgba(13,27,22,.1);border-radius:14px;padding:14px 20px;list-style-position:inside}
.toc-details .toc h2{display:none}
.toc-details .toc{margin:10px 0 0}

/* Article breadcrumb (#1345): Guides › <firm> › <page>, above the eyebrow.
   Ink alphas ride the semantic tokens (the #1121 contrast floor: 0.6 ink is
   the palest text colour on light surfaces). */
.crumbs{font-size:13px;color:var(--text-2);margin:0 0 18px;letter-spacing:.02em}
.crumbs a{color:var(--moss);text-decoration:none;border-bottom:none}
.crumbs a:hover{color:var(--leaf);text-decoration:underline}
.crumbs .crumb-sep{margin:0 7px;color:var(--text-3)}
.crumbs [aria-current="page"]{color:var(--ink)}

/* #1345 article layout: single column below 1200px (the rail hidden),
   content + sticky right rail at >=1200px. #2535: the hero band on article
   pages is nav-only, so the grid's top edge IS the nav's bottom edge — the
   shared clearance lives ONCE on the container (the desktop .article override
   zeroes the base rule's own top padding, or the columns start on two lines). */
.article-layout{display:block}
.article-rail{display:none}
.rail-inner{display:flex;flex-direction:column;gap:20px}
.rail-card-in{background:#fff;border:1px solid rgba(13,27,22,.08);border-radius:16px;padding:22px;text-align:center}
.rail-card-ic{width:46px;height:46px;border-radius:12px;display:grid;place-items:center;background:var(--mist);color:var(--leaf);margin:0 auto 10px}
.rail-card-ic .glyph{width:26px;height:26px}
.rail-card-name{font-family:'Fraunces',Georgia,serif;font-weight:600;font-size:18px;color:var(--ink);margin:0 0 4px}
.rail-card-price{font-size:13.5px;color:rgba(13,27,22,.6);margin:0 0 14px}
.rail-card-in .btn{width:100%;justify-content:center}
.rail-toc-slot .toc{margin:0}
.rail-toc-slot .toc ol{font-size:14px}
@media(min-width:1200px){
  .article-layout{display:grid;grid-template-columns:minmax(0,760px) 300px;gap:44px;justify-content:center;align-items:start;padding-top:64px}
  .article{max-width:none;margin:0;padding-top:0}
  .article-rail{display:block}
  .rail-inner{position:sticky;top:92px}
}

/* Key callout */
.key{background:rgba(155,229,100,.16);border:1px solid rgba(47,107,79,.25);border-radius:12px;padding:16px 20px;margin:22px 0}
.key strong{color:var(--moss)}

/* Inline CTA */
.inline-cta{background:var(--ink);color:var(--cream);border-radius:18px;padding:32px;margin:36px 0;text-align:center}
.inline-cta h3{color:var(--cream);margin:0 0 8px;font-size:22px}
.inline-cta p{color:rgba(246,243,234,.8);font-size:15px;margin:0 0 20px}
/* the .inline-cta ghost flip rides /css/ui.css now (#1630) */

/* Guide-end conversion module (#1127): ONE shared component rendered by
   /js/guide-conversion.js into the [data-guide-cta] mount every article
   carries after its Sources. Do NOT inline copies of the module back into
   pages; the trial ids it renders are bound by the shared /js/trial-form.js. */
.guide-cta{background:var(--ink);color:var(--cream);border-radius:18px;padding:32px;margin:36px 0 8px;text-align:center}
.guide-cta h3{color:var(--cream);margin:0 0 8px;font-size:22px}
.guide-cta .gcta-copy{color:rgba(246,243,234,.8);font-size:15px;margin:0 auto 20px;max-width:560px}
/* the .btn-primary hover rides /css/ui.css now (#1313) — the -2px/35% copies
   that stood here and on .guide-cta-inline below kept winning the transform
   on guide pages; ui.css's own .guide-cta/.guide-cta-inline scope owns this
   surface's lime-glow shadow */
.guide-cta .gcta-trial{margin-top:24px;padding-top:22px;border-top:1px solid rgba(246,243,234,.16)}
.guide-cta .gcta-trial-head{color:var(--cream);font-size:15px;font-weight:600;margin:0 0 14px}
.guide-cta .gcta-trial-form{display:flex;gap:10px;flex-wrap:wrap;align-items:center;justify-content:center}
.guide-cta .gcta-trial-form input[type=email]{width:min(300px,80vw);padding:13px 18px;border:2px solid rgba(255,255,255,.15);border-radius:999px;font-size:15px;font-family:inherit;background:rgba(255,255,255,.95);color:var(--ink)}
.guide-cta .gcta-trial-form input[type=email]:focus{outline:none;border-color:var(--lime);box-shadow:0 0 0 4px rgba(155,229,100,.25)}
.guide-cta .gcta-btn{background:linear-gradient(135deg,#9be564 0%,#7bc94c 100%);color:#0d1b16;padding:13px 26px;border-radius:999px;border:none;font-weight:700;font-size:15px;cursor:pointer;font-family:inherit;white-space:nowrap}
.guide-cta .gcta-btn:hover{transform:translateY(-2px);box-shadow:0 8px 24px rgba(0,0,0,.25)}
.guide-cta .gcta-btn:disabled{opacity:.6;cursor:default;transform:none}
.guide-cta .gcta-consent{display:flex;align-items:center;gap:8px;justify-content:center;cursor:pointer;font-size:13px;color:rgba(255,255,255,.75);margin:14px auto 0;max-width:460px}
.guide-cta .gcta-consent input{width:16px;height:16px;cursor:pointer;accent-color:#9be564;flex-shrink:0}
.guide-cta .gcta-consent span{line-height:1.35;text-align:left}
.guide-cta .trial-msg{font-size:14px;font-weight:600;color:#fff;margin:10px auto 0;text-align:center;display:none;max-width:520px}
.guide-cta .trial-msg.show{display:block}
.guide-cta .trial-msg.err{color:#ffd0c8}
.guide-cta .gcta-note{font-size:12px;color:rgba(255,255,255,.6);margin:10px auto 0;max-width:520px}
.guide-cta .gcta-note a{color:rgba(255,255,255,.8);text-decoration:underline}
@media(max-width:640px){.guide-cta{padding:24px 18px}.guide-cta .cta-row{flex-direction:column}}

/* #1345: the mid-article inline face of the conversion module — same visual
   family as .guide-cta, compact, heading-free, no form (the end module owns
   the trial ids). Rendered by /js/guide-conversion.js into the
   [data-guide-cta-inline] mount at the end of the peak-intent section. */
.guide-cta-inline{background:var(--ink);color:var(--cream);border-radius:18px;padding:26px 30px;margin:34px 0;text-align:center}
.guide-cta-inline .gcta-in-kicker{font-size:12px;font-weight:700;letter-spacing:.09em;text-transform:uppercase;color:var(--lime);margin:0 0 8px}
.guide-cta-inline .gcta-in-copy{color:rgba(246,243,234,.8);font-size:15px;margin:0 auto 18px;max-width:560px}
.guide-cta-inline .gcta-in-copy strong{color:var(--cream)}
.guide-cta-inline .gcta-in-note{font-size:12.5px;color:rgba(255,255,255,.6);margin:14px auto 0}
@media(max-width:640px){.guide-cta-inline{padding:22px 18px}.guide-cta-inline .cta-row{flex-direction:column}}

/* #1345: the collapsed sources under the end CTA. <summary> carries the
   "Sources (N)" label (the count is pinned by test); the list keeps its
   .sources styling inside. */
.sources-details{margin:18px 0 8px;border-top:1px solid rgba(13,27,22,.1);padding-top:14px}
.sources-details summary{cursor:pointer;font-size:14px;font-weight:600;color:var(--moss);letter-spacing:.02em}
.sources-details summary:hover{color:var(--leaf)}
.sources-details[open] summary{margin-bottom:12px}

/* Article screenshots */
.article .shot{margin:24px 0;border:1px solid rgba(13,27,22,.1);border-radius:14px;overflow:hidden;background:var(--mist)}
.article .shot img{display:block;width:100%;height:auto}
.article .shot figcaption{padding:10px 16px;font-size:13px;color:rgba(13,27,22,.6);background:#fff;border-top:1px solid rgba(13,27,22,.08)}
.article .shot figcaption strong{color:var(--ink)}

/* Cross-link "see also" boxes */
.see-also{background:var(--mist);border-left:4px solid var(--leaf);border-radius:0 12px 12px 0;padding:18px 22px;margin:24px 0;font-size:15px}
.see-also strong{color:var(--ink)}
.see-also a{color:var(--leaf);font-weight:600;text-decoration:none;border-bottom:1px solid rgba(47,125,143,.3)}
.see-also a:hover{color:var(--ink)}

/* BLUF takeaway box (opens every article, under the h1).
   Same treatment as the .cta-banner gradient card: lime-to-gold gradient.
   #1345: the old radial white sheen (::before, rgba(255,255,255,.5)) is
   GONE — it painted OVER the copy (children stay position:static) and washed
   the first lines out to ~2.5:1, making the page's most important summary
   its least legible text. Ink on the bare gradient measures well past the
   4.5:1 floor (pinned by a computed-style check in
   server/test/guides-reading-layout.test.js) — do not reintroduce the
   overlay unless it paints behind the text (z-index:-1). */
.takeaway{
  background:linear-gradient(135deg,var(--lime),var(--gold) 70%,#F0B45A);
  color:var(--ink);border-radius:22px;padding:26px 30px;margin:26px 0 24px;
  font-size:16px;line-height:1.6;position:relative;overflow:hidden;
}
.takeaway strong{color:var(--ink)}
@media(max-width:880px){.takeaway{padding:22px 20px;border-radius:18px}}

/* Cited sources list (end of article, Tier A links only) */
.sources{font-size:15px;color:rgba(13,27,22,.8)}
.sources li{margin-bottom:10px}
.sources a{color:var(--leaf);font-weight:600;text-decoration:none;border-bottom:1px solid rgba(47,107,79,.3)}
.sources a:hover{color:var(--moss)}

/* Article hero (smaller, per-guide) — header stays nav-height (padding:0),
   the article title lives in <main> below, so no blank gradient band. */
header.hero.article-hero h1{font-size:clamp(28px,3.8vw,42px)}

@media(max-width:880px){
  .guide-grid{grid-template-columns:1fr}
  /* mobile nav styles: see /css/layout.css */
  .article{padding:40px 0 64px}
  .article h2{font-size:24px}
  .article p,.article ul,.article ol{font-size:16px}
  .cta-banner{padding:36px 20px}
  footer.site .row{gap:28px}
}


/* ---- #1357: hub mobile density at ≤767px — the 390×844 census budget
   (guides ≤6,000px) lives in server/test/e2e/mobile-density-journey.test.js.
   The 18 full cards (~370px each stacked) become compact list rows —
   glyph · title · one-line blurb · reading time (the tag pills and the
   READ GUIDE affordance go; the whole card is the link) — grouped under
   firm section headers that stick while their group scrolls past. Every
   rule here is scoped to ≤767px; the article pages' own blocks above are
   untouched (.gcard/.firm-sec/.cta-banner are hub-only selectors). ---- */
@media(max-width:767px){
  .hub-main{padding:30px 0 44px}
  /* Compact rows. */
  .guide-grid{gap:8px;margin-top:14px}
  .gcard{
    display:grid;grid-template-columns:30px minmax(0,1fr);gap:2px 10px;
    padding:10px 12px;border-radius:12px;align-items:start;
  }
  .gcard .ic{width:30px;height:30px;border-radius:8px;font-size:14px;grid-row:1 / span 3;align-self:center}
  .gcard .tags{display:none}
  .gcard h2{font-size:15.5px;margin:0;line-height:1.3}
  .gcard p{
    font-size:13px;margin:0;
    display:-webkit-box;-webkit-line-clamp:1;line-clamp:1;-webkit-box-orient:vertical;overflow:hidden;
  }
  .gcard .gcard-meta{margin:3px 0 0;font-size:11.5px}
  .gcard .more{display:none}
  /* Firm sections: tighter rhythm + sticky headers under the scrolled-away
     nav (the header band is static, so top:0 pins to the viewport top). */
  .firm-sec{margin:20px 0 0}
  .firm-sec .firm-title{
    position:sticky;top:0;z-index:6;
    background:var(--paper);
    font-size:17px;margin:0 -12px 8px;padding:8px 12px 6px;
    border-bottom:1px solid rgba(13,27,22,.08);
  }
  /* Hero + filter chips + CTA banner pull in. */
  header.hero .hero-inner{margin-top:18px;padding-bottom:26px}
  header.hero .hero-inner .hero-lede{font-size:15px}
  header.hero .hero-inner .hero-meta{margin-top:14px}
  .guide-filters{margin-top:18px;gap:8px}
  .gf-chip{padding:8px 13px;font-size:13px}
  .guide-empty{padding:18px 16px;margin-top:16px}
  .cta-banner{padding:26px 18px;border-radius:18px}
  .cta-banner p{margin-bottom:18px;font-size:15px}
  .cta-banner .cta-row{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
  .cta-banner .cta-row .btn{padding:11px 14px;font-size:14px;justify-content:center}
}
