/* New Creation of Christ Church: site styles
   Brand: navy #001434 + sky #8cc8fc (from the church logo). Sky is for dark backgrounds only. */
:root {
  --navy: #001434;
  --navy-90: #0a1f47;
  --navy-80: #132b5c;
  --sky: #8cc8fc;
  /* from the church's YouTube fliers (21 Nov 2026): Sunday gold, Friday prayer green, special services red */
  --gold: #ecc86b;
  --gold-deep: #8a5a12;
  --green-deep: #3f6212;
  --red-deep: #9b1c1c;
  --sky-strong: #a9d6fd;
  --sky-10: #eef6ff;
  --sky-20: #dcecfd;
  --ink: #0d1b33;
  --text: #2a3a55;
  --muted: #5b6b85;
  --link: #1f5fae;
  --bg: #ffffff;
  --soft: #f5f8fc;
  --line: #e2e8f1;
  --line-2: #cfd9e8;
  --on-navy: #c9dcf5;
  --on-navy-line: rgba(140, 200, 252, 0.22);
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --r: 16px;
  --r-lg: 24px;
  --leaf: 56px 12px 56px 12px;            /* the logo frame: rounded top-left and bottom-right */
  --leaf-sm: 28px 8px 28px 8px;
  --shadow-sm: 0 1px 2px rgba(0, 20, 52, 0.05), 0 4px 14px -6px rgba(0, 20, 52, 0.10);
  --shadow: 0 2px 4px rgba(0, 20, 52, 0.04), 0 18px 40px -16px rgba(0, 20, 52, 0.22);
  --shadow-lg: 0 32px 64px -24px rgba(0, 6, 24, 0.65);
  --gutter: clamp(20px, 4vw, 40px);
  --section: clamp(72px, 9vw, 120px);
  --header-h: 76px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  /* added 18 Nov 2026 with the standard parts (the last section of this file) */
  --surface: #fff;                        /* cards, fields */
  --canvas: #e6ecf6;                      /* the page behind the panels */
  --media: #0a1430;                       /* behind photos and video while they load */
  --r-xs: 6px; --r-sm: 10px; --r-pill: 999px;   /* with --r 16px (tiles, rows) and --r-lg 24px (cards, media, dialogs) */
  --ok-bg: #e6f4ea; --ok-fg: #17602f; --ok: #1f8a4c;
  --warn-bg: #f9eeda; --warn-fg: #6b4a12;
  --danger-bg: #fbebeb; --danger-fg: #8a1f1f; --danger: #b42318;
  --info-bg: #e3eefc; --info-fg: #164a8a;
  --neutral-bg: #eef1f6; --neutral-fg: #2a3a55;
  --sunday-bg: #fbefcf; --sunday-fg: #7a4a0c; --friday-bg: #e4f1d0; --friday-fg: #36570c; --special-bg: #fbe1de; --special-fg: #8d0f12;   /* the fliers' gold, green and red */
  --field-line: #8593ab;                  /* outlines of text fields: 3 to 1 against white */
  --control: 52px; --control-sm: 44px;    /* one height for text fields, selects and the buttons beside them */
  --focus: var(--link);                   /* the keyboard focus ring; dark surfaces set it to sky */
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 400 1.0625rem/1.65 var(--sans); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img, svg, iframe, video { display: block; max-width: 100%; }
img { height: auto; }
a { color: var(--link); text-underline-offset: 3px; }
h1, h2, h3 { color: var(--ink); margin: 0; }
h2 { font: 500 clamp(2rem, 3.6vw, 3rem)/1.1 var(--serif); letter-spacing: -0.015em; text-wrap: balance; }
h3 { font: 600 1.08rem/1.35 var(--sans); }
p { margin: 0 0 1em; }
address { font-style: normal; }
button { font: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }
/* dark surfaces take the sky ring; a white card on one of them goes back to blue */
.hero, .page-hero, .section--navy, .panel--photo, .panel--rays, .give-card, .site-footer, .dash-side, .chat-head, .viewer, .contact-book, .card--navy { --focus: var(--sky); }
.card, .form-card, .event-box, .give-box, .legal, .book-app, .dash-card, .admin-card, .chat-panel { --focus: var(--link); }
.card--navy { --focus: var(--sky); }

.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 var(--gutter); }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 16px; top: -100px; z-index: 100; padding: 10px 16px; border-radius: 10px; background: var(--navy); color: #fff; font-weight: 600; text-decoration: none; }
.skip:focus { top: 12px; }

/* ---------- type helpers ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px; margin: 0 0 18px;
  font: 600 0.76rem/1.2 var(--sans); letter-spacing: 0.16em; text-transform: uppercase; color: var(--link);
}
.eyebrow--sky { color: var(--sky); }
.hero .eyebrow { text-wrap: balance; }
.lede { font-size: clamp(1.06rem, 1.3vw, 1.18rem); line-height: 1.65; color: var(--text); max-width: 60ch; }
.lede--muted { color: var(--muted); }
.fineprint { margin: 22px 0 0; color: var(--muted); font-size: 0.95rem; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.55em; min-height: 50px; padding: 0 24px;
  border: 1.5px solid transparent; border-radius: 999px; font: 600 0.98rem/1 var(--sans); letter-spacing: 0.005em;
  text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s, color 0.2s, transform 0.2s var(--ease), box-shadow 0.2s;
}
.btn:active { transform: translateY(1px); }
.btn .icon { flex: none; }
.btn-sm { min-height: 42px; padding: 0 20px; font-size: 0.93rem; }
.btn-navy { background: var(--navy); color: #fff; }
.btn-navy:hover { background: var(--navy-80); box-shadow: 0 8px 20px -10px rgba(0, 20, 52, 0.7); }
.btn-sky { background: var(--sky); color: var(--navy); }
.btn-sky:hover { background: var(--sky-strong); box-shadow: 0 10px 24px -12px rgba(140, 200, 252, 0.9); }
.btn-outline { background: #fff; border-color: var(--line-2); color: var(--ink); }
.btn-outline:hover { border-color: var(--navy); }
.btn-ghost { border-color: rgba(201, 220, 245, 0.45); color: #fff; }
.btn-ghost:hover { border-color: #fff; background: rgba(255, 255, 255, 0.07); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 60; background: rgba(255, 255, 255, 0.94);
  -webkit-backdrop-filter: saturate(1.6) blur(14px); backdrop-filter: saturate(1.6) blur(14px);
  border-bottom: 1px solid transparent; transition: border-color 0.25s, box-shadow 0.25s;
}
.site-header.is-scrolled { border-bottom-color: var(--line); box-shadow: 0 10px 30px -24px rgba(0, 20, 52, 0.45); }
.nav { position: relative; display: flex; align-items: center; gap: 20px; min-height: var(--header-h); }
.brand { display: flex; flex: 1 1 auto; align-items: center; gap: 12px; margin-right: auto; color: var(--navy); text-decoration: none; min-width: 0; }
.brand .mark { flex: none; width: 42px; height: 42px; color: var(--navy); }
/* The church's name and its motto, each on one straight line (the pastor's wish, 22 Nov 2026), as wide as each other:
   the words take the room beside the logo (container query units: the Live and Menu buttons beside them on a phone),
   up to their full size. The name keeps one letter shape at every size (font-optical-sizing: none), so 7.45cqi always
   fits it with a little to spare; the motto at 0.614 of the name, tracked 0.14em, is exactly as wide. The header, the
   footer and the app's top bar all use these. */
.brand-text { --brand-max: 1.14rem; --brand-fit: min(var(--brand-max), 7.45cqi); display: flex; flex: 1 1 auto; flex-direction: column; min-width: 0; container-type: inline-size; }
.brand-name { font: 600 var(--brand-fit)/1.15 var(--serif); font-optical-sizing: none; letter-spacing: -0.005em; color: var(--navy); }
.brand-sub { margin-top: 4px; font: 600 calc(var(--brand-fit) * 0.614)/1.2 var(--sans); letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
@container (max-width: 169px) { .brand-sub { display: none; } }   /* a narrow phone with the Live button too: the motto would be too small to read */
.menu { display: flex; align-items: center; gap: 2px; margin: 0; padding: 0; list-style: none; }
.menu a:not(.btn) {
  position: relative; display: block; padding: 10px 13px; border-radius: 10px;
  color: var(--text); font: 500 0.95rem/1 var(--sans); text-decoration: none; transition: color 0.2s, background-color 0.2s;
}
.menu a:not(.btn):hover { color: var(--navy); background: var(--soft); }
.menu a:not(.btn)[aria-current="page"] { color: var(--navy); font-weight: 600; }
.menu a:not(.btn)[aria-current="page"]::after { content: ""; position: absolute; left: 13px; right: 13px; bottom: 3px; height: 2px; border-radius: 2px; background: var(--navy); }   /* sky is for dark backgrounds */
.menu-cta { margin-left: 8px; }   /* Book a call and Give, at the end of the menu */
/* a drop-down whose other pages are all switched off (Admin > Settings): no arrow and no list, just the word's own link */
.menu-drop:not(:has(.menu-sub li:not(.menu-sub-same))) :is(.menu-drop-btn, .menu-sub) { display: none !important; }
.menu-book { margin-left: 14px; }
.menu-cta .btn[aria-current="page"] { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--navy); }   /* the page you are on */
/* Sermons stands out: a small play mark in link blue before the word */
.menu a.menu-watch { display: flex; align-items: center; gap: 7px; color: var(--navy); font-weight: 600; }
.menu-play { display: inline-grid; flex: none; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: var(--link); color: #fff; }
.menu-play .icon { margin-left: 1px; }
.menu a.menu-watch:hover .menu-play { background: var(--navy); }
.menu-toggle {
  display: none; align-items: center; gap: 10px; min-height: 44px; padding: 0 16px; border: 1px solid var(--line-2);
  border-radius: 999px; background: #fff; color: var(--navy); font: 600 0.93rem/1 var(--sans); cursor: pointer;
}
.menu-bars { position: relative; width: 18px; height: 12px; }
.menu-bars::before, .menu-bars::after, .menu-bars span {
  content: ""; position: absolute; left: 0; width: 18px; height: 2px; border-radius: 2px; background: currentColor;
  transition: transform 0.25s var(--ease), opacity 0.2s;
}
.menu-bars::before { top: 0; } .menu-bars span { top: 5px; } .menu-bars::after { top: 10px; }
.menu-toggle[aria-expanded="true"] .menu-bars::before { transform: translateY(5px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-bars span { opacity: 0; }
.menu-toggle[aria-expanded="true"] .menu-bars::after { transform: translateY(-5px) rotate(-45deg); }

.menu a:not(.btn) { white-space: nowrap; }   /* a label never breaks in two */
/* A dropdown in the menu (build.py NAV_MORE: Sermons opens to Sermons and Pastoral Notes; public/main.js). On a wide
   screen the arrow beside the word opens it, and so does pointing at the word; each row has an icon and a line about
   the page. The panel's padding above its card bridges the gap, so moving the pointer down to it keeps it open. In the
   phone menu the rows sit under the word, without the first one (the word is that same link). */
.menu-drop { position: relative; display: flex; align-items: center; }
.menu a.is-inside { color: var(--navy); font-weight: 600; }   /* on a page from the dropdown, the word shows it */
.menu a.is-inside::after { content: ""; position: absolute; left: 13px; right: 13px; bottom: 3px; height: 2px; border-radius: 2px; background: var(--navy); }
.menu-drop-btn { display: inline-grid; place-items: center; width: 26px; height: 32px; margin-left: -10px; padding: 0; border: 0; border-radius: 8px; background: none; color: var(--muted); cursor: pointer; transition: color 0.15s, background-color 0.15s; }
.menu-drop-btn:hover, .menu-drop.is-open .menu-drop-btn { color: var(--navy); background: var(--soft); }
.menu-drop-btn .icon { transition: transform 0.2s var(--ease); }
.menu-drop.is-open .menu-drop-btn .icon { transform: rotate(180deg); }
.menu-sub { position: absolute; top: 100%; left: 0; z-index: 70; display: none; width: 340px; margin: 0; padding: 14px 8px 8px; list-style: none; }
.menu-sub::before { content: ""; position: absolute; inset: 6px 0 0; z-index: -1; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); box-shadow: var(--shadow); }
.menu-drop.is-open .menu-sub { display: grid; gap: 2px; }
@media (hover: hover) and (min-width: 1200px) {
  .menu-drop:hover .menu-sub { display: grid; gap: 2px; }
  .menu-drop:hover .menu-drop-btn .icon { transform: rotate(180deg); }
}
.menu .menu-sub a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; white-space: normal; }
.menu .menu-sub a:hover { background: var(--soft); }
.menu .menu-sub a[aria-current="page"] { background: var(--sky-10); }
.menu .menu-sub a[aria-current="page"]::after { display: none; }
.menu-sub .tile-icon { flex: none; width: 40px; height: 40px; margin: 0; }
.menu-sub-text { display: grid; gap: 2px; }
.menu-sub-text strong { color: var(--navy); font-weight: 600; }
.menu-sub-text span { color: var(--muted); font-size: 0.85rem; font-weight: 400; line-height: 1.35; }
@media (max-width: 1199px) {
  .menu-drop { display: block; }
  .menu-drop-btn, .menu-sub-same, .menu-sub .tile-icon, .menu-sub-text span { display: none; }
  .menu-sub { position: static; display: grid; width: auto; padding: 0 0 0 22px; }
  .menu-sub::before { display: none; }
  .menu .menu-sub a { padding: 14px 12px; border-radius: 0; }
  .menu a.is-inside::after { left: 0; right: auto; top: 14px; bottom: 14px; width: 3px; height: auto; }
}
@media (max-width: 1199px) {   /* below 1200px the menu folds into the Menu button (the two buttons need the room) */
  .menu-toggle { display: inline-flex; }
  .site-nav {
    position: absolute; top: 100%; left: 0; right: 0; display: none; padding: 10px var(--gutter) 22px;
    background: #fff; border-bottom: 1px solid var(--line); box-shadow: 0 24px 40px -24px rgba(0, 20, 52, 0.4);
  }
  .site-nav.is-open { display: block; }
  .menu { flex-direction: column; align-items: stretch; gap: 0; }
  .menu a:not(.btn) { padding: 15px 12px; font-size: 1.05rem; border-bottom: 1px solid var(--line); border-radius: 0; }
  .menu a:not(.btn)[aria-current="page"]::after { left: 0; right: auto; top: 14px; bottom: 14px; width: 3px; height: auto; }
  .menu-cta { margin: 10px 0 0; }
  .menu-book { margin-top: 16px; }
  .menu-cta .btn { width: 100%; min-height: 50px; }
}
@media (max-width: 520px) {
  :root { --header-h: 68px; }
  .site-header .nav { gap: 10px; padding-inline: 14px; }   /* more room for the name beside the buttons */
  .brand { gap: 10px; }
  .brand .mark { width: 36px; height: 36px; }
  .brand-text { --brand-max: 1rem; }
  .site-header .brand-sub { margin-top: 3px; }
  .menu-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .menu-toggle { padding: 0 12px; }
}

/* The name bar (the pastor's wish, 21 Nov 2026): navy, the logo's colour, with the church's name in white and the motto
   in gold; the menu in light text, Book a call and Watch live as light outlines, Give in gold. The drop-down's card stays
   white on a wide screen; the phone menu opens as a navy panel. */
.site-header { background: rgba(0, 20, 52, 0.97); color: #fff; }
.site-header.is-scrolled { border-bottom-color: rgba(201, 220, 245, 0.12); box-shadow: 0 12px 30px -20px rgba(0, 0, 0, 0.7); }
.brand, .brand-name { color: #fff; }
.brand .mark { color: var(--sky); }
.brand-sub { color: var(--gold); }
.menu a:not(.btn) { color: var(--on-navy); }
.menu a:not(.btn):hover { color: #fff; background: rgba(255, 255, 255, 0.08); }
.menu a:not(.btn)[aria-current="page"], .menu a.is-inside, .menu a.menu-watch { color: #fff; }
.menu a:not(.btn)[aria-current="page"]::after, .menu a.is-inside::after { background: var(--gold); }
.menu-play { background: var(--sky); color: var(--navy); }
.menu a.menu-watch:hover .menu-play { background: #fff; }
.menu-drop-btn { color: var(--on-navy); }
.menu-drop-btn:hover, .menu-drop.is-open .menu-drop-btn { color: #fff; background: rgba(255, 255, 255, 0.08); }
.site-header .menu-book .btn, .site-header .btn-live { border-color: rgba(201, 220, 245, 0.45); background: transparent; color: #fff; }
.site-header .menu-book .btn:hover, .site-header .btn-live:hover { border-color: rgba(201, 220, 245, 0.8); background: rgba(255, 255, 255, 0.08); }
.site-header .menu-give .btn { border-color: var(--gold); background: var(--gold); color: var(--navy); }
.site-header .menu-give .btn:hover { border-color: #f3d78f; background: #f3d78f; }
.menu-cta .btn[aria-current="page"] { box-shadow: 0 0 0 2px var(--navy), 0 0 0 4px var(--gold); }
.menu-toggle { border-color: rgba(201, 220, 245, 0.45); background: transparent; color: #fff; }
.header-live { border-color: rgba(201, 220, 245, 0.45); background: transparent; color: #fff; }
@media (min-width: 1200px) {
  .menu .menu-sub a { color: var(--text); }
  .menu .menu-sub a:hover { color: var(--navy); background: var(--soft); }
}
@media (max-width: 1199px) {
  .site-nav { background: var(--navy); border-bottom-color: rgba(201, 220, 245, 0.12); }
  .menu a:not(.btn) { border-bottom-color: rgba(201, 220, 245, 0.12); }
  .menu .menu-sub a { color: var(--on-navy); }
  /* the drop-down's rows (Sermons: Watch live, Pastoral Notes) in the link's own light colour: their navy words, right
     on the white card of a wide screen, were invisible on the navy panel (22 Nov 2026) */
  .menu-sub-text strong { color: inherit; font-weight: inherit; }
  .menu .menu-sub a:hover { color: #fff; background: rgba(255, 255, 255, 0.08); }
  .menu .menu-sub a[aria-current="page"] { color: #fff; }
}

/* ---------- hero ---------- */
.hero, .page-hero { position: relative; overflow: hidden; overflow: clip; isolation: isolate; background: var(--navy); color: #fff; }   /* clip: the watermark that hangs below must never make the panel scroll */
.hero::before, .page-hero::before {
  content: ""; position: absolute; inset: 0; z-index: -2;
  background:
    radial-gradient(900px 520px at 88% 6%, rgba(140, 200, 252, 0.20), transparent 62%),
    radial-gradient(760px 560px at -6% 108%, rgba(31, 95, 174, 0.42), transparent 62%);
}
.hero-tree { position: absolute; z-index: -1; right: -7%; bottom: -24%; width: min(64vw, 760px); height: auto; aspect-ratio: 1; color: var(--sky); opacity: 0.06; pointer-events: none; }
.hero-title {
  color: #fff; margin: 0 0 24px; font: 500 clamp(2.5rem, 5.4vw, 4.4rem)/1.04 var(--serif);
  letter-spacing: -0.022em; text-wrap: balance;
}
.hero-title--long { font-size: clamp(2.1rem, 4.2vw, 3.5rem); line-height: 1.1; }   /* a sermon's or an event's own title */
.hero-title em {
  display: block; margin-top: 0.14em; font-style: italic; font-size: 0.8em; letter-spacing: 0.012em;
  text-transform: uppercase; color: var(--sky);   /* "IN JESUS' NAME" in capitals, as the pastor wrote it */
}
.hero .lede { color: var(--on-navy); margin-bottom: 34px; }
/* "Join us this Sunday" card */
.visit-card {
  position: relative; padding: clamp(28px, 3.4vw, 44px); border: 1px solid var(--on-navy-line); border-radius: var(--leaf);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.03)); box-shadow: var(--shadow-lg);
}
.visit-card-mark { position: absolute; top: clamp(26px, 3.2vw, 40px); right: clamp(26px, 3.2vw, 40px); width: 46px; height: 46px; color: var(--sky); }
.visit-card-label { margin: 0 0 18px; font: 600 0.74rem/1.2 var(--sans); letter-spacing: 0.16em; text-transform: uppercase; color: var(--sky); }
.visit-card-title { margin: 0; color: #fff; font: 500 clamp(1.5rem, 2.2vw, 1.85rem)/1.2 var(--serif); }
.visit-card-time { margin: 8px 0 28px; color: var(--sky); font: 500 clamp(3.6rem, 6vw, 4.8rem)/1 var(--serif); letter-spacing: -0.02em; }
.visit-card-time span { margin-left: 10px; color: var(--on-navy); font: 600 1rem/1 var(--sans); letter-spacing: 0.1em; }
.visit-card-list { display: grid; gap: 14px; margin: 0; padding: 24px 0 0; list-style: none; border-top: 1px solid var(--on-navy-line); }
.visit-card-list li { display: flex; align-items: flex-start; gap: 14px; color: var(--on-navy); line-height: 1.5; }
.visit-card-list .icon { flex: none; margin-top: 2px; color: var(--sky); }
@media (max-width: 979px) { .visit-card { max-width: 600px; } }

/* ---------- sections ---------- */
.section { padding: var(--section) 0; }
.section--soft { background: var(--soft); }
.section--navy { position: relative; overflow: hidden; isolation: isolate; background: var(--navy); color: #fff; }
.section-head { margin-bottom: clamp(36px, 4vw, 52px); }
.section-head h2 { margin-bottom: 0; }
.section-head h1 { margin: 0; font: 500 clamp(2.3rem, 4.4vw, 3.5rem)/1.06 var(--serif); letter-spacing: -0.02em; text-wrap: balance; }   /* a page whose first panel is its page top (Services) */
.section--top { padding-top: clamp(44px, 6vw, 80px); }   /* that first panel sits as close to the header as a page top does */
.section--top .section-head { margin-bottom: clamp(28px, 3.4vw, 44px); }
.section-head--split { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px 48px; align-items: end; }
.section-head--split .lede { margin: 0; }
.section-head-aside .actions { margin-top: 22px; }
@media (min-width: 900px) { .section-head--split { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* weekly schedule */
.schedule { display: grid; gap: 16px; margin: 0; padding: 0; list-style: none; grid-template-columns: 1fr; }
.slot {
  display: flex; flex-direction: column; padding: 26px 24px 28px; background: #fff; border: 1px solid var(--line);
  border-radius: var(--r); box-shadow: var(--shadow-sm);
}
.slot-day { margin: 0 0 14px; font: 600 0.74rem/1 var(--sans); letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.slot-time { margin: 0 0 16px; font: 500 2.35rem/1 var(--serif); letter-spacing: -0.015em; color: var(--navy); }
.slot-time span { margin-left: 6px; font: 600 0.8rem/1 var(--sans); letter-spacing: 0.08em; color: var(--muted); }
.slot-name { margin: 0; font: 600 1.05rem/1.3 var(--sans); color: var(--ink); }
.slot-note { margin: 6px 0 0; font-size: 0.93rem; color: var(--muted); }
.slot--featured { position: relative; overflow: hidden; background: var(--navy); border-color: var(--navy); border-radius: var(--leaf-sm); }
.slot--featured .slot-day, .slot--featured .slot-note, .slot--featured .slot-time span { color: var(--on-navy); }
.slot--featured .slot-time { color: var(--sky); }
.slot--featured .slot-name { color: #fff; }
@media (min-width: 620px) {
  .schedule { grid-template-columns: repeat(2, 1fr); }
  .slot--featured { grid-column: 1 / -1; }
}
@media (min-width: 1100px) {
  .schedule { grid-template-columns: repeat(5, 1fr); }
  .slot--featured { grid-column: auto; }
}
/* prayer through the week, under the weekly times */
.more-prayer { margin-top: 36px; }
.more-prayer-h { margin: 0 0 14px; font: 600 0.74rem/1.2 var(--sans); letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.prayer-list { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.prayer-item {
  display: flex; align-items: center; gap: 16px; padding: 18px 20px; background: #fff; border: 1px solid var(--line);
  border-radius: var(--r); box-shadow: var(--shadow-sm);
}
.prayer-item .tile-icon { flex: none; margin: 0; }
.prayer-when { display: block; font: 600 0.7rem/1.2 var(--sans); letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.prayer-what { display: block; margin-top: 5px; font: 600 1.02rem/1.3 var(--sans); color: var(--ink); }
.prayer-how { display: block; margin-top: 2px; font-size: 0.93rem; color: var(--muted); }
.prayer-when { text-wrap: balance; }
.fineprint a { white-space: nowrap; }   /* keep phone numbers on one line */
@media (min-width: 900px) { .prayer-list { grid-template-columns: repeat(3, 1fr); } }

/* story */
.story { display: grid; grid-template-columns: minmax(0, 1fr); gap: 48px; align-items: center; }
.story-photo { position: relative; margin: 0; max-width: 520px; }
.story-photo::before {
  content: ""; position: absolute; z-index: -1; inset: 22px -22px -22px 22px; border: 2px solid var(--sky); border-radius: var(--leaf);
}
.story-photo img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--leaf); box-shadow: var(--shadow); }
.story-photo figcaption {
  position: absolute; left: 20px; bottom: 20px; padding: 9px 14px; border-radius: 999px; background: rgba(0, 20, 52, 0.85);
  color: #fff; font: 600 0.85rem/1 var(--sans);
}
.story-copy h2, .visit-copy h2, .connect-copy h2, .give-copy h2 { margin-bottom: 20px; }
.story-copy .lede { color: var(--ink); }
.pastor-bio { margin: 28px 0 0; padding: 26px 28px; background: var(--soft); border: 1px solid var(--line); border-radius: var(--r); }
.pastor-bio h3 { margin: 0 0 10px; font: 500 1.35rem/1.2 var(--serif); color: var(--navy); }
.pastor-bio p { margin: 0; color: var(--text); }
.leaders { display: grid; gap: 16px 28px; margin: 28px 0 0; padding: 0; list-style: none; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.leader { padding-left: 16px; border-left: 2px solid var(--sky); }
.leader strong { display: block; font: 600 1.18rem/1.25 var(--serif); color: var(--navy); }
.leader span { color: var(--muted); font-size: 0.93rem; }
@media (min-width: 980px) { .story { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 88px; } }
@media (max-width: 979px) { .story-photo { margin: 0 22px 22px 0; } }

/* beliefs (navy band) */
.band-tree { position: absolute; z-index: -1; left: -10%; top: -8%; width: min(70vw, 820px); height: auto; aspect-ratio: 1; color: var(--sky); opacity: 0.045; pointer-events: none; -webkit-mask-image: linear-gradient(#000 0 42%, transparent 60%); mask-image: linear-gradient(#000 0 42%, transparent 60%); }
.verse { max-width: 900px; margin: 0 auto clamp(48px, 6vw, 72px); text-align: center; }
.verse blockquote { margin: 0; }
.verse p { margin: 0; font: italic 400 clamp(1.6rem, 3.2vw, 2.55rem)/1.3 var(--serif); letter-spacing: -0.01em; color: #fff; text-wrap: balance; }
.verse figcaption { margin-top: 22px; font: 600 0.76rem/1.4 var(--sans); letter-spacing: 0.16em; text-transform: uppercase; color: var(--sky); }
.pillars { display: grid; gap: 20px; }
.pillar, .values { padding: clamp(28px, 3.4vw, 40px); background: var(--navy-90); border: 1px solid var(--on-navy-line); border-radius: var(--r-lg); }
.pillar .eyebrow { margin-bottom: 16px; }
.pillar-text { margin: 0 0 18px; font: 500 clamp(1.25rem, 1.8vw, 1.45rem)/1.45 var(--serif); color: #fff; }
.pillar-ref { margin: 0; font: 600 0.78rem/1.2 var(--sans); letter-spacing: 0.1em; text-transform: uppercase; color: var(--on-navy); }
.values { margin-top: 20px; }
.values h3 { margin: 0 0 24px; font: 600 0.76rem/1.2 var(--sans); letter-spacing: 0.16em; text-transform: uppercase; color: var(--sky); }
.values ol { display: grid; gap: 24px; margin: 0; padding: 0; list-style: none; counter-reset: value; }
.values li { counter-increment: value; color: var(--on-navy); line-height: 1.6; }
.values li::before { content: "0" counter(value); display: block; margin-bottom: 10px; font: 500 1.7rem/1 var(--serif); color: var(--sky); }
@media (min-width: 860px) { .pillars { grid-template-columns: 1fr 1fr; } }
@media (min-width: 620px) { .values ol { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .values ol { grid-template-columns: repeat(4, 1fr); } }

/* ministries */
.ministries { display: grid; gap: 16px; margin: 0; padding: 0; list-style: none; grid-template-columns: 1fr; }
.ministry { padding: 28px 26px; background: #fff; border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow-sm); }
.ministry h3 { margin: 0 0 8px; color: var(--ink); }
.ministry p { margin: 0; color: var(--muted); font-size: 0.95rem; line-height: 1.6; }
.tile-icon {
  display: grid; place-items: center; width: 46px; height: 46px; margin-bottom: 20px; border-radius: 14px 4px 14px 4px;
  background: var(--sky-10); border: 1px solid var(--sky-20); color: var(--link);
}
@media (min-width: 620px) { .ministries { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .ministries { grid-template-columns: repeat(4, 1fr); } }

/* visit */
.visit { display: grid; grid-template-columns: minmax(0, 1fr); gap: 48px; align-items: center; }
.address-block { margin: 0 0 26px; font-size: 1.12rem; line-height: 1.6; color: var(--text); }
.address-block strong { display: block; margin-bottom: 2px; font: 600 1.35rem/1.3 var(--serif); color: var(--navy); }
.checklist { display: grid; gap: 12px; margin: 0 0 34px; padding: 0; list-style: none; }
.checklist li { position: relative; padding-left: 36px; color: var(--text); }
.checklist li::before {
  content: ""; position: absolute; left: 0; top: 0.15em; width: 24px; height: 24px; border-radius: 50%; background: var(--sky-20)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231f5fae' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 12.5 4 4 8-9'/%3E%3C/svg%3E") center / 14px no-repeat;
}
.map { position: relative; overflow: hidden; aspect-ratio: 4 / 3; border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--soft); box-shadow: var(--shadow); }   /* square enough not to clip Google's own labels */
.map iframe { position: relative; width: 100%; height: 100%; border: 0; }
.map-wait { position: absolute; inset: 0; display: grid; align-content: center; justify-items: center; gap: 8px; padding: 20px; color: var(--muted); text-align: center; }   /* shows until the map arrives */
.map-wait .icon { color: var(--link); }
.map-wait a { font-weight: 600; }
@media (min-width: 980px) { .visit { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 80px; } }

/* stay connected */
.connect { display: grid; grid-template-columns: minmax(0, 1fr); gap: 48px; align-items: center; }
.socials { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; margin: 30px 0 0; padding: 0; list-style: none; max-width: 520px; }
.connect-copy .lede { margin: 0; }
.social {
  display: flex; align-items: center; gap: 16px; padding: 16px 18px; background: #fff; border: 1px solid var(--line);
  border-radius: var(--r); color: var(--ink); text-decoration: none; box-shadow: var(--shadow-sm);
  transition: border-color 0.2s, transform 0.2s var(--ease);
}
.social:hover { border-color: var(--navy); transform: translateX(3px); }
.social-icon { display: grid; place-items: center; flex: none; width: 46px; height: 46px; border-radius: 12px; background: var(--navy); color: #fff; }
.social-text { display: flex; flex: 1 1 auto; flex-direction: column; min-width: 0; }
.social-text strong { font: 600 1rem/1.3 var(--sans); }
.social-text span { color: var(--muted); font-size: 0.9rem; overflow-wrap: anywhere; }
.social-arrow { margin-left: auto; flex: none; color: var(--muted); transition: transform 0.2s var(--ease), color 0.2s; }
.social:hover .social-arrow { color: var(--navy); transform: translateX(3px); }
/* Instagram's own profile embed (same approach as the IJC site). Its height grows with its width:
   about 2/3 of the width for the 3x2 grid of posts plus the profile header, with a little room spare. */
.insta-embed {
  container-type: inline-size; width: 100%; max-width: 540px; justify-self: center; overflow: hidden;
  background: #fff; border: 1px solid var(--line); border-radius: var(--leaf); box-shadow: var(--shadow);
}
.insta-embed iframe { display: block; width: 100%; height: 560px; height: calc(200px + 66.7cqw); border: 0; overflow: hidden; }
@media (min-width: 980px) {
  .connect { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 80px; }
  .insta-embed { justify-self: end; }
}

/* give (15 Nov): a navy card with light rays, three steps and a verse; the Zelle details on a white payment card */
.give-card {
  position: relative; overflow: hidden; isolation: isolate; display: grid; gap: 32px; align-items: center;
  padding: clamp(28px, 5vw, 64px); color: #fff; border-radius: var(--leaf); box-shadow: 0 40px 80px -40px rgba(0, 20, 52, 0.6);
  background:
    radial-gradient(700px 420px at 100% 0%, rgba(124, 92, 230, 0.34), transparent 62%),
    radial-gradient(640px 400px at 0% 100%, rgba(31, 95, 174, 0.45), transparent 62%),
    linear-gradient(160deg, #001434 0%, #031a49 55%, #0a1b55 100%);
}
.give-card::before { /* light rays from the top right, like the church's service graphics */
  content: ""; position: absolute; z-index: -2; top: -520px; right: -440px; width: 1080px; aspect-ratio: 1; pointer-events: none;
  background: repeating-conic-gradient(rgba(140, 200, 252, 0.12) 0deg 3.5deg, transparent 3.5deg 10deg);
  -webkit-mask: radial-gradient(closest-side, #000 18%, transparent 78%); mask: radial-gradient(closest-side, #000 18%, transparent 78%);
}
.band-tree--give { left: auto; right: -12%; top: auto; bottom: -40%; width: min(60vw, 560px); }
.give-card p.eyebrow { color: var(--sky); }
.give-card h2 { color: #fff; margin-bottom: 14px; }
.give-copy > p:not(.eyebrow) { margin: 0; color: var(--on-navy); max-width: 46ch; }
.give-steps { display: grid; gap: 14px; margin: 26px 0 0; padding: 0; list-style: none; counter-reset: give; }
.give-steps li { position: relative; padding-left: 46px; color: var(--on-navy); line-height: 1.5; counter-increment: give; }
.give-steps li::before {
  content: counter(give); position: absolute; left: 0; top: -3px; width: 30px; height: 30px; display: grid; place-items: center;
  border-radius: 50%; background: rgba(140, 200, 252, 0.16); border: 1px solid rgba(140, 200, 252, 0.35);
  color: var(--sky); font: 600 0.9rem/1 var(--sans);
}
.give-steps strong { color: #fff; font-weight: 600; }
.give-verse { margin: 28px 0 0; padding-left: 18px; border-left: 2px solid var(--sky); }
.give-verse p { margin: 0; font: italic 400 1.3rem/1.4 var(--serif); color: #fff; }
.give-verse cite { display: block; margin-top: 6px; font: 600 0.74rem/1.2 var(--sans); font-style: normal; letter-spacing: 0.14em; text-transform: uppercase; color: var(--sky); }
.give-box {
  display: grid; gap: 12px; padding: clamp(22px, 3vw, 30px); background: #fff; color: var(--ink);
  border-radius: var(--r-lg); box-shadow: 0 30px 60px -28px rgba(0, 0, 0, 0.65);
}
.give-box--zelle { justify-items: center; text-align: center; }
.give-box-head { display: flex; align-items: center; gap: 10px; margin: 0; color: var(--muted); font-size: 0.93rem; }
.give-pill { padding: 5px 11px; border-radius: 999px; background: #6d1ed4; color: #fff; font: 700 0.78rem/1 var(--sans); letter-spacing: 0.04em; }
.give-qr { display: block; width: min(100%, 248px); padding: 12px; border: 1px solid var(--line); border-radius: 18px; background: #fff; line-height: 0; }
.give-qr img { display: block; width: 100%; height: auto; }
.give-box-email { display: grid; gap: 4px; width: 100%; padding-top: 14px; border-top: 1px dashed var(--line-2); }
.give-box-label { font: 600 0.72rem/1 var(--sans); letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.give-box-value { font: 500 clamp(1.15rem, 2.2vw, 1.4rem)/1.3 var(--serif); color: var(--navy); overflow-wrap: anywhere; text-decoration: none; }
a.give-box-value:hover { text-decoration: underline; text-underline-offset: 4px; }
.give-box-name { color: var(--muted); font-size: 0.9rem; }
.give-box-actions { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 10px 14px; margin-top: 4px; }
.copy-status { min-height: 1.3em; color: var(--sky); font-size: 0.92rem; font-weight: 500; }
.give-box .copy-status { color: var(--link); }
@media (min-width: 900px) { .give-card { grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.8fr); gap: 56px; } }
/* the home page's short Give section: the words, and a button to the Give page */
@media (min-width: 900px) { .give-card--short { grid-template-columns: minmax(0, 1fr) auto; align-items: end; } }
.give-go { position: relative; }
/* the Give page: who to ask, under the Zelle card */
.give-ask { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 24px; max-width: 760px; margin: clamp(24px, 3vw, 36px) auto 0; }
.give-ask .title-sm { margin-bottom: 4px; }
.give-ask p { margin: 0; color: var(--text); }

/* contact */
.contacts { display: grid; gap: 16px; margin: 0; padding: 0; list-style: none; }
.contact {
  display: flex; flex-direction: column; height: 100%; padding: 28px; background: #fff; border: 1px solid var(--line);
  border-radius: var(--r); color: var(--ink); text-decoration: none; box-shadow: var(--shadow-sm);
  transition: border-color 0.2s, transform 0.2s var(--ease), box-shadow 0.2s;
}
.contact:hover { border-color: var(--navy); transform: translateY(-2px); box-shadow: var(--shadow); }
.contact-label { font: 600 0.74rem/1.2 var(--sans); letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.contact-value { margin: 8px 0 6px; font: 500 1.4rem/1.25 var(--serif); color: var(--navy); overflow-wrap: anywhere; }
.contact-hint { color: var(--muted); font-size: 0.93rem; }
@media (min-width: 620px) { .contacts { grid-template-columns: repeat(2, 1fr); } }

/* schedule cards with a photo of each service (Services page) */
.slot--photo { padding: 0; overflow: hidden; }
.slot-photo { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; background: #0a1430; }
.slot-body { display: flex; flex-direction: column; flex: 1; padding: 22px 22px 26px; }
@media (min-width: 620px) and (max-width: 1099px) {
  .slot--photo.slot--featured { flex-direction: row; }
  .slot--photo.slot--featured .slot-photo { width: 50%; aspect-ratio: auto; min-height: 100%; }
  .slot--photo.slot--featured .slot-body { justify-content: center; padding: 28px 30px; }
}

/* ---------- phones: compact rows ---------- */
@media (max-width: 619px) {
  .slot { display: grid; grid-template-columns: 7.4rem 1fr; column-gap: 16px; align-items: center; padding: 18px 20px; }
  .slot-day { grid-column: 1; grid-row: 1; margin: 0 0 6px; }
  .slot-time { grid-column: 1; grid-row: 2; margin: 0; font-size: 1.8rem; }
  .slot-name { grid-column: 2; grid-row: 1; align-self: end; }
  .slot-note { grid-column: 2; grid-row: 2; align-self: start; margin-top: 4px; }
  .ministry { display: grid; grid-template-columns: 46px 1fr; column-gap: 16px; padding: 20px; }
  .ministry .tile-icon { grid-row: 1 / span 2; margin: 0; }
  .ministry h3 { margin: 2px 0 4px; }
}
@media (max-width: 359px) { .slot { grid-template-columns: 6.3rem 1fr; } .slot-time { font-size: 1.55rem; } }
@media (max-width: 619px) {   /* phones: every service is one short row (a square photo, then the day, time and name), so all five show at once */
  .schedule { gap: 10px; }
  .slot--photo { display: grid; grid-template-columns: 88px minmax(0, 1fr); align-items: center; gap: 0 16px; padding: 10px; }
  .slot--photo .slot-photo { width: 88px; height: 88px; aspect-ratio: 1; border-radius: var(--leaf-sm); }
  .slot--photo .slot-body { display: block; padding: 0 6px 0 0; }
  .slot--photo .slot-day { margin: 0 0 5px; }
  .slot--photo .slot-time { margin: 0 0 5px; font-size: 1.6rem; }
  .slot--photo .slot-name { font-size: 1rem; }
  .slot--photo .slot-note { margin: 2px 0 0; font-size: 0.88rem; }
}
@media (max-width: 519px) {
  .actions .btn { flex: 1 1 auto; }
}

/* ---------- footer ---------- */
.site-footer { background: var(--navy); color: var(--on-navy); padding: clamp(56px, 7vw, 88px) 0 88px; font-size: 0.95rem; }   /* room under the bottom line for the chat button */
.nowrap { white-space: nowrap; }
.footer-grid { display: grid; gap: 40px; }
.brand--light { color: #fff; }
.brand--light .brand-name { color: var(--sky); }   /* same blue as the logo, as the pastor asked */
.brand--light .mark { color: var(--sky); width: 46px; height: 46px; }
.brand--light .brand-sub { color: var(--sky); }
.footer-brand address { margin: 22px 0 14px; line-height: 1.6; }
.footer-brand p { margin: 0; line-height: 1.8; }
.footer-h { margin: 8px 0 18px; font: 600 0.74rem/1.2 var(--sans); letter-spacing: 0.16em; text-transform: uppercase; color: var(--sky); }
.site-footer ul { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.footer-times li { display: grid; line-height: 1.4; }
.footer-times span { color: #fff; font-weight: 500; }
.footer-bottom {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 24px; margin-top: 56px; padding-top: 24px;
  border-top: 1px solid var(--on-navy-line); color: #a9bfdd; font-size: 0.86rem;
}
.footer-legal { margin: 0; }
/* the church on social media: round icon buttons under the contact lines */
.site-footer .footer-social { display: flex; gap: 10px; margin-top: 22px; }
.footer-social-link { display: grid; place-items: center; width: 42px; height: 42px; border: 1px solid var(--on-navy-line); border-radius: 50%; color: #fff; transition: background-color 0.2s, border-color 0.2s; }
.site-footer .footer-social-link:hover { border-color: var(--sky); background: rgba(255, 255, 255, 0.08); text-decoration: none; }
/* the member links in the bottom line: Log in · Create an account, or who is logged in and their links */
.site-footer .footer-account { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 0; }
.footer-account li:not([hidden]) ~ li::before { content: "·"; margin: 0 10px; color: #a9bfdd; }
@media (max-width: 640px) { .site-footer .footer-account { gap: 8px 20px; } .footer-account li:not([hidden]) ~ li::before { content: none; } }   /* a phone: spaced, no dot can start a line */
.footer-account a { color: #fff; }
.footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 36px 24px; }
.footer-brand { grid-column: 1 / -1; }
@media (max-width: 559px) { .footer-grid > :nth-child(2) { grid-column: 1 / -1; } }
@media (min-width: 560px) and (max-width: 1149px) { .footer-brand { grid-column: auto; } }
@media (min-width: 1150px) { .footer-grid { grid-template-columns: 1.5fr 1.1fr 0.8fr 1fr; gap: 40px; } .footer-brand { grid-column: auto; } }

/* ---------- coming-soon and 404 ---------- */
.page-hero { padding: clamp(48px, 6.5vw, 84px) 0; text-align: center; }
.page-hero + .section { padding-top: clamp(40px, 5vw, 64px); }
.hero-tree--page { right: auto; left: 50%; bottom: -55%; transform: translateX(-50%); width: min(90vw, 700px); }
.page-hero-inner { max-width: 760px; }
.page-hero h1 { margin: 18px 0 14px; color: #fff; font: 500 clamp(2.3rem, 5vw, 3.6rem)/1.06 var(--serif); letter-spacing: -0.02em; text-wrap: balance; }
.page-hero .eyebrow { margin-bottom: 0; }
.page-hero .lede { margin: 0 auto; color: var(--on-navy); }

/* ---------- reveal on scroll (added by main.js, so content shows without JS) ---------- */
.reveal [data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
.reveal [data-reveal].is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal [data-reveal] { opacity: 1; transform: none; transition: none; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

/* ---------- panels: every section is a rounded panel with a fully covered background (after clairvo.io) ---------- */
body { background: #e6ecf6; }
.panel {
  position: relative; isolation: isolate; overflow: hidden; overflow: clip;   /* clip (where supported): a panel is never a scroll box, whatever hangs over its edge */
  margin: 0 clamp(8px, 1.3vw, 18px) clamp(8px, 1.3vw, 18px); border-radius: clamp(24px, 3vw, 44px);
}
main > .panel:first-child { margin-top: clamp(8px, 1.3vw, 18px); }
.site-footer { margin: 0 clamp(8px, 1.3vw, 18px) clamp(8px, 1.3vw, 18px); border-radius: clamp(24px, 3vw, 44px); }

/* photo panels: the photo tinted navy to violet, under a fine halftone dot screen */
.panel--photo { background-color: var(--navy); color: #fff; }
.panel--photo::before {
  content: ""; position: absolute; inset: 0; z-index: -3;
  background:
    linear-gradient(110deg, rgba(0, 20, 52, 0.93) 0%, rgba(0, 20, 52, 0.8) 40%, rgba(18, 40, 120, 0.6) 72%, rgba(96, 64, 190, 0.5) 100%),
    var(--photo) center / cover no-repeat;
}
.panel--photo::after {
  content: ""; position: absolute; inset: 0; z-index: -2; pointer-events: none; opacity: 0.6;
  background: radial-gradient(circle, rgba(0, 12, 36, 0.6) 0.9px, transparent 1.3px) 0 0 / 4px 4px;
}
.panel--photo .visit-card { background: rgba(8, 22, 62, 0.45); -webkit-backdrop-filter: blur(14px) saturate(1.3); backdrop-filter: blur(14px) saturate(1.3); }
.panel--photo.section .eyebrow { color: var(--sky); }
.panel--photo.section h2 { color: #fff; }
.panel--photo.section .lede--muted { color: var(--on-navy); }
.panel--photo .ministry {
  background: rgba(255, 255, 255, 0.86); border-color: rgba(255, 255, 255, 0.65);
  -webkit-backdrop-filter: blur(14px) saturate(1.2); backdrop-filter: blur(14px) saturate(1.2);
}

/* ray panels: deep blue with light rays from the top right, like the church's own service graphics */
.panel--rays {
  color: #fff;
  background:
    radial-gradient(900px 520px at 100% 0%, rgba(124, 92, 230, 0.36), transparent 62%),
    radial-gradient(760px 460px at 0% 100%, rgba(31, 95, 174, 0.5), transparent 62%),
    linear-gradient(160deg, #001434 0%, #031a49 55%, #0a1b55 100%);
}
.panel--rays::before {
  content: ""; position: absolute; z-index: -1; top: -560px; right: -420px; width: 1100px; aspect-ratio: 1; pointer-events: none;
  background: repeating-conic-gradient(rgba(140, 200, 252, 0.13) 0deg 3.5deg, transparent 3.5deg 10deg);
  -webkit-mask: radial-gradient(closest-side, #000 18%, transparent 78%); mask: radial-gradient(closest-side, #000 18%, transparent 78%);
}
.panel--dark .eyebrow { color: var(--sky); }
.panel--dark h1, .panel--dark h2 { color: #fff; }
.panel--dark .lede--muted, .panel--dark .fineprint, .panel--dark .more-prayer-h { color: var(--on-navy); }
.panel--dark .fineprint a { color: var(--sky); }
.panel--dark .slot, .panel--dark .prayer-item {
  background: rgba(255, 255, 255, 0.07); border-color: rgba(140, 200, 252, 0.22); box-shadow: none;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.panel--dark .slot-day, .panel--dark .slot-note, .panel--dark .slot-time span, .panel--dark .prayer-when, .panel--dark .prayer-how { color: var(--on-navy); }
.panel--dark .slot-time, .panel--dark .slot-name, .panel--dark .prayer-what { color: #fff; }
.panel--dark .slot--featured { background: linear-gradient(150deg, #8cc8fc 0%, #b5c4ff 100%); border-color: transparent; }
.panel--dark .slot--featured .slot-day, .panel--dark .slot--featured .slot-note, .panel--dark .slot--featured .slot-time span,
.panel--dark .slot--featured .slot-time, .panel--dark .slot--featured .slot-name { color: var(--navy); }
.panel--dark .tile-icon { background: rgba(140, 200, 252, 0.14); color: var(--sky); border-color: transparent; }

/* light panels: soft blue, never plain white, with a faint dot texture toward the bottom */
.panel--tint { background: linear-gradient(180deg, #f7faff 0%, #eaf1fd 100%); }
.panel--sky {
  background:
    radial-gradient(820px 440px at 100% 0%, rgba(140, 200, 252, 0.32), transparent 65%),
    radial-gradient(720px 420px at 0% 100%, rgba(170, 150, 255, 0.2), transparent 62%),
    linear-gradient(180deg, #f3f7ff 0%, #e8effd 100%);
}
/* colour bands from the church's fliers (the pastor's wish, 21 Nov 2026): gold, green and rose, light enough for dark text */
.panel--gold {
  background:
    radial-gradient(820px 440px at 100% 0%, rgba(236, 200, 107, 0.5), transparent 65%),
    radial-gradient(720px 420px at 0% 100%, rgba(180, 123, 42, 0.22), transparent 62%),
    linear-gradient(180deg, #fff8e8 0%, #fbe6b6 100%);
}
.panel--green {
  background:
    radial-gradient(820px 440px at 100% 0%, rgba(123, 152, 62, 0.34), transparent 65%),
    radial-gradient(720px 420px at 0% 100%, rgba(54, 87, 12, 0.16), transparent 62%),
    linear-gradient(180deg, #f5faec 0%, #dcecc3 100%);
}
.panel--rose {
  background:
    radial-gradient(820px 440px at 100% 0%, rgba(214, 75, 70, 0.26), transparent 65%),
    radial-gradient(720px 420px at 0% 100%, rgba(125, 2, 2, 0.12), transparent 62%),
    linear-gradient(180deg, #fff4f2 0%, #f9d8d2 100%);
}
.panel--gold .eyebrow { color: var(--gold-deep); }
.panel--green .eyebrow { color: var(--green-deep); }
.panel--rose .eyebrow { color: var(--red-deep); }
.panel--tint::after, .panel--sky::after, .panel--gold::after, .panel--green::after, .panel--rose::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(circle, rgba(31, 95, 174, 0.12) 0.9px, transparent 1.3px) 0 0 / 7px 7px;
  -webkit-mask: linear-gradient(180deg, transparent 35%, #000 100%); mask: linear-gradient(180deg, transparent 35%, #000 100%);
}

/* highlighted words, like the reference: a sky-to-violet marker behind key phrases */
mark.hl {
  padding: 0 0.14em; border-radius: 0.14em; color: var(--navy); font-style: inherit; white-space: nowrap;
  background: linear-gradient(90deg, #8cc8fc 0%, #b9a6ff 100%);
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}

/* "Our story / Meet Pastor Robinson" on the preaching photo: light text, frosted bio card */
.panel--photo .story-copy p, .panel--photo .story-copy .lede { color: var(--on-navy); }
.panel--photo .story-copy .lede { color: #fff; }
.panel--photo .pastor-bio {
  background: rgba(255, 255, 255, 0.08); border-color: rgba(140, 200, 252, 0.25);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}
.panel--photo .pastor-bio h3, .panel--photo .leader strong { color: #fff; }
.panel--photo .leader span { color: var(--on-navy); }

/* ---------- Sermons (a blog) ---------- */
.page-hero-inner .actions { justify-content: center; margin-top: 26px; }
.player-frame { position: relative; margin-top: 18px; aspect-ratio: 16 / 9; border-radius: var(--r-lg); overflow: hidden; background: #0a1430; box-shadow: var(--shadow); }
.player-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
/* the search box in the tools over a list (.list-tools, with the standard parts) */
.search { display: block; flex: 1 1 280px; max-width: 420px; margin: 0; }
.search input {
  width: 100%; min-height: var(--control-sm); padding: 0 18px; border: 1px solid var(--field-line); border-radius: var(--r-pill);
  background: var(--surface); color: var(--ink); font: 400 1rem/1.2 var(--sans);
}
.search input::placeholder { color: var(--muted); }
.blog { display: grid; gap: clamp(36px, 4vw, 48px) 26px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.post { position: relative; display: flex; flex-direction: column; gap: 16px; }
.post-media { display: block; aspect-ratio: 16 / 9; border-radius: var(--r-lg); overflow: hidden; background: #0a1430; box-shadow: var(--shadow-sm); }
.post-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s var(--ease); }
.post:hover .post-media img { transform: scale(1.03); }
.post-media--blank { display: grid; place-items: center; background: radial-gradient(120% 90% at 85% 0%, rgba(140, 200, 252, 0.32), transparent 60%), linear-gradient(150deg, #0a1f4d, #1d2f78 55%, #4b2f9e); }
.post-media--blank .mark { width: 22%; height: auto; color: #fff; fill: currentColor; opacity: 0.55; }
.post-body { display: flex; flex: 1; flex-direction: column; gap: 8px; }
.post-meta { margin: 0; font: 600 0.72rem/1.4 var(--sans); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.post-title { margin: 0; font: 500 1.45rem/1.25 var(--serif); color: var(--navy); }
.post-title a { color: inherit; text-decoration: none; }
.post-title a::after { content: ""; position: absolute; inset: 0; border-radius: var(--r-lg); }
.post-title a:focus-visible { outline: none; }
.post-title a:focus-visible::after { outline: 2px solid var(--link); outline-offset: 6px; }
.post:hover .post-title a { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.post-excerpt { margin: 0; color: var(--text); line-height: 1.6; }
.post-refs { margin: 0; color: var(--muted); font: 500 0.88rem/1.4 var(--sans); }
.post-more { margin-top: auto; padding-top: 4px; font-weight: 600; color: var(--link); }
.post-more::after { content: " \2192"; }
.post--featured { grid-column: 1 / -1; }
/* Sermons: the kind of service on each sermon, and the links that show one kind */
@media (min-width: 900px) {
  .post--featured { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 40px; align-items: center; }
  .post--featured .post-title { font-size: clamp(1.9rem, 2.6vw, 2.5rem); }
  .post--featured .post-excerpt { font-size: 1.08rem; }
}
.blog-empty { max-width: 620px; margin: 0 auto; padding: clamp(28px, 4vw, 44px); text-align: center; background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); }
.blog-empty h3 { margin: 0 0 10px; font: 500 1.6rem/1.2 var(--serif); color: var(--navy); }
.blog-empty p { margin: 0 0 22px; color: var(--text); line-height: 1.6; }
.blog-status { margin: 24px 0 0; text-align: center; color: var(--muted); }

/* faded photo panels: the photo washed almost to white, so light and dark panels alternate */
.panel--faded { background-color: #eef3fc; }
.panel--faded::before {
  content: ""; position: absolute; inset: 0; z-index: -3;
  background: linear-gradient(180deg, rgba(247, 250, 255, 0.9) 0%, rgba(236, 242, 253, 0.84) 100%), var(--photo) center / cover no-repeat;
}
.panel--faded::after {
  content: ""; position: absolute; inset: 0; z-index: -2; pointer-events: none;
  background: radial-gradient(circle, rgba(31, 95, 174, 0.13) 0.9px, transparent 1.3px) 0 0 / 5px 5px;
}
.panel--faded .ministry {
  background: rgba(255, 255, 255, 0.8); border-color: rgba(255, 255, 255, 0.95);
  -webkit-backdrop-filter: blur(10px) saturate(1.1); backdrop-filter: blur(10px) saturate(1.1);
}

/* ---------- sermon notes and sermon pages ---------- */
.sermon-post { display: grid; align-items: start; gap: 32px 40px; }
.sermon-video { margin: 0; }
.sermon-main p { margin: 0 0 1.1em; max-width: 68ch; color: var(--text); font-size: 1.08rem; line-height: 1.8; }
/* the side column: two cards (the notes, then the Scripture readings), one pair for each language */
.sermon-side, .sermon-side > [data-lang] { display: grid; gap: 20px; align-content: start; }
.sermon-card { display: grid; gap: 10px; align-content: start; }
.sermon-also { color: var(--muted); font-size: 0.95rem; }
.sermon-side h2 { margin: 14px 0 4px; font: 500 1.25rem/1.2 var(--serif); color: var(--navy); }
.sermon-side h2:first-child { margin-top: 0; }
.sermon-side ul, .sermon-side ol { margin: 0; padding-left: 1.2em; color: var(--text); line-height: 1.6; }
.sermon-side p { margin: 0; color: var(--text); line-height: 1.6; }
.sermon-verse { margin: 0 0 8px; padding: 12px 16px; border-left: 3px solid var(--sky); background: var(--sky-10); border-radius: 0 var(--r) var(--r) 0; }
.sermon-verse p { margin: 0 0 6px; font: italic 400 1.02rem/1.55 var(--serif); color: var(--ink); }
.sermon-verse cite { display: block; font: 600 0.74rem/1.2 var(--sans); font-style: normal; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.sermon-note { grid-column: 1 / -1; }
@media (min-width: 1000px) {   /* the video and the message on the left, the notes and the readings beside them */
  .sermon-post { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }
  .sermon-video, .sermon-main { grid-column: 1; }
  .sermon-side { grid-column: 2; grid-row: 1; }
  .sermon-post--video .sermon-side { grid-row: 1 / span 2; }
}
@media (max-width: 999px) {   /* phones and tablets: the video, the notes, the message, then the Scripture readings */
  .sermon-side, .sermon-side > [data-lang] { display: contents; }
  .sermon-video { order: 1; }
  .sermon-card--notes { order: 2; }
  .sermon-main { order: 3; }
  .sermon-card--scripture { order: 4; }
  .sermon-note { order: 5; }
}
/* a sermon post: back to the list, share, more messages */
.back-link { display: flex; align-items: center; gap: 8px; width: fit-content; margin: 0 auto 18px; color: var(--on-navy); font: 600 0.78rem/1.2 var(--sans); letter-spacing: 0.1em; text-transform: uppercase; text-decoration: none; }
.back-link::before { content: "\2190"; font-size: 1rem; letter-spacing: 0; }
.back-link:hover, .back-link:focus-visible { color: #fff; text-decoration: underline; text-underline-offset: 4px; }
.share { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; max-width: 68ch; margin-top: 36px; padding-top: 24px; border-top: 1px solid var(--line); }
.share-label { font: 600 0.78rem/1.2 var(--sans); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.share-buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.share .copy-status { flex-basis: 100%; min-height: 1.3em; color: var(--link); font-size: 0.92rem; }
.share .copy-status:empty { display: none; }
.more-title { margin: 0 0 clamp(26px, 3vw, 38px); font: 500 clamp(1.8rem, 3vw, 2.4rem)/1.15 var(--serif); color: var(--navy); }
.more-all { margin: clamp(32px, 4vw, 44px) 0 0; text-align: center; }
.panel--glow .post-meta, .panel--glow .post-refs, .panel--glow .post-more { color: var(--navy-80); }
.post-media { position: relative; }
.panel--glow .post-excerpt { color: var(--ink); }

/* ---------- admin ---------- */
/* Admin > Sermons (build.py admin_sermons, public/admin.js), built from the standard parts: these are only where its
   pieces sit. A status line, the tabs, one of four views (Sermons, Being written, Add sermons, Sermon settings), and
   the sermon editor, which is a dialog */
.sermons, .sermon-view, .sermon-settings-side { display: grid; gap: 20px; }
.sermons > *, .sermon-view > * { min-width: 0; }
.sermon-status { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: -8px 0 -4px; color: var(--muted); font-size: 0.92rem; }
.sermon-status-name { color: var(--ink); font-weight: 600; }
.sermon-tabs { justify-self: start; }
.sermon-toolbar { margin-bottom: 6px; }
@media (max-width: 599px) {   /* a phone: the three choices fill the first line; the kind of service and the search share the second */
  .sermon-toolbar > .segmented { display: flex; flex: 1 1 100%; }
  .sermon-toolbar > .segmented > * { flex: 1 1 auto; padding: 0 8px; }
  .sermon-toolbar > .field:not(.toolbar-search) { flex: 0 1 10.5rem; }
}
.sermon-older { margin: 16px 0 0; text-align: center; }
.sermon-summary { margin: 0; color: var(--muted); font-size: 0.92rem; }
.sermon-round { display: flex; align-items: center; gap: 12px; margin: 0 0 12px; }
.sermon-round .meter { flex: 1 1 auto; }
.sermon-round-text { color: var(--muted); font-size: 0.875rem; white-space: nowrap; }
.sermon-written-head:has([aria-expanded="false"]) { margin-bottom: 0; }
.sermon-add .notice { margin: 0; }
@media (min-width: 800px) {
  .sermon-add { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
  .sermon-add > :is(.notice, .sermon-add-wide) { grid-column: 1 / -1; }
}
@media (min-width: 1100px) { .sermon-settings { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); align-items: start; } }
.sermon-auto-label { margin: 0 0 4px; color: var(--ink); font-weight: 600; }
.sermon-settings .dash-switch-row > div { flex: 1 1 220px; }   /* the switch keeps its place at the right, whatever the note under the label says */
.sermon-preacher { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.sermon-connection { margin: 0; }
.sermon-connection + .actions { margin-top: 14px; }
.sermon-editor-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin: 4px 0 0; color: var(--muted); font-size: 0.875rem; }
.sermon-editor [data-editor-title]:focus { outline: none; }
.sermon-editor-lang { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.sermon-part { display: grid; gap: 12px; margin-top: 8px; padding-top: 18px; border-top: 1px solid var(--line); }   /* About this sermon, Start again: after the text */
@media (min-width: 700px) and (max-width: 999px) { .sermon-editor .dash-form-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.sermon-again-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
:is(.sermon-editor-lang, .sermon-again-row) .field-hint { flex: 1 1 260px; margin: 0; }
.draft-flag { display: inline-block; margin: 0 0 14px; padding: 6px 12px; border-radius: var(--r-pill); background: var(--warn-bg); color: var(--warn-fg); font: 600 0.78rem/1.3 var(--sans); letter-spacing: 0.04em; }
.page-hero-inner .draft-flag { display: block; width: fit-content; margin: 0 auto 14px; }

/* the hidden attribute always wins over component display rules (.btn, .admin, …) */
[hidden] { display: none !important; }

/* ---------- members: log in, sign up, your account ---------- */
/* the older form layout, still used by Contact, Book a time and event registration (new forms: .form-stack and .field) */
.form { display: grid; gap: 14px; }
.form label { display: grid; gap: 6px; font-weight: 500; color: var(--ink); }
.form .btn { width: 100%; justify-content: center; }
.optional { font-weight: 400; color: var(--muted); }

/* Log in, Create an account, Reset your password: the leaders' photo with a verse under it on one side, the form on
   the other. The photo is never cut through a face: build.py gives each photo its focus point (--photo-at), the frame
   keeps to shapes that hold the faces whole, and the verse has its own navy ground instead of lying over the photo. */
.auth-split { display: grid; grid-template-columns: minmax(0, 1fr); background: var(--surface); }
.auth-art { position: relative; isolation: isolate; display: flex; flex-direction: column; overflow: hidden; container-type: inline-size; background: linear-gradient(160deg, var(--navy) 0%, var(--navy-80) 100%); color: #fff; }
.auth-photo { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; object-position: var(--photo-at, 50% 30%); background: var(--media);
  border-radius: 0 0 var(--leaf-sm) 0; }   /* the leaf's lower corner only: the panel rounds the top */
.auth-tree { position: absolute; z-index: -1; right: -40px; bottom: -64px; width: min(58%, 340px); height: auto; aspect-ratio: 1; color: var(--sky); opacity: 0.07; pointer-events: none; }
.auth-verse { margin: 0; padding: 12px 20px 14px; }
.auth-verse p { max-width: 34ch; margin: 0; font: italic 400 1.0625rem/1.4 var(--serif); text-wrap: balance; }
.auth-verse cite { display: block; margin-top: 6px; font: 600 0.6875rem/1.2 var(--sans); font-style: normal; letter-spacing: 0.12em; text-transform: uppercase; color: var(--sky); }
.auth-side { display: flex; justify-content: center; padding: 24px clamp(20px, 5vw, 64px) clamp(36px, 6vw, 72px); }
.auth-box { width: 100%; max-width: 420px; min-width: 0; }
.auth-box .eyebrow { display: none; margin-bottom: 12px; }   /* with the photo above the form, the heading comes first */
.auth-title { margin: 0 0 10px; font: 500 clamp(2.1rem, 4vw, 2.75rem)/1.08 var(--serif); letter-spacing: -0.01em; color: var(--navy); text-wrap: balance; }
.auth-lede { margin: 0 0 20px; color: var(--text); line-height: 1.6; }
.auth-sent { margin: 0; color: var(--text); line-height: 1.6; }
.auth-lede[hidden] ~ .auth-forms { margin-top: 18px; }   /* step two: its own words follow the heading */
.auth-row { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 16px; }
.auth-row a { color: var(--link); font-weight: 500; text-underline-offset: 3px; }
.auth-again { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 12px; }
.auth-box .fineprint { margin: 0; font-size: 0.875rem; line-height: 1.5; text-align: center; }   /* the small line under "Create account" */
.auth-switch { margin: 22px 0 0; text-align: center; color: var(--muted); }
/* every small link and switch here is a 44px target, without moving the words */
:is(.auth-row a, .auth-switch a, .auth-box .fineprint a) { display: inline-block; padding: 12px 0; margin: -12px 0; }
.auth-row label.check { min-height: 44px; align-items: center; }
.auth-row label.check input { margin-top: 0; }
:is(.auth-again, .account-more) .btn { min-height: 44px; }
@media (max-width: 899px) and (orientation: landscape) { .auth-photo { display: none; } }   /* a phone held sideways, or a short window: the photo would fill it, so the form comes first */
@media (min-width: 600px) and (max-width: 899px) {
  .auth-verse { padding: 18px 28px 20px; }
  .auth-verse p { font-size: 1.2rem; }
  .auth-side { padding-top: 32px; }
}
@media (min-width: 900px) {
  .auth-split { grid-template-columns: repeat(2, minmax(0, 1fr)); min-height: min(760px, calc(100vh - var(--header-h) - 36px)); }
  .auth-photo { flex: 1000 1 0; min-height: 52cqi; max-height: 140cqi; aspect-ratio: auto; border-radius: var(--leaf); border-top-left-radius: 0; border-top-right-radius: 0; border-bottom-left-radius: 0; }
  .auth-verse { display: flex; flex: 1 0 auto; flex-direction: column; justify-content: center; padding: clamp(26px, 3vw, 40px) clamp(28px, 3.6vw, 52px) clamp(30px, 3.4vw, 48px); }   /* in the middle of whatever navy a long form leaves */
  .auth-verse p { font-size: clamp(1.25rem, 1.8vw, 1.5rem); line-height: 1.45; }
  .auth-verse cite { margin-top: 12px; font-size: 0.74rem; }
  .auth-side { padding-top: clamp(48px, 12vh, 112px); }
  .auth-box .eyebrow { display: inline-flex; }
  .auth-lede { margin-bottom: 24px; }
}

/* Your account: the member's details beside what the account does for them */
.account-panel { min-height: min(720px, 80vh); }   /* room for the cards while they load, so the footer does not jump */
.account-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; max-width: 980px; margin: 0 auto; }
@media (min-width: 860px) { .account-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.form-msg.account-status { margin: 0 0 20px; text-align: center; }
.account-who { margin: 0 0 20px; color: var(--text); line-height: 1.6; }
.account-save { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.account-more { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 14px; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
@media (max-width: 479px) { .account-more { flex-direction: column; align-items: stretch; } }   /* a phone: one under the other, full width */
.account-links .row { position: relative; flex-wrap: nowrap; align-items: flex-start; gap: 14px; padding: 16px 0; }
.account-links .row a::after { content: ""; position: absolute; inset: 0; }   /* the whole row is the link */
.account-links .row:hover a { text-decoration: underline; }
.account-links .row[hidden] + .row { border-top: 0; }
.account-links .tile-icon { margin: 0; }
.account-links a { font-weight: 600; }
.account-links .row-meta { margin-top: 2px; line-height: 1.5; }


/* ---------------------------------------------------------------- contact form (/contact/) and event pages (/events/<slug>/) */
.contact-cta { margin-top: 28px; }
.contact-page { display: grid; gap: 28px; }
@media (min-width: 980px) { .contact-page { grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.65fr); align-items: start; gap: 40px; } }
.form-card { padding: clamp(24px, 4vw, 40px); background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); }
.form-card-title { margin: 0 0 20px; font: 500 clamp(1.5rem, 2.2vw, 1.85rem)/1.2 var(--serif); color: var(--navy); }
.form-row { display: grid; gap: 14px; }
@media (min-width: 620px) { .form-row { grid-template-columns: 1fr 1fr; } }
.form textarea { min-height: 150px; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-done h3 { margin: 0 0 10px; font: 500 1.6rem/1.2 var(--serif); color: var(--navy); }
.form-done p { margin: 0 0 12px; }
.form-done:focus { outline: none; }
.form-done .done-mark { margin-bottom: 16px; }
.form-card:has(.form-done:not([hidden])) .form-card-title { display: none; }   /* "Thank you" stands alone once the message is sent */
.contact-side { display: grid; gap: 16px; }
.contact-side .contacts { grid-template-columns: 1fr; }
.event-box h2 { margin: 0 0 6px; font: 600 0.74rem/1.2 var(--sans); letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
/* Contact: booking a time with the pastor, first in the side column */
.contact-book p { margin: 0 0 16px; color: var(--on-navy); line-height: 1.55; }   /* "Talk with Pastor Robinson": a navy card */

/* Book a time (/book/, /book/manage/), like a scheduling page: Pastor Robinson and what is being booked on one side; on
   the other a row of steps, then a way to meet, a month calendar with the open days and their times, the details and
   the "sent" block. It is built from the standard parts (.steps, .choice, .facts, .step-actions, .field, .notice,
   .empty, .done-mark, .card): the rules here are the page's own layout. What is inside the card goes by the card's
   width, not the window's (.book-main is a size container), so nothing is cramped between a phone and a laptop. */
.page-hero--compact + .section { padding-top: clamp(28px, 4vw, 48px); }
.page-hero--compact + .book-section { padding-top: clamp(20px, 2.4vw, 32px); }   /* the card starts high: it is what the page is for */
.book-section { overflow: clip; }   /* cut at the panel's corners like "hidden", but a step's main button can stick to the bottom of a phone screen */
/* The card. One column, about 640px wide: the summary is a strip above the rest (a booking's own page keeps this at every
   width: there is less on it). .book-app--wide, the page with the steps, puts the summary beside them on a wide screen.
   --book-pad is the card's side padding, shared by the band, the strip and the steps so their left edges line up. */
.book-app { --book-pad: 18px; display: grid; grid-template-columns: minmax(0, 1fr); max-width: 640px; margin: 0 auto; overflow: hidden; overflow: clip; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow); }
.book-app--wide { max-width: 1040px; }
.book-app--alone .book-host { display: none; }   /* a link that is wrong or cut short: the message alone */
.book-app a[href^="tel:"] { white-space: nowrap; }   /* a phone number stays on one line */

/* the summary: Pastor Robinson, then what is booked as it is chosen */
.book-host { display: grid; align-content: start; gap: 12px; padding: 16px var(--book-pad); border-bottom: 1px solid var(--line); background: var(--soft); }
.book-host-who { display: flex; align-items: center; gap: 12px; }
.book-host-photo { flex: none; width: 48px; height: 48px; border-radius: 18px 6px 18px 6px; object-fit: cover; background: var(--sky-10); }
.book-host .title-md { margin: 0; font-size: 1.25rem; }
.book-host .facts > li { font-size: 0.95rem; }
.book-fact-icon, .book-fact-icon .book-icon { display: inline-flex; flex: none; }
.book-fact-was { color: var(--muted); }
@media (max-width: 1039px) {   /* the steps on phones and tablets: one compact strip above them */
  .book-app:is([data-at="kind"], [data-at="time"], [data-at="details"]) .book-host { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 24px; }
  .book-app:is([data-at="kind"], [data-at="time"], [data-at="details"]) .book-facts { display: flex; flex-wrap: wrap; gap: 6px 18px; }
  /* nothing above the calendar changes height while a time is being chosen: the step's main button names the choice */
  .book-app:is([data-at="kind"], [data-at="time"]) .book-facts > :is([data-fact="when"], [data-fact="zone"]) { display: none; }
}
@media (min-width: 1040px) {   /* the steps on a wide screen: the summary is a column beside them */
  .book-app--wide { grid-template-columns: 290px minmax(0, 1fr); }
  .book-app--wide .book-host { gap: 24px; padding: 30px 26px; border-right: 1px solid var(--line); border-bottom: 0; }
  .book-app--wide .book-host-who { display: grid; gap: 16px; }
  .book-app--wide .book-host-photo { width: 72px; height: 72px; border-radius: var(--leaf-sm); }
  .book-app--wide .book-host .title-md { font-size: 1.5rem; }
  .book-app--wide .book-host .facts > li { font-size: inherit; }
}

/* the steps side */
.book-main { container: book / inline-size; min-width: 0; padding: 22px var(--book-pad) 26px; --step-bleed: var(--book-pad); }
.book-loading { margin: 0; color: var(--muted); }
.book-main .book-steps { margin-bottom: 18px; }
.book-steps > li { position: relative; }
.book-steps button::before { content: ""; position: absolute; inset: -9px 0; }   /* a finished step is 44px high to tap, tick and all */
.book-main .book-step-title { margin-bottom: 6px; }
.book-step-title:focus { outline: none; }
.book-step-hint { margin: 0 0 18px; color: var(--muted); line-height: 1.5; }
.book-main .form-msg { scroll-margin-bottom: 110px; }

/* the ways to meet */
.book-types { display: grid; gap: 12px; }

/* the month calendar, the time zone, and the chosen day's times */
.book-picker { display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px; }
.book-cal-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.book-cal-month { margin: 0; color: var(--ink); font-weight: 600; }
.book-cal-week, .book-cal-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); text-align: center; }
.book-cal-week span { padding: 6px 0; color: var(--muted); font: 600 0.7rem/1 var(--sans); letter-spacing: 0.08em; text-transform: uppercase; }
.book-cal-day { display: grid; place-items: center; min-height: 46px; padding: 0; border: 0; background: none; color: var(--muted); font: 400 0.95rem/1 var(--sans); }   /* the whole cell is pressed; the circle is drawn inside it */
.book-cal-num { position: relative; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; transition: background-color 0.15s, color 0.15s; }
button.book-cal-day { color: var(--navy); font-weight: 700; cursor: pointer; }
button.book-cal-day .book-cal-num { background: var(--sky-10); }
@media (hover: hover) { button.book-cal-day:hover .book-cal-num { background: var(--sky-20); } }
button.book-cal-day[aria-pressed="true"] .book-cal-num { background: var(--navy); color: #fff; }
button.book-cal-day:focus-visible { outline: none; }
button.book-cal-day:focus-visible .book-cal-num { outline: 3px solid var(--focus); outline-offset: 2px; }
.book-cal-day.is-today .book-cal-num::after { content: ""; position: absolute; bottom: 5px; left: 50%; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: currentColor; }
.book-zone { margin-top: 16px; }
/* a long name ("India Standard Time, Kolkata (GMT+5:30)") ends in "…" before the arrow. The room for the arrow is the
   standard select's own 44px: that rule is overruled by the one above it there (see the hand-over notes), and this line
   can lose its padding once it is not */
.book-picker .book-cal .book-zone select { padding-right: 44px; text-overflow: ellipsis; }
.book-slots { position: relative; min-width: 0; }
.book-slots-head { margin-bottom: 12px; }
.book-slots-day { margin: 0; color: var(--ink); font-weight: 600; line-height: 1.3; }
.book-slots-count { margin: 2px 0 0; color: var(--muted); font-size: 0.875rem; }
.book-slots-hint { margin: 0; color: var(--muted); font-size: 0.95rem; line-height: 1.5; }
.book-slot-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: 8px; }   /* two across on a phone */
.book-slot-part { grid-column: 1 / -1; margin: 0; }   /* Morning, Afternoon, Evening: no more room than the gap, so a day of 11 or 12 times fits beside the calendar without scrolling */
.book-slot-time .icon { width: 18px; height: 18px; }

/* the details, the "sent" block, a booking's own page */
.book-form .form-row { grid-template-columns: minmax(0, 1fr); align-items: start; }   /* two across by the card's width, below */
.book-form .fineprint { margin: 0; }
.book-form .field :is(input, textarea) { scroll-margin-top: 64px; }   /* a field that is not right yet comes into view with its label (two lines of it on a narrow phone) */
.book-done { display: grid; grid-template-columns: minmax(0, 1fr); justify-items: start; gap: 14px; }
.book-done > *, .book-done .title-lg, .book-after > * { margin: 0; }
.book-done > p { line-height: 1.6; overflow-wrap: anywhere; }   /* a long name or email address breaks inside the card */
.book-after { display: grid; gap: 12px; width: 100%; }
.book-after .facts > li { font-size: 0.95rem; }
.book-mine { display: grid; gap: 18px; }
.book-mine > *, .book-mine > :is(.notice, .form-msg) { margin: 0; }
.book-app > .book-status { grid-column: 1 / -1; margin: 0; padding: 14px var(--book-pad); border-bottom: 1px solid var(--line); border-radius: 0; }   /* how the booking stands: a band across the top of its card */
.book-status:focus, .book-confirm:focus { outline: none; }
.book-mine-note { display: grid; gap: 6px; }
.book-mine-note p { margin: 0; line-height: 1.55; white-space: pre-line; overflow-wrap: anywhere; }
.book-calendar, .book-confirm, .book-again { display: grid; gap: 10px; }
.book-calendar .label, .book-confirm p, .book-again .title-sm { margin: 0; }
.book-app--over .book-facts > li { color: var(--muted); font-weight: 400; }   /* cancelled, declined or past: what was booked, quieter */

/* by the card's own width */
@container book (max-width: 319px) {   /* a narrow phone: the days reach toward the card's edges, so each is about 44px wide to tap */
  .book-cal-week, .book-cal-days { margin-inline: -12px; }
}
@container book (max-width: 289px) {   /* the smallest phones: the days reach the card's edges (43px each on a 360px phone) */
  .book-cal-week, .book-cal-days { margin-inline: calc(var(--book-pad) * -1); }
  .book-cal-num { width: 36px; height: 36px; }
  .book-main .book-steps > li:not(:last-child)::after { margin: 0 6px 0 2px; }
  .book-slot-list { grid-template-columns: 1fr 1fr; }
  .book-slot-time { padding: 0 8px; }
  .book-slot-time .book-icon { display: none; }   /* the filled button says it is chosen */
}
@container book (max-width: 439px) {   /* a phone: only the current step is spelled out (a finished one is its tick), and buttons take the full width */
  .book-steps > li:not([aria-current="step"]) { gap: 0; }
  .book-steps > li:not([aria-current="step"]) > span, .book-steps button > span:first-child { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .book-steps button:focus-visible { outline: none; }
  .book-steps button:focus-visible::before { border-radius: var(--r-sm); outline: 3px solid var(--focus); outline-offset: -3px; }
  .book-main .book-step-title:not(.title-lg) { font-size: 1.375rem; }
  .book-types .choice-end { display: none; }   /* the length is in the strip just above */
  .book-main .actions > .btn { flex: 1 1 100%; }
  .book-main .btn-sm { min-height: var(--control-sm); }   /* thumb size */
}
@container book (min-width: 520px) {
  .book-form .form-row { grid-template-columns: 1fr 1fr; }
}
@container book (min-width: 570px) {   /* room for the times beside the calendar: a long list scrolls there, and shows that it does */
  .book-picker { grid-template-columns: minmax(308px, 440px) minmax(200px, 1fr); gap: 28px; }
  .book-slots { display: flex; flex-direction: column; }
  .book-slots-head { min-height: 44px; margin-bottom: 6px; }
  .book-slot-list { flex: 1 1 0; align-content: start; min-height: 0; margin: -6px -10px -6px -6px; padding: 6px 10px 6px 6px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }   /* the padding keeps a time's focus ring whole */
  .book-slots::after { content: ""; position: absolute; right: 0; bottom: -6px; left: -6px; height: 54px; background: linear-gradient(to bottom, transparent, var(--surface)); opacity: 0; pointer-events: none; }
  .book-slots.has-more::after { opacity: 1; }
}
@container book (min-width: 620px) {   /* a day with many times: two across beside the calendar as well */
  .book-picker.is-long { grid-template-columns: minmax(308px, 1fr) 280px; }
  .book-picker.is-long .book-slot-time { padding: 0 8px; }
}

/* by the window: the padding, and the bar a step ends in */
@media (min-width: 641px) {
  .book-app { --book-pad: clamp(22px, 3vw, 36px); }
  .book-main { padding-block: 26px 30px; }
  .book-main .step-actions .btn { scroll-margin-bottom: 88px; }   /* brought into view, it stops clear of the chat button */
}
@media (max-width: 640px) {
  .book-app { border-radius: var(--r); }
  .book-form .step-actions-main { margin-top: 4px; }
  .book-form .step-actions > .btn-text { order: 1; }   /* under the small print */
  .book-main :is(.choice, .book-cal-day, input, select, textarea) { scroll-margin-bottom: 96px; }   /* reached with the keyboard, they stop above the bar */
}
/* The chat button floats over the card's bottom right corner on every window up to about 1240px wide. While a step's
   main button is down there it stops short of it (--chat-room is how far the chat button reaches into the card);
   booking.js marks the bar .is-clear once it is well above, and the button takes its full place again.
   THESE NUMBERS DESCRIBE THE CHAT BUTTON AS IT IS TODAY (.chat and .chat-launch, near the end of the chat's rules: 20px
   from the corner and about 121px wide with its "Ask us" label, 14px and 52px round up to 640px, hidden under 900px
   while a field in the page has focus). If the chat button changes, change them with it, or better, replace them
   with a hook the chat gives every page (asked for in the hand-over notes). */
.book-main .step-actions-main { transition: padding-right 0.15s; }
body:has(.chat-launch) .book-main .step-actions-main:not(.is-clear) { padding-right: var(--chat-room, 0px); }
@media (max-width: 640px) { .book-main { --chat-room: 48px; } }
@media (min-width: 641px) and (max-width: 1156px) { .book-main { --chat-room: max(0px, calc(141px - clamp(8px, 1.3vw, 18px) - clamp(20px, 4vw, 40px) - clamp(22px, 3vw, 36px))); } }
@media (min-width: 1157px) and (max-width: 1250px) { .book-main { --chat-room: max(0px, calc(625px - 50vw)); } }
/* under 900px the chat button is hidden while a field in the page has focus: the main button takes its full place then */
@media (max-width: 640px) { body:has(main :is(input, textarea, select):focus) .book-main { --chat-room: var(--step-bleed); } }
@media (min-width: 641px) and (max-width: 899px) { body:has(main :is(input, textarea, select):focus) .book-main { --chat-room: 0px; } }

/* Admin > Bookings (build.py admin_bookings, public/bookings.js). The cards, lists, fields and chips are the standard
   parts; these only place a booking's pieces. On a narrow card: the time with the status at its right and the way to
   meet under it, then the name and how to reach them with the row's button at their right, then the lines under them
   (their own time, their words, the note sent, the answer). From 640px of card the time, the person, the status and
   the button are columns that line up down the list, and the lines under them start at the person's column. */
.bookings { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; }
.bookings .notice { margin: 0; }
.bookings-list { container: bookings / inline-size; }
.bookings-list > .booking { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 0 12px; padding: 14px 0; }
.booking-when { display: contents; }
.booking-when .row-title { grid-area: 1 / 1; overflow-wrap: normal; }
.booking .booking-kind { display: flex; grid-area: 2 / 1 / 3 / -1; align-items: center; gap: 6px; }
.booking-kind .icon { flex: none; color: var(--link); }
.booking .booking-status { grid-area: 1 / 2; justify-self: end; margin-top: 3px; }
.booking-who { grid-area: 3 / 1; margin-top: 8px; }
.booking-contact { overflow-wrap: anywhere; }
.booking-contact a[href^="tel:"] { white-space: nowrap; }
.booking-actions { grid-area: 3 / 2; align-self: center; justify-self: end; margin-top: 8px; }
.booking-more { display: grid; grid-column: 1 / -1; gap: 8px; margin-top: 8px; }
.booking-more > p { margin: 0; }
.booking-topic { padding: 10px 14px; border-radius: var(--r-sm); background: var(--soft); color: var(--text); font-size: 0.95rem; line-height: 1.5; white-space: pre-line; overflow-wrap: anywhere; }
.booking-note { background: var(--ok-bg); color: var(--ok-fg); }
/* the answer: a note, then the buttons. Decline is the quiet one and keeps its distance from Confirm */
.booking-answer { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-top: 2px; }
.booking-note-field { flex: 1 1 200px; }
.booking-answer-actions { display: flex; flex: 1 1 auto; align-items: center; justify-content: space-between; gap: 24px; }
@container bookings (min-width: 640px) {
  .bookings-list > .booking { grid-template-columns: 15.5rem minmax(0, 1fr) auto auto; column-gap: 18px; }
  .booking-when { display: block; grid-area: 1 / 1; }
  .booking-who { grid-area: 1 / 2; margin-top: 0; }
  .booking .booking-status { grid-area: 1 / 3; align-self: center; margin-top: 0; }
  .booking-actions { grid-area: 1 / 4; margin-top: 0; }
  .booking-more { grid-column: 2 / -1; }
  .booking-answer-actions { flex: 0 0 auto; justify-content: flex-end; margin-left: auto; }
}
.bookings-past-title:has([aria-expanded="false"]) { margin-bottom: 0; }
/* When people can book: the hours beside the rest where the card has room */
.booking-settings { display: grid; gap: 22px; }
@media (min-width: 900px) { .booking-settings { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); align-items: start; } }
.booking-set { display: grid; gap: 10px; min-width: 0; margin: 0; padding: 0; border: 0; }
.booking-set legend { margin-bottom: 6px; padding: 0; color: var(--ink); font-weight: 500; }
.booking-set .field-hint { margin: 0 0 4px; }
/* the pastor's hours: a row for each day, with blocks of From and To menus and Add time (public/bookings.js) */
.hours-days { display: grid; container-type: inline-size; }
.hours-day { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; padding: 12px 0; border-top: 1px solid var(--line); }
.hours-day:first-child { padding-top: 4px; border-top: 0; }
.hours-day-name { color: var(--ink); font-weight: 600; }
.hours-day-main { display: grid; justify-items: start; gap: 6px; min-width: 0; }
.hours-blocks { display: grid; gap: 8px; width: 100%; }
.hours-block { display: flex; align-items: center; gap: 8px; }
.hours-block select { flex: 1 1 0; min-width: 0; }
.hours-to { flex: none; color: var(--muted); font-size: 0.9rem; }
.hours-none { margin: 0; color: var(--muted); }
.hours-remove { width: 36px; height: 36px; }
.hours-add { margin-left: -10px; }   /* its words line up with the menus above it */
/* a day without times: "Not available" and Add time on one line */
.hours-day:not(:has(.hours-block)) { align-items: center; }
.hours-day-main:not(:has(.hours-block)) { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 18px; }
.hours-day-main:not(:has(.hours-block)) .hours-blocks { width: auto; }
.hours-day-main:not(:has(.hours-block)) .hours-add { margin-left: 0; }
/* the time menus: less room for the arrow, so "10:30 AM" fits on a phone (outranks the standard field rule) */
.hours-days .hours-block select:not([multiple]) { padding-left: 12px; padding-right: 30px; background-position: right 9px center; background-size: 16px; }
@container (min-width: 440px) { .hours-day { grid-template-columns: 7.5em minmax(0, 1fr); column-gap: 14px; } .hours-day:has(.hours-block) .hours-day-name { padding-top: 10px; } }
.booking-day-off { display: flex; flex-wrap: wrap; gap: 8px; }
.booking-day-off input { flex: 1 1 180px; }
.event-post { display: grid; gap: 32px; }
@media (min-width: 1000px) { .event-post { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); align-items: start; gap: 48px; } }
.event-main p { margin: 0 0 1.1em; color: var(--ink); font-size: 1.08rem; }
.event-photo { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; margin-bottom: 26px; border-radius: var(--r-lg); box-shadow: var(--shadow); }
.event-side { display: grid; gap: 20px; }
.event-box { padding: 24px; background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); }
.event-box p { margin: 0 0 18px; color: var(--ink); }
.event-box p:last-child { margin-bottom: 0; }
.event-box p.fineprint { margin: 14px 0 0; }   /* "Have an account? Log in" under the Register button */
.event-register h2 { margin-bottom: 10px; font: 500 1.5rem/1.2 var(--serif); letter-spacing: 0; text-transform: none; color: var(--navy); }
.event-spots { font-weight: 600; color: var(--link); }
/* registration: members in one click, with their registration shown (public/forms.js) */
.event-member { padding: 10px 14px; border-radius: 12px; background: var(--sky-10); }
.event-registered p { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; margin-bottom: 16px; font-size: 1.05rem; }
.event-check { display: inline-grid; place-items: center; flex: none; width: 28px; height: 28px; border-radius: 50%; background: #e3f3ea; color: #1d6b40; font-weight: 700; }
.event-check::before { content: "\2713"; }
.event-registered-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; }
.link-button { padding: 0; border: 0; background: none; color: var(--link); font: inherit; font-size: 0.95rem; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.link-button:hover, .link-button:focus-visible { color: var(--navy); }
/* on phones the date, place and Register box come before the description, so registering is quick */
@media (max-width: 999px) { .event-side { order: -1; } }

/* ---------------------------------------------------------------- admin dashboard (/admin/) */
/* The shell every admin page shares (build.py admin_page, public/dashboard.js): the navy sidebar, which is a top bar
   with a menu under 960px, then the page, no wider than --dash-max and kept left beside the sidebar. */
.dash { --dash-side: 264px; --dash-bar: 68px; --dash-pad: clamp(16px, 3.4vw, 48px); --dash-max: 1120px; display: grid; min-height: 100vh; min-height: 100dvh; background: var(--soft); }
@media (max-width: 959px) { .dash { grid-template-rows: auto minmax(0, 1fr); } }   /* the bar keeps its height on a short page */
@media (min-width: 960px) { .dash { grid-template-columns: var(--dash-side) minmax(0, 1fr); } }
.dash-side { position: sticky; top: 0; z-index: 30; display: flex; flex-direction: column; background: var(--navy); color: var(--on-navy); }
@media (min-width: 960px) { .dash-side { height: 100vh; height: 100dvh; padding: 24px 14px 18px; } }
.dash-side-top { display: flex; flex: none; align-items: center; justify-content: space-between; gap: 12px; min-height: var(--dash-bar); padding: 12px 16px; }
@media (min-width: 960px) { .dash-side-top { min-height: auto; padding: 0 8px 16px; } }
.dash-brand { display: inline-flex; align-items: center; gap: 12px; color: #fff; text-decoration: none; }
.dash-mark { flex: none; width: 40px; height: 40px; color: var(--sky); }
.dash-brand-text { display: grid; }
.dash-brand-name { font: 500 1.25rem/1.1 var(--serif); color: #fff; }
.dash-brand-sub, .dash-group { font: 600 0.68rem/1.5 var(--sans); letter-spacing: 0.16em; text-transform: uppercase; color: var(--sky); }
.dash-menu { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px 0 12px; border: 1px solid var(--on-navy-line); border-radius: var(--r-sm); background: transparent; color: #fff; font: 600 0.93rem/1 var(--sans); cursor: pointer; }
.dash-menu-close, .dash-menu[aria-expanded="true"] .dash-menu-open { display: none; }
.dash-menu[aria-expanded="true"] .dash-menu-close { display: block; }
/* the menu: the links scroll by themselves when the window is short, and the foot (who is signed in, View the site,
   Sign out) stays in sight under them */
.dash-nav { display: none; flex: 1 1 auto; flex-direction: column; min-height: 0; padding: 0 12px 16px; }
.dash-links { flex: 1 1 auto; min-height: 0; margin: 0 -8px; padding: 6px 8px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--on-navy-line) transparent; }
/* under 960px the open menu is its own layer under the bar; the page behind keeps still. From 600px it is a panel at
   the right over the dimmed page (a tap on the dimmed part closes it) */
@media (max-width: 959px) {
  .dash--open .dash-nav { position: fixed; top: var(--dash-bar); right: 0; bottom: 0; left: 0; z-index: 1; display: flex; padding: 0 12px calc(12px + env(safe-area-inset-bottom, 0px)); background: var(--navy); }
  html:has(.dash--open) { overflow: hidden; }
}
@media (min-width: 600px) and (max-width: 959px) {
  .dash--open .dash-nav { left: auto; width: 340px; border-top: 1px solid var(--on-navy-line); box-shadow: var(--shadow-lg); }
  .dash--open .dash-side::after { content: ""; position: fixed; top: var(--dash-bar); right: 0; bottom: 0; left: 0; background: rgba(0, 20, 52, 0.55); }
}
@media (max-width: 359px) { .dash-menu { padding: 0 10px; } .dash-menu > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; } }
@media (min-width: 960px) { .dash-menu { display: none; } .dash-nav { display: flex; padding: 0; } }
.dash-nav ul { display: grid; gap: 2px; margin: 0; padding: 0; list-style: none; }
.dash-group { margin: 18px 12px 6px; }
.dash-nav ul + ul { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--on-navy-line); }   /* Settings, set apart */
.dash-nav ul a { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 9px 12px; border-radius: var(--r-sm); color: var(--on-navy); font-weight: 500; text-decoration: none; transition: background 0.15s, color 0.15s; }
.dash-nav ul a:hover { background: rgba(140, 200, 252, 0.08); color: #fff; }
.dash-nav ul a[aria-current="page"] { background: rgba(140, 200, 252, 0.16); color: #fff; box-shadow: inset 3px 0 0 var(--sky); }
.dash-nav .icon { flex: none; }
.dash-count { margin-left: auto; min-width: 24px; padding: 2px 8px; border-radius: var(--r-pill); background: var(--sky); color: var(--navy); font: 700 0.75rem/1.4 var(--sans); text-align: center; }
.dash-side-foot { display: grid; flex: none; gap: 2px; padding-top: 14px; border-top: 1px solid var(--on-navy-line); }
.dash-side-foot a { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: var(--r-sm); color: var(--on-navy); font-size: 0.93rem; text-decoration: none; }
.dash-side-foot a:hover { background: rgba(140, 200, 252, 0.08); color: #fff; }
.dash-who { margin: 0 12px 6px; color: rgba(201, 220, 245, 0.72); font-size: 0.82rem; overflow-wrap: anywhere; }
/* a short window (a small laptop): tighter rows, and the foot's two links side by side, so more of the list shows */
@media (max-height: 760px) {
  .dash-nav ul a { min-height: 40px; padding: 7px 12px; }
  .dash-group { margin-top: 12px; }
  .dash-side-foot { grid-template-columns: max-content max-content; justify-content: space-between; padding-top: 10px; }
  .dash-side-foot a { gap: 8px; padding: 6px 8px; white-space: nowrap; }
  .dash-who { grid-column: 1 / -1; margin: 0 8px 2px; }
}
@media (min-width: 960px) and (max-height: 760px) { .dash-side { padding-top: 16px; padding-bottom: 10px; } .dash-side-top { padding-bottom: 8px; } }
.dash-main { min-width: 0; padding: clamp(20px, 3.4vw, 44px) var(--dash-pad) 96px; }
.dash-head, .dash-body { max-width: var(--dash-max); }
/* admin buttons keep their own width, on phones too: the size is chosen in the markup (.btn-sm, .btn-xs) */
:is(.dash, .dialog) .actions .btn { flex: 0 0 auto; }
/* before dashboard.js has run nobody is known to be an admin: the menu waits out of sight */
.dash:not(.dash--known, .dash--gate) .dash-nav { visibility: hidden; }
/* the messages sit over the page, not the window: beside the sidebar and no wider than the page */
@media (min-width: 960px) { .dash:not(.dash--gate) > .toast-stack { right: auto; left: var(--dash-side); width: min(calc(100% - var(--dash-side)), calc(var(--dash-max) + 2 * var(--dash-pad))); padding: 0 var(--dash-pad); } }
/* signed out: the brand in a bar, and the sign-in card alone under it (no menu, no page title) */
.dash--gate { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); }
.dash--gate .dash-side { position: static; height: auto; padding: 0; overflow: visible; }
.dash--gate .dash-side-top { min-height: var(--dash-bar); padding: 12px var(--dash-pad); }
.dash--gate :is(.dash-nav, .dash-menu, .dash-head) { display: none; }
.dash-gate-card { display: grid; justify-items: center; gap: 4px; width: 100%; max-width: 440px; margin: clamp(16px, 9vh, 96px) auto 0; text-align: center; }
.dash-gate-card > p { margin: 0 0 14px; }
.dash-gate-card .notice { margin: 14px 0 0; text-align: left; }
.dash-gate-mark { width: 60px; height: 60px; margin-bottom: 10px; color: var(--navy); }
.dash-gate-back { margin: 18px 0 0; font-size: 0.95rem; text-align: center; }
.dash-head { margin-bottom: 24px; }
.dash-title { margin: 0; font: 500 clamp(1.9rem, 3vw, 2.5rem)/1.1 var(--serif); letter-spacing: -0.01em; color: var(--navy); }
.dash-sub { margin: 6px 0 0; color: var(--muted); }
.dash-body { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; }
/* The pages (build.py admin_*, public/dashboard.js) are built from the standard parts: .card with .card-title and
   .card-head, .list of .row, .toolbar, .segmented, .field, .badge, .empty, .dialog. What follows only places what is
   particular to a page. */
.dash-muted { color: var(--muted); }
.toolbar .dash-muted { font-size: 0.92rem; }
.dash h2[tabindex="-1"]:focus { outline: none; }   /* a card's title that takes the keyboard when the card opens */
@media (max-width: 599px) { .toolbar > .dash-search-first { flex-basis: 100%; max-width: none; } }   /* Members on a phone: the search has the first line */
.card.dash-flush { padding: 0; }   /* a card that is all table */
.dash-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; }
@media (min-width: 1100px) { .dash-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.dash-grid--start { align-items: start; }   /* Analytics: each card keeps its own height; the short ones stack beside the long one */
.dash-stack { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; }
.dash-grid .card-head > a { font-size: 0.92rem; font-weight: 500; }
/* the tiles of numbers, in fixed steps: two across on phones, three from 700px, all six on one line from 1400px
   (Analytics has four: two across, then all four) */
.dash-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
@media (min-width: 700px) { .dash-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); } .dash-stats--four { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 1400px) { .dash-stats:not(.dash-stats--four) { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.dash-stats > .dash-stat { display: grid; align-content: start; gap: 4px; min-width: 0; }
.dash-stat-value { color: var(--navy); font: 500 2.1rem/1.1 var(--serif); overflow-wrap: anywhere; }
.dash-stat-note { display: -webkit-box; overflow: hidden; color: var(--muted); font-size: 0.875rem; line-height: 1.4; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; }
.dash-stats > .card-note { grid-column: 1 / -1; }
/* Overview's short lists: a row never wraps. What sits at its right keeps its size, and a long name, subject or
   address is cut with …, never broken in the middle of a word */
.dash-brief { grid-template-columns: minmax(0, 1fr); }
.dash-brief > .row { flex-wrap: nowrap; }
.dash-brief .row-main { flex: 1 1 auto; }
.dash-brief .row-main > * { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dash-brief > .row > :not(.row-main) { flex: none; }
.dash-chart { display: grid; gap: 8px; }
.dash-bars { display: flex; align-items: flex-end; gap: 3px; height: 150px; border-bottom: 1px solid var(--line-2); }
.dash-chart--tall .dash-bars { height: 220px; }
.dash-bar { flex: 1 1 0; min-width: 2px; height: max(var(--h), 2px); border-radius: 4px 4px 0 0; background: linear-gradient(180deg, #2f73c4, var(--navy)); }
.dash-bar:hover { background: var(--link); }
.dash-axis { display: flex; justify-content: space-between; color: var(--muted); font-size: 0.8rem; }
.dash-rank { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.dash-rank > li:not(.empty, .card-note) { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; align-items: baseline; }
.dash-rank-label { overflow: hidden; color: var(--ink); text-overflow: ellipsis; white-space: nowrap; }
.dash-rank-n { color: var(--navy); font-weight: 600; font-variant-numeric: tabular-nums; }
.dash-rank-bar { grid-column: 1 / -1; height: 6px; overflow: hidden; border-radius: var(--r-pill); background: var(--sky-10); }
.dash-rank-bar span { display: block; width: var(--w); height: 100%; border-radius: inherit; background: var(--link); }
/* Tables (Members, an event's registrations). The card is the size they answer to. From 840px of card, where every
   column has room: a table. Narrower: each row is a small block, its first cell as the title, then every value with
   its column's name before it (the cell's data-label, written by dashboard.js), and the row's buttons last. */
.dash-table-wrap { position: relative; container: dash-table / inline-size; }
.dash-table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.dash-table th { padding: 12px 16px; background: var(--soft); border-bottom: 1px solid var(--line); color: var(--muted); font: 600 0.72rem/1.2 var(--sans); letter-spacing: 0.1em; text-align: left; text-transform: uppercase; white-space: nowrap; }
.dash-flush .dash-table th:first-child { border-top-left-radius: var(--r-lg); }
.dash-flush .dash-table th:last-child { border-top-right-radius: var(--r-lg); }
.dash-table td { padding: 12px 16px; border-bottom: 1px solid var(--line); color: var(--ink); vertical-align: middle; overflow-wrap: break-word; }
.dash-table td a { overflow-wrap: anywhere; }   /* a long address gives way before the columns beside it */
.dash-table tr:last-child td { border-bottom: 0; }
.dash-table td.card-note { color: var(--muted); }
.dash-td-main { font-weight: 600; }
.dash-td-main > * { font-weight: 400; }
.dash-actions { text-align: right; white-space: nowrap; }
@container dash-table (max-width: 839px) {
  .dash-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .dash-table, .dash-table tbody, .dash-table tr, .dash-table td { display: block; }
  .dash-table tr { padding: 12px 0; border-bottom: 1px solid var(--line); }
  .dash-table tr:last-child { border-bottom: 0; }
  .dash-flush .dash-table tr { padding-right: 18px; padding-left: 18px; }
  .dash-table td { position: relative; padding: 3px 0 3px 5.5rem; border: 0; }
  .dash-table td[data-label]::before { content: attr(data-label); position: absolute; top: 6px; left: 0; color: var(--muted); font: 600 0.6875rem/1.5 var(--sans); letter-spacing: 0.1em; text-transform: uppercase; }
  .dash-table td:not([data-label]) { padding-left: 0; }
  .dash-table td.dash-actions { padding-top: 8px; text-align: left; }
  .dash-table td.dash-actions:empty { display: none; }
}
/* in between (a laptop beside the sidebar, a tablet): the block is two lines. Its title with the row's button at the
   right, then the values side by side, each under its column's name */
@container dash-table (min-width: 600px) and (max-width: 839px) {
  .dash-table tr { display: grid; grid-template-columns: minmax(0, 1fr) 11.5rem 4rem 5.25rem; gap: 8px 20px; align-items: start; }
  .dash-table td { padding: 0; }
  .dash-table td[data-label]::before { position: static; display: block; margin-bottom: 2px; }
  .dash-table td:first-child { grid-area: 1 / 1 / 2 / 4; align-self: center; }
  .dash-table td:nth-child(2) { grid-area: 2 / 1; }
  .dash-table td:nth-child(3) { grid-area: 2 / 2; }
  .dash-table td:nth-child(4) { grid-area: 2 / 3 / 3 / -1; }
  .dash-table td.dash-actions { grid-area: 1 / 4; justify-self: end; padding: 0; }
  .dash-table td[colspan] { grid-area: 1 / 1 / 2 / -1; }
}
/* Messages: one card for each, a blue bar on the new ones */
.dash-messages { display: grid; gap: 14px; }
.dash-messages > .dash-msg.is-new { box-shadow: inset 4px 0 0 var(--link), var(--shadow-sm); }
.dash-msg .dash-msg-head { align-items: flex-start; }
.dash-msg-head .card-title { margin: 0; }
.dash-msg-meta { margin: 2px 0 0; color: var(--muted); font-size: 0.92rem; overflow-wrap: anywhere; }
.dash-msg-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.dash-msg-tags .badge { align-self: center; }
.dash-msg-subject { margin: 0; color: var(--ink); font-weight: 600; overflow-wrap: anywhere; }
.dash-msg-text { margin: 0 0 16px; color: var(--ink); white-space: pre-wrap; overflow-wrap: anywhere; }
.dash-msg-subject + .dash-msg-text { margin-top: 6px; }
.dash-msg-files { margin: -6px 0 16px; color: var(--muted); font-size: 0.92rem; overflow-wrap: anywhere; }
@media (max-width: 599px) {   /* a phone: the three choices fill the first line; where they came from and the search share the second */
  .dash-msg-toolbar > .segmented { display: flex; flex: 1 1 100%; }
  .dash-msg-toolbar > .segmented > * { flex: 1 1 auto; }
  .dash-msg-toolbar > .field:not(.toolbar-search) { flex: 0 1 11rem; }
}
/* Events: a row is the date tile, the event, then its buttons: under the event on a narrow card, at the right from
   720px of card */
.dash-events { container: events / inline-size; }
.dash-events > .row { display: grid; grid-template-columns: 60px minmax(0, 1fr); align-items: start; gap: 8px 16px; padding: 16px 0; }
.dash-events .dash-event-title { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin: 0 0 2px; font: 600 1.05rem/1.35 var(--sans); }
.dash-event-title .badge { align-self: center; }
.dash-events .row-meta { margin: 0; }
.dash-events .row-end { grid-column: 2; margin: 2px 0 0; }
@container events (min-width: 720px) {
  .dash-events > .row { grid-template-columns: 60px minmax(0, 1fr) auto; align-items: center; }
  .dash-events .row-end { grid-column: 3; flex-wrap: nowrap; margin: 0; }
}
@container events (max-width: 419px) { .dash-events .row-end { grid-column: 1 / -1; } }   /* a phone: three buttons need the whole line */
/* forms in a card: boxes side by side from 700px. --top keeps the boxes on one line when one of them has a hint under it */
.dash-form-row { display: grid; gap: 14px; }
@media (min-width: 700px) { .dash-form-row { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); } }
.dash-form-row.dash-form-row--top { align-items: start; }
.dash .dash-event-form textarea { min-height: 7rem; }   /* Details: room for a few lines before anything is typed */
/* Settings: what is connected, one small card each */
.dash-settings { display: grid; gap: 14px; }
@media (min-width: 900px) { .dash-settings { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.dash-settings > .card-note { grid-column: 1 / -1; }
.dash-setting .card-head { margin-bottom: 8px; }
.dash-setting .dash-help { margin: 0 0 8px; }
.dash-setting > a { font-size: 0.92rem; font-weight: 500; }
.blog-empty .actions { justify-content: center; }
.contact-side .contact { display: grid; grid-template-columns: 44px minmax(0, 1fr); column-gap: 14px; align-items: center; padding: 16px 18px; }
.contact-side .contact .tile-icon { grid-row: span 2; width: 44px; height: 44px; margin: 0; }
.contact-side .contact-value { margin: 2px 0 0; font-size: 1.15rem; }
.contact-side .contact-hint { display: none; }
/* An email in a contact tile: as large as fits on one line in its tile (each tile is a size container; 14.6em is the
   longest address, robinson@newcreationofchrist.org, in Newsreader with optical sizing off: on, small sizes draw wider
   and no longer fit), down to 0.8rem. Narrower than that it breaks after the @ (the <wbr> in build.py), never inside
   a word. */
.contact { container-type: inline-size; }
.contact-value--email { font-size: clamp(0.8rem, (100cqi - 6px) / 15.6, 1.4rem); font-optical-sizing: none; overflow-wrap: normal; }
.contact-side .contact-value--email { font-size: clamp(0.8rem, (100cqi - 64px) / 16.4, 1.15rem); }
.dash-nowrap { white-space: nowrap; }
.dash-sub-line { display: block; color: var(--muted); font-size: 0.86rem; }

/* ---------- ministry cards with a photo (SHOW_MINISTRY_PHOTOS in build.py) ---------- */
.ministry--photo { display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.ministry-photo { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; background: var(--sky-10); }
.ministry-photo--brand {
  display: grid; place-items: center; color: var(--sky);
  background: radial-gradient(120% 90% at 85% 0%, rgba(140, 200, 252, 0.26), transparent 60%), linear-gradient(160deg, var(--navy-80), var(--navy));
}
.ministry-tree { width: 40%; height: auto; aspect-ratio: 1; opacity: 0.5; }
.ministry-body { position: relative; flex: 1; padding: 36px 24px 26px; }
.ministry--photo .tile-icon { position: absolute; top: -24px; left: 22px; margin: 0; background: #fff; box-shadow: var(--shadow-sm); }
@media (max-width: 619px) {   /* phones: a square photo beside the text (the sizes are with the home page rules, at the end) */
  .ministry--photo { display: grid; }
  .ministry--photo .tile-icon { display: none; }
}
.footer-who { display: inline-flex; align-items: center; gap: 6px; color: var(--on-navy); }
.footer-who .icon { flex: none; color: var(--sky); }

/* ---------- admin: Services page editor, photo library and chooser ---------- */
.ce { display: grid; gap: 20px; }
.dash-help { margin: 0 0 16px; color: var(--muted); font-size: 0.92rem; }
.card-title + .dash-help { margin-top: -6px; }   /* close under its heading; under a heading row (.card-head) it keeps its distance */
.ce-list { display: grid; gap: 14px; }
.ce-item { display: grid; gap: 16px; padding: 16px; background: var(--soft); border: 1px solid var(--line); border-radius: var(--r); }
@media (min-width: 900px) { .ce-item--photo { grid-template-columns: 220px minmax(0, 1fr); } }
.ce-photo { display: grid; gap: 8px; align-content: start; }
.ce-thumb { display: block; width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: var(--r-sm); background: var(--sky-10); }
.ce-thumb--none { display: grid; place-items: center; padding: 10px; background: var(--surface); border: 1px dashed var(--line-2); color: var(--muted); font-size: 0.85rem; text-align: center; }
.ce-thumb--small { width: 120px; }
.ce-item-main { display: grid; gap: 12px; min-width: 0; }
.ce-fields { display: grid; gap: 12px; }
@media (min-width: 700px) { .ce-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); } .ce-fields .ce-wide { grid-column: 1 / -1; } }
.ce-fields label { display: grid; gap: 4px; color: var(--ink); font-size: 0.92rem; font-weight: 500; }
.ce-item-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.ce-item-n { margin-right: auto; color: var(--muted); font-size: 0.85rem; font-weight: 600; }
.ce-actions { margin-top: 16px; }
/* "Choose a photo" (dashboard.js choosePhoto, a standard .dialog): the library as a grid of photos to press, three
   across on a phone; the one in use carries a tick */
.ce-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.ce-pick { position: relative; display: block; padding: 0; overflow: hidden; border: 2px solid var(--line); border-radius: var(--r-sm); background: var(--surface); font: inherit; text-align: left; cursor: pointer; }
.ce-pick img { display: block; width: 100%; aspect-ratio: 3 / 2; object-fit: cover; background: var(--sky-10); }
.ce-pick span { display: block; padding: 6px 8px; overflow: hidden; color: var(--muted); font-size: 0.8rem; line-height: 1.3; text-overflow: ellipsis; white-space: nowrap; }
.ce-pick:hover, .ce-pick:focus-visible { border-color: var(--link); }
.ce-pick[aria-pressed="true"] { border-color: var(--navy); }
.ce-pick[aria-pressed="true"]::after { content: "\2713"; content: "\2713" / ""; position: absolute; top: 6px; right: 6px; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--navy); color: #fff; font: 700 0.8rem/1 var(--sans); }
@media (max-width: 599px) {
  .ce-photos { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .ce-pick span { display: -webkit-box; padding: 5px 6px; font-size: 0.75rem; white-space: normal; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; }
}
.ce-photo-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }

/* ---------- Events page: past events (newest first, under the upcoming ones) ---------- */
.past-events { margin-top: clamp(48px, 6vw, 72px); }
.past-title { margin: 0 0 18px; color: var(--navy); font: 500 clamp(1.6rem, 2.4vw, 2rem)/1.2 var(--serif); }
.event-rows { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.event-row {
  position: relative; display: grid; grid-template-columns: 64px 128px minmax(0, 1fr); align-items: center; gap: 18px; padding: 14px 16px;
  background: rgba(255, 255, 255, 0.72); border: 1px solid var(--line); border-radius: var(--r); transition: background 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.event-row:hover, .event-row:focus-within { background: #fff; border-color: var(--line-2); box-shadow: var(--shadow-sm); }
.event-row:focus-within { outline: 2px solid var(--link); outline-offset: 2px; }
.event-row-thumb { display: block; overflow: hidden; aspect-ratio: 16 / 10; border-radius: 10px; background: var(--sky-10); }
.event-row-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; filter: grayscale(0.45); transition: filter 0.2s; }
.event-row:hover .event-row-thumb img { filter: none; }
.event-row-none { display: grid; place-items: center; width: 100%; height: 100%; background: linear-gradient(160deg, var(--navy-80), var(--navy)); color: var(--sky); }
.event-row-body { display: grid; gap: 4px; min-width: 0; }
.event-row-title { color: var(--ink); font: 500 1.2rem/1.3 var(--serif); text-decoration: none; }
.event-row-title::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.event-row-title:focus { outline: none; }
.event-row:hover .event-row-title { text-decoration: underline; }
.event-row-meta { color: var(--muted); font-size: 0.92rem; overflow-wrap: anywhere; }
@media (max-width: 619px) {
  .event-row { grid-template-columns: 56px minmax(0, 1fr); gap: 14px; }
  .event-row-thumb { display: none; }
}

/* ---------- home page: Events section (only when there are events) ---------- */
#events .past-events { margin-top: clamp(36px, 4vw, 48px); }
#events .past-title { font-size: clamp(1.3rem, 1.8vw, 1.5rem); }
.events-more { margin-top: clamp(28px, 3vw, 36px); }

/* ---------- admin: on/off switch (Events on the site) ---------- */
.dash-switch-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; }
.dash-switch-row h2 { margin: 0 0 4px; }
.dash-switch-row .dash-help { max-width: 60ch; margin: 0; }
.switch { position: relative; display: inline-flex; flex: none; align-items: center; gap: 10px; padding: 0; border: 0; background: none; color: var(--ink); font: 600 0.95rem/1 var(--sans); cursor: pointer; }
.switch::before { content: ""; width: 54px; height: 30px; border-radius: 999px; background: var(--line-2); transition: background 0.2s; }
.switch-knob { position: absolute; top: 50%; left: 3px; width: 24px; height: 24px; margin-top: -12px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 20, 52, 0.35); transition: transform 0.2s var(--ease); }
.switch[aria-checked="true"]::before { background: var(--ok); }
.switch[aria-checked="true"] .switch-knob { transform: translateX(24px); }
.switch-text { min-width: 2.2em; }
/* Sermons in English and Hindi: the switch under the title, and the note on the version that is a translation */
.lang-switch { display: inline-flex; gap: 4px; margin-top: 22px; padding: 4px; border: 1px solid rgba(255, 255, 255, 0.28); border-radius: 999px; background: rgba(255, 255, 255, 0.08); }
.lang-switch a { min-width: 96px; padding: 9px 18px; border-radius: 999px; color: #fff; font: 600 0.95rem/1.2 var(--sans); text-align: center; text-decoration: none; }
.lang-switch a[aria-current="true"] { background: #fff; color: var(--navy); }
.lang-switch a:hover:not([aria-current="true"]) { background: rgba(255, 255, 255, 0.14); }
.lang-switch a:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.lang-note { margin: 18px 0; padding: 10px 14px; border-radius: 12px; background: #eef4ff; color: var(--muted); font-size: 0.92rem; }
/* Page switches (Admin > Settings): the card, the Off label in the sidebar, the banner, and the note admins see on a page
   switched off */
.dash-pages { margin-top: 4px; }
.dash-pages > .dash-page-row { flex-wrap: nowrap; justify-content: space-between; gap: 16px; padding: 14px 0; }
.dash-page-row.is-off .row-title { color: var(--muted); }
.dash-page-name { margin: 0; }
.dash-page-name .row-title { display: inline; }
.dash-page-name a { margin-left: 8px; font-size: 0.875rem; font-weight: 500; }
.dash-page-row .row-meta { margin: 2px 0 0; }
.dash-off { margin-left: auto; padding: 2px 8px; border-radius: var(--r-pill); background: rgba(255, 210, 150, 0.16); color: #ffd9a8; font: 600 0.68rem/1.5 var(--sans); letter-spacing: 0.06em; text-transform: uppercase; }
.dash-count:not([hidden]) + .dash-off { margin-left: 6px; }   /* beside a count; alone, it keeps to the right edge */
.dash-page-off { margin: 0; padding: 12px 16px; border-radius: var(--r-sm); background: var(--warn-bg); color: var(--warn-fg); line-height: 1.5; }
.dash-page-off a { color: inherit; font-weight: 600; }
.page-off { padding-top: 18px; }
.page-off .draft-flag { margin: 0; }
.switch:focus-visible { outline: 2px solid var(--link); outline-offset: 4px; border-radius: 999px; }
.switch:disabled, .switch[aria-busy="true"] { opacity: 0.6; cursor: wait; }

/* ---------- Privacy and Terms ---------- */
/* a reading page: one white card (.card) with the list of contents at the top; build.py legal_page gives each heading its id */
.card.legal { max-width: 760px; margin: 0 auto; padding: clamp(24px, 4.5vw, 52px); color: var(--text); }
.legal-updated { margin: 0 0 18px; color: var(--muted); font-size: 0.92rem; }
.legal h2 { margin: 34px 0 10px; color: var(--navy); font: 500 clamp(1.35rem, 2vw, 1.6rem)/1.25 var(--serif); }
.legal p, .legal li { line-height: 1.7; }
.legal p { margin: 0 0 12px; }
.legal ul { margin: 0 0 12px; padding-left: 1.2em; }
.legal ul li + li { margin-top: 6px; }
.legal code { padding: 1px 6px; border-radius: var(--r-xs); background: var(--soft); font-size: 0.9em; overflow-wrap: anywhere; }
.legal address { font-style: normal; line-height: 1.8; }
.legal address a { overflow-wrap: anywhere; }
.legal-contents { margin: 0 0 6px; }
.legal-contents .label { margin: 0 0 10px; line-height: 1.2; }
.legal-contents ol { margin: 0; padding: 0; list-style: none; columns: 2; column-gap: 28px; }
.legal-contents ol li { padding: 3px 0; line-height: 1.4; break-inside: avoid; }
@media (max-width: 599px) { .legal-contents ol li { padding: 0; } .legal-contents a { display: block; padding: 11px 0; } }   /* 44px to tap on a phone */
.legal-contents a { color: var(--link); font-weight: 500; text-decoration: none; }
.legal-contents a:hover { text-decoration: underline; }
@media (max-width: 599px) {   /* phones: thinner margins around the card, so the lines are longer */
  .legal-wrap { padding-inline: 12px; }
  .card.legal { padding: 22px 18px 26px; }
}
@media (max-width: 479px) { .legal-contents ol { columns: 1; } }

/* ---------- About page ---------- */
.story-photo > img { display: block; width: 100%; height: auto; }
.story-photo--portrait img { aspect-ratio: 4 / 5; object-position: 50% 0; }
@media (max-width: 979px) { .story-photo--portrait { margin-inline: auto; } }
.about-facts { display: grid; gap: 12px; margin: 26px 0 0; padding: 0; list-style: none; }
.about-facts:empty { display: none; }   /* every fact taken off in Admin > About page */
@media (min-width: 620px) { .about-facts { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
/* each card is two rows shared with the cards beside it (subgrid): the bold lines start at the top together, and the
   small lines start together under the tallest bold line, however the words wrap */
.about-facts li { display: grid; grid-row: span 2; grid-template-rows: subgrid; align-content: start; row-gap: 6px; padding: 14px 16px; background: rgba(255, 255, 255, 0.72); border: 1px solid var(--line); border-radius: var(--r); }
.about-facts strong { color: var(--navy); font: 500 1.2rem/1.2 var(--serif); text-wrap: balance; }
.about-facts span { color: var(--muted); font-size: 0.86rem; line-height: 1.45; }
.people { display: grid; gap: 22px; margin: 0; padding: 0; list-style: none; }
@media (min-width: 960px) { .people { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.person { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 24px; align-items: start; padding: clamp(20px, 2.6vw, 30px); background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); }
@media (max-width: 519px) { .person { grid-template-columns: 1fr; } }
.person-photo { display: block; width: 140px; height: 140px; overflow: hidden; object-fit: cover; border-radius: var(--leaf-sm); background: var(--sky-10); }
.person-photo--none .ministry-photo { height: 100%; aspect-ratio: auto; }
.person-name { margin: 0; color: var(--navy); font: 500 1.5rem/1.2 var(--serif); }
.person-role { margin: 6px 0 12px; color: var(--link); font: 600 0.74rem/1.4 var(--sans); letter-spacing: 0.12em; text-transform: uppercase; }
.person-bio { margin: 0; color: var(--text); line-height: 1.7; }
.about-cta { max-width: 720px; text-align: center; }
.about-cta .lede { margin-inline: auto; }
.about-cta .actions { justify-content: center; }
.story-more { margin-top: 22px; }

/* glow panel ("Our story" on the home page, 15 Nov): a bright sky-to-lavender blue between the pale Events panel and
   the navy Beliefs panel, with soft white light rays from behind the pastor's photo and a frosted bio card */
.panel--glow {
  background:
    radial-gradient(640px 420px at 8% 12%, rgba(255, 255, 255, 0.6), transparent 62%),
    radial-gradient(900px 560px at 100% 100%, rgba(124, 92, 230, 0.26), transparent 62%),
    linear-gradient(150deg, #b9dcfd 0%, #bccbff 52%, #cdbdff 100%);
}
.panel--glow::before {
  content: ""; position: absolute; z-index: -1; top: -520px; left: -460px; width: 1200px; aspect-ratio: 1; pointer-events: none;
  background: repeating-conic-gradient(rgba(255, 255, 255, 0.32) 0deg 3.5deg, transparent 3.5deg 10deg);
  -webkit-mask: radial-gradient(closest-side, #000 15%, transparent 75%); mask: radial-gradient(closest-side, #000 15%, transparent 75%);
}
.panel--glow::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(circle, rgba(0, 20, 52, 0.12) 0.9px, transparent 1.3px) 0 0 / 7px 7px;
  -webkit-mask: linear-gradient(180deg, transparent 40%, #000 100%); mask: linear-gradient(180deg, transparent 40%, #000 100%);
}
.panel--glow .eyebrow { color: var(--navy-80); }
.panel--glow .story-copy > p { color: var(--ink); }
.panel--glow .story-photo::before { border-color: rgba(255, 255, 255, 0.95); }
.panel--glow .pastor-bio {
  background: rgba(255, 255, 255, 0.74); border-color: rgba(255, 255, 255, 0.95); box-shadow: 0 22px 44px -28px rgba(0, 20, 52, 0.45);
  -webkit-backdrop-filter: blur(12px) saturate(1.1); backdrop-filter: blur(12px) saturate(1.1);
}
.panel--glow .leader { border-left-color: rgba(19, 43, 92, 0.45); }
.panel--glow .leader span { color: var(--navy-80); }
.panel--glow .btn-outline { background: rgba(255, 255, 255, 0.72); border-color: rgba(255, 255, 255, 0.95); color: var(--navy); }
.panel--glow .btn-outline:hover, .panel--glow .btn-outline:focus-visible { background: #fff; }

/* "Plan your visit" on the photo of the church building (15 Nov): light text, a sky button, the map framed in white.
   The tint is a little lighter than the hero's, so the building and its sign show through. */
.panel--building::before {
  background:
    linear-gradient(105deg, rgba(0, 20, 52, 0.94) 0%, rgba(0, 20, 52, 0.84) 38%, rgba(18, 40, 120, 0.62) 70%, rgba(96, 64, 190, 0.5) 100%),
    var(--photo) center 40% / cover no-repeat;
}
.panel--building .address-block { color: var(--on-navy); }
.panel--building .address-block strong { color: #fff; }
.panel--building .checklist li { color: var(--on-navy); }
.panel--building .checklist li::before {
  background: rgba(140, 200, 252, 0.16)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238cc8fc' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 12.5 4 4 8-9'/%3E%3C/svg%3E") center / 14px no-repeat;
}
.panel--building .btn-navy { background: var(--sky); color: var(--navy); }
.panel--building .btn-navy:hover { background: var(--sky-strong); box-shadow: 0 10px 24px -12px rgba(140, 200, 252, 0.9); }
.panel--building .btn-outline { border-color: transparent; }
.panel--building .map { border-color: rgba(255, 255, 255, 0.55); box-shadow: 0 34px 70px -34px rgba(0, 6, 24, 0.9); }

/* ---------- Community: the photo wall, the full-screen viewer, the upload box and Admin > Community ---------- */
.page-hero--compact { padding: clamp(36px, 5vw, 60px) 0; }
.page-hero--compact h1 { margin: 12px 0 12px; font-size: clamp(2rem, 4.2vw, 3.1rem); }
.page-hero--compact .eyebrow { margin-bottom: 0; }
.page-hero--compact .hero-tree--page { bottom: -90%; opacity: 0.045; }
.actions--center { justify-content: center; }
.post-by { margin: 14px 0 0; color: var(--on-navy); font: 500 0.95rem/1.4 var(--sans); }
.section--wall { padding-top: clamp(32px, 4vw, 52px); }
/* rows that fill the width while every photo keeps its shape: each tile grows in proportion to its width over height
   (--r and flex-grow are set on the tile by src/community.js), so all the tiles in a row end up the same height. A
   last row with only a photo or two grows at most 1.6 times, so it never turns into one giant photo. */
.wall { --row: 200px; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }   /* a short last row sits in the middle */
.wall--big { --row: 260px; }
.tile { position: relative; display: block; flex-basis: calc(var(--r) * var(--row)); max-width: calc(var(--r) * var(--row) * 1.6); aspect-ratio: var(--r); overflow: hidden; border-radius: 10px; background: #d5dfee; }
.tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s var(--ease); }
.tile:hover img { transform: scale(1.04); }
.tile:focus-visible { outline: 3px solid var(--link); outline-offset: 3px; }
.tile-play { position: absolute; top: 10px; right: 10px; display: inline-flex; align-items: center; gap: 3px; padding: 5px 9px 5px 6px; border-radius: 999px; background: rgba(0, 12, 36, 0.62); color: #fff; font: 600 0.78rem/1 var(--sans); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.tile-play svg { width: 15px; height: 15px; fill: currentColor; }
.wall-more { margin: clamp(32px, 4vw, 44px) 0 0; text-align: center; }
.wall-more [aria-busy="true"] { opacity: 0.7; pointer-events: none; }
.share--center { justify-content: center; max-width: 720px; margin: 36px auto 0; }
.share--center .copy-status { text-align: center; }
.post-note { text-align: center; }
@media (max-width: 979px) { .wall { --row: 150px; gap: 4px; } .wall--big { --row: 190px; } }
@media (max-width: 619px) {
  .wall { --row: 84px; gap: 3px; }
  .wall--big { --row: 120px; }
  .wall .tile { max-width: none; } /* on a phone the last row fills the width too */
  .tile { border-radius: 6px; }
  .tile-play { top: 6px; right: 6px; padding: 3px 7px 3px 4px; font-size: 0.72rem; }
}

/* the viewer: one photo or clip at a time, full screen */
html.viewer-open { overflow: hidden; }
.viewer { width: 100%; max-width: none; height: 100%; height: 100dvh; max-height: none; margin: 0; padding: 0; border: 0; background: #020b1f; color: #fff; }
.viewer[open] { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; }
.viewer::backdrop { background: rgba(2, 11, 31, 0.92); }
.viewer-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: max(10px, env(safe-area-inset-top)) 14px 10px 20px; }
.viewer-count { margin: 0; color: var(--on-navy); font: 600 0.85rem/1 var(--sans); letter-spacing: 0.06em; }
.viewer-tools { display: flex; align-items: center; gap: 10px; }
.viewer-open { padding: 10px 16px; border: 1px solid rgba(201, 220, 245, 0.4); border-radius: 999px; color: #fff; font: 600 0.88rem/1 var(--sans); text-decoration: none; }
.viewer-open:hover, .viewer-open:focus-visible { border-color: #fff; }
.viewer-close, .viewer-nav { display: grid; flex: none; place-items: center; width: 46px; height: 46px; padding: 0; border: 0; border-radius: 50%; background: rgba(255, 255, 255, 0.1); color: #fff; cursor: pointer; transition: background 0.2s; }
.viewer-close:hover, .viewer-nav:hover, .viewer-close:focus-visible, .viewer-nav:focus-visible { background: rgba(255, 255, 255, 0.22); }
.viewer-close svg, .viewer-nav svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.viewer-main { position: relative; display: flex; align-items: center; gap: 12px; min-height: 0; padding: 0 14px; }
.viewer-stage { display: flex; flex: 1; align-self: stretch; align-items: center; justify-content: center; min-width: 0; min-height: 0; touch-action: pan-y pinch-zoom; }
.viewer-media { display: block; min-width: 0; max-width: 100%; max-height: 100%; border-radius: 6px; object-fit: contain; -webkit-user-select: none; user-select: none; -webkit-user-drag: none; }
video.viewer-media { background: #000; }
.viewer-info { width: 100%; max-width: 820px; margin: 0 auto; padding: 12px 20px max(18px, env(safe-area-inset-bottom)); text-align: center; }
.viewer-title { max-height: 4.6em; margin: 0 0 4px; overflow: auto; color: #fff; font: 500 1.15rem/1.4 var(--serif); }
.viewer-meta { margin: 4px 0 0; color: var(--on-navy); font-size: 0.9rem; }
.viewer-fail { display: grid; justify-items: center; gap: 14px; text-align: center; }
.viewer-fail p { margin: 0; color: var(--on-navy); }
@media (max-width: 619px) {
  .viewer-main { padding: 0; }
  .viewer-nav { position: absolute; z-index: 1; top: 50%; width: 40px; height: 40px; margin-top: -20px; background: rgba(0, 0, 0, 0.35); }
  .viewer-prev { left: 8px; }
  .viewer-next { right: 8px; }
  .viewer-media { border-radius: 0; }
  .viewer-title { font-size: 1.05rem; }
}

.drop { position: relative; border: 2px dashed var(--line-2); border-radius: var(--r-lg); background: var(--soft); transition: border-color 0.2s, background 0.2s; }
.drop:hover, .drop:focus-within, .drop.is-over { border-color: var(--link); background: var(--sky-10); }
.drop.is-disabled { opacity: 0.6; pointer-events: none; }
.form .drop-input, .cm-add .drop-input { position: absolute; top: 0; left: 0; width: 1px; height: 1px; padding: 0; border: 0; opacity: 0; }
.form .drop-label, .cm-add .drop-label { display: grid; justify-items: center; gap: 6px; padding: clamp(26px, 4vw, 40px) 20px; color: var(--link); text-align: center; cursor: pointer; }
.drop-label strong { color: var(--navy); font: 500 1.3rem/1.3 var(--serif); }
.drop-label span { color: var(--muted); font-size: 0.92rem; font-weight: 400; }
.picks-count { margin: 0; color: var(--ink); font-weight: 500; }
.picks-count:empty, .picks:empty { display: none; }
.picks { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 8px; margin: 0; padding: 0; list-style: none; }
.pick { position: relative; aspect-ratio: 1; overflow: hidden; border-radius: 10px; background: #dfe7f3; }
.pick img { width: 100%; height: 100%; object-fit: cover; }
.pick-note { position: absolute; right: 0; bottom: 0; left: 0; padding: 4px 6px; background: rgba(0, 12, 36, 0.72); color: #fff; font-size: 0.72rem; line-height: 1.25; }
.pick--busy { display: grid; place-items: center; background: linear-gradient(110deg, #dfe7f3 30%, #f1f5fb 50%, #dfe7f3 70%) 100% 0 / 300% 100%; animation: pick-shine 1.4s linear infinite; }
.pick--busy .pick-note { position: static; padding: 6px; background: none; color: var(--muted); text-align: center; }
@keyframes pick-shine { to { background-position: 0 0; } }
.pick--bad { outline: 2px solid #b3261e; outline-offset: -2px; }
.pick--bad .pick-note { background: #b3261e; }
.pick-badge { position: absolute; right: 6px; bottom: 6px; padding: 3px 7px; border-radius: 999px; background: rgba(0, 12, 36, 0.7); color: #fff; font: 600 0.72rem/1 var(--sans); }
.pick-x { position: absolute; top: 4px; right: 4px; display: grid; place-items: center; width: 28px; height: 28px; padding: 0; border: 0; border-radius: 50%; background: rgba(0, 12, 36, 0.7); color: #fff; font: 600 1.1rem/1 var(--sans); cursor: pointer; }
.pick-x:hover, .pick-x:focus-visible { background: #b3261e; }
.is-locked .pick-x { display: none; }
.pick--sent::after { content: "\2713"; position: absolute; inset: 0; display: grid; place-items: center; background: rgba(31, 138, 76, 0.45); color: #fff; font: 700 1.6rem/1 var(--sans); }
.share-progress { display: grid; gap: 8px; }
.share-bar { height: 10px; overflow: hidden; border-radius: 999px; background: var(--sky-20); }
.share-bar span { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--link), #4b7fd1); transition: width 0.3s; }
.share-step { margin: 0; color: var(--muted); font-size: 0.92rem; }
@media (prefers-reduced-motion: reduce) { .pick--busy { animation: none; } .tile:hover img { transform: none; } }

/* Admin > Community (build.py admin_community, public/dashboard.js): the card that adds photos, the grid of every
   photo and clip (two across on a phone), and the window that shows one large */
.cm-add { display: grid; gap: 14px; }
.cm-add .card-title { margin-bottom: 0; }
.cm-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 520px) { .cm-grid { grid-template-columns: repeat(auto-fill, minmax(212px, 1fr)); gap: 14px; } }
.cm-grid > :is(.empty, .card-note) { grid-column: 1 / -1; }
.cm-item { position: relative; display: grid; grid-template-rows: auto 1fr; margin: 0; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.cm-open { display: block; padding: 0; overflow: hidden; border: 0; border-radius: calc(var(--r) - 1px) calc(var(--r) - 1px) 0 0; background: var(--sky-20); cursor: zoom-in; }
.cm-open img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.cm-item--draft .cm-open img { opacity: 0.55; filter: grayscale(0.4); }
.cm-item > .cm-status { position: absolute; top: 8px; left: 8px; box-shadow: var(--shadow-sm); }
.cm-item .pick-badge { top: 8px; right: 8px; bottom: auto; }
.cm-item-meta { display: grid; align-content: start; gap: 2px; padding: 10px; color: var(--muted); font-size: 0.8rem; line-height: 1.4; }
.cm-item-when { color: var(--ink); font-size: 0.875rem; font-weight: 500; }
.cm-item-who { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cm-used { color: var(--link); font-weight: 500; }
.cm-item-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.cm-item-actions .btn-xs { padding: 0 12px; }
.cm-more-row { margin: 16px 0 0; text-align: center; }
.cm-more-row:has([hidden]) { display: none; }
/* one photo or clip, large (a standard .dialog): the picture takes the room that is left and gives way first, so the
   words and the buttons at the foot are always in sight */
@media (min-width: 600px) { .dialog.cm-dialog { max-height: min(92vh, 920px); } }
.cm-dialog[open] { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; }
.dialog.cm-dialog > .dialog-body { display: grid; grid-template-rows: minmax(140px, 1fr) auto; padding: 0; }
.cm-dialog-media { display: grid; grid-template-rows: minmax(0, 1fr); min-height: 0; background: var(--media); }
.cm-dialog-media :is(img, video) { display: block; width: 100%; height: 100%; object-fit: contain; }
.cm-dialog-info { display: grid; gap: 8px; padding: 14px 20px 16px; }
.cm-dialog-info > p { margin: 0; }
.cm-dialog-words { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; }
.cm-dialog-words .field { flex: 1 1 260px; }
.cm-dialog-words .btn { margin-bottom: 3px; }   /* level with the box beside it */
@media (max-width: 599px) { .cm-dialog-info { padding-right: 16px; padding-left: 16px; } }

/* The church assistant: the chat button and its panel on every page (build.py assistant_widget, public/assistant.js) */
.chat { position: fixed; right: 20px; bottom: 20px; z-index: 55; }
.chat-launch { display: inline-flex; align-items: center; gap: 8px; padding: 12px 18px 12px 14px; border: 0; border-radius: 999px; background: var(--navy); color: #fff; font: 600 0.98rem/1 var(--sans); box-shadow: 0 0 0 1px rgba(140, 200, 252, 0.4), 0 12px 30px -10px rgba(0, 20, 52, 0.55), 0 2px 6px rgba(0, 20, 52, 0.18); cursor: pointer; transition: background 0.15s, transform 0.15s, opacity 0.2s; }
.chat-launch:hover { background: var(--navy-80); transform: translateY(-1px); }
.chat-launch .icon { color: var(--sky); }
.chat.is-open .chat-launch { display: none; }
.chat-panel { position: fixed; right: 20px; bottom: 20px; display: flex; flex-direction: column; width: min(400px, calc(100vw - 40px)); height: min(640px, calc(100vh - var(--header-h) - 40px)); height: min(640px, calc(100dvh - var(--header-h) - 40px)); overflow: hidden; background: #fff; border: 1px solid var(--line); border-radius: 20px; box-shadow: 0 28px 64px -20px rgba(0, 20, 52, 0.45), 0 2px 8px rgba(0, 20, 52, 0.12); }
.chat-head { display: flex; align-items: center; gap: 10px; padding: 12px 10px 12px 14px; background: var(--navy); color: #fff; }
.chat-mark { display: grid; flex: 0 0 auto; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: rgba(140, 200, 252, 0.14); }
.chat-mark-svg { width: 24px; height: 24px; color: var(--sky); }
.chat-head-text { flex: 1 1 auto; min-width: 0; }
.chat-title { margin: 0; color: #fff; font: 600 1rem/1.2 var(--sans); }
.chat-sub { margin: 2px 0 0; overflow: hidden; color: var(--on-navy); font-size: 0.8rem; white-space: nowrap; text-overflow: ellipsis; }
.chat-icon { display: grid; flex: 0 0 auto; place-items: center; width: 38px; height: 38px; padding: 0; border: 0; border-radius: 50%; background: none; color: var(--on-navy); cursor: pointer; }
.chat-icon:hover { background: rgba(255, 255, 255, 0.1); color: #fff; }
.chat-log { display: flex; flex: 1 1 auto; flex-direction: column; gap: 10px; padding: 16px 14px; overflow-y: auto; overscroll-behavior: contain; background: var(--soft); }
.chat-msg { max-width: 88%; padding: 10px 14px; border-radius: 16px; font-size: 0.95rem; line-height: 1.5; overflow-wrap: anywhere; }
.chat-msg p { margin: 0; white-space: pre-line; }
.chat-msg p + p { margin-top: 8px; }
.chat-list { display: grid; gap: 5px; margin: 8px 0 0; padding-left: 20px; }   /* an answer's list (public/assistant.js) */
.chat-list + p { margin-top: 8px; }
.chat-msg > .chat-list:first-child { margin-top: 0; }
.chat-list li::marker { color: var(--link); }
.chat-msg strong { color: var(--navy); font-weight: 600; }
.chat-msg--bot { align-self: flex-start; border: 1px solid var(--line); border-bottom-left-radius: 6px; background: #fff; color: var(--text); }
.chat-msg--me { align-self: flex-end; border-bottom-right-radius: 6px; background: var(--navy); color: #fff; white-space: pre-wrap; }
.chat-msg--error { border-color: #efd5cb; background: #fff8f5; }
.chat-msg a { color: var(--link); }
.chat-verse { margin: 10px 0 0; padding: 10px 12px; border-left: 3px solid var(--sky); border-radius: 0 10px 10px 0; background: var(--sky-10); color: var(--ink); font: 1rem/1.5 var(--serif); }
.chat-verse p { margin: 0; }
.chat-verse cite { display: block; margin-top: 6px; color: var(--muted); font: 600 0.78rem/1.2 var(--sans); font-style: normal; }
.chat-links { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.chat-msg .chat-link { display: inline-flex; align-items: center; padding: 6px 12px; border: 1px solid #9dbbe4; border-radius: 999px; background: #fff; color: var(--link); font-size: 0.86rem; font-weight: 600; text-decoration: none; }
.chat-msg .chat-link:hover { border-color: var(--link); box-shadow: 0 0 0 1px var(--link) inset; }
.chat-typing { padding: 14px 16px; }
.chat-dots { display: inline-flex; gap: 4px; }
.chat-dots span { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); opacity: 0.35; animation: chat-dot 1.2s infinite ease-in-out; }
.chat-dots span:nth-child(2) { animation-delay: 0.15s; }
.chat-dots span:nth-child(3) { animation-delay: 0.3s; }
@keyframes chat-dot { 0%, 80%, 100% { opacity: 0.35; transform: none; } 40% { opacity: 1; transform: translateY(-3px); } }
.chat-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 14px 12px; background: var(--soft); }
.chat-chip { padding: 7px 12px; border: 1px solid var(--line-2); border-radius: 999px; background: #fff; color: var(--navy); font: 500 0.86rem/1.2 var(--sans); cursor: pointer; }
.chat-chip:hover { border-color: var(--navy); }
.chat-form { display: flex; align-items: flex-end; gap: 8px; padding: 10px 12px 8px; border-top: 1px solid var(--line); background: #fff; }
.chat-form textarea { flex: 1 1 auto; min-width: 0; max-height: 120px; padding: 10px 12px; border: 1px solid var(--line-2); border-radius: 14px; background: #fff; color: var(--ink); font: 16px/1.4 var(--sans); resize: none; }
.chat-form textarea:focus { border-color: var(--navy); outline: 2px solid var(--sky-20); }
.chat-send { display: grid; flex: 0 0 auto; place-items: center; width: 42px; height: 42px; padding: 0; border: 0; border-radius: 50%; background: var(--navy); color: #fff; cursor: pointer; }
.chat-send:disabled { opacity: 0.5; cursor: default; }
.chat-note { margin: 0; padding: 0 14px 10px; background: #fff; color: var(--muted); font-size: 0.72rem; line-height: 1.4; }
/* the prayer request form inside the chat */
.chat-prayer { display: grid; gap: 8px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.chat-prayer-title { margin: 0; color: var(--ink); font-weight: 600; }
.chat-prayer label { display: grid; gap: 4px; color: var(--ink); font-size: 0.85rem; font-weight: 600; }
.chat-optional { color: var(--muted); font-weight: 400; }
.chat-prayer input, .chat-prayer textarea { width: 100%; padding: 8px 10px; border: 1px solid var(--line-2); border-radius: 10px; background: #fff; color: var(--ink); font: 16px/1.4 var(--sans); }
.chat-prayer textarea { resize: vertical; }
.chat-prayer-note { margin: 0; color: var(--muted); font-size: 0.8rem; line-height: 1.45; }
.chat-prayer-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.chat-prayer-msg { margin: 0; color: var(--muted); font-size: 0.85rem; }
.chat-prayer-msg:empty { display: none; }
.chat-prayer-done { margin: 10px 0 0; padding: 8px 10px; border-radius: 10px; background: #e7f4ea; color: #17602f; font-size: 0.9rem; }
@media (max-width: 899px) {   /* it never sits on the box someone is typing in */
  body:has(main :is(input, textarea, select):focus) .chat-launch { opacity: 0; pointer-events: none; }
}
@media (max-width: 640px) {
  .chat { right: 14px; bottom: 14px; }
  .chat-launch { justify-content: center; width: 52px; height: 52px; padding: 0; }
  .chat-launch span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .chat.is-open { z-index: 80; } /* full screen, over the header too */
  .chat-panel { inset: 0; width: 100%; height: 100%; border: 0; border-radius: 0; }
  html.chat-lock, html.chat-lock body { overflow: hidden; }
}
@media (prefers-reduced-motion: reduce) { .chat-dots span { animation: none; opacity: 0.7; } .chat-launch:hover { transform: none; } }
@media print { .chat { display: none; } }

/* =====================================================================================================================
   STANDARD PARTS (18 Nov 2026)
   New work is built from these, and the older one-off rules above are being folded into them, so the same thing looks
   the same on every page. Sizes, colours and corners come from tokens: the ones at the top of this file and the ones
   just below. Before adding a class for a page, look here first.

   .badge      a small label on a thing: its status or kind       --ok --warn --danger --info --neutral --navy --sunday --friday --special
   .chip       a filter or suggestion you can press               selected through aria-pressed or aria-current
   .segmented  two to five choices in one pill                    tabs, language, period; --wrap: two columns on a phone
   .notice     a message in the page                              --ok --warn --danger --neutral
   .form-msg   the line under a form's button                     data-tone="busy | ok | error"
   .toast      a short message fixed at the bottom of the screen
   .field      label, control, .field-hint, .field-error          .form-stack and .form-row lay fields out
   .btn        .btn-xs (36px) .btn-danger .btn-text .btn-block; :disabled and [aria-busy]; .icon-btn
   .card       white surface, hairline, soft shadow               --tile --soft --navy --link; .card-head .card-title
   .title-lg / .title-md / .title-sm     serif titles below the section heading
   .label      small capitals                                     --sm
   .date-tile  month over day                                     --lg --sky
   .list .row  rows with a divider between them                   .row-lead .row-main .row-title .row-meta .row-end
   .toolbar    a line of controls above a list                    .list-tools: search and .chip-row over a list of cards; .list-count
   .empty      nothing to show yet, and what to do next
   .meter      a progress bar
   .dialog     a window over the page                             .dialog-head .dialog-body .dialog-foot
   .steps      where you are in a short flow                      aria-current="step", .is-done
   .done-mark  the tick above "sent" and "saved" messages
   .tile-icon  an icon in the leaf shape (defined with the ministries)   --round --ok --navy --lg
   .page-hero--compact   the page top for task and reading pages; .page-hero is for the main pages
   .slider     a row of slides that snaps into place              public/main.js adds the named tabs, arrows, pause and auto-advance
   .feature    one large item with a short list beside it         .feature-lead .feature-side .feature-list .feature-row
   More shared parts are listed at the top of their own groups at the end of this file: from the booking page (.choice,
   .facts, .step-actions, .icon-btn--lg), from the admin (.toast-stack, .btn-danger-solid, .dialog--small and --sheet,
   .dialog-form, .dropdown, .records and .record, .toolbar-search and .toolbar-end, .fold, .card-note, .day-fields) and
   from the account and form pages (.form-msg--beside, .field--code, .typed).
   ===================================================================================================================== */
/* badge */
.badge { display: inline-flex; align-items: center; gap: 6px; align-self: flex-start; margin: 0; padding: 3px 10px; border-radius: var(--r-pill); background: var(--neutral-bg); color: var(--neutral-fg); font: 600 0.75rem/1.4 var(--sans); letter-spacing: 0.01em; white-space: nowrap; }
.badge--ok { background: var(--ok-bg); color: var(--ok-fg); }
.badge--warn { background: var(--warn-bg); color: var(--warn-fg); }
.badge--danger { background: var(--danger-bg); color: var(--danger-fg); }
.badge--info { background: var(--info-bg); color: var(--info-fg); }
.badge--neutral { background: var(--neutral-bg); color: var(--neutral-fg); }
.badge--navy { background: var(--navy); color: #fff; }
.badge--violet { background: #ece8fb; color: #3f2a8c; }
.badge--sunday { background: var(--sunday-bg); color: var(--sunday-fg); }
.badge--friday { background: var(--friday-bg); color: var(--friday-fg); }
.badge--special { background: var(--special-bg); color: var(--special-fg); }
.badge--live { background: #c8102e; color: #fff; }   /* "Live now" (Watch live): a red badge with a beating dot */
.badge--live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; animation: live-beat 1.6s ease-in-out infinite; }
@keyframes live-beat { 50% { opacity: 0.3; } }
@media (prefers-reduced-motion: reduce) { .badge--live::before { animation: none; } }
.badge--on-dark { background: rgba(255, 255, 255, 0.12); color: #fff; box-shadow: inset 0 0 0 1px var(--on-navy-line); }   /* a notice in a navy page top */
/* the dashboard's scripts still write a status as admin-badge--<status>: the same badge, in sentence case */
.admin-badge { display: inline-block; padding: 3px 10px; border-radius: var(--r-pill); background: var(--neutral-bg); color: var(--neutral-fg); font: 600 0.75rem/1.4 var(--sans); letter-spacing: 0.01em; white-space: nowrap; }
.admin-badge::first-letter { text-transform: uppercase; }
.admin-badge--published, .admin-badge--posted, .admin-badge--done, .admin-badge--admin, .admin-badge--on, .admin-badge--confirmed { background: var(--ok-bg); color: var(--ok-fg); }
.admin-badge--draft, .admin-badge--waiting, .admin-badge--requested { background: var(--warn-bg); color: var(--warn-fg); }
.admin-badge--failed, .admin-badge--off, .admin-badge--declined { background: var(--danger-bg); color: var(--danger-fg); }
.admin-badge--new, .admin-badge--prayer { background: var(--info-bg); color: var(--info-fg); }
.admin-badge--running, .admin-badge--owner { background: var(--navy); color: #fff; }
.admin-badge--email { background: #ece8fb; color: #3f2a8c; }

/* chip and segmented control */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 8px; min-height: 38px; padding: 0 14px; border: 1px solid var(--line-2); border-radius: var(--r-pill); background: var(--surface); color: var(--ink); font: 500 0.9rem/1.2 var(--sans); text-decoration: none; white-space: nowrap; cursor: pointer; transition: border-color 0.15s, background-color 0.15s, color 0.15s; }
.chip:hover { border-color: var(--navy); }
.chip[aria-pressed="true"], .chip[aria-current="page"], .chip[aria-current="true"] { border-color: var(--navy); background: var(--navy); color: #fff; }
.chip-n { font-size: 0.8rem; opacity: 0.75; }
.segmented { display: inline-flex; max-width: 100%; padding: 4px; overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-pill); background: var(--surface); scrollbar-width: none; }
.segmented::-webkit-scrollbar { display: none; }
.segmented > * { display: inline-flex; flex: none; align-items: center; justify-content: center; gap: 8px; min-height: 36px; padding: 0 16px; border: 0; border-radius: var(--r-pill); background: none; color: var(--muted); font: 500 0.92rem/1.2 var(--sans); text-decoration: none; white-space: nowrap; cursor: pointer; transition: background-color 0.15s, color 0.15s; }
.segmented > :hover { color: var(--navy); }
.segmented > [aria-pressed="true"], .segmented > [aria-selected="true"], .segmented > [aria-current="true"], .segmented > [aria-current="page"] { background: var(--navy); color: #fff; }
.segmented .badge { padding: 1px 8px; }
/* --wrap: on a phone the choices fill two columns instead of a row that hides its last ones off the edge */
@media (max-width: 479px) { .segmented--wrap { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px; justify-self: stretch; width: 100%; overflow: visible; border-radius: var(--r); } .segmented--wrap > * { border-radius: var(--r-sm); } }

/* notice, form message, toast */
.notice { margin: 0 0 16px; padding: 12px 16px; border-radius: var(--r-sm); background: var(--sky-10); color: var(--navy); line-height: 1.5; }
.notice > :last-child { margin-bottom: 0; }
.notice--ok { background: var(--ok-bg); color: var(--ok-fg); }
.notice--warn { background: var(--warn-bg); color: var(--warn-fg); }
.notice--danger { background: var(--danger-bg); color: var(--danger-fg); }
.notice--neutral { background: var(--soft); color: var(--muted); }
.notice a { color: inherit; font-weight: 600; }
.form-msg, .auth-msg { margin: 14px 0 0; color: var(--navy); font-weight: 500; line-height: 1.5; }   /* .auth-msg: the older name */
.form-msg { scroll-margin-bottom: 84px; }   /* brought into view after an answer, it stops clear of the chat button */
:is(.form-msg, .auth-msg):empty { display: none; }
:is(.form-msg, .auth-msg)[data-tone="busy"] { color: var(--muted); }
:is(.form-msg, .auth-msg):is([data-tone="ok"], [data-tone="error"]) { padding: 10px 14px; border-radius: var(--r-sm); }
:is(.form-msg, .auth-msg)[data-tone="ok"] { background: var(--ok-bg); color: var(--ok-fg); }
:is(.form-msg, .auth-msg)[data-tone="error"] { background: var(--danger-bg); color: var(--danger-fg); }
.toast { position: fixed; left: 50%; bottom: 16px; z-index: 50; width: max-content; max-width: min(calc(100% - 32px), 640px); margin: 0; padding: 12px 18px; transform: translateX(-50%); border-radius: var(--r-sm); background: var(--navy); color: #fff; font-weight: 500; box-shadow: var(--shadow); }
.toast:empty { display: none; }

/* field: text boxes, drop-downs and text areas look the same in every form (the dashboard uses the smaller height) */
:is(.form, .form-stack, .field, .dash-form, .admin-card, .ce-fields, .cm-words, .book-zone) :is(input:not([type="checkbox"], [type="radio"], [type="file"], [type="hidden"]), select, textarea), .ce-text {
  display: block; width: 100%; min-height: var(--control); border: 1px solid var(--field-line); border-radius: var(--r-sm);
  padding: calc((var(--control) - 1.4em - 2px) / 2) 14px;   /* one line of text: the box is exactly --control tall */
  background-color: var(--surface); color: var(--ink); font: 400 1rem/1.4 var(--sans);
}
/* the next two rules repeat the first one's weight (a :not() each), so they win over it */
:is(.form, .form-stack, .field, .dash-form, .admin-card, .ce-fields, .cm-words) textarea:not([hidden]), textarea.ce-text { min-height: 112px; padding: 12px 14px; line-height: 1.5; resize: vertical; }
:is(.form, .form-stack, .field, .dash-form, .admin-card, .ce-fields, .book-zone) select:not([multiple]) {
  padding-right: 44px; -webkit-appearance: none; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235b6b85' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; background-size: 18px;
}
:is(.form, .form-stack, .field, .dash-form, .admin-card, .ce-fields, .cm-words, .book-zone) :is(input, select, textarea):focus-visible, .ce-text:focus-visible { border-color: var(--navy); outline: 2px solid var(--link); outline-offset: 1px; }
:is(.form, .form-stack, .field, .dash-form, .admin-card, .ce-fields) :is(input, select, textarea)[aria-invalid="true"] { border-color: var(--danger); box-shadow: inset 0 0 0 1px var(--danger); }
:is(.form, .form-stack, .field, .dash-form, .admin-card, .ce-fields) ::placeholder { color: #7c8aa3; opacity: 1; }
:is(.form, .form-stack, .dash-form, .admin-card, .ce-fields) label { align-content: start; }   /* a long label never stretches its neighbour's box */
.form-row, .dash-form-row { align-items: end; }
.dash, .dialog, .ce-picker, .cm-dialog { --control: var(--control-sm); }
/* a tick box with its words */
:is(.form, .form-stack, .dash-form, .admin-card, .ce-fields) label.check { display: flex; align-items: flex-start; gap: 10px; color: var(--text); font-weight: 400; cursor: pointer; }
:is(.form, .form-stack, .dash-form, .admin-card, .ce-fields) label.check input { flex: none; width: 20px; height: 20px; min-height: 0; margin: 2px 0 0; padding: 0; accent-color: var(--navy); }
.form-stack { display: grid; gap: 14px; }
.field { display: grid; align-content: start; gap: 6px; min-width: 0; color: var(--ink); font-weight: 500; }
.field-hint { color: var(--muted); font-size: 0.875rem; font-weight: 400; line-height: 1.45; }
.field-error { color: var(--danger); font-size: 0.875rem; font-weight: 500; line-height: 1.45; }
.field-error:empty { display: none; }

/* buttons: sizes, tones and states the first button rules do not have */
.btn:disabled, .btn[aria-disabled="true"] { opacity: 0.5; box-shadow: none; transform: none; cursor: not-allowed; }
.btn[aria-busy="true"] { cursor: progress; }
.btn-xs { min-height: 36px; padding: 0 14px; font-size: 0.875rem; }
@media (pointer: coarse) { .btn-xs, .chip { min-height: 40px; } }   /* a finger needs a little more than a mouse */
.btn-danger { border-color: #e6bcb8; background: var(--surface); color: var(--danger-fg); }
.btn-danger:hover { border-color: var(--danger); background: var(--danger-bg); }
.btn-text { min-height: 40px; padding: 0 10px; border-color: transparent; background: none; color: var(--link); }
.btn-text:hover { background: var(--sky-10); }
.btn-block { width: 100%; }
.icon-btn { display: inline-grid; flex: none; place-items: center; width: 40px; height: 40px; padding: 0; border: 1px solid var(--line-2); border-radius: 50%; background: var(--surface); color: var(--navy); cursor: pointer; transition: border-color 0.15s, background-color 0.15s; }
.icon-btn:hover { border-color: var(--navy); }
.icon-btn:disabled { opacity: 0.4; cursor: default; }

/* card and titles */
.card { padding: clamp(20px, 2.6vw, 28px); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); }
.card--tile { padding: 18px 20px; border-radius: var(--r); }
.card--soft { background: var(--soft); box-shadow: none; }
.card--navy { border-color: transparent; background: linear-gradient(160deg, var(--navy) 0%, var(--navy-80) 100%); color: #fff; }
.card--link { color: inherit; text-decoration: none; transition: border-color 0.2s, transform 0.2s var(--ease), box-shadow 0.2s; }
.card--link:hover { border-color: var(--navy); transform: translateY(-2px); box-shadow: var(--shadow); }
.card--navy .card-title { color: #fff; }
.card-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin-bottom: 14px; }
.card-head > :first-child { margin-bottom: 0; }
.card-title, .title-sm { margin: 0 0 12px; color: var(--navy); font: 500 1.25rem/1.25 var(--serif); letter-spacing: 0; }
.title-md { margin: 0 0 12px; color: var(--navy); font: 500 1.5rem/1.2 var(--serif); letter-spacing: 0; }
.title-lg { margin: 0 0 18px; color: var(--navy); font: 500 clamp(1.6rem, 2.4vw, 2rem)/1.2 var(--serif); letter-spacing: -0.005em; }
.label { color: var(--muted); font: 600 0.75rem/1.2 var(--sans); letter-spacing: 0.14em; text-transform: uppercase; }
.label--sm { font-size: 0.6875rem; letter-spacing: 0.1em; }

/* date tile (.dash-date and .event-row-date are its older names) */
.date-tile, .dash-date, .event-row-date { display: grid; flex: none; align-content: center; width: 60px; height: 62px; border-radius: 14px; background: var(--sky-10); text-align: center; }
:is(.date-tile, .dash-date, .event-row-date) span { color: var(--link); font: 700 0.6875rem/1.3 var(--sans); letter-spacing: 0.12em; text-transform: uppercase; }
:is(.date-tile, .dash-date, .event-row-date) b { color: var(--navy); font: 500 1.6rem/1.05 var(--serif); }
.dash-date, .event-row-date { width: auto; }   /* they sit in a grid column that sets the width */
.date-tile--lg { width: 72px; height: 76px; border-radius: 18px 6px 18px 6px; }
.date-tile--lg b { font-size: 2rem; }
.date-tile--sky { background: linear-gradient(150deg, #8cc8fc 0%, #b5c4ff 100%); }
.date-tile--sky span { color: var(--navy); }

/* list, toolbar */
.list { display: grid; margin: 0; padding: 0; list-style: none; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 12px 0; border-top: 1px solid var(--line); }
.row:first-child { border-top: 0; }
.row-lead { flex: none; }
.row-main { flex: 1 1 220px; min-width: 0; }
.row-title { display: block; color: var(--ink); font-weight: 600; overflow-wrap: anywhere; }
.row-meta { display: block; color: var(--muted); font-size: 0.875rem; }
.row-end { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-left: auto; }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; }
.list-tools { justify-content: space-between; margin: 0 0 clamp(22px, 3vw, 32px); }
.chip-row { display: flex; gap: 8px; min-width: 0; max-width: 100%; margin: -3px; padding: 3px; overflow-x: auto; scrollbar-width: none; }   /* one line; it scrolls sideways on a phone */
.chip-row::-webkit-scrollbar { display: none; }
.chip-row .chip { flex: none; }
.list-count { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin: 0 0 18px; color: var(--text); font-weight: 500; }
@media (max-width: 619px) { .list-tools .search { flex-basis: 100%; max-width: none; } }

/* empty state, meter */
.empty { display: grid; justify-items: center; gap: 10px; max-width: 560px; margin: 0 auto; padding: clamp(20px, 4vw, 36px) 0; text-align: center; }
.empty-title { margin: 0; color: var(--navy); font: 500 1.4rem/1.25 var(--serif); }
.empty p { margin: 0; color: var(--text); line-height: 1.6; }
.empty .tile-icon { margin: 0; }   /* the gap of the block spaces it */
/* room for the floating chat button: on a phone, a page's main button stops short of it (the booking steps do the same) */
@media (max-width: 640px) {
  body:has(.chat-launch) .auth-box form > .btn-block { width: calc(100% - 48px); }
  body:has(.chat-launch) :is(.book-mine [data-mine-actions], .account-more) { margin-right: 48px; }
}
.empty .actions { justify-content: center; margin-top: 8px; }
.meter { height: 8px; overflow: hidden; border-radius: var(--r-pill); background: var(--sky-20); }
.meter > span { display: block; width: var(--value, 0%); height: 100%; border-radius: inherit; background: var(--navy); transition: width 0.6s ease; }

/* dialog */
.dialog { width: min(560px, calc(100% - 32px)); max-height: min(86vh, 920px); padding: 0; overflow: hidden; border: 0; border-radius: var(--r-lg); background: var(--surface); color: var(--text); box-shadow: var(--shadow-lg); }
.dialog[open] { display: flex; flex-direction: column; }
.dialog::backdrop { background: rgba(0, 20, 52, 0.55); }
.dialog--wide { width: min(940px, calc(100% - 32px)); }
.dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.dialog-head .card-title { margin: 0; }
.dialog-body { flex: 1 1 auto; min-height: 0; padding: 18px 20px; overflow-y: auto; }
.dialog-foot { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; padding: 14px 20px; border-top: 1px solid var(--line); }
@media (prefers-reduced-motion: reduce) { .meter > span { transition: none; } }

/* steps: where you are in a short flow (the current one has aria-current="step", finished ones .is-done) */
.steps { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 0; margin: 0 0 22px; padding: 0; list-style: none; counter-reset: step; }
.steps > li { display: flex; align-items: center; gap: 8px; color: var(--muted); font: 500 0.9rem/1.2 var(--sans); counter-increment: step; }
.steps > li::before { content: counter(step); display: grid; flex: none; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--neutral-bg); color: var(--muted); font-size: 0.8rem; font-weight: 600; }
.steps > li:not(:last-child)::after { content: ""; width: clamp(12px, 3vw, 28px); height: 1px; margin: 0 8px 0 4px; background: var(--line-2); }
.steps > [aria-current="step"] { color: var(--ink); font-weight: 600; }
.steps > [aria-current="step"]::before { background: var(--navy); color: #fff; }
.steps > .is-done::before { content: "\2713"; background: var(--ok-bg); color: var(--ok-fg); }
.steps button { padding: 0; border: 0; background: none; color: inherit; font: inherit; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

/* the tick above "sent" and "saved" messages, and more shapes for the icon tile */
.done-mark { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 18px 6px 18px 6px; background: var(--ok-bg); color: var(--ok); }
.tile-icon--round { border-radius: 50%; }
.tile-icon--ok { border-color: transparent; background: var(--ok-bg); color: var(--ok); }
.tile-icon--navy { border-color: transparent; background: var(--navy); color: #fff; }
.tile-icon--lg { width: 56px; height: 56px; border-radius: 18px 6px 18px 6px; }

/* ---- standard parts added with the booking page (keep them between this line and the next section line) ---- */
/* choice: one of a few things to pick (a time, a way to meet). Rest: white with a hairline. The chosen one has
   aria-pressed="true": navy with white words, the same everywhere. .choice--card is the large kind: a .tile-icon,
   .choice-text (.choice-title over .choice-note), and .choice-end on the right. */
.choice { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: var(--control-sm); padding: 0 14px; border: 1px solid var(--line-2); border-radius: var(--r-sm); background: var(--surface); color: var(--ink); font: 600 0.98rem/1.2 var(--sans); text-align: center; cursor: pointer; transition: border-color 0.15s, background-color 0.15s, color 0.15s; }
@media (hover: hover) { .choice:hover { border-color: var(--navy); background: var(--sky-10); } }   /* a tap leaves no hover behind */
.choice[aria-pressed="true"] { border-color: var(--navy); background: var(--navy); color: #fff; }
.choice--card { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; justify-content: stretch; gap: 14px; width: 100%; padding: 14px 18px 14px 14px; border-radius: var(--r); font-weight: 400; text-align: left; }
.choice--card .tile-icon { margin: 0; }
.choice-text { display: grid; gap: 3px; }
.choice-title { font-size: 1rem; font-weight: 600; }
.choice-note { color: var(--muted); font-size: 0.9rem; line-height: 1.45; }
.choice-end { color: var(--muted); font-size: 0.875rem; font-weight: 600; white-space: nowrap; }
.choice[aria-pressed="true"] :is(.choice-note, .choice-end) { color: var(--on-navy); }
.choice[aria-pressed="true"] .tile-icon { border-color: transparent; background: var(--on-navy-line); color: var(--sky); }

/* facts: an icon and a line each (what, how long, when, where). .facts-text holds a line with a quieter .facts-note under it */
.facts { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.facts > li { display: flex; align-items: flex-start; gap: 10px; color: var(--text); font-weight: 500; line-height: 1.45; }
.facts .icon { flex: none; width: 20px; height: 20px; margin-top: 2px; color: var(--muted); }
.facts > li > :last-child { min-width: 0; overflow-wrap: anywhere; }   /* the words of a row: a long email address or link breaks inside it */
.facts-text { display: grid; justify-items: start; gap: 2px; min-width: 0; }
.facts-note { color: var(--muted); font-size: 0.9rem; font-weight: 400; }
a.facts-note { color: var(--link); }

/* step actions: the bar that ends a step of a short flow (with .steps at its top). First in the HTML the main button, in
   .step-actions-main; then a text button to go back, which sits on the left. On phones the main button stays at the
   bottom of the screen until the end of the step comes into view, and Back comes under it. A page whose steps have
   side padding sets --step-bleed to it, so the bar reaches the edges of its card. */
.step-actions { display: flex; flex-direction: row-reverse; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--line); }
.step-actions .btn { width: auto; }
.step-actions > .btn-text { min-height: 44px; margin-left: -10px; }
@media (max-width: 640px) {
  .step-actions { display: contents; }
  .step-actions-main { position: sticky; bottom: 0; z-index: 5; margin: 20px calc(var(--step-bleed, 0px) * -1) 0; padding: 13px var(--step-bleed, 0px) 15px; border-top: 1px solid var(--line); background: var(--surface); }
  .step-actions-main .btn { width: 100%; padding: 6px 14px; line-height: 1.2; white-space: normal; text-align: center; text-wrap: balance; }
  .step-actions > .btn-text { display: flex; width: fit-content; margin: 0 auto; }
}

/* a round icon button at thumb size */
.icon-btn--lg { width: 44px; height: 44px; }
/* ---- end of the booking page's standard parts ---- */


/* ---- standard parts added with the admin dashboard (keep them between this line and the next section line) ---- */
/* .toast looks        --working (a spinner; stays)  --done (a tick; clears itself)  --problem (stays until closed: .toast-text .toast-close)
   .toast-stack        where a page shows its toasts, one above the other (dashboard.js say())
   .btn-danger-solid   the red button that confirms something that cannot be undone;  .btn[aria-busy] shows a small turning ring
   .dialog--small      a question (dashboard.js confirmDialog and askDialog)     .dialog--sheet fills the screen on phones
   .dialog-form        a form holding a dialog's head, body and foot             .dialog-title  a dialog's own title line
   .dropdown           a "More" button and its short list of actions (dashboard.js moreMenu())   .dropdown-list .dropdown-item --danger
   .records .record    rows whose columns line up, laid out by the width of their card (see the note there)
   .toolbar-search / .toolbar-end   in a .toolbar: the search box that takes the spare room, and what sits at the right
   .fold               a card title you can press to fold what is under it open or shut (aria-expanded)
   textarea[data-grow] a text box as tall as its text (dashboard.js grow() where the browser cannot)
   .card-note          one small line at the foot of a card; with [data-loading] it is a card's "Loading…" line
   .day-fields .day-field   a form with a box for each day of the week: the day's name beside its box, or above it
   .dialog-title > .row-meta   the small line under a dialog's title (dashboard.js bigDialog) */
/* toasts */
.toast-stack { position: fixed; right: 0; bottom: 16px; left: 0; z-index: 50; display: grid; grid-template-columns: minmax(0, 1fr); justify-items: center; gap: 8px; margin: 0; padding: 0 16px; pointer-events: none; }
.toast-stack > .toast { position: static; max-width: min(100%, 640px); transform: none; pointer-events: auto; animation: toast-in 0.25s var(--ease); }
.toast--working, .toast--done, .toast--problem { display: flex; align-items: flex-start; gap: 10px; }
.toast--working::before { content: ""; flex: none; width: 18px; height: 18px; margin-top: 4px; border: 2px solid var(--on-navy-line); border-top-color: var(--sky); border-radius: 50%; animation: toast-spin 0.8s linear infinite; }
.toast--done, .toast--problem { border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); }
:is(.toast--done, .toast--problem)::before { content: "\2713"; content: "\2713" / ""; display: grid; flex: none; place-items: center; width: 22px; height: 22px; margin-top: 2px; border-radius: 50%; background: var(--ok-bg); color: var(--ok-fg); font: 700 0.8rem/1 var(--sans); }
.toast--problem { box-shadow: inset 4px 0 0 var(--danger), var(--shadow); }
.toast--problem::before { content: "!"; content: "!" / ""; background: var(--danger-bg); color: var(--danger-fg); }
.toast-text { flex: 1 1 auto; min-width: 0; margin: 0; overflow-wrap: anywhere; }
.toast-close { display: grid; flex: none; place-items: center; width: 32px; height: 32px; margin: -3px -8px -3px 0; padding: 0; border: 0; border-radius: 50%; background: none; color: var(--muted); cursor: pointer; }
.toast-close:hover { background: var(--neutral-bg); color: var(--ink); }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }
@keyframes toast-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .toast-stack > .toast { animation: none; } .toast--working::before, .btn[aria-busy="true"]::after { animation-duration: 2.4s; } }
/* buttons: the red one, and a small turning ring on one that is doing its work (aria-busy) */
.btn-danger-solid { background: var(--danger); color: #fff; }
.btn-danger-solid:hover { background: var(--danger-fg); }
.btn[aria-busy="true"]::after { content: ""; flex: none; width: 14px; height: 14px; margin: 0; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: toast-spin 0.8s linear infinite; }
/* dialogs: a question, a full screen on phones, a form that fills one */
.dialog--small { width: min(460px, calc(100% - 32px)); }
.dialog--small .dialog-head { padding-bottom: 0; border-bottom: 0; }
.dialog--small .dialog-body { padding-top: 10px; }
.dialog--small .dialog-body > p { margin: 0 0 12px; }
.dialog--small .dialog-body > :last-child { margin-bottom: 0; }
.dialog--small .dialog-foot { padding-top: 6px; border-top: 0; }
.dialog-form { display: flex; flex: 1 1 auto; flex-direction: column; min-height: 0; }
.dialog-title { flex: 1 1 auto; min-width: 0; }
.dialog-title .card-title { margin: 0; overflow-wrap: anywhere; }
.dialog-foot > .form-msg { flex: 1 1 100%; margin: 0; }
.dialog-foot > .dialog-foot-start { margin-right: auto; }
@media (max-width: 599px) {
  .dialog--sheet { width: 100%; max-width: none; height: 100%; height: 100dvh; max-height: none; margin: 0; border-radius: 0; }
  .dialog--sheet :is(.dialog-head, .dialog-body, .dialog-foot) { padding-right: 16px; padding-left: 16px; }
}
/* the More menu */
.dropdown { position: relative; display: inline-flex; }
.dropdown-btn::after { content: ""; width: 7px; height: 7px; margin: -4px 1px 0 -1px; border: solid currentColor; border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); }
.dropdown-list { position: absolute; top: calc(100% + 6px); right: 0; z-index: 20; display: grid; gap: 2px; min-width: 11.5rem; padding: 6px; border: 1px solid var(--line-2); border-radius: var(--r); background: var(--surface); box-shadow: var(--shadow); }
.dropdown--up .dropdown-list { top: auto; bottom: calc(100% + 6px); }
.dropdown--left .dropdown-list { right: auto; left: 0; }
.dropdown-item { display: flex; align-items: center; width: 100%; min-height: 40px; padding: 0 12px; border: 0; border-radius: var(--r-sm); background: none; color: var(--ink); font: 500 0.92rem/1.2 var(--sans); text-align: left; white-space: nowrap; cursor: pointer; }
.dropdown-item:hover, .dropdown-item:focus-visible { background: var(--sky-10); }
.dropdown-item:focus-visible { outline-offset: -2px; }
.dropdown-item--danger { color: var(--danger-fg); }
.dropdown-item--danger:hover, .dropdown-item--danger:focus-visible { background: var(--danger-bg); }
.dropdown-line { width: 100%; height: 1px; margin: 4px 0; border: 0; background: var(--line); }
/* Records. .records goes on the card (or a box in it): it is the size the rows answer to. Inside it .records-grid
   holds .record rows, straight or in .records-group sections under a .records-heading, in a .records-rows list. A row
   has .record-date, .record-title, .record-tags (with .record-kind and .record-status badges), an optional
   .record-note line and .record-actions. Narrow: title with the status at its right, date and kind under it, the
   note, then one line of actions. From 620px: date, then title with its badges and note under it, then the actions.
   From 940px: one line whose columns (date, title, kind, status, actions) line up down the whole list. */
.records { container: records / inline-size; }
.records-grid { display: grid; grid-template-columns: minmax(0, 1fr); column-gap: 16px; }
.records-group, .records-rows { display: grid; grid-column: 1 / -1; grid-template-columns: subgrid; margin: 0; padding: 0; list-style: none; }
.records-heading { grid-column: 1 / -1; margin: 18px 0 6px; }
.records-grid > :is(.empty, .card-note) { grid-column: 1 / -1; }
.record { display: grid; grid-column: 1 / -1; grid-template-columns: auto minmax(0, 1fr) auto; column-gap: 10px; align-items: center; padding: 11px 0; border-top: 1px solid var(--line); border-radius: var(--r-xs); }
.records-heading + .records-rows > .record:first-child, .records-rows:first-child > .record:first-child { border-top-color: transparent; }
.record .badge { align-self: center; }
.record-title { grid-area: 1 / 1 / 2 / 3; color: var(--ink); font-weight: 600; line-height: 1.4; overflow-wrap: anywhere; }
.record-tags { display: contents; }
.record-status { grid-area: 1 / 3; justify-self: end; }
.record-date { grid-area: 2 / 1; margin-top: 4px; color: var(--muted); font-size: 0.875rem; white-space: nowrap; }
.record-kind { grid-area: 2 / 2 / 3 / 4; justify-self: start; margin-top: 4px; }
.record-note { grid-column: 1 / -1; margin-top: 4px; color: var(--muted); font-size: 0.875rem; line-height: 1.45; overflow-wrap: anywhere; }
.record-note .meter { margin-top: 8px; }
.record-actions { display: flex; flex-wrap: wrap; grid-column: 1 / -1; align-items: center; gap: 5px; margin-top: 9px; }
.record-actions:empty { display: none; }
.record-actions .btn-xs { padding: 0 12px; }   /* four buttons fit one line on a phone */
@container records (max-width: 299px) { .record-actions .dropdown-btn::after { display: none; } }
.record--flash { animation: record-flash 2.6s ease-out; }
@keyframes record-flash { 0%, 40% { background-color: var(--sky-20); box-shadow: -8px 0 0 var(--sky-20), 8px 0 0 var(--sky-20); } 100% { background-color: transparent; box-shadow: -8px 0 0 transparent, 8px 0 0 transparent; } }
@media (prefers-reduced-motion: reduce) { .record--flash { animation-timing-function: step-end; } }
@container records (min-width: 620px) {
  .records-grid { grid-template-columns: max-content minmax(0, 1fr) max-content; }
  .record { grid-template-columns: 6.6em minmax(0, 1fr) max-content; grid-template-columns: subgrid; column-gap: 16px; padding: 11px 0; }
  .record-date { grid-area: 1 / 1; align-self: start; margin-top: 2px; }
  .record-title { grid-area: 1 / 2; }
  .record-tags { display: flex; flex-wrap: wrap; grid-area: 2 / 2; gap: 6px; margin-top: 5px; }
  .record-kind, .record-status { margin-top: 0; }
  .record-note { grid-column: 2; }
  .record-actions { grid-area: 1 / 3 / span 2 / 4; flex-wrap: nowrap; justify-content: flex-end; gap: 8px; margin-top: 0; }
  .record-actions .btn-xs { padding: 0 14px; }
}
@container records (min-width: 940px) {
  .records-grid { grid-template-columns: max-content minmax(14rem, 1fr) max-content max-content max-content; }
  .record { grid-template-columns: 6.6em minmax(14rem, 1fr) 10.5rem 6rem max-content; grid-template-columns: subgrid; padding: 8px 0; }
  .record-date { align-self: center; margin-top: 0; }
  .record-tags { display: contents; }
  .record-kind { grid-area: 1 / 3; }
  .record-status { grid-area: 1 / 4; justify-self: start; }
  .record-note { grid-column: 2 / 5; }
  .record-actions { grid-area: 1 / 5; }
}
/* toolbar pieces, the fold, growing text boxes, a card's last small line */
.segmented .badge { align-self: center; }   /* a count in a tab sits on the tab's line */
.toolbar > .field { flex: 0 1 auto; }
.toolbar > .toolbar-search { flex: 1 1 130px; max-width: 360px; }
.toolbar > .toolbar-end { margin-left: auto; }
.fold { display: inline-flex; align-items: center; gap: 10px; padding: 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.fold::before { content: ""; flex: none; width: 8px; height: 8px; margin: 0 3px 0 1px; border: solid var(--muted); border-width: 0 2px 2px 0; transform: rotate(-45deg); transition: transform 0.2s var(--ease); }
.fold[aria-expanded="true"]::before { transform: rotate(45deg); }
textarea[data-grow] { field-sizing: content; resize: none; }
.card-note { margin: 14px 0 0; color: var(--muted); font-size: 0.875rem; line-height: 1.5; }
@media (prefers-reduced-motion: reduce) { .fold::before { transition: none; } }
/* what a card shows until its data arrives (build.py writes the line, dashboard.js loadFailed() adds "Try again") */
.card-note[data-loading] { margin: 0; }
.card-note[data-loading] .btn { margin-left: 6px; vertical-align: middle; }
/* a badge beside other things sits on their line, not at their top */
:is(.row, .card-head, .actions, .fold) > .badge { align-self: center; }
/* a box for each day of the week: the day's name sits beside its box where the card has room, above it where not
   (.sermon-times and .sermon-day are the Sermons page's names for the same) */
.day-fields, .sermon-times { container-type: inline-size; }
@container (min-width: 440px) { .day-field, .sermon-day { grid-template-columns: 7.5em minmax(0, 1fr); align-items: center; } }
.dialog-title > .row-meta { margin: 2px 0 0; }
/* ---- end of the admin dashboard's standard parts ---- */


/* ---- standard parts added with the account and form pages (keep them between this line and the next section line) ---- */
/* How a form answers (public/forms.js, window.nccForm): the line under the button is .form-msg; what is wrong with one
   field shows under that field as .field-error. A field's rule is a .field-hint under its label. */
:is(.form, .form-stack) > .form-msg { margin-top: 0; }                    /* the gap between the rows is enough */
.form-msg--beside { flex: 0 1 auto; min-width: 0; margin: 0; }            /* beside its button, in a flex row */
.event-box .form-msg { margin: 14px 0 0; }                                /* the event box spaces its own paragraphs: the answer keeps its gap */
.form-stack > .notice { margin: 0; }                                      /* a notice between the rows of a form */
.field > label + .field-hint { margin-top: -4px; }                        /* the rule sits close under its label */
.field-error { position: relative; padding-left: 1.5em; }
.field-error::before { content: ""; position: absolute; left: 0; top: 0.22em; width: 1em; height: 1em; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7.5v5.5M12 16.5v.1'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7.5v5.5M12 16.5v.1'/%3E%3C/svg%3E") center / contain no-repeat; }
/* a code from an email: large, evenly spaced digits in a box about as wide as the code */
.field.field--code input { max-width: 13rem; font-size: 1.25rem; font-variant-numeric: tabular-nums; letter-spacing: 0.3em; }   /* .field twice: it outranks the standard field rule */
/* something a visitor typed (an email address, a username, a name): it wraps instead of pushing its box wider */
.typed { overflow-wrap: anywhere; }
/* ---- end of the account and form pages' standard parts ---- */


/* ---- home page: the hero's card slider, Latest messages, Coming up (added below this line) ---- */

/* slider: a row of slides that snaps into place. Without JavaScript it is a row to swipe or scroll; public/main.js adds
   the dots, previous / next, pause / play and the auto-advance (never for people who ask for reduced motion). */
.slider { position: relative; display: flex; flex-direction: column; min-width: 0; }
.slider-track { position: relative; display: flex; flex: 1 1 auto; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scrollbar-width: none; }
.slider-track::-webkit-scrollbar { display: none; }
.slide { position: relative; display: flex; flex: 0 0 100%; flex-direction: column; min-width: 0; scroll-snap-align: start; scroll-snap-stop: always; }
/* a bar for each slide, in one line: the open one's line fills as its time runs, and stops while the slider is held */
.slider-tabs { display: flex; gap: 6px; }
.slider-tab { position: relative; flex: 1 1 0; min-width: 0; height: 32px; padding: 0; border: 0; background: none; cursor: pointer; }
.slider-tab::before, .slider-tab::after { content: ""; position: absolute; left: 0; top: calc(50% - 1.5px); height: 3px; border-radius: var(--r-pill); }
.slider-tab::before { right: 0; background: rgba(201, 220, 245, 0.28); }
.slider-tab:hover::before, .slider-tab[aria-current="true"]::before { background: rgba(201, 220, 245, 0.5); }
.slider-tab[aria-current="true"]::after { width: 100%; background: var(--sky); }
.slider.is-playing .slider-tab[aria-current="true"]::after { animation: slider-fill var(--slider-ms, 7000ms) linear both; }
.slider.is-held .slider-tab[aria-current="true"]::after { animation-play-state: paused; }
@keyframes slider-fill { from { width: 0; } to { width: 100%; } }
@media (prefers-reduced-motion: reduce) { .slider.is-playing .slider-tab[aria-current="true"]::after { animation: none; } }

/* the top of the home page: full-width slides, one after another, each with its own photo (build.py hero_slide_html,
   src/site-content.js; Admin > Home page). The slider (public/main.js) puts a bar for each slide along the bottom. */
.hero-when { display: flex; align-items: flex-start; gap: 10px; margin: 22px 0 0; color: var(--on-navy); font-size: 0.98rem; line-height: 1.5; }
.hero-when .icon { flex: none; margin-top: 3px; color: var(--sky); }
.hero-when strong { color: #fff; font-weight: 600; }
.eyebrow > span { white-space: nowrap; }
.hero .eyebrow { flex-wrap: wrap; gap: 0 10px; }
.hero-slide {
  --photo: none; isolation: isolate; justify-content: center; color: var(--on-navy);
  min-height: 600px; min-height: max(560px, min(760px, calc(100svh - 120px)));
  padding: clamp(56px, 7vw, 96px) 0 clamp(80px, 8vw, 104px);   /* room at the bottom for the bars */
}
/* a panel's photo as an image (so it can wait to load) rather than --photo: under the tint and the dot screen */
.panel-photo { position: absolute; inset: 0; z-index: -4; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
/* a press and hold stops the slides: no text selection or "save image" menu in the way */
.hero-track { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
@media (max-width: 979px) {   /* the words run the whole width on a phone: an even, deeper tint behind them */
  .hero-slide::before { background: linear-gradient(180deg, rgba(0, 20, 52, 0.8), rgba(0, 20, 52, 0.9) 60%, rgba(18, 30, 92, 0.92)); }
}
.hero-slide-grid { display: grid; grid-template-columns: minmax(0, 1fr); align-items: center; gap: 48px; }
.hero-copy { max-width: 760px; }
.hero-media { display: none; }
.hero-media .slide-media { margin: 0; border-radius: var(--leaf); box-shadow: var(--shadow-lg); }
@media (min-width: 980px) {
  .hero-slide-grid--media { grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: 64px; }
  .hero-media { display: block; }
}
.hero-slide .lede { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 4; }
.hero-slide .visit-card-title { font-size: clamp(2.1rem, 4.2vw, 3.5rem); line-height: 1.1; }
.hero-slide .visit-card-time { margin-bottom: 24px; }
.hero-slide .visit-card-list { max-width: 540px; margin-bottom: 30px; padding-top: 22px; }
.hero-controls { position: absolute; inset: auto 0 0; z-index: 1; padding-bottom: clamp(16px, 2.4vw, 28px); pointer-events: none; }
.hero-controls-row { display: flex; align-items: center; gap: 12px 24px; }
.hero-controls-row > * { pointer-events: auto; }
.hero-controls .slider-tabs { flex: 1 1 auto; max-width: 680px; }
.slide-figure { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; margin: 2px 0 18px; padding-bottom: 20px; border-bottom: 1px solid var(--on-navy-line); color: var(--sky); font: 500 clamp(2.8rem, 4.6vw, 3.7rem)/1 var(--serif); letter-spacing: -0.02em; }
.slide-figure span { color: var(--on-navy); font: 600 0.84rem/1.3 var(--sans); letter-spacing: 0.1em; text-transform: uppercase; }
.slide-place { margin: 0 0 16px; color: var(--on-navy); font-size: 0.95rem; }
.slide-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin: 0 0 10px; color: var(--on-navy); font-size: 0.92rem; }
.slide-media { position: relative; display: block; margin: 0 0 16px; overflow: hidden; aspect-ratio: 16 / 9; border-radius: var(--r); background: var(--media); box-shadow: 0 18px 36px -20px rgba(0, 0, 0, 0.75); }
.slide-media img { width: 100%; height: 100%; object-fit: cover; }
.play-badge { position: absolute; left: 14px; bottom: 14px; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: rgba(0, 20, 52, 0.78); color: #fff; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.play-badge svg { margin-left: 2px; }
.slide-big { margin: 0 0 12px; }
.slide-big a { color: var(--sky); font: 500 clamp(2.1rem, 3.6vw, 2.9rem)/1.05 var(--serif); letter-spacing: -0.015em; text-decoration: none; white-space: nowrap; }
.slide-big a:hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 6px; }
.slide-host { display: flex; align-items: center; gap: 14px; margin: 2px 0 18px; }
.slide-host img { flex: none; width: 56px; height: 56px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 2px rgba(140, 200, 252, 0.6); }
.slide-host span { display: grid; gap: 1px; }
.slide-host strong { color: #fff; font-weight: 600; }
.slide-host span span { font-size: 0.9rem; }

/* feature: one large item with a short list beside it (home page: Latest messages, Coming up) */
.feature { display: grid; gap: clamp(22px, 3vw, 40px); }
.feature-lead .post-title { font-size: clamp(1.6rem, 2.3vw, 2.1rem); }
.feature-side { display: grid; align-content: start; gap: clamp(18px, 2vw, 24px); }
.feature-list { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.feature-row { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 16px; padding: 12px; background: rgba(255, 255, 255, 0.72); border: 1px solid var(--line); border-radius: var(--r); transition: background 0.2s, border-color 0.2s, box-shadow 0.2s; }
.feature-row:hover, .feature-row:focus-within { background: var(--surface); border-color: var(--line-2); box-shadow: var(--shadow-sm); }
.feature-row:focus-within { outline: 2px solid var(--link); outline-offset: 2px; }
.feature-thumb { display: grid; place-items: center; width: 150px; overflow: hidden; aspect-ratio: 16 / 9; border-radius: var(--r-sm); background: var(--media); }
.feature-thumb img { width: 100%; height: 100%; object-fit: cover; }
.feature-thumb .mark { width: 30%; height: auto; color: #fff; opacity: 0.55; }
.feature-body { display: grid; justify-items: start; gap: 5px; min-width: 0; }
.feature-title { color: var(--ink); font: 500 1.2rem/1.3 var(--serif); text-decoration: none; }
.feature-title::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.feature-title:focus { outline: none; }
.feature-row:hover .feature-title { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.feature-meta { color: var(--muted); font-size: 0.9rem; }
@media (min-width: 980px) { .feature { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); align-items: start; } .feature--one { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 479px) { .feature-row { gap: 12px; padding: 10px; } .feature-thumb { width: 112px; } .feature-title { font-size: 1.08rem; } }

/* phones, home page: the ministry cards are a row to swipe (the Services page lists all of them), so the page is shorter.
   The service times are never a swipe row: all of them show at once (the compact rows with the schedule rules). */
@media (max-width: 619px) {
  .ministries--swipe { display: flex; gap: 12px; margin-inline: calc(var(--gutter) * -1); padding: 4px var(--gutter) 14px; overflow-x: auto; scroll-padding-inline: var(--gutter); scroll-snap-type: x mandatory; scrollbar-width: none; }
  .ministries--swipe::-webkit-scrollbar { display: none; }
  .ministries--swipe > .ministry { flex: 0 0 78%; scroll-snap-align: start; }
  /* in a row to swipe, a ministry card keeps its desktop shape: the photo on top, the icon on its edge */
  .ministries--swipe > .ministry--photo { display: flex; flex-direction: column; }
  .ministries--swipe > .ministry--photo > .ministry-photo { aspect-ratio: 3 / 2; }
  .ministries--swipe .ministry--photo .tile-icon { display: grid; }
  /* everywhere else on a phone it is a square photo beside its words */
  .ministries:not(.ministries--swipe) > .ministry--photo { grid-template-columns: 96px minmax(0, 1fr); align-items: start; gap: 16px; padding: 16px; }
  .ministries:not(.ministries--swipe) > .ministry--photo > .ministry-photo { width: 96px; height: 96px; min-height: 0; aspect-ratio: 1; border-radius: var(--leaf-sm); }
  .ministries:not(.ministries--swipe) > .ministry--photo .ministry-body { padding: 0; }
  /* contact tiles: an icon with a label and a value, one short row each */
  .contact { display: grid; grid-template-columns: 44px minmax(0, 1fr); align-items: center; column-gap: 14px; padding: 14px 16px; }
  .contact .tile-icon { grid-row: span 2; width: 44px; height: 44px; margin: 0; }
  .contact-value { margin: 2px 0 0; font-size: 1.15rem; }
  .contact-hint { display: none; }
  .contact-value--email { font-size: clamp(0.8rem, (100cqi - 58px) / 16.4, 1.15rem); }
}
@media (max-width: 359px) { .ministries:not(.ministries--swipe) > .ministry--photo { grid-template-columns: 80px minmax(0, 1fr); } .ministries:not(.ministries--swipe) > .ministry--photo > .ministry-photo { width: 80px; height: 80px; } }
/* four tiles in a line on a wide screen: the email tile is wider, and every value is one size */
@media (min-width: 1100px) {
  .contacts--four { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.4fr); }
  .contacts--four .contact { padding: 22px; }
  .contacts--four .contact-value { font-size: 1.15rem; }
  .contacts--four .contact-value--email { font-size: clamp(0.8rem, (100cqi - 6px) / 15.6, 1.15rem); }
}

/* lists of sermons and events, and the pages for one sermon and one event */
.blog .post:not(.post--featured) .post-excerpt { display: -webkit-box; overflow: hidden; font-size: 0.97rem; -webkit-box-orient: vertical; -webkit-line-clamp: 4; }
.hero-flag { margin: 0 0 14px; }
@media (min-width: 700px) { .blog--pair { grid-template-columns: repeat(2, minmax(0, 1fr)); } }   /* two cards: two halves, not two thirds and a gap */
.more-all--alone { margin-top: 0; }
@media (max-width: 619px) { .reveal .ministries--swipe [data-reveal] { opacity: 1; transform: none; } }   /* cards in a swipe row never wait to fade in */
/* quick links: a few places to go, as tiles ("Page not found") */
.quick-links { display: grid; gap: 14px; margin: 0; padding: 0; list-style: none; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); }
.quick-link { display: flex; align-items: center; gap: 14px; height: 100%; }
.quick-link .tile-icon { flex: none; margin: 0; }
.quick-link strong { display: block; color: var(--navy); font: 500 1.2rem/1.25 var(--serif); }
.quick-link span span { color: var(--muted); font-size: 0.92rem; }

/* =====================================================================================================================
   THE CHURCH APP (a PWA: build.py app_page, notifications_page, offline_page; public/pwa.js; public/sw.js)
   ===================================================================================================================== */
/* "Get the NCC app": a card at the bottom of a phone's screen, in the browser only */
.install { position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 75; display: flex; align-items: center; gap: 12px; max-width: 520px; margin: 0 auto; padding: 12px 12px 12px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-lg); }
.install-icon { flex: none; width: 52px; height: 52px; border-radius: 14px; }
.install-text { flex: 1 1 auto; min-width: 0; }
.install-title { margin: 0; color: var(--navy); font: 600 1rem/1.3 var(--sans); }
.install-note { margin: 2px 0 0; color: var(--text); font-size: 0.88rem; line-height: 1.45; }
.install-share { display: inline-block; width: 16px; height: 16px; color: var(--link); vertical-align: -3px; }
.install-actions { display: flex; flex: none; align-items: center; gap: 6px; }
html.has-install .chat-launch, html.has-update .chat-launch { opacity: 0; pointer-events: none; }   /* one thing in the corner at a time */

/* "A new version of the site is ready. Reload" */
.app-update { position: fixed; left: 50%; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 80; display: flex; align-items: center; gap: 14px; width: max-content; max-width: calc(100% - 24px); padding: 10px 10px 10px 18px; transform: translateX(-50%); border-radius: var(--r-pill); background: var(--navy); color: #fff; font-weight: 500; box-shadow: var(--shadow-lg); }

/* the tabs along the bottom (html.has-tabs, set in the page's head): in the installed app on every page; in a browser
   tab once the app home (/app/) has been opened in it, on the app home itself, and on every page on a phone, a tablet
   or a narrow window, so every page opened from the app home has a way back. On a wider computer screen the website's
   own pages keep their menu and no tabs. */
.app-tabs { display: none; }
html.has-tabs .app-tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 70; display: grid; grid-auto-columns: minmax(0, 1fr); grid-auto-flow: column; padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); background: rgba(255, 255, 255, 0.96); border-top: 1px solid var(--line); -webkit-backdrop-filter: saturate(1.6) blur(14px); backdrop-filter: saturate(1.6) blur(14px); }
html.has-tabs body { padding-bottom: calc(68px + env(safe-area-inset-bottom)); }
html.has-tabs .chat { bottom: calc(80px + env(safe-area-inset-bottom)); }
html.has-tabs .app-update { bottom: calc(84px + env(safe-area-inset-bottom)); }
html.has-tabs .install { bottom: calc(80px + env(safe-area-inset-bottom)); }   /* a browser tab using the app: above the tabs (never shown in the installed app) */
html.has-tabs li:has(> .footer-app-link) { display: none; }   /* the footer's "Get the app": not inside the app */
.app-tab { display: grid; justify-items: center; gap: 3px; min-height: 52px; padding: 6px 2px 4px; border-radius: var(--r-sm); color: var(--muted); font: 600 0.7rem/1.1 var(--sans); text-decoration: none; }
.app-tab[aria-current="page"] { color: var(--navy); }
.app-tab[aria-current="page"] .icon { color: var(--link); }
.app-tab:active { background: var(--soft); }

/* the app's home screen (/app/) */
.app-top { position: sticky; top: 0; z-index: 60; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: calc(10px + env(safe-area-inset-top)) var(--gutter) 10px; background: var(--navy); color: #fff; }
.app-brand { color: #fff; }   /* the shared .brand: the name and motto in one line each, as in the website's header */
@media (max-width: 520px) { .app-top { gap: 10px; padding-left: 14px; padding-right: 14px; } }
.app-main { display: grid; gap: 16px; max-width: 720px; margin: 0 auto; padding: 18px var(--gutter) 28px; }
/* "Get the NCC Church app" at the top of the app home, in a browser only (build.py get_app_card, public/pwa.js) */
.get-app { position: relative; display: grid; grid-template-columns: 56px minmax(0, 1fr); align-items: start; gap: 10px 14px; padding-right: 54px; }
.get-app-icon { width: 56px; height: 56px; border-radius: 14px; }
.get-app-title { margin: 2px 0 4px; color: var(--navy); font: 600 1.05rem/1.3 var(--sans); }
.get-app-text p { margin: 0; color: var(--text); font-size: 0.93rem; line-height: 1.5; }
.get-app-actions { grid-column: 2; display: flex; }
.get-app-actions:not(:has(.btn:not([hidden]))) { display: none; }
.get-app-close { position: absolute; top: 10px; right: 10px; }
/* the app home's slides: the home page's slides as a card, the latest message first, its picture over its words */
.hero--app { border-radius: var(--r-lg); box-shadow: var(--shadow); }
.hero--app .hero-slide { min-height: 0; padding: 24px 0 58px; }
.hero--app .container { padding-inline: clamp(18px, 5vw, 28px); }
.hero--app .hero-slide-grid, .hero--app .hero-slide-grid--media { grid-template-columns: minmax(0, 1fr); gap: 16px; }
.hero--app .hero-media { display: block; order: -1; }
.hero--app .hero-media .slide-media { border-radius: var(--r); }
.hero--app .hero-copy { max-width: none; }
.hero--app .eyebrow { margin-bottom: 10px; }
.hero--app .hero-title { margin-bottom: 12px; font-size: clamp(1.7rem, 6.4vw, 2.3rem); line-height: 1.12; }
.hero--app .lede { margin-bottom: 18px; font-size: 1rem; -webkit-line-clamp: 3; }
.hero--app .visit-card-title { font-size: clamp(1.6rem, 6vw, 2.1rem); }
.hero--app .visit-card-time { margin: 6px 0 14px; font-size: clamp(2.6rem, 11vw, 3.4rem); }
.hero--app .visit-card-list { gap: 10px; margin-bottom: 18px; padding-top: 14px; font-size: 0.95rem; }
.hero--app .slide-figure { margin-bottom: 12px; padding-bottom: 12px; font-size: clamp(2.2rem, 9vw, 2.8rem); }
.hero--app .hero-when { margin-top: 16px; font-size: 0.92rem; }
.hero--app .hero-controls { padding-bottom: 10px; }
.hero--app .slider-tabs { max-width: none; }
.app-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.app-tile { display: grid; justify-items: center; align-content: center; gap: 8px; min-height: 104px; padding: 14px 6px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow-sm); color: var(--ink); font: 600 0.86rem/1.2 var(--sans); text-align: center; text-decoration: none; }
.app-tile .tile-icon { width: 48px; height: 48px; margin: 0; }
.app-tile:active { background: var(--soft); }
@media (min-width: 560px) { .app-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* the Notifications page */
.push-card { max-width: 640px; margin: 0 auto; }
.push-card .notice { margin-bottom: 18px; }
.push-card .notice p { margin: 0; }
.push-topics { display: grid; gap: 14px; margin: 0 0 22px; padding: 0; border: 0; }
.push-topics .label { margin-bottom: 4px; }
.push-topics label.check { display: flex; align-items: flex-start; gap: 12px; color: var(--ink); cursor: pointer; }
.push-topics label.check input { flex: none; width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--navy); }
.push-topics label.check span { display: grid; gap: 2px; }

/* the offline page */
.offline-card { max-width: 560px; margin: 0 auto; }
.offline-call { margin: 16px 0 0; color: var(--text); }

/* Admin > Notifications */
.notify { display: grid; gap: 20px; }
.notify-grid { display: grid; gap: 20px; }
@media (min-width: 1000px) { .notify-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; } }
.notify-counts { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; margin: 0 0 14px; padding: 0; list-style: none; }
.notify-count { display: grid; gap: 2px; padding: 12px 14px; background: var(--soft); border-radius: var(--r-sm); }
.notify-count strong { color: var(--navy); font: 500 1.6rem/1.1 var(--serif); }
.notify-count span { color: var(--muted); font-size: 0.86rem; }
.notify-count--all { background: var(--navy); }
.notify-count--all strong { color: var(--sky); }
.notify-count--all span { color: var(--on-navy); }
/* the times a reminder can go out, a tick box for each of Sunday's service, the other services and events: the shared
   .dash-table, its row headings as plain words and its tick boxes centred */
.notify-matrix th, .notify-matrix td { padding: 10px 6px; }
.notify-matrix thead th { text-align: center; white-space: normal; vertical-align: bottom; }
.notify-matrix tbody th { padding-left: 0; background: none; color: var(--text); font: 400 0.95rem/1.35 var(--sans); letter-spacing: 0; text-transform: none; white-space: normal; }
.notify-matrix td { width: 21%; text-align: center; }
.notify-matrix tbody tr:last-child th { border-bottom: 0; }
/* Coming up in the next 7 days: a heading for each day, then each notification at its time (the shared .list and .row) */
.notify-day { margin: 0 0 2px; color: var(--navy); font: 600 0.95rem/1.3 var(--sans); }
.notify-day-group { padding-bottom: 18px; break-inside: avoid; }
@media (min-width: 900px) { .notify-coming { columns: 2; column-gap: 44px; } }   /* a computer: the week in two columns */
.notify-at { flex: none; width: 5.5em; color: var(--navy); font-weight: 600; font-variant-numeric: tabular-nums; }
.notify-coming .row { flex-wrap: nowrap; align-items: baseline; }   /* the time beside the words, on a phone too */
.notify-coming .row-main { flex: 1 1 auto; }
.notify-change { display: grid; gap: 12px; padding-top: 4px; }
.notify-matrix input { width: 20px; height: 20px; margin: 0; accent-color: var(--navy); vertical-align: middle; cursor: pointer; }
.notify-services { display: grid; gap: 10px; }
.notify label.check > span { display: grid; gap: 2px; }   /* the words, then their hint under them */

/* ---- standard parts added with the Bible and Pastoral Notes pages (20 Nov 2026; keep them between this line and the end) ----
   .scripture        Bible verses as the church reads them: .v one verse, .verse-n its number (on the Bible page a button:
                     tapping it, or the verse, chooses it; .is-selected, .is-target), .v-text its words,
                     .scripture-heading, .scripture-title (a psalm's title), .scripture-line (a verse on its own line),
                     .scripture-q (a line of poetry). On a <blockquote>: the verses a note is on, with <cite> and
                     .scripture-notice (a licensed or Creative Commons Bible's notice) under them.
                     --yellow --green --blue --pink --purple: the highlight's colour; on one verse .hl .hl--<colour>
   .mark-btn         the small round button after verses the pastor wrote about (--group for verses gathered together)
   .swatches         the highlight colours to pick from: .swatch --<colour> --none, the one picked has aria-pressed
   .bar-bottom       a bar fixed at the bottom of the screen for what was chosen: .bar-bottom-title, .bar-bottom-row,
                     .bar-bottom-group, .bar-bottom-close. It sits above the app's tabs, and the chat button steps aside.
   .note-card        one note or one sermon's teaching on Pastoral Notes (with .card): .note-head .note-meta .note-title
                     .note-label .note-list .note-summary .note-prayer .note-words .note-tools .note-passages
   .chip-x           a small × in a .chip that takes it out          .check-words  the words beside a tick box or radio
   .dialog-foot-start   a button kept at the left of a .dialog-foot (Delete, Change)
   ===================================================================================================================== */
:root { --hl-yellow: #fff0a3; --hl-green: #d3f1d7; --hl-blue: #d4e8fd; --hl-pink: #fcdce7; --hl-purple: #e6ddfb; }

/* scripture */
.scripture { color: var(--ink); font: 400 1.2rem/1.85 var(--serif); }
.scripture:lang(hi), .scripture :lang(hi) { font-family: "Noto Sans Devanagari", "Kohinoor Devanagari", "Devanagari Sangam MN", "Mangal", var(--sans); font-size: 1.08rem; line-height: 2; }
.scripture:lang(gu), .scripture :lang(gu) { font-family: "Noto Sans Gujarati", "Gujarati Sangam MN", "Shruti", var(--sans); font-size: 1.08rem; line-height: 2; }
.scripture p { margin: 0 0 0.9em; }
.scripture .scripture-line { margin-bottom: 0.4em; }
.scripture .scripture-q { margin-bottom: 0.25em; padding-left: 1.4em; }
.scripture-heading { margin: 1.5em 0 0.5em; color: var(--navy); font: 600 0.95rem/1.35 var(--sans); letter-spacing: 0.01em; }
.scripture > .scripture-heading:first-child { margin-top: 0; }
.scripture-title { color: var(--muted); font-style: italic; }
.scripture .v { border-radius: 4px; }
.scripture-text .v { cursor: pointer; }
.v-text { white-space: pre-line; border-radius: 4px; -webkit-box-decoration-break: clone; box-decoration-break: clone; transition: background-color 0.15s; }
.verse-n { display: inline-block; margin: 0 0.2em 0 0; padding: 0 0.2em; border: 0; border-radius: 4px; background: none; color: var(--link); font: 600 0.6em/1.2 var(--sans); vertical-align: super; }
button.verse-n { cursor: pointer; }
button.verse-n:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
.v.is-selected .v-text { text-decoration: underline 2px var(--link); text-underline-offset: 0.24em; text-decoration-skip-ink: none; }
.v.is-selected .verse-n { background: var(--navy); color: #fff; }
.v.is-target .v-text { background-color: var(--sky-20); }
.hl--yellow .v-text { background-color: var(--hl-yellow); }
.hl--green .v-text { background-color: var(--hl-green); }
.hl--blue .v-text { background-color: var(--hl-blue); }
.hl--pink .v-text { background-color: var(--hl-pink); }
.hl--purple .v-text { background-color: var(--hl-purple); }
.v-missing { color: var(--muted); }
blockquote.scripture { margin: 0 0 14px; padding: 14px 18px; border-left: 4px solid var(--line-2); border-radius: 0 var(--r-sm) var(--r-sm) 0; background: var(--soft); font-size: 1.1rem; line-height: 1.75; }
blockquote.scripture p { margin: 0 0 6px; }
blockquote.scripture cite { display: block; color: var(--muted); font: 600 0.85rem/1.4 var(--sans); font-style: normal; }
blockquote.scripture cite a { color: var(--link); }
.scripture-notice { display: block; margin-top: 4px; color: var(--muted); font: 400 0.75rem/1.45 var(--sans); }
.scripture-missing { color: var(--muted); font-style: italic; }
.scripture--yellow { border-left-color: #e2c33b; background: var(--hl-yellow); }
.scripture--green { border-left-color: #5bb06b; background: var(--hl-green); }
.scripture--blue { border-left-color: #5d9ae6; background: var(--hl-blue); }
.scripture--pink { border-left-color: #e0769c; background: var(--hl-pink); }
.scripture--purple { border-left-color: #9a7ee0; background: var(--hl-purple); }
/* two Bibles side by side (a verse in each, row by row); on a phone the second sits under the first, named */
.scripture--compare .compare-head { display: grid; grid-template-columns: 1fr 1fr; gap: 0 28px; margin-bottom: 6px; color: var(--muted); font: 600 0.75rem/1.3 var(--sans); letter-spacing: 0.12em; text-transform: uppercase; }
.compare-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 28px; padding: 8px 0; border-top: 1px solid var(--line); }
.compare-row p { margin: 0; }
.scripture--compare .scripture-heading { margin-top: 1.2em; }
@media (max-width: 719px) {
  .scripture--compare .compare-head { display: none; }
  .compare-row { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .compare-cell--second { padding-left: 12px; border-left: 2px solid var(--line-2); font-size: 0.95em; }
  .compare-cell--second::before { content: attr(data-abbr); display: block; color: var(--muted); font: 600 0.7rem/1.5 var(--sans); letter-spacing: 0.1em; text-transform: uppercase; }
}

/* the pastor's note on verses */
.mark-btn { display: inline-grid; place-items: center; width: 1.45em; height: 1.45em; margin: 0 0.2em; padding: 0; border: 1px solid var(--line-2); border-radius: 50%; background: var(--surface); color: var(--link); font-size: 1rem; vertical-align: -0.15em; cursor: pointer; transition: border-color 0.15s; }
.mark-btn .icon { width: 0.95em; height: 0.95em; }
.mark-btn:hover { border-color: var(--navy); }
.mark-btn--group { color: #5b2a86; }

/* highlight colours */
.swatches { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.swatch { width: 32px; height: 32px; padding: 0; border: 2px solid rgba(0, 20, 52, 0.16); border-radius: 50%; cursor: pointer; }
.swatch--yellow { background: var(--hl-yellow); }
.swatch--green { background: var(--hl-green); }
.swatch--blue { background: var(--hl-blue); }
.swatch--pink { background: var(--hl-pink); }
.swatch--purple { background: var(--hl-purple); }
.swatch--none { background: linear-gradient(135deg, var(--surface) 44%, var(--line-2) 44% 56%, var(--surface) 56%); }
.swatch[aria-pressed="true"] { border-color: var(--navy); box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--navy); }
.swatch:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
.swatch[aria-busy="true"] { cursor: progress; opacity: 0.6; }
@media (pointer: coarse) { .swatch { width: 36px; height: 36px; } }

/* the bar at the bottom for what was chosen */
.bar-bottom { position: fixed; left: 50%; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 45; display: grid; gap: 8px; width: min(calc(100% - 24px), 780px); margin: 0; padding: 12px 14px; transform: translateX(-50%); border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); box-shadow: var(--shadow); }
.bar-bottom[hidden], .bar-bottom-group[hidden] { display: none; }
.bar-bottom-title { margin: 0; padding-right: 44px; color: var(--navy); font: 600 0.95rem/1.35 var(--sans); }
.bar-bottom-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.bar-bottom-group { display: contents; }
.bar-bottom-close { position: absolute; top: 8px; right: 8px; }
html.has-tabs .bar-bottom { bottom: calc(80px + env(safe-area-inset-bottom)); }
html.has-selection :is(.chat-launch, .install, .app-update) { opacity: 0; pointer-events: none; }   /* back once the verses are cleared */

/* small shared bits */
.chip-x { display: inline-grid; place-items: center; width: 22px; height: 22px; margin: 0 -6px 0 0; padding: 0; border: 0; border-radius: 50%; background: none; color: inherit; cursor: pointer; }
.chip-x:hover { background: var(--neutral-bg); }
.chip-x .icon { width: 14px; height: 14px; }
.check-words { display: grid; gap: 2px; }
.dialog-foot-start { margin-right: auto; }

/* The Bible page (build.py bible_page, public/bible.js): the tools stay at the top under the site's header while
   reading; the card holds the chapter */
.bible { max-width: 900px; }
.bible-bar { position: sticky; top: var(--header-h); z-index: 20; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin: 0 0 16px; padding: 10px 0; background: var(--canvas); }
.bible-pick { gap: 8px; }
.bible-steps { display: flex; gap: 6px; }
.bible-select { flex: 0 1 260px; }
.bible-select select { min-height: var(--control-sm); padding-top: 0; padding-bottom: 0; font-size: 0.95rem; }
.bible-page { padding: clamp(22px, 4vw, 44px) clamp(20px, 5vw, 56px); }
.bible-title { margin: 0 0 18px; color: var(--navy); font: 500 clamp(1.6rem, 3vw, 2.1rem)/1.2 var(--serif); }
.bible-more { margin: 22px 0 0; color: var(--text); font-size: 0.95rem; }
.bible-more a { font-weight: 600; }
.bible-pager { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--line); }
.bible-notice { margin-top: 16px; font-size: 0.82rem; line-height: 1.5; }
.bible-section { scroll-margin-top: var(--header-h); }
/* on a phone the tools would cover too much of the page: they stay above the chapter, and Previous, the chapter
   and Next are under it */
@media (max-width: 619px) {   /* the chapter with Previous / Next; the Bible with Compare; the second Bible on its own */
  .bible-bar { position: static; gap: 8px; margin-bottom: 12px; padding: 0; background: none; }
  .bible-pick { flex: 1 1 auto; justify-content: flex-start; min-width: 0; }
  .bible-select { flex: 1 1 calc(100% - 120px); min-width: 0; }
  .bible-select[data-bible-second-box] { flex-basis: 100%; }
}
/* the book and chapter picker (in a .dialog) */
.picker-go { display: flex; gap: 8px; align-items: center; }
.picker-go .field { flex: 1 1 auto; }
.picker-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin-top: 14px; }
.picker-grid--chapters { grid-template-columns: repeat(auto-fill, minmax(54px, 1fr)); }
.picker-item { display: grid; gap: 2px; min-height: 48px; padding: 8px 12px; border: 1px solid var(--line-2); border-radius: var(--r-sm); background: var(--surface); color: var(--ink); font: 500 0.95rem/1.25 var(--sans); text-align: left; cursor: pointer; }
.picker-grid--chapters .picker-item { place-items: center; padding: 8px 4px; text-align: center; }
.picker-item small { color: var(--muted); font-size: 0.75rem; }
.picker-item:hover { border-color: var(--navy); }
.picker-item[aria-current="true"] { border-color: var(--navy); background: var(--navy); color: #fff; }
.picker-item[aria-current="true"] small { color: var(--on-navy); }
.picker-back { grid-column: 1 / -1; justify-self: start; }
.segmented + .picker-grid { margin-top: 12px; }
.dialog-body > .segmented { margin-top: 14px; }

/* Pastoral Notes (build.py notes_page, src/bible-notes.js) */
.notes-wrap { max-width: 820px; }
.notes-feed { display: grid; gap: 22px; }
.note-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin-bottom: 14px; }
.note-meta { margin: 0; color: var(--muted); font-size: 0.9rem; }
.note-tools { display: flex; gap: 4px; margin-left: auto; }
.note-title { margin-bottom: 10px; }
.note-title a { color: inherit; text-decoration: none; }
.note-title a:hover { text-decoration: underline; text-underline-offset: 4px; }
.note-summary { margin: 0 0 14px; color: var(--text); font-size: 1.05rem; line-height: 1.65; }
.note-label { margin: 18px 0 8px; }
.note-list { margin: 0; padding-left: 1.2em; color: var(--text); line-height: 1.6; }
.note-list li + li { margin-top: 6px; }
.note-prayer { margin: 0; color: var(--text); font-style: italic; line-height: 1.65; }
.note-words { margin: 12px 0 0; color: var(--text); font-size: 1.05rem; line-height: 1.7; }
.note-passages { margin-top: 14px; }
.note-more { margin: 18px 0 0; }
.notes-pager { display: flex; justify-content: space-between; gap: 12px; margin-top: 26px; }
.note-verses { margin: 0; padding: 0; list-style: none; }
.note-verses .chip { cursor: default; }
.note-verses a.chip { cursor: pointer; }

/* Watch live (/live/: build.py live_page, public/live.js): the player big and first, on a dark panel, with what is on
   now above it; the weekly times in a row under it */
.live-wrap { max-width: 1360px; }
.live-stage.section--top { padding-top: clamp(26px, 3.6vw, 44px); }   /* the player as near the top as it can be */
.live-head { display: grid; gap: 18px; margin-bottom: clamp(18px, 2.4vw, 28px); }
@media (min-width: 900px) { .live-head { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); align-items: end; gap: 40px; } }
.live-stage h1 { margin: 0; color: #fff; font: 500 clamp(2rem, 4vw, 3.1rem)/1.08 var(--serif); letter-spacing: -0.015em; }
.live-status { display: grid; gap: 6px; }
.live-status .badge { justify-self: start; }
.live-title { margin: 0; color: #fff; font: 500 clamp(1.25rem, 2vw, 1.6rem)/1.25 var(--serif); }
.live-note { margin: 0; color: var(--on-navy); }
.live-note strong { color: #fff; }
.live-stage .player-frame { margin-top: 0; border: 1px solid var(--on-navy-line); box-shadow: 0 40px 90px -40px rgba(0, 0, 0, 0.85); }
@media (max-width: 639px) { .live-stage .player-frame { margin-inline: calc(var(--gutter) * -1); border-radius: 0; border-inline: 0; } }   /* a phone: edge to edge */
.live-poster { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 12px; color: #fff; font: 600 1.15rem/1.3 var(--sans); text-decoration: none;
  background: radial-gradient(120% 90% at 85% 0%, rgba(140, 200, 252, 0.28), transparent 60%), linear-gradient(150deg, #0a1f4d, #1d2f78 55%, #4b2f9e); }
.live-poster:hover span { text-decoration: underline; text-underline-offset: 4px; }
.live-caption { margin: 12px 0 0; color: var(--on-navy); font-size: 0.95rem; }
.live-actions { margin-top: 20px; }
.live-times { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; color: var(--muted); font-size: 0.92rem; }
.live-times li { display: grid; align-content: start; gap: 4px; padding: 16px 18px; background: #fff; border: 1px solid var(--line); border-radius: var(--r); }
.live-times li span { color: var(--navy); font-weight: 600; font-size: 1rem; }

/* Watch live in the menu, beside the phone's Menu button and in the app's top bar: on Sundays all day (html.is-sunday,
   set in each page's head) Watch live takes Book a call's place; whenever the church is live on YouTube (html.is-live,
   public/main.js asks /api/live) it turns red and says Live now. Nobody has to switch anything. */
.menu-live, .header-live, .app-live { display: none; }
html.is-sunday .menu-live, html.is-live .menu-live { display: block; }
html.is-sunday .menu-book, html.is-live .menu-book { display: none; }
.live-dot { display: none; flex: none; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.when-live { display: none; }
html.is-live .live-dot { display: inline-block; animation: live-beat 1.6s ease-in-out infinite; }
html.is-live .when-live { display: inline; }
html.is-live .when-not-live { display: none; }
html.is-live .btn-live { border-color: #c8102e; background: #c8102e; color: #fff; }
.header-live, .app-live { flex: none; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px; border-radius: var(--r-pill); font: 600 0.88rem/1 var(--sans); text-decoration: none; white-space: nowrap; }
.header-live { margin: 0 8px 0 auto; border: 1px solid var(--line-2); background: #fff; color: var(--navy); }
.app-live { margin-left: auto; border: 1px solid var(--on-navy-line); color: #fff; }
@media (max-width: 1199px) {   /* the menu is folded away: the button sits beside Menu */
  html.is-sunday .header-live, html.is-live .header-live { display: inline-flex; }
  .menu-live { margin-top: 16px; }
}
html.is-sunday .app-live, html.is-live .app-live { display: inline-flex; }
@media (max-width: 520px) { .header-live, .app-live { gap: 6px; padding: 0 12px; } .header-live { margin: 0; } }   /* a phone: room for the name beside them */
html.is-live .header-live, html.is-live .app-live { border-color: #c8102e; background: #c8102e; color: #fff; }
@media (prefers-reduced-motion: reduce) { html.is-live .live-dot { animation: none; } }


/* The slides in colour (the pastor's wish, 21 Nov 2026): each kind of slide its own tint over its photo (Sunday gold,
   prayer green, the pastor's slide red, the rest navy), and its accents to match. The Latest message, Coming up and Live
   now slides (.hero-slide--flier, src/home.js) take the colours of their own flier: it fills the slide, blurred, under a
   light shade, and shows big beside the words on a wide screen and above them on a phone. */
.hero-slide { --t1: rgba(0, 20, 52, 0.93); --t2: rgba(0, 20, 52, 0.8); --t3: rgba(18, 40, 120, 0.6); --t4: rgba(96, 64, 190, 0.5); --accent: var(--sky); }
.hero-slide--sunday { --t1: rgba(52, 26, 4, 0.93); --t2: rgba(88, 47, 12, 0.82); --t3: rgba(147, 82, 20, 0.6); --t4: rgba(180, 123, 42, 0.45); --accent: var(--gold); }
.hero-slide--prayer { --t1: rgba(18, 28, 6, 0.93); --t2: rgba(31, 52, 10, 0.82); --t3: rgba(54, 87, 12, 0.6); --t4: rgba(123, 152, 62, 0.45); --accent: #c3e08f; }
.hero-slide--pastor { --t1: rgba(56, 2, 6, 0.93); --t2: rgba(80, 2, 4, 0.82); --t3: rgba(125, 2, 2, 0.6); --t4: rgba(159, 15, 13, 0.45); --accent: #f6b7ae; }
.hero-slide--flier { --t1: rgba(0, 0, 0, 0.74); --t2: rgba(0, 0, 0, 0.52); --t3: rgba(0, 0, 0, 0.32); --t4: rgba(0, 0, 0, 0.18); }
.hero-slide::before { background: linear-gradient(110deg, var(--t1) 0%, var(--t2) 40%, var(--t3) 72%, var(--t4) 100%); }
@media (max-width: 979px) { .hero-slide::before { background: linear-gradient(180deg, var(--t2), var(--t1) 60%, var(--t1)); } }
.hero-slide { overflow: hidden; }   /* a blurred flier is drawn larger than its slide: it must not spill onto the one before */
.hero-slide--flier .panel-photo { filter: blur(26px) saturate(1.35); transform: scale(1.18); }
.hero-slide .eyebrow--sky, .hero-slide .hero-title em, .hero-slide .visit-card-time, .hero-slide .slide-big a, .hero-slide .slide-figure,
.hero-slide .visit-card-list .icon, .hero-slide .hero-when .icon { color: var(--accent); }
.hero-slide .btn-sky { border-color: var(--accent); background: var(--accent); color: var(--navy); }
.hero-slide .btn-sky:hover { filter: brightness(1.08); }
@media (max-width: 979px) {   /* a phone: the flier shows too, above the words */
  .hero-slide-grid--media .hero-media { display: block; order: -1; }
  .hero-slide-grid--media { gap: 18px; }
}
