/* ============================================================================
 * Shared responsive rules for blog.html and every post in blog/.
 *
 * These pages are standalone: each carries its own inline <style> for its own
 * layout. Only the responsive block is shared, because it was identical in 21
 * files and every tweak meant 21 edits.
 *
 * Loaded with a plain <link>. If it ever 404s the pages still render — they
 * just lose their mobile tuning — because all base styling stays inline.
 * `npm run check-sync` covers css/ so the public/ copy cannot drift.
 * ========================================================================== */

/* ── Tablet: 769–900px ──────────────────────────────────────────────────────
 * Previously unhandled. The nav still rendered every link at full desktop
 * spacing, which does not fit a 768px tablet, while .posts had already
 * collapsed to a single very wide column at 900px.
 */
@media (max-width: 900px) {
  nav { padding: 16px 24px; }
  .nav-links { gap: 18px; }
  .nav-links a { font-size: 14px; }
  .nav-btn { padding: 9px 16px; }

  /* index only — harmless on post pages, which have no .posts */
  .posts { grid-template-columns: repeat(2, 1fr); gap: 22px; padding: 0 24px 64px; }
  .hero { padding: 56px 24px 44px; }
  .hero h1 { font-size: 42px; }

  /* post pages only */
  .wrap { padding: 44px 24px 80px; }
}

/* ── Phone: ≤768px ───────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  /* Six nav items cannot fit a 375px screen — the wordmark and "How It Works"
     overlapped. Keep the logo and the CTA, drop the rest; posts still carry
     their own "← Back to blog" link in the body. */
  nav { padding: 14px 18px; gap: 12px; }
  .logo { font-size: 19px; }
  .nav-links { gap: 14px; }
  .nav-links a:not(.nav-btn) { display: none; }
  .nav-btn { padding: 9px 15px; font-size: 13px; }

  /* ── index ── */
  .hero { padding: 38px 20px 34px; }
  /* The hard <br> after "other" is gone; balance evens the lines instead. */
  .hero h1 { font-size: clamp(30px, 7.6vw, 48px); line-height: 1.18; }
  .hero p { font-size: 16px; }
  .hero-label { font-size: 11px; letter-spacing: 1.6px; margin-bottom: 12px; }
  .posts { grid-template-columns: 1fr; padding: 0 20px 56px; gap: 18px; }
  .post-card { padding: 22px 20px; }
  .post-title { font-size: 19px; }
  .featured .post-title { font-size: 23px; }
  .featured .post-desc { font-size: 15px; }
  .cta { padding: 44px 20px; }
  .cta h2 { font-size: 26px; }
  .cta p { font-size: 15px; }

  /* ── tap targets ──────────────────────────────────────────────────────────
   * Measured at 375px: footer links were 16px tall and the mid-article hook
   * CTA 27px, against a 44px guideline. Padding grows the touchable area
   * without moving the text; the negative margin keeps the rows tight.
   * Article body links are deliberately excluded — padding those would open
   * visible gaps mid-sentence and overlap adjacent lines. */
  footer a, .footer-links a, .rc-hook-btn, .back, .post-read {
    display: inline-block;
    padding-block: 10px;
    margin-block: -6px;
  }
  footer > div, .footer-links { row-gap: 4px; }

  /* ── posts ── */
  /* 60px of top padding under a nav that already has its own is a lot of
     empty screen on a phone. */
  .wrap { padding: 28px 20px 64px; }
  .back { margin-bottom: 24px; }
  h1 { font-size: clamp(27px, 7.2vw, 42px); line-height: 1.25; text-wrap: balance; }
  h2 { font-size: 21px; margin: 36px 0 14px; }
  h3 { font-size: 17px; margin: 28px 0 10px; }
  .meta { margin-bottom: 28px; padding-bottom: 22px; }
  p, ul, ol { font-size: 15.5px; }
  ul, ol { padding-left: 20px; }
  /* Card chrome was eating ~56px of a 375px width. */
  .callout { padding: 18px; margin: 26px 0; }
  .cta-inline { padding: 26px 20px; margin: 36px 0; }
  .tip { padding: 14px 16px; }
  footer { padding: 26px 20px; }
}
