/*
  LIVING KINGDOM SITEWIDE v3 — CrossAIHub
  A house of many rooms, each with its own signature style but one shared
  identity.  Twenty-five styles, one warm palette.
  Christ at the centre.  KJV verbatim only.  Matthew 6 anonymity.
*/

:root {
  --lk-ivory:        #FDF6E5;
  --lk-ivory-soft:   #FFFAEE;
  --lk-parchment:    #F5E7C8;
  --lk-cream:        #FEFAF0;
  --lk-gold:         #D4A94A;
  --lk-gold-warm:    #B58628;
  --lk-gold-soft:    #E8C87A;
  --lk-purple:       #7A5D96;
  --lk-purple-deep:  #5C3E7A;
  --lk-purple-band:  #B49BD0;
  --lk-purple-soft:  #C8B4E0;
  --lk-wine:         #B85670;
  --lk-wine-deep:    #8B3A4F;
  --lk-navy:         #3A4A6C;
  --lk-navy-soft:    #5A6485;
  --lk-slate:        #2A3348;

  /* per-style signature colours */
  --sig-stained:    #5C3E7A;
  --sig-illuminated:#B58628;
  --sig-byzantine:  #8B3A4F;
  --sig-fresco:     #B85670;
  --sig-woodcut:    #5A4433;
  --sig-papercut:   #B49BD0;
  --sig-penink:     #5A4433;
  --sig-artnouveau: #7A5D96;
  --sig-botanical:  #6B7B4B;
  --sig-collage:    #B85670;
  --sig-watercolor: #B85670;
  --sig-terrarium:  #6B7B4B;
  --sig-mosaic:     #B58628;
  --sig-pixar:      #7BB3E0;
  --sig-ghibli:     #B49BD0;
  --sig-pyrography: #5A4433;
  --sig-blueprint:  #3A4A6C;
  --sig-chalkboard: #FDF6E5;
  --sig-isometric:  #7A5D96;
  --sig-scifi:      #D4A94A;
  --sig-cyberpunk:  #B49BD0;
  --sig-map:        #B58628;
  --sig-constellation:#D4A94A;
  --sig-minimal:    #5A6485;
  --sig-flat:       #7A5D96;

  --lk-signature: var(--lk-purple);

  --page-bg:       var(--lk-ivory);
  --card-bg:       var(--lk-ivory-soft);
  --text:          var(--lk-slate);
  --text-muted:    var(--lk-navy-soft);
  --link:          var(--lk-wine);
  --link-hover:    var(--lk-gold-warm);
  --border-line:   rgba(60, 42, 85, 0.14);
  --border-strong: rgba(60, 42, 85, 0.28);
  --shadow-soft:   0 2px 8px rgba(30, 42, 68, 0.06);
  --shadow-lifted: 0 6px 24px rgba(30, 42, 68, 0.10);

  --font-serif: "Cormorant Garamond", "EB Garamond", "Georgia", serif;
  --font-body:  "Source Serif Pro", "Georgia", "Cambria", serif;
  --font-sans:  system-ui, -apple-system, "Segoe UI", sans-serif;

  --radius-s: 8px;
  --radius-m: 14px;
  --radius-l: 22px;
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-8: 3rem;
  --space-10: 4rem;
  --space-12: 6rem;
  --content-max: 780px;
  --wide-max: 1200px;
}

*, *::before, *::after { box-sizing: border-box; }
html { font-size: 17px; scroll-behavior: smooth; }
body {
  margin: 0;
  padding: 0;
  background: var(--page-bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.72;
  -webkit-font-smoothing: antialiased;
}
img, svg, video { display: block; max-width: 100%; height: auto; }

/* per-style signature assignments */
body[data-style="stained"]      { --lk-signature: var(--sig-stained);      }
body[data-style="illuminated"]  { --lk-signature: var(--sig-illuminated);  }
body[data-style="byzantine"]    { --lk-signature: var(--sig-byzantine);    }
body[data-style="fresco"]       { --lk-signature: var(--sig-fresco);       }
body[data-style="woodcut"]      { --lk-signature: var(--sig-woodcut);      }
body[data-style="papercut"]     { --lk-signature: var(--sig-papercut);     }
body[data-style="penink"]       { --lk-signature: var(--sig-penink);       }
body[data-style="artnouveau"]   { --lk-signature: var(--sig-artnouveau);   }
body[data-style="botanical"]    { --lk-signature: var(--sig-botanical);    }
body[data-style="collage"]      { --lk-signature: var(--sig-collage);      }
body[data-style="watercolor"]   { --lk-signature: var(--sig-watercolor);   }
body[data-style="terrarium"]    { --lk-signature: var(--sig-terrarium);    }
body[data-style="mosaic"]       { --lk-signature: var(--sig-mosaic);       }
body[data-style="pixar"]        { --lk-signature: var(--sig-pixar);        }
body[data-style="ghibli"]       { --lk-signature: var(--sig-ghibli);       }
body[data-style="pyrography"]   { --lk-signature: var(--sig-pyrography);   }
body[data-style="blueprint"]    { --lk-signature: var(--sig-blueprint);    }
body[data-style="chalkboard"]   { --lk-signature: var(--sig-chalkboard);   }
body[data-style="isometric"]    { --lk-signature: var(--sig-isometric);    }
body[data-style="scifi"]        { --lk-signature: var(--sig-scifi);        }
body[data-style="cyberpunk"]    { --lk-signature: var(--sig-cyberpunk);    }
body[data-style="map"]          { --lk-signature: var(--sig-map);          }
body[data-style="constellation"]{ --lk-signature: var(--sig-constellation);}
body[data-style="minimal"]      { --lk-signature: var(--sig-minimal);      }
body[data-style="flat"]         { --lk-signature: var(--sig-flat);         }

.lk-skip { position: absolute; left: -10000px; background: var(--lk-navy); color: var(--lk-ivory); padding: var(--space-3) var(--space-5); z-index: 999; }
.lk-skip:focus { left: var(--space-4); top: var(--space-4); border-radius: var(--radius-s); }

/* ═══ HEADER ═══ */
.lk-header {
  background: linear-gradient(180deg, #C8B4E0 0%, #B49BD0 100%);
  border-bottom: 1px solid rgba(212, 169, 74, 0.4);
  /* z-stacking: header must sit above hero image + all page content so
     nav dropdown menus (position:absolute inside header) paint on top.
     Without position+z-index, hero <img> below in DOM was covering menu. */
  position: relative !important;
  z-index: 9999 !important;
  isolation: isolate;
}
.lk-header-inner {
  max-width: var(--wide-max);
  margin: 0 auto;
  padding: var(--space-4) var(--space-5);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-3);
}
.lk-brand {
  font-family: var(--font-serif);
  font-weight: 500;
  color: var(--lk-slate);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  letter-spacing: -0.005em;
  line-height: 1;
}
.lk-brand__cross {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 34px;
  line-height: 0.85;
  color: currentColor;
}
.lk-brand__word {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 22px;
  color: currentColor;
  letter-spacing: -0.005em;
  line-height: 1;
}
.lk-brand:hover .lk-brand__word,
.lk-brand:hover .lk-brand__cross { color: var(--lk-gold-warm); }
@media (max-width: 480px) {
  .lk-brand__cross { font-size: 29px; }
  .lk-brand__word { font-size: 18px; }
}
.lk-nav { display: flex; gap: var(--space-5); flex-wrap: wrap; align-items: center; }
.lk-nav a {
  color: var(--lk-slate);
  text-decoration: none;
  font-family: var(--font-serif);
  font-size: 1.05rem;
  padding: var(--space-1) 0;
  border-bottom: 2px solid transparent;
  transition: color 160ms ease, border-color 160ms ease;
}
.lk-nav a:hover, .lk-nav a[aria-current="page"] {
  color: var(--lk-gold-warm);
  border-bottom-color: var(--lk-gold);
}
.lk-nav-kingdom {
  color: var(--lk-gold-warm) !important;
  font-weight: 600;
}

/* Dropdown menus */
.lk-nav-drop { position: relative; }
.lk-nav-drop > summary {
  list-style: none;
  cursor: pointer;
  color: var(--lk-slate);
  font-family: var(--font-serif);
  font-size: 1.05rem;
  padding: var(--space-1) 0;
  border-bottom: 2px solid transparent;
  transition: color 160ms ease, border-color 160ms ease;
  user-select: none;
}
.lk-nav-drop > summary::-webkit-details-marker { display: none; }
.lk-nav-drop > summary::after {
  content: " ⌄";
  color: var(--lk-gold-warm);
  font-size: 0.85em;
}
.lk-nav-drop[open] > summary,
.lk-nav-drop > summary:hover {
  color: var(--lk-gold-warm);
  border-bottom-color: var(--lk-gold);
}
/* ═══ NAV DROPDOWN · robust hover + tap · nuclear !important ═══
   Root cause of the previous flakiness: the reveal rule was losing to
   some cascade order or UA rule (details:not([open]) > :not(summary)
   { display: none }). Using !important eliminates all doubt.
   Also forcing display: flex always so <details> UA rule can't hide it. */
.lk-nav-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  min-width: 240px;
  background: var(--lk-cream);
  border: 1px solid var(--border-line);
  border-radius: var(--radius-m);
  box-shadow: var(--shadow-lifted);
  padding: var(--space-3) 0;
  display: flex !important;
  flex-direction: column;
  z-index: 100;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-6px);
  transition: opacity 180ms ease, visibility 0s linear 180ms, transform 180ms ease;
}

/* Hover-bridge: fills the 4px gap between summary and menu so the
   pointer never crosses "un-hovered" space. */
.lk-nav-drop::after {
  content: "";
  position: absolute;
  top: 100%;
  left: -8px;
  right: -8px;
  height: 12px;
  pointer-events: none;
}
.lk-nav-drop:hover::after,
.lk-nav-drop:focus-within::after,
.lk-nav-drop[open]::after { pointer-events: auto; }

.lk-nav-menu a {
  display: block;
  padding: var(--space-2) var(--space-4);
  color: var(--lk-slate);
  text-decoration: none;
  border: 0;
  font-family: var(--font-serif);
  font-size: 1rem;
  transition: background 120ms ease, color 120ms ease;
  white-space: nowrap;
}
.lk-nav-menu a:hover {
  background: var(--lk-parchment);
  color: var(--lk-gold-warm);
}

/* OPEN state — hover (desktop pointer), focus-within (keyboard),
   or [open] (tap on mobile). All three trigger the same reveal.
   !important to override anything in the cascade or UA rules. */
.lk-nav-drop:hover > .lk-nav-menu,
.lk-nav-drop:focus-within > .lk-nav-menu,
.lk-nav-drop[open] > .lk-nav-menu {
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
  transform: translateY(0) !important;
  transition: opacity 180ms ease, visibility 0s linear 0s, transform 180ms ease;
}

/* Mobile fine-tuning: keep nav horizontal, allow scroll if overflow.
   CRITICAL: overflow-x: auto on .lk-nav was CLIPPING the absolutely-
   positioned dropdown menu inside it. Solution: use position: fixed
   on the menu so it escapes the nav's overflow container entirely,
   and render it as a full-width drawer just below the header. */
@media (max-width: 720px) {
  .lk-nav {
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: var(--space-3);
    font-size: 0.9rem;
    padding-bottom: var(--space-1);
  }
  .lk-nav::-webkit-scrollbar { display: none; }
  .lk-nav > * { flex-shrink: 0; }

  /* Menu escapes all overflow contexts as a full-width fixed drawer.
     Positioned below header via calc(var(--lk-header-h, 60px)). */
  .lk-nav-menu {
    position: fixed !important;
    top: var(--lk-header-h, 62px) !important;
    left: 8px !important;
    right: 8px !important;
    max-width: none !important;
    min-width: 0 !important;
    width: auto !important;
    z-index: 10001 !important;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
  }
  .lk-nav-menu a {
    padding: var(--space-3) var(--space-4);
    font-size: 1.05rem;
  }
}

.lk-page-strip { height: 3px; background: var(--lk-signature); }

/* ═══ HERO ═══ */
.lk-hero {
  padding: var(--space-8) var(--space-5);
  border-bottom: 1px solid var(--border-line);
  background: linear-gradient(180deg, var(--lk-cream), var(--lk-ivory));
}
.lk-hero-inner {
  max-width: var(--wide-max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: var(--space-8);
  align-items: center;
}
.lk-hero-inner.lk-hero-centered { grid-template-columns: 1fr; text-align: center; }
.lk-hero-inner.lk-hero-centered .lk-hero-text { max-width: 720px; margin: 0 auto; }
.lk-hero-text { padding: var(--space-4) 0; }
.lk-hero-kicker {
  display: block;
  font-family: var(--font-sans);
  font-size: 0.78rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--lk-signature);
  font-weight: 600;
  margin-bottom: var(--space-3);
}
.lk-hero-text h1 {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  color: var(--lk-slate);
  margin: 0 0 var(--space-4);
  line-height: 1.1;
}
.lk-hero-lede {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  color: var(--text);
  margin: var(--space-3) 0;
  line-height: 1.55;
}
.lk-hero-verse {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.1rem;
  color: var(--lk-gold-warm);
  margin: var(--space-3) 0 0;
}
.lk-hero-verse-ref { color: var(--lk-gold-warm); }
.lk-hero-illustration {
  display: block;
  width: 100%;
  aspect-ratio: 1376 / 768;
  border-radius: var(--radius-m);
  box-shadow: var(--shadow-lifted);
  overflow: hidden;
  background: var(--lk-cream);
}
.lk-hero-illustration img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-m);
}
.lk-hero-rule {
  width: 96px;
  height: 2px;
  background: var(--lk-gold);
  margin: var(--space-6) auto 0;
  border: 0;
  opacity: 0.65;
}

/* ═══ EXTRAS (per-page mockup features) ═══ */
.lk-extras {
  background: var(--lk-cream);
  border-bottom: 1px solid var(--border-line);
}
.lk-extras-inner {
  max-width: var(--wide-max);
  margin: 0 auto;
  padding: var(--space-5) var(--space-5);
}

/* Library: Verse of the Day card */
.lk-verse-day-card {
  background: linear-gradient(180deg, var(--lk-ivory-soft), rgba(212, 169, 74, 0.10));
  border-left: 5px solid var(--lk-gold);
  border-radius: var(--radius-m);
  padding: var(--space-5) var(--space-5);
  box-shadow: var(--shadow-soft);
}
.lk-verse-day-label {
  font-family: var(--font-serif);
  font-weight: 600;
  color: var(--lk-slate);
  font-size: 1.15rem;
  margin: 0 0 var(--space-2);
  display: flex;
  gap: var(--space-2);
  align-items: center;
}
.lk-verse-day-cross { color: var(--lk-gold-warm); font-size: 1.2em; }
.lk-verse-day-heart { color: var(--lk-wine); font-size: 0.9em; }
.lk-verse-day-text {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.15rem;
  color: var(--text);
  margin: 0;
  line-height: 1.55;
}

/* Chapel: Light a candle — invite card pointing to the single, shared
   /candles/ page (2026-09-02). Previously this room had its own separate
   SVG-drawn candle-stand widget (per-device only, disconnected from the
   real shared candle wall at /candles/) — a real duplicate-feature bug
   found by Yousef directly in the live HTML. Removed entirely in favor of
   one clear, more prominent link to the single real implementation. */
.candle-invite {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  max-width: 640px;
  margin: 0 auto;
  padding: var(--space-4) var(--space-5);
  background: rgba(212, 169, 74, 0.08);
  border: 1px solid rgba(212, 169, 74, 0.35);
  border-radius: var(--radius-m);
  text-decoration: none;
  transition: transform 200ms ease, box-shadow 200ms ease, background 200ms ease;
}
.candle-invite:hover {
  background: rgba(212, 169, 74, 0.14);
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(181, 134, 40, 0.18);
}
.candle-invite__icon {
  font-size: 2rem;
  line-height: 1;
  flex: 0 0 auto;
}
.candle-invite__title {
  display: block;
  font-family: var(--font-serif);
  font-size: 1.25rem;
  color: var(--lk-wine-deep);
}
.candle-invite__desc {
  display: block;
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-top: 0.2rem;
}

/* Kitchen: week days strip */
.lk-week-label {
  font-family: var(--font-serif);
  color: var(--lk-slate);
  text-align: center;
  margin: 0 0 var(--space-4);
  font-style: italic;
}
.lk-week-strip {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: var(--space-2);
  position: relative;
}
.lk-week-strip::before {
  content: "";
  position: absolute;
  left: 6%; right: 6%; top: 62%;
  height: 2px;
  background: linear-gradient(90deg, var(--lk-wine), var(--lk-gold), var(--lk-wine));
  opacity: 0.35;
}
.lk-week-day {
  text-align: center;
  font-family: var(--font-serif);
  color: var(--text);
  text-decoration: none;
  position: relative;
  z-index: 1;
  padding: var(--space-2);
  border-radius: var(--radius-s);
  transition: background 160ms ease;
}
.lk-week-day:hover { background: var(--lk-ivory-soft); }
.lk-week-day strong { display: block; font-weight: 600; color: var(--lk-slate); font-size: 1rem; }
.lk-week-day span { display: block; font-size: 0.85rem; color: var(--lk-wine-deep); font-style: italic; margin-top: 2px; }
.lk-week-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--lk-gold); margin-top: var(--space-1); }
.lk-week-day.today strong { color: var(--lk-gold-warm); }
.lk-week-day.today .lk-week-dot { background: var(--lk-wine); width: 12px; height: 12px; box-shadow: 0 0 0 3px rgba(184, 86, 112, 0.2); }
@media (max-width: 720px) {
  .lk-week-strip { grid-template-columns: repeat(3, 1fr); gap: var(--space-3); }
  .lk-week-strip::before { display: none; }
}

/* Kids: 4 illustrated cards */
.lk-kid-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-4);
}
.lk-kid-card {
  background: var(--lk-ivory-soft);
  border: 2px solid var(--sig-kids, #7BB3E0);
  border-radius: var(--radius-l);
  padding: 0 0 var(--space-5);
  overflow: hidden;
  text-decoration: none;
  color: var(--text);
  text-align: center;
  transition: transform 200ms ease, box-shadow 200ms ease, border-color 200ms ease;
}
.lk-kid-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lifted);
  border-color: var(--lk-gold);
}
/* بند 307: SVG icons replaced with real photo thumbnails (card=hero standing
   rule -- same image as the target page's own cm-hero, just cropped smaller).
   Reuses the shared .cm-card__media/__img/__fade component. */
.lk-kid-card .cm-card__media { aspect-ratio: 4 / 3; margin-bottom: var(--space-3); }
.lk-kid-card h3 {
  font-family: var(--font-serif);
  font-weight: 500;
  color: var(--lk-slate);
  font-size: 1.3rem;
  margin: 0 var(--space-4) var(--space-2);
}
.lk-kid-card p {
  color: var(--text-muted);
  margin: 0 var(--space-4);
  font-size: 0.95rem;
  line-height: 1.5;
}

/* ═══ ARTICLE ═══ */
.lk-article {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: var(--space-6) var(--space-5) var(--space-8);
}
.lk-article h2 { font-family: var(--font-serif); font-weight: 500; font-size: 1.6rem; color: var(--lk-slate); margin: var(--space-6) 0 var(--space-3); }
.lk-article h3 { font-family: var(--font-serif); font-weight: 500; font-size: 1.25rem; color: var(--lk-purple); margin: var(--space-5) 0 var(--space-2); }
.lk-article p { margin: 0 0 var(--space-4); font-size: 1.05rem; line-height: 1.75; }
.lk-article ul, .lk-article ol { padding-left: var(--space-5); margin: 0 0 var(--space-4); }
.lk-article li { margin: var(--space-2) 0; }
.lk-article a { color: var(--link); text-decoration: none; border-bottom: 1px solid rgba(139, 58, 79, 0.35); }
.lk-article a:hover { color: var(--link-hover); border-bottom-color: var(--link-hover); }
.lk-article strong { color: var(--lk-slate); font-weight: 600; }
.lk-article em { color: var(--lk-purple); }
.lk-article blockquote {
  border-left: 3px solid var(--lk-gold);
  background: linear-gradient(180deg, var(--lk-ivory-soft), rgba(213, 169, 74, 0.06));
  padding: var(--space-4) var(--space-5);
  margin: var(--space-5) 0;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.15rem;
  color: var(--lk-slate);
  border-radius: 0 var(--radius-s) var(--radius-s) 0;
}
.lk-article blockquote p { margin: 0; }
.lk-article section { margin: var(--space-5) 0; }
.lk-article hr { border: 0; border-top: 1px solid var(--border-line); margin: var(--space-6) 0; }

/* ═══ CARDS ═══ */
.lk-cards-section { max-width: var(--wide-max); margin: 0 auto; padding: var(--space-6) var(--space-5) var(--space-8); }
.lk-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: var(--space-4); }
.lk-card {
  background: var(--card-bg);
  border: 1px solid var(--border-line);
  border-left: 4px solid var(--lk-signature);
  border-radius: var(--radius-m);
  padding: var(--space-5);
  text-decoration: none;
  color: var(--text);
  transition: transform 200ms ease, box-shadow 200ms ease, border-color 200ms ease;
}
.lk-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lifted); border-color: var(--lk-gold); }
.lk-card h3 { font-family: var(--font-serif); font-size: 1.2rem; color: var(--lk-slate); font-weight: 500; margin: 0 0 var(--space-2); }
.lk-card p { font-size: 0.95rem; color: var(--text-muted); margin: 0; }

/* ═══ RETURN + FOOTER ═══ */
.lk-return { max-width: var(--content-max); margin: var(--space-6) auto 0; padding: 0 var(--space-5); text-align: center; }
.lk-return a { display: inline-block; font-family: var(--font-serif); color: var(--lk-purple-deep); text-decoration: none; border: 1px solid var(--lk-purple); border-radius: 999px; padding: var(--space-2) var(--space-5); transition: all 160ms ease; }
.lk-return a:hover { background: var(--lk-purple); color: var(--lk-ivory); }

.lk-footer {
  background: var(--lk-navy);
  color: var(--lk-ivory);
  border-top: 2px solid var(--lk-gold);
  margin-top: var(--space-8);
}
.lk-footer-verse-band {
  padding: var(--space-5) var(--space-5);
  text-align: center;
  border-bottom: 1px solid rgba(232, 200, 122, 0.15);
}
.lk-footer-verse { font-family: var(--font-serif); font-style: italic; color: var(--lk-gold-soft); font-size: 1.15rem; margin: 0; }
.lk-footer-inner {
  max-width: var(--wide-max);
  margin: 0 auto;
  padding: var(--space-6) var(--space-5);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--space-5);
}
.lk-footer-col h3 {
  font-family: var(--font-serif);
  font-weight: 600;
  color: var(--lk-gold-soft);
  font-size: 1rem;
  margin: 0 0 var(--space-3);
  letter-spacing: 0.04em;
}
.lk-footer-col a {
  display: block;
  color: var(--lk-ivory);
  opacity: 0.82;
  text-decoration: none;
  font-family: var(--font-serif);
  font-size: 0.95rem;
  padding: var(--space-1) 0;
  transition: color 160ms ease, opacity 160ms ease;
}
.lk-footer-col a:hover { color: var(--lk-gold); opacity: 1; text-decoration: underline; }
.lk-footer-bottom {
  border-top: 1px solid rgba(232, 200, 122, 0.15);
  padding: var(--space-4) var(--space-5);
  text-align: center;
}
.lk-footer-signature {
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--lk-gold-soft);
  margin: 0 0 var(--space-2);
  font-size: 0.95rem;
}
.lk-footer-copyright {
  color: var(--lk-ivory);
  opacity: 0.6;
  margin: 0;
  font-size: 0.82rem;
}

/* Added 2026-08-31: quiet merge line for the handful of links that only
   ever lived in the old JS-injected footer, now folded into the one
   static .lk-footer instead of a second full footer stacking below it. */
.lk-footer-more {
  text-align: center;
  padding: var(--space-2) var(--space-5) var(--space-3);
  font-family: var(--font-serif);
  font-size: 0.82rem;
  color: var(--lk-gold-soft);
  opacity: 0.75;
}
.lk-footer-more a {
  color: var(--lk-gold-soft);
  text-decoration: none;
}
.lk-footer-more a:hover {
  color: var(--lk-gold);
  text-decoration: underline;
}

/* ═══ STYLE-SPECIFIC HERO BACKGROUND HINTS ═══ */
/* darker heroes for AI styles so the futuristic illustration fits */
body[data-style="scifi"] .lk-hero,
body[data-style="cyberpunk"] .lk-hero {
  background: linear-gradient(180deg, #2A3348, #1E2A44);
}
body[data-style="scifi"] .lk-hero-text h1,
body[data-style="cyberpunk"] .lk-hero-text h1 { color: var(--lk-ivory); }
body[data-style="scifi"] .lk-hero-lede,
body[data-style="cyberpunk"] .lk-hero-lede { color: var(--lk-ivory); opacity: 0.85; }

/* pyrography / woodcut: warm oak wash */
body[data-style="pyrography"] .lk-hero,
body[data-style="woodcut"] .lk-hero {
  background: linear-gradient(180deg, #F2E4C8, #E8D4A8);
}

/* chalkboard: dark slate */
body[data-style="chalkboard"] .lk-hero { background: linear-gradient(180deg, #2E3540, #1F2530); }
body[data-style="chalkboard"] .lk-hero-text h1 { color: var(--lk-ivory); }
body[data-style="chalkboard"] .lk-hero-lede { color: var(--lk-ivory); opacity: 0.85; }
body[data-style="chalkboard"] .lk-hero-verse { color: var(--lk-gold-soft); }

/* map / constellation: warm parchment */
body[data-style="map"] .lk-hero { background: linear-gradient(180deg, #F5E7C8, #EFDDB4); }
body[data-style="constellation"] .lk-hero { background: linear-gradient(180deg, #2A3348, #1E2A44); }
body[data-style="constellation"] .lk-hero-text h1 { color: var(--lk-ivory); }
body[data-style="constellation"] .lk-hero-lede { color: var(--lk-ivory); opacity: 0.85; }

/* kids pages get a lighter cheerful background */
body[data-style="pixar"] .lk-hero,
body[data-style="ghibli"] .lk-hero {
  background: linear-gradient(180deg, #FFFAEE 0%, #F0EBFF 100%);
}
body[data-style="pixar"] .lk-hero-text h1 { font-size: clamp(2.6rem, 6vw, 4rem); }

/* ═══ STEP 5J Reality Alignment (2026-08-01) · curated section classes ═══
   Bug: /read/ Bible-study + /wisdom/ Devotional-shelf card sections rendered
   collapsed on production because .lk-section / .lk-section-inner / .lk-h2 /
   .lk-lede / .lk-grid / .lk-card-cat were defined only in /atlas/living-kingdom.css
   which the room pages do not load. Adding shared rules here so every room that
   uses the STEP 5D/5E section pattern renders as intended.
*/
.lk-section {
  padding: var(--space-6) var(--space-5) var(--space-8);
  border-top: 1px solid var(--border-line);
}
.lk-section-inner {
  max-width: var(--wide-max);
  margin: 0 auto;
}
.lk-h2 {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(1.4rem, 2.5vw, 1.9rem);
  color: var(--lk-slate);
  margin: 0 0 var(--space-3);
  letter-spacing: 0.005em;
}
.lk-lede {
  font-size: 1.02rem;
  color: var(--text-muted);
  margin: 0 0 var(--space-5);
  max-width: 62ch;
}
.lk-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: var(--space-4);
}
.lk-card-cat {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: var(--space-2);
}
/* .lk-card / .lk-card h3 / .lk-card p / .lk-card:hover already defined above
   at lines ~685-698 (shared with .lk-cards). No override needed here. */

/* ═══ MOBILE ═══ */
@media (max-width: 900px) {
  .lk-hero-inner { grid-template-columns: 1fr; text-align: center; }
  .lk-hero-illustration { order: -1; }
}
@media (max-width: 720px) {
  html { font-size: 16px; }
  .lk-header-inner { justify-content: center; }
  .lk-nav { justify-content: center; gap: var(--space-3); font-size: 0.95rem; }
  .lk-cards { grid-template-columns: 1fr; }
  .lk-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
@media print {
  .lk-header, .lk-footer, .lk-hero-illustration { display: none; }
  body { background: white; color: black; }
  .lk-article { max-width: none; padding: 0; }
}

/* ═══ STEP 5L Visual Polish (2026-08-01) · legacy BEM section + tool-card fallback ═══
   Bug: /ai-tools/ HTML uses .section__grid + .section__col--full/half + .tool-card +
   .tool-card__name + .tool-card__notes + .tool-cat-title. These classes are defined
   in legacy stylesheets (celestial.css, lumen-sections.css, theme-ai.css) that this
   page does not load. The result on production is a plain-text list where a card
   grid was intended. Adding minimal shared rules here so the existing HTML renders
   as cards without a new component system.
*/
.section__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-4, 16px);
  max-width: var(--wide-max, 1200px);
  margin: 0 auto;
  padding: 0 var(--space-5, 20px);
}
.section__col--full { grid-column: 1 / -1; }
.section__col--half { grid-column: span 1; }
.section__col--third { grid-column: span 1; }

.tool-cat-title {
  font-family: var(--font-serif, "Cormorant Garamond", Georgia, serif);
  font-weight: 500;
  font-size: clamp(1.3rem, 2.2vw, 1.7rem);
  color: var(--lk-slate, #2A3348);
  margin: var(--space-5, 20px) 0 var(--space-2, 8px);
  letter-spacing: 0.005em;
}
.tool-card {
  background: var(--card-bg, #FDFBF5);
  border: 1px solid var(--border-line, rgba(180, 135, 72, 0.22));
  border-left: 4px solid var(--lk-purple, #6E3F94);
  border-radius: var(--radius-m, 8px);
  padding: var(--space-4, 16px) var(--space-5, 20px);
  display: flex;
  flex-direction: column;
  gap: var(--space-2, 8px);
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}
.tool-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lifted, 0 6px 22px rgba(43, 36, 24, 0.08));
  border-color: var(--lk-gold, #C69F45);
}
.tool-card__name {
  font-family: var(--font-serif, "Cormorant Garamond", Georgia, serif);
  font-size: 1.15rem;
  color: var(--lk-slate, #2A3348);
  font-weight: 500;
  margin: 0;
}
.tool-card__notes {
  font-size: 0.92rem;
  color: var(--text-muted, #665);
  margin: 0;
  line-height: 1.5;
}

/* Mobile: single column card stack */
@media (max-width: 720px) {
  .section__grid { grid-template-columns: 1fr; }
}


/* Visually-hidden utility: keeps the document outline correct without
   changing the visual design. */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
