/*
 * memorials directives — full text in DIRECTIVES.md
 * 1. SSOT — Extend the one that exists. Never a second copy that can disagree.
 * 2. Caveman comments — Shortest technical line that lands. Why, not what.
 * 3. No post-mortems — Code says what is, never what it used to be. Git keeps the history.
 * end directives
 */
/* The public site. Loads after base.css.
 *
 * Nothing here is per-tenant: brand_vars() re-declares the overridden custom
 * properties inline on <body>, so one file serves every newsroom.
 *
 * Class names match design/, so a section can be diffed against it rather than
 * re-derived.
 */

/* ---------- components ---------- */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--pad); }
.eyebrow {
  font-family: var(--font-mono); font-size: 11px; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase; color: var(--color-muted-2);
}
.rule { height: 1px; background: var(--color-rule); }

/* ---------- sticky bars ---------- */
/* The bar from design/obituary-index.html, on every public page. Translucent
   over the paper it pins above. */
.masthead {
  position: sticky; top: var(--bar-top); z-index: 20;
  background: rgba(242, 239, 232, .94); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-rule);
}
.masthead__in {
  padding: 15px 44px;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.masthead__left { display: flex; align-items: center; gap: 14px; flex: none; min-width: 0; }
.wordmark {
  height: 26px; display: flex; align-items: center; white-space: nowrap;
  font-family: var(--font-serif); font-size: 19px; color: var(--color-ink);
}
.wordmark img { height: 26px; width: auto; }
.divider { width: 1px; height: 16px; background: #d9d2c4; }
.section-label {
  font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--color-muted);
  white-space: nowrap; text-decoration: none;
}
/* The section you are not in, so a reader can cross between the two. Quieter
   than the one they are reading, and only drawn where both are sold. */
.section-label--other { color: var(--color-muted-2); }
.section-label--other:hover { color: var(--color-accent); }

/* The pets section, on the outlet's own palette. A different warmth, not a
   different design: the same newsroom publishes both. */
[data-kind="pet"] .lede__name { font-style: italic; }
[data-kind="pet"] .section-label { color: var(--color-accent); }
.masthead__links {
  display: flex; align-items: center; gap: 12px; font-size: 14px; color: var(--color-muted-2);
}
/* The outlet's own links and the action, all the same outlined button. */
.masthead__links a {
  padding: 11px 20px; border-radius: 8px; border: 1px solid var(--color-rule-2);
  color: var(--color-ink); white-space: nowrap;
}
/* Search sits centered between the wordmark and the links; both ends are
   `flex: none` so the bar's spare width lands on the form alone. */
.masthead__search { flex: 1; display: flex; justify-content: center; min-width: 0; }
.masthead__search .input {
  width: 100%; max-width: 560px; padding: 12px 18px; font-size: 15px; border-radius: 8px;
}
.masthead__links { flex: none; }

/* ---------- buttons ---------- */
/* base.css draws the button and carries this scale as its default. Only the
   outline the public pages use is theirs alone. */
.btn--outline-accent { border-color: var(--color-accent-rule); color: var(--color-accent-ink); }

/* ---------- hero ---------- */
.hero {
  display: flex; flex-direction: column; align-items: center; gap: 28px;
  padding: 84px 0 64px; text-align: center;
}
.hero__head { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.hero__actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.hero__actions--start { justify-content: flex-start; }
.hero h1 {
  font-family: var(--font-serif); font-weight: 300; font-size: 78px;
  line-height: 1.03; letter-spacing: -.02em;
}
.dates {
  display: flex; align-items: center; justify-content: center; gap: 14px;
  font-size: 17px; color: var(--color-muted);
}
.dates span { width: 28px; height: 1px; background: #c8c1b4; }
.epitaph {
  max-width: 540px; font-family: var(--font-serif); font-style: italic;
  font-size: 22px; line-height: 1.5; color: var(--color-ink-3); text-wrap: pretty;
}

/* ---------- life + sidebar ---------- */
.life {
  display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 72px; padding: 72px 0;
}
.memorial { display: flex; flex-direction: column; gap: 22px; max-width: 660px; }
.memorial p {
  font-family: var(--font-serif); font-size: 19px; line-height: 1.75;
  color: var(--color-ink-2); text-wrap: pretty;
}
.memorial a { text-decoration: underline; text-underline-offset: 4px; }
.aside { display: flex; flex-direction: column; gap: 14px; }
.panel {
  background: var(--color-paper-alt); border-radius: 12px; padding: 26px 28px;
  display: flex; flex-direction: column; gap: 14px;
}
.panel--outline { background-color: transparent; border: 1px solid var(--color-rule); gap: 10px; }
.panel__body { font-size: 14px; line-height: 1.65; color: var(--color-muted); }
.panel__link { font-size: 14px; color: var(--color-accent-ink); }
/* ---------- sections and the shared form ---------- */
.section { padding: 0 0 72px; display: flex; flex-direction: column; gap: 20px; }
.section__head { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; }
.section__link { font-size: 14px; color: var(--color-muted); }
.form {
  background: var(--color-paper-alt); border-radius: 12px; padding: 30px 32px;
  display: flex; flex-direction: column; gap: 16px;
}
.form h3 { font-family: var(--font-serif); font-size: 24px; font-weight: 400; }
.form__intro { display: flex; flex-direction: column; gap: 7px; }
.form__note { font-size: 14px; line-height: 1.6; color: var(--color-muted); }
.form input, .form textarea, .input {
  font-size: 15px; padding: 14px 18px; border-radius: 12px;
  border: 1px solid var(--color-rule-2); background: #fff; color: var(--color-ink); outline: none;
  /* Not inherited: 1.5 makes every field 3px taller than the design. */
  line-height: normal;
}
.form textarea, textarea.input { line-height: 1.55; resize: vertical; }
.form__fine { font-size: 12px; line-height: 1.5; color: var(--color-muted-2); }
.error { font-size: 14px; color: var(--color-danger); }
.error:empty { display: none; }

/* ---------- other notices ---------- */
.notices { border-top: 1px solid var(--color-rule); background: var(--color-paper-alt); }
.notices__in {
  max-width: var(--maxw); margin: 0 auto; padding: 56px var(--pad);
  display: flex; flex-direction: column; gap: 24px;
}
.notice-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.notice {
  background: var(--color-paper); border-radius: 12px; padding: 22px 24px;
  display: flex; gap: 16px; align-items: center;
}
.notice__thumb {
  width: 56px; height: 56px; flex: none; border-radius: 8px; overflow: hidden;
  --ph-step: 8px;
}
.notice__thumb img { width: 100%; height: 100%; object-fit: cover; }
.notice__name { font-family: var(--font-serif); font-size: 20px; display: block; }
.notice__meta { font-size: 13px; color: var(--color-muted-2); }

/* ---------- footer ---------- */
/* Short pages still put the footer at the viewport bottom. */
.site { min-height: 100svh; display: flex; flex-direction: column; }
.site > main { flex: 1; }
.footer { background: var(--color-ink); color: var(--color-paper); }
.footer__in {
  max-width: var(--maxw); margin: 0 auto; padding: 48px var(--pad);
  display: flex; flex-wrap: wrap; gap: 32px; align-items: center; justify-content: space-between;
}
.footer__brand { font-family: var(--font-serif); font-size: 24px; }
.footer__sub { font-size: 13px; color: #a8a29a; }
.footer__links { display: flex; flex-wrap: wrap; gap: 28px; font-size: 14px; }
.footer__links a { color: #c9c4bc; }

/* ---------- our own pages: index, submit, staff ---------- */
.page-head { display: flex; flex-direction: column; align-items: flex-start; gap: 20px; padding: 84px 0 44px; }
.page-head h1 {
  font-family: var(--font-serif); font-weight: 300; font-size: 78px;
  line-height: 1.03; letter-spacing: -.02em;
}
.page-head p { max-width: 540px; font-family: var(--font-serif); font-size: 22px; line-height: 1.5; color: var(--color-ink-3); text-wrap: pretty; }
.field { display: flex; flex-direction: column; gap: 8px; font-size: 14px; color: var(--color-muted); }
.field .input { width: 100%; }

/* ---------- responsive (the mockup's own breakpoints) ---------- */
@media (max-width: 1000px) {
  .life { grid-template-columns: 1fr; gap: 40px; }
  .notice-list { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  :root { --pad: 22px; }
  .masthead__in { padding: 12px 20px; }
  /* Wordmark and the action; the section word is the page's own headline. */
  .divider, .section-label { display: none; }
  /* No room for a third thing between wordmark and the action on a phone. */
  .masthead__search { display: none; }
  /* The outlet's own nav gives way to the one link that makes money. */
  .masthead__links a:not(.masthead__cta) { display: none; }
  /* A notice's bar on a phone carries the wordmark and Share, nothing else;
     the footer still leads to placing a notice. */
  .site--notice .masthead__links a.masthead__cta { display: none; }
  .hero, .page-head { padding: 52px 0 44px; }
  .hero h1, .page-head h1 { font-size: 44px; }
  .epitaph, .page-head p { font-size: 19px; }
  .notice-list { grid-template-columns: 1fr; }
  .btn { width: 100%; }
  .hero__actions { width: 100%; }
}
@media print {
  .masthead, .namebar, .sticky-name, .note-form, .notices, .btn { display: none; }
  body { background: #fff; }
  .portrait-col { position: static; }
  .giving { background: var(--color-paper-alt); }
}

/* ---------- index ---------- */
/* Class names match design/obituary-index.html: a sticky rail that scrolls on
   its own, a feed beside it. */
.search { display: flex; flex-wrap: wrap; gap: 12px; width: 100%; max-width: 540px; }
.search .input { flex: 1; min-width: 220px; }
.underline { text-decoration: underline; text-underline-offset: 4px; }
.empty {
  padding: 64px 0; text-align: center;
  font-family: var(--font-serif); font-size: 22px; color: var(--color-muted);
}
/* The page is one screen: bar, then the rail beside the feed. The feed alone
   scrolls; the rail stands still and carries the footer's links. */
.site--index { height: 100svh; overflow: hidden; }
.split {
  flex: 1; min-height: 0;
  display: grid; grid-template-columns: 420px minmax(0, 1fr); align-items: stretch;
}
/* Sized to fit a laptop screen without scrolling; on a shorter one it
   scrolls without a bar rather than clipping the card. */
.rail {
  min-height: 0; overflow-y: auto; scrollbar-width: none;
  background: var(--color-paper-alt); border-right: 1px solid var(--color-rule);
  padding: 32px 40px 28px; display: flex; flex-direction: column; gap: 20px;
}
.rail::-webkit-scrollbar { width: 0; }
.rail__head { display: flex; flex-direction: column; gap: 8px; }
.rail__head h1 {
  font-family: var(--font-serif); font-weight: 300; font-size: 44px;
  line-height: 1.02; letter-spacing: -.02em;
}
.rail__head p { font-size: 15px; line-height: 1.55; color: var(--color-muted); }
.rail__filters { display: contents; }
.rail__group { display: flex; flex-direction: column; gap: 10px; }
.towns { display: flex; flex-direction: column; }
.town {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 2px; border-top: 1px solid var(--color-rule-3); font-size: 15px; color: var(--color-ink-3);
}
.town--on { color: var(--color-ink); font-weight: 600; }
.town__count { color: var(--color-muted-2); }
.town--on .town__count { color: var(--color-ink); }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  font-size: 14px; padding: 9px 14px; border-radius: 8px;
  border: 1px solid var(--color-rule-2); color: var(--color-ink-3);
}
.chip--on { border-color: var(--color-ink); background: var(--color-ink); color: var(--color-paper); }
.rail__reset {
  align-self: flex-start; font-size: 14px; color: var(--color-muted);
  text-decoration: underline; text-underline-offset: 3px;
}
.rail__cta {
  margin-top: auto; background: var(--color-paper); border: 1px solid var(--color-rule-3);
  border-radius: 12px; padding: 18px 20px; display: flex; flex-direction: column; gap: 6px;
}
.rail__cta-title { font-family: var(--font-serif); font-size: 20px; }
.rail__cta-text { font-size: 14px; line-height: 1.5; color: var(--color-muted); }
.rail__cta .btn { margin-top: 6px; align-self: flex-start; padding: 11px 20px; font-size: 14px; }

.rail__foot { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; }
.rail__foot a { color: var(--color-muted-2); }
.feed {
  min-height: 0; overflow-y: auto;
  padding: 32px 48px 48px; display: flex; flex-direction: column; gap: 14px;
}
.thumb {
  flex: none; width: 72px; height: 72px; border-radius: 8px; overflow: hidden;
  background: #5f6157; display: flex; align-items: center; justify-content: center;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; }
/* A notice with no photograph gets a monogram, never a stranger's face. */
.thumb--mono {
  background: var(--color-ph-a); font-family: var(--font-serif); font-size: 24px; color: #a9a29a;
}
.thumb--xl { width: 180px; height: 180px; }
.thumb--xl.thumb--mono { font-size: 52px; }
.featured {
  background: var(--color-paper-alt); border-radius: 12px; padding: 26px;
  display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 26px; align-items: center;
}
.featured__text { display: flex; flex-direction: column; gap: 10px; }
.featured__name { font-family: var(--font-serif); font-size: 38px; line-height: 1.08; }
.featured__line { font-size: 16px; color: var(--color-muted); }
.pill {
  align-self: flex-start; margin-top: 4px; font-size: 14px; padding: 8px 14px; border-radius: 8px;
  background: var(--color-ph-a); color: var(--color-muted);
}
/* The green is only for a real time. */
.pill--on { background: var(--color-accent); color: var(--color-accent-ink); }
.row {
  border: 1px solid var(--color-rule-3); border-radius: 12px; padding: 20px 22px;
  display: grid; grid-template-columns: 72px minmax(0, 1fr) auto; gap: 20px; align-items: center;
}
.row__text { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.row__name { font-family: var(--font-serif); font-size: 26px; line-height: 1.15; }
.row__line { font-size: 15px; color: var(--color-muted-2); }
.row-service { font-size: 14px; white-space: nowrap; color: var(--color-ink-3); }
.row-service--none { color: var(--color-muted-2); }
.feed__empty {
  border: 1px solid var(--color-rule-3); border-radius: 12px; padding: 48px 26px;
  display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center;
}
.feed__empty-title { font-family: var(--font-serif); font-size: 26px; }
.feed__empty-text { font-size: 15px; color: var(--color-muted-2); max-width: 380px; line-height: 1.6; }
.feed__empty .btn { margin-top: 8px; padding: 12px 22px; }
/* The way out of an empty search. Quieter than the button beside it: the
   other section is an offer, not the thing the reader asked for. */
.feed__elsewhere {
  margin-top: 4px; font-size: 15px; color: var(--color-ink-3);
  border-bottom: 1px solid var(--color-rule-3); padding-bottom: 2px;
}
.feed__elsewhere:hover { color: var(--color-ink-1); }
.feed__foot { margin-top: 12px; display: flex; justify-content: flex-end; }
.feed__foot .btn { padding: 13px 22px; }
@media (max-width: 980px) {
  /* One column no longer fits a screen; the page scrolls as a page again.
     The rail folds to a headline and one row of chips a thumb can flick
     through: towns first, then gatherings. The card goes; the bar's own
     Place a notice is already there. */
  .site--index { height: auto; overflow: visible; }
  .split { grid-template-columns: minmax(0, 1fr); }
  .rail {
    overflow: visible; border-right: none; border-bottom: 1px solid var(--color-rule);
    padding: 20px 0 14px; gap: 14px;
  }
  .rail__head { padding: 0 20px; }
  .rail__head h1 { font-size: 34px; }
  .rail__head p, .rail__group .eyebrow, .rail__cta, .rail__foot { display: none; }
  .rail__filters {
    display: flex; gap: 8px; padding: 0 20px; overflow-x: auto; scrollbar-width: none;
  }
  .rail__filters::-webkit-scrollbar { height: 0; }
  .rail__group, .towns, .chips { flex-direction: row; flex-wrap: nowrap; gap: 8px; }
  .towns + .chips, .rail__group + .rail__group { margin-left: 8px; }
  .town {
    flex: none; gap: 6px; padding: 9px 14px; border: 1px solid var(--color-rule-2);
    border-radius: 8px; font-size: 14px; white-space: nowrap;
  }
  .town--on { border-color: var(--color-ink); background: var(--color-ink); color: var(--color-paper); }
  .town--on .town__count { color: var(--color-paper); opacity: .7; }
  .chip { flex: none; white-space: nowrap; }
  .rail__reset { padding: 0 20px; font-size: 13px; }
  .feed { overflow: visible; }
  .rail__cta { margin-top: 4px; }
  .feed { padding: 32px clamp(20px, 5vw, 44px) 56px; }
}
@media (max-width: 620px) {
  .featured { grid-template-columns: 1fr; }
  .thumb--xl { width: 100%; height: 220px; }
  .row { grid-template-columns: 56px minmax(0, 1fr); }
  .row .thumb { width: 56px; height: 56px; }
  .row-service { grid-column: 2; }
  .site--index .btn { width: auto; }
}

/* ---------- submit ---------- */
.fieldset { display: flex; flex-direction: column; gap: 20px; }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 20px; }
.choice--pill { justify-content: center; padding: 10px 14px; }
.service-row { display: flex; flex-direction: column; gap: 14px; padding: 16px; }
/* A grid item stretches to the row, and a full-height box has nothing to scroll
   within - align-self is what actually makes this stick. */
.aside--sticky { position: sticky; top: calc(var(--bar-top) + var(--bar-1) + 16px); align-self: start; }
.choice {
  flex-direction: row; align-items: flex-start; gap: 16px; cursor: pointer;
  background: var(--color-card); border: 1px solid var(--color-rule);
}
.choice input { margin-top: 6px; accent-color: var(--color-ink); }
.choice__text { display: flex; flex-direction: column; flex: 1; min-width: 0; gap: 4px; }
.choice__name { font-family: var(--font-serif); font-size: 20px; }
.choice__price { font-family: var(--font-mono); white-space: nowrap; }
.devbar { border-style: dashed; margin-bottom: 32px; }
.devbar__buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.devbar code { cursor: pointer; }

/* ---------- thanks ---------- */
.hero--message { padding: 120px 0; }
.hero--message h1 { font-size: 58px; }
.hero--message .epitaph { font-style: normal; }
.hero--message h2 { font-family: var(--font-serif); font-weight: 300; font-size: 34px; letter-spacing: -.01em; }
/* Under a page title the message is a continuation, not its own landing: no
   second helping of padding, and it keeps the title's left edge. */
.page-head + .hero--message { padding: 0 0 96px; align-items: flex-start; text-align: left; }
.page-head + .hero--message .hero__head { align-items: flex-start; }
.page-head + .hero--message .epitaph { max-width: 620px; }

/* ---------- staff ---------- */
.staff { min-height: 100vh; display: flex; flex-direction: column; }
.signin { flex: 1; display: flex; align-items: center; justify-content: center; padding: 64px 22px; }
.signin__card { width: 100%; max-width: 420px; display: flex; flex-direction: column; gap: 28px; }
.signin__brand { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.form--card { background: var(--color-card); border: 1px solid var(--color-rule); }
.form form { display: flex; flex-direction: column; gap: 16px; }
.callout { border-radius: 12px; padding: 14px 18px; background: var(--color-paper-alt); }
.callout--accent { background: var(--color-accent); color: var(--color-accent-ink); }
.centered { text-align: center; }

.footer__id { display: flex; flex-direction: column; gap: 8px; }
.footer__in--extra { padding-top: 0; }
.life--form { padding: 0 0 84px; }
.memorial--form { gap: 40px; }
.devbar__head { align-items: center; }

.queue { display: flex; flex-direction: column; gap: 12px; }

.review { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 40px; padding: 32px 0 72px; }
.banner {
  border-radius: 12px; padding: 14px 18px; font-size: 14px; line-height: 1.5;
  background: var(--color-accent); color: var(--color-accent-ink);
}
.banner--warn { background: var(--color-paper-alt); color: var(--color-ink-3); }
/* Google asks that its mark sits on a plain surface with the label beside it. */
.btn--google { display: inline-flex; align-items: center; justify-content: center; gap: 10px; }
.brand-form { display: flex; flex-direction: column; gap: 18px; align-items: flex-start; }
.brand-form .row-2 { width: 100%; }
.memory { display: flex; flex-direction: column; gap: 12px; background: var(--color-card);
  border: 1px solid var(--color-rule); border-radius: 12px; padding: 22px 24px; }

/* Out of sight, out of the tab order, still there for a bot. */
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Over the cap. A warning, not a charge: nobody is billed for the difference. */
#wordcount.is-over { color: var(--color-danger); }

/* ---------- the notice page ---------- */
/* Class names match design/obituary-notice-v2.html. Two radii only: 8px for
   buttons, pills and small media; 12px for cards, panels and photo blocks. */
.site--notice .wrap { max-width: 1240px; padding: 0 clamp(20px, 5vw, 48px); }
.site--notice .masthead__links .masthead__share { width: auto; }
.masthead__share { color: var(--color-ink); }
.dash { display: inline-block; width: 24px; height: 1px; background: #c8c1b4; }

/* Outranks .wrap's own padding, which the shared column rule sets last. */
.site--notice .lede {
  padding-top: clamp(40px, 7vw, 76px); display: flex; flex-direction: column;
  align-items: center; gap: 18px; text-align: center;
}
.lede__meta {
  display: flex; align-items: center; gap: 14px;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .16em;
  text-transform: uppercase; color: var(--color-muted-2);
}
.lede__name {
  font-family: var(--font-serif); font-weight: 300; font-size: clamp(40px, 8.6vw, 92px);
  line-height: 1.02; letter-spacing: -.025em; text-wrap: balance;
}

.site--notice .split {
  padding-top: clamp(28px, 4vw, 52px); padding-bottom: clamp(48px, 7vw, 84px);
  display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 4vw, 64px); align-items: start;
}
.portrait-col {
  position: sticky; top: calc(var(--bar-top) + var(--bar-1) + 51px); align-self: start;
  display: flex; flex-direction: column; gap: 24px;
}
.portrait {
  width: 100%; height: min(52vh, 540px); border-radius: 12px; overflow: hidden;
  display: flex; align-items: center; justify-content: center; background: #5f6157;
  font-family: var(--font-mono); font-size: 10px; letter-spacing: .1em; color: var(--color-muted-2);
}
/* Re-applied, to out-rank .portrait's own solid background above. */
.portrait.ph { background: var(--ph-hatch); }
.portrait img { width: 100%; height: 100%; object-fit: cover; }
/* Collapsed to nothing until the headline scrolls off, then unfolds in place:
   the actions below move once, on the reveal, and never on load. The
   negative margin swallows the column gap so a closed one takes no room. */
.sticky-name {
  overflow: hidden; max-height: 0; opacity: 0; margin-bottom: -24px;
  transition: max-height .45s cubic-bezier(.22, .61, .36, 1), opacity .35s ease,
    margin-bottom .45s cubic-bezier(.22, .61, .36, 1);
}
.is-scrolled .sticky-name { max-height: 120px; opacity: 1; margin-bottom: 0; }
.sticky-name__in { display: flex; flex-direction: column; gap: 9px; }
.sticky-name__name { font-family: var(--font-serif); font-size: 30px; line-height: 1.15; }
.sticky-name__dates {
  display: flex; align-items: center; gap: 12px;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .14em;
  text-transform: uppercase; color: var(--color-muted-2);
}
.sticky-name__dates .dash { width: 22px; }

/* Under the bar on a phone, where there is no column to pin. Fixed, so it
   costs the page no height; hidden until the headline has gone. */
.namebar {
  display: none; position: fixed; left: 0; right: 0; z-index: 19;
  /* The bar is taller on a phone than its token says; the script measures it. */
  top: var(--namebar-top, calc(var(--bar-top) + var(--bar-1)));
  background: color-mix(in srgb, var(--color-paper) 95%, transparent);
  backdrop-filter: blur(10px); border-bottom: 1px solid var(--color-rule);
  opacity: 0; transform: translateY(-8px); pointer-events: none;
  transition: opacity .3s ease, transform .3s cubic-bezier(.22, .61, .36, 1);
}
.is-scrolled .namebar { opacity: 1; transform: none; pointer-events: auto; }
.namebar__in { max-width: 900px; margin: 0 auto; padding: 10px 20px; display: flex; align-items: center; gap: 12px; }
.namebar__thumb { width: 38px; height: 38px; flex: none; border-radius: 8px; overflow: hidden; background: #5f6157; }
.namebar__thumb img { width: 100%; height: 100%; object-fit: cover; }
.namebar__text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.namebar__name {
  font-family: var(--font-serif); font-size: 19px; line-height: 1.15;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.namebar__dates {
  font-family: var(--font-mono); font-size: 9px; letter-spacing: .12em;
  text-transform: uppercase; color: var(--color-muted-2);
}

.memorial { display: flex; flex-direction: column; gap: 20px; max-width: none; }
.memorial p {
  font-family: var(--font-serif); font-weight: 500; font-size: clamp(19px, 2.1vw, 24px);
  line-height: 1.7; color: var(--color-ink-2); text-wrap: pretty;
}
.admin {
  margin-top: 12px; padding-top: 24px; border-top: 1px solid var(--color-rule);
  display: grid; grid-template-columns: 1fr 1fr; gap: 18px;
}
.admin div { display: flex; flex-direction: column; gap: 5px; }
.admin dt { font-size: 13px; color: var(--color-muted-2); }
.admin dd { font-family: var(--font-serif); font-size: 19px; }

/* ---------- bands ---------- */
/* Full-bleed sections, each with its own centred column. */
.band { padding: 80px 0; }
.band--alt { background: var(--color-paper-alt); }
.band--rule { border-top: 1px solid var(--color-rule); padding: 44px 0 48px; }
.band--giving { padding: 0 0 clamp(56px, 8vw, 88px); }
.band__in { max-width: 1240px; margin: 0 auto; padding: 0 clamp(20px, 5vw, 48px); display: flex; flex-direction: column; gap: 14px; }
.band__in--narrow { max-width: 900px; }

/* ---------- gatherings ---------- */
.gatherings { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
/* The odd one out sits centred at the width of its siblings. */
.gatherings > .gather:last-child:nth-child(odd) { grid-column: 1 / -1; justify-self: center; width: calc(50% - 7px); }
.gatherings--one > .gather { grid-column: 1 / -1; width: 100%; }
.gather {
  background: var(--color-paper); border: 1px solid var(--color-rule-3); border-radius: 12px;
  overflow: hidden; display: flex; flex-direction: column;
}
.gather__top { display: flex; align-items: stretch; }
.gather__date {
  width: 104px; flex: none; background: var(--color-ink); color: var(--color-paper);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 10px 8px 12px; text-align: center;
}
.gather__mon, .gather__dow, .gather__kind {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: .14em; text-transform: uppercase;
}
.gather__mon { color: rgba(250, 248, 244, .7); }
.gather__dow { font-size: 9px; letter-spacing: .12em; color: rgba(250, 248, 244, .6); }
.gather__day { font-family: var(--font-serif); font-size: 46px; line-height: 1.05; }
.gather__when { font-family: var(--font-serif); font-size: 15px; line-height: 1.3; }
.gather__head { padding: 18px 22px; display: flex; flex-direction: column; justify-content: center; gap: 5px; min-width: 0; }
.gather__kind { color: var(--color-muted-2); letter-spacing: .12em; }
.gather__time { font-family: var(--font-serif); font-size: 26px; line-height: 1.2; }
.gather__foot { padding: 18px 22px 20px; border-top: 1px solid var(--color-rule); display: flex; flex-direction: column; gap: 5px; }
.gather__venue { font-size: 16px; color: var(--color-ink-2); }
.gather__meta { font-size: 15px; color: var(--color-muted-2); }
.gather__link { margin-top: 6px; align-self: flex-start; font-size: 14px; color: var(--color-accent-ink); }
.gather__link + .gather__link { margin-top: 2px; }
.gather__note { margin-top: 6px; font-size: 14px; color: var(--color-muted-2); }
.gather--accent { background: var(--color-accent); border-color: var(--color-accent-rule); }
.gather--accent .gather__date { background: var(--color-accent-ink); color: #f4f7f2; }
.gather--accent .gather__kind { color: #6b7a64; }
.gather--accent .gather__time { color: #2f3a2c; }
.gather--accent .gather__foot { border-top-color: #d5e0cd; }
.gather--accent .gather__venue { color: var(--color-accent-ink); }
.gather--accent .gather__meta { color: var(--color-accent-ink-2); }
.gather--prose { padding: 22px 24px; gap: 8px; }
.gather__prose { font-size: 16px; line-height: 1.6; color: var(--color-accent-ink); white-space: pre-line; }

/* ---------- notes ---------- */
.notes { gap: 32px; }
.note-form {
  background: var(--color-paper); border: 1px solid var(--color-rule-3); border-radius: 12px;
  padding: 34px 32px; display: flex; flex-direction: column; align-items: center; gap: 16px; text-align: center;
}
.note-form__title { font-family: var(--font-serif); font-size: 26px; }
.note-form__row { width: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
/* :where keeps the file-input exception weightless, so base.css's focus ring
   still out-ranks this border when the field is focused. */
.note-form input:not(:where([type="file"])), .note-form textarea {
  width: 100%; font-size: 16px; padding: 15px 18px; border-radius: 12px;
  border: 1px solid var(--color-rule-2); background: #fffdf9; color: var(--color-ink); outline: none;
  line-height: normal;
}
.note-form textarea { line-height: 1.6; resize: vertical; }
.note-form .callout, .note-form .error { width: 100%; }
.attach {
  width: 100%; display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 12px;
  font-size: 15px; padding: 12px 18px; border-radius: 12px;
  border: 1px dashed #cfc7b7; color: var(--color-ink-2); cursor: pointer;
}
.attach__thumb {
  width: 40px; height: 40px; flex: none; border-radius: 8px; overflow: hidden;
  box-shadow: 0 0 0 1px rgba(44, 42, 38, .12); background-size: cover; background-position: center;
}
.attach.ph { background: none; }
.attach__thumb.ph { --ph-step: 6px; }
/* No script: the field is a plain file input beside its label. With one, the
   label is the control and the input steps out of sight. */
.attach input[type="file"] { font-size: 13px; flex-basis: 100%; }
.attach--enhanced input[type="file"] { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.attach--enhanced { position: relative; }
.attach--filled { background: var(--color-accent); border-color: #b9c7b2; }

.entries { display: flex; flex-direction: column; gap: 12px; }
#entry-list { display: flex; flex-direction: column; gap: 12px; }
.entry {
  background: var(--color-paper-alt); border: 1px solid #e8e2d6; border-radius: 12px;
  padding: 26px 28px; display: flex; flex-direction: column; gap: 20px; margin: 0;
}
.entry p {
  font-family: var(--font-serif); font-size: 20px; line-height: 1.65;
  color: var(--color-ink-2); text-wrap: pretty;
}
.entry cite { font-style: normal; display: flex; flex-direction: column; gap: 2px; padding-top: 2px; }
.entry__name { font-size: 15px; color: var(--color-ink); }
.entry__meta { font-size: 13px; line-height: 1.5; color: var(--color-muted-2); }
/* 16:9 always. The picture is shown whole; a blurred, enlarged copy of it
   fills whatever its own shape leaves bare. */
.entry__photo {
  position: relative; width: 100%; aspect-ratio: 16 / 9; border-radius: 8px; overflow: hidden;
  background: #5f6157; box-shadow: 0 0 0 1px rgba(44, 42, 38, .12);
}
.entry__blur {
  position: absolute; inset: -8%; background-size: cover; background-position: center;
  filter: blur(34px) saturate(1.15); transform: scale(1.1);
}
.entry__photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.entries__empty { font-size: 14px; line-height: 1.6; color: var(--color-muted); text-align: center; }
.entries__more { align-self: center; margin-top: 8px; }

/* ---------- giving ---------- */
.giving {
  background: var(--color-accent); border-radius: 12px; padding: 44px 48px;
  display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center;
}
.giving .eyebrow { color: #6b7a64; }
.giving h2 {
  font-family: var(--font-serif); font-size: 32px; font-weight: 400;
  line-height: 1.25; color: #2f3a2c; max-width: 520px;
}
.giving p { margin-top: 4px; max-width: 560px; font-size: 16px; line-height: 1.65; color: #4a5546; }
.giving__actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 12px; }

.site--notice .notices__in { max-width: 1240px; padding: clamp(36px, 6vw, 56px) clamp(20px, 5vw, 48px); }
.site--notice .footer__in { max-width: 1240px; padding: clamp(32px, 5vw, 48px) clamp(20px, 5vw, 48px); }

@media (max-width: 900px) {
  /* Same specificity as the desk rule above, or it never wins. */
  .site--notice .split { grid-template-columns: 1fr; }
  .portrait-col { position: static; align-items: center; text-align: center; }
  .portrait { height: min(42vh, 380px); max-width: 460px; }
  /* The strip under the bar carries the name here. */
  .sticky-name { display: none; }
  .namebar { display: block; }
  .hero__actions--start { justify-content: center; }
  .gatherings { grid-template-columns: 1fr; }
  .gatherings > .gather:last-child:nth-child(odd) { width: 100%; }
  .admin { grid-template-columns: 1fr; gap: 14px; text-align: center; justify-items: center; }
  .site--notice .notice-list { grid-template-columns: 1fr; }
  .site--notice .footer__in { flex-direction: column; align-items: center; text-align: center; gap: 20px; }
}
@media (max-width: 620px) {
  .site--notice .masthead__in { padding: 12px 20px; gap: 12px; }
  .site--notice .masthead__links { gap: 8px; }
  .note-form__row { grid-template-columns: 1fr; }
  .gather__top { justify-content: flex-start; }
  .site--notice .hero__actions .btn { width: auto; }
  .giving { padding: 36px 24px; }
  .giving h2 { font-size: 27px; }
}


/* ---------- submit: the read-back ---------- */
/* The read-back step's twin question: a sentence, then two answers. */
.wiz__twins {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px;
  padding: 16px 20px; border: 1px solid var(--color-accent-rule); border-radius: 12px;
  background: var(--color-accent); color: var(--color-accent-ink); font-size: 15px;
}
.wiz__twins a { color: inherit; font-weight: 600; }
.wiz__twins--closed { color: var(--color-ink); }

/* A page that is only words: the two legal pages, and anything else a reader
   has to be able to get through. One measure, generous leading, headings that
   sit close to what they introduce. */
.legal { padding-top: clamp(32px, 5vw, 64px); padding-bottom: clamp(48px, 7vw, 88px); max-width: 68ch; }
.legal__title {
  font-family: var(--font-serif); font-weight: 300; font-size: clamp(32px, 5.4vw, 54px);
  line-height: 1.06; letter-spacing: -.02em;
}
.legal__meta {
  margin-top: 14px; font-family: var(--font-mono); font-size: 11px; letter-spacing: .16em;
  text-transform: uppercase; color: var(--color-muted-2);
}
.legal h2 {
  margin-top: 40px; font-family: var(--font-serif); font-weight: 400; font-size: 23px;
  line-height: 1.25; letter-spacing: -.01em;
}
.legal p, .legal li { margin-top: 14px; font-size: 16px; line-height: 1.7; color: var(--color-ink); }
.legal ul { margin-top: 6px; padding-left: 22px; list-style: disc; }
.legal a { text-decoration: underline; text-underline-offset: 3px; }
.legal__note {
  margin-top: 40px; padding: 18px 20px; border: 1px solid var(--color-rule); border-radius: 10px;
  font-size: 14px; line-height: 1.65; color: var(--color-muted);
}
