/* ==========================================================================
   Triplets Baptism · modern-minimal stylesheet
   No frameworks, no web fonts, no CDN: everything renders on a LAN.
   White is the only theme: see the token block below. The one deliberate
   exception is the words over the family photograph, which stay white and are
   held up by the halo on their own edges, not by anything laid over the
   picture. The print block at the end is the sheet that goes to a printer.
   ========================================================================== */

:root {
  color-scheme: light;

  /* Ink in three weights, and it is a deep church navy rather than black:
     black on white is a newspaper, this is an invitation. All three clear
     white paper with room to spare (16.9, 10.8 and 5.6 to 1). */
  --ink:        #16222f;
  --ink-soft:   #3d4d5e;
  --muted:      #5b6a78;
  --paper:      #ffffff;
  --cream:      #f4f7fa;
  --cream-2:    #e9eff5;
  --line:       #d3dde7;
  --line-soft:  #e7edf3;
  --green:      #0f6b40;
  --navy:       #1c3a6b;
  --blue:       #2f6ba8;
  --danger:     #a3282a;
  --ok:         #0f5c37;

  /* Surfaces are named, never hard-coded, so this one block repaints the whole
     site -- and the print block at the end can repaint it back for paper. */
  --surface:     #ffffff;   /* cards, rows */
  --field:       #fafcfe;   /* an input: a card's white with one grey-blue whisper in it */
  --on-ink:      #ffffff;   /* words sitting on an --ink background */
  --glass:       rgba(255,255,255,.82);

  --hero-img:    none;      /* header.php points this at the config photograph */
  /* Nothing is laid over the photograph now -- no tint, no shade, no ground
     behind the words. Three separate attempts to hold the boys up with
     darkness each ended with a child looking dimmer than he is, so the
     washes are gone and the legibility has been moved onto the letters
     themselves. */
  /* The glow behind hero words, and the water. It reaches 26px but most of it
     is spent within 3px of the glyph: when the words and a child's face
     occupy the same patch of a photograph, the only darkness that can be
     spent on legibility is the darkness that hugs the letters, and it has to
     be dense enough to read as an edge rather than as a smudge. */
  --halo:   0 0 1px rgba(6,14,22,.95), 0 1px 2px rgba(6,14,22,.85), 0 2px 6px rgba(6,14,22,.72), 0 0 18px rgba(6,14,22,.55), 0 6px 26px rgba(6,14,22,.4);
  /* A chip of clear white, and the ink that goes on it. These four are not
     re-declared on the hero band on purpose: the countdown sits at the foot of
     the photograph, over a sunlit blanket, and white digits measured straight
     onto that come to 3.1 to 1 -- the floor, not a comfort. The answer is a
     plate the light theme can afford rather than another shade laid on a
     child. */
  --chip:       rgba(255,255,255,.72);
  --chip-line:  rgba(22,34,47,.12);
  --chip-ink:   #16222f;
  --chip-soft:  rgba(22,34,47,.72);
  --drop:   rgba(78,132,190,.5);
  --ripple: rgba(47,107,168,.32);
  /* Candlelight and coloured glass. A baptism has both, and neither belongs to
     the theme, so they get their own tokens rather than literals sprinkled
     through the component rules. */
  --flame-core: #ffe27a;
  --flame-rim:  #e08a12;
  --wax:        #f6f2e9;
  --wax-shade:  #b9ad95;
  --glow:       rgba(233,151,31,.22);
  --shaft-1: rgba(124,176,238,.13);   /* the boys' own three colours, as light */
  --shaft-2: rgba(92,188,141,.10);
  --shaft-3: rgba(233,151,31,.10);
  --smoke:   rgba(108,126,145,.14);
  /* A chair somebody has taken and a chair still waiting. Named for the same
     reason as the flames: the seating map is drawn in CSS, so the hall cannot
     be repainted without editing the two lines that say what a seat looks like. */
  --seat-open:  var(--green);
  --seat-taken: #8ea0b3;   /* a chair with someone in it: filled, not offered */
  --btn-hover:   #2b3f55;  /* a navy button lightens its own shade under a hand */
  --placeholder: #8b98a6;

  /* Feedback tints, also tokens for the same reason. Each ink is checked
     against its own wash, not against the page, because that is what it sits
     on the moment an alert appears. */
  --ok-bg:   #e9f6ef; --ok-line:   #b5ddc6; --ok-ink:   #12582f;
  --err-bg:  #fdeceb; --err-line:  #f2c5c2; --err-ink:  #8c2521;
  --info-bg: #eaf2fb; --info-line: #c3d9f1; --info-ink: #1a4570;
  --warn-bg: #fdf3e1; --warn-ink:  #7a5310;
  --grey-bg: #eef2f6;
  --danger-btn-line: #e6aca8;
  --deep:        #f1f5f9;   /* the invitation band: a shade over the page paper */

  --radius:     18px;
  --radius-sm:  10px;
  --shadow:     0 1px 2px rgba(22,34,47,.08), 0 14px 34px -14px rgba(22,34,47,.24);
  --shadow-sm:  0 1px 2px rgba(22,34,47,.07), 0 6px 18px -12px rgba(22,34,47,.2);

  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;

  --max: 1120px;
  --gutter: clamp(1.15rem, 4vw, 2.75rem);
}

/*
 * One palette, and it is white. There is deliberately no dark block and no
 * prefers-color-scheme query: the only other colour scheme in this file is the
 * print block at the end, because paper has to lose its shadows, and the short
 * list of tokens the hero band re-declares so its words can stay white over a
 * photograph that is no longer dimmed for them.
 */

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 88px;      /* the sticky nav must not cover an anchor */
}

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  font-size: clamp(1rem, .96rem + .2vw, 1.06rem);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }
/* Browsers inset <figure> by 40px; our frames decide their own space. */
figure { margin: 0; }
a { color: inherit; }

[id] { scroll-margin-top: 88px; }

::selection { background: color-mix(in srgb, var(--blue) 45%, transparent); }

/* One visible ring for keyboard users, none for mouse clicks. */
:focus-visible {
  outline: 2px solid var(--navy);
  outline-offset: 2px;
  border-radius: 4px;
}

h1, h2, h3 {
  font-weight: 650;
  letter-spacing: -.028em;
  line-height: 1.08;
  margin: 0 0 .5em;
  text-wrap: balance;
}

h1 { font-size: clamp(2.3rem, 1.4rem + 4.4vw, 4.4rem); }
h2 { font-size: clamp(1.7rem, 1.2rem + 2.2vw, 2.6rem); }
h3 { font-size: clamp(1.15rem, 1rem + .6vw, 1.4rem); }
p  { margin: 0 0 1em; text-wrap: pretty; }

.eyebrow {
  font-size: .74rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
  margin: 0 0 1.1rem;
  display: flex;
  align-items: center;
  gap: .7rem;
}
.eyebrow::before {
  content: "";
  width: 26px; height: 1px;
  background: linear-gradient(90deg, var(--green), var(--navy) 55%, var(--blue));
}

.lead   { font-size: clamp(1.05rem, 1rem + .5vw, 1.3rem); color: var(--ink-soft); max-width: 46ch; }
.muted  { color: var(--muted); }
.small  { font-size: .86rem; }
.serif  { font-family: var(--serif); font-style: italic; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }

/* ------------------------------------------------------------------ shell */

.shell { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.narrow { max-width: 720px; }
.section { padding-block: clamp(3.5rem, 2rem + 7vw, 7rem); }
.section-tight { padding-block: clamp(2.2rem, 1.4rem + 3vw, 3.6rem); }
.band { background: var(--cream); border-block: 1px solid var(--line-soft); }
.band-deep {
  background: var(--deep); color: var(--ink); border-block: 1px solid var(--line);
  /* Incense rises through this band, so it has to clip the wisps and keep the
     words in front of them. */
  position: relative; overflow: hidden;
}
.band-deep > .shell { position: relative; z-index: 1; }

.grid { display: grid; gap: clamp(1.4rem, 1rem + 2vw, 2.6rem); }
.cols-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.cols-3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.cols-4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); }

.split {
  display: grid;
  gap: clamp(1.5rem, 1rem + 3vw, 3.5rem);
  align-items: center;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr));
}

/* -------------------------------------------------------------------- nav */

.nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: saturate(180%) blur(14px);
  background: var(--glass);
  border-bottom: 1px solid var(--line-soft);
}
.nav-in {
  display: flex; align-items: center; gap: 1.2rem;
  min-height: 66px;
}
.brand {
  display: flex; align-items: baseline; gap: .55rem;
  font-weight: 700; letter-spacing: -.02em; text-decoration: none;
  font-size: 1.02rem;
}
.brand .mark {
  display: inline-flex; gap: 3px; align-items: flex-end;
}
.brand .mark i { width: 7px; border-radius: 2px; display: block; }
.brand .mark i:nth-child(1) { height: 11px; background: var(--green); }
.brand .mark i:nth-child(2) { height: 15px; background: var(--navy); }
.brand .mark i:nth-child(3) { height: 9px;  background: var(--blue); }

.nav-links { display: flex; gap: .3rem; margin-left: auto; align-items: center; flex-wrap: wrap; }
/* The plain links in the bar, and only them. The "Register" chip that sits at
   the end of the same row is a button wearing an A tag, so it is stepped
   around here: `.nav-links a` would otherwise out-specify `.btn-primary` and
   paint a navy block with navy words in it. */
.nav-links a:not(.btn) {
  text-decoration: none; color: var(--ink-soft);
  font-size: .9rem; font-weight: 500;
  padding: .5rem .8rem; border-radius: 999px;
  transition: background .18s, color .18s;
}
.nav-links a:not(.btn):hover { background: var(--cream); color: var(--ink); }
.nav-links a[aria-current="page"] { background: var(--ink); color: var(--on-ink); }
.nav-cta { margin-left: .4rem; }

/* The bar was measured on a 390px screen at five links, a button and the
   language pill: 133px tall, four rows, and the brand squeezed to 75px wide so
   that "Ean · Enzo · Elijah" broke across three lines of its own. A sticky bar
   like that spends a sixth of the phone on chrome before the family is visible,
   and anchors jumped to a section came out under it (the page only reserves
   88px). So below 880px the bar goes back to one line and the links move out of
   it. Without script they stay in the flow as a single swipeable row -- nothing
   hidden, no button that would do nothing -- and the bar is still two short
   lines instead of four. */
@media (max-width: 880px) {
  .nav-in { flex-wrap: wrap; min-height: 60px; }
  /* The names are the brand; the links are not, so they yield the width first. */
  .brand { flex: 1 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .nav-links {
    order: 3; flex: 1 1 100%; margin-left: 0; gap: .2rem;
    flex-wrap: nowrap; overflow-x: auto; overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: .1rem 0 .45rem;
  }
  .nav-links::-webkit-scrollbar { display: none; }
  /* Direct children only: the language pill lives at the end of this same row and
     its two letters must not be stretched into 46px capsules. */
  .nav-links > a:not(.btn) {
    display: inline-flex; align-items: center; min-height: 44px;
    padding: .5rem .85rem; flex: none;
  }
  .nav-cta { margin-left: 0; flex: none; }
  /* Anchors have to agree with the bar they slide under. */
  html { scroll-padding-top: 74px; }
  [id] { scroll-margin-top: 74px; }
}
/* The button exists only to be switched on: on a wide bar the links are the
   menu and there is nothing to fold away. */
.nav-more { display: none; }
@media (max-width: 880px) {
  .js .nav-more {
    display: inline-flex; order: 2; flex: none;
    width: 46px; height: 46px;
    flex-direction: column; align-items: center; justify-content: center; gap: 4.5px;
    margin-left: auto; padding: 0;
    background: var(--surface); border: 1px solid var(--line); border-radius: 13px;
    cursor: pointer;
    transition: border-color .18s ease, background .18s ease;
  }
  .js .nav-more:hover { border-color: var(--navy); background: var(--cream); }
  .nav-more i { display: block; width: 18px; height: 1.6px; border-radius: 2px; background: var(--ink); transition: transform .2s ease, opacity .2s ease; }
  /* The three bars fold into a cross, so the same control says close as well. */
  .js.nav-open .nav-more { border-color: var(--navy); background: var(--cream); }
  .js.nav-open .nav-more i:nth-child(1) { transform: translateY(6.1px) rotate(45deg); }
  .js.nav-open .nav-more i:nth-child(2) { opacity: 0; }
  .js.nav-open .nav-more i:nth-child(3) { transform: translateY(-6.1px) rotate(-45deg); }
  /* The panel hangs off the bar itself -- `.nav` is the sticky, and therefore
     the positioned, ancestor here -- so it goes full-bleed while its words stay
     lined up with the bar's own gutter. */
  .js .nav-links {
    display: none;
    position: absolute; left: 0; right: 0; top: 100%;
    order: 0; flex: none;
    flex-direction: column; align-items: stretch; gap: .1rem;
    overflow: visible; padding: .7rem var(--gutter) 1.15rem;
    background: var(--surface); border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
    max-height: calc(100vh - 60px); overflow-y: auto;
  }
  .js.nav-open .nav-links { display: flex; animation: navdrop .2s ease-out both; }
  .js .nav-links > a:not(.btn) { min-height: 46px; padding: .55rem .85rem; border-radius: 12px; font-size: .98rem; }
  .js .nav-links > a:not(.btn):hover { background: var(--cream); }
  .js .nav-cta { margin: .6rem 0 0; width: 100%; min-height: 48px; justify-content: center; }
  .js .lang-toggle { margin: .85rem .2rem 0; align-self: flex-start; }
  .js .lang-toggle a { padding: .5rem 1rem; }
}
@keyframes navdrop {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .js.nav-open .nav-links { animation: none; }
  .nav-more i { transition: none; }
}

/* ---------------------------------------------------------------- buttons */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  font: inherit; font-weight: 600; font-size: .94rem;
  padding: .82rem 1.5rem;
  border-radius: 999px; border: 1px solid transparent;
  text-decoration: none; cursor: pointer;
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease, color .16s;
}
@media (prefers-reduced-motion: no-preference) {
  /* A button lifts a hair towards the hand. Declared ahead of :active, which is the
     one that has to win when a pointer is already pressing it. */
  .btn:hover { transform: translateY(-1px); }
}
.btn:active { transform: translateY(1px) scale(.995); }
.btn-primary { background: var(--ink); color: var(--on-ink); box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--btn-hover); box-shadow: var(--shadow); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: var(--cream); border-color: var(--muted); }
/* The invitation band's own button: a navy block standing on a pale band. It
   keeps the name it was given when that band was dark and this was the only
   white thing on it. */
.btn-light { background: var(--ink); color: var(--paper); }
.btn-light:hover { background: var(--btn-hover); }
.btn-danger { background: var(--surface); color: var(--danger); border-color: var(--danger-btn-line); }
.btn-danger:hover { background: var(--err-bg); }
.btn-sm { padding: .48rem .9rem; font-size: .82rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .45; pointer-events: none; }

/* ------------------------------------------------------------------- hero */

.hero {
  position: relative;
  /* The band's words start white and re-declare nothing of their own: colour
     that is inherited is frozen where it was resolved, so the band has to say
     it out loud for the headline inside it rather than leave the h1 to pick up
     the page's navy through the body. */
  color: var(--ink);
  background:
    radial-gradient(1100px 460px at 88% -12%, rgba(47,107,168,.10), transparent 62%),
    radial-gradient(760px 420px at -8% 8%, rgba(15,107,64,.07), transparent 60%),
    linear-gradient(180deg, var(--surface) 0%, var(--cream) 100%);
  overflow: hidden;
}
/* The photograph is the hero, not an illustration inside it: one full-bleed
   layer and nothing laid over it. Every tint that used to sit here was spent
   making a child harder to see, so the layer is the picture alone.
   --hero-img stays `none` until header.php points it at the picture chosen in
   config, and the gradient on .hero keeps showing through when there is no
   picture to lay. */
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: 0;
  background-image: var(--hero-img, none);
  background-size: cover;
  background-position: center 28%;
  background-repeat: no-repeat;
}
.hero > .shell { position: relative; z-index: 1; }
/* Stained glass: three shafts thrown from a window high up the wall, crossing
   the photograph. They sit on their own layer above the print and below the
   words, and they are the only place light is added rather than taken away --
   the tint is what leaves the ink readable, this is what makes the band feel
   like the inside of a church. */
.hero::after {
  content: ""; position: absolute; inset: -6% -10% auto -10%; height: 78%;
  z-index: 0; pointer-events: none;
  background:
    linear-gradient(99deg,  transparent 6%,  var(--shaft-1) 17%, transparent 30%),
    linear-gradient(95deg,  transparent 40%, var(--shaft-2) 52%, transparent 64%),
    linear-gradient(103deg, transparent 70%, var(--shaft-3) 82%, transparent 94%);
  opacity: .82;
}
/* The words over the photograph keep their own small palette. Everything on
   this band is written against --ink, --ink-soft and --line rather than
   against a colour, so the whole of it turns white by re-declaring those few
   tokens on the band itself, and the rest of the site never has to know. It is
   screen-only: paper re-declares nothing, and a printed headline that is white
   would be a headline printed in invisible ink. */
@media screen {
  .hero {
    --ink:        #ffffff;
    --ink-soft:   rgba(255,255,255,.92);
    --muted:      rgba(255,255,255,.78);
    --line:       rgba(255,255,255,.44);
    --on-ink:     #16222f;
    --btn-hover:  rgba(255,255,255,.86);
    --placeholder: rgba(255,255,255,.62);
    /* The boys' three colours as they read on a bright picture: the blanket
       green, the sky blue and the deep navy stay the same hues, but a colour
       used for a countdown word or an eyebrow tick has to be lighter than the
       page colours, not darker. */
    --green:      #7ddcae;
    --navy:       #a8ccff;
    --blue:       #cfe4ff;
  }
}
/* Words carry a glow and nothing else, so the photograph behind them stays a
   photograph. */
.hero h1, .hero .lead, .hero .eyebrow, .hero-names span { text-shadow: var(--halo); }

/* On a phone the picture is a landscape laid through a portrait window: cover
   means one boy fills the frame and the other two are outside it, which is how
   a child keeps disappearing however pale the tint over him is. So under 900px
   the photograph is fitted to the width instead -- the whole family in one
   band, the headline above it on the page's own ground, and the words that do
   cross the picture holding themselves up with the halo alone. */
@media (max-width: 899px) {
  .hero::before {
    background-size: 100% auto;
    background-position: center 30%;
    /* A fitted print ends in two straight lines, and a straight line drawn
       across a family photograph reads as a mistake rather than a frame. The
       mask is given the print's own box -- 56.25vw is this photograph's aspect
       at full width, and the same thirty-percent anchor puts it exactly where
       the picture is -- so the family fades in and out of the page instead of
       stopping short. The ramps are deliberately lopsided: the faces sit in the
       first third of the print, so the top feather is nine percent (a head is
       solid from the brow down) while the spare softness is spent at the foot
       of the picture, over the blanket, where nothing has a face in it. */
    -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 9%, #000 80%, transparent 100%);
            mask-image: linear-gradient(180deg, transparent 0, #000 9%, #000 80%, transparent 100%);
    -webkit-mask-size: 100% 56.25vw;            mask-size: 100% 56.25vw;
    -webkit-mask-position: center 30%;          mask-position: center 30%;
    -webkit-mask-repeat: no-repeat;             mask-repeat: no-repeat;
  }
}

/* Inner pages carry the same photograph in a shallower band, with the title
   standing on it directly. There is no ground behind the title any more: on a
   white page the strip is only ever as tall as the words, and the halo does
   the holding. */
.hero-tight .shell { padding-block: clamp(2.6rem, 1.5rem + 4.5vw, 4.6rem); }
.hero-tight h1 { font-size: clamp(2rem, 1.35rem + 2.8vw, 3.3rem); letter-spacing: -.03em; }
.hero-tight .lead { max-width: 58ch; }
/* One column while the words need the whole width, two as soon as they do not.
   A named breakpoint rather than auto-fit: the picture column gets the wider
   share, because text wraps happily and a photograph only has so many pixels. */
.hero-grid {
  display: grid;
  gap: clamp(2.2rem, 1rem + 4vw, 4rem);
  align-items: center;
  grid-template-columns: 1fr;
  /* The words own the vertical rhythm; the pictures only borrow it. */
  padding-block: clamp(3rem, 1.2rem + 7vw, 6rem);
}
@media (min-width: 900px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.12fr); }
}

/* The words sit straight on the photograph. No oval of shade, no column
   ground: what used to be spent darkening the picture behind them is now
   spent on the edges of the letters themselves. */
.hero-copy { position: relative; min-width: 0; }
.hero-names { display: flex; flex-wrap: wrap; align-items: baseline; gap: .6rem 1.5rem; margin: 1.6rem 0 .4rem; }
/* The trio, laid as a small triptych: each boy's own colour lit at the foot of
   his name, then the name itself in the serif. Only two nodes per boy -- the
   rest of what you see on them is drawn with pseudo-elements in the "three
   names, baptised" block further down, which is the only place any of it
   moves. What is here is the whole of it on a browser that animates nothing,
   and the whole of it on paper. */
.hero-names .nm {
  --t: calc(.42s + var(--k, 0) * .85s);   /* his turn, in the order of the rite */
  /* A config accent is the colour of a blanket or a bootie. On a white page it
     does not need lifting towards the light -- a pale blue dot beside white
     words needs the opposite, a step towards the ink, so that Enzo's colour
     stays his and still has an edge. The first line below is what survives if
     color-mix is unknown. */
  --lit-acc: color-mix(in srgb, var(--acc, var(--blue)) 86%, #16222f);
  position: relative; display: inline-flex; align-items: baseline; gap: .5rem;
  font-family: var(--serif); font-size: 1.15rem;
}
.hero-names .word { position: relative; font-weight: 600; letter-spacing: .01em; }
.hero-names .dot {
  position: relative; bottom: -.1em; flex: none; width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--acc, var(--blue));
  background: var(--lit-acc);
}

/* This column used to be a frosted glass plate, then a soft-edged ground, then
   a print fan -- three different ways of putting something between the family
   and whoever was reading about them. All of it is gone. The column is simply
   space the photograph shows through, and the countdown in it keeps itself
   readable with the same halo the rest of the hero uses. */
.hero-figure {
  position: relative; min-width: 0;
  padding: clamp(1.1rem, 3vw, 2.2rem);
}
/* The two corner prints that used to be fanned here are gone. They were the
   last thing laid over the family photograph: two mounts, pale borders and a
   caption, sitting where the boy at the right hand is lying. What this column
   keeps is the countdown, set down low -- out of the strip the three faces live
   in, and onto the blanket at the foot of the print. */

/* Two columns: the words set the height of the band, and this column keeps its
   own contents down at the foot of it, where the photograph has blanket rather
   than faces in it. */
@media (min-width: 900px) {
  .hero-grid { align-items: stretch; }
  .hero-figure {
    display: flex; flex-direction: column; justify-content: flex-end; gap: 1.2rem;
  }
  .hero-figure .count { max-width: none; }
}

/* ------------------------------------------------------- home type & air */

/* Display type is enlarged here rather than in the global h1, so the admin
   screens keep the size their tables need. */
.hero h1 { font-size: clamp(2.5rem, 1.5rem + 4.6vw, 4.9rem); letter-spacing: -.035em; line-height: 1.02; }
.hero .lead { max-width: 40ch; font-size: clamp(1.08rem, 1rem + .5vw, 1.34rem); }
.hero-names .nm { font-size: clamp(1.24rem, 1.05rem + .8vw, 1.66rem); }
.home-facts { padding-block: clamp(2.6rem, 1.6rem + 4vw, 4.4rem); }
.fact { padding: 1.7rem 1.6rem; }
.fact .big { font-size: 1.4rem; }
.band-deep { padding-block: clamp(4rem, 2.4rem + 8vw, 8rem); }
.band-deep h2 { font-size: clamp(1.9rem, 1.3rem + 2.4vw, 3rem); }

.verse {
  font-family: var(--serif); font-style: italic; font-size: 1.18rem;
  color: var(--ink-soft); border-left: 2px solid var(--blue);
  padding-left: 1.1rem; margin: 0 0 1.6rem; max-width: 40ch;
}

/* -------------------------------------------------------------- countdown */

.count { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); gap: .7rem; max-width: 520px; }
/* Four solid tiles over a photograph read as a control panel, so these are
   chips of clear white with a hairline, not cards -- they let the picture stay
   the picture and only borrow enough of it to hold a number. */
.count > div {
  background: var(--chip);
  border: 1px solid var(--chip-line);
  border-radius: var(--radius-sm);
  padding: .95rem .5rem; text-align: center;
  /* Clips a digit as it drops into place (`tick`), so it never brushes the
     label sitting under it. */
  overflow: hidden;
}
.count b { display: block; font-size: clamp(1.5rem, 1rem + 2.4vw, 2.4rem); font-weight: 650; letter-spacing: -.03em; font-variant-numeric: tabular-nums; color: var(--chip-ink); }
.count small { font-size: .68rem; letter-spacing: .16em; text-transform: uppercase; color: var(--chip-soft); }
/* Four chips across 336px of phone gives each one 67px, and "hours" is 44px of
   that. It fits, but with a hair to spare and nothing left for a longer word in
   Kiswahili, so the row spends its letterspacing before it spends its numbers. */
@media (max-width: 430px) {
  .count { gap: .45rem; }
  .count > div { padding: .8rem .25rem; }
  .count small { font-size: .62rem; letter-spacing: .1em; }
}
.count-done { font-size: 1.1rem; font-family: var(--serif); font-style: italic; color: var(--green); text-shadow: var(--halo); }
/* Light moving over the four chips the way it moves over the surface of the font.
   It can only ever brighten -- a white wash over navy digits -- so no number
   loses contrast to it at any point in the sweep. */
.count > div { position: relative; }
.count > div::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(100deg, transparent 34%, rgba(255,255,255,.5) 50%, transparent 66%);
  background-size: 260% 100%; background-repeat: no-repeat;
}
@media (prefers-reduced-motion: no-preference) {
  /* Staggered by hand, because four chips glinting in unison is a sign, not a
     reflection. */
  .count > div::after { animation: sheen 11s linear infinite; }
  .count > div:nth-child(2)::after { animation-delay: 2.7s; }
  .count > div:nth-child(3)::after { animation-delay: 5.4s; }
  .count > div:nth-child(4)::after { animation-delay: 8.1s; }
}

/* ------------------------------------------------------------------ facts */

.facts { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
/* The row answers two different questions now -- where the service is, and where
   it goes afterwards -- so it grows to four tiles. Two columns before the shell
   is wide enough for four without "Saturday 26 December" breaking in half. */
@media (min-width: 700px)  { .facts { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1040px) { .facts { grid-template-columns: repeat(4, 1fr); } }
.fact { background: var(--surface); padding: 1.5rem 1.4rem; }
.fact h3 { font-size: .74rem; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); margin-bottom: .7rem; font-weight: 600; }
.fact p { margin: 0; font-size: 1.02rem; }
.fact .big { font-size: 1.3rem; font-weight: 600; letter-spacing: -.02em; }

/* ---------------------------------------------------------------- program */

.timeline { position: relative; margin: 0; padding: 0; list-style: none; }
.timeline li {
  display: grid; grid-template-columns: 84px 1fr; gap: 1.2rem;
  padding: 1.15rem 0; border-bottom: 1px solid var(--line-soft);
}
.timeline li:last-child { border-bottom: 0; }
.timeline time { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--navy); letter-spacing: -.01em; }
.timeline h3 { margin: 0 0 .2rem; font-size: 1.06rem; }
.timeline p { margin: 0; color: var(--muted); font-size: .92rem; }

/* ------------------------------------------------------------------ cards */

.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: clamp(1.4rem, 1rem + 1.6vw, 2.1rem);
  box-shadow: var(--shadow-sm);
}
.card-flat { background: var(--cream); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(1.3rem, 1rem + 1.4vw, 1.9rem); }
.card-tight { padding: 1.1rem 1.2rem; }

.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2rem 1.3rem; }
.stat b { display: block; font-size: 2rem; font-weight: 650; letter-spacing: -.035em; font-variant-numeric: tabular-nums; }
.stat span { font-size: .74rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }

/* ------------------------------------------------------------------ forms */

/* The form is the one part of this site a guest has to work at, so it gets the
   attention the rest of the page spends on photographs: a plate a hand can
   see, a ring a keyboard can see, an affordance on every control that has one,
   and a colour that says "this one" as soon as something is wrong. */
.field { margin-bottom: 1.25rem; }
.field:last-child { margin-bottom: 0; }
/* A caption sits directly under its field, and only there. The wording matters:
   two labels on this site are not captions but the controls themselves -- a
   table pick and the roster's "child" chip -- and a descendant rule would
   out-specify their own `display: flex`, turning a 64px drawn table into a line
   of uppercase text and giving a chip eight stray pixels of margin. */
.field > label, .legend {
  display: block; font-size: .75rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--ink-soft); font-weight: 650; margin-bottom: .5rem;
}
.field .hint { font-size: .82rem; color: var(--muted); margin-top: .4rem; }
/* The server's answer to a field that did not pass. Weighted and coloured, so
   it cannot be mistaken for the quiet advice sitting above it, and it arrives
   where the eye already is rather than only in a banner at the top. */
.field .hint-err { color: var(--err-ink); font-weight: 600; }
.field .hint-err::before {
  content: ""; display: inline-block; width: 6px; height: 6px; margin-right: .45rem;
  border-radius: 50%; background: var(--danger); vertical-align: .12em;
}

input[type=text], input[type=tel], input[type=email], input[type=password],
input[type=number], input[type=search], input[type=date], select, textarea {
  width: 100%; font: inherit; color: var(--ink);
  padding: .8rem .95rem; min-height: 46px;
  background: var(--field); border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  transition: border-color .16s, box-shadow .16s, background .16s;
  -webkit-appearance: none; appearance: none;
}
textarea { min-height: 112px; resize: vertical; }
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--navy); background: var(--paper);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--navy) 18%, transparent);
}
input::placeholder, textarea::placeholder { color: var(--placeholder); }
/* A plate that is sitting under a hand says so before it is clicked, which on
   a white page means the border, not a shadow. */
input:hover:not(:disabled):not(:focus), select:hover:not(:disabled):not(:focus),
textarea:hover:not(:disabled):not(:focus) {
  border-color: color-mix(in srgb, var(--navy) 42%, var(--line));
}
input:disabled, select:disabled, textarea:disabled {
  background: var(--cream-2); color: var(--muted);
  border-style: dashed; cursor: not-allowed;
}
input[readonly], textarea[readonly] {
  background: var(--cream); color: var(--ink-soft); border-style: dashed;
}
/* A field the guest has filled in wrongly. `:user-invalid` waits until they
   have typed something and moved on, so a form is never painted red before it
   has been touched; the ARIA hook is there for the server, which knows the
   moment a POST comes back and can say which field it is complaining about. */
input:user-invalid, select:user-invalid, textarea:user-invalid,
input[aria-invalid="true"], select[aria-invalid="true"], textarea[aria-invalid="true"] {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--danger) 14%, transparent);
}
/* When the server comes back holding a complaint about a field, the field
   itself is outlined, not only the sentence under it: `:has` reads the hint
   from the plate, so no markup other than the hint's own class is needed. A
   browser without `:has` still gets the red sentence and the red plate a
   second attempt would bring. */
.field:has(.hint-err) > input:not([type=checkbox]):not([type=radio]),
.field:has(.hint-err) > select,
.field:has(.hint-err) > textarea { border-color: var(--danger); }
/* The roster is one complaint about a hundred rows, so its marker is the
   group's own spine rather than every name plate inside it. */
.field.roster:has(.hint-err) { border-left-color: var(--danger); }

/* A reset select is a flat plate with nowhere for the eye to go, so the
   affordance is drawn back: one chevron where a hand expects it, and enough
   padding that the longest relation does not run under it. */
select {
  padding-right: 2.4rem;
  background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'><path d='M2.4 4.6 6 8.2 9.6 4.6' fill='none' stroke='%235b6a78' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  background-repeat: no-repeat;
  background-position: right .95rem center;
  background-size: 12px 12px;
}

/* Number fields on this site live inside a stepper, which is already a pair of
   buttons: the browser's own spinners would be a third way to do the same
   thing, drawn badly. */
input[type=number] { -moz-appearance: textfield; }
input[type=number]::-webkit-outer-spin-button,
input[type=number]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* Chrome keeps a pale yellow of its own for a remembered value. On a white
   plate that reads as "this field is odd" when it means "this field is
   filled", so the page's own colours are put back on it. */
input:-webkit-autofill, input:-webkit-autofill:hover, input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--ink);
  -webkit-box-shadow: 0 0 0 1000px var(--field) inset;
  caret-color: var(--ink);
}

/* Checkboxes and radios are the only controls left to the browser, given an
   accent so they arrive in the site's navy rather than in system blue. */
input[type=checkbox], input[type=radio] {
  width: 1.15rem; height: 1.15rem; flex: none;
  accent-color: var(--navy); cursor: pointer;
}
input[type=checkbox]:focus-visible, input[type=radio]:focus-visible {
  outline: 2px solid var(--navy); outline-offset: 2px;
}
/* A radio wearing a pill is still a radio, so it keeps the size every other
   control on the site has and lets the pill do the spacing. `gap` replaces the
   inline margin the markup used to carry. */
.pill-row .tag {
  display: inline-flex; align-items: center; gap: .5rem;
  min-height: 44px; padding: .3rem .85rem; cursor: pointer;
}

.stepper {
  display: inline-flex; align-items: center;
  border: 1px solid var(--line); border-radius: 999px;
  background: var(--paper); overflow: hidden;
  transition: border-color .16s, box-shadow .16s;
}
.stepper:hover { border-color: color-mix(in srgb, var(--navy) 42%, var(--line)); }
/* The ring belongs on the pill, not on the slot inside it: one control, one
   focus state. */
.stepper:focus-within {
  border-color: var(--navy);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--navy) 18%, transparent);
}
.stepper button {
  width: 44px; height: 44px; border: 0; background: transparent;
  font-size: 1.25rem; line-height: 1; cursor: pointer; color: var(--ink-soft);
  transition: background .16s, color .16s;
}
.stepper button:hover { background: var(--cream); color: var(--ink); }
.stepper button:active { background: var(--cream-2); }
.stepper button[disabled] { color: var(--placeholder); cursor: not-allowed; background: transparent; }
.stepper input {
  width: 74px; min-height: 44px; text-align: center; font-weight: 650; font-size: 1.05rem;
  padding: .5rem 0; border: 0; border-inline: 1px solid var(--line-soft); border-radius: 0;
}
.stepper input:focus { border-color: var(--line-soft); box-shadow: none; background: var(--cream); }

.field-row { display: grid; gap: 1rem; }
@media (min-width: 620px) { .field-row.two { grid-template-columns: 1fr 1fr; } }

.check { display: flex; gap: .6rem; align-items: flex-start; font-size: .9rem; color: var(--ink-soft); cursor: pointer; }
.check input { margin-top: .12rem; }
.check:hover { color: var(--ink); }

/* ----------------------------------------------------------- stepped forms */

/* The booking asks four questions and shows one at a time. Each step is the same
   markup the flat form always had, so folding it away is a display question and
   nothing more -- but it needs stating here, because `.wstep` and `.btn` each
   declare their own display and would out-specify the browser's `[hidden]`. */
.wstep[hidden], .wz-head[hidden], .wz-dots[hidden], .wz-review[hidden],
.btn[hidden] { display: none; }

.wstep { display: grid; }
.wz-title {
  margin: 0 0 1.15rem; padding-bottom: .7rem; border-bottom: 1px solid var(--line-soft);
  font-size: .8rem; font-weight: 650; letter-spacing: .12em; text-transform: uppercase;
  color: var(--ink-soft);
}

.wz-head { margin-bottom: 1.3rem; }
.wz-count {
  margin: 0 0 .5rem; font-size: .74rem; font-weight: 600;
  letter-spacing: .13em; text-transform: uppercase; color: var(--muted);
}
.wz-track { height: 4px; border-radius: 999px; background: var(--cream-2); overflow: hidden; }
.wz-fill {
  display: block; height: 100%; width: 25%; border-radius: 999px;
  background: linear-gradient(90deg, var(--green), var(--navy));
  transition: width .4s cubic-bezier(.22, .61, .36, 1);
}

.wz-nav {
  display: flex; align-items: center; gap: .7rem;
  margin-top: 1.5rem; padding-top: 1.2rem; border-top: 1px solid var(--line-soft);
}
.wz-dots { display: flex; flex: 1; justify-content: center; gap: .35rem; }
.wz-dot {
  width: 27px; height: 27px; border-radius: 50%; cursor: pointer;
  font: inherit; font-size: .74rem; font-weight: 650; color: var(--muted);
  background: var(--surface); border: 1px solid var(--line);
  transition: background .16s, color .16s, border-color .16s;
}
.wz-dot:hover { border-color: var(--muted); color: var(--ink); }
/* A step already walked through stays readable as a step: pale navy, still a
   number, and clickable, because going back should never look like starting over. */
.wz-dot.is-done { background: var(--info-bg); border-color: var(--info-line); color: var(--navy); }
.wz-dot.is-on { background: var(--ink); border-color: var(--ink); color: var(--on-ink); }

.wz-review {
  margin: 0; display: grid; gap: .45rem; font-size: .88rem;
}
.wz-review > div {
  display: flex; justify-content: space-between; gap: 1rem;
  padding-bottom: .4rem; border-bottom: 1px dashed var(--line);
}
.wz-review dt { color: var(--muted); letter-spacing: .04em; }
.wz-review dd { margin: 0; font-weight: 600; text-align: right; }

.wz-alt { margin: .9rem 0 0; text-align: center; }

@media (max-width: 480px) {
  /* Two hands on a phone: the rail moves above the buttons and the buttons take
     the row between them, which is where a thumb already is. The rail has to be
     told to hold a whole line by `flex-basis` -- a width of 100% would be read
     as nothing at all by an item already growing from a zero basis. */
  .wz-nav { flex-wrap: wrap; }
  .wz-dots { order: -1; flex: 1 0 100%; justify-content: flex-start; }
  .wz-nav .btn { flex: 1; justify-content: center; }
}

/* --------------------------------------------------------------- feedback */

.alert { border-radius: var(--radius-sm); padding: .95rem 1.1rem; margin-bottom: 1.4rem; border: 1px solid; border-left-width: 3px; font-size: .94rem; }
/* Each alert carries its own weight down the left edge, so a page full of
   pale washes still says at a glance which one is a warning. */
.alert-ok   { background: var(--ok-bg); border-color: var(--ok-line); border-left-color: var(--ok); color: var(--ok-ink); }
.alert-err  { background: var(--err-bg); border-color: var(--err-line); border-left-color: var(--danger); color: var(--err-ink); }
.alert-info { background: var(--info-bg); border-color: var(--info-line); border-left-color: var(--navy); color: var(--info-ink); }
.alert h3, .alert p { margin: 0; }
.alert ul { margin: .4rem 0 0; padding-left: 1.1rem; }

.badge {
  display: inline-flex; align-items: center; gap: .35rem;
  font-size: .74rem; font-weight: 600; letter-spacing: .02em;
  padding: .25rem .6rem; border-radius: 999px;
  background: var(--cream); color: var(--ink-soft); border: 1px solid var(--line);
  white-space: nowrap;
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge-confirmed { background: var(--ok-bg); color: var(--ok); border-color: var(--ok-line); }
.badge-checked   { background: var(--info-bg); color: var(--navy); border-color: var(--info-line); }
.badge-cancelled { background: var(--grey-bg); color: var(--muted); border-color: var(--line); }

/* ------------------------------------------------------------------ code */

.code-display {
  font-weight: 650; letter-spacing: .22em;
  font-size: clamp(1.5rem, 1rem + 2.6vw, 2.5rem);
  font-variant-numeric: tabular-nums;
  color: var(--navy); text-align: center;
  padding: .6rem 0 .2rem;
  word-break: break-all;
}

/* --------------------------------------------------------------- gallery */

.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: 1rem; }
/* One photograph per screen on a phone is twenty scrolls through a family album.
   At 150px the same shots come two up, which is still large enough to see a face
   and small enough that the row is the point rather than each picture. */
@media (max-width: 560px) {
  .gallery { grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr)); gap: .6rem; }
  .shot figcaption { padding: .45rem .55rem .5rem; font-size: .72rem; }
}
.shot {
  position: relative; margin: 0; border-radius: var(--radius-sm); overflow: hidden;
  background: var(--cream-2); aspect-ratio: 4 / 3; border: 1px solid var(--line);
}
.shot img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.shot:hover img { transform: scale(1.035); }
/* The caption is a plate laid under the picture, not a shade dragged up it: the
   words are ink, the photograph keeps all of its light, and a guest reading a
   name is not asked to look through a scrim. */
.shot figcaption {
  position: absolute; inset: auto 0 0 0; padding: .55rem .8rem .6rem;
  background: color-mix(in srgb, var(--paper) 90%, transparent);
  border-top: 1px solid var(--line-soft);
  color: var(--ink); font-size: .8rem;
}
.shot figcaption b { display: block; font-weight: 600; }

.empty {
  text-align: center; padding: clamp(2.5rem, 1.5rem + 5vw, 4.5rem) 1.2rem;
  border: 1px dashed var(--line); border-radius: var(--radius); color: var(--muted);
}

/* Ordered how-to list, used on the home page, verify page and installer. */
.steps { margin: 0; padding: 0; list-style: none; counter-reset: step; display: grid; gap: .85rem; }
.steps li { position: relative; padding-left: 2.2rem; color: var(--ink-soft); }
.steps li::before {
  counter-increment: step; content: counter(step);
  position: absolute; left: 0; top: .05rem;
  width: 1.55rem; height: 1.55rem; border-radius: 50%;
  background: var(--ink); color: var(--on-ink);
  font-size: .74rem; font-weight: 600;
  display: grid; place-items: center;
}

/* Installer checklist */
.install-log { list-style: none; margin: 0 0 2rem; padding: 0; display: grid; gap: .45rem; }
.install-log li { padding: .5rem .8rem; border-radius: 8px; background: var(--cream); font-size: .9rem; }
.install-log li span { display: inline-block; width: 1.1rem; font-weight: 700; }
.log-ok   { color: var(--ok); }
.log-warn { background: var(--warn-bg); color: var(--warn-ink); }
.log-err  { background: var(--err-bg); color: var(--danger); }

/* Drop zone for the guest photo form */
.dropzone {
  border: 1px dashed var(--line); border-radius: var(--radius-sm);
  padding: 1.2rem; text-align: center; background: var(--field); cursor: pointer;
  transition: border-color .16s, background .16s, box-shadow .16s;
}
.dropzone:hover { border-color: var(--navy); background: var(--cream); }
/* The plate lights the same way an input does when a keyboard reaches it, so
   choosing a file is not the one control on the page without a focus state. */
.dropzone:has(input:focus-visible) {
  border-color: var(--navy);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--navy) 18%, transparent);
}
/* Chrome's own file button is a grey system chip that belongs to no palette.
   It is told what it is: a small ghost button that happens to open a picker. */
input[type=file] {
  font: inherit; color: var(--muted); background: none; border: 0;
  max-width: 100%;
}
input[type=file]::file-selector-button {
  font: inherit; font-weight: 600; font-size: .88rem; cursor: pointer;
  margin-inline-end: .8rem; padding: .5rem .95rem;
  color: var(--ink); background: var(--paper);
  border: 1px solid var(--line); border-radius: 999px;
  transition: background .16s, border-color .16s;
}
input[type=file]::file-selector-button:hover { background: var(--cream); border-color: var(--muted); }
.dropzone input[type=file] { padding: .5rem 0 0; }
.preview { margin-top: 1rem; border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--line); }
.preview img { width: 100%; max-height: 320px; object-fit: cover; }

/* ------------------------------------------------------------------- card */

.ticket {
  position: relative; overflow: hidden;
  background: var(--cream); border: 1px solid var(--line); border-radius: 22px;
  padding: clamp(1.5rem, 1rem + 2.5vw, 2.4rem);
  box-shadow: var(--shadow);
}
.ticket::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px;
  background: linear-gradient(180deg, var(--green) 0 33%, var(--navy) 33% 66%, var(--blue) 66% 100%);
}
.ticket-grid { display: grid; gap: clamp(1.4rem, 1rem + 2vw, 2.4rem); }
@media (min-width: 760px) { .ticket-grid { grid-template-columns: 1.25fr .75fr; align-items: center; } }
.ticket dl { display: grid; grid-template-columns: auto 1fr; gap: .5rem 1.2rem; margin: 0; }
.ticket dt { font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); align-self: center; }
.ticket dd { margin: 0; font-weight: 600; }
.qr-wrap { text-align: center; }
.qr-frame {
  /* Deliberately paper-white in both themes: a scanner needs dark modules on
     a light field. */
  display: inline-block; background: #fff; border: 1px solid var(--line);
  border-radius: 14px; padding: 10px; box-shadow: var(--shadow-sm);
}
.qr-frame svg, .qr-frame img { width: 168px; height: 168px; display: block; }

/* ---------------------------------------------------------------- tables */

.table-wrap { overflow-x: auto; overscroll-behavior-x: contain; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th, td { text-align: left; padding: .8rem .95rem; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
th { font-size: .7rem; letter-spacing: .13em; text-transform: uppercase; color: var(--muted); font-weight: 600; white-space: nowrap; background: var(--surface); }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: var(--cream); }
td.num { font-variant-numeric: tabular-nums; }
td .actions { display: flex; gap: .4rem; flex-wrap: wrap; }
.mono { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; letter-spacing: .06em; }

/* ----------------------------------------------------------------- admin */

/* `1fr` is short for `minmax(auto, 1fr)`, and auto means the track refuses to
   shrink below the min-content width of what sits in it -- which on the guest
   table is 880px of columns. Measured on a 390px phone the whole page came out
   900px wide and the table had to be panned sideways, because the wrapper was
   never narrow enough to need its own scroller. Pinning the track to zero lets
   the column shrink to the screen and the `.table-wrap` above does its job. */
.admin-shell { display: grid; grid-template-columns: 232px minmax(0, 1fr); gap: clamp(1.5rem, 1rem + 2vw, 2.5rem); align-items: start; }
@media (max-width: 880px) { .admin-shell { grid-template-columns: minmax(0, 1fr); } }
.side { position: sticky; top: 84px; display: flex; flex-direction: column; gap: .2rem; }
@media (max-width: 880px) { .side { position: static; flex-direction: row; overflow-x: auto; } }
.side a {
  text-decoration: none; color: var(--ink-soft); font-weight: 500; font-size: .92rem;
  padding: .62rem .85rem; border-radius: var(--radius-sm); white-space: nowrap;
}
.side a:hover { background: var(--cream); }
.side a[aria-current="page"] { background: var(--ink); color: var(--on-ink); }
.side .side-label { font-size: .7rem; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); padding: 1rem .85rem .3rem; }

/* ---------------------------------------------------------------- flashes */

.flash-stack { display: grid; gap: .6rem; margin-bottom: 1.4rem; }

/* ----------------------------------------------------------------- footer */

.footer { border-top: 1px solid var(--line-soft); padding-block: 2.6rem; color: var(--muted); font-size: .88rem; }
.footer-in { display: flex; flex-wrap: wrap; gap: 1rem 2rem; align-items: center; justify-content: space-between; }
.footer a { color: var(--ink-soft); text-decoration: none; }
.footer a:hover { text-decoration: underline; }

/* ------------------------------------------------------------------ misc */

hr.rule { border: 0; border-top: 1px solid var(--line); margin: 2.4rem 0; }
.spacer { height: 1.4rem; }
.stack { display: grid; gap: 1.1rem; }
.row { display: flex; gap: .7rem; flex-wrap: wrap; align-items: center; }
.row.between { justify-content: space-between; }
.row.end { margin-left: auto; }
.pill-row { display: flex; gap: .4rem; flex-wrap: wrap; }
.tag { font-size: .78rem; padding: .3rem .7rem; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); text-decoration: none; color: var(--ink-soft); }
.tag:hover { border-color: var(--muted); }
.tag[aria-current="true"] { background: var(--ink); color: var(--on-ink); border-color: var(--ink); }
/* A chosen pill says so in the same navy the radio inside it is wearing, on a
   wash light enough that the tick itself stays visible. An inverted block would
   bury the control it is meant to be standing in. */
.pill-row .tag:has(input:checked) { background: var(--info-bg); border-color: var(--navy); color: var(--navy); }
.pill-row .tag:has(input:checked):hover { border-color: var(--navy); }
.pill-row .tag:has(input:focus-visible) { box-shadow: 0 0 0 3px color-mix(in srgb, var(--navy) 18%, transparent); border-color: var(--navy); }

/* Only hidden once the script has announced itself, so a blocked or failing
   JS file can never leave a section invisible. */
html.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity .7s ease, transform .7s ease; }
html.js .reveal.in { opacity: 1; transform: none; }
/* Facts arriving one after the other reads as an introduction, not as a wall
   going up. The delay is on the transition, so it also holds still when the
   print sheet forces every section solid. */
html.js .facts .reveal:nth-child(2) { transition-delay: .11s; }
html.js .facts .reveal:nth-child(3) { transition-delay: .22s; }
html.js .facts .reveal:nth-child(4) { transition-delay: .33s; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1 !important; transform: none !important; transition: none; } }
/* The verse is the one .reveal whose parts fade on their own, so it is told twice:
   nobody asked for a sentence they have to wait for. */
@media (prefers-reduced-motion: reduce) {
  .home-verse .w, .home-verse .vref { opacity: 1 !important; transform: none !important; transition: none !important; }
}

.skip { position: absolute; left: -9999px; }
.skip:focus {
  left: 1rem; top: 1rem; z-index: 100; background: var(--paper); color: var(--ink);
  padding: .6rem 1rem; border-radius: 8px; border: 1px solid var(--navy);
  box-shadow: var(--shadow-sm);
}

/* -------------------------------------------------------- language toggle */

.lang-toggle {
  display: inline-flex; align-items: center; gap: 2px; margin-left: .5rem;
  padding: 2px; border: 1px solid var(--line); border-radius: 999px;
  background: var(--surface);
}
.lang-toggle a {
  padding: .26rem .58rem; border-radius: 999px;
  font-size: .72rem; font-weight: 650; letter-spacing: .1em;
  text-decoration: none; color: var(--muted);
  transition: background .16s, color .16s;
}
.lang-toggle a:hover { background: var(--cream); color: var(--ink); }
.lang-toggle a[aria-current="true"] { background: var(--ink); color: var(--on-ink); }

/* -------------------------------------------------------- attendee roster */

.field.roster {
  border: 1px solid var(--line); border-left: 3px solid var(--navy);
  border-radius: var(--radius); background: var(--cream);
  padding: 1.15rem 1.15rem 1.25rem; margin-bottom: 1.4rem;
}
.field.roster > .legend { color: var(--ink); font-size: .8rem; }

.roster-list { list-style: none; margin: .9rem 0 0; padding: 0; display: grid; gap: .5rem; }
.roster-row {
  display: grid; gap: .5rem; align-items: center;
  grid-template-columns: minmax(0, 1fr) 9.5rem auto auto;
}
.roster-row .r-name, .roster-row .r-rel { padding: .62rem .8rem; font-size: .95rem; }
/* The relation plate is a select, and a select now carries a drawn chevron in
   its right-hand corner, so it keeps a gap there that its shared padding with
   the name plate does not give it. */
.roster-row .r-rel { min-width: 0; padding-right: 2.2rem; }
/* A row that only asks for a name hands the whole line to it: the plate takes
   the first track and the remove button the second, which is where a guest's
   row stops -- the four tracks above are for the organiser's richer one. */
.roster-row.is-names { grid-template-columns: minmax(0, 1fr) auto; }
.roster-row .r-child {
  display: inline-flex; align-items: center; gap: .38rem;
  font-size: .78rem; letter-spacing: 0; text-transform: none; font-weight: 500;
  color: var(--ink-soft); white-space: nowrap; cursor: pointer;
  padding: .5rem .7rem; border: 1px solid var(--line);
  border-radius: 999px; background: var(--surface);
}
.roster-row .r-child input { margin: 0; accent-color: var(--navy); }
.r-del {
  width: 34px; height: 34px; flex: none; cursor: pointer;
  border: 1px solid var(--line); border-radius: 50%;
  background: var(--surface); color: var(--muted);
  font-size: 1.1rem; line-height: 1; display: grid; place-items: center;
  transition: color .16s, border-color .16s, background .16s;
}
.r-del:hover { color: var(--danger); border-color: var(--danger-btn-line); background: var(--err-bg); }
@media (max-width: 620px) {
  .roster-row { grid-template-columns: minmax(0, 1fr) auto; }
  .roster-row .r-name { grid-column: 1 / -1; }
  .roster-row .r-child { grid-column: 1; }
  /* A name-only row is already one line wide; it keeps its button beside the
     plate instead of dropping it under a full-width field. */
  .roster-row.is-names .r-name { grid-column: auto; }
}

.roster-tools { margin-top: 1rem; }
.roster-extra { margin: 1rem 0 0; padding-top: 1rem; border-top: 1px dashed var(--line); }
.roster-total {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: .32rem;
  margin: 1.05rem 0 0; font-size: .86rem; color: var(--muted);
}
.roster-total b { font-size: 1.1rem; font-weight: 650; color: var(--ink); font-variant-numeric: tabular-nums; }

/* A draft was restored from this browser, so say it plainly and offer undo. */
.draft-note {
  display: flex; flex-wrap: wrap; align-items: center; gap: .5rem;
  margin: .9rem 0 0; padding: .55rem .8rem;
  background: var(--info-bg); border: 1px solid var(--info-line);
  border-radius: var(--radius-sm); color: var(--info-ink); font-size: .84rem;
}
.draft-note button {
  font: inherit; font-weight: 600; text-decoration: underline;
  background: none; border: 0; padding: 0; cursor: pointer; color: inherit;
}

/* The count-only stepper is a fallback: useful only when the script is out. */
html.js .nojs-only { display: none; }

/* ------------------------------------------------------------ party list */

.party-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .28rem; font-weight: 400; }
.party-list li { display: flex; flex-wrap: wrap; align-items: baseline; gap: .4rem; }
.party-list b { font-weight: 600; }

/* ------------------------------------------------- door console tick-offs */

.tick-list { list-style: none; margin: .9rem 0 0; padding: 0; display: grid; gap: .45rem; }
.tick-row {
  border: 1px solid var(--line); border-radius: 999px; background: var(--surface);
  padding: .25rem .5rem .25rem .3rem;
  transition: border-color .18s, background .18s;
}
.tick-row form { display: flex; align-items: center; }
.tick-btn {
  display: flex; align-items: center; gap: .6rem; width: 100%;
  font: inherit; text-align: left; cursor: pointer;
  background: none; border: 0; padding: .35rem .3rem; border-radius: 999px;
}
.tick-btn:hover { background: var(--cream); }
.tick-box {
  width: 1.55rem; height: 1.55rem; flex: none;
  display: grid; place-items: center; border-radius: 50%;
  border: 1.5px dashed var(--muted); color: transparent; font-size: .8rem;
  transition: background .18s, border-color .18s, color .18s;
}
.tick-row.in { border-color: var(--ok-line); background: var(--ok-bg); }
.tick-row.in .tick-box { border-style: solid; border-color: var(--green); background: var(--green); color: var(--on-ink); }
.tick-row.in .tick-btn:hover { background: transparent; }

/* --------------------------------------------------------------- charts */

.trend text { font-family: var(--sans); }
.trend rect, .trend circle { transition: opacity .16s; }
.trend rect:hover, .trend circle:hover { opacity: .78; }

/* ------------------------------------------------------------- skeletons */

/* A block that stands in for content still on its way. */
.skeleton {
  position: relative; overflow: hidden; pointer-events: none;
  background: var(--cream-2); color: transparent;
  border-radius: var(--radius-sm); user-select: none;
}
.skeleton::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(100deg, transparent 18%, rgba(255,255,255,.7) 48%, transparent 78%);
  transform: translateX(-100%);
}

/* Photographs shimmer under themselves until the bytes arrive: the frame
   paints the sheen, the image simply covers it once it decodes. */
.shot::before {
  content: ""; position: absolute; inset: 0; z-index: 0;
  background: linear-gradient(100deg, var(--cream-2) 20%, var(--line-soft) 46%, var(--cream-2) 72%);
  background-size: 220% 100%;
}
.shot img { position: relative; z-index: 1; }

@media (prefers-reduced-motion: no-preference) {
  .skeleton::after { animation: sheen 1.5s ease-in-out infinite; }
  .shot::before { animation: sheen 1.6s ease-in-out infinite; }
}
@keyframes sheen {
  from { background-position: 130% 0; }
  to   { background-position: -130% 0; }
}

/* ----------------------------------------------------------- hero motion */

@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: none; }
}
/* One light breathing. The dots carry each boy's own accent, so the pulse is
   kept to size and opacity rather than a coloured ring. */
@keyframes candle {
  0%, 100% { transform: scale(1);    opacity: 1; }
  50%      { transform: scale(1.35); opacity: .7; }
}

@media (prefers-reduced-motion: no-preference) {
  .hero-copy > * { animation: rise .75s cubic-bezier(.22,.72,.24,1) both; }
  .hero-copy > :nth-child(2) { animation-delay: .07s; }
  .hero-copy > :nth-child(3) { animation-delay: .14s; }
  .hero-copy > :nth-child(4) { animation-delay: .21s; }
  .hero-copy > :nth-child(5) { animation-delay: .28s; }
  .hero-copy > :nth-child(6) { animation-delay: .35s; }
  /* The three names are put through the rite in their own block below, which
     times itself off each boy's turn rather than off nth-child. */
}

/* ------------------------------------------------------- baptismal water */

/* Water is the subject, so it moves like water: drops falling through the
   light, and rings widening where one has landed in the font. Both live behind
   the words (z-index 0) and go straight in the partial -- partials/water.php. */
.drops, .ripples { position: absolute; z-index: 0; pointer-events: none; }
.drops {
  inset: 0; overflow: hidden;
}
.drops i {
  position: absolute; top: -8%;
  width: 7px; height: 12px; opacity: 0;
  background: var(--drop);
  border-radius: 62% 62% 68% 68% / 44% 44% 100% 100%;
  filter: blur(.5px);
}
.ripples {
  left: 0; right: 0; bottom: 4%; height: 86px;
}
.ripples i {
  position: absolute; bottom: 6px;
  width: 40px; height: 16px; margin: 0 0 0 -20px;
  border: 1px solid var(--ripple); border-radius: 50%;
  opacity: 0;
}
/* The font holds water, so the band keeps a little of it at the foot: a pool of
   light, and the surface of that pool. Both are glows rather than shapes, on
   purpose -- a straight line drawn across the bottom of a family photograph reads
   as an edge, and the photograph is what the band exists for. The rings are
   anchored to the same line they spread on, which is why they sit at the bottom of
   this layer instead of in its middle. */
.ripples::before {
  content: ""; position: absolute; left: 50%; bottom: -24px; pointer-events: none;
  width: min(620px, 76%); height: 78px; transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(58% 70% at 50% 54%,
              color-mix(in srgb, var(--drop) 60%, transparent), transparent 72%);
  filter: blur(11px); opacity: .5;
}
.ripples::after {
  content: ""; position: absolute; left: 50%; bottom: 10px; pointer-events: none;
  width: min(560px, 70%); height: 2px; transform: translateX(-50%);
  border-radius: 50%;
  background: linear-gradient(90deg, transparent,
              color-mix(in srgb, var(--drop) 92%, #fff) 24%,
              rgba(255,255,255,.95) 50%, color-mix(in srgb, var(--drop) 92%, #fff) 76%, transparent);
  background-size: 220% 100%; background-repeat: no-repeat;
  filter: blur(1.6px); opacity: .72;
}
/* Rings seen at an angle, which is how a font actually looks from a pew. */
@keyframes ripple {
  0%   { opacity: 0;   transform: scale(.3); }
  14%  { opacity: .85; }
  100% { opacity: 0;   transform: scale(3.6); }
}
@keyframes fall {
  0%   { opacity: 0;   top: -8%;  transform: scale(.85); }
  14%  { opacity: .9; }
  78%  { opacity: .55; }
  100% { opacity: 0;   top: 104%; transform: scale(1.1); }
}
/* The photograph breathing is the difference between a banner and a hero. It
   only ever scales up, so the layer can never uncover an edge. */
@keyframes breathe {
  from { transform: scale(1.05) translate3d(0, 0, 0); }
  to   { transform: scale(1.14) translate3d(-1.6%, -1.8%, 0); }
}
@keyframes fill {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: none; }
}
/* A countdown digit that changed should say so, quietly. */
@keyframes tick {
  from { opacity: 0; transform: translateY(-42%) scale(.94); }
  to   { opacity: 1; transform: none; }
}
/* The pool brightening and deepening is the last thing the water does, and the
   only thing it does once every drop has come through. */
@keyframes well {
  from { opacity: .34; transform: translateX(-50%) scale(.97); }
  to   { opacity: .62; transform: translateX(-50%) scale(1.04); }
}

@media (prefers-reduced-motion: no-preference) {
  .hero::before { animation: breathe 30s ease-in-out infinite alternate; }
  .count > div { animation: fill .7s cubic-bezier(.22,.72,.24,1) both; }
  .count > div:nth-child(2) { animation-delay: .08s; }
  .count > div:nth-child(3) { animation-delay: .16s; }
  .count > div:nth-child(4) { animation-delay: .24s; }
  .count b.tick { animation: tick .42s cubic-bezier(.2,.85,.25,1); }
  .drops i { animation: fall 9s linear infinite; will-change: top, opacity; }
  /* Spread out by hand: an evenly spaced drip looks like a metronome. */
  .drops i:nth-child(1) { left: 8%;  animation-duration: 8.4s;  animation-delay: .4s; }
  .drops i:nth-child(2) { left: 21%; animation-duration: 11s;   animation-delay: 2.6s; }
  .drops i:nth-child(3) { left: 34%; animation-duration: 9.6s;  animation-delay: 5.1s; }
  .drops i:nth-child(4) { left: 48%; animation-duration: 12.4s; animation-delay: 1.2s; }
  .drops i:nth-child(5) { left: 61%; animation-duration: 8.9s;  animation-delay: 6.4s; }
  .drops i:nth-child(6) { left: 76%; animation-duration: 10.8s; animation-delay: 3.3s; }
  .drops i:nth-child(7) { left: 90%; animation-duration: 9.2s;  animation-delay: 7.5s; }
  .drops i:nth-child(8) { left: 15%; animation-duration: 10.2s; animation-delay: 8.9s; }
  .drops i:nth-child(9) { left: 68%; animation-duration: 13.2s; animation-delay: 5.8s; }
  /* Every ring answers one particular drop instead of keeping its own time: the
     duration is that drop's, and the delay is the second it reaches the water, so
     the ring is already opening as the drop that caused it goes under. The left
     edge is the drop's own, which is why the rings are spread down the band rather
     than clustered where a stylesheet would put them. */
  .ripples i { animation: ripple 11s ease-out infinite; }
  .ripples i:nth-child(1) { left: 21%; animation-duration: 11s;   animation-delay: 13.6s; }
  .ripples i:nth-child(2) { left: 48%; animation-duration: 12.4s; animation-delay: 13.6s; }
  .ripples i:nth-child(3) { left: 76%; animation-duration: 10.8s; animation-delay: 14.1s; }
  .ripples i:nth-child(4) { left: 61%; animation-duration: 8.9s;  animation-delay: 15.3s; }
  .ripples::before { animation: well 9s ease-in-out infinite alternate; }
  .ripples::after { animation: sheen 13s linear infinite; }
}

/* Water is decoration, so it is simply not drawn for anyone who asked for less
   motion, nor for anyone whose browser cannot blur. */
@media (prefers-reduced-motion: reduce) {
  .drops, .ripples { display: none; }
}
/* Nothing to fall back on any more: this column paints no glass, so a browser
   that cannot blur sees the same photograph as one that can. Nor does a browser
   that cannot mix colours see a pool: an unparsable color-mix inside these
   gradients drops the whole background declaration, which leaves two transparent
   boxes rather than a hard block of --drop across the foot of the picture. */

/* ------------------------------------------------ three names, baptised */

/* The three boys' names are the reason the page exists, so each one is put
   through the rite in miniature, in his turn: a drop falls, the name forms out
   of it, the water is poured down over the letters, he is signed with the
   chrism in the shape of a cross, and a ring spreads from his own colour at the
   foot. Afterwards the light keeps travelling through the letters the way it
   moves under the surface of still water.

   All of it is drawn on the two nodes index.php writes per boy, timed off --t
   (his turn) exactly as the candles are lit in order from the Paschal flame.
   Nothing needs script. Every moving part rests at opacity 0, so a page that
   animates nothing -- and a page printed on paper -- shows three plain names
   and no water at all. */
.hero-names .nm::before,      /* the drop, falling */
.hero-names .nm::after,       /* the light the water leaves behind */
.hero-names .word::after,     /* the water being poured down */
.hero-names .chrism,          /* the cross of light */
.hero-names .chrism::before, .hero-names .chrism::after,
.hero-names .dot::after {     /* the ring off his own colour */
  content: ""; position: absolute; pointer-events: none; opacity: 0;
}
.hero-names .nm::before {
  left: 1.05em; top: -1.15em; width: 7px; height: 11px;
  background: var(--drop);
  border-radius: 62% 62% 68% 68% / 44% 44% 100% 100%;
  filter: blur(.4px);
}
.hero-names .nm::after {
  inset: -.12em -.4em auto; height: 1.6em; z-index: -1; border-radius: 50%;
  background: radial-gradient(58% 68% at 50% 58%,
              color-mix(in srgb, var(--lit-acc) 46%, transparent), transparent 74%);
  filter: blur(7px);
}
/* A sheet of water with its top and bottom already gone, so it never shows an
   edge as it passes; masked to fade out at the sides too, because a pour that
   stops dead at the last letter looks like a bar. */
.hero-names .word::after {
  inset: -.3em -.25em; z-index: 1; border-radius: .45em;
  background: linear-gradient(180deg, transparent 0 10%, var(--drop) 40%,
              color-mix(in srgb, var(--drop) 55%, #fff) 54%, transparent 90%);
  filter: blur(1.4px);
  -webkit-mask: linear-gradient(90deg, transparent, #000 16% 84%, transparent);
  mask: linear-gradient(90deg, transparent, #000 16% 84%, transparent);
}
/* The sign of the cross, drawn the way a thumb draws it: down the middle, then
   across. Two bars, each collapsed along its own length at rest. */
.hero-names .chrism {
  left: 50%; top: -1.5em; width: 13px; height: 16px; margin-left: -6.5px;
}
.hero-names .chrism::before, .hero-names .chrism::after {
  opacity: 1; border-radius: 2px; background: var(--lit-acc);
  box-shadow: 0 0 9px color-mix(in srgb, var(--lit-acc) 62%, transparent);
}
.hero-names .chrism::before { left: 50%; top: 0; width: 2px; height: 100%; margin-left: -1px; transform: scaleY(0); transform-origin: 50% 0; }
.hero-names .chrism::after  { left: 0; top: 36%; width: 100%; height: 2px; transform: scaleX(0); transform-origin: 0 50%; }
.hero-names .dot::after {
  left: 50%; top: 50%; width: 9px; height: 9px; margin: -4.5px 0 0 -4.5px;
  border: 1px solid var(--lit-acc); border-radius: 50%;
}
@keyframes beadfall {
  0%   { opacity: 0;   transform: translateY(-.55em) scale(.82); }
  24%  { opacity: .95; }
  74%  { opacity: .85; transform: translateY(.34em) scale(.96, 1.08); }
  100% { opacity: 0;   transform: translateY(.44em) scale(1.7, .26); }
}
/* A name is not printed, it is spoken over a child: out of the blur and down
   into place. `backwards` so the blur lets go of `filter` when it is done --
   the chrism has to be drawn crisp on top of the same word a moment later. */
@keyframes nameword {
  0%   { opacity: 0; filter: blur(7px); transform: translateY(-.13em); }
  58%  { opacity: 1; filter: blur(1.2px); }
  100% { opacity: 1; filter: blur(0); transform: none; }
}
@keyframes pourdown {
  0%   { opacity: 0;   transform: translateY(-54%) scaleY(.72); }
  20%  { opacity: .9; }
  72%  { opacity: .55; }
  100% { opacity: 0;   transform: translateY(60%) scaleY(1.16); }
}
@keyframes chrismdown { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes chrisside  { from { transform: scaleX(0); } to { transform: scaleX(1); } }
/* Seen, held a moment, and then left to the ink it came from. */
@keyframes chrismfade {
  0%   { opacity: 0; }
  12%  { opacity: 1; }
  62%  { opacity: 1; }
  100% { opacity: 0; }
}
@keyframes namering {
  0%   { opacity: 0;   transform: scale(.55); }
  16%  { opacity: .8; }
  100% { opacity: 0;   transform: scale(3.1); }
}
/* A second keyframe for the same ring, because hovering a name should bring
   the water back and a browser will not restart an animation whose properties
   are identical. This one is wider and slower, which is also why it can be.
   Named separately rather than faked by a class swap: nothing here needs
   script. */
@keyframes ringlet {
  0%   { opacity: 0;   transform: scale(.5); }
  22%  { opacity: .9; }
  100% { opacity: 0;   transform: scale(4.2); }
}
@keyframes dotcatch {
  0%   { box-shadow: 0 0 0 0 color-mix(in srgb, var(--lit-acc) 78%, transparent); }
  34%  { box-shadow: 0 0 15px 3px color-mix(in srgb, var(--lit-acc) 78%, transparent); }
  100% { box-shadow: 0 0 7px 1px color-mix(in srgb, var(--lit-acc) 34%, transparent); }
}
@keyframes namelight {
  0%   { opacity: 0; }
  38%  { opacity: .52; }
  100% { opacity: .2; }
}

@media (prefers-reduced-motion: no-preference) {
  .hero-names .nm::before { animation: beadfall .82s calc(var(--t) - .1s) cubic-bezier(.4,.05,.6,.9) 1; }
  .hero-names .nm::after  { animation: namelight 2.4s calc(var(--t) + .5s) ease-out forwards; }
  .hero-names .word {
    animation: nameword .95s var(--t) cubic-bezier(.22,.72,.24,1) backwards,
               sheen 7.4s calc(var(--t) + 2.4s) linear infinite;
  }
  .hero-names .word::after { animation: pourdown 1.25s calc(var(--t) + .28s) cubic-bezier(.35,.6,.4,1) 1; }
  .hero-names .chrism         { animation: chrismfade 2.9s calc(var(--t) + .85s) ease-out 1; }
  .hero-names .chrism::before { animation: chrismdown .34s calc(var(--t) + 1.15s) cubic-bezier(.3,.75,.3,1) both; }
  .hero-names .chrism::after  { animation: chrisside  .28s calc(var(--t) + 1.48s) cubic-bezier(.3,.75,.3,1) both; }
  .hero-names .dot   { animation: dotcatch .9s calc(var(--t) + .45s) ease-out forwards,
                                candle 5.5s calc(var(--t) + 1.4s) ease-in-out infinite; }
  .hero-names .dot::after { animation: namering 1.9s ease-out calc(var(--t) + .55s) 2; }
}

/* The travelling colour inside the letters. It rides on a background clipped
   to the text, so it is only ever declared where that is understood: without
   it the name keeps its plain ink and simply does not shimmer. On a white
   site the letters are already light, so what passes through one is the boy's
   own colour rather than a glint of white. */
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  @media (prefers-reduced-motion: no-preference) {
    .hero-names .word {
      background-image: linear-gradient(100deg, var(--ink) 0 38%,
                        var(--lit-acc) 47%, var(--ink) 56% 100%);
      background-size: 260% 100%;
      background-repeat: no-repeat;
      -webkit-background-clip: text; background-clip: text;
      color: transparent;
    }
  }
}

/* Touching a name pours the water again. Only where a pointer can hover, and
   the lift is on the boy, not the word, so `nameword` has long since let go of
   `transform` by the time it is asked for. */
@media (prefers-reduced-motion: no-preference) and (hover: hover) {
  .hero-names .nm { transition: transform .3s ease; }
  .hero-names .nm:hover { transform: translateY(-2px); }
  .hero-names .nm:hover .dot::after { animation: ringlet 1.7s ease-out 2; }
}

@media (max-width: 620px) {
  .hero-names { gap: .5rem 1.15rem; }
  .hero-names .chrism { top: -1.3em; }
}

/* ---------------------------------------------- candles, incense, bells */

/* Three things a Catholic baptism genuinely has: candles lit from the Paschal
   candle, incense, and bells rung as the child is welcomed. All of it is drawn
   with gradients and one masked glyph, so the site still ships no images, no
   fonts and no animation library. The row itself is in partials/candles.php. */
.candles {
  display: flex; align-items: flex-end; justify-content: center;
  gap: clamp(1.5rem, 1rem + 3vw, 3rem);
  padding-block: 2.4rem .4rem;
}
.candle { position: relative; flex: none; width: 14px; }
.candle .stick {
  display: block; height: 42px; border-radius: 4px 4px 3px 3px;
  background: linear-gradient(90deg, var(--wax-shade), var(--wax) 38%, var(--wax) 62%, var(--wax-shade));
  box-shadow: inset 0 -7px 9px -7px rgba(22,34,47,.2);
}
.candle .flame {
  position: absolute; left: 50%; bottom: calc(100% - 5px);
  width: 15px; height: 26px; margin-left: -7.5px;
  border-radius: 50% 50% 52% 52% / 68% 68% 32% 32%;
  background: radial-gradient(58% 62% at 50% 74%, var(--flame-core) 0 26%, var(--flame-rim) 62%, transparent 100%);
  transform-origin: 50% 100%;
  filter: blur(.4px);
}
/* The pool each flame throws on the darkness around it. */
.candle::after {
  content: ""; position: absolute; left: 50%; bottom: calc(100% - 16px);
  width: 132px; height: 132px; margin-left: -66px; border-radius: 50%;
  background: radial-gradient(circle, var(--glow) 0 34%, transparent 68%);
  opacity: .32; pointer-events: none;
}
/* A ring of the boy's own colour at the foot of his candle, so the four lights
   are not interchangeable -- this is the one place the trio appears together
   outside the names and the card spine. */
.candle .pip {
  position: absolute; left: 50%; bottom: -6px; width: 9px; height: 9px;
  margin-left: -4.5px; border-radius: 50%; background: var(--acc, var(--blue));
  box-shadow: 0 0 0 2px var(--deep);
}
/* The Paschal candle is the big one; every other flame is lit from it. */
.candle-paschal { width: 17px; }
.candle-paschal .stick { height: 62px; border-radius: 5px 5px 3px 3px; }
.candle-paschal .flame { width: 18px; height: 32px; margin-left: -9px; }

/* Two wisps of incense, one behind the other, drifting up out of the band. */
.band-deep::before, .band-deep::after {
  content: ""; position: absolute; z-index: 0; pointer-events: none;
  bottom: -14%; width: 190px; height: 132%;
  background: radial-gradient(50% 62% at 50% 100%, var(--smoke), transparent 72%);
  filter: blur(14px);
}
.band-deep::before { left: 41%; }
.band-deep::after  { left: 55%; }

/* Bells are rung for a baptism. When the countdown runs out, the welcome line
   arrives with one swinging; the glyph is masked so it takes the ink colour and
   therefore stays readable in any palette the family later settles on. */
.count-done { display: flex; align-items: center; justify-content: center; gap: .7rem; }
.count-done::before {
  content: ""; flex: none; width: 17px; height: 19px; margin-bottom: 3px;
  background: currentColor; transform-origin: 50% 2px;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a2 2 0 0 1 2 2v.6c2.9.9 5 3.6 5 6.8v3.4l2 2.6v.6H3v-.6l2-2.6v-3.4c0-3.2 2.1-5.9 5-6.8V4a2 2 0 0 1 2-2Zm0 20a2.4 2.4 0 0 0 2.4-2.2H9.6A2.4 2.4 0 0 0 12 22Z'/%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'%3E%3Cpath d='M12 2a2 2 0 0 1 2 2v.6c2.9.9 5 3.6 5 6.8v3.4l2 2.6v.6H3v-.6l2-2.6v-3.4c0-3.2 2.1-5.9 5-6.8V4a2 2 0 0 1 2-2Zm0 20a2.4 2.4 0 0 0 2.4-2.2H9.6A2.4 2.4 0 0 0 12 22Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* A flame never stands still, but it never travels either: scale and a hair of
   skew, anchored at the wick. `kindle` is the catch of light -- the delay comes
   from --lit in the markup, so the order is a liturgical one, not a CSS one. */
@keyframes kindle {
  0%   { opacity: 0; transform: scale(.2); }
  55%  { opacity: 1; transform: scale(1.06, 1.24); }
  100% { opacity: 1; transform: none; }
}
@keyframes flame {
  0%, 100% { transform: scale(1, 1)      skewX(0deg); }
  22%      { transform: scale(.96, 1.06) skewX(3deg); }
  41%      { transform: scale(1.03, .95) skewX(-2deg); }
  63%      { transform: scale(.97, 1.04) skewX(2deg); }
  84%      { transform: scale(1.02, .97) skewX(-3deg); }
}
@keyframes glowpulse { 0%, 100% { opacity: .28; } 50% { opacity: .48; } }
@keyframes shaft {
  from { transform: translate3d(-1.6%, 0, 0) skewX(-1.2deg); opacity: .62; }
  to   { transform: translate3d(1.6%, 0, 0)  skewX(1.2deg);  opacity: .92; }
}
@keyframes smoke {
  0%   { transform: translate3d(0, 8%, 0)     scale(.9, .8);   opacity: 0; }
  16%  { opacity: .6; }
  60%  { transform: translate3d(-3%, -12%, 0) scale(1.16, 1.1); opacity: .4; }
  100% { transform: translate3d(2%, -28%, 0)  scale(1.5, 1.35); opacity: 0; }
}
/* One ring, then the long tail of it dying away -- rung, not wobbled. */
@keyframes bell {
  0%, 62%, 100% { transform: rotate(0deg); }
  6%  { transform: rotate(15deg); }
  14% { transform: rotate(-12deg); }
  22% { transform: rotate(9deg); }
  30% { transform: rotate(-6deg); }
  38% { transform: rotate(3deg); }
  46% { transform: rotate(-1.5deg); }
}

@media (prefers-reduced-motion: no-preference) {
  .candle .flame {
    animation: kindle 1.1s var(--lit, 0s) cubic-bezier(.2,.8,.25,1) both,
               flame 3.4s calc(var(--lit, 0s) + 1.1s) ease-in-out infinite;
  }
  .candle::after {
    animation: glowpulse 6s calc(var(--lit, 0s) + .6s) ease-in-out infinite;
  }
  .hero::after { animation: shaft 24s ease-in-out infinite alternate; }
  .band-deep::before, .band-deep::after { animation: smoke 22s ease-in-out infinite; }
  .band-deep::after { animation-delay: 9s; }
  .count-done::before { animation: bell 3.6s ease-in-out infinite; }
}

/* Nobody who asked for calm pages gets drifting smoke, and nobody gets any of
   it on paper: a candle in a photograph on a card is one thing, a candle drawn
   where the printer has to lay flat ink is another. */
@media (prefers-reduced-motion: reduce) {
  .band-deep::before, .band-deep::after { display: none; }
}

/* ------------------------------------------------------------------- dove */

/* The Spirit as a dove, coming down over the font. Two masked glyphs -- body
   and wing -- so the wing can beat on its own while the whole bird drifts.
   It carries no words and no link: aria-hidden, no tab stop, and it stays off
   paper, where a flat grey bird would only be a smudge. */
.dove {
  position: absolute; top: 5%; left: 58%; z-index: 2;
  width: 96px; height: 66px;
  color: #fff;
  /* The bird is white on a white site now, so it is defined by the shadow it
     throws instead of by the darkness it used to swim in. */
  filter: drop-shadow(0 2px 5px rgba(22,34,47,.32));
  pointer-events: none;
}
.dove i { position: absolute; background: currentColor; }
.dove .body { inset: 24% 0 14% 4%;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 44'%3E%3Cellipse cx='30' cy='26' rx='15' ry='8.5' transform='rotate(-9 30 26)'/%3E%3Ccircle cx='45' cy='17' r='6.2'/%3E%3Cpath d='M50.5 16.5 62 19 50.5 22.5Z'/%3E%3Cpath d='M16 27 2 19 15 21Z'/%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 64 44'%3E%3Cellipse cx='30' cy='26' rx='15' ry='8.5' transform='rotate(-9 30 26)'/%3E%3Ccircle cx='45' cy='17' r='6.2'/%3E%3Cpath d='M50.5 16.5 62 19 50.5 22.5Z'/%3E%3Cpath d='M16 27 2 19 15 21Z'/%3E%3C/svg%3E") center / contain no-repeat;
}
/* The wing pivots where it meets the shoulder, not at its own middle, which is
   the difference between a bird and a waving hand. */
.dove .wing { top: 8%; left: 6%; width: 54%; height: 52%;
  transform-origin: 88% 24%; opacity: .92;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 44 34'%3E%3Cpath d='M40 6 C28 0 12 4 3 16 12 15 22 18 30 24 34 20 38 13 40 6Z'/%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 44 34'%3E%3Cpath d='M40 6 C28 0 12 4 3 16 12 15 22 18 30 24 34 20 38 13 40 6Z'/%3E%3C/svg%3E") center / contain no-repeat;
}
@keyframes drift {
  0%   { transform: translate3d(0, -8px, 0)  rotate(-3deg); }
  50%  { transform: translate3d(-14px, 14px, 0) rotate(2deg); }
  100% { transform: translate3d(0, -8px, 0)  rotate(-3deg); }
}
@keyframes wingbeat {
  from { transform: rotate(10deg)  scaleY(.94); }
  to   { transform: rotate(-14deg) scaleY(1.05); }
}
@media (prefers-reduced-motion: no-preference) {
  .dove       { animation: drift 15s ease-in-out infinite; }
  .dove .wing { animation: wingbeat 1.9s ease-in-out infinite alternate; }
}
@media (prefers-reduced-motion: reduce) {
  .dove .wing { transform: rotate(-5deg); }
}
@media (max-width: 620px) {
  .dove { width: 68px; height: 48px; top: 3%; left: 66%; }
}

/* --------------------------------------------------------- the dove lands */

/* Everything above this line is the bird as it stays; this is the bird as it
   arrives. A dove that only hovers is a decoration, and the moment the home page
   is about is the Spirit coming down over the water, so it enters from above the
   frame, beats hard while it is still in the air, and settles into the slow drift
   it had before -- which is also what a page with no motion shows, since none of
   what follows is outside a no-preference block. */
.dove::before {
  content: ""; position: absolute; inset: -46% -30% -34%; z-index: -1;
  border-radius: 50%; pointer-events: none; opacity: .4;
  /* --navy on a hero band is the pale sky colour the band re-declares for itself,
     so the halo is the light of the window rather than a second bird. */
  background: radial-gradient(circle at 50% 48%, rgba(255,255,255,.92),
              color-mix(in srgb, var(--navy) 34%, transparent) 46%, transparent 72%);
  filter: blur(9px);
}
/* `descend` is painted on top and opacity while `drift` goes on painting
   transform, which is the whole reason the two can overlap without one waiting
   for the other and no wrapper node had to be added to the partial. */
@keyframes descend {
  0%   { opacity: 0; top: -20%; }
  24%  { opacity: 1; }
  100% { opacity: 1; top: 4%; }
}
@keyframes halo {
  0%   { opacity: 0;  transform: translate3d(0, 34%, 0) scale(.5); }
  58%  { opacity: .9; }
  100% { opacity: .4; transform: none; }
}

@media (prefers-reduced-motion: no-preference) {
  .dove         { animation: descend 4.2s cubic-bezier(.3,.7,.35,1) both,
                             drift 15s ease-in-out 4.2s infinite; }
  .dove::before { animation: halo 4.2s ease-out both; }
  /* Hard at first, gliding once it has arrived: the slow beat is the same
     animation on the same property, beginning exactly when the fast one has run
     out its iterations, so the wing is never asked to do two things at once. */
  .dove .wing   { animation: wingbeat .58s ease-in-out 7 alternate,
                             wingbeat 1.9s ease-in-out 4.2s infinite alternate; }
}

/* ------------------------------------------------- four moments at the font */

/* The home page has always said who is being baptised and when. This is the
   baptism: four moments, drawn the way the rest of the site draws everything --
   gradients, one masked glyph, no image -- and in the order the rite actually
   moves, because these four things do happen one after the other at the font.

   Nothing here keeps its own time. Every item is a .reveal, so the script hands it
   an `in` class the moment the strip is reached, and each animation is hung off
   that class with --j (the moment's place in the rite) for its delay. That is what
   makes the row behave like a procession instead of four ornaments that finished
   playing before anybody had scrolled to them: it happens once, in order, when you
   arrive.

   The pieces that are pure motion -- the drop, the rings, the glow -- rest at
   opacity 0, and the pieces that carry the meaning, the bell, the basin, the two
   bars of the cross and the candle, are what a page without script, without motion
   or on paper shows. */
.rite-band { border-top: 1px solid var(--line-soft); }
.rite-head { max-width: 62ch; margin-bottom: clamp(2rem, 1.4rem + 3vw, 3.4rem); }
.rite {
  list-style: none; margin: 0; padding: 0; counter-reset: rite;
  display: grid; gap: clamp(1.9rem, 1.2rem + 3vw, 3rem);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 186px), 1fr));
}
.rite-item {
  counter-increment: rite; position: relative; text-align: center; min-width: 0;
}
/* I, II, III, IV. A rite is numbered, and the numerals say out loud that these
   belong in this order even once the strip has wrapped onto two rows on a phone. */
.rite-item::before {
  content: counter(rite, upper-roman); display: block; margin-bottom: .7rem;
  font-size: .7rem; font-weight: 600; letter-spacing: .22em; color: var(--muted);
}
.rite-item h3 { font-size: 1.06rem; margin-bottom: .45rem; }
.rite-item p { margin: 0; font-size: .92rem; line-height: 1.5; color: var(--muted); }
.rite-icon {
  /* His turn, in the order of the rite: the bell is rung, then the water comes,
     then the chrism, then the light -- each about a heartbeat after the last. */
  --t: calc(var(--j, 0) * 1.05s);
  position: relative; display: block; width: 84px; height: 86px; margin: 0 auto 1.15rem;
}

/* I. The name is spoken, and the bell says so to the rest of the church. */
.rite-name .bell {
  position: absolute; left: 50%; top: 8px; width: 27px; height: 30px; margin-left: -13.5px;
  background: var(--ink-soft); transform-origin: 50% 3px;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a2 2 0 0 1 2 2v.6c2.9.9 5 3.6 5 6.8v3.4l2 2.6v.6H3v-.6l2-2.6v-3.4c0-3.2 2.1-5.9 5-6.8V4a2 2 0 0 1 2-2Zm0 20a2.4 2.4 0 0 0 2.4-2.2H9.6A2.4 2.4 0 0 0 12 22Z'/%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'%3E%3Cpath d='M12 2a2 2 0 0 1 2 2v.6c2.9.9 5 3.6 5 6.8v3.4l2 2.6v.6H3v-.6l2-2.6v-3.4c0-3.2 2.1-5.9 5-6.8V4a2 2 0 0 1 2-2Zm0 20a2.4 2.4 0 0 0 2.4-2.2H9.6A2.4 2.4 0 0 0 12 22Z'/%3E%3C/svg%3E") center / contain no-repeat;
}
/* Two rings of sound, one behind the other, out of the bell's own mouth. */
.rite-name .ring {
  position: absolute; left: 50%; top: 20px; width: 22px; height: 22px; margin: -11px 0 0 -11px;
  border: 1px solid var(--ripple); border-radius: 50%; opacity: 0;
}

/* II. The water. A font is a basin on a foot, so that is what is drawn: the bowl,
   the water standing in it, and the drop coming down into the middle. */
.rite-water .basin {
  position: absolute; left: 50%; bottom: 15px; width: 52px; height: 23px; margin-left: -26px;
  border: 1px solid var(--line);
  border-radius: 6px 6px 46% 46% / 6px 6px 100% 100%;
  background: linear-gradient(180deg, color-mix(in srgb, var(--blue) 12%, #fff),
              color-mix(in srgb, var(--blue) 34%, #fff));
  box-shadow: inset 0 2px 0 rgba(255,255,255,.85), 0 7px 14px -11px rgba(22,34,47,.55);
}
.rite-water .basin::before {
  content: ""; position: absolute; left: 3px; right: 3px; top: 4px; height: 4px; border-radius: 50%;
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--blue) 62%, #fff) 24%,
              rgba(255,255,255,.95) 50%, color-mix(in srgb, var(--blue) 62%, #fff) 76%, transparent);
}
.rite-water .basin::after {
  content: ""; position: absolute; left: 50%; top: 100%; width: 24px; height: 7px; margin-left: -12px;
  background: var(--cream-2); border: 1px solid var(--line); border-top: 0;
  border-radius: 0 0 5px 5px;
}
.rite-water .drip {
  position: absolute; left: 50%; top: 8px; width: 8px; height: 13px; margin-left: -4px;
  opacity: 0; background: var(--drop); filter: blur(.5px);
  border-radius: 62% 62% 68% 68% / 44% 44% 100% 100%;
}
.rite-water .ring {
  position: absolute; left: 50%; top: 52px; width: 14px; height: 6px; margin: -3px 0 0 -7px;
  border: 1px solid var(--ripple); border-radius: 50%; opacity: 0;
}

/* III. The chrism: the sign of the cross, in the colour of the oil, drawn with the
      same two bars the boys' names are signed with at the top of the page. */
.rite-chrism .bar {
  position: absolute; border-radius: 2px;
  background: linear-gradient(180deg, var(--flame-core), var(--flame-rim));
  box-shadow: 0 0 10px color-mix(in srgb, var(--flame-rim) 45%, transparent);
}
.rite-chrism .v { left: 50%; top: 12px; width: 4px; height: 52px; margin-left: -2px; transform-origin: 50% 0; }
.rite-chrism .h { left: 50%; top: 29px; width: 30px; height: 4px; margin-left: -15px; transform-origin: 0 50%; }
.rite-chrism .glow {
  position: absolute; left: 50%; top: 38px; width: 62px; height: 62px; margin: -31px 0 0 -31px;
  border-radius: 50%; opacity: 0; pointer-events: none; filter: blur(6px);
  background: radial-gradient(circle, color-mix(in srgb, var(--flame-core) 46%, transparent), transparent 68%);
}

/* IV. The light, and the candle it is lit from -- the same candle the closing band
      rows of, standing in its own pool of glow. */
.rite-light .candle { position: absolute; left: 50%; bottom: 9px; margin-left: -7px; }
.rite-light .candle::after { width: 96px; height: 96px; margin-left: -48px; }

@keyframes ritepour {
  0%   { opacity: 0;   transform: translateY(-10px) scale(.82); }
  18%  { opacity: .95; }
  70%  { opacity: .9;  transform: translateY(30px) scale(.94, 1.2); }
  86%  { opacity: 0;   transform: translateY(36px) scale(1.6, .3); }
  100% { opacity: 0;   transform: translateY(36px) scale(1.6, .3); }
}
@keyframes ritering {
  0%   { opacity: 0;   transform: scale(.4); }
  16%  { opacity: .85; }
  100% { opacity: 0;   transform: scale(3.6); }
}
/* The bloom the chrism leaves as it is seen, handing over to `glowpulse` -- the
   pulse the candles already breathe -- once it has settled. */
@keyframes riteglow {
  0%   { opacity: 0; }
  28%  { opacity: .85; }
  100% { opacity: .55; }
}

@media (prefers-reduced-motion: no-preference) {
  html.js .rite-item.in .bell { animation: bell 3.6s ease-in-out calc(var(--t) + .1s) 1; }
  html.js .rite-item.in .ring { animation: ritering 2.6s ease-out calc(var(--t) + .35s) 2; }
  /* The variant is the item itself, not something inside it, hence the compound
     selector -- a space here would ask for a .rite-name sitting inside the row and
     would match nothing at all. */
  html.js .rite-item.in.rite-name .ring + .ring { animation-delay: calc(var(--t) + 1.15s); }
  /* Three pours, because there are three boys, and the ring opens on each landing:
     the ring's delay is the drip's delay plus the second its own drop reaches the
     water, so the two never drift apart over the three beats. */
  html.js .rite-item.in .drip { animation: ritepour 1.9s cubic-bezier(.4,.05,.6,.9) calc(var(--t) + .25s) 3; }
  html.js .rite-item.in.rite-water .ring { animation: ritering 1.9s ease-out calc(var(--t) + 1.9s) 3; }
  html.js .rite-item.in.rite-chrism .v { animation: chrismdown .5s cubic-bezier(.3,.75,.3,1) calc(var(--t) + .2s) both; }
  html.js .rite-item.in.rite-chrism .h { animation: chrisside  .4s cubic-bezier(.3,.75,.3,1) calc(var(--t) + .68s) both; }
  html.js .rite-item.in.rite-chrism .glow {
    animation: riteglow 1.6s ease-out calc(var(--t) + 1s) both,
               glowpulse 6s ease-in-out calc(var(--t) + 2.6s) infinite;
  }
  /* The candle holds still until its turn comes rather than catching light while
     nobody is looking: `none` here is out-specifying the global kindling rule on
     .candle .flame for these four flames only. */
  html.js .rite-item .candle .flame { animation: none; }
  html.js .rite-item.in .candle .flame {
    animation: kindle 1.1s cubic-bezier(.2,.8,.25,1) calc(var(--t) + .2s) both,
               flame 3.4s ease-in-out calc(var(--t) + 1.3s) infinite;
  }
  html.js .rite-item.in .candle::after {
    animation: glowpulse 6s ease-in-out calc(var(--t) + .8s) both;
  }
  /* The strip comes in left to right rather than as a wall. */
  html.js .rite-item { transition-delay: calc(var(--j, 0) * .12s); }

  /* The same courtesy to the procession in the closing band: five candles are lit
     one from another over two seconds, and that is worth arriving for. Without the
     `in` class they would have been burning long before the band was scrolled to. */
  html.js .candles .flame, html.js .candles .candle::after { animation: none; }
  html.js .reveal.in .candles .flame {
    animation: kindle 1.1s var(--lit, 0s) cubic-bezier(.2,.8,.25,1) both,
               flame 3.4s calc(var(--lit, 0s) + 1.1s) ease-in-out infinite;
  }
  html.js .reveal.in .candles .candle::after {
    animation: glowpulse 6s calc(var(--lit, 0s) + .6s) ease-in-out infinite;
  }
}

/* ------------------------------------------------------------- seat water */

/* The hall, said as a font filling up. --pct is how far the level has gone towards
   the brim, it is poured up the moment the strip is reached, and the surface keeps
   moving afterwards so even a full bar reads as water rather than as paint. The two
   sentences above it carry the actual count, so nothing here is the only way to
   learn anything -- which is also why the bar itself is aria-hidden. */
.seat-water { margin-top: clamp(1.5rem, 1rem + 2vw, 2.4rem); }
.sw-top {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between;
  gap: .25rem 1.2rem; margin-bottom: .65rem;
}
.sw-line { margin: 0; font-size: .95rem; font-weight: 600; }
.sw-note { margin: 0; font-family: var(--serif); font-style: italic; font-size: .88rem; color: var(--muted); }
.sw-track {
  position: relative; height: 10px; border-radius: 999px; overflow: hidden;
  background: var(--cream-2); border: 1px solid var(--line);
}
.sw-track i {
  position: relative; display: block; height: 100%; width: calc(var(--pct, 0) * 1%);
  border-radius: 999px;
  background: linear-gradient(90deg, var(--green), var(--blue) 58%, var(--navy));
}
.sw-track i::after {
  content: ""; position: absolute; inset: 0; border-radius: 999px;
  background: linear-gradient(100deg, transparent 32%, rgba(255,255,255,.6) 50%, transparent 68%);
  background-size: 260% 100%; background-repeat: no-repeat;
}
/* The empty bar is only ever declared once the script has promised to fill it, so a
   blocked or missing site.js still prints the level where the count puts it. */
html.js .sw-track i { width: 0; }
html.js .seat-water.in .sw-track i { width: calc(var(--pct, 0) * 1%); }
@media (prefers-reduced-motion: no-preference) {
  html.js .sw-track i { transition: width 1.5s cubic-bezier(.2,.8,.25,1) .3s; }
  .sw-track i::after { animation: sheen 7s linear infinite; }
}

/* ------------------------------------------------- the cross, signed first */

/* A child is marked with the cross before anything else happens, so the closing
   band opens with one and draws it the way a thumb does: down the middle, then
   across. Same two keyframes the three names are signed with at the top of the
   page, so the page begins and ends with the same gesture. */
.band-mark {
  position: relative; display: block; width: 20px; height: 32px; margin: 0 auto 1.5rem;
}
.band-mark i {
  position: absolute; border-radius: 2px; background: var(--navy);
  box-shadow: 0 0 12px color-mix(in srgb, var(--navy) 45%, transparent);
}
.band-mark .v { left: 50%; top: 0; width: 3px; height: 100%; margin-left: -1.5px; transform-origin: 50% 0; }
.band-mark .h { left: 50%; top: 11px; width: 15px; height: 3px; margin-left: -7.5px; transform-origin: 0 50%; }
.band-mark::after {
  content: ""; position: absolute; inset: -16px -20px; border-radius: 50%;
  opacity: 0; pointer-events: none; filter: blur(6px);
  background: radial-gradient(circle, color-mix(in srgb, var(--blue) 28%, transparent), transparent 68%);
}
@media (prefers-reduced-motion: no-preference) {
  html.js .reveal.in .band-mark .v { animation: chrismdown .55s cubic-bezier(.3,.75,.3,1) .15s both; }
  html.js .reveal.in .band-mark .h { animation: chrisside  .42s cubic-bezier(.3,.75,.3,1) .68s both; }
  html.js .reveal.in .band-mark::after {
    animation: riteglow 1.8s ease-out 1s both, glowpulse 6s ease-in-out 2.8s infinite;
  }
}

/* ----------------------------------------------------- the verse, word by word */

/* Read aloud, a verse arrives one word at a time, and this is the one place on the
   page where the words themselves are the ornament. --j is a word's place in the
   sentence -- the citation counts as the last word -- and is spent on a
   transition-delay, so the sentence assembles itself with no script of its own.
   Transitions rather than animations, because the verse sits below the fold and has
   to wait until you reach it, which is exactly what the `in` class is for. */
.home-verse {
  font-family: var(--serif); font-style: italic; color: var(--ink-soft);
  font-size: clamp(1.15rem, 1rem + .9vw, 1.55rem); line-height: 1.5; text-align: center;
  max-width: 46ch; margin: clamp(2.6rem, 2rem + 3vw, 4.4rem) auto 0;
  padding-top: 1.8rem; border-top: 1px solid var(--line);
}
.home-verse .w { display: inline-block; }
.home-verse .vref {
  display: block; margin-top: .9rem; font-style: normal; font-family: var(--sans);
  font-size: .72rem; font-weight: 600; letter-spacing: .2em; text-transform: uppercase;
  color: var(--muted);
}
html.js .home-verse .w, html.js .home-verse .vref {
  opacity: 0; transform: translateY(8px);
  transition: opacity .55s ease, transform .55s cubic-bezier(.22,.72,.24,1);
  transition-delay: calc(.15s + var(--j, 0) * 62ms);
}
html.js .home-verse.in .w, html.js .home-verse.in .vref { opacity: 1; transform: none; }

/* ------------------------------------------------------------- live seating */

/* The hall, drawn. Each table below is one radio, so this whole component works
   with no script at all: the counts under each table were taken from the
   database while the page was being built. JavaScript only keeps those counts
   fresh while a family is deciding, and opens the second table when one is
   short.
   The drawing has two numbers in it: --n, the chairs at a table, which
   register.php writes from config, and --r, the radius those chairs sit on.
   Everything else is arithmetic, so a round table of eight or a phone-sized
   table is a number, not a new stylesheet. */
.tables .table-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
  gap: .7rem;
  margin-top: .9rem;
}
.table-pick {
  position: relative;
  display: flex; flex-direction: column; align-items: center; gap: .35rem;
  padding: .85rem .55rem .7rem;
  background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  cursor: pointer;
  transition: border-color .18s ease, background .18s ease, transform .18s ease, box-shadow .18s ease;
}
.table-pick:hover { transform: translateY(-2px); border-color: var(--navy); }
/* The radio is the control and the card is its picture. Hiding it without
   display:none keeps it in the tab order; the focus ring is then drawn on the
   disc beside it, which needs no :has() and so works on every browser this
   family will open the page on. */
.table-pick input[type=radio] {
  appearance: none; -webkit-appearance: none;
  width: 0; height: 0; margin: 0; padding: 0; border: 0; opacity: 0;
}
.table-pick input[type=radio]:focus-visible { outline: none; }
.table-pick input[type=radio]:focus-visible + .top {
  box-shadow: 0 0 0 2px var(--paper), 0 0 0 4px var(--navy);
}
/* Full is full: the radio is disabled by the server, and the card says so. */
.table-pick.is-gone { cursor: not-allowed; opacity: .48; }
.table-pick.is-gone:hover { transform: none; border-color: var(--line); }
/* ...and it must not go on looking chosen. Either way a full table can still
   carry :checked -- the poll finds it too late for a pick already made, or the
   page comes back from the server with the rejected choice still named -- and a
   disabled radio is never submitted, so the honest picture is an unselected
   table sitting under the line that asks for another one. */
.table-pick.is-gone input:checked + .top {
  border-color: var(--line);
  box-shadow: none;
}

.table-pick .top {
  --r: 38px;
  position: relative; width: 64px; height: 64px; border-radius: 50%;
  background: radial-gradient(circle at 34% 28%, var(--cream-2), var(--surface) 74%);
  border: 1px solid var(--line);
  transition: box-shadow .22s ease, border-color .22s ease;
}
/* The bare top itself, inside the ring of chairs, so the chairs read as
   separate pieces of furniture and not as a doughnut. */
.table-pick .top::before {
  content: ""; position: absolute; inset: 17%; border-radius: 50%;
  background: color-mix(in srgb, var(--cream) 72%, transparent);
  border: 1px solid var(--line-soft);
}
.table-pick .chair {
  position: absolute; top: 50%; left: 50%;
  width: 8px; height: 8px; margin: -4px 0 0 -4px; border-radius: 50%;
  border: 1px solid var(--seat-open);
  background: transparent;
  transform: rotate(calc(var(--i) * (360deg / var(--n, 10)))) translateY(calc(var(--r) * -1));
  transition: transform .18s ease, background .18s ease, border-color .18s ease;
}
.table-pick .chair.is-taken {
  background: var(--seat-taken); border-color: var(--seat-taken);
}
/* A table too small for the whole family is still offered -- the plan underneath
   simply says which two tables the ushers will seat you at. Dashed, so the
   difference is visible before anybody reads a word. */
.table-pick.is-tight .top { border-style: dashed; }

.table-pick .t-label { font-size: .86rem; letter-spacing: -.01em; }
.table-pick .t-free { font-size: .72rem; color: var(--muted); }
.table-pick input:checked ~ .t-label { color: var(--ink); }
.table-pick input:checked + .top {
  border-color: var(--seat-open);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--seat-open) 42%, transparent),
              0 0 26px -6px var(--glow);
}
.table-pick .top::after {
  /* the one ripple that leaves the table when it is chosen */
  content: ""; position: absolute; inset: -2px; border-radius: 50%;
  border: 2px solid var(--seat-open); opacity: 0; pointer-events: none;
}

.table-plan {
  display: flex; align-items: center;
  margin: .9rem 0 0; padding: .55rem .8rem; min-height: 2.5rem;
  font-size: .88rem; color: var(--ink-soft);
  background: var(--cream);
  border-left: 2px solid var(--seat-open);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.table-plan.is-err { border-left-color: var(--danger); color: var(--err-ink); }
.table-second { margin: 1rem 0 0; }
/* With script the second table only appears when one is not enough. Without it
   the field simply stays where a guest can find it and fill it in by hand.
   The flag is data-needs-second because data-split already carries a sentence. */
.js .table-second { display: none; }
.js .tables[data-needs-second] .table-second { display: block; }

/* Chairs are put out before the guests arrive: an open one slides down onto the
   ring, an occupied one has already been sat in. `backwards` fill so a chair
   waiting out its delay is invisible rather than parked in the middle of the
   table -- and so the animation lets go of `transform` when it ends, leaving
   the hover lift below free to move the same chair. */
@keyframes seatin {
  from { opacity: 0; transform: rotate(calc(var(--i) * (360deg / var(--n, 10)))) translateY(calc(var(--r) * -1.9)) scale(.35); }
  to   { opacity: 1; transform: rotate(calc(var(--i) * (360deg / var(--n, 10)))) translateY(calc(var(--r) * -1)) scale(1); }
}
@keyframes sitdown {
  0%   { opacity: .2; transform: rotate(calc(var(--i) * (360deg / var(--n, 10)))) translateY(calc(var(--r) * -1.7)) scale(.5); }
  62%  { opacity: 1;  transform: rotate(calc(var(--i) * (360deg / var(--n, 10)))) translateY(calc(var(--r) * -.92)) scale(1.14); }
  100% { opacity: 1;  transform: rotate(calc(var(--i) * (360deg / var(--n, 10)))) translateY(calc(var(--r) * -1)) scale(1); }
}
@keyframes pickring {
  from { opacity: .55; transform: scale(.72); }
  to   { opacity: 0;   transform: scale(1.5); }
}
/* The free chairs at the table you picked breathe once every few seconds: this
   one still has room. Only that table animates, so the hall never costs a
   hundred moving elements. */
@keyframes invite {
  0%, 100% { transform: rotate(calc(var(--i) * (360deg / var(--n, 10)))) translateY(calc(var(--r) * -1)); }
  50%      { transform: rotate(calc(var(--i) * (360deg / var(--n, 10)))) translateY(calc(var(--r) * -1.14)); }
}
/* The hall being laid, one table at a time. --k is the table's own number,
   written by the page, so the rows are set in the order an usher would walk
   them rather than in an order a stylesheet picked. */
@keyframes tablein {
  from { opacity: 0; transform: translateY(10px) scale(.96); }
  to   { opacity: 1; transform: none; }
}
/* The sentence under the hall rewrites itself as the family changes its mind.
   One soft settle each time, so it never looks like the page is reloading. */
@keyframes plansettle {
  from { transform: translateY(-3px); background: var(--cream-2); }
  to   { transform: none; background: var(--cream); }
}
/* The dot beside the table on a card: twice, then it leaves the paper alone. */
@keyframes seatpulse {
  0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--seat-open) 55%, transparent); }
  55%      { box-shadow: 0 0 0 7px transparent; }
}

@media (prefers-reduced-motion: no-preference) {
  .table-pick { animation: tablein .45s calc(var(--k, 0) * 45ms) cubic-bezier(.2,.8,.25,1) backwards; }
  .table-pick .chair { animation: seatin .5s calc(var(--k, 0) * 45ms + var(--i) * 42ms) cubic-bezier(.2,.8,.25,1) backwards; }
  .table-pick .chair.is-taken { animation: sitdown .55s calc(var(--k, 0) * 45ms) cubic-bezier(.2,.8,.25,1) backwards; }
  .table-pick input:checked + .top::after { animation: pickring .7s cubic-bezier(.2,.8,.25,1) both; }
  /* A table that filled up under an existing pick does not get to ripple as
     though it had just been chosen; all it has left to say is that there is no
     room. Longer selector than the rule above, so it overrules it. */
  .table-pick.is-gone input:checked + .top::after { animation: none; }
  .table-pick input:checked + .top .chair:not(.is-taken) {
    animation: invite 3.2s calc(var(--i) * .1s) ease-in-out infinite;
  }
  /* An open chair at the table you are hovering leans out towards you. */
  .table-pick:hover .chair:not(.is-taken) {
    transform: rotate(calc(var(--i) * (360deg / var(--n, 10)))) translateY(calc(var(--r) * -1.16));
  }
  /* The organiser's hall is read, not chosen, so its chairs stay put: the tiles
     are still laid out in order, but nothing on the wall moves when a mouse
     passes. A longer selector than the rule above, so it wins. */
  .table-pick.is-static:hover .chair:not(.is-taken) {
    transform: rotate(calc(var(--i) * (360deg / var(--n, 10)))) translateY(calc(var(--r) * -1));
  }
  .table-plan.is-new { animation: plansettle .45s ease-out 1; }
  .seat-here::before { animation: seatpulse 2.6s ease-out 2; }
}

@media (prefers-reduced-motion: reduce) {
  .table-pick:hover { transform: none; }
  .table-pick:hover .chair:not(.is-taken) { transform: rotate(calc(var(--i) * (360deg / var(--n, 10)))) translateY(calc(var(--r) * -1)); }
}

@media (max-width: 520px) {
  .tables .table-grid { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: .55rem; }
  .table-pick .top { --r: 33px; width: 56px; height: 56px; }
}

/* The hall as the organisers see it: the same drawn table, but a reading tile
   rather than a control -- no radio, no hover lift, and a list of the families
   sitting there underneath. */
.table-pick.is-static { cursor: default; align-items: stretch; text-align: left; padding: .8rem .85rem; }
.table-pick.is-static:hover { transform: none; border-color: var(--line); }
.table-pick.is-static .top { margin-inline: auto; }
.table-pick.is-static .t-label, .table-pick.is-static .t-free { text-align: center; }
.hall-grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.hall-names { list-style: none; margin: .5rem 0 0; padding: .5rem 0 0; border-top: 1px solid var(--line-soft);
  display: flex; flex-direction: column; gap: .2rem; font-size: .78rem; }
.hall-names li { display: flex; justify-content: space-between; gap: .5rem; }
.hall-names a { color: var(--navy); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hall-names a:hover { text-decoration: underline; }
@media (max-width: 520px) { .hall-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); } }

/* Families counted but not yet seated, one row per family with its two selects. */
.seat-row { display: flex; flex-wrap: wrap; align-items: center; gap: .55rem .7rem;
  padding: .65rem 0; border-bottom: 1px solid var(--line-soft); }
.seat-row:last-child { border-bottom: 0; }
.seat-who { flex: 1 1 190px; min-width: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: .5rem; }
.seat-row select { flex: 0 1 170px; }

/* Where the family is going, said plainly on the card and the lookup page. */
.seat-here { color: var(--ink); font-weight: 650; }
.seat-here::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: .5rem;
  border-radius: 50%; background: var(--seat-open); vertical-align: .05em; }
.seated { margin: .9rem 0 0; padding: .6rem .85rem; background: var(--cream);
  border-left: 2px solid var(--seat-open); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }

/* ------------------------------------------------------------- side drawer */

/* One reusable panel that slides in from the right. Its chrome lives in
   partials/footer.php and stays empty until site.js fetches a form page and
   drops that page's <main> in here; the trigger is any link carrying
   data-drawer. With JavaScript off those same links are ordinary navigations,
   so the drawer is polish, never a dependency. */
.drawer-backdrop {
  position: fixed; inset: 0; z-index: 120;
  /* A modal still needs the page put behind it, and this is the one place in
     the site that is deliberately darker than its surroundings: it dims the
     page, never a photograph. */
  background: rgba(22,34,47,.45);
  opacity: 0; pointer-events: none;
  transition: opacity .28s ease;
}
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 121;
  width: min(560px, 100%);
  display: flex; flex-direction: column;
  background: var(--paper);
  border-left: 1px solid var(--line);
  box-shadow: -24px 0 60px -20px rgba(22,34,47,.32);
  transform: translateX(100%);
  /* visibility, not display, so the slide can animate both in and out. */
  visibility: hidden;
  transition: transform .34s cubic-bezier(.2,.8,.25,1), visibility 0s linear .34s;
}
/* The open state is a class on <html>, so panel, backdrop and body scroll all
   move from the one place and there is no inline style to unwind on close. */
html.drawer-open .drawer-backdrop { opacity: 1; pointer-events: auto; }
html.drawer-open .drawer { transform: none; visibility: visible; transition-delay: 0s; }
html.drawer-open { overflow: hidden; }

.drawer-head {
  flex: none; display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding: 1.1rem var(--gutter);
  background: var(--surface); border-bottom: 1px solid var(--line);
}
.drawer-title { margin: 0; font-size: 1.15rem; letter-spacing: -.02em; }
.drawer-close {
  flex: none; width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center;
  border: 1px solid var(--line); background: var(--cream); color: var(--ink);
  font-size: 1.4rem; line-height: 1; cursor: pointer;
  transition: background .2s ease, border-color .2s ease, transform .2s ease;
}
.drawer-close:hover { background: var(--cream-2); border-color: var(--navy); transform: rotate(90deg); }

.drawer-body {
  flex: 1; overflow-y: auto; overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
/* The fetched page keeps its own band rhythm; in a narrow panel that much
   vertical air just wastes height, so the bands are flattened and the single
   column stops pretending it needs a 720px measure. */
.drawer-body .section, .drawer-body .section-tight { padding-block: 1.4rem clamp(2rem, 1.5rem + 3vw, 3rem); }
.drawer-body > .section:first-child, .drawer-body > .section-tight:first-child { padding-top: clamp(1.4rem, 1rem + 2vw, 2.2rem); }
.drawer-body .shell.narrow { max-width: none; }
/* Defensive: site.js drops the photo hero band before injecting, but if an
   older script leaves it in, it must never show its full-bleed picture here. */
.drawer-body .hero { display: none !important; }

/* The line shown while the fetch is in flight -- a spinning ring, nothing else. */
.drawer-loading {
  display: flex; align-items: center; justify-content: center; gap: .7rem;
  min-height: 40vh; margin: 0; color: var(--muted); font-size: .9rem;
}
.drawer-loading::before {
  content: ""; width: 16px; height: 16px; border-radius: 50%; flex: none;
  border: 2px solid var(--line); border-top-color: var(--blue);
  animation: drawer-spin .7s linear infinite;
}
@keyframes drawer-spin { to { transform: rotate(360deg); } }

/* Nobody who asked for calm pages gets the slide or the spinning loader; the
   panel simply appears, and the close chequer loses its turn. */
@media (prefers-reduced-motion: reduce) {
  .drawer-backdrop, .drawer { transition: none; }
  .drawer-close:hover { transform: none; }
  .drawer-loading::before { animation: none; }
}

/* ------------------------------------------------------------------ touch */

/* A thumb is not a cursor, and the site was measured with one: the nav links
   came out 39px, the footer row and the language pill under 30px, the wizard's
   step dots 27px. Asked for only where there is no fine pointer to aim with, so
   an organiser on a laptop keeps the dense rows they already work in. */
@media (hover: none), (pointer: coarse) {
  .nav-links > a:not(.btn) { min-height: 46px; }
  .footer .row a { display: inline-flex; align-items: center; min-height: 44px; }
  .lang-toggle a { padding: .5rem .9rem; }
  .tag { display: inline-flex; align-items: center; min-height: 40px; }
  .wz-dot { width: 36px; height: 36px; font-size: .82rem; }
  .drawer-close { width: 44px; height: 44px; }
}

/* ----------------------------------------------------------------- print */

/* Paper is a light artefact and so is the screen now, which means the sheet
   has a shorter list to be told: take the shadows off, take every wash out,
   and set the words in plain ink. What still has to be re-declared here is
   anything translucent -- a printer lays a 45% navy as a fog over the whole
   sheet and a pale blue as nothing at all. */
@media print {
  :root {
    color-scheme: light;
    --paper: #fff; --surface: #fff; --cream: #fff; --cream-2: #fff; --deep: #fff;
    --field: #fff;
    --chip: #fff; --chip-line: #b3b3b3; --chip-ink: #000; --chip-soft: #1a1a1a;
    --ink: #000; --ink-soft: #1a1a1a; --muted: #4a4a4a;
    --line: #b3b3b3; --line-soft: #ddd; --glass: #fff;
    --shadow: none; --shadow-sm: none;
    --ok-bg: #fff; --ok-line:   #b3b3b3; --ok-ink:   #14532d;
    --err-bg: #fff; --err-line: #b3b3b3; --err-ink:  #000;
    --info-bg: #fff; --info-line: #b3b3b3; --info-ink: #000;
    --green: #1f4d36; --navy: #1c3a6b; --blue: #2f6ba8; --danger: #a3282a; --ok: #1f6b45;
    --on-ink: #fff; --btn-hover: #000; --placeholder: #a8b0ba;
    --warn-bg: #fff; --warn-ink: #6b4a10; --grey-bg: #f2f2f2; --danger-btn-line: #b3b3b3;
    --halo: none;
    --drop: transparent; --ripple: transparent;
    --shaft-1: transparent; --shaft-2: transparent; --shaft-3: transparent;
    --smoke: transparent; --glow: transparent;
    /* Two chairs on paper have to be told apart by ink alone: an open one is an
       outline, a taken one is filled. Green would print as a mid grey. */
    --seat-open: #1f6b45; --seat-taken: #555f68;
  }
  .nav, .footer, .skip, .no-print, .btn, .lang-toggle,
  .flash-stack, .dropzone, .draft-note, .shot::before,
  .wz-head, .wz-nav, .wz-alt, .wz-review { display: none !important; }
  /* Paper never needs a photograph behind the words, or water on it. Nothing on
     paper should be caught mid-flight either: a sheet printed one second after
     loading would otherwise carry half-faded words. */
  *, *::before, *::after { animation: none !important; }
  .hero::before { display: none; }
  .hero { background: #fff; }
  .hero::after, .candles, .dove { display: none !important; }
  /* The four moments are worth reading on paper; the drawings they hang from are
     gradients and a glow, and none of them survive a printer that has no colour.
     The seat bar is the same story -- the sentence above it is the count. */
  .rite-icon, .band-mark, .sw-track, .sw-note { display: none !important; }
  .rite-item { text-align: left; }
  .rite-item::before { margin-bottom: .3rem; }
  .home-verse .w, .home-verse .vref { opacity: 1 !important; transform: none !important; transition: none !important; }
  .home-verse { border-top-color: #b3b3b3; }
  .band-deep::before, .band-deep::after { display: none !important; }
  .drops, .ripples { display: none !important; }
  /* A caption plate is see-through on screen; on paper it would sit over the
     photograph as a milky band. */
  .shot figcaption { background: #fff; border-top: 1px solid #b3b3b3; }
  /* The rite in miniature on the three names is a screen thing. On paper they
     are plain ink, and a colour clipped into the letters has to be put back as
     a fill first -- transparent text with no background to show through it
     prints as three silences where the boys should be. The dots keep the
     cloth colour they were picked from, pressed a little towards ink so a
     pale blue survives a laser printer. */
  .hero-names .word {
    color: var(--ink); background-image: none;
    -webkit-background-clip: border-box; background-clip: border-box;
  }
  .hero-names .nm::before, .hero-names .nm::after, .hero-names .word::after,
  .hero-names .chrism, .hero-names .chrism::before, .hero-names .chrism::after,
  .hero-names .dot::after { display: none !important; }
  .hero-names .dot {
    background: var(--acc, var(--blue));
    background: color-mix(in srgb, var(--acc, var(--blue)) 78%, #000);
  }
  /* The drawer is an on-screen convenience; a card printed from it should come
     out as the plain page, so the panel and its veil never reach the sheet. */
  .drawer, .drawer-backdrop { display: none !important; }
  body { background: #fff; font-size: 11pt; line-height: 1.45; }
  .shell { max-width: none; padding: 0; }
  .section, .section-tight { padding: 0; }
  .card, .card-flat, .stat, .table-wrap { border-color: #b3b3b3; }
  /* A sheet is read once, from the top, so a stepped form unfolds: every question
     in its place, and none of the rail, dots or buttons that only exist to move
     between them. */
  .wstep[hidden] { display: grid; }
  .table-pick, .table-plan { border-color: #b3b3b3; background: #fff; }
  .table-pick .top::before { border-color: #ccc; }
  .ticket { box-shadow: none; border: 1px solid #999; break-inside: avoid; }
  .party-list li, .roster-row, .fact, .stat { break-inside: avoid; }
  /* A section still waiting for its fade-in must print as solid ink. */
  .reveal { opacity: 1 !important; transform: none !important; }
  .qr-frame { border-color: #999; }
  p, li { orphans: 2; widows: 2; }
  /* The card is not a hyperlink, so no printed URLs after the words. */
  a { text-decoration: none; }
  a[href]::after { content: ""; }
}

@page { size: A6 landscape; margin: 8mm; }
