/* Advent Hymnals public site. Everything is scoped under .ah-site so it sits
   inside any host (frontendv1, the static export) without leaking. */

:root {
  --ah-bg: #fbf8f2;
  --ah-paper: #ffffff;
  --ah-ink: #1f1b16;
  --ah-soft: #5f574d;
  --ah-faint: #8d8478;
  --ah-line: #e8e1d5;
  --ah-tint: #f4eee3;
  --ah-accent: #772832;
  --ah-accent-ink: #ffffff;
  --ah-accent-soft: #f6e7e8;
  --ah-gold: #b8892d;
  --ah-live: #2f7d5b;
  --ah-band: #1d2a2a;
  --ah-band-ink: #f3ede2;
  --ah-serif: "Fraunces", "Iowan Old Style", Georgia, serif;
  --ah-text: "Source Serif 4", "Iowan Old Style", Georgia, serif;
  --ah-sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --ah-radius: 14px;
  --ah-shadow: 0 1px 2px rgb(31 27 22 / 5%), 0 6px 24px rgb(31 27 22 / 6%);
}
/* Light is the default; dark only when the visitor picks it */
:root[data-ah-theme="dark"] {
    --ah-bg: #14120f;
    --ah-paper: #1c1915;
    --ah-ink: #eee7da;
    --ah-soft: #b9ae9e;
    --ah-faint: #8a8174;
    --ah-line: #302b25;
    --ah-tint: #221e19;
    --ah-accent: #e0868f;
    --ah-accent-ink: #1a1012;
    --ah-accent-soft: #3a2124;
    --ah-gold: #d9ad55;
    --ah-live: #6cc49b;
    --ah-band: #0e1617;
    --ah-shadow: 0 1px 2px rgb(0 0 0 / 30%), 0 8px 28px rgb(0 0 0 / 30%);
  }

.ah-site {
  background: var(--ah-bg);
  color: var(--ah-ink);
  font: 16px/1.55 var(--ah-sans);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}
.ah-site main { flex: 1; }
.ah-site *, .ah-site *::before, .ah-site *::after { box-sizing: border-box; }
/* element defaults carry no weight, so any class below wins over them */
:where(.ah-site) :where(a) { color: inherit; }
:where(.ah-site) :where(h1, h2, h3) { font-family: var(--ah-serif); font-weight: 600; letter-spacing: -0.01em; line-height: 1.15; margin: 0; }
:where(.ah-site) :where(p) { margin: 0; }
.ah-site :focus-visible { outline: 3px solid var(--ah-gold); outline-offset: 2px; border-radius: 6px; }
.ah-wrap { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .ah-wrap { padding: 0 28px; } }
.ah-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ah-skip { position: absolute; left: -9999px; top: 8px; z-index: 50; background: var(--ah-ink); color: var(--ah-bg); padding: 8px 14px; border-radius: 8px; }
.ah-skip:focus { left: 8px; }

/* ---------- buttons, chips */
.ah-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 42px; padding: 0 18px; border-radius: 999px; border: 1px solid transparent;
  font: 600 15px/1 var(--ah-sans); text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background .15s, border-color .15s, transform .1s;
}
.ah-btn:active { transform: translateY(1px); }
.ah-btn-primary { background: var(--ah-accent); color: var(--ah-accent-ink); }
.ah-btn-primary:hover { filter: brightness(1.08); }
.ah-btn-quiet { background: transparent; color: var(--ah-ink); border-color: var(--ah-line); }
.ah-btn-quiet:hover { background: var(--ah-tint); }
.ah-btn-quiet.is-on { color: var(--ah-accent); border-color: var(--ah-accent); background: var(--ah-accent-soft); }
.ah-btn-light { background: var(--ah-band-ink); color: var(--ah-band); }
.ah-btn-light:hover { background: #fff; }
.ah-btn-block { width: 100%; }
.ah-icon-btn { border: 0; background: none; color: var(--ah-faint); font-size: 22px; width: 40px; height: 40px; border-radius: 50%; cursor: pointer; }
.ah-icon-btn:hover { background: var(--ah-tint); color: var(--ah-ink); }

.ah-chips { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 0; }
.ah-chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px;
  background: var(--ah-paper); border: 1px solid var(--ah-line); text-decoration: none; font-size: 14px;
}
a.ah-chip:hover { border-color: var(--ah-accent); color: var(--ah-accent); }
.ah-chip span { color: var(--ah-faint); font-size: 12px; font-variant-numeric: tabular-nums; }
.ah-chips-lg { margin-top: 26px; }
.ah-chips-lg .ah-chip { font-size: 15px; padding: 8px 14px; }
.ah-chip-live { color: var(--ah-live); border-color: color-mix(in srgb, var(--ah-live) 40%, transparent); font-size: 12px; font-weight: 600; padding: 3px 10px; }
.ah-dot-live { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--ah-live); margin-left: 8px; vertical-align: middle; }

/* ---------- header, footer */
.ah-header { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--ah-bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--ah-line); }
.ah-header-in { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 64px; }
.ah-brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font: 700 19px/1 var(--ah-serif); letter-spacing: -0.01em; }
.ah-mark { flex: none; display: inline-flex; }
.ah-mark img { display: block; width: 38px; height: 38px; }
.ah-mark-dark { display: none !important; }
:root[data-ah-theme="dark"] .ah-mark-light { display: none !important; }
:root[data-ah-theme="dark"] .ah-mark-dark { display: block !important; }
.ah-nav { display: flex; align-items: center; gap: 4px; }
.ah-nav a:not(.ah-btn) { text-decoration: none; padding: 8px 12px; border-radius: 8px; color: var(--ah-soft); font-weight: 500; font-size: 15px; display: inline-flex; align-items: center; gap: 6px; }
.ah-nav a:not(.ah-btn):hover { color: var(--ah-ink); background: var(--ah-tint); }
.ah-nav a[aria-current="page"] { color: var(--ah-ink); }
.ah-nav-studio { height: 36px; margin-left: 6px; background: transparent; color: var(--ah-accent); border-color: color-mix(in srgb, var(--ah-accent) 45%, transparent); }
.ah-nav-studio:hover { background: var(--ah-accent-soft); }
.ah-theme { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; border: 0; background: transparent; color: var(--ah-soft); cursor: pointer; }
.ah-theme:hover { background: var(--ah-tint); color: var(--ah-ink); }
.ah-nav .ah-nav-account { display: inline-flex; align-items: center; margin-left: 8px; }
/* the host's Sign in / Get started links, drawn as the site's own buttons */
.ah-nav .ah-nav-account > div { gap: 6px !important; }
.ah-nav .ah-nav-account a[href^="/auth"] {
  display: inline-flex; align-items: center; height: 36px; padding: 0 16px; border-radius: 999px;
  font: 600 14.5px/1 var(--ah-sans); text-decoration: none; transition: background .15s, border-color .15s, box-shadow .15s;
  color: var(--ah-ink); border: 1px solid var(--ah-line); background: var(--ah-paper);
}
.ah-nav .ah-nav-account a[href^="/auth"]:hover { border-color: var(--ah-accent); color: var(--ah-accent); }
.ah-nav .ah-nav-account a[href*="intent=signup"] {
  color: var(--ah-accent-ink); border-color: transparent;
  background: linear-gradient(180deg, color-mix(in srgb, var(--ah-accent) 88%, #fff), var(--ah-accent));
  box-shadow: 0 1px 0 rgb(255 255 255 / 25%) inset, 0 4px 14px color-mix(in srgb, var(--ah-accent) 35%, transparent);
}
.ah-nav .ah-nav-account a[href*="intent=signup"]:hover { color: var(--ah-accent-ink); filter: brightness(1.06); }
@media (max-width: 719px) {
  .ah-brand > span:not(.ah-mark) { display: none; }
  .ah-nav a:not(.ah-btn) { padding: 8px; font-size: 14px; }
  .ah-nav-search span { display: none; }
}
@media (max-width: 559px) {
  .ah-nav { gap: 0; }
  .ah-nav a[href="/favourites/"], .ah-nav a[href="/hymnals/"] { display: none; }
  .ah-nav-studio { padding: 0 12px; margin-left: 2px; }
  .ah-nav .ah-nav-account { margin-left: 6px; }
  .ah-nav .ah-nav-account a[href*="intent=signup"] { display: none; }
}
@media (max-width: 359px) { .ah-nav a[href="/browse/"] { display: none; } }

.ah-footer { margin-top: 72px; border-top: 1px solid var(--ah-line); background: var(--ah-tint); padding: 40px 0 24px; font-size: 14px; color: var(--ah-soft); }
.ah-footer-in { display: grid; gap: 28px; grid-template-columns: 1fr; }
@media (min-width: 720px) { .ah-footer-in { grid-template-columns: 2fr 1.3fr 1fr 1fr; } }
.ah-footer .ah-brand { color: var(--ah-ink); margin-bottom: 10px; }
.ah-footer-col { display: flex; flex-direction: column; gap: 6px; }
.ah-footer-col h2 { font: 600 13px/1.4 var(--ah-sans); text-transform: uppercase; letter-spacing: .08em; color: var(--ah-faint); margin-bottom: 4px; }
.ah-footer-col a { text-decoration: none; }
.ah-footer-col a:hover { color: var(--ah-accent); }
.ah-fine { margin-top: 28px; font-size: 12px; color: var(--ah-faint); }

/* ---------- home */
.ah-hero { padding: 64px 0 56px; background:
  radial-gradient(1000px 360px at 85% -10%, color-mix(in srgb, var(--ah-gold) 16%, transparent), transparent 70%),
  radial-gradient(700px 300px at 0% 0%, color-mix(in srgb, var(--ah-accent) 10%, transparent), transparent 70%); }
.ah-hero-in { max-width: 860px; }
.ah-eyebrow { font: 600 12.5px/1.4 var(--ah-sans); text-transform: uppercase; letter-spacing: .12em; color: var(--ah-gold); margin-bottom: 14px; }
.ah-hero h1 { margin-bottom: 18px; font-size: clamp(38px, 6.4vw, 68px); font-weight: 600; line-height: 1.04; letter-spacing: -0.025em; }
.ah-lede { margin-top: 16px; font: 400 clamp(17px, 2vw, 19.5px)/1.55 var(--ah-text); color: var(--ah-soft); }
.ah-hero-search { display: flex; gap: 8px; margin-top: 28px; padding: 6px; background: var(--ah-paper); border: 1px solid var(--ah-line); border-radius: 999px; box-shadow: var(--ah-shadow); max-width: 640px; }
.ah-hero-search input { flex: 1; min-width: 0; border: 0; background: transparent; padding: 0 16px; font: 17px var(--ah-sans); color: var(--ah-ink); outline: none; }
.ah-hero-search:focus-within { border-color: var(--ah-accent); }
.ah-hero-search .ah-btn { height: 46px; }
.ah-hero-quick { margin-top: 14px; font-size: 14px; color: var(--ah-faint); }
.ah-hero-quick a { color: var(--ah-soft); }

.ah-section { margin-top: 56px; }
.ah-section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.ah-section-head h2 { font-size: clamp(24px, 3vw, 30px); }
.ah-section-head a { font-size: 14.5px; color: var(--ah-accent); text-decoration: none; font-weight: 500; white-space: nowrap; }

.ah-books { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); }
.ah-book a {
  display: flex; flex-direction: column; gap: 6px; height: 100%; padding: 18px 18px 16px; text-decoration: none;
  background: var(--ah-paper); border: 1px solid var(--ah-line); border-radius: var(--ah-radius);
  border-left: 4px solid var(--ah-accent); transition: transform .15s, box-shadow .15s;
}
.ah-book a:hover { transform: translateY(-2px); box-shadow: var(--ah-shadow); }
.ah-book-year { font: 600 13px var(--ah-sans); color: var(--ah-gold); font-variant-numeric: tabular-nums; }
.ah-book-name { font: 600 18px/1.25 var(--ah-serif); }
.ah-book-meta { font-size: 13.5px; color: var(--ah-faint); margin-top: auto; }
.ah-book.is-soon a { border-left-color: var(--ah-line); }
.ah-book.is-soon .ah-book-name { color: var(--ah-soft); }
.ah-books-lg { margin-top: 28px; }

.ah-band { margin-top: 72px; background: var(--ah-band); color: var(--ah-band-ink); padding: 64px 0; }
.ah-band-in { display: grid; gap: 40px; align-items: center; }
@media (min-width: 880px) { .ah-band-in { grid-template-columns: 1.15fr 1fr; } }
.ah-band h2 { font-size: clamp(30px, 4vw, 44px); }
.ah-band p { color: color-mix(in srgb, var(--ah-band-ink) 78%, transparent); margin-top: 12px; font: 18px/1.55 var(--ah-text); }
.ah-feats { list-style: none; padding: 0; margin: 22px 0 28px; display: grid; gap: 10px; }
.ah-feats li { padding-left: 26px; position: relative; color: color-mix(in srgb, var(--ah-band-ink) 82%, transparent); }
.ah-feats li::before { content: ""; position: absolute; left: 2px; top: .55em; width: 10px; height: 10px; border-radius: 50%; background: var(--ah-gold); }
.ah-feats b { color: var(--ah-band-ink); font-weight: 600; }
.ah-band-art { display: grid; gap: 14px; padding: 26px; border-radius: 20px; background: rgb(255 255 255 / 5%); border: 1px solid rgb(255 255 255 / 10%); }
.ah-voice { display: grid; grid-template-columns: 74px 1fr; align-items: center; gap: 14px; font-size: 13px; letter-spacing: .04em; text-transform: uppercase; color: color-mix(in srgb, var(--ah-band-ink) 70%, transparent); }
.ah-voice i { display: block; height: 10px; width: var(--w); border-radius: 99px; background: currentColor; animation: ah-breathe 3.2s ease-in-out infinite; }
.ah-voice-0 i { color: #e0868f; }
.ah-voice-1 i { color: #d9ad55; animation-delay: .4s; }
.ah-voice-2 i { color: #6cc49b; animation-delay: .8s; }
.ah-voice-3 i { color: #7fb0e0; animation-delay: 1.2s; }
@keyframes ah-breathe { 50% { transform: scaleX(.82); opacity: .75; } }
.ah-voice i { transform-origin: left; }
@media (prefers-reduced-motion: reduce) { .ah-voice i { animation: none; } }

/* ---------- lists */
.ah-list { list-style: none; padding: 0; margin: 0; }
.ah-list-cols { display: grid; column-gap: 28px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); }
.ah-row { display: flex; align-items: center; border-bottom: 1px solid var(--ah-line); }
.ah-row-link { flex: 1; display: flex; align-items: baseline; gap: 14px; padding: 11px 4px; text-decoration: none; min-width: 0; }
.ah-row-link:hover .ah-row-title { color: var(--ah-accent); }
.ah-num { flex: none; width: 3ch; text-align: right; font: 600 15px var(--ah-sans); color: var(--ah-faint); font-variant-numeric: tabular-nums; }
.ah-row-main { display: flex; flex-direction: column; min-width: 0; }
.ah-row-title { font: 600 16.5px/1.3 var(--ah-text); }
.ah-row-sub { font: italic 14.5px/1.35 var(--ah-text); color: var(--ah-faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ah-row-book { margin-left: auto; font-size: 12px; color: var(--ah-faint); letter-spacing: .04em; }
.ah-empty { color: var(--ah-soft); padding: 24px 0; }

/* ---------- inner pages */
.ah-page { padding-top: 20px; }
.ah-page > h1, .ah-page-head h1 { font-size: clamp(30px, 4.6vw, 48px); margin-top: 10px; }
.ah-page-head { margin-bottom: 28px; }
.ah-crumbs { margin-bottom: 14px; }
.ah-crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 0; font-size: 13.5px; color: var(--ah-faint); }
.ah-crumbs li + li::before { content: "/"; margin-right: 6px; color: var(--ah-line); }
.ah-crumbs a { text-decoration: none; }
.ah-crumbs a:hover { color: var(--ah-accent); }
.ah-crumbs [aria-current] { color: var(--ah-soft); }
.ah-group { margin-top: 36px; }
.ah-group h2 { font-size: 22px; margin-bottom: 8px; }

.ah-jump { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 22px; }
.ah-jump label { font-weight: 600; font-size: 14px; }
.ah-jump input { width: 110px; height: 42px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--ah-line); background: var(--ah-paper); color: var(--ah-ink); font: 600 16px var(--ah-sans); }
.ah-jump-miss { color: var(--ah-accent); font-size: 14px; }

/* ---------- hymn */
.ah-hymn { display: grid; gap: 36px; margin-top: 18px; }
@media (min-width: 960px) { .ah-hymn { grid-template-columns: minmax(0, 1fr) 340px; gap: 56px; } }
.ah-hymn-no { font: 600 13px var(--ah-sans); text-transform: uppercase; letter-spacing: .1em; color: var(--ah-faint); }
.ah-hymn-no span { display: inline-block; margin-left: 6px; padding: 2px 9px; border-radius: 999px; background: var(--ah-accent); color: var(--ah-accent-ink); letter-spacing: 0; font-variant-numeric: tabular-nums; }
.ah-hymn-head h1 { font-size: clamp(32px, 5vw, 52px); margin-top: 10px; }
.ah-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.ah-words { margin-top: 34px; font: 400 clamp(18px, 2.1vw, 20.5px)/1.62 var(--ah-text); }
.ah-stanza { position: relative; padding-left: 44px; margin-bottom: 26px; }
.ah-vn { position: absolute; left: 0; top: .2em; font: 600 13px var(--ah-sans); color: var(--ah-gold); font-variant-numeric: tabular-nums; }
.ah-refrain { font-style: italic; color: var(--ah-soft); border-left: 2px solid var(--ah-gold); margin-left: 44px; padding-left: 18px; }
.ah-refrain .ah-vn { position: static; display: block; font-style: normal; text-transform: uppercase; letter-spacing: .1em; font-size: 11px; margin-bottom: 4px; }
.ah-credits { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px 28px; margin: 34px 0 22px; padding: 20px 0; border-top: 1px solid var(--ah-line); border-bottom: 1px solid var(--ah-line); }
.ah-credits dt { font: 600 11.5px var(--ah-sans); text-transform: uppercase; letter-spacing: .1em; color: var(--ah-faint); }
.ah-credits dd { margin: 3px 0 0; font: 16px/1.4 var(--ah-text); }
.ah-copy { margin-top: 18px; font-size: 12.5px; color: var(--ah-faint); }
.ah-pager { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 36px; }
.ah-pager a { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; border: 1px solid var(--ah-line); border-radius: var(--ah-radius); text-decoration: none; font: 600 16px/1.3 var(--ah-text); background: var(--ah-paper); }
.ah-pager a:hover { border-color: var(--ah-accent); }
.ah-pager small { font: 500 12.5px var(--ah-sans); color: var(--ah-faint); }
.ah-pager-next { text-align: right; }

.ah-hymn-side { display: flex; flex-direction: column; gap: 18px; }
@media (min-width: 960px) { .ah-hymn-side { position: sticky; top: 84px; align-self: start; } }
.ah-studio { background: var(--ah-paper); border: 1px solid var(--ah-line); border-radius: 18px; padding: 20px; box-shadow: var(--ah-shadow); }
.ah-studio-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 14px; }
.ah-studio h2 { font-size: 20px; }
.ah-studio-play {
  display: flex; align-items: center; gap: 14px; width: 100%; padding: 14px; border-radius: 14px; cursor: pointer; text-align: left;
  border: 1px dashed color-mix(in srgb, var(--ah-accent) 45%, var(--ah-line)); background: var(--ah-accent-soft); color: var(--ah-ink); font: 15px var(--ah-sans);
}
.ah-studio-play:hover { border-style: solid; }
.ah-studio-play strong { display: block; font-weight: 600; }
.ah-studio-play small { color: var(--ah-soft); font-size: 13px; }
.ah-play-dot { flex: none; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; background: var(--ah-accent); color: var(--ah-accent-ink); }
.ah-player { width: min(1100px, calc(100vw - 24px)); height: min(760px, calc(100vh - 24px)); max-width: none; max-height: none; padding: 0; border: 0; border-radius: 16px; background: var(--ah-paper); color: var(--ah-ink); box-shadow: 0 20px 80px rgb(0 0 0 / 35%); overflow: hidden; }
.ah-player[open] { display: flex; flex-direction: column; }
.ah-player::backdrop { background: rgb(20 18 15 / 55%); backdrop-filter: blur(2px); }
.ah-player-bar { display: flex; align-items: center; gap: 12px; padding: 6px 8px 6px 18px; border-bottom: 1px solid var(--ah-line); font: 15px var(--ah-sans); }
.ah-player-bar strong { flex: 1; font: 600 17px var(--ah-serif); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ah-player-bar a { color: var(--ah-accent); font-weight: 600; text-decoration: none; white-space: nowrap; }
.ah-player iframe { flex: 1; width: 100%; border: 0; background: #fff; }
.ah-studio-feats { list-style: none; padding: 0; margin: 16px 0; display: grid; gap: 9px; font-size: 14px; color: var(--ah-soft); }
.ah-studio-feats li { display: grid; grid-template-columns: 58px 1fr; align-items: baseline; }
.ah-studio-feats b { display: block; font: 700 11px var(--ah-sans); letter-spacing: .08em; color: var(--ah-accent); }
.ah-studio-note { margin-top: 12px; font-size: 12.5px; color: var(--ah-faint); text-align: center; }
.ah-side-card { border: 1px solid var(--ah-line); border-radius: 18px; padding: 18px 20px; background: var(--ah-paper); }
.ah-side-card h2 { font-size: 17px; margin-bottom: 8px; }
.ah-side-card ul { list-style: none; padding: 0; margin: 0; }
.ah-side-card li a { display: flex; justify-content: space-between; padding: 7px 0; text-decoration: none; border-bottom: 1px solid var(--ah-line); }
.ah-side-card li:last-child a { border-bottom: 0; }
.ah-side-card li a span { color: var(--ah-faint); font-variant-numeric: tabular-nums; }
.ah-side-card li a:hover { color: var(--ah-accent); }

/* ---------- search */
.ah-search { margin-top: 22px; }
.ah-search-bar { display: flex; flex-wrap: wrap; gap: 10px; }
.ah-search-bar input, .ah-search-bar select { height: 44px; border-radius: 12px; border: 1px solid var(--ah-line); background: var(--ah-paper); color: var(--ah-ink); font: 17px var(--ah-sans); padding: 0 16px; }
.ah-search-bar input { flex: 1 1 320px; }
.ah-search-bar input:focus { border-color: var(--ah-accent); outline: none; }
.ah-search-bar select { flex: 0 1 240px; font-size: 15px; }
.ah-search-count { min-height: 1.5em; margin: 14px 0 6px; font-size: 14px; color: var(--ah-faint); }

/* ---------- intro, A-Z lists, prose */
.ah-intro p { font: 17px/1.65 var(--ah-text); color: var(--ah-soft); }
.ah-intro a, .ah-prose a { color: var(--ah-accent); }
.ah-az { display: flex; flex-wrap: wrap; gap: 4px; margin: 28px 0 8px; position: sticky; top: 64px; background: var(--ah-bg); padding: 8px 0; z-index: 5; }
.ah-az a { min-width: 32px; padding: 4px 8px; text-align: center; border-radius: 8px; text-decoration: none; font-weight: 600; color: var(--ah-soft); }
.ah-az a:hover { background: var(--ah-tint); color: var(--ah-accent); }
.ah-names { list-style: none; padding: 0; margin: 0; columns: 3 240px; column-gap: 28px; }
.ah-names li { break-inside: avoid; padding: 5px 0; border-bottom: 1px solid var(--ah-line); display: flex; justify-content: space-between; gap: 8px; }
.ah-names a { text-decoration: none; font: 16px/1.35 var(--ah-text); }
.ah-names a:hover { color: var(--ah-accent); }
.ah-names span { color: var(--ah-faint); font-size: 13px; font-variant-numeric: tabular-nums; flex-shrink: 0; }
.ah-names a { min-width: 0; overflow-wrap: anywhere; }
.ah-credits dd a { color: inherit; text-decoration: underline; text-decoration-color: var(--ah-line); text-underline-offset: 3px; }
.ah-credits dd a:hover { color: var(--ah-accent); text-decoration-color: currentColor; }
.ah-prose { max-width: 960px; }
.ah-prose h2 { font-size: 24px; margin: 32px 0 10px; }
.ah-prose p { font: 18px/1.65 var(--ah-text); margin-bottom: 14px; }

/* ---------- app download (hero) */
.ah-apps { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 22px; }
.ah-app-badge {
  display: inline-flex; align-items: center; gap: 10px; height: 48px; padding: 0 16px 0 12px; border-radius: 12px;
  background: var(--ah-ink); color: var(--ah-bg); text-decoration: none; font: 12px/1.15 var(--ah-sans);
}
.ah-app-badge strong { display: block; font-size: 16px; font-weight: 600; }
.ah-app-badge[aria-disabled="true"] { opacity: .78; cursor: default; }
.ah-app-soon { font-size: 13px; color: var(--ah-faint); }

/* ---------- live search (home), hymnal filter, hymnal chips */
.ah-live { position: relative; max-width: 640px; }
.ah-live .ah-hero-search { max-width: none; }
.ah-live-panel { position: absolute; left: 0; right: 0; top: calc(100% + 8px); z-index: 30; background: var(--ah-paper);
  border: 1px solid var(--ah-line); border-radius: 16px; box-shadow: var(--ah-shadow); padding: 6px; max-height: 70vh; overflow: auto; }
.ah-live-row { display: flex; align-items: baseline; gap: 12px; padding: 9px 10px; border-radius: 10px; text-decoration: none; }
.ah-live-row.is-active { background: var(--ah-tint); }
.ah-live-row .ah-row-book { white-space: nowrap; }
.ah-live-note { padding: 12px; color: var(--ah-faint); font-size: 14px; }
.ah-live-all { display: block; padding: 10px; font-size: 14px; color: var(--ah-accent); text-decoration: none; font-weight: 600; }
.ah-filter { display: flex; align-items: center; gap: 12px; margin-top: 22px; flex-wrap: wrap; }
.ah-filter input { flex: 0 1 360px; height: 42px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--ah-line); background: var(--ah-paper); color: var(--ah-ink); font: 16px var(--ah-sans); }
.ah-filter input:focus { outline: none; border-color: var(--ah-accent); }
.ah-filter-count { font-size: 14px; color: var(--ah-faint); }
.ah-book-chips { margin-top: 12px; }
.ah-book-chips .ah-chip { cursor: pointer; font: 14px var(--ah-sans); color: var(--ah-ink); }
.ah-book-chips .ah-chip[aria-pressed="true"] { background: var(--ah-accent); border-color: var(--ah-accent); color: var(--ah-accent-ink); }
/* the search page's filters (the app's): one row of small dropdowns, the hymnals in a sheet */
.ah-search-tools { display: flex; gap: 8px; margin-top: 12px; min-width: 0; }
.ah-drop { position: relative; display: inline-flex; flex: 0 1 auto; min-width: 0; align-items: center; gap: 6px; height: 36px; padding: 0 12px; max-width: 100%;
  border: 1px solid var(--ah-line); border-radius: 999px; background: var(--ah-paper); color: var(--ah-soft); font: 14px var(--ah-sans); cursor: pointer; }
.ah-drop > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ah-drop b { font-weight: 600; color: var(--ah-ink); }
.ah-drop svg { flex-shrink: 0; color: var(--ah-faint); }
.ah-drop:hover, .ah-drop:focus-within { border-color: var(--ah-accent); }
/* the native picker, invisible over the button: a phone shows its own list */
.ah-drop select { position: absolute; inset: 0; width: 100%; opacity: 0; cursor: pointer; font-size: 16px; }
.ah-search-count { overflow-wrap: anywhere; }
.ah-more { display: block; margin: 18px auto 0; }
.ah-sheet { border: 0; padding: 0; border-radius: 16px; background: var(--ah-paper); color: var(--ah-ink); box-shadow: var(--ah-shadow);
  width: min(440px, calc(100vw - 32px)); max-height: min(640px, 82vh); }
.ah-sheet::backdrop { background: rgb(0 0 0 / .4); }
.ah-sheet-in { display: flex; flex-direction: column; max-height: inherit; padding: 16px; gap: 10px; box-sizing: border-box; }
.ah-sheet-head { display: flex; align-items: center; justify-content: space-between; }
.ah-sheet-head h2 { font-size: 20px; margin: 0; }
.ah-sheet-all { border: 1px solid var(--ah-line); background: none; color: var(--ah-ink); border-radius: 999px; padding: 5px 14px; font: 500 14px var(--ah-sans); cursor: pointer; }
.ah-sheet-all[aria-pressed="true"] { background: var(--ah-accent); border-color: var(--ah-accent); color: var(--ah-accent-ink); }
.ah-sheet-q { height: 42px; border-radius: 10px; border: 1px solid var(--ah-line); background: var(--ah-bg); color: var(--ah-ink); font: 16px var(--ah-sans); padding: 0 12px; }
.ah-sheet-q:focus { outline: none; border-color: var(--ah-accent); }
.ah-sheet-list { list-style: none; margin: 0; padding: 0; overflow: auto; flex: 1 1 auto; min-height: 0; }
.ah-sheet-list label { display: flex; align-items: center; gap: 12px; padding: 10px 4px; border-bottom: 1px solid var(--ah-line); cursor: pointer; }
.ah-sheet-list input { width: 18px; height: 18px; accent-color: var(--ah-accent); flex-shrink: 0; }
.ah-sheet-name { flex: 1; min-width: 0; font: 15px var(--ah-sans); }
.ah-sheet-name small { margin-left: 8px; color: var(--ah-faint); font-size: 12px; }
.ah-sheet-n { color: var(--ah-faint); font: 13px var(--ah-sans); font-variant-numeric: tabular-nums; }
.ah-sheet-none { padding: 14px 4px; color: var(--ah-faint); font-size: 14px; }
.ah-sheet-done { width: 100%; justify-content: center; }
@media (max-width: 600px) {
  /* a sheet from the bottom of the screen */
  .ah-sheet { width: 100vw; max-width: 100vw; margin: auto 0 0; border-radius: 16px 16px 0 0; max-height: 85vh; }
  .ah-drop { padding: 0 10px; font-size: 13px; gap: 4px; }
}
.ah-drop .ah-narrow { display: none; }
@media (max-width: 420px) { .ah-drop-k, .ah-drop .ah-wide { display: none; } .ah-drop .ah-narrow { display: inline; } .ah-drop-keep { flex-shrink: 0; } .ah-drop { padding: 0 9px; } .ah-search-tools { gap: 6px; } }

/* the search boxes show focus with their own border; no second, square outline inside them */
.ah-hero-search input:focus-visible, .ah-search-bar input:focus-visible, .ah-filter input:focus-visible { outline: none; }
.ah-search-bar input:focus, .ah-filter input:focus { border-color: var(--ah-accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ah-accent) 18%, transparent); }
.ah-hero-search:focus-within { box-shadow: 0 0 0 4px color-mix(in srgb, var(--ah-accent) 14%, transparent), var(--ah-shadow); }

/* the search boxes show focus with their own border; no second, square outline inside them */
.ah-hero-search input:focus-visible, .ah-search-bar input:focus-visible, .ah-filter input:focus-visible { outline: none; }
.ah-search-bar input:focus, .ah-filter input:focus { border-color: var(--ah-accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ah-accent) 18%, transparent); }
.ah-hero-search:focus-within { box-shadow: 0 0 0 4px color-mix(in srgb, var(--ah-accent) 14%, transparent), var(--ah-shadow); }

/* ---------- choose the hymn together */
.ah-choose { max-width: 640px; }
.ah-choose h2, .ah-choose-done h2 { font-size: clamp(26px, 4vw, 34px); margin: 6px 0 10px; }
.ah-choose-h { font-size: 18px; margin: 26px 0 8px; }
.ah-choose-msg { margin: 10px 0; color: var(--ah-accent); }
.ah-code-input { display: flex; align-items: center; gap: 12px; margin: 12px 0; font-weight: 600; }
.ah-code-input input { width: 110px; height: 46px; font: 600 24px var(--ah-sans); letter-spacing: .2em; text-align: center; border-radius: 10px; border: 1px solid var(--ah-line); background: var(--ah-paper); color: var(--ah-ink); }
.ah-pick-search { width: 100%; height: 44px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--ah-line); background: var(--ah-paper); color: var(--ah-ink); font: 16px var(--ah-sans); margin: 8px 0; }
.ah-pick { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.ah-pick button { width: 100%; display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--ah-line); background: var(--ah-paper); color: var(--ah-ink); cursor: pointer; text-align: left; font: 16px var(--ah-text); }
.ah-pick button b { font-weight: 600; }
.ah-pick button small { color: var(--ah-faint); font: 13px var(--ah-sans); white-space: nowrap; }
.ah-pick button[aria-pressed="true"] { border-color: var(--ah-accent); background: var(--ah-accent-soft); }
.ah-bars { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.ah-bars li { display: grid; grid-template-columns: minmax(0, 1.4fr) 2fr 36px; align-items: center; gap: 10px; }
.ah-bar-name { font: 15px var(--ah-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ah-bar-name small { color: var(--ah-faint); font: 12px var(--ah-sans); }
.ah-bar { height: 12px; border-radius: 99px; background: var(--ah-tint); overflow: hidden; }
.ah-bar i { display: block; height: 100%; border-radius: 99px; background: var(--ah-gold); transition: width .4s; }
.ah-bars li.is-top .ah-bar i { background: var(--ah-accent); }
.ah-bar-n { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.ah-field { display: grid; gap: 6px; margin: 14px 0; font-weight: 600; }
.ah-field input { height: 44px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--ah-line); background: var(--ah-paper); color: var(--ah-ink); font: 16px var(--ah-sans); }
.ah-check { display: flex; gap: 10px; align-items: flex-start; margin: 10px 0; }
.ah-shortlist { margin: 14px 0 20px; }
.ah-shortlist summary { cursor: pointer; font-weight: 600; }
.ah-board { display: grid; gap: 32px; background: var(--ah-bg); padding: 8px 0; }
@media (min-width: 900px) { .ah-board { grid-template-columns: 1fr 1fr; align-items: start; } }
.ah-board:fullscreen { padding: 4vh 4vw; }
.ah-board-join { display: grid; gap: 20px; align-items: center; }
@media (min-width: 560px) { .ah-board-join { grid-template-columns: minmax(200px, 300px) 1fr; } }
.ah-qr { background: #fff; border-radius: 16px; padding: 10px; }
.ah-qr svg { display: block; width: 100%; height: auto; }
.ah-board-how { font-size: 16px; color: var(--ah-soft); }
.ah-board-code { font: 700 clamp(64px, 10vw, 120px)/1 var(--ah-sans); letter-spacing: .12em; font-variant-numeric: tabular-nums; margin: 12px 0 4px; color: var(--ah-ink); }
.ah-board-left { color: var(--ah-faint); font-size: 14px; }
.ah-board-online { font-size: 13px; color: var(--ah-faint); margin-top: 10px; word-break: break-all; }
.ah-board-tally h3 { font-size: 24px; margin-bottom: 14px; }
.ah-board-tally h4 { margin: 20px 0 8px; font: 600 14px var(--ah-sans); color: var(--ah-faint); text-transform: uppercase; letter-spacing: .08em; }
.ah-board-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.ah-board-names { margin-top: 12px; font-size: 14px; color: var(--ah-soft); }
.ah-choose-done { max-width: 640px; display: grid; gap: 14px; justify-items: start; }
.ah-hymn-by { display: flex; flex-wrap: wrap; gap: 4px 18px; margin-top: 10px; font-size: 14.5px; color: var(--ah-soft); }
.ah-hymn-by a { color: inherit; text-decoration: underline; text-decoration-color: var(--ah-line); text-underline-offset: 3px; }
.ah-hymn-by a:hover { color: var(--ah-accent); text-decoration-color: currentColor; }
.ah-book-eg { font: italic 13.5px var(--ah-text); color: var(--ah-faint); }
.ah-tabs { display: flex; gap: 6px; margin: 18px 0 10px; border-bottom: 1px solid var(--ah-line); }
.ah-tabs button { background: none; border: 0; border-bottom: 2px solid transparent; padding: 8px 12px; font: 600 15px var(--ah-ui, inherit); color: var(--ah-soft); cursor: pointer; margin-bottom: -1px; }
.ah-tabs button[aria-selected="true"] { color: var(--ah-accent); border-bottom-color: currentColor; }
.ah-tabs span { font-weight: 500; color: var(--ah-faint); margin-left: 4px; }
.ah-stats { margin-top: 40px; }
.ah-stats h3 { margin: 26px 0 10px; }
.ah-stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 14px 0; }
.ah-stat-row div { border: 1px solid var(--ah-line); border-radius: 14px; padding: 14px 16px; }
.ah-stat-row dt { font-size: 13px; color: var(--ah-soft); }
.ah-stat-row dd { margin: 4px 0 0; font: 700 30px/1 var(--ah-text); font-variant-numeric: tabular-nums; }
.ah-bar-name a { color: inherit; text-decoration: none; }
.ah-learn { list-style: none; padding: 0; margin: 12px 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; }
.ah-learn a, .ah-learn button { display: flex; flex-direction: column; gap: 2px; width: 100%; text-align: left; padding: 12px 14px; border: 1px solid var(--ah-line); border-radius: 12px; background: var(--ah-bg); color: inherit; text-decoration: none; font: inherit; cursor: pointer; }
.ah-learn a:hover, .ah-learn button:hover { border-color: var(--ah-accent); }
.ah-learn b { font: 600 16px var(--ah-text); }
.ah-learn small { color: var(--ah-faint); font-size: 13px; }
.ah-church section { margin-top: 36px; }
.ah-church h1, .ah-choose h1 { font-size: clamp(32px, 5vw, 48px); line-height: 1.1; margin: 4px 0 14px; }
.ah-pair-list span { display: inline-flex; align-items: center; gap: 2px; margin-left: 6px; }
.ah-pair-code { letter-spacing: .06em; font-size: clamp(34px, 7vw, 64px); }
.ah-pair-form { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; margin: 18px 0; }
.ah-pair-form .ah-field { flex: 1 1 220px; margin: 0; }
.ah-pair-list { color: var(--ah-soft); font-size: 14px; margin-top: 28px; }
.ah-church-polls { margin-top: 26px; }
.ah-members { list-style: none; padding: 0; margin: 12px 0; }
.ah-members li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--ah-line); }
.ah-members li.is-removed { opacity: .55; }
.ah-members small { color: var(--ah-faint); }
.ah-count { font-size: .7em; color: var(--ah-faint); font-weight: 500; }
.ah-choose-more { margin-top: 26px; color: var(--ah-soft); font-size: 15px; }

/* ------------------------------------------------ tunes, the verse, compare */
.ah-where { font: 13px var(--ah-sans); color: var(--ah-faint); }
.ah-side-more { display: inline-block; margin-top: 12px; font: 600 14px var(--ah-sans); color: var(--ah-accent); }

.ah-verse { margin: 8px 0 26px; min-width: 0; }
.ah-hymn-main { min-width: 0; }
.ah-verse h2 { font-size: 20px; margin-bottom: 10px; }
.ah-verse-facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px 24px; margin: 0 0 12px; }
.ah-verse-facts dt { font: 600 11.5px var(--ah-sans); text-transform: uppercase; letter-spacing: .1em; color: var(--ah-faint); }
.ah-verse-facts dd { margin: 3px 0 0; font: 16px/1.4 var(--ah-text); }
.ah-verse-facts small, .ah-verse-fit small { font: 13px var(--ah-sans); color: var(--ah-faint); }
.ah-verse-fit { font: 15.5px/1.5 var(--ah-text); margin: 0 0 12px; }
.ah-scan summary { cursor: pointer; font: 600 14.5px var(--ah-sans); color: var(--ah-accent); padding: 6px 0; }
.ah-scan-key, .ah-scan-note { font: 13px/1.5 var(--ah-sans); color: var(--ah-faint); }
.ah-scan-stanza { margin: 12px 0; }
.ah-scan-label { font: 600 11.5px var(--ah-sans); text-transform: uppercase; letter-spacing: .1em; color: var(--ah-gold); margin: 0 0 4px; }
.ah-scan-line { display: grid; grid-template-columns: minmax(0, 1fr) auto 2.2em 1.4em; gap: 4px 12px; align-items: baseline; padding: 3px 0; border-bottom: 1px solid var(--ah-line); }
.ah-scan-words { font: 15.5px/1.4 var(--ah-text); min-width: 0; overflow-wrap: anywhere; }
.ah-scan-marks { font: 14px var(--ah-sans); letter-spacing: .14em; white-space: nowrap; }
.ah-scan-n, .ah-scan-r { font: 600 13px var(--ah-sans); color: var(--ah-soft); text-align: right; }
.ah-scan .s1 { color: var(--ah-accent); font-weight: 700; }
.ah-scan .s0 { color: var(--ah-faint); }
.ah-scan .sq { color: var(--ah-gold); }
@media (max-width: 559px) {
  .ah-scan-line { grid-template-columns: minmax(0, 1fr) 2em 1.2em; }
  .ah-scan-marks { grid-column: 1 / -1; grid-row: 2; white-space: normal; overflow-wrap: anywhere; }
}

.ah-cmp-bar { display: flex; flex-wrap: wrap; gap: 12px 18px; align-items: flex-end; margin: 18px 0 6px; }
.ah-cmp-bar .ah-tabs { margin: 0; border: 0; }
.ah-cmp-pick { display: grid; gap: 4px; font: 600 11.5px var(--ah-sans); text-transform: uppercase; letter-spacing: .1em; color: var(--ah-faint); min-width: 0; }
.ah-cmp-pick select { font: 15px var(--ah-sans); padding: 8px 10px; border: 1px solid var(--ah-line); border-radius: 10px; background: var(--ah-paper); color: var(--ah-ink); max-width: 100%; text-transform: none; letter-spacing: 0; }
.ah-cmp-sum { font: 15px var(--ah-sans); color: var(--ah-soft); margin: 10px 0 18px; }
.ah-cmp-head { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; font: 600 14px var(--ah-sans); border-bottom: 1px solid var(--ah-line); padding-bottom: 8px; position: sticky; top: 0; background: var(--ah-bg); z-index: 1; }
.ah-cmp-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.ah-cmp-row { padding: 12px 0; border-bottom: 1px solid var(--ah-line); min-width: 0; }
.ah-cmp-row > div { min-width: 0; }
.ah-cmp-label { font: 600 11.5px var(--ah-sans); text-transform: uppercase; letter-spacing: .1em; color: var(--ah-gold); margin: 0 0 4px; }
.ah-cmp-text { font: 17px/1.6 var(--ah-text); margin: 0; overflow-wrap: anywhere; }
.ah-cmp-text del { background: var(--ah-accent-soft); color: var(--ah-accent); text-decoration: line-through; text-decoration-thickness: 1px; border-radius: 3px; padding: 0 2px; }
.ah-cmp-text ins { background: color-mix(in srgb, var(--ah-live) 16%, transparent); color: var(--ah-live); text-decoration: none; border-radius: 3px; padding: 0 2px; }
.ah-cmp-text.is-dropped { color: var(--ah-faint); }
.ah-cmp-text.is-added { color: var(--ah-live); }
.ah-cmp-none { font: italic 15px var(--ah-text); color: var(--ah-faint); }
@media (max-width: 719px) {
  .ah-cmp-side .ah-cmp-pair, .ah-cmp-head { grid-template-columns: 1fr; gap: 6px; }
  .ah-cmp-head { position: static; }
}

/* ------------------------------------------------------------- the Companion */
.ah-commentary { margin: 10px 0 28px; padding-top: 22px; border-top: 1px solid var(--ah-line); }
.ah-commentary-kicker { font: 600 11.5px var(--ah-sans); text-transform: uppercase; letter-spacing: .12em; color: var(--ah-gold); margin: 0; }
.ah-commentary h2 { font-size: 26px; margin: 4px 0 2px; }
.ah-commentary-by { font: 14px var(--ah-sans); color: var(--ah-faint); margin: 0 0 14px; }
.ah-commentary-part h3 { font: 600 17px var(--ah-serif); margin: 22px 0 6px; }
.ah-commentary-part p { font: 17px/1.65 var(--ah-text); margin: 0 0 12px; overflow-wrap: anywhere; }
.ah-commentary-part blockquote { margin: 0 0 12px; padding: 4px 0 4px 16px; border-left: 2px solid var(--ah-gold); font: italic 17px/1.6 var(--ah-text); color: var(--ah-soft); }
.ah-reading { margin: 0 0 16px; }
.ah-reading .ah-reading-q { font-weight: 600; margin-bottom: 4px; }
.ah-reading .ah-reading-q::before { content: "“"; } .ah-reading .ah-reading-q::after { content: "”"; }
.ah-companion-how ol { padding-left: 20px; font: 16px/1.6 var(--ah-text); }
.ah-companion-how li { margin: 4px 0; }

.ah-edit-bar { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; margin: 6px 0 22px; }
.ah-edit-bar small { font: 13px var(--ah-sans); color: var(--ah-faint); }
/* while editing, the editor takes the published commentary's place */
.ah-editing-commentary .ah-commentary:not(.ah-commentary-editing), .ah-editing-commentary .ah-edit-bar { display: none; }
.ah-commentary-editing { position: relative; }
.ah-editor-tools { position: sticky; top: 64px; z-index: 5; display: flex; flex-wrap: wrap; gap: 4px; align-items: center; padding: 6px; margin: 0 0 14px;
  background: var(--ah-paper); border: 1px solid var(--ah-line); border-radius: 12px; box-shadow: var(--ah-shadow); }
.ah-editor-tools button { font: 14px var(--ah-sans); border: 0; background: none; color: var(--ah-ink); padding: 6px 10px; border-radius: 8px; cursor: pointer; }
.ah-editor-tools button:hover { background: var(--ah-tint); }
.ah-editor-tools .ah-status { margin-left: auto; }
/* editing looks like reading: no boxes, just the caret */
.ah-editable { outline: none; min-height: 1.6em; caret-color: var(--ah-accent); }
.ah-editable:focus, .ah-editable:focus-visible { outline: none; box-shadow: none; }
.ah-editable:empty::before { content: attr(data-hint); color: var(--ah-faint); font: italic 15px/1.55 var(--ah-text); pointer-events: none; }
.ah-editable-inline { display: inline-block; min-width: 8em; }
.ah-commentary-editing .ah-editable p, .ah-commentary-editing .ah-editable blockquote { margin: 0 0 12px; }
.ah-commentary-editing .ah-reading-q { font: 600 17px/1.5 var(--ah-text); margin-bottom: 4px; }
.ah-commentary-editing .ah-reading-q:not(:empty)::before { content: "“"; } .ah-commentary-editing .ah-reading-q:not(:empty)::after { content: "”"; }
.ah-link-btn { border: 0; background: none; padding: 2px 0; font: 600 13.5px var(--ah-sans); color: var(--ah-accent); cursor: pointer; }
.ah-editor-bar { position: sticky; bottom: 0; z-index: 5; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 18px; padding: 10px 12px;
  background: var(--ah-paper); border: 1px solid var(--ah-line); border-radius: 12px; box-shadow: var(--ah-shadow); font: 14.5px var(--ah-sans); }
.ah-editor-msg { font: 14px var(--ah-sans); color: var(--ah-live); }
.ah-editor-history { font: 13px var(--ah-sans); color: var(--ah-soft); margin-top: 12px; }
.ah-status { font: 600 11px var(--ah-sans); text-transform: uppercase; letter-spacing: .08em; padding: 2px 8px; border-radius: 99px; background: var(--ah-tint); color: var(--ah-soft); vertical-align: middle; }
.ah-status-published { background: color-mix(in srgb, var(--ah-live) 15%, transparent); color: var(--ah-live); }

/* the static mirror's link home */
.ah-mirror { margin: 0; padding: 7px 16px; text-align: center; font: 13.5px/1.4 var(--ah-sans); background: var(--ah-band); color: var(--ah-band-ink); }
.ah-mirror a { color: inherit; font-weight: 600; text-underline-offset: 2px; }

/* ---- privacy, terms, contact, volunteer (pages.tsx) ---- */
.ah-doc { max-width: 760px; }
.ah-doc h3 { font: 600 18px/1.4 var(--ah-sans); margin: 22px 0 6px; }
.ah-doc ul, .ah-doc ol { margin: 0 0 16px; padding-left: 22px; }
.ah-doc li { font: 17px/1.6 var(--ah-text); margin-bottom: 6px; }
.ah-doc-date { color: var(--ah-soft); font-size: 14px; margin-top: 6px; }
.ah-contact-mail { font-size: 20px !important; }
.ah-steps li { margin-bottom: 10px; }
.ah-give-get { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; margin: 8px 0 12px; }
.ah-give-get > div { background: var(--ah-paper); border: 1px solid var(--ah-line); border-radius: 14px; padding: 4px 18px 6px; }
.ah-give-get h3 { margin-top: 14px; }
.ah-devices { font-size: 16px !important; color: var(--ah-soft); }
.ah-volunteer-form, .ah-volunteer-done { background: var(--ah-paper); border: 1px solid var(--ah-line); border-radius: 16px; padding: 8px 20px 18px; margin: 12px 0 8px; }
.ah-volunteer-form .ah-field small { font-weight: 400; color: var(--ah-soft); }
.ah-devices-pick { border: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 20px; }
.ah-devices-pick legend { margin-bottom: 6px; padding: 0; }
.ah-check { display: inline-flex; align-items: center; gap: 8px; font-weight: 400; cursor: pointer; }
.ah-check input { width: 18px; height: 18px; accent-color: var(--ah-accent); }
.ah-fine-print { font-size: 14px !important; color: var(--ah-soft); margin-top: 12px; }
.ah-linkish { background: none; border: 0; padding: 0; color: var(--ah-accent); text-decoration: underline; cursor: pointer; font: inherit; }
.ah-volunteer-code { display: grid; grid-template-columns: 180px 1fr; gap: 20px; align-items: center; }
.ah-volunteer-code .ah-qr { width: 180px; }
.ah-code-big { font: 700 28px/1.2 var(--ah-sans) !important; letter-spacing: .04em; word-break: break-all; margin: 0 0 6px; }
.ah-downloads { list-style: none; padding: 0 !important; display: flex; flex-wrap: wrap; gap: 10px; }
.ah-live { margin: 24px 0 8px; }
.ah-live-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.ah-live-tiles > div { background: var(--ah-paper); border: 1px solid var(--ah-line); border-radius: 14px; padding: 14px 16px; display: grid; }
.ah-live-tiles b { font: 700 28px/1.1 var(--ah-sans); color: var(--ah-accent); }
.ah-live-tiles span { color: var(--ah-soft); font-size: 14px; }
.ah-footer-legal a { color: inherit; }
@media (max-width: 560px) {
  .ah-volunteer-code { grid-template-columns: 1fr; }
  .ah-volunteer-code .ah-qr { width: 200px; }
  .ah-live-tiles { grid-template-columns: 1fr; }
}
.ah-prose a.ah-btn-primary { color: var(--ah-accent-ink); text-decoration: none; }
.ah-prose a.ah-btn-quiet { color: var(--ah-ink); text-decoration: none; }
.ah-volunteer-code > div { min-width: 0; }
.ah-volunteer-code a, .ah-volunteer-done a { overflow-wrap: anywhere; }
/* search by idea: hymns close in meaning, below the ones with the words */
.ah-live-sep { margin: 6px 10px 2px; padding-top: 8px; border-top: 1px solid var(--ah-line); font: 700 11px var(--ah-ui, inherit); text-transform: uppercase; letter-spacing: .07em; color: var(--ah-faint); }
.ah-idea-h { margin: 22px 0 6px; font-size: 13px; text-transform: uppercase; letter-spacing: .07em; color: var(--ah-faint); }
