/* Gubae on the web.
 *
 * Two languages live in the same markup: every translated string is written
 * twice, once with data-lang="en" and once with data-lang="am", and the
 * <html lang> attribute decides which is drawn. No templating, nothing to go
 * wrong if the script fails -- the page stays in whichever language it was
 * served in.
 */

:root {
  color-scheme: light dark;

  /* ink */
  --ink: #15172b;
  --ink-2: #4b4a63;
  --ink-3: #78768f;

  /* ground */
  --bg: #fbfaff;
  --surface: #ffffff;
  --surface-2: #f3f1fa;
  --line: #e6e2f2;

  /* brand */
  --brand: #4b2fa8;
  --brand-ink: #ffffff;
  --brand-soft: #efe9ff;
  --accent: #b8762b;
  --gold: #e0a458;

  /* night, used by the dark panels in both themes */
  --night-1: #2d2152;
  --night-2: #1a1233;
  --night-3: #0f0a1e;

  --r-sm: 12px;
  --r-md: 18px;
  --r-lg: 26px;
  --r-xl: 34px;

  --shadow-1: 0 1px 2px rgba(21, 23, 43, .05), 0 2px 8px rgba(21, 23, 43, .04);
  --shadow-2: 0 2px 6px rgba(21, 23, 43, .06), 0 18px 40px rgba(21, 23, 43, .08);

  --ui: "Noto Sans Ethiopic", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --scripture: "Noto Serif Ethiopic", Georgia, "Times New Roman", serif;

  --gutter: 20px;
  --max: 1140px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #f3f1fb;
    --ink-2: #c3bed8;
    --ink-3: #928ca9;
    --bg: #0b0817;
    --surface: #151027;
    --surface-2: #1d1734;
    --line: #2b2446;
    --brand: #e0a458;
    --brand-ink: #1d1227;
    --brand-soft: #241b3d;
    --accent: #e0a458;
    --shadow-1: 0 1px 2px rgba(0, 0, 0, .5);
    --shadow-2: 0 2px 8px rgba(0, 0, 0, .5), 0 20px 48px rgba(0, 0, 0, .4);
  }
}
:root[data-theme="dark"] {
  --ink: #f3f1fb; --ink-2: #c3bed8; --ink-3: #928ca9;
  --bg: #0b0817; --surface: #151027; --surface-2: #1d1734; --line: #2b2446;
  --brand: #e0a458; --brand-ink: #1d1227; --brand-soft: #241b3d; --accent: #e0a458;
  --shadow-1: 0 1px 2px rgba(0, 0, 0, .5);
  --shadow-2: 0 2px 8px rgba(0, 0, 0, .5), 0 20px 48px rgba(0, 0, 0, .4);
}

* { box-sizing: border-box; }

/* An author rule like `display: flex` beats the browser's own rule for the
 * hidden attribute. State it once so hidden always means hidden. */
[hidden] { display: none !important; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important; animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--ui);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Whatever the page's language is, every other language's copy is hidden.
 * Adding a language is one more line here and one more <option>. */
html[lang="am"] [data-lang]:not([data-lang="am"]) { display: none; }
html[lang="en"] [data-lang]:not([data-lang="en"]) { display: none; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.narrow { max-width: 760px; }

a { color: inherit; }
img { max-width: 100%; }

h1, h2, h3, h4 { margin: 0; line-height: 1.15; letter-spacing: -.025em; font-weight: 800; }
h1 { font-size: clamp(2rem, 5vw, 3.1rem); }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.3rem); }
h3 { font-size: 1.08rem; letter-spacing: -.01em; }
p { margin: 0; }

.eyebrow {
  display: inline-block;
  font-size: .74rem; font-weight: 800; letter-spacing: .16em;
  text-transform: uppercase; color: var(--accent);
}
.lede { color: var(--ink-2); font-size: 1.06rem; }

.skip { position: absolute; left: -9999px; }
.skip:focus {
  position: fixed; left: 16px; top: 12px; z-index: 100;
  background: var(--surface); color: var(--ink); padding: 10px 14px;
  border-radius: var(--r-sm); border: 2px solid var(--brand);
}

/* ---------------------------------------------------------------- header */

.site-head {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.site-head .wrap { display: flex; align-items: center; gap: 10px; height: 76px; }

.brand { display: flex; align-items: center; text-decoration: none; flex: 0 0 auto; }
.brand img { height: 40px; width: auto; }
@media (max-width: 520px) { .brand img { height: 34px; } }
/* One mark at a time, wherever the pair appears -- header or footer.
 * Nothing else may set `display` on these, or it wins on specificity and
 * both are drawn. */
.on-light, .on-dark { display: block; }
.on-dark { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .on-light { display: none; }
  :root:not([data-theme="light"]) .on-dark { display: block; }
}
:root[data-theme="dark"] .on-light { display: none; }
:root[data-theme="dark"] .on-dark { display: block; }

.site-nav { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.nav-links { display: flex; align-items: center; gap: 2px; }
.nav-tools { display: flex; align-items: center; gap: 6px; }
/* The search icon sits up here with the other site-wide controls,
 * so it matches the theme switch rather than the reader bar. */
.nav-tools .icon-btn { width: 40px; height: 40px; box-shadow: none; }
.nav-tools .icon-btn svg { width: 18px; height: 18px; }
.site-nav a {
  padding: 9px 13px; border-radius: var(--r-sm); text-decoration: none;
  color: var(--ink-2); font-weight: 650; font-size: .93rem; white-space: nowrap;
}
.site-nav a:hover { color: var(--ink); background: var(--surface-2); }
.site-nav a[aria-current="page"] {
  color: var(--brand); background: var(--brand-soft);
}

/* The support heart: the one control that is an invitation rather than a
 * setting, so it carries the gold rather than the grey. */
.nav-heart { color: var(--gold); border-color: color-mix(in srgb, var(--gold) 45%, var(--line)); }
.nav-heart:hover { color: var(--gold); border-color: var(--gold); background: color-mix(in srgb, var(--gold) 12%, transparent); }
.nav-heart svg { width: 17px; height: 17px; }

/* Get it on Google Play.
 *
 * Google's own artwork, not a word in a purple pill. It is the picture
 * people already know from every other app site, so it does not have to
 * argue for itself. The badge may not be redrawn or recoloured, so
 * everything that makes it catch the eye -- the ring, the lift, the
 * shadow -- happens around it and never to it. */
.site-nav .nav-app {
  display: flex; align-items: center; flex: 0 0 auto;
  padding: 5px 9px; border-radius: 12px; line-height: 0;
  border: 1px solid color-mix(in srgb, var(--gold) 55%, var(--line));
  background: var(--surface);
  box-shadow: 0 2px 10px color-mix(in srgb, var(--gold) 22%, transparent);
  transition: transform .15s, box-shadow .15s, border-color .15s;
}
.site-nav .nav-app img { height: 36px; width: auto; display: block; }
.site-nav .nav-app:hover {
  transform: translateY(-1px); border-color: var(--gold);
  box-shadow: 0 6px 18px color-mix(in srgb, var(--gold) 38%, transparent);
}
.site-nav .nav-app:focus-visible {
  outline: none; border-color: var(--gold);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--gold) 35%, transparent);
}
/* The badge is black with a grey keyline, which disappears into a dark
 * header. It keeps a pale panel of its own there instead. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .site-nav .nav-app { background: #f2f0f8; border-color: color-mix(in srgb, var(--gold) 70%, #f2f0f8); }
}
:root[data-theme="dark"] .site-nav .nav-app { background: #f2f0f8; border-color: color-mix(in srgb, var(--gold) 70%, #f2f0f8); }

/* The support control, said out loud. An outlined heart on its own reads
 * as "add to favourites", which is the wrong thing to be asking. Filled,
 * gold, and with the word beside it, it reads as giving.
 *
 * Written as `.site-nav .nav-heart` throughout, because `.icon-btn` sets a
 * square 44px further down the file and would otherwise win on source
 * order, leaving the word hanging outside its own pill. */
.site-nav .nav-heart {
  width: auto; height: 44px; padding: 0 14px 0 11px; gap: 7px;
  color: var(--gold);
}
.site-nav .nav-heart:hover {
  color: var(--gold); border-color: var(--gold);
  background: color-mix(in srgb, var(--gold) 12%, transparent);
}
.site-nav .nav-heart svg { width: 17px; height: 17px; }
.nav-heart-text { font-weight: 700; font-size: .84rem; white-space: nowrap; }
@media (max-width: 1180px) {
  .site-nav .nav-heart { width: 44px; padding: 0; }
  .nav-heart-text { display: none; }
}

/* The settings, which are a row up here and a menu on a phone. One set of
 * controls serves both, so #theme-toggle and #lang-select stay unique and
 * site.js keeps working unchanged. `display: contents` is what lets the
 * rows disappear at this width. */
.nav-sheet { display: flex; align-items: center; gap: 6px; }
.sheet-row { display: contents; }
.sheet-label, .sheet-links { display: none; }
.nav-menu { display: none; }

/* The light/dark switch, built to match the language control beside it. */
.theme-toggle {
  display: flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; padding: 0; cursor: pointer;
  border: 1px solid var(--line); border-radius: 999px;
  background: var(--surface); color: var(--ink-2);
  transition: border-color .15s, color .15s;
}
.theme-toggle:hover { border-color: var(--brand); color: var(--brand); }
.theme-toggle:focus-visible {
  outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft);
}
.theme-toggle svg { width: 19px; height: 19px; }
@media (max-width: 760px) {
  .site-head .wrap {
    position: relative; flex-wrap: wrap; height: auto;
    padding-block: 10px; row-gap: 8px;
  }
  .site-nav { display: contents; }
  .nav-tools { margin-left: auto; order: 2; gap: 6px; }

  /* Row one is the mark and the one thing worth tapping. Row two is where
   * the site goes, with the heart pinned to the end of it, so giving stays
   * in sight even while the names scroll past. The width is set rather
   * than left to wrap, so the break happens on every phone and not only
   * on the narrow ones. */
  .nav-links {
    order: 3; width: calc(100% - 50px); flex: 0 0 auto;
    overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch;
  }
  .nav-links::-webkit-scrollbar { display: none; }
  .nav-links a { white-space: nowrap; padding-inline: 10px; }
  .site-nav .nav-heart { order: 4; width: 38px; height: 38px; padding: 0; }
  .site-nav .nav-heart svg { width: 16px; height: 16px; }

  .site-nav .nav-app { padding: 4px 7px; border-radius: 10px; }
  .site-nav .nav-app img { height: 32px; }

  .nav-menu {
    display: flex; align-items: center; justify-content: center;
    width: 40px; height: 40px; flex: 0 0 auto; padding: 0; cursor: pointer;
    border: 1px solid var(--line); border-radius: 999px;
    background: var(--surface); color: var(--ink-2);
  }
  .nav-menu svg { width: 20px; height: 20px; display: block; }
  .nav-menu-shut { display: none; }
  .nav-menu[aria-expanded="true"] { border-color: var(--brand); color: var(--brand); }
  .nav-menu[aria-expanded="true"] .nav-menu-open { display: none; }
  .nav-menu[aria-expanded="true"] .nav-menu-shut { display: block; }

  /* The panel hangs off the header rather than off the button, so it lines
   * up with the edge of the page at every width. */
  .nav-sheet {
    position: absolute; top: calc(100% + 6px);
    inset-inline-end: var(--gutter); z-index: 40;
    display: none; flex-direction: column; align-items: stretch; gap: 2px;
    min-width: 234px; padding: 8px; border-radius: 14px;
    border: 1px solid var(--line); background: var(--surface);
    box-shadow: 0 18px 40px rgba(16, 13, 33, .24);
  }
  .nav-sheet[data-open] { display: flex; }
  .sheet-row {
    display: flex; align-items: center; justify-content: space-between;
    gap: 12px; padding: 5px 8px;
  }
  .sheet-label {
    display: block; font-weight: 650; font-size: .9rem; color: var(--ink-2);
  }
  .sheet-links {
    display: flex; flex-direction: column; margin-top: 5px;
    padding-top: 6px; border-top: 1px solid var(--line);
  }
  .sheet-links a { padding: 9px 8px; font-size: .9rem; }

  .site-head .lang-select { font-size: .82rem; padding-inline: 12px 28px; }
}

.lang-select {
  font: inherit; font-size: .84rem; font-weight: 750;
  padding: 8px 30px 8px 13px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  cursor: pointer; appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%),
                    linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 15px) 52%, calc(100% - 10px) 52%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}
.lang-select:hover { border-color: var(--brand); color: var(--brand); }
.lang-select:focus-visible { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }

.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 13px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface);
  color: var(--ink); font: inherit; font-size: .84rem; font-weight: 750;
  cursor: pointer; white-space: nowrap;
}
.pill:hover { border-color: var(--brand); color: var(--brand); }

/* --------------------------------------------------------------- buttons */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 22px; border-radius: 999px; border: 1px solid transparent;
  font: inherit; font-weight: 750; font-size: .96rem; text-decoration: none;
  cursor: pointer; transition: transform .12s ease, filter .12s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--gold); color: #26190b; }
.btn-primary:hover { filter: brightness(1.07); }
.btn-solid { background: var(--brand); color: var(--brand-ink); }
.btn-solid:hover { filter: brightness(1.12); }
.btn-outline { background: var(--surface); border-color: var(--line); color: var(--ink); }
.btn-outline:hover { border-color: var(--brand); color: var(--brand); }
.btn-ghost { border-color: rgba(255,255,255,.34); color: #fff; }
.btn-ghost:hover { background: rgba(255,255,255,.12); }
.btn-sm { padding: 9px 15px; font-size: .88rem; }

.cta-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ----------------------------------------------------------------- hero */

.stage { max-width: var(--max); margin: var(--gutter) auto 0; padding: 0 var(--gutter); }

.deck {
  position: relative;
  border-radius: var(--r-xl);
  overflow: hidden;
  background: linear-gradient(140deg, var(--night-1), var(--night-2) 58%, var(--night-3));
  color: #fff;
  padding: clamp(30px, 4.5vw, 54px);
  display: grid;
  gap: clamp(28px, 4vw, 52px);
  align-items: center;
}
@media (min-width: 900px) { .deck { grid-template-columns: 1.08fr .92fr; } }

.deck::before {
  content: ""; position: absolute; width: 520px; height: 520px;
  right: -170px; top: -210px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(96, 120, 255, .26), transparent 68%);
}

.pitch { position: relative; z-index: 1; display: grid; gap: 14px; align-content: start; }
.pitch .eyebrow { color: var(--gold); }
.pitch h1 { max-width: 15ch; }
.pitch .meta { color: #cfc9e4; font-size: 1.02rem; max-width: 42ch; }
.pitch .cta-row { margin-top: 8px; align-items: center; }

/* The side that turns. The panels stack on top of each other, so the column
 * keeps one height instead of jumping as the content changes. */
.turner-col { position: relative; z-index: 1; display: grid; gap: 14px; }
.turner { position: relative; min-height: 340px; }
@media (max-width: 899px) { .turner { min-height: 310px; } }

.panel {
  position: absolute; inset: 0;
  display: grid; gap: 12px; align-content: center; justify-items: start;
  padding: clamp(20px, 2.6vw, 28px);
  border-radius: var(--r-lg);
  background: rgba(255, 255, 255, .07);
  border: 1px solid rgba(255, 255, 255, .16);
  backdrop-filter: blur(10px);
  opacity: 0; visibility: hidden; transform: translateX(22px) scale(.98);
  transition: opacity .5s ease, transform .5s ease, visibility .5s;
}
.panel.on { opacity: 1; visibility: visible; transform: none; }
.panel .eyebrow { color: var(--gold); }

.panel-shot {
  width: 100%; aspect-ratio: 16 / 8; object-fit: cover; display: block;
  border-radius: var(--r-md);
  border: 1px solid rgba(255, 255, 255, .12);
  background: rgba(0, 0, 0, .25);
}
.panel-title { font-size: clamp(1.1rem, 2vw, 1.35rem); line-height: 1.25; }
.panel-meta { color: #cfc9e4; font-size: .93rem; line-height: 1.5; }
.panel .quote {
  font-family: var(--scripture);
  font-size: clamp(1.02rem, 1.5vw, 1.2rem);
  line-height: 1.72;
}

.dots { display: flex; gap: 8px; justify-content: center; }
.dots button {
  width: 9px; height: 9px; padding: 0; border: 0; border-radius: 999px;
  background: rgba(255, 255, 255, .32); cursor: pointer;
  transition: width .2s, background .2s;
}
.dots button[aria-current="true"] { width: 26px; background: var(--gold); }

/* --------------------------------------------------------------- layout */

section { padding: clamp(44px, 7vw, 76px) 0; }
.section-head { margin-bottom: 26px; display: grid; gap: 10px; }
.section-head .lede { max-width: 56ch; }
.head-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

.grid { display: grid; gap: 16px; }
.cols-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.cols-3 { grid-template-columns: repeat(auto-fit, minmax(245px, 1fr)); }
.cols-4 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }

.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-md); padding: 22px; box-shadow: var(--shadow-1);
}
.card h3 { margin-bottom: 6px; }
.card p { color: var(--ink-2); font-size: .95rem; }
a.card { text-decoration: none; display: block; transition: transform .14s ease, box-shadow .14s ease, border-color .14s; }
a.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); border-color: var(--brand); }

.tile-icon {
  width: 42px; height: 42px; border-radius: var(--r-sm);
  display: grid; place-items: center; margin-bottom: 14px;
  background: var(--brand-soft); color: var(--brand); font-size: 1.2rem; font-weight: 800;
}

/* event cards */
.ev-card { overflow: hidden; padding: 0; display: flex; flex-direction: column; }
.ev-card .shot {
  width: 100%; aspect-ratio: 16 / 10; object-fit: cover; display: block;
  background: var(--surface-2);
}
.ev-card .body { padding: 18px 20px 22px; display: grid; gap: 7px; }
.ev-when {
  display: inline-flex; align-items: center; gap: 7px; align-self: start;
  background: var(--brand-soft); color: var(--brand);
  padding: 5px 11px; border-radius: 999px; font-size: .78rem; font-weight: 800;
}
.ev-card h3 { font-size: 1.05rem; }
.ev-where { color: var(--ink-3); font-size: .88rem; }

/* the screenshot rail */
.rail {
  display: flex; gap: 16px; overflow-x: auto;
  padding: 4px var(--gutter) 12px;
  scroll-snap-type: x mandatory;
  scrollbar-width: none; -ms-overflow-style: none;
}
.rail::-webkit-scrollbar { display: none; }
.rail figure { margin: 0; flex: 0 0 auto; width: 228px; scroll-snap-align: center; }
.rail img { width: 100%; height: auto; display: block; border-radius: var(--r-md); border: 1px solid var(--line); box-shadow: var(--shadow-1); }
.rail figcaption { margin-top: 10px; font-size: .85rem; color: var(--ink-2); text-align: center; }

/* the dark call-to-action band */
.band {
  border-radius: var(--r-xl); padding: clamp(34px, 6vw, 60px) clamp(22px, 5vw, 48px);
  background: linear-gradient(140deg, var(--night-1), var(--night-2) 58%, var(--night-3));
  color: #fff; text-align: center;
}
.band p { color: #cfc9e4; max-width: 54ch; margin: 12px auto 0; }
.band .cta-row { justify-content: center; margin-top: 24px; }

/* ---------------------------------------------------------------- footer */

.site-foot {
  margin-top: clamp(40px, 6vw, 72px);
  background: var(--surface-2);
  border-top: 1px solid var(--line);
  padding: clamp(40px, 6vw, 64px) 0 28px;
}
.foot-top { display: grid; gap: 34px; grid-template-columns: 1.4fr 1fr 1fr 1fr; }
@media (max-width: 860px) { .foot-top { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .foot-top { grid-template-columns: 1fr; } }
.foot-brand img { height: 32px; width: auto; }
.foot-brand p { color: var(--ink-3); font-size: .92rem; margin-top: 14px; max-width: 34ch; }
.site-foot h4 {
  font-size: .74rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink-3); margin-bottom: 14px; font-weight: 800;
}
.site-foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.site-foot a { text-decoration: none; font-size: .93rem; color: var(--ink-2); }
.site-foot a:hover { color: var(--brand); }
.foot-bottom {
  margin-top: 36px; padding-top: 22px; border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; gap: 10px 20px; justify-content: space-between;
  color: var(--ink-3); font-size: .87rem;
}

/* --------------------------------------------------- the reading screens */

/* How far down the page you are. */
.progress {
  position: fixed; inset: 0 auto auto 0; height: 3px; width: 0;
  background: linear-gradient(90deg, var(--brand), var(--gold));
  z-index: 60; transition: width .1s linear; pointer-events: none;
}

.reader-head {
  position: sticky; top: var(--head-h, 76px); z-index: 30;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.reader-bar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  padding: 11px 0;
}
.reader-bar #search { flex: 1 1 260px; }

/* Back and the text size on one row, the search box beneath them. */
@media (max-width: 560px) {
  .reader-bar #search { order: 3; flex: 1 1 100%; }
  .reader-bar .seg { margin-inline-start: auto; }
}
.reader-bar select, .reader-bar input {
  font: inherit; font-size: .92rem; font-weight: 600;
  padding: 10px 14px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  max-width: 100%; box-shadow: var(--shadow-1);
  transition: border-color .15s, box-shadow .15s;
}
.reader-bar select { cursor: pointer; padding-inline-end: 34px; }
.reader-bar select:hover, .reader-bar input:hover { border-color: var(--brand); }
.reader-bar input:focus-visible, .reader-bar select:focus-visible {
  outline: none; border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-soft);
}

/* A search box folded down to its icon, for when the words matter more. */
.icon-btn {
  display: flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; flex: 0 0 auto; padding: 0; cursor: pointer;
  border: 1px solid var(--line); border-radius: 999px;
  background: var(--surface); color: var(--ink-2); box-shadow: var(--shadow-1);
  transition: border-color .15s, color .15s;
}
.icon-btn:hover { border-color: var(--brand); color: var(--brand); }
.icon-btn:focus-visible {
  outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft);
}
.icon-btn svg { width: 19px; height: 19px; }

.seg {
  display: inline-flex; border: 1px solid var(--line); border-radius: 999px;
  overflow: hidden; background: var(--surface); box-shadow: var(--shadow-1);
}
.seg button {
  font: inherit; font-size: .87rem; font-weight: 750;
  padding: 10px 15px; border: 0; background: transparent;
  color: var(--ink-3); cursor: pointer; transition: color .15s, background .15s;
}
.seg button:hover { color: var(--ink); }
.seg button[aria-pressed="true"] { background: var(--brand); color: var(--brand-ink); }

/* ------------------------------------------------------------ the page */

.reader { padding: 40px 0 10px; }
.reader .wrap.narrow { max-width: 720px; }

/* Where you are, and the way back out. */
.crumbs {
  display: flex; flex-wrap: wrap; align-items: center; gap: 4px;
  margin-bottom: 26px; padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
  font-size: .95rem; font-weight: 650; color: var(--ink-3);
}
.crumbs a {
  color: var(--ink-2); text-decoration: none;
  padding: 4px 8px; margin: -4px 0; border-radius: 9px;
  transition: color .15s, background-color .15s;
}
.crumbs a:hover { color: var(--brand); background: var(--brand-soft); }
.crumbs a:focus-visible {
  outline: none; color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft);
}
/* The way back, in front of the path. A round arrow rather than a
 * word, because the name it points at says where it goes. */
.crumbs .crumb-back {
  display: inline-flex; align-items: center; justify-content: center;
  width: 31px; height: 31px; flex: 0 0 auto;
  margin: -4px 4px -4px 0; padding: 0;
  border: 1px solid var(--line); border-radius: 999px;
  font-size: 1rem; line-height: 1; color: var(--ink-2);
}
.crumbs .crumb-back:hover { border-color: var(--brand); }
.crumbs .sep { opacity: .55; }
.crumbs [aria-current="page"] { color: var(--ink); padding: 4px 4px; }

/* Reading a hymn: everything above the words is pulled in close. */
.reader.song-mode { padding-top: 16px; }
/* The way out stays in sight for as long as the hymn is open. */
.reader.song-mode .crumbs {
  position: sticky; top: var(--head-h, 76px); z-index: 25;
  margin-bottom: 16px; padding: 12px 0 11px;
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: saturate(160%) blur(14px);
}

.chapter-title {
  font-family: var(--scripture);
  font-size: clamp(1.7rem, 3.6vw, 2.5rem);
  font-weight: 600; letter-spacing: -.01em; line-height: 1.2;
  margin-bottom: 12px;
}
.chapter-sub {
  color: var(--ink-3); font-size: .86rem; font-weight: 650;
  letter-spacing: .07em; text-transform: uppercase;
  margin-bottom: 30px; padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}

.verses {
  font-family: var(--scripture);
  font-size: var(--read-size, 1.14rem);
  line-height: 2.1;
  color: color-mix(in srgb, var(--ink) 92%, var(--ink-2));
  max-width: 34em;
}
.verses p { margin: 0 0 1.1em; scroll-margin-top: 150px; }
.vnum {
  font-family: var(--ui); font-size: .62em; font-weight: 800;
  color: var(--accent); margin-inline-end: .5em;
  vertical-align: .55em; user-select: none; -webkit-user-select: none;
}
.verses p.hit, .verses p:target {
  background: var(--brand-soft);
  box-shadow: 0 0 0 10px var(--brand-soft);
  border-radius: 3px;
}

.pager { display: flex; justify-content: space-between; gap: 12px; margin-top: 52px; }
.pager .btn { border-radius: 999px; }
.loading, .empty { color: var(--ink-3); padding: 48px 0; text-align: center; }

.reader-foot {
  margin: 56px 0 10px;
  background: linear-gradient(140deg, var(--night-1), var(--night-2) 60%, var(--night-3));
  color: #fff; border: 0;
  border-radius: var(--r-lg); padding: 26px;
  display: flex; flex-wrap: wrap; align-items: center; gap: 16px;
  box-shadow: var(--shadow-2);
}
.reader-foot img { width: 46px; height: 46px; border-radius: var(--r-sm); }
.reader-foot div { flex: 1 1 240px; }
.reader-foot p { color: #cfc9e4; font-size: .92rem; margin-top: 4px; }

/* ------------------------------ the pages written out for search engines */

/* A row that is a link rather than a button still needs to look like a row. */
.results > a { display: block; text-decoration: none; }

/* A book's chapters, as a page of their own: tiles rather than a column. */
.chapter-nums.book-page {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(54px, 1fr));
  gap: 6px; margin-top: 22px; padding: 0; overflow: visible; max-height: none;
}
.chapter-nums.book-page a {
  display: flex; align-items: center; justify-content: center;
  padding: 13px 0; border: 1px solid var(--line); border-radius: 11px;
  background: var(--surface); color: var(--ink-2);
  font-weight: 650; text-decoration: none;
  transition: border-color .15s, color .15s;
}
.chapter-nums.book-page a:hover { border-color: var(--brand); color: var(--brand); }

/* The hymn, written out: no sheet tools, so the title sits at the top. */
.reader.song-mode .song-sheet { margin-top: 0; }

.all-link { margin: 26px 0 6px; font-size: .92rem; font-weight: 650; }
.all-link a { color: var(--brand); text-decoration: none; }
.all-link a:hover { text-decoration: underline; }
.bible-tools .all-link { margin: 0; font-size: .88rem; }

/* A singer's hymns, gathered under the album they came from -- four
 * sleeves across, each with its own tracks under it, which is how a record
 * reads and how somebody after one song in one album finds it.
 *
 * padding: 0 is not decoration. Every <section> on this site carries 44-76px
 * top and bottom, which is right for the landing page and was putting a
 * hand's width of nothing above the first album name here. */
.album-columns {
  display: grid; gap: 22px 20px;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}
.album-col { padding: 0; min-width: 0; }
.group-head {
  display: flex; align-items: baseline; gap: 8px;
  margin-bottom: 8px; padding-bottom: 7px;
  border-bottom: 1px solid var(--line);
  font-size: .92rem; font-weight: 750; color: var(--ink);
  line-height: 1.3;
}
.group-head a { color: var(--brand); text-decoration: none; }
.group-head a:hover { text-decoration: underline; }
.group-count {
  margin-inline-start: auto; flex: 0 0 auto;
  font-size: .74rem; font-weight: 700; color: var(--ink-3);
}

/* A track listing, not a stack of cards: at four across there is no room
 * for a border round every line, and no need for one. */
.album-songs { display: grid; gap: 1px; }
.album-songs a {
  display: block; padding: 7px 9px; border-radius: 9px;
  color: var(--ink-2); text-decoration: none; font-size: .88rem;
  font-weight: 600; line-height: 1.3;
  transition: background-color .15s, color .15s;
}
.album-songs a:hover { background: var(--brand-soft); color: var(--brand); }
.album-songs .row-name { display: block; }
.album-songs .row-alt {
  display: block; margin-top: 1px; font-size: .76rem;
  font-weight: 500; color: var(--ink-3);
}
.album-songs a:hover .row-alt { color: inherit; opacity: .75; }

/* The singer's own albums, in the column that was half empty. */
.rail-more-head {
  margin: 22px 0 8px; font-size: .76rem; letter-spacing: .09em;
  text-transform: uppercase; font-weight: 750; color: var(--ink-3);
}

@media (min-width: 1000px) {
  /* Four at most, however wide the screen: five columns of hymn titles is
   * a wall of text rather than a listing. */
  .album-columns { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
  .album-columns { max-width: 100%; }
}

/* The alphabet, across the top of the hymns. Ethiopic first, then the
 * names only written in Latin -- the order the alphabet is recited. */
.az {
  display: flex; flex-wrap: wrap; gap: 4px; margin: -4px 0 20px;
}
.az a {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 36px; padding: 6px 8px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--surface);
  color: var(--ink-2); font-weight: 700; font-size: .92rem;
  text-decoration: none; transition: border-color .15s, color .15s;
}
.az a:hover { border-color: var(--brand); color: var(--brand); }
.az a[aria-current="true"] {
  background: var(--brand); border-color: var(--brand); color: var(--brand-ink);
}

/* ------------------------------------------------------- supporting Gubae */

.give-section { margin-top: 34px; padding: 0; }
.give-section h2 { font-size: 1.12rem; font-weight: 750; margin-bottom: 8px; }
.give-section p { color: var(--ink-2); line-height: 1.75; max-width: 46em; }
.give-note { font-size: .92rem; }
.give-section .btn { margin-top: 12px; }
.give-via {
  display: inline-block; margin-inline-start: 12px;
  font-size: .86rem; color: var(--ink-3);
}
.give-rule { border: 0; border-top: 1px solid var(--line); margin: 44px 0 0; }

.give-cards {
  display: grid; gap: 12px; margin-top: 14px;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
}
.give-card {
  border: 1px solid var(--line); border-left: 4px solid var(--give, var(--brand));
  border-radius: var(--r-md); padding: 16px 18px;
  background: var(--surface); box-shadow: var(--shadow-1);
}
.give-top { display: flex; align-items: center; gap: 10px; }
.give-logo { width: 32px; height: 32px; flex: 0 0 auto; object-fit: contain; }
.give-name { font-weight: 750; color: var(--give, var(--brand)); line-height: 1.25; }

.give-number {
  display: flex; align-items: center; gap: 10px; margin-top: 12px;
}
.give-number code {
  font-family: inherit; font-size: 1.22rem; font-weight: 750;
  letter-spacing: .06em; color: var(--ink); user-select: all;
}
/* The dots are narrower than the digits they stand for, so each card
 * reserves room for its own number -- one floor for both left a hand's
 * width of nothing beside the shorter one. */
.give-number code { display: inline-block; min-width: calc(var(--digits, 13) * .78em); }
.give-eye { width: 36px; height: 36px; box-shadow: none; }
.give-eye svg { width: 17px; height: 17px; }
.give-eye[aria-pressed="true"] { border-color: var(--brand); color: var(--brand); }

.give-holder {
  margin-top: 8px; font-size: .88rem; font-weight: 700; color: var(--ink-2);
}
.give-label {
  display: block; font-size: .66rem; letter-spacing: .09em;
  text-transform: uppercase; font-weight: 750; color: var(--ink-3);
  margin-bottom: 1px;
}
.give-copy { margin-top: 14px; padding: 8px 18px; font-size: .86rem; border-radius: 999px; }

.give-verse {
  margin-top: 40px; padding: 20px 24px;
  border-inline-start: 3px solid var(--gold); border-radius: 0 var(--r-md) var(--r-md) 0;
  background: var(--surface-2);
}
.give-verse p {
  font-family: var(--scripture); font-size: 1.04rem; line-height: 1.8; color: var(--ink);
}
.give-verse cite {
  display: block; margin-top: 8px; font-style: normal;
  font-size: .84rem; font-weight: 700; color: var(--ink-3);
}

/* ---------------------------------------------------------- the About page */

/* A line of text 1,400 pixels wide is not read, it is skimmed and left. The
 * giving page already settles on 46em for running prose; this follows it.
 * Scoped to .doc-body, which only this page carries, so the copyright and
 * terms pages are left exactly as they are. */
.doc-body p, .doc-body li { max-width: 46em; }
.doc-body h3 {
  font-size: 1.02rem; font-weight: 750; margin: 22px 0 4px;
  color: var(--brand);
}
.doc-body h3 + p { margin-top: 0; }
.about-links { list-style: none; padding: 0; margin: 10px 0 0; }
.about-links li { padding: 5px 0; color: var(--ink-2); }
.about-links a { font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.about-links a:hover { color: var(--brand); }

/* ------------------------------------------------------- end the About page */

/* ----------------------------------------------------- the Bible page */

.reader.bible { padding-top: 26px; }
.reader.bible .wrap { max-width: 1180px; }

/* One column by default: where you are, the tools, then the chapter. */
.bible-layout { display: flex; flex-direction: column; gap: 18px; }
.bible-passage { order: 1; }
.bible-tools { order: 2; }
.bible-main { order: 3; }

/* --- choosing a passage */

/* On a narrow screen the picker folds shut behind a button that says where
 * you are. On a wide one the button is not needed and the panel is simply
 * there. */
.side-toggle {
  display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap;
  width: 100%; font: inherit; text-align: start; cursor: pointer;
  padding: 12px 16px; border-radius: var(--r-md);
  border: 1px solid var(--line); background: var(--surface);
  box-shadow: var(--shadow-1); color: var(--ink);
}
.side-toggle:hover { border-color: var(--brand); }
.side-toggle-label {
  font-size: .76rem; letter-spacing: .09em; text-transform: uppercase;
  font-weight: 750; color: var(--ink-3);
}
.side-toggle-now { font-weight: 700; margin-inline-start: auto; }

.side-panel { display: none; margin-top: 10px; }
.bible-passage.open .side-panel { display: block; }

.testament {
  display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px;
  border: 1px solid var(--line); border-radius: var(--r-md);
  background: var(--surface-2); margin-bottom: 10px;
}
.testament button {
  font: inherit; font-size: .86rem; font-weight: 700; cursor: pointer;
  padding: 10px 8px; border: 0; border-radius: 11px;
  background: transparent; color: var(--ink-2);
  transition: background-color .18s, color .18s;
}
.testament button[aria-pressed="true"] { background: var(--brand); color: var(--brand-ink); }

/* Books on the left, their chapters in a column on the right, each
 * scrolling on its own -- the shape the app uses. */
.passage-panes {
  display: grid; grid-template-columns: minmax(0, 1fr) 62px;
  border: 1px solid var(--line); border-radius: var(--r-md);
  background: var(--surface); overflow: hidden;
}
.book-list { display: grid; align-content: start; gap: 1px; padding: 6px; position: relative; }
.chapter-col {
  display: flex; flex-direction: column; min-height: 0;
  border-inline-start: 1px solid var(--line); background: var(--surface-2);
}
.chapter-col h3 {
  padding: 11px 0 7px; text-align: center;
  font-size: .62rem; letter-spacing: .14em; text-transform: uppercase;
  font-weight: 800; color: var(--ink-3);
}
.passage-panes > * { min-height: 0; }
.chapter-nums {
  display: grid; align-content: start; gap: 1px;
  flex: 1 1 auto; min-height: 0; position: relative;
  padding: 0 6px 6px; overflow-y: auto; scrollbar-width: thin;
}
.chapter-nums > a { text-decoration: none; display: block; }
.chapter-nums button, .chapter-nums > a {
  font: inherit; font-size: .84rem; font-weight: 650; cursor: pointer;
  padding: 7px 0; border: 0; border-radius: 8px;
  background: none; color: var(--ink-2); text-align: center;
  transition: background-color .15s, color .15s;
}
.chapter-nums button:hover, .chapter-nums > a:hover { background: var(--brand-soft); color: var(--brand); }
.chapter-nums button[aria-current="true"], .chapter-nums > a[aria-current="true"] {
  background: var(--brand); color: var(--brand-ink);
}
.book-list .book {
  display: flex; align-items: center; gap: 9px; width: 100%;
  font: inherit; text-align: start; cursor: pointer;
  padding: 8px 10px; border: 0; border-radius: 11px;
  background: none; color: var(--ink-2);
  transition: background-color .15s, color .15s;
}
.book-list .book .bar {
  width: 4px; height: 24px; flex: 0 0 auto; border-radius: 2px;
  background: transparent;
}
.book-list .book .book-name { display: block; font-size: .92rem; font-weight: 600; line-height: 1.25; }
.book-list .book small {
  display: block; margin-top: 1px; font-size: .76rem; font-weight: 500;
  color: var(--ink-3);
}
.book-list .book:hover { background: var(--surface-2); color: var(--ink); }
.book-list .book[aria-current="true"] {
  background: var(--brand-soft); color: var(--brand);
}
.book-list .book[aria-current="true"] .bar { background: var(--gold); }
.book-list .book[aria-current="true"] small { color: inherit; opacity: .7; }


/* --- the tools */

/* Side by side on a narrow screen, stacked when they are a column. */
.bible-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.bible-tools .tool { display: flex; align-items: center; gap: 8px; }
.bible-tools .tool-search { flex: 1 1 240px; }
.bible-tools .tool-search input { flex: 1 1 auto; }
.bible-tools h2 {
  font-size: .76rem; letter-spacing: .09em; text-transform: uppercase;
  font-weight: 750; color: var(--ink-3);
}
.bible-tools input {
  font: inherit; font-size: .92rem; font-weight: 600; width: 100%;
  padding: 10px 14px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  box-shadow: var(--shadow-1); transition: border-color .15s, box-shadow .15s;
}
.bible-tools input:hover { border-color: var(--brand); }
.bible-tools input:focus-visible {
  outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft);
}

/* --- the chapter, and turning the page */

.bible-main .chapter-title { margin-bottom: 8px; }
.pager-top { margin: 0 0 20px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.pager-top .btn { padding: 8px 16px; font-size: .86rem; }

@media (max-width: 1179px) {
  .passage-panes { height: 62vh; }
  .book-list { overflow-y: auto; scrollbar-width: thin; }
  /* Said aloud, not drawn: "Amharic / English" and "A- A+" need no caption,
   * and the search box has its placeholder. */
  .bible-tools h2 {
    position: absolute; width: 1px; height: 1px; overflow: hidden;
    clip-path: inset(50%); white-space: nowrap;
  }
  .pager-top { margin-bottom: 14px; padding-bottom: 12px; }
}

/* A chapter page, on a phone: the picker and the tools both fold, and the
 * breadcrumb goes -- the picker button directly above it already says
 * "ኦሪት ዘፍጥረት 1", and saying it three times before the first verse costs a
 * fifth of the screen. The trail is still in the page's structured data,
 * which is what a search engine reads it from. */
@media (max-width: 1179px) {
  .bible-tools .side-panel { display: none; }
  .bible-tools.open .side-panel { display: block; margin-top: 10px; }
  .bible-tools { display: block; }
  .bible-tools .tool { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
  .bible-tools .tool h2 { position: static; width: auto; height: auto; clip-path: none; }
  .bible-tools .tool-search { display: block; }
  .reader.bible .bible-main > .crumbs { display: none; }
  .reader.bible .pager-top { margin-top: 2px; }
}

@media (min-width: 1180px) {
  .bible-layout {
    display: grid; align-items: start; justify-content: center; gap: 22px;
    grid-template-columns: 262px minmax(0, 640px) 192px;
  }
  .bible-passage { order: 1; }
  .bible-main { order: 2; }
  .bible-tools { order: 3; }

  /* The button is only a way of opening something that is already open. */
  .side-toggle { display: none; }
  .side-panel { display: block; margin-top: 0; }
  .bible-passage, .bible-tools {
    position: sticky; top: calc(var(--head-h, 76px) + 20px);
  }
  .passage-panes { height: calc(100vh - var(--head-h, 76px) - 150px); }
  .book-list { overflow-y: auto; scrollbar-width: thin; }

  .bible-tools { display: block; }
  .bible-tools .tool { display: block; margin-bottom: 18px; }
  .bible-tools .tool h2 { margin-bottom: 7px; }
  .bible-tools .seg { width: 100%; }
  .bible-tools .seg button { flex: 1 1 0; }
}

/* ------------------------------------------------- a page that is a list */

/* Back, the name and the count on one line. */
.page-head {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 16px;
  margin-bottom: 20px; padding-bottom: 15px;
  border-bottom: 1px solid var(--line);
}
.page-head .chapter-title {
  font-size: clamp(1.4rem, 2.5vw, 1.9rem); margin-bottom: 0;
}
.page-head .chapter-sub { margin-bottom: 0; padding-bottom: 0; border-bottom: 0; }
.page-head #up {
  align-self: center; padding: 7px 15px; font-size: .85rem;
}

/* The search box lines up with the rows rather than with the screen. */
.lyrics-head .wrap { max-width: 1192px; }

/* The rows take the width in columns instead of a single file down the
 * middle, and each one is a little shorter. */
.reader.list-mode .results {
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  gap: 9px;
}
.reader.list-mode .results button,
.reader.list-mode .results > a { padding: 11px 34px 11px 15px; }
.reader.list-mode .results .ref { margin-bottom: 2px; font-size: .72rem; }
.reader.list-mode .results .row-alt { margin-top: 1px; font-size: .82rem; }
.reader.list-mode .results button::after,
.reader.list-mode .results > a::after { inset-inline-end: 14px; }

.reader.list-mode { padding-top: 26px; }
.reader.list-mode .wrap.narrow { max-width: 1192px; }

/* The lists, with a way across to the other two beside them. On a narrow
 * screen the three become a row of chips above the list instead. */
.list-layout { display: block; }
.list-rail { margin-bottom: 16px; }
.list-rail .rail-list { display: flex; flex-wrap: wrap; gap: 6px; }
.list-rail .rail-list button {
  width: auto; border: 1px solid var(--line); background: var(--surface);
}

@media (min-width: 1000px) {
  .list-layout {
    display: grid; align-items: start; gap: 22px;
    grid-template-columns: 196px minmax(0, 1fr);
  }
  .list-rail {
    position: sticky; top: calc(var(--head-h, 76px) + 18px); margin-bottom: 0;
  }
  .list-rail .rail-list { display: grid; gap: 2px; }
  .list-rail .rail-list button { width: 100%; border: 0; background: none; }
}

/* ------------------------------------ either side of an open hymn */

/* Stacked by default: the hymn, then the album, then the singer. Only on a
 * screen wide enough to hold all three does it become three columns. */
.song-layout { display: flex; flex-direction: column; gap: 22px; }
.song-layout .song-sheet { order: 1; }
.song-rail-left { order: 2; }
.song-rail-right { order: 3; }

.song-rail { border-top: 1px solid var(--line); padding-top: 18px; }
.song-rail h2, .list-rail h2 {
  font-size: .76rem; letter-spacing: .09em; text-transform: uppercase;
  color: var(--ink-3); font-weight: 750; margin-bottom: 10px;
}
.rail-list { display: grid; gap: 2px; }
.rail-list button, .rail-list a {
  text-decoration: none;
  display: flex; align-items: baseline; gap: 8px; width: 100%;
  text-align: start; font: inherit; cursor: pointer;
  background: none; border: 0; border-radius: 10px; padding: 8px 10px;
  color: var(--ink-2); font-size: .9rem; font-weight: 600; line-height: 1.35;
  transition: color .15s, background-color .15s;
}
.rail-list button:hover { color: var(--brand); background: var(--brand-soft); }
.rail-list button:focus-visible {
  outline: none; color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft);
}
.rail-list [aria-current="true"] { color: var(--ink); background: var(--surface-2); }
.rail-count { margin-inline-start: auto; color: var(--ink-3); font-size: .8rem; }
.rail-more {
  display: inline-block; margin-top: 8px; padding: 4px 10px;
  font-size: .85rem; font-weight: 650; color: var(--brand); text-decoration: none;
}
.rail-more:hover { text-decoration: underline; }
.rail-app { margin-top: 16px; }
@media (max-width: 1199px) { .rail-app { display: none; } }

@media (min-width: 1200px) {
  .reader.song-mode .wrap.narrow { max-width: 1192px; }
  .song-layout {
    display: grid; align-items: start; justify-content: center; gap: 22px;
    grid-template-columns: 202px minmax(0, 700px) 202px;
  }
  .song-layout .song-sheet { order: 2; }
  .song-rail-left { order: 1; }
  .song-rail-right { order: 3; }
  /* The columns keep pace with the hymn rather than scrolling off it. */
  .song-rail {
    position: sticky;
    top: calc(var(--head-h, 76px) + var(--crumb-h, 56px) + 16px);
    max-height: calc(100vh - var(--head-h, 76px) - var(--crumb-h, 56px) - 36px);
    overflow-y: auto; scrollbar-width: thin;
    border-top: 0; padding-top: 4px;
  }
}

/* ------------------------------------------------------------ the lists */

.results { display: grid; gap: 8px; }
.results button, .results > a {
  position: relative; text-align: start; font: inherit; cursor: pointer;
  width: 100%; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-md); padding: 15px 42px 15px 18px; color: var(--ink);
  font-weight: 600;
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.results button::after, .results > a::after {
  content: "›"; position: absolute; inset-inline-end: 18px; top: 50%;
  transform: translateY(-55%); color: var(--ink-3); font-size: 1.3rem;
  transition: inset-inline-end .15s, color .15s;
}
.results button:hover, .results > a:hover {
  border-color: var(--brand); box-shadow: var(--shadow-1); transform: translateY(-1px);
}
.results button:hover::after, .results > a:hover::after { inset-inline-end: 14px; color: var(--brand); }
.results .ref {
  display: block; font-size: .74rem; font-weight: 800; color: var(--accent);
  letter-spacing: .06em; text-transform: uppercase; margin-bottom: 4px;
}
.results .row-name { display: block; }
.results .row-alt {
  display: block; margin-top: 3px; font-weight: 500; font-size: .86rem;
  color: var(--ink-3); letter-spacing: 0; text-transform: none;
}
.song-head .song-alt {
  margin: -2px 0 10px; font-size: .95rem; font-weight: 500; color: var(--ink-3);
}
.results mark {
  background: var(--brand-soft); color: inherit;
  border-radius: 4px; padding: 0 2px;
}

/* ------------------------------------------------------------- the songs */

.song-sheet {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-xl); padding: clamp(20px, 3.2vw, 38px);
  box-shadow: var(--shadow-2); position: relative; overflow: hidden;
  text-align: center;
}

/* A- A+ in the top corner of the sheet. A row of its own rather than a
 * corner pinned over the title, which a long title would run into. */
.sheet-tools {
  display: flex; justify-content: flex-end;
  margin: -4px -4px 4px 0;
}
.song-sheet::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 4px;
  background: linear-gradient(90deg, var(--brand), var(--gold));
}

/* The title block above the words. */
.song-head { margin-bottom: 20px; }
.song-head h1 {
  font-family: var(--scripture); font-weight: 600;
  font-size: clamp(1.4rem, 3vw, 1.9rem); line-height: 1.2;
  letter-spacing: -.01em;
}
.song-head .by {
  margin-top: 10px; color: var(--ink-3);
  font-size: .82rem; font-weight: 700;
  letter-spacing: .09em; text-transform: uppercase;
}
.song-head::after {
  content: ""; display: block; width: 46px; height: 3px; border-radius: 3px;
  margin: 15px auto 0;
  background: linear-gradient(90deg, var(--brand), var(--gold));
}

.song-words {
  font-family: var(--scripture);
  font-size: var(--read-size, 1.14rem);
  line-height: 2.15;
  color: color-mix(in srgb, var(--ink) 92%, var(--ink-2));
  max-width: 30em; margin: 0 auto;
  text-align: center;
  text-wrap: balance;
}
.song-words p { margin: 0 0 2em; white-space: pre-line; }
.song-words p:last-child { margin-bottom: 0; }

/* The chorus, lifted off the page the way it lifts in the singing. */
.song-words p.chorus {
  background: var(--brand-soft);
  border-radius: var(--r-md);
  padding: 22px 26px;
  font-weight: 600;
  margin-inline: -8px;
}
.song-words p.chorus::before {
  content: attr(data-label);
  display: block; margin-bottom: 8px;
  font-family: var(--ui); font-size: .68rem; font-weight: 800;
  letter-spacing: .14em; text-transform: uppercase; color: var(--brand);
}

.song-actions {
  display: flex; flex-wrap: wrap; gap: 10px; justify-content: center;
  margin-top: 38px; padding-top: 28px; border-top: 1px solid var(--line);
}

/* --------------------------------------------------------- the odds left */

.play-badge { display: inline-block; line-height: 0; }
.play-badge img { height: 54px; width: auto; display: block; }
.play-badge:hover img { filter: brightness(1.08); }
.foot-badge { margin-top: 18px; }
.foot-badge img { height: 46px; }
.maker { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line); }
.maker:hover { color: var(--brand); text-decoration-color: currentColor; }
@media (max-width: 480px) { .play-badge img { height: 48px; } }

/* The inline icons take the colour of the text beside them, so one glyph is
 * right on a light card and on the dark hero alike. */
.icon { width: 1.05em; height: 1.05em; flex: 0 0 auto; }
.btn .icon { margin-inline-end: -2px; }


/* ------------------------------------------- the install banner, on a phone
 *
 * Built by site.js and only on a narrow screen. The rules are here rather
 * than inline so it follows the theme like everything else, and so the room
 * it takes at the bottom of the page is reserved by the same stylesheet that
 * draws it.
 */
.app-banner {
  position: fixed; inset-inline: 0; bottom: 0; z-index: 60;
  display: flex; align-items: center; gap: 10px;
  padding: 10px var(--gutter);
  padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
  background: var(--surface); border-top: 1px solid var(--line);
  box-shadow: 0 -2px 14px rgba(21, 23, 43, .10);
}
.app-banner-icon { border-radius: 9px; flex: 0 0 auto; }
.app-banner-text {
  margin: 0; flex: 1 1 auto; min-width: 0;
  font-size: .82rem; font-weight: 650; line-height: 1.3; color: var(--ink);
}
.app-banner-cta {
  flex: 0 0 auto; text-decoration: none; white-space: nowrap;
  background: var(--brand); color: var(--brand-ink);
  padding: 9px 14px; border-radius: 999px;
  font-size: .85rem; font-weight: 750;
}
.app-banner-cta:hover { filter: brightness(1.08); }
.app-banner-close {
  flex: 0 0 auto; width: 30px; height: 30px; padding: 6px;
  background: none; border: 0; border-radius: 50%;
  color: var(--ink-3); cursor: pointer;
}
.app-banner-close:hover { color: var(--ink); background: var(--surface-2); }
.app-banner-close svg { width: 100%; height: 100%; }

/* The room it takes, so it can never cover the last line of a hymn or the
 * footer. On the documentElement because site.js sets it before the banner
 * is in the tree, and removed again the moment it is dismissed. */
:root[data-app-banner="on"] body { padding-bottom: 72px; }

/* Wider than a phone it is not built at all; this is the belt to that
 * braces, for a window resized after the page loaded. */
@media (min-width: 769px) {
  .app-banner { display: none; }
  :root[data-app-banner="on"] body { padding-bottom: 0; }
}
