/* =========================================================
   LFL Template V1.0 — site.css (FULL FILE)
   Update: Category pill + card gradient tints aligned by category
   Science = pastel green, Social Studies = pastel brown,
   Language Arts = pastel blue, Thinking & SEL = pastel purple
========================================================= */

/* Remove default browser whitespace + set global typography */
html,
body {
  margin: 0;
  padding: 0;
  border: 0;
  font-family: "Nunito", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

/* Universal box sizing */
*,
*::before,
*::after {
  box-sizing: border-box;
}

:root{
  /* Background gradient (Option 2) */
  --bg-top: #f7f4f0;
  --bg-mid: #ebe6de;
  --bg-bottom: #dfd7cc;

  /* Card surfaces */
  --paperTop: #ffffff;
  --paperMid: #fbf6ee;
  --paperBottom: #f1ebdf;

  --ink: #2a2f33;
  --muted: #6b6a63;
  --stroke: rgba(42,47,51,.16);
  --stroke-strong: rgba(42,47,51,.26);
  --radius: 18px;

  /* Shadows tuned for darker tan */
  --cardShadow:
    0 6px 14px rgba(60,45,20,.14),
    0 2px 4px rgba(60,45,20,.10);

  --cardShadowHover:
    0 14px 30px rgba(60,45,20,.22),
    0 6px 10px rgba(60,45,20,.14);

  /* Icon tile shadow (constant) */
  --iconShadow:
    0 5px 12px rgba(60,45,20,.20),
    inset 0 1px 0 rgba(255,255,255,.55);

  /* Category “ink” colors (existing) */
  --science: #355f4a;
  --social: #7a4a2e;
  --language: #2f5d7c;
  --thinking: #5b4b7a;

  /* NEW: Pastel tint colors (soft) */
  --scienceTint: rgba(120, 200, 140, 0.26);
  --socialTint: rgba(180, 140, 95, 0.26);
  --languageTint: rgba(110, 170, 230, 0.26);
  --thinkingTint: rgba(170, 130, 220, 0.26);

  /* Top nav */
  --nav-bg: rgba(26, 39, 46, .92);
  --nav-stroke: rgba(255,255,255,.12);
  --nav-link: rgba(255,255,255,.88);
  --nav-link-hover: rgba(255,255,255,1);

  /* Local sprite image */
  --cat-sprite: url("/assets/img/cat-bg.webp"); /* 4-panel image */
}

.lfl{
  font-family: "Nunito", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background:
    radial-gradient(1200px 500px at 50% -200px, rgba(255,255,255,.35), transparent 60%),
    linear-gradient(180deg, var(--bg-top) 0%, var(--bg-mid) 45%, var(--bg-bottom) 100%);
  color: var(--ink);
}

/* Constrain content width */
.lfl-wrap{
  max-width: 980px;
  margin: 0 auto;
  padding: 0 18px;
}

/* ---------------------------
   Top Navigation Strip
---------------------------- */
.lfl-topnav{
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--nav-bg);
  border-bottom: 1px solid var(--nav-stroke);
  backdrop-filter: blur(10px);
}

.lfl-topnav-inner{
  max-width: 980px;
  margin: 0 auto;
  padding: 10px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

/* Logo */
.lfl-logo{
  height: 60px;          /* reserve height */
  display: inline-flex;
  align-items: center;
}
.lfl-logo img{
  height: 60px;
  width: auto;
  display: block;
}

/* Desktop links */
.lfl-navlinks{
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
}
.lfl-navlinks a{
  color: var(--nav-link);
  font-weight: 850;
  font-size: 14px;
  letter-spacing: .15px;
  text-decoration: none;
  padding: 6px 8px;
  border-radius: 10px;
  transition: background .14s ease, color .14s ease;
  white-space: nowrap;
}
.lfl-navlinks a:hover{
  color: var(--nav-link-hover);
  background: rgba(255,255,255,.10);
}

/* Hamburger button (JS controlled) */
.lfl-menuBtn{
  display: none;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.08);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.lfl-menuBtn:hover{ background: rgba(255,255,255,.12); }

.lfl-burger{
  width: 18px;
  height: 2px;
  background: rgba(255,255,255,.92);
  border-radius: 999px;
  position: relative;
  display:block;
}
.lfl-burger:before,
.lfl-burger:after{
  content:"";
  position:absolute;
  left:0;
  width:18px;
  height:2px;
  background: rgba(255,255,255,.92);
  border-radius: 999px;
}
.lfl-burger:before{ top:-6px; }
.lfl-burger:after{ top:6px; }

/* Dropdown panel */
.lfl-dropdown{
  display: none;
  border-top: 1px solid rgba(255,255,255,.12);
  background: rgba(26, 39, 46, .96);
}
.lfl-dropdown-inner{
  max-width: 980px;
  margin: 0 auto;
  padding: 10px 18px 14px;
  display: grid;
  gap: 8px;
}
.lfl-dropdown a{
  color: var(--nav-link);
  font-weight: 850;
  font-size: 14px;
  text-decoration: none;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.10);
}
.lfl-dropdown a:hover{
  color: var(--nav-link-hover);
  background: rgba(255,255,255,.10);
}

/* Open state */
.lfl-topnav.is-open .lfl-dropdown{ display: block; }

/* Responsive switch */
@media (max-width: 860px){
  .lfl-navlinks{ display:none; }
  .lfl-menuBtn{ display:flex; }
}

/* ---------------------------
   Page Content
---------------------------- */
.lfl-main{ padding: 22px 0 44px; }

/* Title */
.lfl-title{
  text-align:center;
  margin: 0 0 24px 0;
}
.lfl-title h1{
  margin:0 0 6px 0;
  font-size: clamp(28px, 3.6vw, 40px);
  font-weight: 900;
  letter-spacing:.2px;
}
.lfl-title p{
  margin:0;
  font-size: 16.5px;
  font-weight: 700;
  color: var(--muted);
}

/* Category Grid: 2 columns → 1 */
.lfl-grid{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
@media (max-width: 700px){
  .lfl-grid{ grid-template-columns: 1fr; }
}

/* =========================================================
   Category Cards (base)
   Update: card tint gradient + pill tint aligned via vars
========================================================= */
.lfl-card{
  /* Category vars (default/fallback) */
  --catTint: rgba(0,0,0,.06);
  --catGradient: linear-gradient(135deg, rgba(0,0,0,.06), rgba(0,0,0,0));
  --catPillBg: rgba(0,0,0,.06);
  --catPillBorder: rgba(0,0,0,.10);

  background-image:
    var(--cat-sprite),
    radial-gradient(700px 220px at 10% 0%, rgba(255,255,255,.55), transparent 60%),
    linear-gradient(180deg, var(--paperTop) 0%, var(--paperMid) 45%, var(--paperBottom) 100%);
  background-repeat: no-repeat, no-repeat, no-repeat;
  background-size: 200% 200%, auto, auto;
  background-position: 0% 0%, 0 0, 0 0;
  background-blend-mode: multiply, normal, normal;

  border-radius: var(--radius);
  box-shadow: var(--cardShadow);
  padding: 18px;
  display:flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  transition: transform .18s ease, box-shadow .18s ease;
}

/* Readability overlay */
.lfl-card::before{
  content:"";
  position:absolute;
  inset:0;

  /* UPDATED: include a soft category tint gradient */
  background:
    var(--catGradient),
    rgba(255,255,255,.62);

  pointer-events:none;
  z-index: 0;
}

/* Border overlay ON TOP (prevents "missing border" anywhere) */
.lfl-card::after{
  content:"";
  position:absolute;
  inset:0;
  border-radius: inherit;
  border: 1px solid var(--stroke-strong);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.40);
  pointer-events:none;
  z-index: 3;
}

/* Keep all content above overlays */
.lfl-card-inner{ position: relative; z-index: 2; }

.lfl-card:hover{
  transform: translateY(-4px);
  box-shadow: var(--cardShadowHover);
}

/* Sprite quadrant positions */
.lfl-card.science{  background-position:   0%   0%, 0 0, 0 0; }   /* top-left */
.lfl-card.social{   background-position: 100%   0%, 0 0, 0 0; }   /* top-right */
.lfl-card.language{ background-position:   0% 100%, 0 0, 0 0; }   /* bottom-left */
.lfl-card.thinking{ background-position: 100% 100%, 0 0, 0 0; }   /* bottom-right */

/* Assign category tint variables */
.lfl-card.science{
  --catTint: var(--scienceTint);
  --catGradient: linear-gradient(135deg, rgba(120, 200, 140, 0.26), rgba(120, 200, 140, 0.06));
  --catPillBg: rgba(120, 200, 140, 0.18);
  --catPillBorder: rgba(120, 200, 140, 0.32);
}

.lfl-card.social{
  --catTint: var(--socialTint);
  --catGradient: linear-gradient(135deg, rgba(180, 140, 95, 0.26), rgba(180, 140, 95, 0.06));
  --catPillBg: rgba(180, 140, 95, 0.18);
  --catPillBorder: rgba(180, 140, 95, 0.32);
}

.lfl-card.language{
  --catTint: var(--languageTint);
  --catGradient: linear-gradient(135deg, rgba(110, 170, 230, 0.26), rgba(110, 170, 230, 0.06));
  --catPillBg: rgba(110, 170, 230, 0.18);
  --catPillBorder: rgba(110, 170, 230, 0.32);
}

.lfl-card.thinking{
  --catTint: var(--thinkingTint);
  --catGradient: linear-gradient(135deg, rgba(170, 130, 220, 0.26), rgba(170, 130, 220, 0.06));
  --catPillBg: rgba(170, 130, 220, 0.18);
  --catPillBorder: rgba(170, 130, 220, 0.32);
}

/* Card header */
.lfl-head{
  display:flex;
  align-items:center;
  gap:12px;
  margin-bottom: 10px;
}

/* Icon container (STATIC) */
.lfl-icon{
  width:42px;
  height:42px;
  border-radius:14px;
  display:grid;
  place-items:center;
  background: linear-gradient(180deg, rgba(255,255,255,.78), rgba(245,238,225,.92));
  border: 1px solid rgba(60,45,20,.22);
  box-shadow: var(--iconShadow);
}
.lfl-icon svg{
  width:22px;
  height:22px;
  stroke-width:2.2;
  display:block;
}
.lfl-card h2{
  margin:0;
  font-size:20px;
  font-weight:900;
}

/* Lists */
.lfl-list{
  margin:0;
  padding:0;
  list-style:none;
  display:grid;
  gap:8px;
  font-size:14.5px;
  font-weight:700;
  color: var(--muted);
}
.lfl-list li{
  display:flex;
  gap:10px;
  align-items:flex-start;
}
.lfl-dot{
  margin-top:6px;
  width:7px;
  height:7px;
  border-radius:50%;
  background: currentColor;
  opacity:.55;
  flex:0 0 7px;
}

/* Explore links */
.lfl-explore{
  margin-top:14px;
  font-size:15px;
  font-weight:900;
  display:inline-flex;
  align-items:center;
  gap:6px;
  text-decoration: none;
}
.lfl-explore:hover{ text-decoration: underline; }

/* Category color hooks */
.science{ color: var(--science); }
.social{ color: var(--social); }
.language{ color: var(--language); }
.thinking{ color: var(--thinking); }

/* Icon stroke colors */
.science .lfl-icon svg{ color:#2f5a43; }
.social  .lfl-icon svg{ color:#6a3f26; }
.language .lfl-icon svg{ color:#264e69; }
.thinking .lfl-icon svg{ color:#4b3d66; }

/* Keep icons static on hover */
.lfl-card:hover .lfl-icon{ box-shadow: var(--iconShadow); }

/* =========================================================
   Feed Sections (Recent + Picks)
========================================================= */
.lfl-feed{
  margin-top: 42px;
}

.lfl-feed h2{
  margin: 0 0 14px 0;
  font-size: 26px;
  font-weight: 900;
  letter-spacing: .2px;
  text-align: center;
}

.lfl-feed-grid{
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.lfl-feed-card{
  background: linear-gradient(180deg, #ffffff, #f3eee4);
  border-radius: 16px;
  box-shadow:
    0 6px 14px rgba(60,45,20,.12),
    inset 0 1px 0 rgba(255,255,255,.4);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .16s ease, box-shadow .16s ease;
  position: relative; /* needed for border overlay */
}

/* Border overlay ON TOP so it never "disappears" behind images */
.lfl-feed-card::after{
  content:"";
  position:absolute;
  inset:0;
  border-radius: 16px;
  border: 1px solid var(--stroke-strong);
  pointer-events:none;
  z-index: 5;
}

.lfl-feed-card:hover{
  transform: translateY(-3px);
  box-shadow:
    0 12px 26px rgba(60,45,20,.18),
    inset 0 1px 0 rgba(255,255,255,.4);
}

/* =========================================================
   THUMBNAILS (single source of truth) — CLS FIX
========================================================= */
.lfl-thumb{
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: none;
  border-bottom: 1px solid rgba(42,47,51,.10);
}

.lfl-thumb img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block; /* removes baseline whitespace */
  position: relative;
  z-index: 1;
}

/* Top gradient for pill readability */
.lfl-thumb::before{
  content:"";
  position:absolute;
  left:0;
  right:0;
  top:0;
  height: 54px;
  background: linear-gradient(
    180deg,
    rgba(0,0,0,.35) 0%,
    rgba(0,0,0,.18) 55%,
    rgba(0,0,0,0) 100%
  );
  z-index: 1;
  pointer-events:none;
}

/* Pill overlay on feed thumbnails (top-centered) */
.lfl-thumb .lfl-pill{
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;

  background:
    linear-gradient(
      180deg,
      rgba(255,255,255,.82),
      rgba(245,238,225,.96)
    );

  backdrop-filter: saturate(1.05) blur(0.5px);
  white-space: nowrap;
  text-align: center;
  line-height: 1.15;
  max-width: 200px;
}

/* If you also use .lfl-thumb-pill elsewhere, keep it */
.lfl-thumb-pill{
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;

  display: inline-flex;
  align-items: center;

  padding: 3px 10px;
  border-radius: 999px;

  font-size: 11px;
  font-weight: 800;
  letter-spacing: .3px;
  text-transform: uppercase;

  color: #ffffff;
  background: rgba(58, 64, 72, 0.0);
  border: 1px solid rgba(0,0,0,0);

  box-shadow: 0 2px 6px rgba(0,0,0,.75);
  backdrop-filter: blur(4px);
  white-space: nowrap;
  pointer-events: none;
}

/* Body */
.lfl-feed-body{
  padding: 12px 14px 14px;
}

.lfl-feed-body p{
  margin: 0;
  font-size: 14px;
  line-height: 1.4;
  font-weight: 700;
  color: #4f4e47;
}

/* Responsive feed grid */
@media (max-width: 1000px){
  .lfl-feed-grid{ grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 720px){
  .lfl-feed-grid{ grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 420px){
  .lfl-feed-grid{ grid-template-columns: 1fr; }
}

/* ===============================
   LFL Post Layout
=============================== */

.lfl-post {
  max-width: 760px;
  margin: 0 auto;
}

.lfl-post-header {
  text-align: center;
  margin-bottom: 28px;
}

.lfl-post-title {
  font-size: clamp(26px, 4vw, 36px);
  font-weight: 900;
  margin: 0 0 10px 0;
}

.lfl-post-desc {
  font-size: 16px;
  font-weight: 700;
  color: var(--muted);
  margin: 0;
}

.lfl-post-tags {
  list-style: none;
  padding: 0;
  margin: 14px 0 0;
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

.lfl-post-tags li {
  font-size: 12px;
  font-weight: 800;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(0,0,0,.05);
}

.lfl-post-hero {
  margin: 26px 0;
}

.lfl-post-hero img {
  width: 100%;
  border-radius: 18px;
  display: block;
}

.lfl-post-body {
  font-size: 16px;
  line-height: 1.65;
}

.lfl-post-body h2 {
  margin-top: 34px;
  font-size: 22px;
  font-weight: 900;
}

.lfl-post-body ul {
  padding-left: 20px;
}

.lfl-post-body p {
  margin: 14px 0;
}

/* ===============================
   LFL Post Styling (Markdown)
=============================== */

.lfl-post{
  max-width: 900px;
  margin: 0 auto;
}

.lfl-post-header{
  text-align: center;
  margin: 10px 0 18px;
}

.lfl-post-title{
  margin: 0 0 8px;
  font-size: clamp(28px, 3.6vw, 44px);
  font-weight: 900;
  letter-spacing: .2px;
}

.lfl-post-desc{
  margin: 0;
  font-size: 16.5px;
  font-weight: 700;
  color: var(--muted);
}

/* The “paper card” container (matches homepage vibe) */
.lfl-post-card{
  background:
    radial-gradient(700px 220px at 10% 0%, rgba(255,255,255,.55), transparent 60%),
    linear-gradient(180deg, var(--paperTop) 0%, var(--paperMid) 45%, var(--paperBottom) 100%);
  border-radius: var(--radius);
  box-shadow: var(--cardShadow);
  padding: 18px;
  overflow: hidden;
  position: relative;
}

/* Add continuous border overlay for post card too */
.lfl-post-card::after{
  content:"";
  position:absolute;
  inset:0;
  border-radius: inherit;
  border: 1px solid rgba(42, 47, 51, 0.22);
  pointer-events:none;
}

/* Optional hero image */
.lfl-post-hero{
  margin: 0 0 14px;
}

.lfl-post-hero img{
  width: 100%;
  height: auto;
  display: block;
  border-radius: 16px;
}

/* Markdown typography */
.lfl-post-body{
  font-size: 16px;
  line-height: 1.7;
  color: var(--ink);
}

.lfl-post-body p{
  margin: 12px 0;
  font-weight: 700;
  color: #3b3f43;
}

.lfl-post-body h2{
  margin: 26px 0 10px;
  font-size: 22px;
  font-weight: 900;
}

.lfl-post-body h3{
  margin: 20px 0 8px;
  font-size: 18px;
  font-weight: 900;
}

.lfl-post-body ul,
.lfl-post-body ol{
  margin: 10px 0 14px;
  padding-left: 22px;
}

.lfl-post-body li{
  margin: 6px 0;
  font-weight: 750;
  color: #3b3f43;
}

/* Post body links: no underline by default (still obvious on hover) */
.lfl-post-body a{
  text-decoration: none;
  font-weight: 800;
}

.lfl-post-body a:hover,
.lfl-post-body a:focus{
  text-decoration: underline;
  text-underline-offset: 3px;
}

.lfl-post-body blockquote{
  margin: 16px 0;
  padding: 12px 14px;
  border-left: 4px solid rgba(42,47,51,.22);
  background: rgba(255,255,255,.45);
  border-radius: 14px;
}

/* ===============================
   Primary Category Pill (Card-like)
   Update: pills can inherit category tint
=============================== */
.lfl-tagpills{
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 8px 0 14px;
}

.lfl-pill{
  display: inline-flex;
  align-items: center;
  justify-content: center;

  padding: 5px 14px;
  border-radius: 999px;

  font-size: 12.5px;
  font-weight: 900;
  letter-spacing: .25px;
  color: rgba(42,47,51,.82);

  background:
    linear-gradient(180deg, rgba(255,255,255,.75), rgba(245,238,225,.92));

  outline: 1px solid rgba(42,47,51,.18);
  outline-offset: -1px;

  box-shadow:
    0 4px 10px rgba(60,45,20,.14),
    inset 0 1px 0 rgba(255,255,255,.55);

  text-decoration: none;

  transition:
    box-shadow .16s ease,
    outline-color .16s ease;

  white-space: nowrap;
}

.lfl-pill:hover{
  box-shadow:
    0 1px 22px rgba(60,45,20,.22),
    inset 0 10px 0 rgba(255,255,255,.55);
  outline-color: rgba(42,47,51,.28);
  text-decoration: none;
}

.lfl-pill:active{
  box-shadow:
    0 3px 8px rgba(60,45,20,.16),
    inset 0 1px 0 rgba(255,255,255,.75);
}

/* Pill variants (Category vs Editor’s Pick) */
.lfl-pill--category{
  /* inherits .lfl-pill */
}

/* NEW: When a category pill sits inside a category card, tint it automatically */
.lfl-card .lfl-pill--category{
  background: linear-gradient(
    180deg,
    rgba(255,255,255,.85),
    rgba(245,238,225,.92)
  );
  box-shadow:
    0 4px 10px rgba(60,45,20,.12),
    inset 0 1px 0 rgba(255,255,255,.65);
  outline-color: var(--catPillBorder);
}

/* NEW: If you add the category class to the pill itself (optional),
   it will also tint outside cards (posts, thumbnails, etc.). */
.lfl-pill.science,
.lfl-pill.social,
.lfl-pill.language,
.lfl-pill.thinking{
  background:
    linear-gradient(180deg, rgba(255,255,255,.85), rgba(245,238,225,.92)),
    linear-gradient(135deg, var(--catPillBg), rgba(0,0,0,0));
  background-blend-mode: multiply, normal;
  outline-color: var(--catPillBorder);
}

/* Category-specific pill vars (used when pill has category class) */
.lfl-pill.science{  --catPillBg: rgba(120, 200, 140, 0.18); --catPillBorder: rgba(120, 200, 140, 0.32); }
.lfl-pill.social{   --catPillBg: rgba(180, 140, 95, 0.18);  --catPillBorder: rgba(180, 140, 95, 0.32); }
.lfl-pill.language{ --catPillBg: rgba(110, 170, 230, 0.18); --catPillBorder: rgba(110, 170, 230, 0.32); }
.lfl-pill.thinking{ --catPillBg: rgba(170, 130, 220, 0.18); --catPillBorder: rgba(170, 130, 220, 0.32); }

.lfl-pill--pick{
  color: #2A2F33;
  background: linear-gradient(180deg, #FFE08A 0%, #F5B000 60%, #E08E00 100%);
  outline: 1px solid #C98300;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.65),
    0 6px 14px rgba(60,45,20,.22);
}

.lfl-thumb .lfl-pill--pick{
  backdrop-filter: none;
}

/* Worksheet Page Enhancements */
.lfl-worksheet-kicker{
  text-align:center;
  margin: 0 0 12px;
  font-weight: 900;
  font-size: 13px;
  letter-spacing: .3px;
  color: rgba(42,47,51,.70);
}

.lfl-download{
  margin-top: 22px;
  padding: 16px;
  border-radius: 16px;
  background: rgba(255,255,255,.45);
  outline: 1px solid rgba(42,47,51,.14);
  outline-offset: -1px;
}

.lfl-download h2{ margin-top: 0; }

.lfl-download-btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-radius: 14px;
  font-weight: 900;
  text-decoration: none;
  outline: 1px solid rgba(42,47,51,.18);
  outline-offset: -1px;
  box-shadow: 0 6px 14px rgba(60,45,20,.14);
  background: linear-gradient(180deg, rgba(255,255,255,.78), rgba(245,238,225,.92));
  transition: transform .16s ease, box-shadow .16s ease;
}

.lfl-download-btn:hover{
  transform: translateY(-2px);
  box-shadow: 0 12px 26px rgba(60,45,20,.20);
}

.lfl-download-note{
  margin: 10px 0 0;
  font-size: 13px;
  font-weight: 750;
  color: rgba(42,47,51,.72);
}

/* ===============================
   Inline Worksheet Thumbnail
=============================== */
.lfl-post-thumb-inline{
  display: flex;
  justify-content: center;
  margin: 10px 0 18px;
}

.lfl-post-thumb-inline img{
  max-width: 260px;
  width: 100%;
  height: auto;
  border-radius: 14px;
  box-shadow:
    0 6px 14px rgba(60,45,20,.14),
    inset 0 1px 0 rgba(255,255,255,.4);
}

/* Intro row: thumb right on desktop, stacked on mobile */
.lfl-introRow{
  display: flex;
  align-items: flex-start;
  gap: 18px;
  margin: 14px 0 18px;
}

.lfl-introText{
  flex: 1 1 auto;
  min-width: 0;
  order: 1;
}

.lfl-introThumb{
  flex: 0 0 240px;
  margin: 0;
  order: 2;
}

.lfl-introThumb img{
  width: 100%;
  height: auto;
  display: block;
  border-radius: 12px;
}

/* Intro text container (now a div, not a p) */
.lfl-introLead{
  margin: 0;
}

.lfl-introLead p{
  margin: 0 0 10px;
}

.lfl-introLead p:last-child{
  margin-bottom: 0;
}

/* Mobile: stack thumb above intro */
@media (max-width: 760px){
  .lfl-introRow{
    flex-direction: column;
  }

  .lfl-introThumb{
    width: 100%;
    max-width: 520px;
    order: 1;
  }

  .lfl-introText{
    order: 2;
  }
}

/* Series badge (Option 1) */
.lfl-series-badge{
  margin: 0 0 12px;
  font-size: 0.95rem;
  line-height: 1.35;
  opacity: 0.9;
}

.lfl-series-label{
  font-weight: 800;
}

.lfl-series-sep{
  padding: 0 6px;
  opacity: 0.75;
}

/* =========================================================
   Worksheet intro layout overrides (keep at end of site.css)
   Ensures thumbnail sits on RIGHT on desktop
========================================================= */

.lfl-introRow{
  display: flex;
  align-items: flex-start;
  gap: 18px;
  margin: 14px 0 18px;
}

.lfl-introText{
  flex: 1 1 auto;
  min-width: 0;
  order: 1;
}

/* Right-side column: thumb + subject */
.lfl-introMedia{
  flex: 0 0 240px;
  order: 2;
}

.lfl-introThumb{
  margin: 0;
}

.lfl-introThumb img{
  width: 100%;
  height: auto;
  display: block;
  border-radius: 12px;
}

/* Subject label + pill row under thumbnail */
.lfl-subjectRow{
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.lfl-subjectLabel{
  font-weight: 900;
  font-size: 12.5px;
  letter-spacing: .2px;
  color: rgba(42,47,51,.75);
}

/* Intro paragraphs spacing (multi-paragraph safe) */
.lfl-introLead{
  margin: 0;
}
.lfl-introLead p{
  margin: 0 0 10px;
}
.lfl-introLead p:last-child{
  margin-bottom: 0;
}

/* Mobile stacking */
@media (max-width: 760px){
  .lfl-introRow{
    flex-direction: column;
  }

  .lfl-introMedia{
    width: 100%;
    max-width: 520px;
    order: 1;
  }

  .lfl-introText{
    order: 2;
  }
}

/* =========================================
   Lighter instructional bullet points
========================================= */
.lfl-post-body h2 + ul li,
.lfl-post-body h2 + ol li{
  font-weight: 600;
  color: #3f4347;
}
.lfl-post-body h2 + ul,
.lfl-post-body h2 + ol{
  margin-top: 6px;
}
.lfl-post-body h2 + p + ul li,
.lfl-post-body h2 + p + ol li{
  font-weight: 600;
  color: #3f4347;
}
.lfl-post-body h2 + p{
  margin-bottom: 6px;
}

/* =========================================================
   Global link colors (LFL brand-aligned)
========================================================= */
a{
  color: #5B3A8E; /* LFL purple */
}
a:hover,
a:focus{
  color: #7A4DB3;
}

/* =========================================================
   Breadcrumbs: never underline links
========================================================= */
.lfl-breadcrumbs a,
.lfl-breadcrumbs a:hover,
.lfl-breadcrumbs a:focus,
.lfl-breadcrumbs a:active{
  text-decoration: none !important;
}

/* =========================================================
   Primary Download Button (LFL Brand)
========================================================= */
.lfl-download-btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;

  padding: 12px 18px;
  border-radius: 14px;

  font-weight: 900;
  font-size: 15px;
  letter-spacing: .2px;

  color: #2A2F33; /* dark ink */
  text-decoration: none;

  background: linear-gradient(
    180deg,
    #FFD36A 0%,
    #F2A900 55%,
    #E08E00 100%
  );

  border: 1px solid #C98300;

  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.6),
    0 6px 14px rgba(60,45,20,.22);

  transition:
    transform .15s ease,
    box-shadow .15s ease,
    background .15s ease;
}

.lfl-download-btn:hover{
  background: linear-gradient(
    180deg,
    #FFE08A 0%,
    #F5B000 55%,
    #E08E00 100%
  );

  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.65),
    0 10px 22px rgba(60,45,20,.28);

  transform: translateY(-2px);
}

.lfl-download-btn:active{
  transform: translateY(0);

  box-shadow:
    inset 0 2px 4px rgba(0,0,0,.18),
    0 4px 10px rgba(60,45,20,.18);
}

/* Description inside post card (left-aligned) */
.lfl-post-desc-inline{
  text-align: left;
  font-size: 16px;
  font-weight: 700;
  color: var(--muted);
  margin: 0 0 14px;
}

/* Soft divider (subtle, matches paper aesthetic) */
.lfl-soft-divider{
  height: 1px;
  background: linear-gradient(
    90deg,
    rgba(42,47,51,.18),
    rgba(42,47,51,.06),
    transparent
  );
  margin: 0 0 18px;
}

/* Normalize description + series text to body color */
.lfl-post-desc-inline{ color: var(--ink); }
.lfl-series-badge{ color: var(--ink); opacity: 1; }

/* Brand goal icon before the description (SVG via data URI) */
.lfl-post-desc-inline{
  position: relative;
  padding-left: 26px;
}

.lfl-post-desc-inline::before{
  content: "";
  position: absolute;
  left: 0;
  top: 0.15em;
  width: 18px;
  height: 18px;
  background-size: 18px 18px;
  background-repeat: no-repeat;

  background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A//www.w3.org/2000/svg%27%20viewBox%3D%270%200%2024%2024%27%3E%3Ccircle%20cx%3D%2712%27%20cy%3D%2712%27%20r%3D%279%27%20fill%3D%27%23F2A900%27%20fill-opacity%3D%270.22%27/%3E%3Ccircle%20cx%3D%2712%27%20cy%3D%2712%27%20r%3D%279%27%20fill%3D%27none%27%20stroke%3D%27%235B3A8E%27%20stroke-width%3D%272%27/%3E%3Ccircle%20cx%3D%2712%27%20cy%3D%2712%27%20r%3D%275%27%20fill%3D%27none%27%20stroke%3D%27%235B3A8E%27%20stroke-width%3D%272%27%20stroke-opacity%3D%270.9%27/%3E%3Ccircle%20cx%3D%2712%27%20cy%3D%2712%27%20r%3D%272%27%20fill%3D%27%23F2A900%27/%3E%3C/svg%3E");
}

/* =========================================================
   Markdown tables (posts / worksheets)
========================================================= */
.lfl-post-body table{
  width: 100%;
  border-collapse: collapse;
  margin: 14px 0 18px;
  font-size: 15px;
}

.lfl-post-body th,
.lfl-post-body td{
  text-align: left;
  padding: 10px 12px;
  vertical-align: top;
  border-bottom: 1px solid rgba(42,47,51,.14);
}

.lfl-post-body th{
  font-weight: 900;
  color: var(--ink);
  border-bottom: 1px solid rgba(42,47,51,.22);
}

.lfl-post-body tr:last-child td{
  border-bottom: 0;
}

.lfl-post-body tbody tr:nth-child(even){
  background: rgba(255,255,255,.35);
}

.lfl-post-body .table-wrap{
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* Slightly calmer post title size */
.lfl-post-title{
  font-size: clamp(26px, 3.2vw, 38px);
}

/* =========================================================
   Home feed links: never underline
========================================================= */
.lfl-feed a,
.lfl-feed a:hover,
.lfl-feed a:focus,
.lfl-feed a:active{
  text-decoration: none !important;
}

/* =========================================================
   NEW: Card links everywhere (category + browse + feeds)
========================================================= */
.lfl-feed-grid a,
.lfl-feed-card a,
.lfl-feed-grid a:hover,
.lfl-feed-card a:hover,
.lfl-feed-grid a:focus,
.lfl-feed-card a:focus,
.lfl-feed-grid a:active,
.lfl-feed-card a:active{
  text-decoration: none !important;
  color: inherit;
}

/* If your card wrapper is the <a> itself, make sure children don't underline */
.lfl-feed-card h2,
.lfl-feed-card h3,
.lfl-feed-card p,
.lfl-feed-card span{
  text-decoration: none !important;
}

/* =========================================
   Home feed: title + description hierarchy
========================================= */
.lfl-feed-title{
  margin: 0 0 6px 0;
  font-size: 15px;
  font-weight: 900;
  line-height: 1.25;
  color: var(--ink);
}

.lfl-feed-desc{
  margin: 0;
  font-size: 13.25px;
  font-weight: 600;
  line-height: 1.35;
  color: rgba(42,47,51,.72);
}

/* =========================================================
   Home feed header layout (Recently Published / Editor’s Picks)
========================================================= */
.lfl-feed-head{
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  margin: 0 0 6px;
}

.lfl-feed-head h2{
  margin: 0;
  text-align: left;
}

.lfl-feed-link{
  font-weight: 900;
  font-size: 14px;
  color: rgba(42,47,51,.78);
  text-decoration: none;
  padding: 6px 10px;
  border-radius: 12px;
  background: rgba(255,255,255,.45);
  outline: 1px solid rgba(42,47,51,.14);
  outline-offset: -1px;
  transition: transform .16s ease, background .16s ease, outline-color .16s ease;
  white-space: nowrap;
}

.lfl-feed-link:hover{
  transform: translateY(-2px);
  background: rgba(255,255,255,.65);
  outline-color: rgba(42,47,51,.24);
}

.lfl-feed-sub{
  margin: 0 0 14px;
  text-align: left;
  font-size: 14px;
  font-weight: 700;
  color: rgba(42,47,51,.72);
}

@media (max-width: 520px){
  .lfl-feed-head{
    flex-direction: column;
    align-items: flex-start;
  }
}

/* =========================================================
   Section-level distinction for homepage feeds
========================================================= */
.lfl-feed + .lfl-feed{
  margin-top: 56px;
}

.lfl-feed[aria-label="Editor’s Picks"]{
  position: relative;
  padding: 22px 18px 26px;
  border-radius: 20px;

  background:
    url("/assets/img/editors-picks-bg.webp") center / cover no-repeat,
    radial-gradient(
      900px 240px at 50% 0%,
      rgba(255, 225, 140, 0.18),
      transparent 60%
    ),
    linear-gradient(
      180deg,
      rgba(255,255,255,.55),
      rgba(245,238,225,.65)
    );

  outline: 1px solid rgba(42,47,51,.14);
  outline-offset: -1px;
}

.lfl-feed[aria-label="Editor’s Picks"] > *{
  max-width: 980px;
  margin-left: auto;
  margin-right: auto;
}

.lfl-feed[aria-label="Editor’s Picks"] .lfl-feed-sub{
  color: rgba(42,47,51,.78);
}

.lfl-feed[aria-label="Editor’s Picks"]{
  background-blend-mode: multiply, normal, normal;
}

/* =========================================================
   Category kicker (breadcrumb-style label)
========================================================= */
.lfl-category-kicker{
  margin: 0 0 6px;
  text-align: center;

  font-size: 12.5px;
  font-weight: 900;
  letter-spacing: .3px;
  text-transform: uppercase;

  color: rgba(42,47,51,.55);
}

/* Intro text: preserve line breaks from YAML block text */
.lfl-introLead--pre{
  white-space: pre-line;
}

/* =========================
   Footer (single source of truth)
========================= */
.lfl-footer {
  margin-top: 3rem;
  padding: 2rem 0;
  border-top: 1px solid rgba(0,0,0,0.08);
  background: transparent;
  font-family: inherit;
  color: inherit;
}

.lfl-footer-inner {
  max-width: var(--contentMax, 1100px);
  margin: 0 auto;
  padding: 0 1rem;
  text-align: center;
}

.lfl-footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.75rem;
}

.lfl-footer-nav a {
  color: inherit;
  font-weight: 800;
  text-decoration: none;
}

.lfl-footer-nav a:hover {
  text-decoration: underline;
}

.lfl-footer-meta {
  margin: 0;
  line-height: 1.5;
  font-size: 0.95rem;
  opacity: 0.9;
}

.lfl-footer a:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
  border-radius: 6px;
}

/* Pagination — inline, no container look */
.lfl-pagination {
  margin: 0.75rem 0;
  padding: 0;
  background: none;
  border: none;
}

.lfl-pagination-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0;
  background: none;
  border: none;
}

.lfl-pagination-left {
  font-size: 0.85rem;
  color: var(--muted);
}

.lfl-pagination-right a {
  font-weight: 600;
  text-decoration: none;
  background: none;
  padding: 0;
}

.lfl-pagination-right a:hover {
  text-decoration: underline;
}

.lfl-page-link-spacer {
  display: inline-block;
  min-width: 84px; /* tweak until it matches your link width */
}

.lfl-pagination {
  margin-top: 1.25rem;
}

.lfl-pagination-inner{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--stroke);
  border-radius: 14px;
  background: linear-gradient(180deg, var(--paperTop), var(--paperBottom));
}

.lfl-page-link{
  text-decoration: none;
  font-weight: 800;
}

.lfl-page-status{
  font-weight: 800;
  color: var(--muted);
}

.lfl-page-link.is-disabled{
  opacity: .35;
}

.lfl-download-support{
  margin-top: 10px;
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 1.4;
}

.lfl-coffee-btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 10px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid var(--stroke);
  background: var(--paperTop);
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  box-shadow: 0 8px 18px rgba(0,0,0,.06);
  transition: transform .14s ease, box-shadow .14s ease;
}

.lfl-coffee-btn:hover{
  transform: translateY(-1px);
  box-shadow: 0 12px 26px rgba(0,0,0,.10);
}

/* ------------------------------
   LFL 404 Page
-------------------------------- */
.lfl-404{
  padding: clamp(22px, 5vw, 46px) 14px;
  display: flex;
  justify-content: center;
}

.lfl-404-card{
  width: min(980px, 100%);
  background: linear-gradient(180deg, var(--paperTop), var(--paperMid) 55%, var(--paperBottom));
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  box-shadow: 0 18px 50px rgba(0,0,0,.08);
  padding: clamp(18px, 4vw, 34px);
}

.lfl-404-badge{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  font-weight: 900;
  letter-spacing: .06em;
  color: var(--ink);
  background: rgba(255,255,255,.65);
  border: 1px solid var(--stroke);
}

.lfl-404-title{
  margin: 12px 0 6px;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.08;
  color: var(--ink);
}

.lfl-404-sub{
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 1.06rem;
  line-height: 1.6;
  max-width: 70ch;
}

.lfl-404-actions{
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 14px 0 18px;
}

/* Buttons (safe if you already have btn styles; these will only apply if not present) */
.btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  border-radius: 999px;
  padding: 10px 14px;
  font-weight: 800;
  border: 1px solid var(--stroke);
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}
.btn-primary{
  background: rgba(255,255,255,.92);
  color: var(--ink);
  box-shadow: 0 10px 24px rgba(0,0,0,.08);
}
.btn-ghost{
  background: transparent;
  color: var(--ink);
}
.btn:hover{
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(0,0,0,.10);
}

/* Category tiles */
.lfl-404-grid{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 8px;
}

@media (max-width: 720px){
  .lfl-404-grid{ grid-template-columns: 1fr; }
}

.lfl-404-tile{
  text-decoration: none;
  border-radius: 16px;
  padding: 14px 14px 12px;
  border: 1px solid var(--stroke);
  background: rgba(255,255,255,.72);
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
}

.lfl-404-tile:hover{
  transform: translateY(-1px);
  box-shadow: 0 16px 34px rgba(0,0,0,.10);
  border-color: var(--stroke-strong);
}

.lfl-404-tile .tile-title{
  display: block;
  font-weight: 900;
  color: var(--ink);
  font-size: 1.05rem;
}

.lfl-404-tile .tile-sub{
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: .95rem;
}

.lfl-404-help{
  margin-top: 16px;
  color: var(--muted);
}

.lfl-404-help a{
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
}