/*
 * The look of the Study Bible.
 *
 * Dressed like the Church's own slides: the NAC blue (#0168B5) with the white
 * line emblem on it for the frame of the app (the header on a phone, the side
 * menu on a PC), white pages like a white slide, small spaced capitals over a
 * heading, light-blue cards and numbers in blue circles. Every letter is
 * Montserrat, as Jerome asked; "Easy-read" swaps it for plain letters with more
 * room. Every colour is a token on :root so the dark theme (and the warm
 * "Paper" one) only swap the tokens. The phone is the first device: the tabs
 * sit under the thumb, the text is pulpit-sized when asked, and every target
 * can be hit while standing. On a PC the tabs move to a side menu and the
 * content gets the width it needs.
 */

/* ------------------------------------------------------------ fonts */
/*
 * Montserrat (SIL Open Font License) is kept with the app, so a phone and a PC
 * show the same letters, offline too. One file carries every weight, from thin
 * to black; Latin covers English and Afrikaans, Latin-extended the rare rest.
 */
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("vendor/fonts/montserrat-latin-wght-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Montserrat"; font-style: italic; font-weight: 100 900; font-display: swap; src: url("vendor/fonts/montserrat-latin-wght-italic.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("vendor/fonts/montserrat-latin-ext-wght-normal.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Montserrat"; font-style: italic; font-weight: 100 900; font-display: swap; src: url("vendor/fonts/montserrat-latin-ext-wght-italic.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
/*
 * The slides of a reflection evening keep the letters of the PowerPoint they
 * are saved as: Cambria and Calibri, which come with Windows and Office. A
 * phone has neither, so there Caladea and Carlito stand in, free look-alikes
 * drawn to the same measurements (SIL Open Font License). Only the slides ask
 * for them, so they are fetched only when slides are shown.
 */
@font-face { font-family: "Caladea"; font-style: normal; font-weight: 400; font-display: swap; src: url("vendor/fonts/caladea-latin-400.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Caladea"; font-style: normal; font-weight: 700; font-display: swap; src: url("vendor/fonts/caladea-latin-700.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Caladea"; font-style: italic; font-weight: 400; font-display: swap; src: url("vendor/fonts/caladea-latin-400-italic.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Caladea"; font-style: italic; font-weight: 700; font-display: swap; src: url("vendor/fonts/caladea-latin-700-italic.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Caladea"; font-style: normal; font-weight: 400; font-display: swap; src: url("vendor/fonts/caladea-latin-ext-400.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Caladea"; font-style: normal; font-weight: 700; font-display: swap; src: url("vendor/fonts/caladea-latin-ext-700.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Carlito"; font-style: normal; font-weight: 400; font-display: swap; src: url("vendor/fonts/carlito-latin-400.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Carlito"; font-style: normal; font-weight: 700; font-display: swap; src: url("vendor/fonts/carlito-latin-700.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Carlito"; font-style: italic; font-weight: 400; font-display: swap; src: url("vendor/fonts/carlito-latin-400-italic.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Carlito"; font-style: italic; font-weight: 700; font-display: swap; src: url("vendor/fonts/carlito-latin-700-italic.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Carlito"; font-style: normal; font-weight: 400; font-display: swap; src: url("vendor/fonts/carlito-latin-ext-400.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Carlito"; font-style: normal; font-weight: 700; font-display: swap; src: url("vendor/fonts/carlito-latin-ext-700.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }

/* ------------------------------------------------------------ tokens */
/* "White" (and "System" by day): the Church's blue and white, as on the slides. */
:root {
  color-scheme: light;
  --brand: #0168b5;           /* the NAC blue of the slides: the header, the side menu */
  --brand-ink: #ffffff;       /* white on the blue: the emblem, the headings */
  --brand-ink-2: #dcebf8;     /* softer white on the blue, as the line under a slide's heading */
  --brand-label: #a8d0ee;     /* the spaced capitals on a blue slide */
  --brand-hover: rgba(255, 255, 255, .12);
  --brand-line: rgba(255, 255, 255, .42);
  --brand-on: #ffffff;        /* the chosen tab on the blue: a white tab ... */
  --brand-on-ink: #0168b5;    /* ... with blue words */
  --bg: #eef3f8;              /* the ground behind the pages */
  --surface: #ffffff;         /* a page, like a white slide */
  --surface-2: #f3f7fb;       /* an inset on the page */
  --card: #edf4fb;            /* the light-blue card of the slides */
  --ink: #1d2b38;
  --ink-2: #3a4b5c;           /* the text colour of the slides */
  --muted: #5b6b7b;           /* 5.5:1 on a page, 4.9:1 on a card */
  --line: rgba(29, 64, 99, .13);
  --line-strong: rgba(29, 64, 99, .27);
  --btn-line: rgba(1, 104, 181, .38);   /* the edge of a white button */
  --accent: #0168b5;          /* the Church's blue, for what can be tapped */
  --accent-ink: #ffffff;
  --accent-text: #0168b5;     /* 5.8:1 on white */
  --accent-soft: #e3eef9;
  --ring: rgba(1, 104, 181, .3);
  --head-ink: #0168b5;        /* headings, bold and blue, as on the slides */
  --label-ink: #0168b5;       /* the small spaced capitals over a heading */
  --danger: #b0302a;
  --danger-soft: #fbe9e7;
  --highlight: #dcebf8;       /* a selected verse */
  --highlight-bar: #0168b5;
  --bar: #0b3256;             /* the floating verse bar and the messages: a deep Church blue */
  --bar-ink: #ffffff;
  --bar-line: rgba(255, 255, 255, .34);
  --mark-c: #5f36ad; --mark-c-bg: #ece5fa;
  --mark-n: #8a5200; --mark-n-bg: #fbeccf;
  --c-blue: #0168b5; --c-amber: #8a5200; --c-purple: #5f36ad; --c-green: #1f6b3a; --c-red: #a3302a; --c-slate: #4b5563;
  --shadow-card: 0 0 0 1px rgba(16, 56, 96, .07), 0 1px 2px -1px rgba(16, 56, 96, .08), 0 3px 10px rgba(16, 56, 96, .05);
  --shadow-pop: 0 0 0 1px rgba(16, 56, 96, .08), 0 18px 44px -14px rgba(16, 56, 96, .42);
  --font: Montserrat, "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;   /* every letter; Easy-read swaps it */
  --display: var(--font);     /* headings */
  --serif: var(--font);       /* Scripture, the Catechism, the Guide */
  --sans: var(--font);        /* everything else */
  --radius: 12px;
  --radius-s: 8px;
  --top: 0px;                 /* height of the sticky header above the content */
  --tabbar: 0px;              /* height of the tab bar under the content */
  --chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath d='M4 6l4 4 4-4' fill='none' stroke='%230168b5' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
/* "Paper": the same blue frame and headings, with warm cream pages for long reading */
:root[data-theme="paper"] {
  --bg: #f1ede4;
  --surface: #fffdf9;
  --surface-2: #f6f2ea;
  --card: #ebf1f7;
  --ink: #26231f;
  --ink-2: #4b463f;
  --muted: #6b665f;
  --line: rgba(38, 35, 31, .12);
  --line-strong: rgba(38, 35, 31, .25);
  --accent-soft: #e4ecf5;
  --shadow-card: 0 0 0 1px rgba(38, 35, 31, .07), 0 1px 2px -1px rgba(38, 35, 31, .08), 0 2px 6px rgba(38, 35, 31, .05);
  --chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath d='M4 6l4 4 4-4' fill='none' stroke='%230168b5' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
/* "Dark" (and "System" at night): a deep Church blue, the blue lighter so it reads on the dark */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="paper"]):not([data-theme="white"]) {
    color-scheme: dark;
    --brand: #0a3a64;
    --brand-ink: #ffffff;
    --brand-ink-2: #cfe1f2;
    --brand-label: #93c3ea;
    --brand-hover: rgba(255, 255, 255, .1);
    --brand-line: rgba(255, 255, 255, .34);
    --brand-on: rgba(255, 255, 255, .22);
    --brand-on-ink: #ffffff;
    --bg: #0c1620;
    --surface: #132130;
    --surface-2: #1a2a3b;
    --card: #182d42;
    --ink: #e7eef5;
    --ink-2: #c5d3e1;
    --muted: #97a9bb;
    --line: rgba(200, 222, 242, .12);
    --line-strong: rgba(200, 222, 242, .27);
    --btn-line: rgba(140, 196, 242, .4);
    --accent: #1f7ac2;
    --accent-ink: #ffffff;
    --accent-text: #8cc4f2;
    --accent-soft: rgba(110, 180, 240, .17);
    --ring: rgba(140, 196, 242, .38);
    --head-ink: #9ccdf4;
    --label-ink: #8cc4f2;
    --danger: #f0867d;
    --danger-soft: rgba(240, 134, 125, .16);
    --highlight: rgba(110, 180, 240, .2);
    --highlight-bar: #8cc4f2;
    --bar: #22476b;
    --bar-ink: #ffffff;
    --bar-line: rgba(255, 255, 255, .3);
    --mark-c: #c9b3f5; --mark-c-bg: rgba(201, 179, 245, .16);
    --mark-n: #f2c16b; --mark-n-bg: rgba(242, 193, 107, .16);
    --c-blue: #8cc4f2; --c-amber: #f2c16b; --c-purple: #c9b3f5; --c-green: #8fd4a8; --c-red: #f0867d; --c-slate: #b6bcc6;
    --shadow-card: 0 0 0 1px rgba(200, 222, 242, .09);
    --shadow-pop: 0 0 0 1px rgba(200, 222, 242, .12), 0 16px 40px -12px rgba(0, 0, 0, .7);
    --chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath d='M4 6l4 4 4-4' fill='none' stroke='%238cc4f2' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --brand: #0a3a64;
  --brand-ink: #ffffff;
  --brand-ink-2: #cfe1f2;
  --brand-label: #93c3ea;
  --brand-hover: rgba(255, 255, 255, .1);
  --brand-line: rgba(255, 255, 255, .34);
  --brand-on: rgba(255, 255, 255, .22);
  --brand-on-ink: #ffffff;
  --bg: #0c1620;
  --surface: #132130;
  --surface-2: #1a2a3b;
  --card: #182d42;
  --ink: #e7eef5;
  --ink-2: #c5d3e1;
  --muted: #97a9bb;
  --line: rgba(200, 222, 242, .12);
  --line-strong: rgba(200, 222, 242, .27);
  --btn-line: rgba(140, 196, 242, .4);
  --accent: #1f7ac2;
  --accent-ink: #ffffff;
  --accent-text: #8cc4f2;
  --accent-soft: rgba(110, 180, 240, .17);
  --ring: rgba(140, 196, 242, .38);
  --head-ink: #9ccdf4;
  --label-ink: #8cc4f2;
  --danger: #f0867d;
  --danger-soft: rgba(240, 134, 125, .16);
  --highlight: rgba(110, 180, 240, .2);
  --highlight-bar: #8cc4f2;
  --bar: #22476b;
  --bar-ink: #ffffff;
  --bar-line: rgba(255, 255, 255, .3);
  --mark-c: #c9b3f5; --mark-c-bg: rgba(201, 179, 245, .16);
  --mark-n: #f2c16b; --mark-n-bg: rgba(242, 193, 107, .16);
  --c-blue: #8cc4f2; --c-amber: #f2c16b; --c-purple: #c9b3f5; --c-green: #8fd4a8; --c-red: #f0867d; --c-slate: #b6bcc6;
  --shadow-card: 0 0 0 1px rgba(200, 222, 242, .09);
  --shadow-pop: 0 0 0 1px rgba(200, 222, 242, .12), 0 16px 40px -12px rgba(0, 0, 0, .7);
  --chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath d='M4 6l4 4 4-4' fill='none' stroke='%238cc4f2' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

/* ------------------------------------------------------------ easy-read */
/*
 * "Easy-read" (Settings → Appearance, or the Aa sheet) swaps Montserrat for
 * plain letters in the whole app, Verdana where the device has it, and gives
 * the reading text more room: wider spacing between letters, words and lines,
 * no italics, shorter lines. Many people with dyslexia read this more easily
 * (Verdana tells I, l and 1 apart, where Montserrat draws I and l alike). The
 * small spaced capitals over a heading are written in ordinary small letters,
 * since whole words in capitals lose their shape. index.html sets data-read
 * before the first paint.
 */
:root[data-read="easy"] {
  --font: Verdana, "Segoe UI", Roboto, "Helvetica Neue", Arial, system-ui, sans-serif;
}
[data-read="easy"] .scripture, [data-read="easy"] .cat-text, [data-read="easy"] .guide-article, [data-read="easy"] .ai-text,
[data-read="easy"] .note-body, [data-read="easy"] textarea, [data-read="easy"] .help p, [data-read="easy"] .help li,
[data-read="easy"] .step-head p, [data-read="easy"] .sheet-body p, [data-read="easy"] .sec > p, [data-read="easy"] .hint,
[data-read="easy"] .item, [data-read="easy"] label.check {
  letter-spacing: .035em; word-spacing: .12em; line-height: 1.8;
}
[data-read="easy"] .scripture { line-height: 1.85; max-width: 62ch; }
[data-read="easy"] .scripture .verse { padding-top: 7px; padding-bottom: 7px; }
[data-read="easy"] .cat-text, [data-read="easy"] .guide-article { max-width: 62ch; }
[data-read="easy"] .cat-text p, [data-read="easy"] .guide-article p { margin-bottom: 16px; }
[data-read="easy"] textarea.oneline { line-height: 1.5; }
[data-read="easy"] .chap-head h2, [data-read="easy"] .docbar h2, [data-read="easy"] h2.title { letter-spacing: 0; }
[data-read="easy"] .ai-why, [data-read="easy"] .guide-verse, [data-read="easy"] .bd-quote, [data-read="easy"] .talk-thought, [data-read="easy"] i, [data-read="easy"] em { font-style: normal; }
[data-read="easy"] h3.sub, [data-read="easy"] .ai-sec h4, [data-read="easy"] .guide-box > b, [data-read="easy"] .cat-sum b,
[data-read="easy"] .chap-head .caption, [data-read="easy"] nav.side .brand-label { text-transform: none; letter-spacing: .02em; font-size: 14px; }

/* ------------------------------------------------------------ base */
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
html, body { margin: 0; }
body { font: 16px/1.5 var(--sans); color: var(--ink); background: var(--bg); min-height: 100dvh; }
a { color: var(--accent-text); text-decoration-thickness: 1px; text-underline-offset: 2px; }
h1, h2, h3, h4 { text-wrap: balance; }
p { text-wrap: pretty; }
button, a, input, select, textarea, label { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
:focus:not(:focus-visible) { outline: none; }
img, svg { display: block; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; padding: 10px 14px; border-radius: var(--radius-s); background: var(--accent); color: var(--accent-ink); font-weight: 700; }
.skip:focus { top: 12px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* the Church's emblem in white lines, as on the slides; it takes the colour of the text around it */
.emblem {
  display: inline-block; flex: 0 0 auto; height: 32px; aspect-ratio: 762 / 948; background-color: currentColor;
  -webkit-mask: url("icons/emblem-line.svg") center / contain no-repeat; mask: url("icons/emblem-line.svg") center / contain no-repeat;
}
/* small spaced capitals over a heading ("TONIGHT" on the slides) */
.eyebrow { font: 700 11px/1.3 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--label-ink); margin: 0; }

/* ------------------------------------------------------------ shell */
.shell { min-height: 100dvh; }
/* the header on a phone: a strip of the blue slide, the emblem and the name in white */
header.top { display: flex; align-items: center; gap: 10px; min-height: 58px; padding: 7px 12px; background: var(--brand); color: var(--brand-ink); position: sticky; top: 0; z-index: 20; }
header.top h1 { font: 700 19px/1.15 var(--display); color: var(--brand-ink); margin: 0; flex: 1 1 auto; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; gap: 10px; }
header.top h1 .emblem { height: 36px; }
header.top .actions { display: flex; gap: 6px; align-items: center; }
header.top :focus-visible, nav.side :focus-visible { outline-color: #fff; }
header.top .btn.ghost { background: transparent; color: var(--brand-ink); border-color: var(--brand-line); }
header.top .btn:not(.ghost) { background: var(--brand-ink); color: #0168b5; border-color: var(--brand-ink); }
@media (hover: hover) and (pointer: fine) { header.top .btn.ghost:hover { background: var(--brand-hover); box-shadow: none; } }
/* the language switch on the blue */
header.top .seg, nav.side .seg { background: rgba(255, 255, 255, .14); }
header.top .seg button, nav.side .seg button { color: var(--brand-ink-2); }
header.top .seg button.on, nav.side .seg button.on { background: var(--brand-on); color: var(--brand-on-ink); box-shadow: none; }
h1 .t-short { display: none; }
main { padding: 12px 12px calc(16px + var(--tabbar)); outline: none; }
.tab { max-width: 880px; margin: 0 auto; }
#tab-read { max-width: 760px; }
#tab-prepare { max-width: 900px; }
#tab-settings { max-width: 820px; }

/* the side menu: the tab bar on a phone, a column on a PC */
nav.side .brand, nav.side .nav-foot { display: none; }
.tabs { display: flex; }
.tabs button { font: inherit; cursor: pointer; border: 0; background: none; color: var(--muted); }
.tabs .ico svg { display: block; width: 24px; height: 24px; }

/* ------------------------------------------------------------ the welcome screen */
/*
 * Like the blue title slide: the Church's name in spaced capitals, the name
 * of the app in bold letters, a line under it and the white emblem, on the blue.
 * It covers the app while it starts and fades away after a moment (app.js
 * hideSplash); a tap sends it away at once. Should the app not start at all,
 * it goes by itself after eight seconds, so the error underneath can be read.
 */
.splash {
  position: fixed; inset: 0; z-index: 200; display: flex; flex-direction: column; justify-content: center;
  padding: max(28px, env(safe-area-inset-top)) 30px max(64px, calc(env(safe-area-inset-bottom) + 56px));
  background: var(--brand); color: var(--brand-ink); cursor: pointer; overflow: hidden;
  transition: opacity .45s ease, visibility .45s; animation: splash-away .45s ease 8s forwards;
}
.splash.gone { opacity: 0; visibility: hidden; pointer-events: none; }
[data-splash="off"] .splash { display: none; }
@keyframes splash-away { to { opacity: 0; visibility: hidden; } }
.splash-in { display: flex; flex-direction: column-reverse; align-items: center; gap: 40px; text-align: center; }
.splash-emblem { height: min(32vh, 240px); }
.splash-label { font: 700 12px/1.35 var(--sans); letter-spacing: .24em; text-transform: uppercase; color: var(--brand-label); margin: 0 0 12px; }
.splash-name { font: 700 44px/1.08 var(--display); color: var(--brand-ink); margin: 0; }
.splash-line { font: 400 17px/1.5 var(--sans); color: var(--brand-ink-2); margin: 16px auto 0; max-width: 21em; text-wrap: balance; }
.splash-foot { position: absolute; left: 30px; right: 30px; bottom: max(26px, calc(env(safe-area-inset-bottom) + 14px)); margin: 0; text-align: center; font: 400 14px/1.3 var(--sans); color: var(--brand-label); }
[data-read="easy"] .splash-label { text-transform: none; letter-spacing: .04em; font-size: 14px; }
/* on a PC (or a phone on its side) it is laid out as the slide: the words on the left, the emblem on the right */
@media (min-width: 700px) and (min-aspect-ratio: 5/4) {
  .splash { padding: 40px 8vw; }
  .splash-in { flex-direction: row; justify-content: space-between; align-items: center; gap: 6vw; text-align: left; width: 100%; max-width: 1180px; margin: 0 auto; }
  .splash-emblem { height: min(50vh, 380px); }
  .splash-label { font-size: 13px; margin-bottom: 16px; }
  .splash-name { font-size: clamp(54px, 6.4vw, 84px); }
  .splash-line { font-size: clamp(19px, 1.9vw, 24px); margin: 22px 0 0; max-width: 24em; }
  .splash-foot { left: max(8vw, calc((100% - 1180px) / 2)); right: auto; bottom: 9vh; text-align: left; }
}

/* a page: a white card on a PC, like a white slide; the plain page on a phone */
.page { margin: 0 0 12px; }

/* ------------------------------------------------------------ type and text */
.docbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 4px 0 10px; }
.docbar h2 { font: 700 22px/1.25 var(--display); color: var(--head-ink); margin: 0; flex: 1 1 auto; min-width: 0; }
.docbar .spacer, .spacer { flex: 1 1 auto; }
h2.title { font: 700 22px/1.25 var(--display); color: var(--head-ink); margin: 4px 0 10px; }
/* a small heading in spaced capitals, as "TONIGHT" and "PAUSE AND CONSIDER" on the slides */
h3.sub { font: 700 11px/1.35 var(--sans); text-transform: uppercase; letter-spacing: .16em; color: var(--label-ink); margin: 22px 0 8px; }
h3.sub:first-child { margin-top: 0; }
.row { display: flex; gap: 8px; align-items: center; margin-top: 8px; flex-wrap: wrap; }
.row.end { justify-content: flex-end; }
.row.line { flex-wrap: nowrap; margin-top: 0; }
.row.line input, .row.line select, .row.line textarea { flex: 1 1 auto; width: auto; min-width: 0; }
.grow { flex: 1 1 auto; min-width: 0; }
.muted { color: var(--muted); margin: 6px 0; }
.small { font-size: 13.5px; }
.lede { color: var(--ink-2); margin: 0 0 12px; }
.crumbs { font-size: 14px; margin: 0 0 8px; color: var(--muted); }
.crumbs a { text-decoration: none; font-weight: 700; }
.crumbs a:hover { text-decoration: underline; }
.badge { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--c-green); background: color-mix(in srgb, var(--c-green) 12%, transparent); border-radius: 999px; padding: 3px 9px; }
.hint { min-height: 1.2em; }
.hint.error, .error { color: var(--danger); }
.num, .count, .when, .vn, .step-n, .item.cat .num, label.check .num { font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------------ forms */
.fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px 12px; margin: 8px 0; }
.fields.two { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.fields.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.fields > label.full { grid-column: 1 / -1; }   /* a whole row at every width: a title has room to wrap, not scroll */
label.f { display: flex; flex-direction: column; gap: 4px; font-size: 13.5px; font-weight: 700; color: var(--ink-2); margin: 6px 0; min-width: 0; }
/* the titles of the sermon's sections in a preparation, as on the printed notes: bold, in the Church's blue */
#tab-prepare label.f .f-title { font: 700 14.5px/1.35 var(--sans); color: var(--accent-text); }
/* the title row of a box: the heading and, while the box has text, Clear */
.f-head { display: flex; align-items: center; gap: 8px; }
.f-head .f-title { flex: 1 1 auto; }
.clear-btn { flex: 0 0 auto; background: none; border: 0; color: var(--muted); font: 400 12.5px/1 var(--sans); padding: 6px 8px; margin: -6px -8px -6px 0; border-radius: 6px; cursor: pointer; }
.clear-btn[hidden] { display: none; }
@media (hover: hover) and (pointer: fine) { .clear-btn:hover { color: var(--danger); background: var(--surface-2); } }
label.f > input, label.f > select, label.f > textarea { color: var(--ink); font-weight: 400; }
label.f .hint, label.f .muted, label.f p { font-weight: 400; }   /* the label is bold, the line of help under it is not */
label.f .row.line { width: 100%; }
.fields > label.f { margin: 0; }
/* a key box (settings.js keyBox): the key on a line of its own at the full width, so it can be read on a phone;
   Show and the check go under it and wrap rather than squeeze the box, and a long button name wraps inside its button */
.keybox { margin: 6px 0 10px; }
.keybox > label.f { margin: 0; }
.keybox .key-state { margin: 6px 0 0; color: var(--ink-2); }
.keybox .key-btns { margin-top: 8px; }
.keybox .key-btns .btn { white-space: normal; text-align: center; max-width: 100%; }
.keybox .key-show { display: inline-grid; place-items: center; }   /* Show and Hide (Wys, Verberg) share one cell: the button keeps its width */
.keybox .key-show > span { grid-area: 1 / 1; }
.keybox .key-show > span + span, .keybox .key-show.on > span:first-child { visibility: hidden; }
.keybox .key-show.on > span + span { visibility: visible; }
label.check { display: flex; gap: 10px; align-items: center; padding: 8px 6px; border-top: 1px solid var(--line); font-size: 14px; color: var(--ink); cursor: pointer; min-height: 44px; }
label.check:first-child { border-top: none; }
label.check input { width: 18px; height: 18px; flex: 0 0 auto; margin: 0; accent-color: var(--accent); }
label.check .num { font-weight: 700; color: var(--accent-text); min-width: 46px; }
input[type=text], input[type=date], input[type=time], input[type=number], input[type=search], input[type=password], select, textarea {
  font: inherit; font-size: 15px; line-height: 1.35; padding: 8px 11px; min-height: 40px; border: 1px solid var(--line-strong); border-radius: var(--radius-s);
  background: var(--surface); color: var(--ink); min-width: 0; width: 100%; margin: 0;
  transition: border-color .15s ease, box-shadow .15s ease;
}
input::placeholder, textarea::placeholder { color: var(--muted); opacity: .8; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--ring); }
select { appearance: none; -webkit-appearance: none; padding-right: 30px; background-image: var(--chevron); background-repeat: no-repeat; background-position: right 9px center; cursor: pointer; }
select.small { min-height: 34px; padding-top: 5px; padding-bottom: 5px; font-size: 14px; }
textarea { resize: vertical; line-height: 1.5; overflow-wrap: anywhere; }
/* a box that grows with its text (autosize in ui.js): nothing scrolls inside it, the page does */
textarea.grows { resize: none; overflow: hidden; }
/* a one-line box, such as a title, that wraps onto a second line rather than scrolling sideways */
textarea.oneline { line-height: 1.3; }
input[type=search] { -webkit-appearance: none; }
input[type=search]::-webkit-search-cancel-button { -webkit-appearance: none; }
details summary { cursor: pointer; color: var(--accent-text); font-weight: 700; padding: 4px 0; }
details[open] summary { margin-bottom: 4px; }

/* buttons */
.btn {
  font: inherit; font-size: 14px; font-weight: 600; line-height: 1.2; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 38px; padding: 6px 15px; border-radius: var(--radius-s); border: 1px solid var(--accent); background: var(--accent); color: var(--accent-ink);
  cursor: pointer; white-space: nowrap; vertical-align: middle;
  transition: background-color .15s ease, border-color .15s ease, box-shadow .15s ease, transform .1s ease;
}
.btn:active { transform: scale(.97); }
.btn.ghost { background: var(--surface); color: var(--accent-text); border-color: var(--btn-line); }
.btn.small { min-height: 34px; padding: 4px 12px; font-size: 13px; }
.btn.danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn.ghost.danger { background: var(--surface); color: var(--danger); }
.btn:disabled { opacity: .5; cursor: default; transform: none; }
.btn.block { width: 100%; }
@media (hover: hover) and (pointer: fine) {
  .btn:hover { box-shadow: var(--shadow-card); filter: brightness(1.08); }
  .btn.ghost:hover { background: var(--card); filter: none; }
}
.icon { border: none; background: transparent; font: inherit; font-size: 18px; line-height: 1; cursor: pointer; color: var(--muted); padding: 0; flex: 0 0 auto; min-width: 36px; min-height: 36px; border-radius: var(--radius-s); display: inline-flex; align-items: center; justify-content: center; }
@media (hover: hover) and (pointer: fine) {
  .icon:hover { background: var(--surface-2); color: var(--ink); }
  .icon.del:hover { color: var(--danger); }
}

/* a segmented choice, such as the text size */
.seg { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; border-radius: 10px; background: var(--card); max-width: 100%; }
.seg button { font: inherit; font-size: 14px; font-weight: 600; line-height: 1.2; border: 0; background: transparent; color: var(--ink-2); padding: 8px 14px; min-height: 38px; border-radius: 7px; cursor: pointer; flex: 1 1 auto; transition: background-color .15s ease, color .15s ease, box-shadow .15s ease; }
.seg button.on { background: var(--accent); color: var(--accent-ink); font-weight: 700; box-shadow: 0 1px 2px rgba(1, 50, 90, .2); }
@media (hover: hover) and (pointer: fine) { .seg button:not(.on):hover { background: var(--surface); } }
.seg.block { display: flex; }
/* the language switch, EN | AF: in the header on a phone, in the side menu on a PC */
.seg.mini { padding: 3px; gap: 2px; border-radius: 9px; }
.seg.mini button { padding: 4px 10px; min-height: 30px; font-size: 12px; font-weight: 700; letter-spacing: .05em; flex: 0 0 auto; }
@media (hover: hover) and (pointer: fine) { header.top .seg button:not(.on):hover, nav.side .seg button:not(.on):hover { background: var(--brand-hover); } }
nav.side .lang-switch { align-self: flex-start; margin-bottom: 4px; }

/* chips and pills */
.pills { display: flex; gap: 5px; flex-wrap: wrap; }
.pills.big { gap: 8px; margin-top: 6px; }
.pill { font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); white-space: nowrap; text-decoration: none; display: inline-flex; align-items: center; min-height: 22px; }
.pill.link { font-size: 14px; padding: 8px 13px; min-height: 38px; color: var(--accent-text); border-color: var(--btn-line); }
@media (hover: hover) and (pointer: fine) { .pill.link:hover { background: var(--card); border-color: var(--accent); } }
.pill.warn { color: var(--c-amber); border-color: var(--line); background: color-mix(in srgb, var(--c-amber) 10%, transparent); }
.pill.kind, .pill.status { border-color: transparent; }
.pill.kind { background: var(--surface-2); }
.pill.kind { background: color-mix(in srgb, currentColor 11%, transparent); }
.pill.kind.thought { color: var(--c-blue); }
.pill.kind.experience { color: var(--c-amber); }
.pill.kind.doctrine { color: var(--c-purple); }
.pill.kind.illustration { color: var(--c-green); }
.pill.kind.sermon { color: var(--c-red); }
.pill.kind.question { color: var(--c-slate); }
.pill.status { background: var(--surface-2); color: var(--muted); }
.pill.status.ready { color: var(--c-green); background: color-mix(in srgb, var(--c-green) 12%, transparent); }
.pill.status.held { color: var(--c-slate); background: color-mix(in srgb, var(--c-slate) 12%, transparent); }
.chips { gap: 6px; }
.chip { font: inherit; font-size: 13px; font-weight: 600; padding: 6px 13px; min-height: 34px; border-radius: 999px; border: 1px solid var(--btn-line); background: var(--surface); color: var(--ink-2); cursor: pointer; transition: background-color .15s ease, color .15s ease, border-color .15s ease; }
.chip.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }

.toast { position: fixed; left: 50%; bottom: calc(18px + var(--tabbar)); transform: translate(-50%, 12px); background: var(--bar); color: var(--bar-ink); padding: 10px 18px; border-radius: 999px; font-size: 15px; font-weight: 700; opacity: 0; pointer-events: none; transition: opacity .18s ease-out, transform .18s ease-out; z-index: 40; width: max-content; max-width: min(92vw, 560px); text-align: center; box-shadow: var(--shadow-pop); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.error { background: var(--danger); color: #fff; }
.toast.action { pointer-events: auto; }
.toast-undo { margin-left: 12px; background: transparent; border: 1px solid color-mix(in srgb, currentColor 55%, transparent); color: inherit; border-radius: 999px; padding: 3px 11px; font: inherit; font-weight: 600; cursor: pointer; }
.toast-undo:hover { background: color-mix(in srgb, currentColor 15%, transparent); }

/* ------------------------------------------------------------ lists */
.list { display: flex; flex-direction: column; margin-top: 8px; border-radius: var(--radius); overflow: hidden; background: var(--surface); box-shadow: var(--shadow-card); }
.item { display: flex; gap: 10px; align-items: center; padding: 12px 14px; border-top: 1px solid var(--line); text-decoration: none; color: var(--ink); font: inherit; background: transparent; text-align: left; min-height: 48px; cursor: pointer; border-left: 0; border-right: 0; border-bottom: 0; width: 100%; }
.item:first-child { border-top: none; }
@media (hover: hover) and (pointer: fine) { .item:hover { background: var(--card); } }
.item:focus-visible { outline-offset: -2px; }
.item.cat .num { font-weight: 700; color: var(--accent-text); min-width: 56px; flex: 0 0 auto; }
.item.cat.depth1 { font-weight: 700; }
.item.cat.depth2 { padding-left: 26px; }
.item.cat.depth3 { padding-left: 38px; }
.item.cat.depth4 { padding-left: 50px; }
.item .count { font-size: 12.5px; white-space: nowrap; }
.item .snippet { display: block; font-weight: 400; margin-top: 2px; }
.item.sermon .when { flex: 0 0 150px; display: flex; flex-direction: column; }
.item.sermon .ref { font-weight: 700; color: var(--accent-text); }
.item.pick { display: block; width: 100%; }
.item.pick .note-head { margin-bottom: 2px; }
.list > p.muted { padding: 14px; margin: 0; }

/* ------------------------------------------------------------ reader */
.readbar { position: sticky; top: var(--top); z-index: 3; background: var(--bg); padding: 2px 0 8px; margin: -2px 0 10px; border-bottom: 1px solid var(--line); }
.readbar .row { margin-top: 6px; }
.readbar .nav .btn { padding-left: 0; padding-right: 0; width: 36px; flex: 0 0 auto; font-size: 20px; font-weight: 500; }
.readbar .nav select { width: auto; flex: 1 1 140px; }
.readbar .nav #r-chapter { flex: 0 1 84px; }
.readbar .goto { display: flex; gap: 6px; flex: 2 1 220px; min-width: 0; }
.readbar .goto input { flex: 1 1 auto; }
.readbar .tools select { width: auto; flex: 0 1 190px; }
.readbar .tools #r-view { flex: 0 0 auto; font-family: var(--display); font-weight: 700; font-size: 16px; letter-spacing: .02em; }
.readbar .tools #r-view svg { width: 14px; height: 14px; }

.paste-card { border-radius: var(--radius); padding: 12px 14px; margin: 6px 0 14px; background: var(--card); font-family: var(--sans); font-size: 14px; line-height: 1.5; }
.paste-card p { margin: 0 0 6px; }
.beside-bar { gap: 8px; flex-wrap: wrap; margin: 0 0 10px; padding: 10px 12px; border-radius: var(--radius); background: var(--card); }
.beside-bar b { white-space: nowrap; }

.scripture { font-family: var(--serif); line-height: 1.65; padding: 2px 0 8px; font-feature-settings: "onum" 0; }
.scripture.size-s { font-size: 16px; }
.scripture.size-m { font-size: 17.5px; }
.scripture.size-l { font-size: 20.5px; line-height: 1.6; }
.scripture.size-xl { font-size: 24.5px; line-height: 1.6; }
/* the chapter's heading as on a white slide: the translation in spaced capitals, then the name of the chapter in blue */
.chap-head { margin: 10px 0 16px; display: flex; flex-direction: column-reverse; gap: 6px; }
.chap-head h2 { font: 700 1.75em/1.1 var(--display); margin: 0; color: var(--head-ink); }
.chap-head .caption { font: 700 11px/1.4 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--label-ink); margin: 0; text-wrap: balance; }
.chap-head .caption:empty { display: none; }
.scripture .ptitle { color: var(--muted); font-size: .9em; margin: -4px 0 12px; }
.verse { position: relative; padding: 5px 10px; margin: 0 -10px; border-radius: var(--radius-s); cursor: pointer; transition: background-color .12s ease; }
@media (hover: hover) and (pointer: fine) { .verse:hover { background: var(--surface-2); } }
.verse:focus-visible { outline-offset: -2px; }
.verse.sel { background: var(--highlight); box-shadow: inset 3px 0 0 var(--highlight-bar); }
.verse .vn { font-family: var(--sans); font-size: .6em; font-weight: 700; color: var(--accent-text); margin-right: .35em; top: -.5em; position: relative; line-height: 0; }
.verse .txt.cmp { display: block; color: var(--ink-2); font-size: .9em; margin: 4px 0 4px 1.4em; padding-left: 10px; border-left: 2px solid var(--line-strong); }
.verse .marks { display: inline-flex; gap: 6px; margin-left: 8px; vertical-align: middle; }
.mark { position: relative; font: 700 11px/1 var(--sans); border-radius: 999px; padding: 4px 7px; border: 1px solid transparent; cursor: pointer; min-width: 22px; text-align: center; }
.mark::after { content: ""; position: absolute; inset: -10px -6px; }   /* a 40px target around a small mark */
.mark.c { color: var(--mark-c); background: var(--mark-c-bg); }
.mark.n { color: var(--mark-n); background: var(--mark-n-bg); }
.scripture .chapnav { font-family: var(--sans); display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 18px 0 4px; }
.scripture .chapnav .btn { min-height: 46px; white-space: normal; text-align: center; font-family: var(--display); font-size: 15px; }
.scripture .chapnav .btn:first-child { justify-content: flex-start; text-align: left; }
.scripture .chapnav .btn:last-child { justify-content: flex-end; text-align: right; }
.scripture .chapnav .btn.hollow { visibility: hidden; }
footer.copyright { border-top: 1px solid var(--line); margin-top: 14px; padding-top: 10px; }
footer.copyright p { margin: 4px 0; }
footer.copyright .elsewhere { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; margin-top: 8px; }
footer.copyright .elsewhere .site { color: var(--muted); margin-right: 2px; }
footer.copyright .elsewhere a { text-decoration: none; font-weight: 700; padding: 4px 0; }
footer.copyright .elsewhere a:hover { text-decoration: underline; }
.fums img { width: 1px; height: 1px; }
.chapter-notes { margin-top: 8px; }

/* the bar that appears when verses are selected */
.vactions { position: sticky; bottom: calc(10px + var(--tabbar)); z-index: 6; background: var(--bar); color: var(--bar-ink); border-radius: 14px; padding: 8px 10px; margin-top: 12px; box-shadow: var(--shadow-pop); }
.vactions .vlabel { display: flex; align-items: center; gap: 6px; font-size: 14px; min-height: 32px; }
.vactions .vlabel b { flex: 1 1 auto; font: 700 16px/1.25 var(--display); }
.vactions .vlabel .icon { color: var(--bar-ink); opacity: .8; }
.vactions .vbtns { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.vactions .btn { border-color: transparent; background: #fff; color: #0168b5; }   /* white on the deep blue, like the white slide on the blue */
.vactions .btn.ghost { background: transparent; color: var(--bar-ink); border-color: var(--bar-line); }
.vactions .btn:disabled { opacity: .4; }

/* ------------------------------------------------------------ notes */
.notes { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }
.note { border-radius: var(--radius); padding: 12px 14px; background: var(--surface); box-shadow: var(--shadow-card); margin-top: 8px; }
.notes .note { margin-top: 0; }
.note-top { display: flex; gap: 8px; align-items: flex-start; }
.note-head { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; flex: 1 1 auto; min-width: 0; }
.note-head .ref { font-weight: 700; text-decoration: none; }
.note-meta { display: flex; gap: 8px; align-items: center; flex: 0 0 auto; white-space: nowrap; }
.note-title { font: 700 16.5px/1.3 var(--display); color: var(--head-ink); margin-top: 8px; }
.note-body { white-space: pre-wrap; overflow-wrap: anywhere; margin-top: 3px; font-size: 15px; color: var(--ink-2); }

/* ------------------------------------------------------------ prepare */
.prep-head { position: sticky; top: var(--top); z-index: 4; background: var(--bg); padding: 6px 0; margin: 0 0 6px; border-bottom: 1px solid var(--line); }
.prep-head .docbar { margin: 0; }
.status-sel { width: auto; flex: 0 0 auto; }
.step-head { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-start; margin: 30px 0 10px; padding: 14px 16px; border-radius: var(--radius); background: var(--card); }
.step-head .step-text { flex: 1 1 240px; min-width: 0; }
.step-head .step-clear { flex: 0 0 auto; margin-left: auto; }
.step-head h3 { font: 700 19px/1.25 var(--display); margin: 3px 0 0; color: var(--head-ink); }
.step-head p { margin: 4px 0 0; color: var(--ink-2); }
.step-n { flex: 0 0 auto; width: 36px; height: 36px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font: 700 16px/1 var(--display); display: inline-flex; align-items: center; justify-content: center; }
.step-n.small { width: 30px; height: 30px; font-size: 14px; }
.points .point { border-radius: var(--radius); padding: 12px; margin: 12px 0; background: var(--card); }
.pill.guide { flex: 0 0 auto; color: var(--accent-text); background: var(--accent-soft); border-color: transparent; }   /* a main point from the Guide */
.points .point > textarea { margin-top: 8px; }
/* the person's own thought on a main point, and the questions Claude asked about it with the answers (prepare.js talkRow) */
.points .point .thought { margin: 8px 0 0; }
#tab-prepare .points .point .thought .f-title { font-size: 12.5px; }
.talk { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.talk-item { padding: 8px 10px; border-radius: var(--radius-s); background: var(--surface); }
.talk-q { font-size: 14px; line-height: 1.45; }
.talk-q b { font-weight: 700; }
.talk-item textarea { margin-top: 6px; }
/* the sheet with Claude's questions about the thoughts (prepare.js askThoughts) */
.talk-ask { padding: 10px 0 4px; border-top: 1px solid var(--line); }
.talk-where { margin: 0 0 2px; }
.talk-thought { font-family: var(--serif); font-style: italic; font-size: 15.5px; color: var(--ink-2); margin: 0 0 6px; }
.talk-ask textarea { margin-top: 6px; }
/* one thought into its own point (prepare.js weave, weavePanel): the button under the thought, the new text under it */
.points .point .weave-row { margin-top: 8px; }
.ai-panel.weave { margin-top: 8px; padding: 2px 12px 8px; background: var(--surface); }
.ai-panel.weave .ai-sec { margin: 6px 0 0; }
.weave-stale { margin: 2px 0 4px; }
.weave-meta { margin: 4px 0 0; }
/* what is a title on the printed notes (the sermon title, the message, each main point) is bold while it is typed */
#tab-prepare textarea.oneline { font-weight: 600; }
#tab-prepare label.people textarea.oneline { font-weight: 400; }   /* the line about the people is not a title */
/* the heading of a main point is written as on a card of the slides: bold and blue */
#tab-prepare .points .point > .row.line > textarea.oneline { font-family: var(--display); font-weight: 700; font-size: 16.5px; color: var(--head-ink); }
.who-hint { margin: 2px 0 0; }
/* who is listening: three choices in a row on a PC, one under the other on a phone, so no choice is cut short */
.fields.who { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 759.98px) { .fields.who { grid-template-columns: minmax(0, 1fr); } }
.catbox { border-radius: var(--radius-s); padding: 2px 10px; background: var(--surface); box-shadow: var(--shadow-card); }
.catbox > span { display: block; padding: 8px 0; }
.catbox .cat-item { border-top: 1px solid var(--line); }
.catbox .cat-item:first-child { border-top: none; }
.catbox .cat-item label.check { border-top: none; padding-left: 0; padding-right: 0; }
.catbox .cat-read { margin: 0 0 12px 28px; padding: 2px 12px; border-left: 3px solid var(--mark-c-bg); }
.cat-row { margin: 8px 0 0; }
.row.line.cat-row select { flex: 0 1 auto; width: auto; }
.cat-note { margin-top: 4px; }
/* print or save: one row per output, its name first */
.outputs { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.out-row { margin-top: 0; }
.out-row .out-label { flex: 0 0 150px; font-weight: 700; color: var(--ink); }
@media (max-width: 759.98px) { .out-row .out-label { flex: 1 0 100%; } }

/* the text of a Catechism section */
.cat-text { font-family: var(--serif); font-size: 16.5px; line-height: 1.65; max-width: 68ch; }
.cat-text p { margin: 0 0 12px; }
.cat-text h4 { font: 700 1.1em/1.3 var(--display); color: var(--head-ink); margin: 20px 0 6px; }
.cat-text ul { margin: 0 0 12px; padding-left: 22px; }
.cat-text li { margin: 0 0 6px; }
.cat-text .cat-def { margin-left: 18px; }
.cat-text .cat-verse { margin-left: 18px; color: var(--ink-2); }
.cat-text sup { font-size: .6em; }
.cat-sum { background: var(--card); border-radius: var(--radius); padding: 12px 16px; margin: 0 0 18px; font-size: .94em; }
.cat-sum b { display: block; font: 700 11px/1.35 var(--sans); text-transform: uppercase; letter-spacing: .16em; color: var(--label-ink); margin-bottom: 6px; }
.cat-sum p { margin: 0 0 6px; }
.cat-sum p:last-child { margin-bottom: 0; }
.cat-notes { border-top: 1px solid var(--line); margin-top: 12px; padding-top: 8px; font-family: var(--sans); }
.cat-notes p { margin: 0 0 4px; }
.cat-credit { margin-top: 12px; font-family: var(--sans); }
.cat-table-wrap { overflow-x: auto; margin: 0 0 12px; font-family: var(--sans); }
.cat-table { border-collapse: collapse; font-size: 13.5px; min-width: 560px; }
.cat-table th, .cat-table td { border: 1px solid var(--line-strong); padding: 6px 8px; vertical-align: top; text-align: left; }
.cat-table thead th { background: var(--card); font-size: 12.5px; }
.cat-table tbody th { white-space: nowrap; font-size: 12.5px; color: var(--muted); }

/* ------------------------------------------------------------ sheets */
.overlay { position: fixed; inset: 0; background: rgba(6, 26, 46, .5); display: flex; align-items: flex-start; justify-content: center; padding: 24px 12px; z-index: 30; animation: fade .15s ease-out; }
.sheet-card { background: var(--surface); border-radius: 14px; width: min(620px, 100%); max-height: 90dvh; display: flex; flex-direction: column; box-shadow: var(--shadow-pop); animation: rise .2s ease-out; outline: none; }
.sheet-card.wide { width: min(860px, 100%); }
.sheet-head { display: flex; align-items: center; gap: 8px; padding: 10px 10px 10px 16px; border-bottom: 1px solid var(--line); }
.sheet-head h2 { margin: 0; font: 700 19px/1.3 var(--display); color: var(--head-ink); flex: 1 1 auto; min-width: 0; }
.sheet-body { padding: 14px 16px 16px; overflow-y: auto; overscroll-behavior: contain; }
.sheet-body .list { margin-top: 0; }
.sheet-body > .f:first-child, .sheet-body > label.f:first-child { margin-top: 0; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ------------------------------------------------------------ settings */
.sec { background: var(--surface); box-shadow: var(--shadow-card); border-radius: var(--radius); padding: 18px 18px 16px; margin: 0 0 14px; }
.sec > .docbar { margin: 0 0 6px; }
.sec > p { margin: 0 0 8px; }
.sec > p.small { color: var(--ink-2); }
.sec > .row { margin-top: 10px; }
.sec h3.sub { margin-top: 18px; }
.biblelist { max-height: 46vh; overflow-y: auto; }
.biblelist label.check { padding: 8px 10px; }
.sec .list { margin: 10px 0 0; box-shadow: none; border: 1px solid var(--line); }
.sec label.check { padding-left: 8px; padding-right: 8px; }
.theme-row { display: flex; flex-wrap: wrap; gap: 12px 24px; }
.theme-row > label.f { flex: 1 1 240px; }

/* ------------------------------------------------------------ help page */
.help header.top { display: flex; }
.help main { max-width: 760px; margin: 0 auto; }
.help .page { background: var(--surface); box-shadow: var(--shadow-card); border-radius: var(--radius); padding: 18px 20px 20px; }
.help h2 { font: 700 20px/1.3 var(--display); margin: 26px 0 8px; color: var(--head-ink); padding-top: 16px; border-top: 1px solid var(--line); }
.help h2:first-of-type { border-top: 0; padding-top: 0; margin-top: 8px; }
.help p, .help li { font-size: 15.5px; line-height: 1.6; color: var(--ink-2); }
.help li { margin-bottom: 6px; }
.help code { font-size: .9em; background: var(--surface-2); padding: 1px 5px; border-radius: 4px; }

/* ---------------------------------------------------------------- phone
   Under 760px: the header on top, the tabs in a bar under the thumb, the
   text full width, fields at 16px so a phone does not zoom in on them, and
   every button 44px tall so it can be hit while standing. */
@media (max-width: 759.98px) {
  :root { --top: 58px; --tabbar: calc(64px + env(safe-area-inset-bottom)); }
  :root[data-theme="white"] { --bg: #ffffff; --shadow-card: 0 0 0 1px rgba(16, 56, 96, .13), 0 2px 8px rgba(16, 56, 96, .06); }
  body { font-size: 16px; }
  h1 .t-long { display: none; }
  h1 .t-short { display: inline; }
  main { padding: 12px 12px calc(20px + var(--tabbar)); }

  .tabs {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 25; gap: 0;
    background: var(--surface); border-top: 1px solid var(--line);
    box-shadow: 0 -2px 10px rgba(16, 56, 96, .06); padding-bottom: env(safe-area-inset-bottom);
  }
  /*
   * Six tabs share the bar equally. A tab with a long name (Kategismus) is
   * never narrower than its name, so on a narrow phone it takes a little more
   * room from the short ones instead of being cut; the letters grow with the
   * width of the phone, from 10.5px to 12px.
   */
  .tabs button {
    flex: 1 1 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 64px;
    padding: 8px 2px 8px; font-size: clamp(10.5px, 2.75vw, 12px); font-weight: 600; letter-spacing: 0; white-space: nowrap; border-radius: 0;
  }
  [data-read="easy"] .tabs button { font-weight: 400; }   /* the plain letters are wider in bold */
  .tabs .ico { display: grid; place-items: center; width: 48px; height: 28px; border-radius: 999px; transition: background-color .15s ease; }
  .tabs .ico svg { width: 23px; height: 23px; }
  .tabs button.active { color: var(--accent-text); }
  .tabs button.active .ico { background: var(--accent); color: var(--accent-ink); }
  @media (max-width: 349.98px) { .tabs button { font-size: 9.5px; } .tabs .ico { width: 40px; } }   /* the smallest phones */

  .docbar h2, h2.title { font-size: 22px; }
  .readbar { position: static; padding-top: 0; margin-top: 0; }
  .readbar .nav select { flex: 1 1 0; }
  .readbar .nav #r-chapter { flex: 0 1 88px; }
  .readbar .nav .btn { width: 44px; }
  .readbar .goto { flex: 1 1 150px; }
  .readbar .goto .btn { display: none; }           /* the keyboard's Go key submits */
  .readbar .tools #r-cmp { display: none; }        /* Compare lives under Aa on a phone */
  .readbar .tools #r-src { flex: 0 1 118px; }
  .scripture.size-s { font-size: 17px; }
  .scripture.size-m { font-size: 18.5px; }
  .scripture.size-l { font-size: 21.5px; }
  .scripture.size-xl { font-size: 25.5px; }
  .verse { padding: 6px 10px; }
  .chap-head { margin-top: 8px; }

  /* 16px or more stops a phone browser zooming the page when a field is focused */
  input[type=text], input[type=date], input[type=time], input[type=number], input[type=password],
  input[type=search], select, textarea { font-size: 16px; padding: 10px 12px; min-height: 44px; }
  select { padding-right: 32px; }
  select.small { min-height: 44px; font-size: 16px; }
  /* 44px tall, so a button can be hit while standing */
  .btn, .btn.small { min-height: 44px; padding: 8px 15px; font-size: 15px; }
  .icon { min-width: 44px; min-height: 44px; font-size: 20px; }
  .chip { min-height: 40px; padding: 8px 14px; font-size: 14px; }
  .mark { padding: 5px 9px; font-size: 12px; }
  .seg button { min-height: 42px; }
  .seg.mini button { min-height: 32px; }
  .vactions { padding: 8px 10px 10px; }
  .vactions .btn, .vactions .btn.small { min-height: 40px; padding: 6px 12px; font-size: 14px; }
  .item.sermon { flex-wrap: wrap; }
  .item.sermon .when { flex: 1 1 100%; flex-direction: row; gap: 8px; align-items: baseline; }
  .fields.three { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fields > label.wide { grid-column: 1 / -1; }
  .step-head { margin-top: 24px; padding: 12px 14px; gap: 12px; }
  .step-head h3 { font-size: 18px; }
  .sec { padding: 16px 14px 14px; border-radius: var(--radius); }
  .help .page { padding: 14px; }

  .overlay { align-items: flex-end; padding: 0; }
  .sheet-card, .sheet-card.wide { width: 100%; max-height: 88dvh; border-radius: 16px 16px 0 0; padding-bottom: env(safe-area-inset-bottom); animation-name: slide; }
  @keyframes slide { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
}

@media (max-width: 759.98px) and (prefers-color-scheme: light) {
  :root:not([data-theme]) { --bg: #ffffff; --shadow-card: 0 0 0 1px rgba(16, 56, 96, .13), 0 2px 8px rgba(16, 56, 96, .06); }
}

/* ---------------------------------------------------------------- PC
   From 760px: a side menu with the tabs, the content in the middle with the
   width each screen needs, and pages drawn as cards on the paper. */
@media (min-width: 760px) {
  header.top { display: none; }
  .shell { display: grid; grid-template-columns: 224px minmax(0, 1fr); }
  nav.side { position: sticky; top: 0; height: 100dvh; overflow-y: auto; display: flex; flex-direction: column; padding: 24px 12px 16px; background: var(--brand); color: var(--brand-ink); }
  nav.side .brand { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 0 12px 26px; color: var(--brand-ink); text-decoration: none; }
  nav.side .brand .emblem { height: 74px; margin-bottom: 16px; }
  nav.side .brand-label { font: 700 10px/1.4 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--brand-label); }
  nav.side .brand-name { font: 700 22px/1.15 var(--display); color: var(--brand-ink); }
  .tabs { flex-direction: column; gap: 3px; }
  .tabs button { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; min-height: 44px; border-radius: 10px; font-size: 15px; font-weight: 600; color: var(--brand-ink-2); text-align: left; transition: background-color .15s ease, color .15s ease; }
  .tabs button .ico { display: block; color: var(--brand-label); }
  .tabs button .ico svg { width: 22px; height: 22px; }
  .tabs button.active { background: var(--brand-on); color: var(--brand-on-ink); box-shadow: 0 1px 3px rgba(0, 30, 60, .18); }
  .tabs button.active .ico { color: var(--brand-on-ink); }
  @media (hover: hover) and (pointer: fine) { .tabs button:not(.active):hover { background: var(--brand-hover); color: var(--brand-ink); } }
  nav.side .nav-foot { display: flex; flex-direction: column; gap: 8px; margin-top: auto; padding: 16px 12px 0; font-size: 13px; color: var(--brand-label); }
  nav.side .nav-foot a { font-weight: 700; color: var(--brand-ink); text-decoration: none; }
  nav.side .nav-foot a:hover { text-decoration: underline; }
  main { padding: 28px 36px 48px; }
  .page { position: relative; background: var(--surface); box-shadow: var(--shadow-card); border-radius: 14px; padding: 28px 34px 56px; margin-bottom: 16px; }
  .page.reader { padding: 24px 38px 56px; }
  /* the small blue emblem in the corner of each page, as on the white slides */
  .page::after { content: ""; position: absolute; right: 22px; bottom: 16px; height: 30px; aspect-ratio: 762 / 948; background-color: var(--accent-text); opacity: .85; pointer-events: none;
    -webkit-mask: url("icons/emblem-line.svg") center / contain no-repeat; mask: url("icons/emblem-line.svg") center / contain no-repeat; }
  .readbar { margin-bottom: 14px; padding-bottom: 10px; }
  .docbar h2, h2.title { font-size: 25px; }
  .chap-head h2 { font-size: 1.9em; }
  .scripture { padding-top: 0; }
  footer.copyright { margin-top: 18px; }
  .sec { padding: 20px 22px 18px; }
  .help header.top { display: flex; }
}
@media (min-width: 1100px) {
  .shell { grid-template-columns: 252px minmax(0, 1fr); }
  nav.side { padding: 28px 16px 18px; }
  main { padding: 32px 40px 56px; }
}
/* With "Beside" on, the text keeps to the left so the BibleSA window can sit on the right of the screen. */
@media (min-width: 1200px) { body.beside .tab { margin-left: 0; } }

/* ------------------------------------------------------------ the Guide and the AI helper */
.guide-card { background: var(--surface); box-shadow: var(--shadow-card); border-radius: var(--radius); padding: 10px 14px 12px; margin: 10px 0 14px; }
.guide-card > summary { font-weight: 700; color: var(--ink); font-size: 15px; }
.guide-card > summary .muted { font-weight: 400; }
.guide-card .list { box-shadow: none; border: 1px solid var(--line); }
.guide-card .list .item.svc .when, .sheet-body .item.svc .when { flex: 0 0 150px; display: flex; flex-direction: column; }
.item.svc .ref { font-weight: 700; color: var(--accent-text); }
.guide-choose { margin: 6px 0 2px; }
.row.line.guide-choose select { flex: 0 1 auto; width: auto; }
.guide-row { margin: 6px 0 2px; }
/* the Guide in English and in Afrikaans (guides.js card, prepare.js renderGuide): the switch between the two, "Read it in …" under the article */
.row.line.guide-langs { gap: 10px; margin: 8px 0 6px; }
.row.line.guide-lang { gap: 10px; margin: 6px 0 0; }
.guide-langs .seg, .guide-lang .seg { flex: 0 0 auto; }
.row.guide-other { margin: 0 0 10px; }
.guide-twin { margin: 12px 0 0; color: var(--ink-2); }
.guide-link { padding: 8px 12px; border-radius: var(--radius-s); background: var(--card); }
.guide-link .grow { line-height: 1.35; }
.row.line.guide-from { flex-wrap: wrap; }            /* on a phone the buttons go under the words, not beside them */
.guide-from .grow { flex: 1 1 240px; }
.guide-art { margin: 8px 0 4px; padding: 4px 14px 2px; border-left: 3px solid var(--accent); }
.guide-article { font-family: var(--serif); font-size: 16.5px; line-height: 1.65; max-width: 68ch; }
.guide-article p { margin: 0 0 10px; }
.guide-article .guide-meta { font-family: var(--sans); margin-bottom: 8px; }
.guide-article .guide-verse { font-style: italic; color: var(--ink-2); }
.guide-article .guide-verse b { font-style: normal; font-family: var(--sans); font-size: .85em; }
.guide-article h4 { font: 700 1.25em/1.25 var(--display); color: var(--head-ink); margin: 8px 0 6px; }
.guide-article h5 { font: 700 1.05em/1.3 var(--display); color: var(--head-ink); margin: 16px 0 4px; }
.guide-article ul { margin: 0 0 10px; padding-left: 22px; }
.guide-article li { margin-bottom: 4px; }
.guide-box { background: var(--card); border-radius: var(--radius); padding: 12px 16px; margin: 12px 0; font-size: .94em; }
.guide-box > b { display: block; font: 700 11px/1.35 var(--sans); text-transform: uppercase; letter-spacing: .16em; color: var(--label-ink); margin-bottom: 6px; }
.guide-box p:last-child, .guide-box ul { margin-bottom: 0; }
.guide-refs { font-family: var(--sans); }

.ai-box { margin: 4px 0 10px; }
.ai-head { align-items: center; }
.ai-btn .spark { display: inline-flex; margin-right: 6px; }
.ai-btn .spark svg { width: 16px; height: 16px; }
/* Claude's suggestions sit on a light-blue card, like the cards of the slides */
.ai-panel { margin-top: 10px; border-radius: var(--radius); padding: 10px 16px 12px; background: var(--card); }
.ai-panel > summary { font-weight: 700; color: var(--ink); }
.ai-note { color: var(--ink-2); margin: 4px 0 8px; }
.ai-sec { margin: 10px 0 4px; }
.ai-sec-head { margin: 0 0 2px; }
.ai-sec h4 { font: 700 11px/1.35 var(--sans); text-transform: uppercase; letter-spacing: .16em; color: var(--label-ink); margin: 0 8px 0 0; }
.ai-item { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; border-top: 1px solid var(--line); }
.ai-sec .ai-item:first-of-type { border-top: none; }
.ai-text { flex: 1 1 auto; min-width: 0; font-size: 15px; line-height: 1.55; white-space: pre-line; }
.ai-text b { color: var(--ink); }
.ai-text .num { font-weight: 700; text-decoration: none; }
.ai-why { margin-top: 3px; font-style: italic; }
.ai-went { margin-top: 3px; }   /* where one of the person's thoughts went, in the outline */
.ai-actions { display: flex; gap: 6px; flex: 0 0 auto; }
/* the Guide's article piece by piece (step 2): the Guide's words, then the plain words and the insight, then the passages and sections */
.bd-item .ai-text { white-space: normal; }
.bd-quote { font-family: var(--serif); font-style: italic; font-size: 15.5px; color: var(--ink-2); margin-bottom: 4px; }
.bd-line { margin: 2px 0; }
.bd-line b { font-weight: 700; }
.bd-refs { display: flex; flex-direction: column; gap: 4px; margin-top: 7px; }
.bd-ref { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 13.5px; line-height: 1.45; padding: 5px 10px; border-radius: var(--radius-s); background: var(--surface); }
.bd-ref .grow { flex: 1 1 220px; min-width: 0; }
.bd-ref .num { font-weight: 700; }
.bd-ref-actions { display: flex; gap: 6px; margin-left: auto; }
.ai-how { margin: 2px 0 6px; }
/* a suggestion put into the person's own words (prepare.js item/piece): a tap on the text or the pencil opens its words in boxes */
.ai-item.editable .ai-text { cursor: text; }
.ai-actions .icon.pen { min-width: 32px; min-height: 32px; color: var(--accent-text); }
.ai-actions .icon.pen svg { width: 18px; height: 18px; }
.ai-edit { flex: 1 1 260px; min-width: 0; display: flex; flex-direction: column; gap: 6px; padding: 2px 0; }
.ai-edit-title { display: flex; gap: 8px; align-items: flex-start; }
.ai-edit-title .ai-n { flex: 0 0 auto; font-weight: 700; padding-top: 9px; }
.ai-edit .ai-why { margin-top: 0; }
.ai-edit .bd-quote { margin-bottom: 2px; }
.ai-field { display: flex; flex-direction: column; gap: 3px; }
.ai-label { font: 700 12.5px/1.3 var(--sans); color: var(--muted); }
.busy { display: flex; gap: 12px; align-items: flex-start; }
.busy-text { margin: 6px 0 0; flex: 1 1 auto; }
.spin { flex: 0 0 auto; width: 22px; height: 22px; margin-top: 6px; border-radius: 50%; border: 3px solid var(--line-strong); border-top-color: var(--accent); animation: turn .9s linear infinite; }
@keyframes turn { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spin { animation: none; border-top-color: var(--line-strong); } }
@media (max-width: 759.98px) {
  /* on a phone the date and occasion take a line of their own above the text */
  .item.svc { flex-wrap: wrap; row-gap: 2px; }
  .guide-card .list .item.svc .when, .sheet-body .item.svc .when { flex: 1 0 100%; flex-direction: row; align-items: baseline; gap: 8px; }
  .item.svc .when b { white-space: nowrap; }
  .item.svc .grow { flex: 1 1 0; }
  .ai-item { flex-wrap: wrap; }
  .ai-actions { margin-left: auto; }
  .ai-actions .icon.pen { min-width: 44px; min-height: 44px; }
  .ai-edit-title .ai-n { padding-top: 11px; }
}

/* ---- sync between devices (Settings): the status line, the code in large letters, its QR square, the box to type one ---- */
.sync-status { margin-top: 4px; }
.sync-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--c-green); flex: 0 0 auto; }
.sync-dot.busy { background: var(--c-amber); animation: sync-pulse 1s ease-in-out infinite alternate; }
.sync-dot.error { background: var(--danger); }
@keyframes sync-pulse { from { opacity: 1; } to { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .sync-dot.busy { animation: none; } }
.sync-code { font: 600 clamp(17px, 4.4vw, 26px)/1.35 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .06em; text-align: center; padding: 14px 10px; border-radius: var(--radius); background: var(--surface-2); color: var(--ink); user-select: all; -webkit-user-select: all; overflow-wrap: anywhere; margin: 6px 0 12px; }
.sync-qr { display: block; width: min(232px, 68vw); margin: 0 auto 14px; padding: 12px; border-radius: 12px; background: #fff; box-shadow: var(--shadow-card); }
.sync-qr svg { display: block; width: 100%; height: auto; }
.sync-join input.sync-input { font: 500 20px/1.3 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .1em; text-transform: uppercase; text-align: center; }
label.check.sync-keys { margin-top: 10px; align-items: flex-start; }
label.check.sync-keys input { margin-top: 3px; }

/* ------------------------------------------------------------ the reflection evening (reflect.js) */
.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; }
.reflect-actions { margin: 4px 0 12px; }
.reflect-from { margin: 6px 0 0; }
.reflect-points { margin: 12px 0 4px; }
.reflect-points label.check { display: flex; align-items: center; gap: 10px; min-height: 36px; cursor: pointer; }
.reflect-points label.check input { width: 20px; height: 20px; flex: 0 0 auto; margin: 0; accent-color: var(--accent); }
.reflect-list { margin: 6px 0 4px; padding-left: 26px; }
.reflect-list li { margin: 4px 0; font-weight: 600; color: var(--accent-text); }
.reflect-q { display: flex; gap: 10px; align-items: flex-start; margin: 8px 0; }
.reflect-q > .step-n { margin-top: 7px; }
.reflect-q > textarea { flex: 1 1 auto; min-width: 0; }
.reflect-q-tools { display: flex; gap: 2px; flex: 0 0 auto; }
.reflect-q-tools .icon:disabled { opacity: .3; cursor: default; }
.reflect-kept { margin: 22px 0 4px; }
.pill.kind.slides { color: var(--c-blue); }
@media (max-width: 759.98px) { .reflect-q-tools { flex-direction: column; } }
/* the notes for the facilitator, one box per slide */
.reflect-notes { display: flex; flex-direction: column; gap: 16px; margin: 10px 0 8px; }
.reflect-note-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; margin-bottom: 5px; }
.reflect-note-head b { font-weight: 600; color: var(--accent-text); }
.reflect-note-n { font: 600 10.5px/1.25 var(--sans); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.reflect-note-q { margin: 0 0 6px; font-size: 13.5px; color: var(--ink-2); }
.reflect-note textarea { display: block; width: 100%; }
.reflect-note-actions { margin: 4px 0 2px; }
.reflect-hub { margin-top: 4px; }
.reflect-hub .row { margin-bottom: 4px; }
/* a tab with a long name (Reflection evening, Diens Voorbereiding): the full name in the side menu, on two lines where
   the menu is narrow, and a short one in the phone's bar, where six tabs share the width */
.tabs .lbl-long { display: none; }
@media (min-width: 760px) {
  .tabs .lbl-long { display: inline; }
  .tabs .lbl-short { display: none; }
}

/* the slides, small: tap one to start the show there */
.sl-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 4px 0 6px; }
@media (min-width: 760px) { .sl-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.sl-thumb { position: relative; display: block; width: 100%; padding: 0; border: 1px solid var(--line-strong); border-radius: 6px; overflow: hidden; background: #fff; cursor: pointer; }
.sl-thumb:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
@media (hover: hover) and (pointer: fine) { .sl-thumb:hover { box-shadow: var(--shadow-pop); } }
.sl-scale { position: relative; width: 100%; aspect-ratio: 16 / 9; overflow: hidden; }
.sl-scale > .sl, .show-frame > .sl { position: absolute; left: 0; top: 0; transform-origin: 0 0; }
.sl-n { position: absolute; right: 6px; top: 6px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px; background: rgba(20, 24, 30, .7); color: #fff; font: 600 11px/20px var(--sans); text-align: center; }

/* one slide: 1333 × 750 pixels, drawn from the same boxes as the PowerPoint file, in the Church's colours whatever the app's theme */
.sl { position: relative; width: 1333.3px; height: 750px; overflow: hidden; background: #fff; color: #3a4b5c; text-align: left;
  --sl-head: Cambria, Caladea, Georgia, serif;
  --sl-body: Calibri, Carlito, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-family: var(--sl-body); -webkit-font-smoothing: antialiased; }
.sl.sl-blue { background: #0168b5; }
.sl > * { position: absolute; margin: 0; box-sizing: border-box; }
.sl-card { border-radius: 8px; }
.sl-circle { border-radius: 50%; display: flex; align-items: center; justify-content: center; font-family: var(--sl-head); font-weight: 700; line-height: 1; }
.sl-t { display: flex; flex-direction: column; justify-content: flex-start; overflow: hidden; white-space: pre-line; overflow-wrap: break-word; font-weight: 400; }
.sl-t.v-middle { justify-content: center; }
.sl-t.v-bottom { justify-content: flex-end; }
.sl-t.sl-head { font-family: var(--sl-head); }
.sl-t.b { font-weight: 700; }
.sl-emblem { pointer-events: none; user-select: none; -webkit-user-drag: none; }
[data-read="easy"] .sl-t { letter-spacing: normal; word-spacing: normal; }   /* the slides keep their own spacing: they are for the congregation */

/* the show: the slides full screen, for the projector or the TV */
body.showing { overflow: hidden; }
.slideshow { position: fixed; inset: 0; z-index: 60; background: #000; outline: none; }
.show-stage { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.show-frame { position: relative; overflow: hidden; }
.show-black { position: absolute; inset: 0; background: #000; z-index: 2; }
.show-bar { position: absolute; left: 50%; bottom: max(14px, env(safe-area-inset-bottom)); transform: translateX(-50%); display: flex; align-items: center; gap: 2px; padding: 4px; border-radius: 999px; background: rgba(20, 24, 30, .72); color: #fff; z-index: 3; transition: opacity .3s ease; }
.slideshow.idle { cursor: none; }
.slideshow.idle .show-stage { cursor: none; }
.slideshow.idle .show-bar { opacity: 0; }
.show-btn { min-width: 44px; min-height: 44px; border: 0; border-radius: 999px; background: transparent; color: #fff; font: 600 22px/1 var(--sans); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.show-btn.end { font-size: 18px; }
.show-btn:disabled { opacity: .35; cursor: default; }
.show-btn:focus-visible { outline: 2px solid #fff; outline-offset: 1px; }
@media (hover: hover) and (pointer: fine) { .show-btn:not(:disabled):hover { background: rgba(255, 255, 255, .16); } }
.show-count { min-width: 60px; text-align: center; font: 600 14px/1 var(--sans); font-variant-numeric: tabular-nums; }
@media (prefers-reduced-motion: reduce) { .show-bar { transition: none; } }

/* ------------------------------------------------------------ theology (theology.js) */
/*
 * Background to the Bible: the books on the shelves the Catechism uses, a
 * page per book and per chapter, and what Claude wrote on a passage, a
 * chapter or a book on a light-blue card, with what the Church teaches set
 * apart in white with the Church's blue on its edge. The words are given
 * room: short lines, space between the parts, a small heading over each.
 */
.chap-title { display: flex; align-items: center; gap: 8px 12px; flex-wrap: wrap; }
.chap-title h2 { flex: 1 1 auto; min-width: 0; }
.chap-head .th-btn { flex: 0 0 auto; font-family: var(--sans); }
.th-ico { display: inline-flex; align-items: center; }
.th-ico svg { width: 17px; height: 17px; }
.th-lead { margin: 0 0 12px; max-width: 70ch; color: var(--ink-2); line-height: 1.6; }
.th-goto { display: flex; gap: 8px; align-items: center; margin: 4px 0 6px; max-width: 520px; }
.th-goto input { flex: 1 1 auto; min-width: 0; }
.th-kept { margin-bottom: 4px; }
.th-kept .item .pill { flex: 0 0 auto; }
.th-part { margin-top: 26px; }
.th-ap { margin: -2px 0 8px; max-width: 70ch; }
.th-shelf { margin: 10px 0 16px; }
.th-shelf h4 { font: 700 15px/1.35 var(--display); color: var(--ink); margin: 0 0 8px; }
.th-shelf h4 .muted { font-weight: 500; font-size: 13.5px; }
.th-books { display: grid; grid-template-columns: repeat(auto-fill, minmax(158px, 1fr)); gap: 8px; }
.th-book { position: relative; display: flex; flex-direction: column; justify-content: center; gap: 2px; min-height: 58px; padding: 9px 22px 9px 12px; border-radius: var(--radius-s); background: var(--surface); box-shadow: var(--shadow-card); color: var(--ink); text-decoration: none; transition: background-color .15s ease; }
.th-book b { font-weight: 700; color: var(--accent-text); line-height: 1.25; }
.th-book .small { line-height: 1.3; }
.th-book .dot, .th-chapters a.kept::after { position: absolute; top: 8px; right: 8px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
@media (hover: hover) and (pointer: fine) { .th-book:hover, .th-chapters a:hover { background: var(--card); } }
.th-source { margin: 22px 0 0; max-width: 70ch; }
/* a book or a chapter */
.th-page .eyebrow { margin-bottom: 4px; }
.th-page .docbar { margin-bottom: 4px; }
.th-title { font: 600 16px/1.45 var(--display); color: var(--ink-2); margin: 0 0 14px; }
.th-facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 8px 18px; margin: 0 0 4px; padding: 14px 18px; border-radius: var(--radius); background: var(--card); }
.th-facts dt { font: 700 11px/1.6 var(--sans); text-transform: uppercase; letter-spacing: .14em; color: var(--label-ink); padding-top: 2px; }
.th-facts dd { margin: 0; line-height: 1.55; color: var(--ink); }
.th-block { margin-top: 20px; }
.th-block > p { margin: 0 0 10px; line-height: 1.65; max-width: 70ch; }
.th-block > p:last-child { margin-bottom: 0; }
.th-themes { margin: 0; padding-left: 22px; max-width: 70ch; }
.th-themes li { margin: 0 0 8px; line-height: 1.6; }
.th-parts { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; max-width: 70ch; }
.th-parts li { display: flex; gap: 12px; align-items: baseline; }
.th-range { flex: 0 0 auto; min-width: 64px; padding: 3px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-text); font-weight: 700; font-size: 14px; text-align: center; text-decoration: none; font-variant-numeric: tabular-nums; }
.th-part-title { line-height: 1.5; }
.th-where { margin: 0 0 6px; }
.th-cats .item.cat { align-items: flex-start; }
.th-cats .item.cat .num { min-width: 64px; }
.th-cat-sum { margin: 5px 0 0; font-weight: 400; color: var(--ink-2); line-height: 1.5; }
.th-chapters { display: grid; grid-template-columns: repeat(auto-fill, minmax(50px, 1fr)); gap: 6px; }
.th-chapters a { position: relative; display: grid; place-items: center; min-height: 46px; border-radius: var(--radius-s); background: var(--surface); box-shadow: var(--shadow-card); color: var(--accent-text); font-weight: 700; text-decoration: none; font-variant-numeric: tabular-nums; }
.th-chapters a.kept::after { content: ""; top: 5px; right: 5px; width: 7px; height: 7px; }
.th-quote { margin: 4px 0 6px; padding: 4px 0 4px 16px; border-left: 3px solid var(--accent); font-family: var(--serif); font-size: 17px; line-height: 1.65; color: var(--ink); max-width: 68ch; }
.th-quote p { margin: 0 0 4px; }
.th-quote cite { font-style: normal; }
.chapnav.row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 18px 0 4px; }
.chapnav.row .btn:last-child { justify-content: flex-end; text-align: right; }
/* what Claude wrote */
.th-claude { margin: 18px 0 8px; }
.th-claude > h3.sub { margin-top: 0; }
.th-ask { border-radius: var(--radius); padding: 12px 16px 12px; background: var(--card); }
.th-ask > p:first-child { margin: 0 0 4px; line-height: 1.6; max-width: 70ch; }
.th-measure { margin: 10px 0 0; }
.th-insight { border-radius: var(--radius); padding: 4px 18px 14px; background: var(--card); }
.th-lang { margin: 8px 0 2px; padding: 8px 12px; border-radius: var(--radius-s); background: var(--surface); }
.th-sec { padding: 14px 0 12px; border-top: 1px solid var(--line); }
.th-sec:first-child, .th-lang + .th-sec { border-top: none; }
.th-sec h4 { font: 700 11px/1.35 var(--sans); text-transform: uppercase; letter-spacing: .16em; color: var(--label-ink); margin: 0 0 7px; }
.th-sec p { margin: 0 0 9px; line-height: 1.65; max-width: 70ch; }
.th-sec p:last-child { margin-bottom: 0; }
.th-sec.lead p { font-size: 17px; color: var(--ink); }
.th-sec.church { margin: 4px -8px 6px; padding: 14px 16px 14px; border-top: none; border-left: 4px solid var(--brand); border-radius: var(--radius-s); background: var(--surface); }
.th-sec.church + .th-sec { border-top: none; }
.th-sec.aside p { color: var(--ink-2); }   /* "Good to know" (not .note: that is the card of a note) */
.th-words { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 7px 16px; margin: 0; max-width: 70ch; }
.th-words dt { font-weight: 700; color: var(--ink); }
.th-words dd { margin: 0; line-height: 1.55; }
.th-theme { margin: 0 0 10px; max-width: 70ch; }
.th-theme:last-child { margin-bottom: 0; }
.th-theme b { display: block; color: var(--ink); margin-bottom: 1px; }
.th-catrefs { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.th-catref { padding: 9px 12px; border-radius: var(--radius-s); background: var(--card); line-height: 1.5; }
.th-catref .num { font-weight: 700; text-decoration: none; }
.th-view { padding: 10px 0; border-top: 1px dashed var(--line-strong); max-width: 70ch; }
.th-view:first-of-type { border-top: none; padding-top: 2px; }
.th-view-head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin-bottom: 4px; }
.th-view-head b { color: var(--ink); }
.th-badge { display: inline-flex; align-items: center; min-height: 24px; padding: 2px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 700; }
.th-badge.agrees { color: var(--c-green); background: color-mix(in srgb, var(--c-green) 13%, transparent); }
.th-badge.differs { color: var(--c-amber); background: color-mix(in srgb, var(--c-amber) 15%, transparent); }
.th-badge.open { color: var(--c-slate); background: color-mix(in srgb, var(--c-slate) 13%, transparent); }
.th-differs { padding: 7px 11px; border-radius: var(--radius-s); background: var(--surface); }
.th-refs { margin: 0; padding-left: 20px; max-width: 70ch; }
.th-refs li { margin: 0 0 6px; line-height: 1.55; }
.th-refs a { font-weight: 700; text-decoration: none; }
.th-foot { margin-top: 6px; padding-top: 10px; border-top: 1px solid var(--line); }
.th-foot > p { margin: 0; }
/* the answers Claude gave here before: kept under the newest, each folded away under its date and first words */
.th-earlier { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.th-earlier > h4 { font: 700 11px/1.35 var(--sans); text-transform: uppercase; letter-spacing: .16em; color: var(--label-ink); margin: 0 0 5px; }
.th-earlier > p { margin: 0 0 10px; line-height: 1.55; max-width: 70ch; }
.th-old { margin: 0 -8px 8px; padding: 0 14px; border: 1px solid var(--line-strong); border-radius: var(--radius-s); background: var(--card); }
.th-old > summary { padding: 11px 0; }
.th-old-first { display: block; margin-top: 3px; font-weight: 400; color: var(--ink-2); line-height: 1.5; max-width: 70ch; }
.th-old[open] > summary { margin-bottom: 0; border-bottom: 1px solid var(--line); }
.th-old > .th-sec:first-of-type { border-top: none; }
.th-old-foot { padding: 10px 0 14px; border-top: 1px solid var(--line); }
/* keeping all of it: as a PDF to keep, print or share, or as a note */
.th-save { margin: 10px -8px 8px; padding: 12px 16px 14px; border-radius: var(--radius-s); background: var(--surface); }
.th-save h4 { font: 700 11px/1.35 var(--sans); text-transform: uppercase; letter-spacing: .16em; color: var(--label-ink); margin: 0 0 5px; }
.th-save p { margin: 0 0 10px; line-height: 1.55; max-width: 70ch; }
/* the sheet from the reader: the verses, the chapter and the book side by side, a long name wrapping inside its own button */
.seg.th-levels { display: grid; grid-template-columns: auto auto auto; }
.seg.th-levels button { overflow-wrap: break-word; }
.th-sheet { margin-top: 12px; }
.th-sheet .th-claude:first-child { margin-top: 4px; }
.th-sheet .th-block:first-child { margin-top: 4px; }
.th-booknote .th-facts { margin-bottom: 0; }
/* Easy-read: the plain letters with more room, and the small headings in ordinary letters */
[data-read="easy"] .th-sec p, [data-read="easy"] .th-block > p, [data-read="easy"] .th-facts dd, [data-read="easy"] .th-themes li,
[data-read="easy"] .th-parts li, [data-read="easy"] .th-words dd, [data-read="easy"] .th-lead, [data-read="easy"] .th-ask > p, [data-read="easy"] .th-refs li,
[data-read="easy"] .th-earlier > p, [data-read="easy"] .th-old-first {
  letter-spacing: .035em; word-spacing: .12em; line-height: 1.8;
}
[data-read="easy"] .th-sec h4, [data-read="easy"] .th-save h4, [data-read="easy"] .th-earlier > h4, [data-read="easy"] .th-facts dt { text-transform: none; letter-spacing: .02em; font-size: 14px; }
[data-read="easy"] .th-quote { font-style: normal; line-height: 1.85; }
@media (max-width: 759.98px) {
  /* the phone's bar keeps six tabs: Theology is reached from the reader, and Read stays lit while it is open */
  .tabs button[data-tab="theology"] { display: none; }
  .tabs button.also { color: var(--accent-text); }
  .tabs button.also .ico { background: var(--accent); color: var(--accent-ink); }
  .th-books { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .th-facts { grid-template-columns: minmax(0, 1fr); gap: 2px; padding: 12px 14px; }
  .th-facts dd { margin-bottom: 8px; }
  .th-facts dd:last-child { margin-bottom: 0; }
  .th-words { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .th-words dd { margin-bottom: 8px; }
  .th-insight { padding: 2px 14px 12px; }
  .th-sec.church { margin: 4px -6px 6px; padding: 12px 12px; }
  .th-save { margin: 10px -6px 8px; padding: 12px 12px 14px; }
  .th-old { margin: 0 -6px 8px; padding: 0 12px; }
  .th-goto .btn { display: none; }   /* the keyboard's Go key submits */
  .th-chapters { grid-template-columns: repeat(auto-fill, minmax(48px, 1fr)); }
  .th-parts li { gap: 10px; }
  .chapnav.row .btn { white-space: normal; }
}
