/* ==========================================================================
   RatingEcho guides
   --------------------------------------------------------------------------
   Loaded alongside site.css, never alone. It supplies the article column,
   prose typography and the editorial components (callouts, pull quotes,
   flow diagrams, comparison tables); nav, footer, brand mark, buttons and
   every colour token come from site.css so these pages read as part of the
   same site rather than a bolted-on blog.
   ========================================================================== */

/* ── Hero ──────────────────────────────────────────────────────────────── */

.blog-hero {
  padding: 72px 0 34px;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(60rem 22rem at 12% -10%, var(--brand-soft) 0%, transparent 62%),
    var(--canvas);
}

.blog-tag {
  display: inline-block;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--brand-deep);
  background: var(--brand-soft);
  border: 1px solid var(--brand-line);
  border-radius: 999px;
  padding: 5px 12px;
  margin-bottom: 18px;
}

.blog-hero h1 {
  font-size: clamp(1.75rem, 3.4vw, 2.6rem);
  max-width: 20ch;
  margin-bottom: 14px;
}
.blog-hero .wrap > h1 { max-width: 24ch; }

.blog-dek {
  font-size: 1.08rem;
  color: var(--muted);
  max-width: 46ch;
  line-height: 1.62;
}

.blog-meta {
  margin-top: 22px;
  font-size: .84rem;
  color: var(--muted);
}
.blog-meta b { color: var(--ink); font-weight: 600; }

/* ── Article column ────────────────────────────────────────────────────── */

/* Deliberately narrower than the site's 1160px .wrap: prose wants roughly
   66 characters a line, and the marketing grid is built for cards. */
.article {
  max-width: 700px;
  margin: 0 auto;
  padding: 46px 24px 8px;
}

.article > p:first-child {
  font-size: 1.14rem;
  line-height: 1.7;
  color: var(--ink-2);
}

.article h2 {
  font-size: 1.42rem;
  line-height: 1.25;
  margin: 2.4em 0 .65em;
  max-width: 26ch;
}
.article h2:first-child { margin-top: 0; }

.article h3 {
  font-size: 1.08rem;
  margin: 2em 0 .5em;
}

.article p {
  margin: 0 0 1.2em;
  font-size: 1.03rem;
  line-height: 1.78;
  color: var(--text);
}

.article ul,
.article ol {
  margin: 0 0 1.45em;
  padding-left: 1.35em;
  line-height: 1.75;
  font-size: 1.03rem;
}
.article li { margin-bottom: .55em; }
.article li::marker { color: var(--brand); }

.article a {
  color: var(--brand-deep);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-color: var(--brand-line);
  text-decoration-thickness: 1.5px;
}
.article a:hover { color: var(--brand-press); text-decoration-color: currentColor; }

.article strong { color: var(--ink); font-weight: 600; }
.article em { font-style: italic; }

.article hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 2.6em 0;
}

/* ── Pull quote ────────────────────────────────────────────────────────── */

.pull {
  margin: 2em 0;
  padding: 2px 0 2px 22px;
  border-left: 3px solid var(--brand);
  font-size: 1.16rem;
  line-height: 1.55;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -.01em;
}

/* ── Callout ───────────────────────────────────────────────────────────── */

.callout {
  margin: 1.9em 0;
  padding: 18px 20px;
  background: var(--brand-soft);
  border: 1px solid var(--brand-line);
  border-radius: var(--radius);
}
.callout p { margin: 0; font-size: .97rem; line-height: 1.65; }
.callout p + p { margin-top: .7em; }
.callout .callout-label {
  display: block;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--brand-deep);
  margin-bottom: 7px;
}

.callout.warn {
  background: #fffbeb;
  border-color: #fde68a;
}
.callout.warn .callout-label { color: #b45309; }

/* ── Flow diagram ──────────────────────────────────────────────────────
   Built from real text in a grid rather than one monolithic SVG, so it
   reflows on a phone, stays selectable, and is readable by screen readers
   and crawlers. Only the small glyph inside each step is SVG. */

.flow {
  margin: 2.2em 0;
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(4, 1fr);
  counter-reset: flowstep;
}
.flow-step {
  position: relative;
  padding: 18px 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--canvas);
}
.flow-step .flow-ico {
  width: 26px; height: 26px;
  color: var(--brand);
  margin-bottom: 10px;
}
/* h3 rather than h4: these sit under the section's h2, and jumping a level
   fails the heading-order check even though it looks identical. */
.flow-step h3 {
  font-size: .93rem;
  margin: 0 0 5px;
  letter-spacing: -.01em;
}
.flow-step p {
  margin: 0;
  font-size: .84rem;
  line-height: 1.5;
  color: var(--muted);
}
/* Connector chevrons between steps on wide screens. */
.flow-step + .flow-step::before {
  content: "";
  position: absolute;
  left: -9px; top: 50%;
  width: 7px; height: 7px;
  border-top: 2px solid var(--brand-line);
  border-right: 2px solid var(--brand-line);
  transform: translateY(-50%) rotate(45deg);
}

.figcap {
  font-size: .84rem;
  color: var(--muted);
  text-align: center;
  margin: -1.1em 0 2.2em;
}

/* ── Comparison table ──────────────────────────────────────────────────── */

.cmp-wrap {
  margin: 2.1em 0;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.cmp {
  width: 100%;
  min-width: 520px;
  border-collapse: collapse;
  font-size: .95rem;
}
.cmp th, .cmp td {
  padding: 13px 16px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line-soft);
  line-height: 1.55;
}
.cmp thead th {
  background: var(--brand-soft);
  color: var(--ink);
  font-size: .82rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--brand-line);
}
.cmp tbody tr:last-child th,
.cmp tbody tr:last-child td { border-bottom: 0; }
.cmp tbody th {
  font-weight: 600;
  color: var(--ink);
  width: 26%;
  background: #fcfcfd;
}
.cmp td { color: var(--text); }

/* ── End-of-article CTA ────────────────────────────────────────────────── */

.article-cta {
  max-width: 700px;
  margin: 10px auto 0;
  padding: 20px 24px 0;
}
.article-cta-box {
  background: var(--ink);
  border-radius: var(--radius-lg);
  padding: 32px 30px;
  text-align: center;
  color: #fff;
}
.article-cta-box h3 { color: #fff; margin-bottom: 8px; font-size: 1.22rem; }
.article-cta-box p {
  color: rgba(255,255,255,.72);
  margin: 0 auto 20px;
  max-width: 40ch;
  font-size: .97rem;
  line-height: 1.6;
}

/* ── Related guides ────────────────────────────────────────────────────── */

.related {
  max-width: 700px;
  margin: 0 auto;
  padding: 54px 24px 70px;
}
.related > h2 {
  font-size: 1.05rem;
  margin-bottom: 16px;
  color: var(--muted);
  font-weight: 600;
  letter-spacing: .01em;
}
.related-grid { display: grid; gap: 14px; grid-template-columns: 1fr 1fr; }

/* ── Cards (index + related) ───────────────────────────────────────────── */

.blog-card {
  display: block;
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--canvas);
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.blog-card:hover {
  border-color: var(--brand-line);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}
.blog-card .blog-tag { margin-bottom: 12px; font-size: .68rem; padding: 4px 10px; }
/* h2 on the index (the cards are the page's top-level items, under its h1),
   h3 in the related strip (which sits under its own h2). Same appearance. */
.blog-card h2,
.blog-card h3 { margin: 0 0 7px; font-size: 1.08rem; line-height: 1.3; }
.blog-card p { margin: 0; color: var(--muted); font-size: .93rem; line-height: 1.55; }
.blog-card .card-read {
  display: block;
  margin-top: 12px;
  font-size: .8rem;
  color: var(--muted);
}

/* ── Index page ────────────────────────────────────────────────────────── */

.blog-index-hero {
  padding: 76px 0 14px;
  text-align: center;
  background:
    radial-gradient(52rem 20rem at 50% -20%, var(--brand-soft) 0%, transparent 65%),
    var(--canvas);
}
.blog-index-hero h1 { font-size: clamp(1.9rem, 3.6vw, 2.6rem); margin-bottom: 12px; }
.blog-index-hero p {
  color: var(--muted);
  max-width: 44ch;
  margin: 0 auto;
  line-height: 1.65;
  font-size: 1.03rem;
}

.blog-list {
  max-width: 760px;
  margin: 0 auto;
  padding: 40px 24px 76px;
  display: grid;
  gap: 16px;
}

/* Names the list for screen readers, and keeps the document's heading levels
   contiguous (h1 → h2 → h3 cards → h4 footer) without a visible label the
   design doesn't need. */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* ── Responsive ────────────────────────────────────────────────────────── */

@media (max-width: 760px) {
  .flow { grid-template-columns: 1fr 1fr; }
  .flow-step + .flow-step::before { display: none; }
  .related-grid { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .blog-hero { padding: 52px 0 28px; }
  .article { padding: 34px 22px 8px; }
  .article > p:first-child { font-size: 1.08rem; }
  .flow { grid-template-columns: 1fr; }
  .pull { font-size: 1.06rem; }
  .article-cta-box { padding: 26px 22px; }
}
