/* ============================================================================
   SERMONS & BIBLE STUDIES — the "lamplight library" look (sermons/, studies/).
   Warm paper, deep ink, one amber accent from the lamp of Psalm 119:105; a
   dark variant follows the reader's system setting. Separate from styles.css
   on purpose: the chart engines are dark-only and lock the viewport, these
   are reading pages. Spec:
   docs/superpowers/specs/2026-10-18-sermons-and-studies-design.md
   ============================================================================ */

/* Self-hosted faces (SIL OFL — fonts/OFL.txt). Fraunces for display, Source
   Serif 4 for Scripture and long reading, IBM Plex Sans for the interface. */
@font-face { font-family: "Fraunces"; src: url("fonts/fraunces.woff2") format("woff2");
             font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Fraunces"; src: url("fonts/fraunces-italic.woff2") format("woff2");
             font-weight: 100 900; font-style: italic; font-display: swap; }
@font-face { font-family: "Source Serif 4"; src: url("fonts/source-serif-4.woff2") format("woff2");
             font-weight: 200 900; font-display: swap; }
@font-face { font-family: "Source Serif 4"; src: url("fonts/source-serif-4-italic.woff2") format("woff2");
             font-weight: 200 900; font-style: italic; font-display: swap; }
@font-face { font-family: "IBM Plex Sans"; src: url("fonts/ibm-plex-sans-400.woff2") format("woff2");
             font-weight: 400; font-display: swap; }
@font-face { font-family: "IBM Plex Sans"; src: url("fonts/ibm-plex-sans-500.woff2") format("woff2");
             font-weight: 500; font-display: swap; }
@font-face { font-family: "IBM Plex Sans"; src: url("fonts/ibm-plex-sans-600.woff2") format("woff2");
             font-weight: 600; font-display: swap; }
@font-face { font-family: "Lamp Hebrew"; src: url("fonts/noto-serif-hebrew.woff2") format("woff2");
             font-display: swap; unicode-range: U+0590-05FF, U+FB1D-FB4F; }
@font-face { font-family: "Lamp Greek"; src: url("fonts/noto-serif-greek.woff2") format("woff2");
             font-display: swap; unicode-range: U+0370-03FF, U+1F00-1FFF, U+0300-036F; }

/* Tokens live on html.lamp, never bare :root: index.html is also the host for
   every chart, whose engines (styles.css) use some of the same names. app.js
   drops the class in chart mode, so none of this reaches a chart. The dark
   palette follows the device, unless the header button (lamp-theme.js) set
   data-lamp-theme on <html>. */
:root.lamp {
  --paper: #F2F0EB;
  --ink: #1B1F2A;
  --on-ink: #F2F0EB;
  --muted: #545B6B;            /* 6.3:1 on paper */
  --accent: #8A4F0B;           /* eyebrows, verse numbers, links (5.7:1) */
  --accent-bright: #A3600F;    /* rules and bars, not small text */
  --lamp: #E3A642;             /* amber on dark grounds */
  --card: #FFFFFF;
  --soft: #E9E5DB;
  --rule: #DDD8CC;
  --border: #C9C4B8;
  --header: #1B1F2A;
  --header-text: #F2F0EB;
  --featured: #1B1F2A;          /* the "Latest" banner, and the homepage title band */
  --stage: #0E1118;
  --stage-text: #F2EEE4;
  --bar-1: #8A4F0B; --bar-2: #1B1F2A; --bar-3: #A3600F; --bar-4: #545B6B;

  --f-display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --f-read: "Source Serif 4", "Iowan Old Style", Georgia, serif;
  --f-ui: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
  --f-he: "Lamp Hebrew", "SBL Hebrew", "Ezra SIL", "Times New Roman", serif;
  --f-gk: "Lamp Greek", "SBL Greek", "Times New Roman", serif;
  --radius: 12px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root.lamp:not([data-lamp-theme="light"]) {
    --paper: #12151C;
    --ink: #ECE7DC;
    --on-ink: #12151C;
    --muted: #A6ACB9;
    --accent: #E3A642;
    --accent-bright: #E3A642;
    --card: #1A1E27;
    --soft: #222733;
    --rule: #2B303B;
    --border: #3B414E;
    --header: #0B0D12;
    --bar-1: #E3A642; --bar-2: #ECE7DC; --bar-3: #B9822C; --bar-4: #7D8495;
    color-scheme: dark;
    --featured: #232937;
  }
}
:root.lamp[data-lamp-theme="dark"] {
  --paper: #12151C;
  --ink: #ECE7DC;
  --on-ink: #12151C;
  --muted: #A6ACB9;
  --accent: #E3A642;
  --accent-bright: #E3A642;
  --card: #1A1E27;
  --soft: #222733;
  --rule: #2B303B;
  --border: #3B414E;
  --header: #0B0D12;
  --bar-1: #E3A642; --bar-2: #ECE7DC; --bar-3: #B9822C; --bar-4: #7D8495;
  color-scheme: dark;
  --featured: #232937;
}

.lamp *, .lamp *::before, .lamp *::after { box-sizing: border-box; }
html.lamp { -webkit-text-size-adjust: 100%; }
.lamp body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.55 var(--f-ui);
}
.lamp a { color: var(--accent); text-underline-offset: 2px; }
.lamp a:hover { color: var(--ink); }
.lamp :focus-visible { outline: 3px solid var(--accent-bright); outline-offset: 2px; }
.lamp button, .lamp input, .lamp select, .lamp textarea { font: inherit; color: inherit; }
.lamp .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;
}

/* ---- Header: lamp mark + section nav ---------------------------------- */
.lamp .lh { background: var(--header); color: var(--header-text); }
.lamp .lh-in {
  max-width: 1160px; margin: 0 auto; padding: 10px 16px;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 24px;
}
.lamp .lh-brand {
  display: inline-flex; align-items: center; gap: 10px; min-height: 44px;
  color: var(--header-text); text-decoration: none;
  font: 600 21px/1 var(--f-display);
}
.lamp .lh-brand:hover { color: var(--header-text); }
.lamp .lh-mark { width: 30px; height: 28px; flex: none; }
.lamp .lh-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 22px; }
/* The light/dark button (lamp-theme.js): names the palette it switches to. */
.lamp .lh-theme {
  display: inline-flex; align-items: center; gap: 7px; min-height: 36px; padding: 0 13px;
  background: transparent; color: var(--header-text);
  border: 1px solid rgba(242, 240, 235, .28); border-radius: 999px;
  font: 500 13px/1 var(--f-ui); cursor: pointer;
}
.lamp .lh-theme:hover { border-color: var(--lamp); }
.lamp .lh-theme[hidden] { display: none; }
.lamp .lh-theme svg { width: 16px; height: 16px; flex: none; }
.lamp .lh-nav a {
  display: inline-flex; align-items: center; min-height: 44px;
  color: var(--header-text); opacity: .82; text-decoration: none;
  font: 500 15px/1 var(--f-ui);
  border-bottom: 3px solid transparent;
}
.lamp .lh-nav a:hover { opacity: 1; color: var(--header-text); }
.lamp .lh-nav a[aria-current] { opacity: 1; border-bottom-color: var(--lamp); }

/* ---- Page frame ------------------------------------------------------- */
.lamp .lw { max-width: 1160px; margin: 0 auto; padding: 0 16px 64px; }
.lamp .crumbs { margin: 18px 0 0; font-size: 14px; color: var(--muted); }
.lamp .crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px; }
.lamp .crumbs li + li::before { content: "/"; margin-right: 4px; color: var(--border); }
.lamp .crumbs a { color: var(--muted); }
.lamp .crumbs [aria-current] { color: var(--ink); }

.lamp .eyebrow {
  margin: 0 0 6px;
  font: 600 12px/1.3 var(--f-ui);
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--accent);
}
.lamp .muted { color: var(--muted); }
.lamp .lead-block { margin: 26px 0 22px; max-width: 72ch; }
.lamp .lead-block h1 {
  margin: 0;
  font: 600 clamp(32px, 5.2vw, 54px)/1.08 var(--f-display);
  letter-spacing: -.01em;
}
.lamp .lead-block .big-idea {
  margin: 12px 0 0;
  font: italic 400 clamp(18px, 2.2vw, 22px)/1.45 var(--f-read);
}
.lamp .meta { display: flex; flex-wrap: wrap; gap: 6px 22px; margin: 16px 0 0; padding: 0; font-size: 14px; }
.lamp .meta div { display: flex; gap: 6px; }
.lamp .meta dt { color: var(--muted); }
.lamp .meta dd { margin: 0; font-weight: 500; }

.lamp .notice { margin: 40px 0; padding: 22px 24px; background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius); }

/* ---- View switcher ---------------------------------------------------- */
.lamp .switch {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 10px;
  margin: 0 0 28px;
}
.lamp .switch button {
  display: flex; flex-direction: column; gap: 3px; align-items: flex-start; text-align: left;
  min-height: 64px; padding: 12px 16px; cursor: pointer;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  transition: background .15s ease, border-color .15s ease;
}
.lamp .switch button:hover { border-color: var(--ink); }
.lamp .switch .sw-label { font-weight: 600; font-size: 16px; }
.lamp .switch .sw-desc { font-size: 13px; color: var(--muted); }
.lamp .switch button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--on-ink); }
.lamp .switch button[aria-pressed="true"] .sw-desc { color: var(--on-ink); opacity: .8; }

/* ---- Shared components ------------------------------------------------ */
.lamp .card {
  background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius);
  padding: clamp(18px, 3vw, 28px);
}
.lamp .stack > * + * { margin-top: 18px; }
.lamp .card h2 { margin: 0; font: 600 clamp(22px, 2.6vw, 28px)/1.2 var(--f-display); }
.lamp .card h3 { margin: 22px 0 8px; font: 600 13px/1.3 var(--f-ui); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.lamp .part-head { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 14px; }
.lamp .part-head .eyebrow { margin-bottom: 4px; }
.lamp .badge {
  flex: none; display: inline-grid; place-items: center;
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--ink); color: var(--on-ink);
  font: 600 15px/1 var(--f-ui);
}
.lamp .badge.sm { width: 28px; height: 28px; font-size: 13px; }

.lamp .rows { display: grid; grid-template-columns: 9.5em 1fr; gap: 0; margin: 14px 0 0; }
.lamp .rows dt, .lamp .rows dd { padding: 11px 0; border-top: 1px solid var(--rule); }
.lamp .rows dt { font: 600 13px/1.5 var(--f-ui); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding-right: 14px; }
.lamp .rows dd { margin: 0; font: 17px/1.6 var(--f-read); }

.lamp .read { max-width: 68ch; font: 18px/1.7 var(--f-read); }
.lamp .read p { margin: 0 0 14px; }
.lamp .statement { margin: 0 0 10px; font: 500 19px/1.55 var(--f-read); }
.lamp .subs { margin: 0; padding-left: 1.2em; font: 17px/1.6 var(--f-read); }
.lamp .subs li { margin: 4px 0; }
.lamp .onscreen-h { margin: 16px 0 6px; font: 600 12px/1.2 var(--f-ui); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.lamp .onscreen { margin: 0; padding-left: 1.4em; font: 17px/1.55 var(--f-read); }
.lamp .onscreen li { margin: 4px 0; }
.lamp .onscreen .ref { font: 500 13px/1 var(--f-ui); color: var(--accent); white-space: nowrap; }

.lamp .btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px; cursor: pointer;
  background: transparent; color: var(--ink); text-decoration: none;
  border: 1px solid var(--ink); border-radius: 999px;
  font: 600 14px/1 var(--f-ui);
}
.lamp .btn:hover { background: var(--ink); color: var(--on-ink); }
.lamp .btn.solid { background: var(--ink); color: var(--on-ink); }
.lamp .btn.solid:hover { opacity: .88; }
.lamp .part-foot { margin-top: 18px; }

/* Scripture: verse numbers in accent, Source Serif for the text. */
.lamp .scripture { margin: 14px 0 0; font: 19px/1.75 var(--f-read); max-width: 68ch; }
.lamp .scripture p { margin: 0 0 6px; }
.lamp .scripture sup { font: 600 12px/1 var(--f-ui); color: var(--accent); margin-right: 4px; vertical-align: .55em; }

/* Time budget bar */
.lamp .budget { margin: 10px 0 0; }
.lamp .budget-bar { display: flex; height: 12px; border-radius: 6px; overflow: hidden; background: var(--soft); }
.lamp .budget-bar span { display: block; height: 100%; }
.lamp .budget-bar span + span { border-left: 2px solid var(--card); }
.lamp .budget-legend { list-style: none; margin: 10px 0 0; padding: 0; font-size: 14px; }
.lamp .budget-legend li { display: flex; align-items: center; gap: 8px; padding: 3px 0; }
.lamp .budget-legend i { flex: none; width: 10px; height: 10px; border-radius: 3px; }
.lamp .budget-legend b { margin-left: auto; font-weight: 500; font-variant-numeric: tabular-nums; }
.lamp .budget-total { margin: 8px 0 0; padding-top: 8px; border-top: 1px solid var(--rule); font-weight: 600; display: flex; }
.lamp .budget-total b { margin-left: auto; }

/* ---- Sermon: preacher outline ---------------------------------------- */
.lamp .outline { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; align-items: start; }
.lamp .outline-side { position: sticky; top: 16px; }
.lamp .outline-side .idea { margin: 0; font: italic 18px/1.5 var(--f-read); }
.lamp .jump { list-style: none; margin: 8px 0 0; padding: 0; }
.lamp .jump a { display: flex; align-items: center; gap: 10px; min-height: 40px; color: var(--ink); text-decoration: none; }
.lamp .jump a:hover { color: var(--accent); }
.lamp .part-min { font-variant-numeric: tabular-nums; }

/* ---- Sermon: deep study ---------------------------------------------- */
.lamp .words { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.lamp .word { border: 1px solid var(--rule); border-radius: 10px; padding: 14px 16px; background: var(--paper); }
.lamp .word-top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.lamp .word .he { font: 400 28px/1.3 var(--f-he); }
.lamp .word .gk { font: 400 24px/1.3 var(--f-gk); }
.lamp .word .tr { font: italic 17px/1.3 var(--f-read); }
.lamp .word .sn { font: 600 12px/1 var(--f-ui); letter-spacing: .06em; color: var(--accent); }
.lamp .word .gl { margin: 6px 0 0; font-size: 13px; color: var(--muted); }
.lamp .word .gl b { color: var(--ink); font-weight: 600; }
.lamp .word p.note { margin: 8px 0 0; font: 16px/1.55 var(--f-read); }
.lamp .xrefs { list-style: none; margin: 0; padding: 0; }
.lamp .xrefs li { padding: 8px 0; border-top: 1px solid var(--rule); font: 17px/1.55 var(--f-read); }
.lamp .xrefs b { font: 600 15px/1.4 var(--f-ui); margin-right: 6px; }
.lamp .reflect { margin: 0; padding-left: 1.3em; font: 17px/1.6 var(--f-read); }
.lamp .reflect li { margin: 6px 0; }

/* ---- Study lesson: questions ----------------------------------------- */
.lamp .qs { list-style: none; margin: 18px 0 0; padding: 0; }
.lamp .q { display: flex; gap: 12px; padding: 14px 0; border-top: 1px solid var(--rule); }
.lamp .q-body { flex: 1; min-width: 0; }
.lamp .q-text { margin: 3px 0 0; font: 500 18px/1.5 var(--f-read); }
.lamp .tag {
  display: inline-block; margin-left: 6px; padding: 2px 8px; border-radius: 999px; vertical-align: 2px;
  font: 600 11px/1.4 var(--f-ui); letter-spacing: .08em; text-transform: uppercase;
  color: var(--accent); border: 1px solid currentColor;
}
.lamp .answer { margin: 10px 0 0; padding: 10px 14px; border-left: 3px solid var(--accent-bright); background: var(--soft); border-radius: 0 8px 8px 0; }
.lamp .answer p { margin: 0; font: 16px/1.6 var(--f-read); }
.lamp .answer .eyebrow { margin-bottom: 4px; }
.lamp .note-box { margin: 0 0 16px; padding: 12px 16px; background: var(--soft); border-radius: 10px; font-size: 15px; }
.lamp .note-box .eyebrow { margin-bottom: 2px; }
.lamp .handout-head { display: flex; justify-content: flex-end; }
.lamp .write-space { display: none; }

/* ---- Libraries -------------------------------------------------------- */
.lamp .featured {
  display: grid; gap: 8px; margin: 26px 0 28px; padding: clamp(22px, 4vw, 40px);
  background: var(--featured); color: #F2F0EB; border-radius: 16px;
}
.lamp .featured .eyebrow { color: var(--lamp); }
.lamp .featured h2 { margin: 0; font: 600 clamp(28px, 4vw, 44px)/1.1 var(--f-display); }
.lamp .featured .big-idea { margin: 4px 0 0; max-width: 60ch; font: italic 19px/1.5 var(--f-read); opacity: .92; }
.lamp .featured .fmeta { margin: 6px 0 10px; font-size: 14px; opacity: .78; }
.lamp .featured .btn { justify-self: start; background: var(--lamp); color: #1B1F2A; border-color: var(--lamp); }
.lamp .featured .btn:hover { opacity: .9; }

.lamp .filters { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; margin: 0 0 20px; }
.lamp .filters input[type="search"], .lamp .filters select {
  min-height: 44px; padding: 0 14px; background: var(--card);
  border: 1px solid var(--border); border-radius: 10px;
}
.lamp .filters input[type="search"] { flex: 1 1 260px; }
.lamp .chips { display: flex; gap: 8px; }
.lamp .chip {
  min-height: 44px; padding: 0 16px; cursor: pointer; border-radius: 999px;
  background: var(--card); border: 1px solid var(--border); font-weight: 500;
}
.lamp .chip[aria-pressed="true"] { background: var(--ink); color: var(--on-ink); border-color: var(--ink); }
.lamp .count { margin: 0 0 12px; font-size: 14px; color: var(--muted); }

.lamp .grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: 18px; }
.lamp .lcard {
  display: flex; flex-direction: column; gap: 6px; padding: 20px 22px;
  background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius);
  color: var(--ink); text-decoration: none;
  transition: border-color .15s ease, transform .15s ease;
}
.lamp .lcard:hover { color: var(--ink); border-color: var(--accent-bright); transform: translateY(-2px); }
.lamp .lcard h3 { margin: 0; font: 600 22px/1.2 var(--f-display); }
.lamp .lcard p:not(.eyebrow) { margin: 0; font: 16px/1.55 var(--f-read); color: var(--muted); }
.lamp .lcard .lfoot { margin-top: auto; padding-top: 12px; display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13px; color: var(--muted); }
/* ---- Study series ----------------------------------------------------- */
.lamp .index-h { margin: 30px 0 14px; font: 600 13px/1.3 var(--f-ui); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.lamp .lead-block + .index-h { margin-top: 8px; }
.lamp .series-intro { margin: 0 0 8px; }
.lamp .series-intro .read p:last-child { margin-bottom: 0; }
.lamp .series-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.lamp .series-list .lcard { flex-direction: row; gap: 16px; align-items: flex-start; }
.lamp .series-list .lcard > div { display: flex; flex-direction: column; gap: 6px; min-width: 0; flex: 1; }
.lamp .series-list .lfoot { padding-top: 6px; }
.lamp .series-nav {
  display: grid; grid-template-columns: 1fr auto 1fr; gap: 12px; align-items: stretch; margin: 28px 0 0;
}
.lamp .series-nav a.sn-prev, .lamp .series-nav a.sn-next {
  display: flex; flex-direction: column; gap: 4px; padding: 14px 18px; text-decoration: none; color: var(--ink);
  background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius);
}
.lamp .series-nav a.sn-prev:hover, .lamp .series-nav a.sn-next:hover { border-color: var(--accent-bright); }
.lamp .series-nav .eyebrow { margin: 0; }
.lamp .series-nav .sn-next { text-align: right; align-items: flex-end; }
.lamp .series-nav .sn-title { font: 600 17px/1.3 var(--f-display); }
.lamp .series-nav .sn-all { align-self: center; padding: 8px 12px; font-weight: 600; font-size: 14px; white-space: nowrap; }
@media (max-width: 560px) {
  .lamp .series-nav { grid-template-columns: 1fr 1fr; }
  .lamp .series-nav .sn-all { grid-column: 1 / -1; grid-row: 2; justify-self: center; }
  .lamp .series-list .lcard { padding: 16px; gap: 12px; }
}

/* Printing a whole series: the panel on the series page, and the printout page. */
.lamp .print-panel { display: flex; flex-wrap: wrap; gap: 14px 24px; align-items: center; justify-content: space-between; margin: 18px 0 0; }
.lamp .print-panel h2 { font-size: 22px; }
.lamp .print-panel p, .lamp .print-bar p { margin: 4px 0 0; color: var(--muted); }
.lamp .print-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.lamp .print-panel .btn { flex-direction: column; align-items: flex-start; gap: 2px; padding: 10px 18px; border-radius: var(--radius); text-align: left; }
.lamp .print-panel .btn small { font-weight: 400; font-size: 13px; opacity: .8; }
.lamp .print-bar { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; justify-content: space-between; margin: 0 0 18px; }
.lamp .print-bar p { margin: 0; }
.lamp .contents ol { list-style: none; margin: 0 0 8px; padding: 0; columns: 2 300px; column-gap: 28px; }
.lamp .contents li { break-inside: avoid; margin: 0 0 8px; }
.lamp .contents a { display: flex; flex-wrap: wrap; gap: 2px 10px; color: var(--ink); text-decoration: none; font: 17px/1.4 var(--f-read); }
.lamp .contents a span { font: 600 12px/1.9 var(--f-ui); letter-spacing: .08em; text-transform: uppercase; color: var(--accent); min-width: 5.5em; }
.lamp .contents a em { font-style: normal; color: var(--muted); font-size: 15px; }
.lamp .contents a:hover { color: var(--accent); }
.lamp .print-lesson { margin: 40px 0 0; padding-top: 28px; border-top: 2px solid var(--rule); }
.lamp .print-lesson-head { margin: 0 0 18px; max-width: 72ch; }
.lamp .print-lesson-head h2 { margin: 0; font: 600 clamp(26px, 3.6vw, 38px)/1.12 var(--f-display); }
.lamp .print-lesson-head .big-idea { margin: 8px 0 0; font: italic 18px/1.5 var(--f-read); }

/* A passage over several chapters: a heading per chapter; a long one starts folded. */
.lamp .scripture .chap { margin: 22px 0 8px; font: 600 13px/1.3 var(--f-ui); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.lamp .scripture .chap:first-child { margin-top: 4px; }
.lamp .passage-fold { margin-top: 12px; }
.lamp .passage-fold summary {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; cursor: pointer;
  border: 1px solid var(--border); border-radius: 999px; font-weight: 600; font-size: 15px;
}
.lamp .passage-fold summary:hover { border-color: var(--ink); }
.lamp .passage-fold[open] summary { margin-bottom: 6px; }

.lamp .empty { padding: 34px 20px; text-align: center; background: var(--card); border: 1px dashed var(--border); border-radius: var(--radius); }
.lamp .empty p { margin: 0 0 12px; }

/* ---- Presentation stage (always dark: it goes to a projector) -------- */
.lamp .stage {
  position: fixed; inset: 0; z-index: 100;
  display: grid; place-items: center;
  background: var(--stage); color: var(--stage-text);
  cursor: pointer; user-select: none; -webkit-user-select: none;
}
.lamp .stage[hidden] { display: none; }
.lamp .slide {
  container-type: size;
  width: min(100vw, 177.78vh); height: min(56.25vw, 100vh);
  display: flex; flex-direction: column; justify-content: center;
  padding: 6cqh 6cqw;
}
.lamp .slide .s-eyebrow { margin: 0 0 3cqh; font: 600 3.2cqh/1.2 var(--f-ui); letter-spacing: .16em; text-transform: uppercase; color: var(--lamp); }
.lamp .slide .s-title { margin: 0; font: 600 12cqh/1.08 var(--f-display); }
.lamp .slide .s-sub { margin: 4cqh 0 0; font: italic 5.6cqh/1.35 var(--f-read); opacity: .85; }
.lamp .slide .s-text { margin: 0; font: 400 7cqh/1.4 var(--f-read); }
.lamp .slide .s-idea { margin: 0; font: italic 400 9cqh/1.28 var(--f-display); }
.lamp .slide .s-ref { margin: 4cqh 0 0; font: 500 3.8cqh/1.2 var(--f-ui); color: var(--lamp); }
/* A point that builds: the title, then rows sharing the rest of the height,
   one more per step (word left, our line and its reference right). */
.lamp .slide .s-head { font-size: 8cqh; }
.lamp .slide .s-rows { flex: 1; display: flex; flex-direction: column; margin-top: 3cqh; min-height: 0; }
.lamp .slide .s-row {
  flex: 1; display: grid; grid-template-columns: 32% 1fr; gap: 3cqw; align-items: center;
  border-top: 1px solid rgba(255, 255, 255, .14); transition: opacity .35s ease, transform .35s ease;
}
.lamp .slide .s-row.is-past { opacity: .4; }
.lamp .slide .s-row.is-hidden { opacity: 0; visibility: hidden; transform: translateY(2cqh); }
.lamp .slide .s-word { margin: 0; font: 600 7.6cqh/1.05 var(--f-display); overflow-wrap: break-word; hyphens: auto; }
.lamp .slide .s-line { margin: 0; font: 400 5.4cqh/1.3 var(--f-read); }
.lamp .slide .s-row .s-ref { margin-top: 1.4cqh; font-size: 3.2cqh; }
.lamp .stage-progress { position: absolute; top: 0; left: 0; height: 3px; background: var(--lamp); transition: width .25s ease; }
.lamp .stage-ui {
  position: absolute; right: 14px; bottom: 12px;
  display: flex; align-items: center; gap: 12px;
  font: 500 13px/1 var(--f-ui); color: rgba(242, 238, 228, .6);
  transition: opacity .4s ease;
}
.lamp .stage-ui button {
  min-height: 44px; min-width: 44px; padding: 0 14px; cursor: pointer;
  background: rgba(255, 255, 255, .06); color: var(--stage-text);
  border: 1px solid rgba(255, 255, 255, .18); border-radius: 999px;
}
.lamp .stage-ui button:hover { background: rgba(255, 255, 255, .14); }
.lamp body.hl-idle .stage { cursor: none; }
.lamp body.hl-idle .stage-ui { opacity: 0; }
.lamp body.presenting { overflow: hidden; }

/* ---- Phone width ------------------------------------------------------ */
@media (max-width: 860px) {
  .lamp .outline { grid-template-columns: minmax(0, 1fr); }
  .lamp .outline-side { position: static; order: -1; }
}
@media (max-width: 560px) {
  .lamp .rows { grid-template-columns: 1fr; }
  .lamp .rows dt { padding-bottom: 0; }
  .lamp .rows dd { border-top: 0; padding-top: 2px; }
  .lamp .lh-brand { font-size: 19px; }
}

@media (prefers-reduced-motion: reduce) {
  .lamp * { transition: none !important; }
}

/* ---- Footer: site links and credit, on every lamp page ---------------- */
.lamp .lf { border-top: 1px solid var(--rule); }
.lamp .lf-in {
  max-width: 1160px; margin: 0 auto; padding: 18px 16px 30px;
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 24px;
  font-size: 14px; color: var(--muted);
}
.lamp .lf-links { display: flex; flex-wrap: wrap; gap: 0 18px; }
.lamp .lf-links a { display: inline-flex; align-items: center; min-height: 36px; color: var(--muted); text-decoration: none; }
.lamp .lf-links a:hover { color: var(--ink); text-decoration: underline; }
.lamp .lf-links a[aria-current] { color: var(--ink); }
.lamp .lf-credit { margin-left: auto; }
@media (max-width: 560px) { .lamp .lf-credit { margin-left: 0; } }

/* ---- Info pages: about, privacy, license, All Charts ------------------ */
/* Plain documents in a ~70ch reading column. styles.css isn't loaded. */
.lamp .legal-inner { max-width: 72ch; margin: 0 auto; padding: 0 16px 56px; font: 17px/1.65 var(--f-read); overflow-wrap: break-word; }
.lamp .legal-head { margin: 34px 0 24px; }
.lamp .legal-title { margin: 0; font: 600 clamp(34px, 5.4vw, 52px)/1.08 var(--f-display); letter-spacing: -.01em; }
.lamp .legal-date { margin: 10px 0 0; font: 600 12px/1.3 var(--f-ui); letter-spacing: .12em; text-transform: uppercase; color: var(--accent); }
.lamp .legal-summary { margin: 0 0 12px; padding: 16px 20px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--rule); }
.lamp .legal-inner h2 { margin: 38px 0 10px; font: 600 26px/1.2 var(--f-display); }
.lamp .legal-inner h3 { margin: 26px 0 6px; font: 600 20px/1.25 var(--f-display); }
.lamp .legal-inner p { margin: 0 0 14px; }
.lamp .legal-inner ul { margin: 0 0 14px; padding-left: 1.3em; }
.lamp .legal-inner li { margin-bottom: 6px; }
.lamp .legal-inner code {
  font-family: Consolas, "SFMono-Regular", Menlo, monospace; font-size: .86em;
  padding: 1px 5px; border-radius: 5px; background: var(--soft);
}
.lamp .legal-pre {
  margin: 4px 0 18px; padding: 16px 18px; border-radius: var(--radius);
  background: var(--card); border: 1px solid var(--rule);
  font: 13px/1.55 Consolas, "SFMono-Regular", Menlo, monospace;
  white-space: pre-wrap; overflow-wrap: break-word;
}
.lamp .legal-table { width: 100%; margin: 4px 0 18px; border-collapse: collapse; font: 15px/1.5 var(--f-ui); background: var(--card); border: 1px solid var(--rule); }
.lamp .legal-table th, .lamp .legal-table td { padding: 9px 12px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--rule); }
.lamp .legal-table th { font: 600 12px/1.3 var(--f-ui); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.lamp .legal-table tbody tr:last-child td { border-bottom: 0; }
.lamp .legal-table code { white-space: nowrap; }
@media (max-width: 560px) {
  .lamp .legal-table thead { display: none; }
  .lamp .legal-table tr { display: block; padding: 8px 0; border-bottom: 1px solid var(--rule); }
  .lamp .legal-table tbody tr:last-child { border-bottom: 0; }
  .lamp .legal-table td { display: block; padding: 2px 12px; border: 0; }
  .lamp .legal-table td::before { content: attr(data-label) ": "; color: var(--muted); font-size: 13px; }
}
.lamp .all-charts { list-style: none; padding: 0; }
.lamp .all-charts li { margin: 0 0 14px; color: var(--muted); }
.lamp .all-charts a { font-weight: 600; }

/* ---- Print: handouts (Questions only, Student) ------------------------ */
@media print {
  html.lamp.lamp:root {   /* outranks both dark-token rules */
    --paper: #fff; --card: #fff; --ink: #000; --on-ink: #fff; --muted: #333;
    --accent: #000; --accent-bright: #000; --soft: #fff; --rule: #bbb; --border: #888;
    color-scheme: light;
  }
  .lamp body { font-size: 12pt; }
  .lamp .lh, .lamp .lf, .lamp .crumbs, .lamp .switch, .lamp .no-print, .lamp .stage, .lamp .part-foot { display: none !important; }
  .lamp .lw { max-width: none; padding: 0; }
  .lamp .lead-block { margin: 0 0 12pt; }
  .lamp .card { border: 0; padding: 0; }
  .lamp .outline { display: block; }
  .lamp .print-part + .print-part { break-before: page; }
  .lamp .qsheet .print-part + .print-part { break-before: auto; margin-top: 18pt; }
  .lamp [data-page="lesson"] .meta { display: none; }
  .lamp .q { break-inside: avoid; border: 0; padding: 0 0 8pt; }
  .lamp [data-page="lesson"] .part-head .badge { display: none; }
  .lamp .q { gap: 6pt; }
  .lamp .q .badge { display: block; width: auto; height: auto; margin-top: 3px; background: none; color: inherit; font: 500 18px/1.5 var(--f-read); }
  .lamp .q .badge::after { content: "."; }
  .lamp .q .tag { display: none; }
  .lamp .write-space { display: block; height: 1.1in; }
  .lamp a { color: inherit; text-decoration: none; }
  /* A series printout: each lesson on a new sheet (the teacher edition's
     cover and contents get their own); within a lesson, parts run on. */
  .lamp .print-lesson { margin: 0; padding: 0; border: 0; }
  .lamp .series-print .print-lesson + .print-lesson, .lamp .series-print.teacher .print-lesson { break-before: page; }
  .lamp .series-print .print-part + .print-part { break-before: auto; margin-top: 18pt; }
  .lamp .series-print .part-head .badge, .lamp .series-print .meta { display: none; }
  .lamp .print-lesson-head { margin: 0 0 12pt; }
}

/* A link to a non-default view: <main> waits for lamp.js to draw it (see the inline script in each record page's <head>). */
.lamp.lamp-wait #main { visibility: hidden; }
