/* Long-form pages: articles, case studies and lessons.
   Uses the site's fonts and colours from style.css. */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Outfit:wght@500;600;700;800&display=swap');

:root {
  --bg: #ffffff;
  --paper: #f8fafc;
  --text: #0f172a;
  --muted: #475569;
  --line: #e2e8f0;
  --accent: #0d9488;
  --accent-soft: #ccfbf1;
  --ink: #111111;
  --font-s: 'Inter', sans-serif;
  --font-h: 'Outfit', sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { background: var(--bg); color: var(--text); font-family: var(--font-s); line-height: 1.7; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: var(--accent); }

/* Top bar */
.lf-bar { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,0.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.lf-bar-inner { max-width: 1100px; margin: 0 auto; padding: 0.9rem 1.25rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.lf-name { font-family: var(--font-h); font-weight: 800; font-size: 1.15rem; color: var(--text); text-decoration: none; letter-spacing: -0.02em; }
.lf-links { display: flex; align-items: center; gap: 1.25rem; }
.lf-links a { color: var(--muted); text-decoration: none; font-size: 0.92rem; font-weight: 500; }
.lf-links a:hover { color: var(--text); }
.lf-links a.lf-cta { background: var(--ink); color: #fff; padding: 0.55rem 1rem; border-radius: 999px; font-weight: 600; }
@media (max-width: 680px) { .lf-links a:not(.lf-cta) { display: none; } }

/* Article */
.lf-wrap { max-width: 740px; margin: 0 auto; padding: 3rem 1.25rem 4rem; }
.lf-crumbs { font-size: 0.85rem; color: var(--muted); margin-bottom: 1.5rem; }
.lf-crumbs a { color: var(--muted); }
.lf-kicker { display: inline-block; font-size: 0.78rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); margin-bottom: 0.75rem; }
.lf-wrap h1 { font-family: var(--font-h); font-size: clamp(2rem, 5vw, 3rem); line-height: 1.1; letter-spacing: -0.03em; margin-bottom: 1rem; }
.lf-dek { font-size: 1.2rem; color: var(--muted); margin-bottom: 1.25rem; }
.lf-meta { font-size: 0.88rem; color: var(--muted); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 0.75rem 0; margin-bottom: 2.5rem; }
.lf-body h2 { font-family: var(--font-h); font-size: 1.65rem; line-height: 1.2; letter-spacing: -0.02em; margin: 2.75rem 0 1rem; }
.lf-body h3 { font-family: var(--font-h); font-size: 1.25rem; margin: 2rem 0 0.75rem; }
.lf-body p { font-size: 1.08rem; margin-bottom: 1.25rem; }
.lf-body ul, .lf-body ol { font-size: 1.08rem; margin: 0 0 1.25rem 1.4rem; }
.lf-body li { margin-bottom: 0.45rem; }
.lf-body strong { color: var(--ink); }
.lf-body code { font-family: 'Consolas', 'Courier New', monospace; font-size: 0.92em; background: var(--paper); border: 1px solid var(--line); padding: 0.05rem 0.35rem; border-radius: 6px; }
.lf-body pre { background: #0f172a; color: #e2e8f0; padding: 1.1rem 1.25rem; border-radius: 12px; overflow-x: auto; margin-bottom: 1.5rem; font-size: 0.92rem; line-height: 1.6; }
.lf-body pre code { background: none; border: 0; padding: 0; color: inherit; }
.lf-body figure { margin: 2rem 0; }
.lf-body figure img { width: 100%; border-radius: 14px; border: 1px solid var(--line); }
.lf-body figcaption { font-size: 0.88rem; color: var(--muted); margin-top: 0.6rem; }
.lf-body blockquote { border-left: 3px solid var(--accent); padding: 0.25rem 0 0.25rem 1.1rem; margin: 1.5rem 0; color: var(--muted); font-size: 1.1rem; }

/* Numbers, formulas and tables */
.lf-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; margin: 2rem 0; }
.lf-stats div { background: #fff; padding: 1.1rem; }
.lf-stats b { display: block; font-family: var(--font-h); font-size: 1.6rem; line-height: 1.1; color: var(--ink); }
.lf-stats span { font-size: 0.85rem; color: var(--muted); }
.formula { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 1.25rem; margin: 1.5rem 0; text-align: center; overflow-x: auto; }
.formula .eq { font-family: 'Cambria Math', 'Times New Roman', serif; font-size: 1.35rem; color: var(--ink); white-space: nowrap; }
.formula .say { display: block; font-size: 0.95rem; color: var(--muted); margin-top: 0.6rem; font-family: var(--font-s); white-space: normal; }
.kid { background: #fefce8; border: 1px solid #fde68a; border-radius: 14px; padding: 1rem 1.2rem; margin: 1.5rem 0; }
.kid b { display: block; font-family: var(--font-h); font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase; color: #92400e; margin-bottom: 0.3rem; }
.lf-table { width: 100%; border-collapse: collapse; margin: 1.25rem 0 1.75rem; font-size: 0.98rem; }
.lf-table th, .lf-table td { border-bottom: 1px solid var(--line); padding: 0.6rem 0.5rem; text-align: left; }
.lf-table th { font-family: var(--font-h); font-weight: 600; }
.lf-scroll { overflow-x: auto; }
.lf-gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; margin: 2rem 0; }
.lf-gallery img { width: 100%; border-radius: 12px; border: 1px solid var(--line); }

/* Buttons and call to action */
.lf-btns { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 1.5rem 0 2rem; }
.lf-btn { display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.75rem 1.2rem; border-radius: 999px; font-weight: 600; font-size: 0.95rem; text-decoration: none; border: 1px solid var(--ink); color: var(--ink); background: #fff; }
.lf-btn.dark { background: var(--ink); color: #fff; }
.lf-cta-box { margin-top: 3.5rem; background: var(--ink); color: #fff; border-radius: 20px; padding: 2rem; }
.lf-cta-box h2 { font-family: var(--font-h); font-size: 1.6rem; margin: 0 0 0.5rem; color: #fff; }
.lf-cta-box p { color: #cbd5e1; margin-bottom: 1.25rem; font-size: 1.02rem; }
.lf-cta-box .lf-btn { border-color: #fff; }
.lf-cta-box .lf-btn.dark { background: #fff; color: var(--ink); }
.lf-cta-box .lf-btn:not(.dark) { background: transparent; color: #fff; }
.lf-next { margin-top: 2.5rem; display: grid; gap: 0.75rem; }
.lf-next a { display: block; border: 1px solid var(--line); border-radius: 14px; padding: 1rem 1.2rem; text-decoration: none; color: var(--text); }
.lf-next a span { display: block; font-size: 0.8rem; color: var(--muted); }
.lf-next a strong { font-family: var(--font-h); font-size: 1.08rem; }

/* Index of lessons */
.lf-cards { display: grid; gap: 1rem; margin: 2rem 0; }
.lf-cards a { display: block; border: 1px solid var(--line); border-radius: 16px; padding: 1.4rem; text-decoration: none; color: var(--text); }
.lf-cards a:hover { border-color: var(--ink); }
.lf-cards small { color: var(--accent); font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; font-size: 0.75rem; }
.lf-cards h3 { font-family: var(--font-h); font-size: 1.3rem; margin: 0.35rem 0; }
.lf-cards p { color: var(--muted); font-size: 0.98rem; }

.lf-foot { border-top: 1px solid var(--line); padding: 2rem 1.25rem; text-align: center; font-size: 0.88rem; color: var(--muted); }
.lf-foot a { color: var(--muted); margin: 0 0.5rem; }

/* Learn index: topics and filter */
.lf-filters { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 1.5rem 0 0.5rem; }
.lf-filter { font: inherit; font-size: 0.9rem; padding: 0.45rem 0.95rem; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--text); cursor: pointer; }
.lf-filter.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.lf-topic { margin-top: 2.25rem; }
.lf-topic h2 { margin-top: 0; }
.lf-topic-intro { color: var(--muted); }
