/* ============================================
   OLIVER SIGNORINI — Lead Magnet
   Shared web + print styles
   ============================================ */

.lm {
  max-width: var(--max-width-narrow);
  margin: 0 auto;
  padding: var(--space-3xl) var(--space-xl) var(--space-2xl);
  font-family: var(--font-body);
  color: var(--text-primary);
  line-height: 1.7;
}

.lm h1 {
  font-family: var(--font-display);
  font-size: var(--text-4xl);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin: 0 0 var(--space-sm) 0;
}

.lm h2 {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 800;
  margin: var(--space-2xl) 0 var(--space-md) 0;
  page-break-after: avoid;
}

.lm h3 {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 700;
  margin: var(--space-xl) 0 var(--space-sm) 0;
  page-break-after: avoid;
}

.lm p {
  margin: var(--space-md) 0;
  max-width: 65ch;
}

.lm ul, .lm ol {
  margin: var(--space-md) 0;
  padding-left: var(--space-lg);
  list-style: revert; /* override global.css ul/ol reset */
}

.lm li {
  margin: var(--space-xs) 0;
}

.lm blockquote {
  border-left: 3px solid var(--accent-primary);
  padding-left: var(--space-md);
  color: var(--text-secondary);
  font-style: italic;
  margin: var(--space-lg) 0;
}

.lm code {
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  font-size: 0.9em;
  background: var(--bg-card);
  padding: 0.15rem 0.4rem;
  border-radius: 3px;
  color: var(--accent-primary);
}

.lm pre {
  background: var(--bg-card);
  padding: var(--space-md);
  border-radius: var(--border-radius);
  overflow-x: auto;
  page-break-inside: avoid;
  margin: var(--space-lg) 0;
}

.lm pre code {
  background: transparent;
  padding: 0;
  color: inherit;
}

.lm table {
  width: 100%;
  border-collapse: collapse;
  margin: var(--space-lg) 0;
  page-break-inside: avoid;
  font-size: 0.95em;
}

.lm th, .lm td {
  text-align: left;
  padding: var(--space-sm) var(--space-md);
  border-bottom: 1px solid var(--border-light);
}

.lm th {
  font-weight: 600;
  background: var(--bg-card);
  font-family: var(--font-display);
  letter-spacing: -0.01em;
}

.lm a {
  color: var(--accent-primary);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.lm a:hover {
  color: var(--accent-secondary);
}

.lm__description {
  font-size: var(--text-lg);
  color: var(--text-secondary);
  margin: 0 0 var(--space-xl) 0;
  max-width: 65ch;
}

.lm__type-badge {
  display: inline-block;
  font-family: var(--font-display);
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  background: var(--accent-primary);
  color: var(--white);
  padding: 0.3rem 0.7rem;
  border-radius: 3px;
  margin-bottom: var(--space-md);
}

.lm__cover {
  display: none; /* hidden in web view, shown in print only */
}

.lm__download {
  display: inline-block;
  margin-top: var(--space-lg);
  padding: var(--space-md) var(--space-xl);
  background: var(--accent-primary);
  color: var(--white) !important;
  text-decoration: none !important;
  border-radius: var(--border-radius);
  font-weight: 600;
  font-family: var(--font-display);
  letter-spacing: -0.01em;
  transition: background var(--transition-base), transform var(--transition-base);
  box-shadow: var(--shadow-md);
}

.lm__download:hover {
  background: var(--accent-secondary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.lm__signoff {
  margin-top: var(--space-3xl);
  padding-top: var(--space-xl);
  border-top: 2px solid var(--accent-primary);
  text-align: center;
  font-size: var(--text-base);
}

.lm__signoff p {
  margin: var(--space-xs) auto;
  max-width: none;
}

.lm__footer-web {
  margin-top: var(--space-2xl);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--border-light);
  font-size: var(--text-sm);
  color: var(--text-muted);
  text-align: center;
}

/* ============================================
   PRINT — applied when generating PDF via Playwright
   ============================================ */
@media print {
  @page {
    size: A4;
    margin: 18mm 15mm 22mm 15mm;
    @bottom-center {
      content: "oliversignorini.com  •  page " counter(page);
      font-family: 'Space Grotesk', sans-serif;
      font-size: 9pt;
      color: #8A9BAD;
    }
  }

  body {
    background: var(--white) !important;
    overflow-x: visible !important;
  }

  /* Hide web-only chrome */
  .nav,
  .nav__mobile-menu,
  #hero-canvas,
  .skip-link,
  .lm__download,
  .lm__footer-web {
    display: none !important;
  }

  /* Show cover page in print */
  .lm__cover {
    display: flex !important;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 40mm);
    page-break-after: always;
    text-align: center;
  }

  .lm__cover .lm__type-badge {
    margin-bottom: var(--space-lg);
  }

  .lm__cover h1 {
    font-size: var(--text-5xl);
    max-width: 16ch;
  }

  .lm__cover .lm__description {
    font-size: var(--text-xl);
    max-width: 540px;
    margin: var(--space-md) auto var(--space-xl);
    color: var(--text-secondary);
  }

  .lm__cover .lm__meta {
    font-size: var(--text-sm);
    color: var(--text-muted);
    font-family: var(--font-display);
    letter-spacing: 0.04em;
  }

  .lm {
    padding: 0;
    max-width: none;
  }

  .lm h1, .lm h2, .lm h3 {
    color: var(--text-primary) !important;
  }

  .lm__signoff {
    page-break-before: auto;
  }
}
