/* ═══════════════════════════════════════════════════════════════════════════════════════════════
   Answering Anti-Zionist Claims with Scripture — style.css   (https://GoJes.us/Zionism/)
   Hand-written. No framework, no build step. Read CLAUDE.md (local only) before editing.

   RULES (tests enforce them — other/scripts/test_site.py)
     1. Every font-size is rem (or inherit). The A↕ button only changes --font-scale on <html>.
     2. Every colour comes from a theme variable. After touching a theme: python other/scripts/check_contrast.py
     3. No class names the shared GoJes.us menu CSS restyles: active content collapsible sidenav closebtn phpmenu
     4. The verse popup (#bible-popup) belongs to /Javascript/Bible_popup.js — override it only in §11, never edit it.

   TABLE OF CONTENTS
     §1  Tokens (non-colour)            §8  Claim cards
     §2  Themes (8)                     §9  References (chips + summaries)
     §3  Base + typography              §10 Closing, footer, back-to-top, toast
     §4  Splash                         §11 Bible popup overrides (contrasting card per theme)
     §5  Hero                           §12 Motion + reduced motion
     §6  Toolbar + search               §13 No-JS
     §7  Intro + claim index            §14 Print
   ═══════════════════════════════════════════════════════════════════════════════════════════════ */

/* ── §1 TOKENS ─────────────────────────────────────────────────────────────────────────────── */
:root {
    --font-scale: 1;                                  /* set by the A↕ button (0.85 · 1 · 1.15 · 1.3 · 1.5) */
    --font-title: "Gabriela", Georgia, "Times New Roman", serif;
    --font-body: "Lato", "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", Arial, sans-serif;
    --radius: 1rem;
    --radius-sm: .625rem;
    --pill: 999px;
    --max: 70rem;                                     /* content width */
    --ease: cubic-bezier(.2, .6, .2, 1);
    --speed: 200ms;
    --toolbar-h: 4.25rem;                             /* used for scroll-margin under the sticky toolbar */
}

/* ── §2 THEMES ─────────────────────────────────────────────────────────────────────────────────
   One data-theme on <html> (set before first paint by the boot script in index.htm).
   No attribute = Dark Sky Blue. Order here = order of the 🎨 cycle (THEMES in script.js).
   --popup-* colour the verse popup: a parchment card on dark themes, a deep card on light themes,
   so it always CONTRASTS with the page behind it. */
:root,
html[data-theme="dark-sky"] {
    color-scheme: dark;
    --bg: #0b233a; --bg-2: #0e2a47; --hero-1: #091d31; --hero-2: #143b60;
    --surface: #123455; --card: #143a60; --card-open: #17426b;
    --text: #eff6ff; --text-2: #d6e6f8; --muted: #a9c4e0;
    --accent: #50b5ff; --accent-ink: #061522; --link: #8fd0ff;
    --border: #24557f; --border-strong: #3a72a3;
    --chip: #0f2f4f; --chip-ink: #f2f8ff; --chip-border: #3a6d9a; --chip-hover: #1a4874;
    --focus: #ffd479; --title: #f6d27a; --gold: #d9b25c;
    --title-shadow: 0 .125rem .25rem rgba(0, 0, 0, .65), 0 .25rem 1.25rem rgba(0, 0, 0, .45);
    --answer-bg: #1b4166; --mark: #2a4f6e; --hit: #1d4a74;
    --toolbar-bg: rgba(11, 35, 58, .9); --shadow: 0 .4rem 1.2rem rgba(0, 0, 0, .28);
    --popup-bg: #fdf8ec; --popup-ink: #1d2433; --popup-strong: #0b233a; --popup-muted: #555c6b;
    --popup-edge: #c9a24a; --popup-link: #1d4ed8; --popup-hover: rgba(11, 35, 58, .08);
}
html[data-theme="dark-graphite"] {
    color-scheme: dark;
    --bg: #111113; --bg-2: #18181b; --hero-1: #0b0b0d; --hero-2: #26262c;
    --surface: #1c1c1f; --card: #202024; --card-open: #26262b;
    --text: #f3f4f6; --text-2: #e2e4e9; --muted: #b5b5be;
    --accent: #8ab4ff; --accent-ink: #0b0c0f; --link: #a9c7ff;
    --border: #34343b; --border-strong: #4a4a53;
    --chip: #18181c; --chip-ink: #f3f4f6; --chip-border: #4f4f59; --chip-hover: #2c2c33;
    --focus: #ffd479; --title: #ecd59a; --gold: #c9a24a;
    --title-shadow: 0 .125rem .25rem rgba(0, 0, 0, .7), 0 .25rem 1.25rem rgba(0, 0, 0, .5);
    --answer-bg: #29282a; --mark: #3a3a44; --hit: #2b2f3a;
    --toolbar-bg: rgba(17, 17, 19, .9); --shadow: 0 .4rem 1.2rem rgba(0, 0, 0, .4);
    --popup-bg: #fdf8ec; --popup-ink: #1d2433; --popup-strong: #1b1b1f; --popup-muted: #555c6b;
    --popup-edge: #c9a24a; --popup-link: #1d4ed8; --popup-hover: rgba(17, 17, 19, .08);
}
html[data-theme="dark-emerald"] {
    color-scheme: dark;
    --bg: #071a14; --bg-2: #0b241c; --hero-1: #04120d; --hero-2: #12382c;
    --surface: #0e2a22; --card: #103128; --card-open: #133a2f;
    --text: #eafff7; --text-2: #d0f2e5; --muted: #a9d2c2;
    --accent: #36d399; --accent-ink: #04110c; --link: #7ee8bf;
    --border: #1d5444; --border-strong: #2b6e5a;
    --chip: #0b241d; --chip-ink: #eafff7; --chip-border: #2f6f5b; --chip-hover: #164537;
    --focus: #ffd479; --title: #f3d98b; --gold: #d4b25e;
    --title-shadow: 0 .125rem .25rem rgba(0, 0, 0, .65), 0 .25rem 1.25rem rgba(0, 0, 0, .45);
    --answer-bg: #193c2f; --mark: #1f4c3e; --hit: #17463a;
    --toolbar-bg: rgba(7, 26, 20, .9); --shadow: 0 .4rem 1.2rem rgba(0, 0, 0, .3);
    --popup-bg: #fdf8ec; --popup-ink: #1d2433; --popup-strong: #08291f; --popup-muted: #555c6b;
    --popup-edge: #c9a24a; --popup-link: #1d4ed8; --popup-hover: rgba(7, 26, 20, .08);
}
html[data-theme="dark-violet"] {
    color-scheme: dark;
    --bg: #160a1e; --bg-2: #1f0f2b; --hero-1: #0f0617; --hero-2: #331a4a;
    --surface: #261236; --card: #2d1541; --card-open: #34194b;
    --text: #f7f3ff; --text-2: #e6dcfa; --muted: #c6b3db;
    --accent: #b18cff; --accent-ink: #0c0612; --link: #cdb4ff;
    --border: #44236a; --border-strong: #5c3487;
    --chip: #221035; --chip-ink: #f7f3ff; --chip-border: #5c3a85; --chip-hover: #3c1f59;
    --focus: #ffd479; --title: #f6d27a; --gold: #d4af5a;
    --title-shadow: 0 .125rem .25rem rgba(0, 0, 0, .65), 0 .25rem 1.25rem rgba(0, 0, 0, .45);
    --answer-bg: #3a2148; --mark: #46285f; --hit: #3d2159;
    --toolbar-bg: rgba(22, 10, 30, .9); --shadow: 0 .4rem 1.2rem rgba(0, 0, 0, .35);
    --popup-bg: #fdf8ec; --popup-ink: #1d2433; --popup-strong: #2a0f3d; --popup-muted: #555c6b;
    --popup-edge: #c9a24a; --popup-link: #1d4ed8; --popup-hover: rgba(22, 10, 30, .08);
}
html[data-theme="light-sky"] {
    color-scheme: light;
    --bg: #f5fbff; --bg-2: #e9f3fd; --hero-1: #d6e8fa; --hero-2: #f5fbff;
    --surface: #ffffff; --card: #ffffff; --card-open: #fbfdff;
    --text: #0b233a; --text-2: #1f3c5a; --muted: #48688a;
    --accent: #0062cc; --accent-ink: #ffffff; --link: #0057b8;
    --border: #cfe0f1; --border-strong: #9fbfe0;
    --chip: #eef5fd; --chip-ink: #0b233a; --chip-border: #a9c6e4; --chip-hover: #deebfa;
    --focus: #005dd1; --title: #0b3a66; --gold: #b8862b;
    --title-shadow: 0 .0625rem 0 rgba(255, 255, 255, .9), 0 .2rem .9rem rgba(11, 35, 58, .25);
    --answer-bg: #fff8e6; --mark: #ffe9a8; --hit: #fff6d9;
    --toolbar-bg: rgba(245, 251, 255, .92); --shadow: 0 .35rem 1rem rgba(11, 35, 58, .1);
    --popup-bg: #0f2740; --popup-ink: #eef4fb; --popup-strong: #f6d27a; --popup-muted: #b8c7d9;
    --popup-edge: #c9a24a; --popup-link: #9cc9ff; --popup-hover: rgba(255, 255, 255, .1);
}
html[data-theme="light-ivory"] {
    color-scheme: light;
    --bg: #fffdf7; --bg-2: #fbf5e6; --hero-1: #f5e8c8; --hero-2: #fffdf7;
    --surface: #ffffff; --card: #ffffff; --card-open: #fffdf8;
    --text: #2b261c; --text-2: #463f31; --muted: #6a6050;
    --accent: #b4530b; --accent-ink: #ffffff; --link: #9a4508;
    --border: #efe3cb; --border-strong: #d9c39a;
    --chip: #fff6e4; --chip-ink: #2b261c; --chip-border: #e2c995; --chip-hover: #fdeccc;
    --focus: #9a4508; --title: #6b3410; --gold: #c08a2e;
    --title-shadow: 0 .0625rem 0 rgba(255, 255, 255, .9), 0 .2rem .9rem rgba(107, 52, 16, .22);
    --answer-bg: #fff4dc; --mark: #ffe2a3; --hit: #fff3d6;
    --toolbar-bg: rgba(255, 253, 247, .92); --shadow: 0 .35rem 1rem rgba(60, 40, 10, .1);
    --popup-bg: #2b2318; --popup-ink: #fbf3e2; --popup-strong: #f6d27a; --popup-muted: #d7c9ad;
    --popup-edge: #c08a2e; --popup-link: #ffcf8a; --popup-hover: rgba(255, 255, 255, .1);
}
html[data-theme="light-mint"] {
    color-scheme: light;
    --bg: #f6fffb; --bg-2: #e8f8f0; --hero-1: #d3f1e3; --hero-2: #f6fffb;
    --surface: #ffffff; --card: #ffffff; --card-open: #fbfffd;
    --text: #052d1f; --text-2: #0a4a36; --muted: #3c6a5a;
    --accent: #0b7b5c; --accent-ink: #ffffff; --link: #08694e;
    --border: #cfeee0; --border-strong: #9fd6bd;
    --chip: #edfcf5; --chip-ink: #052d1f; --chip-border: #a3d9c1; --chip-hover: #dcf5e9;
    --focus: #0b7b5c; --title: #064e3b; --gold: #a8862e;
    --title-shadow: 0 .0625rem 0 rgba(255, 255, 255, .9), 0 .2rem .9rem rgba(6, 78, 59, .22);
    --answer-bg: #f1faef; --mark: #fde7a6; --hit: #fff6d9;
    --toolbar-bg: rgba(246, 255, 251, .92); --shadow: 0 .35rem 1rem rgba(5, 45, 31, .1);
    --popup-bg: #0b2a20; --popup-ink: #eafff7; --popup-strong: #f3d98b; --popup-muted: #b3d6c8;
    --popup-edge: #a8862e; --popup-link: #8ff0c8; --popup-hover: rgba(255, 255, 255, .1);
}
html[data-theme="light-sand"] {
    color-scheme: light;
    --bg: #fcfaf7; --bg-2: #f4eee6; --hero-1: #eadfce; --hero-2: #fcfaf7;
    --surface: #ffffff; --card: #ffffff; --card-open: #fffdfa;
    --text: #201a12; --text-2: #3b2f22; --muted: #67584a;
    --accent: #7a5c33; --accent-ink: #ffffff; --link: #6f5230;
    --border: #e6dccd; --border-strong: #cfbea4;
    --chip: #f8f1e7; --chip-ink: #201a12; --chip-border: #d8c5a8; --chip-hover: #f0e4d2;
    --focus: #7a5c33; --title: #4a3216; --gold: #b08d57;
    --title-shadow: 0 .0625rem 0 rgba(255, 255, 255, .9), 0 .2rem .9rem rgba(74, 50, 22, .22);
    --answer-bg: #faf3e6; --mark: #f6dfae; --hit: #fbf0db;
    --toolbar-bg: rgba(252, 250, 247, .92); --shadow: 0 .35rem 1rem rgba(32, 26, 18, .1);
    --popup-bg: #2a2118; --popup-ink: #f8f1e7; --popup-strong: #ecd59a; --popup-muted: #d2c3ad;
    --popup-edge: #b08d57; --popup-link: #f0c890; --popup-hover: rgba(255, 255, 255, .1);
}

/* ── §3 BASE + TYPOGRAPHY ──────────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
/* NO scroll-padding-top here: the shared popup calls popup.focus(), and with scroll-padding Chrome "reveals" a popup
   sitting near the top by scrolling the page — and the popup closes itself on scroll. Targets use scroll-margin-top. */
html { font-size: calc(100% * var(--font-scale)); -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
#claims, #claim-index, #intro, #closing { scroll-margin-top: calc(var(--toolbar-h) + .5rem); }
body {
    margin: 0; min-height: 100vh;
    background: var(--bg); background-image: linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%); background-attachment: fixed;
    color: var(--text); font-family: var(--font-body); font-size: 1rem; line-height: 1.6;
    text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
h1, h2, h3, h4 { line-height: 1.25; margin: 0; }
h2 { font-family: var(--font-title); font-weight: 400; font-size: 1.5rem; color: var(--title); }
p { margin: 0 0 .75rem; }
a { color: var(--link); text-underline-offset: .18em; }
img { max-width: 100%; height: auto; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: .25rem; }
.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 1rem; }
.nowrap { white-space: nowrap; }
h1, h2, h3, .tagline, .hero-verse blockquote, .claim-text { text-wrap: balance; }
p, .ref-sum, .answer p { text-wrap: pretty; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link {
    position: fixed; left: .75rem; top: -4rem; z-index: 100001; padding: .75rem 1rem; border-radius: var(--radius-sm);
    background: var(--accent); color: var(--accent-ink); font-weight: 700; text-decoration: none; transition: top var(--speed) var(--ease);
}
.skip-link:focus { top: .75rem; }
.emoji { font-style: normal; font-family: "Segoe UI Emoji", "Apple Color Emoji", "Noto Color Emoji", sans-serif; }

/* ── §4 SPLASH ─────────────────────────────────────────────────────────────────────────────────
   Visible from the very first frame (no flash of the page), held 2 s, then fades. A click/tap/key skips it.
   html.splash-seen (set by the boot script on later page views in the same tab session) never shows it. */
.splash {
    position: fixed; inset: 0; z-index: 30000; display: none; align-items: center; justify-content: center;
    background: #06121f; cursor: pointer; transition: opacity 400ms ease, visibility 400ms ease;
}
html.js:not(.splash-seen) .splash { display: flex; }
.splash img { width: min(100vw, 75rem); max-height: 100vh; object-fit: contain; box-shadow: 0 1rem 3rem rgba(0, 0, 0, .6); }
.splash-hint {
    position: absolute; bottom: 1.25rem; left: 50%; transform: translateX(-50%); padding: .35rem .9rem; border-radius: var(--pill);
    background: rgba(0, 0, 0, .55); color: #f6f1e4; font-size: .8125rem; letter-spacing: .04em; white-space: nowrap;
}
.splash.is-hiding { opacity: 0; visibility: hidden; }
html.splash-open { overflow: hidden; }

/* ── §5 HERO ──────────────────────────────────────────────────────────────────────────────── */
.hero { background: linear-gradient(160deg, var(--hero-1) 0%, var(--hero-2) 100%); border-bottom: 1px solid var(--border); }
.hero-inner { display: grid; grid-template-columns: 1fr; gap: 1.25rem; justify-items: center; text-align: center; padding-top: 2rem; padding-bottom: 2rem; }
.emblem {
    width: 8.5rem; height: 8.5rem; border-radius: 50%; object-fit: cover;
    border: 3px solid var(--gold); box-shadow: 0 .5rem 1.6rem rgba(0, 0, 0, .35);
}
.eyebrow { margin: 0 0 .5rem; font-size: .8125rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
h1.title {
    font-family: var(--font-title); font-weight: 400; font-size: 2.125rem; line-height: 1.15; letter-spacing: .01em;
    color: var(--title); text-shadow: var(--title-shadow); margin: 0;
}
.title-tail { display: block; font-size: 1.5rem; color: var(--text); margin-top: .35rem; }
.tagline { margin: .9rem 0 0; font-size: 1.125rem; font-weight: 700; color: var(--text-2); letter-spacing: .01em; }
.hero-verse { margin: 1.1rem auto 0; max-width: 34rem; padding: .85rem 1.1rem; border-radius: var(--radius-sm); background: var(--answer-bg); border: 1px solid var(--border); }
.hero-verse blockquote { margin: 0; font-style: italic; font-size: 1.0625rem; color: var(--text); }
.hero-verse figcaption { margin-top: .4rem; font-size: .9375rem; color: var(--muted); }
@media (min-width: 48rem) {
    .hero-inner { grid-template-columns: auto 1fr; justify-items: start; text-align: left; gap: 2rem; padding-top: 2.75rem; padding-bottom: 2.75rem; }
    .emblem { width: 11rem; height: 11rem; }
    h1.title { font-size: 2.875rem; }
    .title-tail { font-size: 2.0625rem; }
    .hero-verse { margin-left: 0; }
}
@media (min-width: 64rem) { h1.title { font-size: 3.25rem; } .title-tail { font-size: 2.3125rem; } }

/* ── §6 TOOLBAR + SEARCH ───────────────────────────────────────────────────────────────────── */
/* Sticky only where there is room: on phones two toolbar rows would cover a fifth of the screen
   (⬆ back-to-top returns to it and focuses the search box instead). */
.toolbar {
    position: relative; z-index: 50; background: var(--toolbar-bg); border-bottom: 1px solid var(--border);
    -webkit-backdrop-filter: saturate(140%) blur(10px); backdrop-filter: saturate(140%) blur(10px);
}
@media (min-width: 40rem) { .toolbar { position: sticky; top: 0; } }
@media (max-width: 39.99rem) { :root { --toolbar-h: .5rem; } }
.toolbar-inner { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; padding-top: .6rem; padding-bottom: .6rem; }
.search-box {
    flex: 1 1 16rem; display: flex; align-items: center; gap: .4rem; min-height: 2.75rem; padding: 0 .4rem 0 .8rem;
    border: 1px solid var(--border-strong); border-radius: var(--pill); background: var(--surface); color: var(--text);
}
.search-box:focus-within { outline: 3px solid var(--focus); outline-offset: 1px; }
.search-box input {
    flex: 1; min-width: 0; min-height: 2.75rem; border: 0; outline: 0; background: transparent; color: var(--text); font: inherit; font-size: 1rem; padding: .55rem 0;
}
.search-box input::placeholder { color: var(--muted); opacity: 1; }
.search-box input::-webkit-search-cancel-button { display: none; }
.tool-buttons { display: flex; flex-wrap: wrap; gap: .4rem; }
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .35rem; min-height: 2.75rem; min-width: 2.75rem;
    padding: .45rem .8rem; border: 1px solid var(--border-strong); border-radius: var(--pill); background: var(--surface);
    color: var(--text); font-size: .9375rem; font-weight: 700; line-height: 1.1; cursor: pointer; text-decoration: none;
    transition: transform var(--speed) var(--ease), background-color var(--speed) var(--ease), border-color var(--speed) var(--ease);
}
.btn:hover { background: var(--chip-hover); border-color: var(--accent); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-accent { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn-accent:hover { background: var(--accent); filter: brightness(1.08); }
.btn-ghost { background: transparent; }
.btn-clear { min-height: 2.25rem; min-width: 2.25rem; padding: .25rem; border: 0; background: transparent; color: var(--muted); }
.btn-clear:hover { background: var(--chip-hover); transform: none; }
.btn-label, .btn-label-wide { display: none; }
@media (min-width: 40rem) { .btn-label { display: inline; } }
@media (min-width: 64rem) { .btn-label-wide { display: inline; } }
.search-status { margin: 0; padding: 0 1rem .55rem; max-width: var(--max); margin-inline: auto; font-size: .9375rem; color: var(--text-2); }
.search-status:empty { display: none; }
.search-status button { margin-left: .4rem; }

/* ── §7 INTRO + CLAIM INDEX ────────────────────────────────────────────────────────────────── */
main { padding-top: 1.5rem; padding-bottom: 2rem; }
.panel { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.25rem; margin: 0 0 1.5rem; }
.panel h2 { margin-bottom: .85rem; }
.steps { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; gap: .75rem; }
.steps li { display: grid; grid-template-columns: 2rem 1fr; gap: .5rem; align-items: start; color: var(--text-2); }
.steps .emoji { font-size: 1.25rem; line-height: 1.5; }
.steps strong { color: var(--text); }
@media (min-width: 48rem) { .steps { grid-template-columns: repeat(3, 1fr); } }
.posture { margin: 0; padding: .9rem 1rem; border-radius: var(--radius-sm); background: var(--answer-bg); border-left: 4px solid var(--gold); color: var(--text); }

.index-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; grid-template-columns: repeat(auto-fill, minmax(15.5rem, 1fr)); counter-reset: none; }
.index-grid a {
    display: grid; grid-template-columns: 2rem 1.75rem 1fr; align-items: center; gap: .4rem; min-height: 2.9rem; padding: .45rem .75rem;
    border: 1px solid var(--chip-border); border-radius: var(--radius-sm); background: var(--chip); color: var(--chip-ink);
    text-decoration: none; font-weight: 700; font-size: .9375rem; line-height: 1.25;
    transition: transform var(--speed) var(--ease), background-color var(--speed) var(--ease), border-color var(--speed) var(--ease), opacity var(--speed);
}
.index-grid a:hover { background: var(--chip-hover); border-color: var(--accent); transform: translateY(-1px); }
.index-num { display: inline-grid; place-items: center; width: 1.75rem; height: 1.75rem; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font-size: .8125rem; font-variant-numeric: tabular-nums; }
.index-grid .emoji { font-size: 1.15rem; text-align: center; }
.index-grid li.is-dim a { opacity: .45; }

/* ── §8 CLAIM CARDS ───────────────────────────────────────────────────────────────────────── */
.claims-head { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; justify-content: space-between; margin: 0 0 .75rem; }
details.claim {
    margin: 0 0 1rem; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow);
    scroll-margin-top: calc(var(--toolbar-h) + .75rem); overflow: hidden;
    transition: border-color var(--speed) var(--ease), background-color var(--speed) var(--ease), opacity 420ms ease, transform 420ms ease;
}
details.claim[open] { background: var(--card-open); border-color: var(--border-strong); }
details.claim.is-target { border-color: var(--gold); box-shadow: 0 0 0 2px var(--gold), var(--shadow); }
/* <summary> may hold only phrasing content + direct-child headings, so the header is ONE flat grid. */
.claim-head {
    list-style: none; cursor: pointer; display: grid; grid-template-columns: auto 1fr auto; column-gap: .75rem; row-gap: .3rem;
    grid-template-areas: "num short meta" "num text meta"; align-items: start;
    padding: 1rem 1rem 1rem .9rem; border-radius: var(--radius);
}
.claim-num { grid-area: num; }
.claim-short { grid-area: short; min-width: 0; }
.claim-text { grid-area: text; min-width: 0; }
.claim-meta { grid-area: meta; }
@media (max-width: 39.99rem) {                    /* phones: refs pill + chevron move under the claim text */
    .claim-head { grid-template-columns: auto 1fr; grid-template-areas: "num short" "num text" "num meta"; column-gap: .6rem; padding: .9rem .85rem; }
    .claim-meta { display: flex; align-items: center; justify-content: space-between; }
}
.claim-head::-webkit-details-marker { display: none; }
.claim-head::marker { content: ""; }
.claim-head:hover .claim-short { text-decoration: underline; text-decoration-color: var(--gold); text-decoration-thickness: .08em; }
.claim-num {
    display: inline-grid; place-items: center; width: 2.25rem; height: 2.25rem; border-radius: 50%; margin-top: .1rem;
    background: var(--accent); color: var(--accent-ink); font-weight: 700; font-size: .9375rem; font-variant-numeric: tabular-nums;
}
.claim-short { font-family: var(--font-title); font-weight: 400; font-size: 1.3125rem; color: var(--title); }
.claim-short .emoji { margin-right: .35rem; }
.claim-text { font-size: 1.0625rem; color: var(--text); font-style: italic; }
.claim-label { font-style: normal; font-size: .75rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-right: .35rem; }
@media (min-width: 40rem) { .claim-meta { display: grid; justify-items: end; gap: .35rem; } }
.ref-count { white-space: nowrap; font-size: .8125rem; font-weight: 700; color: var(--text-2); background: var(--chip); border: 1px solid var(--chip-border); border-radius: var(--pill); padding: .2rem .6rem; font-variant-numeric: tabular-nums; }
.chev { display: inline-block; font-size: 1rem; color: var(--muted); transition: transform var(--speed) var(--ease); }
details.claim[open] .chev { transform: rotate(180deg); }
.claim-body { padding: 0 1rem 1.1rem; border-top: 1px solid var(--border); }
@media (min-width: 40rem) { .claim-body { padding: 0 1.5rem 1.4rem 4rem; } }

.answer { margin: 1rem 0 0; padding: .9rem 1rem; border-radius: var(--radius-sm); background: var(--answer-bg); border-left: 4px solid var(--gold); }
.answer h4, .ref-group h4 { font-size: .8125rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 0 0 .35rem; }
.answer p { margin: 0; font-size: 1.0625rem; color: var(--text); }

.key-verse { margin: 1rem 0 0; padding: .25rem 0 .25rem 1rem; border-left: 3px solid var(--border-strong); }
.key-verse blockquote { margin: 0; font-size: 1.0625rem; font-style: italic; color: var(--text); }
.verse-quote::before { content: "\201C"; }
.verse-quote::after { content: "\201D"; }
.verse-quote.is-quoted::before, .verse-quote.is-quoted::after { content: none; }   /* text carries its own speech marks */
.key-verse figcaption { margin-top: .45rem; display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; font-size: .875rem; color: var(--muted); }
.group-count { color: var(--muted); font-weight: 700; }
.tr-badge { font-size: .75rem; font-weight: 700; letter-spacing: .08em; border: 1px solid var(--border-strong); border-radius: var(--pill); padding: .05rem .5rem; color: var(--text-2); }

.claim-tools { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.1rem; padding-top: .9rem; border-top: 1px dashed var(--border); }
.claim-tools .btn { font-size: .875rem; min-height: 2.75rem; }

/* ── §9 REFERENCES ────────────────────────────────────────────────────────────────────────────
   Universal_Bible_Popup.py turns every <span class="ref-chip">Book 1:2</span> into
   <span class="ref-chip"><strong><a class="bible-ref" …>Book 1:2</a></strong></span>. Style the <a>. */
.ref-group { margin-top: 1.15rem; }
.ref-group h4 { display: flex; align-items: center; gap: .5rem; }
.ref-group h4::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.ref-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .1rem; }
.refline { display: grid; grid-template-columns: 1fr; gap: .25rem; padding: .45rem .5rem; margin: 0 -.5rem; border-radius: var(--radius-sm); }
.refline.is-hit { background: var(--hit); box-shadow: inset 3px 0 0 var(--gold); }
/* Chip column = the longest reference in THIS list (subgrid), so “Deuteronomy 24:17–22” never touches its summary.
   Fallback for browsers without subgrid: a fixed column wide enough for the longest reference at every text size. */
@media (min-width: 30rem) {
    .refline { grid-template-columns: 14.5rem 1fr; gap: .75rem; align-items: center; }
    @supports (grid-template-columns: subgrid) {
        .ref-list { grid-template-columns: max-content 1fr; column-gap: .75rem; }
        .refline { grid-column: 1 / -1; grid-template-columns: subgrid; }
    }
}
.ref-chip strong { font-weight: 700; }
a.bible-ref {
    display: inline-flex; align-items: center; gap: .4rem; min-height: 2.75rem; padding: .45rem .85rem; max-width: 100%;
    border: 1px solid var(--chip-border); border-radius: var(--pill); background: var(--chip); color: var(--chip-ink);
    font-weight: 700; font-size: .9375rem; line-height: 1.15; text-decoration: none; font-variant-numeric: tabular-nums; white-space: nowrap;
    transition: transform var(--speed) var(--ease), background-color var(--speed) var(--ease), border-color var(--speed) var(--ease);
}
a.bible-ref::before { content: "\1F4D6"; font-family: "Segoe UI Emoji", "Apple Color Emoji", "Noto Color Emoji", sans-serif; font-size: .8125rem; }
a.bible-ref:hover { background: var(--chip-hover); border-color: var(--accent); transform: translateY(-1px); }
a.bible-ref:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.ref-sum { color: var(--text-2); font-size: 1rem; }
.key-verse a.bible-ref, .hero-verse a.bible-ref, .site-footer a.bible-ref, .posture a.bible-ref, .answer a.bible-ref { min-height: 2.25rem; padding: .25rem .7rem; font-size: .875rem; }
@media (pointer: coarse), (max-width: 39.99rem) {   /* phones/tablets: every tap target ≥ 44 px (2.75rem) */
    .key-verse a.bible-ref, .hero-verse a.bible-ref, .site-footer a.bible-ref, .posture a.bible-ref, .answer a.bible-ref { min-height: 2.75rem; }
    .btn-clear { min-height: 2.75rem; min-width: 2.75rem; }
}

/* Search hits: CSS Custom Highlight API — no DOM changes, so the popup links keep working. */
::highlight(zion-search) { background-color: var(--mark); color: var(--text); }

/* ── §10 CLOSING, FOOTER, BACK-TO-TOP, TOAST ───────────────────────────────────────────────── */
.closing p:last-child { margin-bottom: 0; }
.empty-state { text-align: center; padding: 2rem 1rem; color: var(--text-2); }
.empty-state[hidden] { display: none; }
.site-footer { border-top: 1px solid var(--border); padding: 1.75rem 0 2.5rem; color: var(--muted); font-size: .9375rem; text-align: center; }
.site-footer p { margin: 0 0 .6rem; }
.footer-prayer { font-family: var(--font-title); font-size: 1.25rem; color: var(--title); }
.footer-credits, .footer-copy { font-size: .875rem; }
.footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: .4rem 1.1rem; }
.to-top {
    position: fixed; right: 1rem; bottom: 1rem; z-index: 500; width: 3rem; height: 3rem; border-radius: 50%;
    border: 1px solid var(--border-strong); background: var(--accent); color: var(--accent-ink); font-size: 1.25rem; font-weight: 700;
    cursor: pointer; box-shadow: var(--shadow); opacity: 0; visibility: hidden; transform: translateY(.5rem);
    transition: opacity var(--speed), visibility var(--speed), transform var(--speed) var(--ease);
}
.to-top.is-shown { opacity: 1; visibility: visible; transform: none; }
.toast {
    position: fixed; left: 50%; bottom: 1.25rem; z-index: 100000; transform: translate(-50%, 1rem); width: max-content; max-width: calc(100vw - 2rem); text-align: center;
    padding: .65rem 1.1rem; border-radius: var(--pill); background: var(--text); color: var(--bg); font-weight: 700; font-size: .9375rem;
    box-shadow: var(--shadow); opacity: 0; visibility: hidden; pointer-events: none; transition: opacity var(--speed), transform var(--speed) var(--ease), visibility var(--speed);
}
.toast.is-shown { opacity: 1; visibility: visible; transform: translate(-50%, 0); }

/* ── §11 BIBLE POPUP OVERRIDES ─────────────────────────────────────────────────────────────────
   /Javascript/Bible_popup.js (shared, do not edit) hard-codes a white card, px sizes and !important colours.
   `html body #bible-popup …` + !important outranks it (specificity 1,0,2 > 1,0,0) so the popup:
     • CONTRASTS with the page: parchment on dark themes, deep navy/green/brown on light themes (--popup-* in §2)
     • follows the A↕ button (rem instead of px)     • keeps WCAG AA on its close button (upstream opacity .75)
   Never override `width` — the script positions the popup assuming 360 px. */
html body #bible-popup {
    font-size: .875rem; background: var(--popup-bg) !important; color: var(--popup-ink) !important;
    border: 2px solid var(--popup-edge) !important; box-shadow: 0 .75rem 2.25rem rgba(0, 0, 0, .45), 0 .15rem .5rem rgba(0, 0, 0, .2);
    font-family: var(--font-body) !important;
}
html[data-theme^="light"] body #bible-popup { color-scheme: dark !important; }
html body #bible-popup * { color: var(--popup-ink) !important; font-family: var(--font-body) !important; }
html body #bible-popup .bp-header { border-bottom: 1px solid var(--popup-edge) !important; }
html body #bible-popup .bp-reference { font-family: var(--font-title) !important; font-weight: 400; font-size: 1.0625rem; color: var(--popup-strong) !important; }
html body #bible-popup .bp-header-link { font-size: 1rem; }
html body #bible-popup .bp-close { font-size: 1rem; color: var(--popup-muted) !important; opacity: 1; min-width: 2rem; min-height: 2rem; }
html body #bible-popup .bp-header-link:hover,
html body #bible-popup .bp-close:hover,
html body #bible-popup .bp-biblehub-button:hover { background: var(--popup-hover) !important; }
html body #bible-popup .bp-header-link:focus-visible,
html body #bible-popup .bp-close:focus-visible,
html body #bible-popup .bp-biblehub-button:focus-visible { outline: 2px solid var(--popup-link) !important; }
html body #bible-popup .bp-body { max-height: 15rem; }
html body #bible-popup .bp-verse-text { font-size: .9375rem; line-height: 1.65; color: var(--popup-ink) !important; white-space: normal; }
html body #bible-popup .bp-chapter-note { font-size: .75rem; color: var(--popup-muted) !important; }
html body #bible-popup .bp-biblehub-button { font-size: 1.125rem; }
html body #bible-popup .bp-loading { font-size: .8125rem; color: var(--popup-muted) !important; }
html body #bible-popup .bp-error { font-size: .8125rem; }
html body #bible-popup .bp-error a { color: var(--popup-link) !important; }
html body #bible-popup .bp-caret::before { background: var(--popup-bg) !important; border-color: var(--popup-edge) !important; }
html body #bible-popup .bp-body::-webkit-scrollbar-thumb { background: var(--popup-edge); }

/* ── §12 MOTION ───────────────────────────────────────────────────────────────────────────── */
html.js details.claim.is-pre { opacity: 0; transform: translateY(.5rem); }
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; }
    html.js details.claim.is-pre { opacity: 1; transform: none; }
    .btn, .index-grid a, a.bible-ref, details.claim, .chev, .to-top, .toast, .splash { transition-duration: 1ms !important; }
    .btn:hover, .index-grid a:hover, a.bible-ref:hover { transform: none; }
}

/* ── §13 NO-JS ────────────────────────────────────────────────────────────────────────────── */
html:not(.js) .js-only { display: none !important; }
.noscript-note { margin: 0 0 1rem; }

/* ── §14 PRINT ────────────────────────────────────────────────────────────────────────────────
   script.js opens every claim on `beforeprint`; ::details-content covers browsers that print closed <details>. */
@media print {
    :root, html[data-theme] {
        --bg: #fff; --bg-2: #fff; --card: #fff; --card-open: #fff; --text: #000; --text-2: #222; --muted: #444; --title: #0b233a;
        --chip: #fff; --chip-ink: #000; --chip-border: #999; --border: #bbb; --border-strong: #888; --answer-bg: #f6f6f6; --gold: #8a6d2f;
        --accent: #0b233a; --accent-ink: #fff;
    }
    html { font-size: 11pt; }
    body { background: #fff; }
    .splash, .toolbar, .to-top, .toast, .skip-link, .claim-tools, .index, .intro .steps, .chev, #bible-popup, .noscript-note { display: none !important; }
    .hero { background: none; border: 0; }
    .hero-inner { padding: 0 0 1rem; grid-template-columns: auto 1fr; text-align: left; justify-items: start; }
    .emblem { width: 6rem; height: 6rem; box-shadow: none; }
    h1.title, .claim-short, h2, .footer-prayer { text-shadow: none; }
    .panel, details.claim { box-shadow: none; break-inside: auto; }
    details.claim { border-color: #bbb; }
    details.claim::details-content { content-visibility: visible; display: block; }
    .claim-head { break-after: avoid; }
    .refline { break-inside: avoid; grid-template-columns: 11rem 1fr; }
    a.bible-ref { min-height: 0; padding: .1rem .5rem; border-color: #999; }
    a.bible-ref::before { content: none; }
    .site-footer { border: 0; }
}
