/*
 * The design settings: every font, size, space, colour, corner radius, shadow and
 * shape the App and the Website use. All other CSS uses these settings and never a raw
 * size or colour (a test checks). Each colour gives its light and dark values side
 * by side in light-dark(); a page follows the reader's choice of light or dark.
 * The App's Style Guide shows every setting.
 */

/* Self-hosted fonts: PT Serif for Bible text, Yantramanav for other text,
   and Noto Serif Hebrew for Hebrew: the isolated letters in ASV's acrostic
   headings, and a BSB tap's Hebrew or Aramaic words, with their points and
   accents, which must come from the face their letters do. A BSB tap's Greek
   words take Noto Serif's Greek (--font-original), as PT Serif has none. */
@font-face {
  font-family: "PT Serif";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/pt-serif-400.woff2?v=ef391572f9fbb7bab7fef6ce") format("woff2");
}

@font-face {
  font-family: "PT Serif";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/pt-serif-400-italic.woff2?v=be5daba1b69c2dad0eed50cc") format("woff2");
}

@font-face {
  font-family: "PT Serif";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("fonts/pt-serif-700.woff2?v=e548abcd8734bfcf8b4ebbbc") format("woff2");
}

/* PT Serif's bold italic, such as a sermon's hymns' (#521), so that the
   browser never imitates it: the full file, "PT Serif Full"'s, as it has no
   small face. */
@font-face {
  font-family: "PT Serif";
  font-style: italic;
  font-weight: 700;
  font-display: swap;
  src: url("fonts/ptserif-italic-700.ttf?v=f003788ba08981eb0988b355") format("truetype");
}

@font-face {
  font-family: "Noto Serif Hebrew";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/noto-serif-hebrew.ttf?v=93caef921360788dc3b0e321") format("truetype");
  unicode-range: U+0591-05C7, U+05D0-05EA, U+05EF-05F4, U+FB1D-FB4F;
}

@font-face {
  font-family: "Yantramanav";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/yantramanav-400.woff2?v=bb5a1afb651243583a485b17") format("woff2");
}

@font-face {
  font-family: "Yantramanav";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("fonts/yantramanav-500.woff2?v=85e24355b3150d6966aa4bd9") format("woff2");
}

@font-face {
  font-family: "Yantramanav";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("fonts/yantramanav-700.woff2?v=b694b75d3a868f5e95b4fedc") format("woff2");
}

@font-face {
  font-family: "Noto Naskh Arabic";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("fonts/notonaskharabic.woff2?v=2772db9e70e2590845e7800b") format("woff2");
}

@font-face {
  font-family: "Noto Sans";
  font-style: italic;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/notosans-italic.woff2?v=6ce0ae772cab737b097ee91f") format("woff2");
}

@font-face {
  font-family: "Noto Sans";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/notosans.woff2?v=31243d23d5f0383f862f49ff") format("woff2");
}

@font-face {
  font-family: "Noto Sans Arabic";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/notosansarabic.woff2?v=d383af9d4bce176d3d619bdc") format("woff2");
}

@font-face {
  font-family: "Noto Sans Bengali";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/notosansbengali.woff2?v=c213cda58fe85a19e5327c51") format("woff2");
}

@font-face {
  font-family: "Noto Sans JP";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/notosansjp.woff2?v=6fd94964d1990baa2a392cea") format("woff2");
}

@font-face {
  font-family: "Noto Sans KR";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/notosanskr.woff2?v=f484190a87503ac2af2cf977") format("woff2");
}

@font-face {
  font-family: "Noto Sans Malayalam";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/notosansmalayalam.woff2?v=7b6366fbcf88276edbc7f622") format("woff2");
}

@font-face {
  font-family: "Noto Sans SC";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/notosanssc.woff2?v=aef8c34277afad81ecd02271") format("woff2");
}

@font-face {
  font-family: "Noto Sans Tamil";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/notosanstamil.woff2?v=8eb354092e02ad6fc6e5133a") format("woff2");
}

@font-face {
  font-family: "Noto Sans Telugu";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/notosanstelugu.woff2?v=9f908021d9368e07ca26fa16") format("woff2");
}

@font-face {
  font-family: "Noto Serif";
  font-style: italic;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/notoserif-italic.woff2?v=b227171a80e4f3f78e74855e") format("woff2");
}

@font-face {
  font-family: "Noto Serif";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/notoserif.woff2?v=903b265b99ebc48e69cb4010") format("woff2");
}

@font-face {
  font-family: "Noto Serif Bengali";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/notoserifbengali.woff2?v=f36ebc17bbb6d811cc10ea43") format("woff2");
}

@font-face {
  font-family: "Noto Serif Devanagari";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/notoserifdevanagari.woff2?v=3528a4ad3262835624e0ee39") format("woff2");
}

@font-face {
  font-family: "Noto Serif JP";
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url("fonts/notoserifjp.woff2?v=075dddc7c1db881edb70818c") format("woff2");
}

@font-face {
  font-family: "Noto Serif KR";
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url("fonts/notoserifkr.woff2?v=e873199ed8f2a76e32c7239e") format("woff2");
}

@font-face {
  font-family: "Noto Serif Malayalam";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/notoserifmalayalam.woff2?v=99d4ffb4de6a083d1c59b5c4") format("woff2");
}

@font-face {
  font-family: "Noto Serif SC";
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url("fonts/notoserifsc.woff2?v=4ee9b0921ec9bd3f8b04587c") format("woff2");
}

@font-face {
  font-family: "Noto Serif Tamil";
  font-style: italic;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/notoseriftamil-italic.woff2?v=4252016b0928cac8b364d8fe") format("woff2");
}

@font-face {
  font-family: "Noto Serif Tamil";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/notoseriftamil.woff2?v=55eac40429e557108cf6d4ab") format("woff2");
}

@font-face {
  font-family: "Noto Serif Telugu";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/notoseriftelugu.woff2?v=18da588367a96364295e0f0d") format("woff2");
}

@font-face {
  font-family: "PT Serif Full";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("fonts/ptserif-700.ttf?v=038ba7336bd7ea14f12ad155") format("truetype");
}

@font-face {
  font-family: "PT Serif Full";
  font-style: italic;
  font-weight: 700;
  font-display: swap;
  src: url("fonts/ptserif-italic-700.ttf?v=f003788ba08981eb0988b355") format("truetype");
}

@font-face {
  font-family: "PT Serif Full";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/ptserif-italic-400.ttf?v=f57e95ff9dc85691a3b2e193") format("truetype");
}

@font-face {
  font-family: "PT Serif Full";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/ptserif-400.ttf?v=a4951fade06ff8f09b7673aa") format("truetype");
}

@font-face {
  font-family: "Yantramanav Full";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("fonts/yantramanav-700.woff2?v=b694b75d3a868f5e95b4fedc") format("woff2");
}

@font-face {
  font-family: "Yantramanav Full";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("fonts/yantramanav-500.woff2?v=85e24355b3150d6966aa4bd9") format("woff2");
}

@font-face {
  font-family: "Yantramanav Full";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/yantramanav-400.woff2?v=bb5a1afb651243583a485b17") format("woff2");
}

:root {
  color-scheme: light dark;

  /* Fonts, and the weights self-hosted for them. */
  --font-scripture: "PT Serif", "PT Serif Full", "Noto Serif Hebrew", Georgia, "Times New Roman", serif;
  --font-ui: "Yantramanav", "Yantramanav Full", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-scripture-latin: "PT Serif", "PT Serif Full", "Noto Serif", "Noto Serif Hebrew", serif;
  --font-ui-latin: "Yantramanav", "Yantramanav Full", "Noto Sans", sans-serif;
  /* An Original word's letters, in a BSB tap (ADR 0027): Greek from Noto
     Serif, which has its accents and breathings, and Hebrew, with its points
     and accents, from Noto Serif Hebrew. */
  --font-original: "Noto Serif", "Noto Serif Hebrew", serif;
  --font-scripture-hi: "PT Serif", "PT Serif Full", "Noto Serif Devanagari", "Noto Serif Hebrew", serif;
  --font-ui-hi: "Yantramanav", "Yantramanav Full", "Yantramanav Full", sans-serif;
  --font-scripture-ta: "PT Serif", "PT Serif Full", "Noto Serif Tamil", "Noto Serif Hebrew", serif;
  --font-ui-ta: "Yantramanav", "Yantramanav Full", "Noto Sans Tamil", sans-serif;
  --font-scripture-te: "PT Serif", "PT Serif Full", "Noto Serif Telugu", "Noto Serif Hebrew", serif;
  --font-ui-te: "Yantramanav", "Yantramanav Full", "Noto Sans Telugu", sans-serif;
  --font-scripture-bn: "PT Serif", "PT Serif Full", "Noto Serif Bengali", "Noto Serif Hebrew", serif;
  --font-ui-bn: "Yantramanav", "Yantramanav Full", "Noto Sans Bengali", sans-serif;
  --font-scripture-ml: "PT Serif", "PT Serif Full", "Noto Serif Malayalam", "Noto Serif Hebrew", serif;
  --font-ui-ml: "Yantramanav", "Yantramanav Full", "Noto Sans Malayalam", sans-serif;
  --font-scripture-ar: "PT Serif", "PT Serif Full", "Noto Naskh Arabic", "Noto Serif Hebrew", serif;
  --font-ui-ar: "Yantramanav", "Yantramanav Full", "Noto Sans Arabic", sans-serif;
  --font-scripture-zh: "PT Serif", "PT Serif Full", "Noto Serif SC", "Noto Serif Hebrew", serif;
  --font-ui-zh: "Yantramanav", "Yantramanav Full", "Noto Sans SC", sans-serif;
  --font-scripture-ja: "PT Serif", "PT Serif Full", "Noto Serif JP", "Noto Serif Hebrew", serif;
  --font-ui-ja: "Yantramanav", "Yantramanav Full", "Noto Sans JP", sans-serif;
  --font-scripture-ko: "PT Serif", "PT Serif Full", "Noto Serif KR", "Noto Serif Hebrew", serif;
  --font-ui-ko: "Yantramanav", "Yantramanav Full", "Noto Sans KR", sans-serif;
  --line-height-scripture-marks: calc(var(--step-scripture) * 2.1);
  --line-height-tight-marks: 1.8;
  --weight-regular: 400;
  --weight-medium: 500;
  --weight-bold: 700;
  /* Small capitals, such as a Period's name on the Chronological Bible's
     contents page, are spaced a little apart. */
  --tracking-small-caps: 0.05em;

  /* The base: the size of body text, from which every step and space is built
     (Golden Ratio Typography, ADR 0008). The Website's is the old site's: 16px on
     a phone, growing smoothly to 19.2px between 400px and 440px wide (the old site
     switched at 428px), then never larger. The App, a dense tool used on a
     desktop, takes 16px; its screens' root has class="app" (below). */
  --base-website: clamp(1rem, 8vw - 1rem, 1.2rem);
  --base-app: 1rem;

  /* Type scale: each step is √φ (1.272) times the one below, as GRT builds it.
     At the 16px and 19.2px bases: -2 9.9 and 11.9px, -1 12.6 and 15.1,
     0 16 and 19.2, 1 20.4 and 24.4, 2 25.9 and 31.1, 3 32.9 and 39.5,
     4 41.9 and 50.3. */
  --step--2: calc(var(--step-0) / 1.618034);
  --step--1: calc(var(--step-0) / 1.272020);
  --step-0: var(--base-website);
  --step-1: calc(var(--step-0) * 1.272020);
  --step-2: calc(var(--step-0) * 1.618034);
  --step-3: calc(var(--step-0) * 2.058171);
  --step-4: calc(var(--step-0) * 2.618034);

  /* Line heights: each step's, as a multiple of its size, so that its line lands
     within a pixel of GRT's for PT Serif at 16px in a 343px column and at 19px in
     a 600px column (a test checks). Lines at the 16px and 19.2px bases: -1 21 and
     26px, 0 26 and 31, 1 32 and 38, 2 40 and 48, 3 50 and 60, 4 63 and 76. GRT's
     tables stop at step -1; step -2 continues their rise. Wording set on one line,
     such as a Reference or a title over a photo, sits at --line-height-tight. */
  --line-height--2: 1.75;
  --line-height--1: 1.7;
  --line-height-0: 1.62;
  --line-height-1: 1.56;
  --line-height-2: 1.56;
  --line-height-3: 1.52;
  --line-height-4: 1.51;
  --line-height-tight: 1.2;

  /* Bible text, exactly as on the old site, in the App too: PT Serif at the
     Website's base, 16px on a phone growing to 19.2px. Its line grows alongside,
     from 1.688 times it at 16px to 1.714 times it at 19.2px. Its Reference is 1.2
     times it, and its verse numbers 1.44 times smaller. Its lines are justified.
     The visitor's Text size (#343) multiplies the text and its line by
     --text-scale, below, and nothing else. */
  --text-scale: 1;
  --step-scripture: calc(var(--base-website) * var(--text-scale));
  --step-scripture-reference: calc(var(--step-scripture) * 1.2);
  --step-scripture-verse: calc(var(--step-scripture) / 1.44);
  --line-height-scripture: calc(clamp(1.688rem, 14.752vw - 2rem, 2.0568rem) * var(--text-scale));
  --align-scripture: justify;

  /* Words over a photo keep their size against the photo, never past step 1, so
     that a desktop's larger photos don't bring larger words: a photo card's name
     is 9% of the card's width, and the Daily Topic's title 6.5% of its photo's.
     cqi is a share of the nearest size container, so the card or the photo sets
     container-type: inline-size. */
  --text-on-card: clamp(var(--step--1), 9cqi, var(--step-1));
  --text-on-photo: clamp(var(--step-0), 6.5cqi, var(--step-1));

  /* Spacing, in GRT's units: x2 is body text's line height, and each unit is φ
     (1.618) from the next, so space grows with the type. At the 16px and 19.2px
     bases: x1 41.9 and 50.3px, x2 25.9 and 31.1, x3 16 and 19.2, x4 9.9 and 11.9,
     x5 6.1 and 7.3, x6 3.8 and 4.5. The old 0.25rem grid's names take the unit
     nearest their old size, except --space-6, which shares x3 with --space-4 so
     that a button's and a panel's sides stay as close as they were. */
  --space-x1: calc(var(--space-x2) * 1.618034);
  --space-x2: calc(var(--step-0) * var(--line-height-0));
  --space-x3: calc(var(--space-x2) / 1.618034);
  --space-x4: calc(var(--space-x2) / 2.618034);
  --space-x5: calc(var(--space-x2) / 4.236068);
  --space-x6: calc(var(--space-x2) / 6.854102);
  --space-1: var(--space-x6);
  --space-2: var(--space-x5);
  --space-3: var(--space-x4);
  --space-4: var(--space-x3);
  --space-6: var(--space-x3);
  --space-8: var(--space-x2);
  --space-12: var(--space-x1);

  /* A paragraph's first line, in a text set as a printed book is, such as a
     sermon's (#519), starts a golden step (φ) of the text's own size in: about
     three or four letters, as the Spurgeon Gems editions indent. It grows with
     the visitor's Text size. */
  --indent-paragraph: 1.618034em;
  /* A Head's numeral (#522) hangs outside such a text's left edge; where the
     page has no margin for it, the text keeps this much room on its left:
     enough for VIII. in bold and the space after it. */
  --width-head-numeral: 2.618034em;
  /* A list's line that wraps, such as a Dictionary article's title on the
     Dictionary page (#731), indents its later lines this much, the first
     starting this much further out than they do. */
  --indent-hanging: var(--space-4);
  --indent-hanging-first: calc(var(--indent-hanging) * -1);

  /* Widths. The measure is the column of text: the old site's 600px. Actions sit
     beside a screen's text, such as the Passage screen's, or in a panel that must
     hold a choice's full name, such as the Website's gear and its Translations. A tile is the narrowest
     a picture in a grid of them may be, such as the Media Library's photos. A page
     laid out wider than the measure, such as the homepage, takes --width-page, and
     a panel within it, such as the homepage's Groups, --width-panel. A line of Bible
     text set beside other things, such as the Daily Topic's Passage, never runs
     past --width-scripture: about 75 characters, whatever its size. A small month
     in a grid of them, such as the Calendar's year at a glance, is at least
     --width-month wide, so that four fit across --width-page, and two beside the
     App's sidebar on a tablet. A Verse preview's card (#736), from a tablet up,
     is --width-verse-preview wide. A time line's margin of dates, such as the
     Chronological Bible's contents page's, is --width-timeline-when wide. */
  --width-measure: 37.5rem;
  --width-sidebar: 15rem;
  --width-actions: 20rem;
  --width-tile: 16rem;
  --width-month: 13.25rem;
  --width-page: 72rem;
  --width-panel: 56rem;
  --width-scripture: 33em;
  --width-verse-preview: 24rem;
  --width-timeline-when: 7.5rem;
  /* A time line's line runs down the middle of a column of points
     --width-timeline-mark wide, --inset-timeline-line in. A point centres on its
     row's first line, --inset-timeline-point down, and an era's on its first
     line: its label, --inset-timeline-label down, or else its name,
     --inset-timeline-era down. A part's words, and an era's, hang after its
     arrow, --width-timeline-arrow wide. */
  --width-timeline-mark: var(--space-6);
  --width-timeline-arrow: var(--space-4);
  --inset-timeline-line: calc(var(--width-timeline-mark) / 2);
  --inset-timeline-point: calc(var(--step-0) * var(--line-height-0) / 2);
  --inset-timeline-label: calc(var(--step-0) * var(--line-height-tight) / 2);
  --inset-timeline-era: calc(var(--step-1) * var(--line-height-tight) / 2);
  --inset-timeline-arrow: calc(var(--width-timeline-arrow) * -1);
  --width-border: 1px;
  --width-focus: 2px;

  /* Sizes. Anything a finger taps is at least --size-target tall: 44px. A control
     drawn smaller, such as a chip, lays an ::after over itself at --inset-target
     (inset: var(--inset-target) 0), which reaches out to that height. A chip is
     2.75 times its words (step -1): about 35px on a phone and 41px on a desktop.
     No control is smaller than --size-target-min each way, 24px, the least WCAG
     2.2 AA allows, but a link in a sentence: a table's sort buttons, say, or a
     short name that links in a table. */
  /* The verse panel's height on a wide screen, and on a narrow one (a phone's
     or tablet's, with the page's bar it stands on), each giving way down to
     its least where the chosen verse needs the room above it. Its script reads
     all three. */
  --height-verse-panel: 70vh;
  --height-verse-panel-narrow: 66vh;
  --height-verse-panel-least: 50vh;
  --size-guide-grab: 2.25rem;
  --height-guide-grab: 0.25rem;
  --size-target: 2.75rem;
  --size-target-min: 1.5rem;
  --size-chip: calc(var(--step--1) * 2.75);
  /* The least room a finder's list of titles keeps beside actions that say
     much: four titles' targets. */
  --height-finder-list: calc(var(--size-target) * 4);
  /* A text's Heads drawn to scale, such as a sermon's In this sermon list
     (#522), are at least half the window tall, so that each entry's height
     shows its share. */
  --height-heads-list: 50vh;

  /* A slider, such as the Website's Text size, draws its own track and thumb,
     the same in every browser: a thumb --size-slider-thumb round, centred
     (--inset-slider-thumb) on a track --height-slider-track high. A stop's
     centre, where the thumb rests and its mark sits, is half a thumb in from the
     track's end (--inset-slider-stop), plus its share of the rest. Its marks, a
     focus ring wide, lie as far in, less half their width (--inset-slider-mark). */
  --size-slider-thumb: var(--space-x3);
  --height-slider-track: var(--space-x5);
  --inset-slider-thumb: calc((var(--height-slider-track) - var(--size-slider-thumb)) / 2);
  --inset-slider-stop: calc(var(--size-slider-thumb) / 2);
  --inset-slider-mark: calc(var(--inset-slider-stop) - var(--width-focus) / 2);

  /* A list to choose from (a select) draws its own caret, since the browser's
     sits against the border whatever the padding: a chevron in its words'
     colour, two strokes --width-caret thick, each drawn corner to corner in a
     square of --size-caret, side by side (--gradient-caret-left and -right). */
  --size-caret: 0.3125em;
  --width-caret: 0.09375em;

  /* A list of numbers, such as a book's chapters, can be as wide as three digits
     with their padding, caret and borders from the start, so that it needn't
     widen for a book of more than 99 chapters, the Psalms. A select keeps a
     little more room than its words take: a quarter of a digit holds it. */
  --width-number-choice: calc(var(--space-3) + 3.25ch + var(--space-2) + var(--size-caret) + var(--size-caret) + var(--space-3) + var(--width-border) + var(--width-border));
  --inset-target: min(0px, (100% - var(--size-target)) / 2);

  /* An icon button's symbol (--step-1) sits centred in it, as far in from its
     edge as these, given negative to line the symbol up with words above or
     below it: for a button as tall as a chip, and one a finger's target. */
  --inset-icon-chip: calc((var(--step-1) - var(--size-chip)) / 2);
  --inset-icon-target: calc((var(--step-1) - var(--size-target)) / 2);

  /* A Passage's actions (#144) sit centred on its Reference's line: these are
     the margins that centre a chip and a finger's target on it, without
     growing the line for a chip. */
  --inset-reference-chip: calc((var(--step-scripture-reference) * var(--line-height-tight) - var(--size-chip)) / 2);
  --inset-reference-target: calc((var(--step-scripture-reference) * var(--line-height-tight) - var(--size-target)) / 2);

  /* A mark placed at a point on a map, such as a place's pin or name, moves by
     half its size to centre on the point, or by the whole to stand on it or end
     at it. A pin is a third taller than it is wide, the target's least. A focus
     ring drawn inside a control, as on a map's buttons, which touch its edge,
     sits its width in. */
  --shift-half: -50%;
  --shift-whole: -100%;
  --height-pin: calc(var(--size-target-min) * 4 / 3);
  --offset-focus-inside: calc(var(--width-focus) * -1);

  /* A card's arrow pointing at what it is about, such as a Verse preview's at
     its reference (#736), is a square --size-arrow wide, turned an eighth of
     the way round to stand on a corner (--turn-point) and set half its size
     over the card's edge (--inset-arrow). */
  --size-arrow: var(--space-4);
  --inset-arrow: calc(var(--size-arrow) / -2);

  /* A page's sides keep --space-gutter: the Website's page gutter, and the
     App's screens' on a phone. A part of a page that needs the whole width of
     a narrow phone, such as the letter index (#729), reaches out over it, as
     far as --inset-gutter. */
  --space-gutter: var(--space-4);
  --inset-gutter: calc(var(--space-gutter) * -1);

  /* Words for a screen reader alone take a pixel, which screen readers still read. */
  --size-unseen: 1px;

  /* The edges a phone's screen keeps for itself: the home bar at its foot and,
     turned on its side, the notch at one side. The App's screens reach under
     them (viewport-fit=cover, in its index.html), so the App keeps its screens
     clear of the sides, and a bar fixed at the window's foot, such as the
     Passage screen's, clear of the home bar. Elsewhere they are 0. */
  --inset-safe-bottom: env(safe-area-inset-bottom, 0px);
  --inset-safe-left: env(safe-area-inset-left, 0px);
  --inset-safe-right: env(safe-area-inset-right, 0px);

  /* Breakpoints: the screen widths where a page's layout may change. A narrow
     phone ends at 24rem (384px), a time line's dates move into its margin at
     32.8125rem (525px), a tablet starts at 48rem (768px), the reader Guide
     fits beside Scripture at 60rem (960px), and a desktop at 68.75rem
     (1100px). CSS can't read a setting inside @media, so a media query writes
     the width itself, and only these (a test checks). */
  --breakpoint-narrow: 24rem;
  --breakpoint-timeline: 32.8125rem;
  --breakpoint-tablet: 48rem;
  --breakpoint-guide: 60rem;
  --breakpoint-desktop: 68.75rem;

  /* Corner radii, by role; the same role always takes the same radius (tests
     check that corners use only these, and each shared component's role). A
     control: a button, an input, a tab or a closed accordion row. A card: a
     card, a panel, a photo or a band. A pill: a chip or a badge. An inset: a
     corner nested inside another, such as a photo in a card or a key in a
     button: a card's radius less the gap it holds its contents at (--space-4),
     but never under 4px, so that it still reads as rounded. */
  --radius-control: 0.375rem;
  --radius-card: 0.75rem;
  --radius-pill: 999px;
  --radius-inset: max(0.25rem, var(--radius-card) - var(--space-4));

  /* Shapes: a Topic's photo is a share card's 1200 × 630, and a photo card, such
     as the homepage's, 3 × 2. */
  --ratio-photo: 40 / 21;
  --ratio-card: 3 / 2;

  /* Shadows: a resting card, something raised above the page, and the shadow
     behind wording on a photo. */
  --shadow-1: 0 1px 2px light-dark(rgb(31 35 40 / 0.06), rgb(0 0 0 / 0.4));
  --shadow-2: 0 4px 16px light-dark(rgb(31 35 40 / 0.12), rgb(0 0 0 / 0.6));
  --shadow-text: 0 1px 2px rgb(0 0 0 / 0.5);

  /* A photo card darkens towards its foot, where its name sits. Pointing at it
     zooms its photo a little, unless the reader asks for less motion. */
  --gradient-photo-foot: linear-gradient(transparent, rgb(0 0 0 / 0.72));
  --gradient-caret-left: linear-gradient(to bottom left, transparent calc(50% - var(--width-caret) / 2),
    currentColor calc(50% - var(--width-caret) / 2), currentColor calc(50% + var(--width-caret) / 2), transparent calc(50% + var(--width-caret) / 2));
  --gradient-caret-right: linear-gradient(to bottom right, transparent calc(50% - var(--width-caret) / 2),
    currentColor calc(50% - var(--width-caret) / 2), currentColor calc(50% + var(--width-caret) / 2), transparent calc(50% + var(--width-caret) / 2));
  --zoom-photo: scale(1.05);
  --duration-zoom: 0.3s;
  /* A box whose words scroll with no scrollbar, such as a Verse preview's
     verses (#736), fades them out over --space-8 at the edge where more are
     hidden, at the top, the bottom or both: masks, opaque where the words
     show. */
  --gradient-fade-top: linear-gradient(to top, #000 calc(100% - var(--space-8)), transparent);
  --gradient-fade-bottom: linear-gradient(to bottom, #000 calc(100% - var(--space-8)), transparent);
  --gradient-fade-both: linear-gradient(to bottom, transparent, #000 var(--space-8), #000 calc(100% - var(--space-8)), transparent);
  /* A chevron turns over while what it opens is open, such as a segment's
     menu (#708); a card's arrow (--size-arrow) is a square turned to point. */
  --turn-over: rotate(0.5turn);
  --turn-point: rotate(0.125turn);
  /* Arriving at a place a menu leads to, such as a sermon's Head (#522), tints
     it for a moment, fading; without the fade, at once, for a reader who asks
     for less motion. */
  --duration-arrive: 2.4s;

  --opacity-disabled: 0.6;

  /* Colours, light then dark, that every theme shares (the rest are each theme's,
     below). Words on a button's fill are white. The App's errors and warnings are
     an orange red and a gold, apart from every theme's links; the gold also fills a
     day that marks a warning, such as a clash on the Calendar, its words the
     surface's colour. Something just done, such as a Passage's Copy, turns
     green for a moment. */
  --color-on-accent: #ffffff;
  --color-warning: light-dark(#8a6100, #e3b341);
  --color-danger: light-dark(#c2410c, #ff7a45);
  --color-success: light-dark(#146c2e, #3fb950);
  /* Red letters (#779): the words of Jesus, where the reader has chosen Red,
     one red for every theme (#780). */
  --color-red-letters: light-dark(#c10114, #fe6358);

  /* A surface just showing through a tinted band (--color-accent-soft), such as a
     folder tab not open. */
  --color-surface-faint: light-dark(rgb(255 255 255 / 0.4), rgb(255 255 255 / 0.04));

  /* Wording over a photo, in light and dark alike: white, on the photo darkened
     enough to read it however pale the photo is. */
  --color-on-photo: #ffffff;
  --color-photo-scrim: rgb(0 0 0 / 0.5);

  /* Behind a dialog, dimming the screen it opened over. */
  --color-backdrop: rgb(0 0 0 / 0.4);
}

/* Themes: the sets of colours a visitor may choose for the Website (#82), each in
   light and dark. Each gives the same colour settings to whatever carries its
   data-theme, the page's root or a swatch of it; Crimson is :root's, so it is
   every page's until a visitor chooses, and the App's. The page, its cards, words
   and muted words, borders and what is pointed at; links (accent) and the same
   pointed at (accent-strong); a tinted band (accent-soft) and a border that shows
   on it (border-strong), which also fills a marked day, such as a fixed date on
   the Calendar, under the page's words; and a primary button (accent-fill, pointed at:
   accent-fill-strong), which in dark mode is deeper than links so that white
   reads on it; and a highlight behind words (highlight), such as the verses a
   chapter page is opened at, words the visitor selects or the reader Guide's
   chosen and pointed-at lines, the accent mixed 14% into the page, but for
   the red Themes, where that reads as pink: a warm stone for Crimson and a
   parchment for Oxblood. Every pair that carries words meets 4.5:1 (a test
   checks). */
:root,
[data-theme="crimson"] {
  --color-bg: light-dark(#f8f8f7, #121213);
  --color-surface: light-dark(#ffffff, #1c1c1e);
  --color-text: light-dark(#1b1b1d, #ececed);
  --color-muted: light-dark(#5e6267, #a1a1a7);
  --color-border: light-dark(#dedddb, #333336);
  --color-hover: light-dark(#f1f1ef, #202023);
  --color-accent: light-dark(#b0151c, #ec5158);
  --color-accent-strong: light-dark(#8c1016, #ef7177);
  --color-accent-soft: light-dark(#efeeec, #1e1e21);
  --color-accent-fill: light-dark(#b0151c, #c4262d);
  --color-accent-fill-strong: light-dark(#8c1016, #d6363c);
  --color-border-strong: light-dark(#cbc8c3, #4a4a4f);
  --color-highlight: light-dark(#e3ddd5, #2f2b26);
}

[data-theme="oxblood"] {
  --color-bg: light-dark(#f7f5f0, #151314);
  --color-surface: light-dark(#ffffff, #1f1b1c);
  --color-text: light-dark(#221e1d, #ece6e3);
  --color-muted: light-dark(#685f5c, #a59c99);
  --color-border: light-dark(#e2dbd6, #372f30);
  --color-hover: light-dark(#f2ece8, #241e1f);
  --color-accent: light-dark(#8b1a1a, #eb5247);
  --color-accent-strong: light-dark(#6e1414, #ee7168);
  --color-accent-soft: light-dark(#f3ece2, #271b1c);
  --color-accent-fill: light-dark(#8b1a1a, #a63129);
  --color-accent-fill-strong: light-dark(#6e1414, #bb3d34);
  --color-border-strong: light-dark(#d6c3b0, #5c4041);
  --color-highlight: light-dark(#e8dccd, #332921);
}

[data-theme="navy"] {
  --color-bg: light-dark(#f6f7f9, #10141b);
  --color-surface: light-dark(#ffffff, #182029);
  --color-text: light-dark(#1b2230, #e6eaf0);
  --color-muted: light-dark(#596271, #98a3b3);
  --color-border: light-dark(#d9dee6, #2a3441);
  --color-hover: light-dark(#eef1f5, #1f2833);
  --color-accent: light-dark(#1f4f8a, #8db6f5);
  --color-accent-strong: light-dark(#173b67, #b5cffa);
  --color-accent-soft: light-dark(#e7edf6, #162132);
  --color-accent-fill: light-dark(#1f4f8a, #2f68b3);
  --color-accent-fill-strong: light-dark(#173b67, #346fba);
  --color-border-strong: light-dark(#b5c3d8, #3a4d68);
  --color-highlight: light-dark(#d8dfe9, #222b3a);
}

[data-theme="evergreen"] {
  --color-bg: light-dark(#f6f7f4, #111613);
  --color-surface: light-dark(#ffffff, #19201c);
  --color-text: light-dark(#1d221f, #e5ebe7);
  --color-muted: light-dark(#5a645e, #9aa79f);
  --color-border: light-dark(#d8ddd6, #2b352f);
  --color-hover: light-dark(#eef1ec, #202923);
  --color-accent: light-dark(#1e5d4a, #7fd0b1);
  --color-accent-strong: light-dark(#164537, #a9e2cc);
  --color-accent-soft: light-dark(#e5efe9, #15221c);
  --color-accent-fill: light-dark(#1e5d4a, #1f7357);
  --color-accent-fill-strong: light-dark(#164537, #278568);
  --color-border-strong: light-dark(#b0c7bb, #355446);
  --color-highlight: light-dark(#d8e1dc, #203029);
}

[data-theme="plum"] {
  --color-bg: light-dark(#f8f6f9, #141216);
  --color-surface: light-dark(#ffffff, #1d1a20);
  --color-text: light-dark(#221d26, #ebe6ee);
  --color-muted: light-dark(#655d6b, #a69dac);
  --color-border: light-dark(#e0dae4, #332e38);
  --color-hover: light-dark(#f2eef4, #26222a);
  --color-accent: light-dark(#6a2c7d, #d5aaea);
  --color-accent-strong: light-dark(#521f61, #e6c9f3);
  --color-accent-soft: light-dark(#f1e8f4, #221b27);
  --color-accent-fill: light-dark(#6a2c7d, #7d3c93);
  --color-accent-fill-strong: light-dark(#521f61, #8f4aa6);
  --color-border-strong: light-dark(#ccb4d4, #4d3d57);
  --color-highlight: light-dark(#e4dae8, #2f2734);
}

/* The visitor's Text sizes (#343), which the gear offers on the Website and
   the root's data-text-size chooses: six sizes, half a golden step (φ^¼) apart,
   as multiples of the Website's base, so that a phone's 16px and a wide window's
   19.2px keep their relation at every size. At 16px and 19.2px: 89% 14.2 and
   17.0px, 100% (the default, with no data-text-size) 16 and 19.2, 113% 18.0 and
   21.7, 127% 20.4 and 24.4, 144% 23.0 and 27.5, 162% 25.9 and 31.1. From 127%
   up, a justified line on a phone holds only a few words and opens wide gaps
   between them, so Bible text ends its lines ragged. A size may only give
   settings of :root's. */
:root[data-text-size="89"] {
  --text-scale: calc(1 / 1.127838);
}
:root[data-text-size="113"] {
  --text-scale: 1.127838;
}
:root[data-text-size="127"] {
  --text-scale: 1.272020;
  --align-scripture: start;
}
:root[data-text-size="144"] {
  --text-scale: 1.434598;
  --align-scripture: start;
}
:root[data-text-size="162"] {
  --text-scale: 1.618034;
  --align-scripture: start;
}

/* The App's screens: the same steps from its own base. */
:root.app {
  --step-0: var(--base-app);
}
