/* fable-atlas: a programme guide. Left rail navigation on desktop, the teaching archive as a schedule, ultramarine on cool off-white. Scene: a listener at the kitchen table on a weekday evening choosing what to listen to next. Colour strategy: restrained (neutral surface, one accent under 10%). */
.theme-fable-atlas {
  --paper: #f2f3f5;
  --ink: #14161a;
  --accent: #2b4cff;
  --muted: #4a4f5a;
  --line: #d3d6dc;
  --display: 'Space Grotesk', 'DM Sans', Arial, sans-serif;
  --body: 'DM Sans', Arial, sans-serif;
  --radius: 2px;
  --atlas-rail: 236px;
  --atlas-surface: #ffffff;
  background: var(--paper);
  color: var(--ink);
  font: 400 16px/1.7 var(--body);
}
.theme-fable-atlas *, .theme-fable-atlas *::before, .theme-fable-atlas *::after { box-sizing: border-box; }
.theme-fable-atlas :where(h1,h2,h3,p,a,small,strong,span) { overflow-wrap: anywhere; }
.theme-fable-atlas :where(img,iframe,input,textarea,select) { max-width: 100%; }
.theme-fable-atlas :where(a,button,input,select,textarea):focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.theme-fable-atlas :where(.prose,.section-description) { max-width: 66ch; color: var(--ink); line-height: 1.75; text-wrap: pretty; }
.theme-fable-atlas .small-note { color: var(--muted); font-size: 13px; }
.theme-fable-atlas .eyebrow { font: 500 13px/1.4 var(--body); letter-spacing: 0; text-transform: none; color: var(--muted); }
.theme-fable-atlas .eyebrow:empty, .theme-fable-atlas .prose:empty, .theme-fable-atlas .timeline:empty { display: none; }
.theme-fable-atlas .section-heading > .eyebrow, .theme-fable-atlas .invitation-ribbon .eyebrow, .theme-fable-atlas .contact-person > .eyebrow, .theme-fable-atlas .pathway-number, .theme-fable-atlas .topic-number, .theme-fable-atlas .contact-option > span, .theme-fable-atlas .channel-mark, .theme-fable-atlas .podcast-icon { display: none; }
.theme-fable-atlas :where(h1,h2,h3) { text-wrap: balance; }

/* frame: rail + page */
.theme-fable-atlas.site { display: grid; grid-template-columns: var(--atlas-rail) minmax(0, 1fr); min-height: 100vh; position: relative; }
.theme-fable-atlas.site .site-header {
  grid-column: 1; grid-row: 1 / span 2; position: sticky; top: 0; align-self: start; height: 100vh;
  display: flex; flex-direction: column; justify-content: space-between; gap: 32px;
  padding: 28px 22px 26px; margin: 0; max-width: none; border: 0; border-right: 1px solid var(--line);
  background: var(--ink); color: var(--paper);
}
.theme-fable-atlas.site .wordmark { display: flex; align-items: center; gap: 12px; color: var(--paper); font: 500 15px/1.3 var(--display); letter-spacing: -.01em; text-decoration: none; }
.theme-fable-atlas .brand-symbol { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 2px; background: var(--accent); color: #fff; font: 700 13px var(--display); letter-spacing: .04em; flex-shrink: 0; }
.theme-fable-atlas .site-nav { display: flex; flex-direction: column; gap: 2px; margin-top: auto; }
.theme-fable-atlas .site-nav a { display: flex; align-items: center; gap: 12px; min-height: 40px; padding: 6px 10px; border-radius: 2px; color: #c9ccd4; font: 500 14px/1.2 var(--display); text-decoration: none; transition: color .2s cubic-bezier(.22,1,.36,1), background .2s cubic-bezier(.22,1,.36,1); border: 0; }
.theme-fable-atlas .site-nav a::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .35; flex-shrink: 0; }
.theme-fable-atlas .site-nav a:hover { color: #fff; background: #23262d; }
.theme-fable-atlas .site-nav a.current { color: #fff; background: #23262d; padding-bottom: 6px; }
.theme-fable-atlas .site-nav a.current::before { background: #9aa3ff; opacity: 1; }
.theme-fable-atlas .atlas-progress { position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--accent); transform-origin: left; transform: scaleX(0); }
.theme-fable-atlas .atlas-rail-note { font: 400 12px/1.5 var(--body); color: #9ea3ad; }

.theme-fable-atlas.site > .site-main { grid-column: 2; max-width: none; padding: 0 clamp(20px, 5vw, 72px) 40px; }
.theme-fable-atlas.site .site-main > .block { padding: clamp(44px, 6vw, 80px) 0; margin: 0; border-top: 1px solid var(--line); }
.theme-fable-atlas.site .site-main > .block:first-child { border-top: 0; }
.theme-fable-atlas.site h1 { font: 500 clamp(44px, 5.6vw, 84px)/1 var(--display); letter-spacing: -.035em; margin: 6px 0 20px; }
.theme-fable-atlas.site h2 { font: 500 clamp(26px, 2.8vw, 38px)/1.15 var(--display); letter-spacing: -.03em; margin: 0 0 20px; }
.theme-fable-atlas.site h3 { font: 500 clamp(18px, 1.6vw, 22px)/1.3 var(--display); letter-spacing: -.015em; margin: 0 0 6px; }
.theme-fable-atlas .section-heading { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 12px 32px; margin-bottom: 28px; }
.theme-fable-atlas .section-heading .section-description, .theme-fable-atlas .section-heading .prose { grid-column: 1 / -1; margin: 0; }
.theme-fable-atlas .section-end-link { display: inline-block; margin-top: 22px; font: 500 14px var(--display); color: var(--accent); }

/* buttons and links */
.theme-fable-atlas .button, .theme-fable-atlas .video-link { display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 8px 18px; border-radius: 2px; background: var(--accent); color: #fff; font: 500 14px/1 var(--display); text-decoration: none; border: 0; cursor: pointer; transition: transform .25s cubic-bezier(.22,1,.36,1), background .25s; }
.theme-fable-atlas .button:hover, .theme-fable-atlas .video-link:hover { background: #1b37d6; transform: translateY(-1px); }
.theme-fable-atlas .quiet-link, .theme-fable-atlas .text-link, .theme-fable-atlas .prose a, .theme-fable-atlas .ministry-grid a, .theme-fable-atlas .podcast-list a, .theme-fable-atlas .article-card a { color: var(--accent); font-weight: 500; text-decoration: underline; text-underline-offset: 3px; }

/* hero */
.theme-fable-atlas.site .block-hero { padding-top: clamp(36px, 5vw, 64px); }
.theme-fable-atlas .hero-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: clamp(28px, 4vw, 64px); align-items: end; }
.theme-fable-atlas .hero-copy > .eyebrow { color: var(--accent); font-weight: 500; margin: 0 0 14px; }
.theme-fable-atlas.site .hero-kicker { font: 400 clamp(19px, 2vw, 25px)/1.45 var(--body); color: var(--ink); max-width: 32ch; margin: 0 0 18px; }
.theme-fable-atlas.site .hero-copy > .prose { max-width: 58ch; font-size: 16px; color: var(--muted); }
.theme-fable-atlas .hero-actions { display: flex; flex-wrap: wrap; gap: 12px 22px; align-items: center; margin-top: 26px; }
.theme-fable-atlas .hero-art { position: relative; margin: 0; }
.theme-fable-atlas.site .hero-image { display: block; width: 100%; height: clamp(320px, 38vw, 520px); object-fit: cover; object-position: center 20%; border-radius: 2px; filter: saturate(.92); }
.theme-fable-atlas .art-caption { position: absolute; left: 12px; bottom: 12px; margin: 0; padding: 6px 10px; background: var(--ink); color: #fff; font: 500 12px/1.3 var(--display); border-radius: 2px; }
.theme-fable-atlas .art-caption:empty { display: none; }
.theme-fable-atlas .hero-meta { display: flex; flex-wrap: wrap; gap: 8px 28px; margin: 34px 0 0; padding: 16px 0 0; border-top: 1px solid var(--line); color: var(--muted); font: 500 13px/1.4 var(--display); }
.theme-fable-atlas .hero-meta span { display: inline-flex; align-items: center; gap: 8px; }
.theme-fable-atlas .hero-meta span::before { content: ''; width: 8px; height: 8px; background: var(--accent); }

/* sermons as a schedule */
.theme-fable-atlas .message-search { display: flex; flex-direction: column; gap: 6px; max-width: 420px; margin: 0 0 20px; font: 500 13px var(--display); color: var(--muted); }
.theme-fable-atlas .message-search input { min-height: 42px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 2px; background: var(--atlas-surface); color: var(--ink); font: 400 15px var(--body); }
.theme-fable-atlas .sermon-list { display: block; border-top: 2px solid var(--ink); }
.theme-fable-atlas .sermon-card { display: grid; grid-template-columns: 148px minmax(0, 1fr); gap: 12px 24px; align-items: start; padding: 20px 0; border-bottom: 1px solid var(--line); background: transparent; border-radius: 0; }
.theme-fable-atlas .sermon-card:hover { background: var(--atlas-surface); }
.theme-fable-atlas .sermon-visual { position: relative; margin: 0; }
.theme-fable-atlas .sermon-thumb { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 2px; filter: grayscale(.2); }
.theme-fable-atlas .sermon-visual .video-link { position: absolute; left: 8px; bottom: 8px; min-height: 32px; padding: 6px 10px; font-size: 12px; }
.theme-fable-atlas .sermon-content { display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px; }
.theme-fable-atlas .sermon-content .eyebrow { order: -1; font: 500 12px/1.3 var(--display); color: var(--accent); }
.theme-fable-atlas .sermon-content p { margin: 0; color: var(--muted); font-size: 15px; }
.theme-fable-atlas .block-sermons.variant-featured .sermon-card:first-child { grid-template-columns: minmax(0, 1fr); background: var(--atlas-surface); padding: 22px; margin: 18px 0; border: 1px solid var(--line); }
.theme-fable-atlas .block-sermons.variant-featured .sermon-card:first-child .sermon-thumb { aspect-ratio: 16 / 7; }
.theme-fable-atlas .block-sermons.variant-featured .sermon-card:first-child h3 { font-size: clamp(22px, 2.2vw, 30px); }

/* podcasts, ministries, books, channels, pathways */
.theme-fable-atlas .podcast-list { display: grid; gap: 0; border-top: 2px solid var(--ink); }
.theme-fable-atlas .podcast-list article { display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.theme-fable-atlas .ministry-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0 32px; border-top: 2px solid var(--ink); }
.theme-fable-atlas .ministry-grid article { padding: 18px 0; border-bottom: 1px solid var(--line); }
.theme-fable-atlas .ministry-grid article p { color: var(--muted); font-size: 15px; margin: 0 0 8px; }
.theme-fable-atlas .book-grid, .theme-fable-atlas .resource-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px; }
.theme-fable-atlas .book-card { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 18px; padding: 18px; background: var(--atlas-surface); border: 1px solid var(--line); border-radius: 2px; }
.theme-fable-atlas .book-cover { width: 96px; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 2px; }
.theme-fable-atlas .book-cover.placeholder { display: grid; place-items: center; padding: 8px; background: var(--ink); color: #fff; font: 500 11px/1.3 var(--display); text-align: center; }
.theme-fable-atlas .book-card p { margin: 0 0 6px; font-size: 14px; color: var(--muted); }
.theme-fable-atlas .book-card .button { margin-top: 8px; }
.theme-fable-atlas .channel-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 0 32px; border-top: 2px solid var(--ink); }
.theme-fable-atlas .channel-card { display: grid; gap: 6px; padding: 18px 0; border: 0; border-bottom: 1px solid var(--line); background: transparent; border-radius: 0; }
.theme-fable-atlas .channel-card > p:not(.eyebrow) { margin: 0; color: var(--muted); font-size: 15px; }
.theme-fable-atlas .channel-card .button { justify-self: start; margin-top: 8px; background: transparent; color: var(--accent); --paper: #2b4cff; padding: 0; min-height: 0; text-decoration: underline; text-underline-offset: 3px; }
.theme-fable-atlas .channel-card .button:hover { transform: none; color: #1b37d6; }
.theme-fable-atlas .pathway-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.theme-fable-atlas .pathway { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; padding: 18px; background: var(--ink); color: #fff; text-decoration: none; border-radius: 2px; transition: background .25s; }
.theme-fable-atlas .pathway:hover { background: var(--accent); }
.theme-fable-atlas .pathway h3 { color: #fff; margin: 0; }
.theme-fable-atlas .pathway p { grid-column: 1 / -1; margin: 0; color: #c9ccd4; font-size: 14px; }
.theme-fable-atlas .pathway-arrow { color: #9aa3ff; font-size: 20px; }
.theme-fable-atlas .ministry-gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.theme-fable-atlas .ministry-gallery figure { margin: 0; }
.theme-fable-atlas .ministry-gallery .gallery-open { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
.theme-fable-atlas .ministry-gallery img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 2px; }
.theme-fable-atlas .ministry-gallery figcaption { margin-top: 8px; font-size: 13px; color: var(--muted); }
.theme-fable-atlas .ministry-gallery figcaption small { display: block; font-size: 12px; }
.theme-fable-atlas .about-grid { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 32px; }
.theme-fable-atlas .about-grid .bio-photo { width: 100%; border-radius: 2px; margin-bottom: 16px; }
.theme-fable-atlas .invitation-ribbon { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 24px; align-items: center; padding: 28px; background: var(--ink); color: #fff; border-radius: 2px; }
.theme-fable-atlas .invitation-ribbon h2 { color: #fff; margin: 0 0 8px; }
.theme-fable-atlas .invitation-ribbon p { margin: 0; color: #c9ccd4; }
.theme-fable-atlas .ribbon-actions { display: grid; gap: 10px; justify-items: start; }
.theme-fable-atlas .ribbon-actions small { color: #9ea3ad; font-size: 12px; }
.theme-fable-atlas .contact-desk, .theme-fable-atlas .request-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 32px; }
.theme-fable-atlas .contact-option, .theme-fable-atlas .request-note, .theme-fable-atlas .engagement-form { padding: 18px; background: var(--atlas-surface); border: 1px solid var(--line); border-radius: 2px; }
.theme-fable-atlas .request-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.theme-fable-atlas .request-fields label { display: grid; gap: 6px; font: 500 13px var(--display); color: var(--muted); }
.theme-fable-atlas .request-fields .span-two { grid-column: 1 / -1; }
.theme-fable-atlas .request-fields :where(input,select,textarea) { min-height: 42px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 2px; background: #fff; color: var(--ink); font: 400 15px var(--body); }
.theme-fable-atlas .form-chapter { display: flex; align-items: baseline; gap: 10px; margin: 18px 0 10px; }
.theme-fable-atlas .form-chapter span { font: 500 12px var(--display); color: var(--accent); }
.theme-fable-atlas .article-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 0 32px; border-top: 2px solid var(--ink); }
.theme-fable-atlas .article-card { padding: 18px 0; border-bottom: 1px solid var(--line); }
.theme-fable-atlas .engagement-list article, .theme-fable-atlas .topic-list article { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.theme-fable-atlas .date-tile { display: grid; place-content: center; min-width: 76px; padding: 8px; background: var(--ink); color: #fff; font: 500 13px/1.3 var(--display); text-align: center; border-radius: 2px; }
.theme-fable-atlas .page-intro { padding: clamp(36px, 5vw, 64px) 0 20px; margin: 0 0 8px; border-bottom: 0; }
.theme-fable-atlas .page-intro .eyebrow { color: var(--accent); }

/* footer */
.theme-fable-atlas.site .site-footer { grid-column: 2; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px 32px; align-items: start; padding: 32px clamp(20px, 5vw, 72px) 40px; margin: 0; max-width: none; border-top: 2px solid var(--ink); color: var(--muted); font-size: 14px; }
.theme-fable-atlas.site .site-footer strong { font: 500 18px var(--display); color: var(--ink); }
.theme-fable-atlas.site .site-footer p { margin: 4px 0 0; }
.theme-fable-atlas.site .site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.theme-fable-atlas.site .site-footer nav a { color: var(--ink); font: 500 14px var(--display); text-decoration: none; }
.theme-fable-atlas.site .site-footer nav a:hover { color: var(--accent); }
.theme-fable-atlas.site .site-footer small { grid-column: 1 / -1; font-size: 12px; }

/* motion defaults (the script only enhances) */
.theme-fable-atlas [data-atlas-reveal] { opacity: 1; transform: none; }

@media (max-width: 960px) {
  .theme-fable-atlas.site { grid-template-columns: minmax(0, 1fr); }
  .theme-fable-atlas.site .site-header { grid-column: 1; grid-row: auto; position: sticky; top: 0; z-index: 5; height: auto; flex-direction: row; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px 18px; padding: 12px 16px; border-right: 0; border-bottom: 1px solid #2c3039; }
  .theme-fable-atlas .site-nav { flex-direction: row; flex-wrap: nowrap; overflow-x: auto; margin: 0; width: 100%; gap: 4px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .theme-fable-atlas .site-nav::-webkit-scrollbar { display: none; }
  .theme-fable-atlas .site-nav a { flex: 0 0 auto; min-height: 36px; padding: 6px 10px; font-size: 13px; }
  .theme-fable-atlas .site-nav a::before { display: none; }
  .theme-fable-atlas .atlas-rail-note { display: none; }
  .theme-fable-atlas.site > .site-main, .theme-fable-atlas.site .site-footer { grid-column: 1; }
  .theme-fable-atlas .hero-grid { grid-template-columns: minmax(0, 1fr); }
  .theme-fable-atlas .hero-art { order: -1; }
  .theme-fable-atlas.site .hero-image { height: auto; max-height: 60vh; aspect-ratio: 4 / 3; }
  .theme-fable-atlas .about-grid, .theme-fable-atlas .contact-desk, .theme-fable-atlas .request-layout, .theme-fable-atlas .invitation-ribbon { grid-template-columns: minmax(0, 1fr); }
  .theme-fable-atlas .section-heading { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
  .theme-fable-atlas.site h1 { font-size: clamp(38px, 11vw, 48px); }
  .theme-fable-atlas .sermon-card { grid-template-columns: minmax(0, 1fr); }
  .theme-fable-atlas .book-card { grid-template-columns: 72px minmax(0, 1fr); }
  .theme-fable-atlas .book-cover { width: 72px; }
  .theme-fable-atlas .request-fields { grid-template-columns: minmax(0, 1fr); }
  .theme-fable-atlas .request-fields .span-two { grid-column: auto; }
  .theme-fable-atlas .hero-meta { gap: 8px 18px; }
}
@media (prefers-reduced-motion: reduce) {
  .theme-fable-atlas * { transition-duration: 0s !important; }
}
.theme-fable-atlas .book-cover.placeholder, .theme-fable-atlas .book-cover { border-left: 0; box-shadow: none; }
