/* ============================================================================
   editorial.css — long-form marketing pages (/compare, /guides/*)

   This file deliberately COPIES the landing page's primitives verbatim rather
   than inventing a parallel vocabulary: same class names (.wrap, .eyebrow,
   .lede, .btn, .section-alt), same values, same heading scale. If you change one
   change both — or better, lift these into shared/ and have landing/ use them
   too, which is where this should end up.

   Lives in shared/ because that dir is already volume-mounted; a new dir needs
   its own mount in docker-compose.yml or resolveStaticDir throws at boot and the
   whole site 502s.

   ⚠️ BUMP THE ?v= QUERY IN EVERY <link> WHEN YOU EDIT THIS FILE.
   Cloudflare serves it with `cache-control: public, max-age=2592000` — thirty
   days. Editing without bumping means nobody sees the change until the TTL
   expires. This has already cost us once: the font fix below shipped, went live,
   and was invisible for days behind a cached ?v=1.

   Depends on design-tokens.css + site-chrome.css being loaded first.
   ========================================================================== */

/* ── the resets every other page carries in its inline <style> ──────
   A page built from shared stylesheets alone inherits NEITHER, and both failures
   are silent: without box-sizing, .site-wrap's padding pushes the header 32px
   past the viewport (horizontal scrollbar on every phone); without the font, the
   whole page renders in Times.

   Headings use --font-body (Inter), same as the landing page. NEVER
   --font-display: it's 'Fraunces', Georgia, serif and Fraunces is loaded nowhere
   on the public site, so it silently renders as Georgia. */
*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text-primary);
  background: var(--bg-primary);
  -webkit-font-smoothing: antialiased;
}

/* ── landing-page primitives (copied verbatim) ──────────────────── */
.wrap {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding-inline: max(var(--space-4), env(safe-area-inset-left));
}
section { padding-block: clamp(72px, 9vw, 140px); }
.section-alt { background: var(--bg-card); }

.eyebrow {
  display: inline-block;
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--accent-text);
  background: var(--accent-soft);
  padding: 6px 14px;
  border-radius: var(--radius-pill);
}

h1, h2, h3 {
  font-family: var(--font-body);
  color: var(--text-primary);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.05;
}
h1 { font-size: clamp(40px, 6.5vw, 76px); }
h2 { font-size: clamp(30px, 4.5vw, 50px); line-height: 1.1; }
h3 { font-size: clamp(20px, 2vw, 24px); font-weight: 700; line-height: 1.2; letter-spacing: -0.015em; }
.accent-line { color: var(--accent-text); display: block; }

/* <em> in a heading or lede is the accent colour, not italic — the landing
   page's convention, so a headline can be written as one string. */
em { font-style: normal; color: var(--accent-text); font-weight: inherit; }

.lede {
  font-size: clamp(17px, 1.6vw, 20px);
  color: var(--text-secondary);
  max-width: 60ch;
  line-height: 1.55;
}
.section-head { text-align: center; margin-bottom: clamp(40px, 5vw, 64px); }
.section-head h2 { max-width: 22ch; margin: 14px auto 0; }
.section-head .lede { margin: 16px auto 0; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 14px 22px;
  border-radius: var(--radius-pill);
  font-weight: 600; font-size: var(--text-base);
  border: 1px solid transparent;
  text-decoration: none;
  transition: transform .18s, box-shadow .18s, background .18s, border-color .18s, color .18s;
}
.btn-primary {
  background: var(--accent); color: #FFF;
  box-shadow: 0 8px 22px rgba(123, 91, 245, 0.25);
}
.btn-primary:hover { background: var(--accent-text); transform: translateY(-1px); box-shadow: 0 12px 28px rgba(123, 91, 245, 0.32); }
.btn-ghost { background: transparent; color: var(--text-primary); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent-text); }

/* ── hero ───────────────────────────────────────────────────────── */
.ed-hero {
  background: linear-gradient(135deg, #F3EEFC 0%, #FAF7FE 45%, #FEF0EB 100%);
  padding-block: clamp(56px, 7vw, 104px) clamp(48px, 6vw, 80px);
}
/* Match .hero-top h1 on the landing page — NOT the 76px page-wide h1 default.
   The landing deliberately sizes its hero headline down so it fits the column;
   using the base size here made these pages read as a different site. */
.ed-hero h1 {
  max-width: 18ch;
  margin: 20px 0 0;
  font-size: clamp(36px, 5vw, 60px);
  line-height: 1.05;
  letter-spacing: -0.03em;
}
.ed-hero .lede { margin: 20px 0 0; }
.ed-hero-actions { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; margin-top: 32px; }
.ed-hero-note { font-size: var(--text-sm); color: var(--text-muted); }

/* ── body copy ──────────────────────────────────────────────────────
   The CONTAINER is full site width so everything lines up with the header and
   footer; the TEXT caps at a readable measure. Tables and cards opt out. */
.ed-body > .wrap > * { max-width: 780px; }
.ed-body > .wrap > .ed-table-scroll,
.ed-body > .wrap > .ed-cards { max-width: 100%; }

.ed-body h2 { margin: clamp(48px, 5vw, 72px) 0 18px; font-size: clamp(26px, 3vw, 36px); }
.ed-body h2:first-child { margin-top: 0; }
.ed-body h3 { margin: 34px 0 10px; }
.ed-body p {
  margin: 0 0 18px;
  font-size: 18px;
  line-height: 1.65;
  color: var(--text-secondary);
}
.ed-body strong { color: var(--text-primary); font-weight: 700; }
.ed-body ul { margin: 0 0 20px; padding-left: 22px; }
.ed-body li {
  font-size: 18px; line-height: 1.65;
  color: var(--text-secondary); margin-bottom: 10px;
}
.ed-body a { color: var(--accent-text); font-weight: 600; }

/* The one line that matters, per section */
.ed-pull {
  margin: 32px 0; padding: 6px 0 6px 22px;
  border-left: 3px solid var(--accent);
  font-size: clamp(19px, 1.8vw, 23px); line-height: 1.45;
  font-weight: 700; letter-spacing: -0.02em; color: var(--text-primary);
}

/* Arithmetic the reader can check — never a claimed statistic */
.ed-sum {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 26px 28px; margin: 30px 0;
  box-shadow: var(--shadow-sm);
}
.ed-sum-title {
  font-size: var(--text-xs); font-weight: 700; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--accent-text); margin-bottom: 16px;
}
.ed-sum-row {
  display: flex; justify-content: space-between; gap: 16px;
  padding: 10px 0; font-size: var(--text-base);
  color: var(--text-secondary); border-bottom: 1px solid var(--border);
}
.ed-sum-row:last-of-type { border-bottom: 0; }
.ed-sum-row.total {
  font-weight: 800; color: var(--text-primary);
  font-size: var(--text-xl); padding-top: 16px; letter-spacing: -0.02em;
}
.ed-sum-note { font-size: var(--text-sm); color: var(--text-muted); margin-top: 14px; line-height: 1.55; }

/* What the product does NOT do */
.ed-limit {
  background: #FFF9EC; border: 1px solid #F2E4C4; border-left: 4px solid #E2B857;
  border-radius: var(--radius-lg); padding: 22px 26px; margin: 32px 0;
}
.ed-limit-title {
  font-size: var(--text-xs); font-weight: 700; letter-spacing: 0.14em;
  text-transform: uppercase; color: #8A5A12; margin-bottom: 10px;
}
.ed-limit p { margin: 0; font-size: var(--text-base); line-height: 1.6; color: #6B4A16; }

/* ── comparison table ───────────────────────────────────────────── */
.ed-table-scroll { overflow-x: auto; margin: 32px 0; -webkit-overflow-scrolling: touch; }
.ed-table {
  width: 100%; border-collapse: separate; border-spacing: 0;
  min-width: 820px; font-size: var(--text-sm);
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden;
}
.ed-table th, .ed-table td {
  padding: 15px 16px; text-align: left;
  border-bottom: 1px solid var(--border); vertical-align: top;
}
.ed-table tbody tr:last-child th, .ed-table tbody tr:last-child td { border-bottom: 0; }
.ed-table thead th {
  font-size: var(--text-xs); font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--text-muted);
  background: var(--bg-muted); white-space: nowrap;
}
.ed-table tbody th { font-weight: 700; color: var(--text-primary); white-space: nowrap; }
.ed-table td { color: var(--text-secondary); }
.ed-table .col-us { background: var(--accent-soft); }
.ed-table thead .col-us { background: rgba(123, 91, 245, .18); color: var(--accent-text); }
.ed-yes { color: #1B7F4C; font-weight: 700; }
.ed-no  { color: var(--text-muted); }
.ed-part { color: #8A5A12; font-weight: 600; }

/* ── guide cards ────────────────────────────────────────────────── */
.ed-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin-top: 40px; }
@media (max-width: 780px) { .ed-cards { grid-template-columns: 1fr; } }
.ed-card {
  display: block; background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 30px 28px 26px; text-decoration: none;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.ed-card:hover {
  transform: translateY(-3px); border-color: var(--accent);
  box-shadow: 0 14px 36px rgba(123, 91, 245, .14);
}
.ed-card-num {
  font-size: var(--text-xs); font-weight: 700; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--accent-text); margin-bottom: 12px;
}
.ed-card h3 { margin: 0 0 10px; }
.ed-card p { margin: 0; font-size: var(--text-base); line-height: 1.6; color: var(--text-secondary); }
.ed-card-go { display: inline-block; margin-top: 18px; font-size: var(--text-sm); font-weight: 700; color: var(--accent-text); }

/* ── CTA band ───────────────────────────────────────────────────── */
.ed-cta { background: var(--bg-card); border-top: 1px solid var(--border); text-align: center; }
.ed-cta h2 { max-width: 20ch; margin: 0 auto 16px; }
.ed-cta .lede { margin: 0 auto 28px; }
.ed-cta-note { display: block; margin-top: 16px; font-size: var(--text-sm); color: var(--text-muted); }

/* ── prev/next ──────────────────────────────────────────────────── */
.ed-next {
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  margin-top: 56px; padding-top: 28px; border-top: 1px solid var(--border);
  font-size: var(--text-sm);
}
.ed-next a { color: var(--accent-text); font-weight: 700; text-decoration: none; }
.ed-next a:hover { text-decoration: underline; }
