/* Hill Family Memories: an heirloom reunion program, phone-first. */
:root {
  --bg: #f6efe4;
  --surface: #ffffff;
  --ink: #24160f;
  --muted: #5c4a3d;
  --line: #dccbb4;
  --track: #efe4d3;
  --accent: #b23c0d;        /* terracotta: buttons, links, "very" bars */
  --accent-strong: #9a3412;
  --accent-ink: #ffffff;
  --accent-soft: #f8e6d6;
  --mid: #fdba74;           /* "somewhat" segment */
  --low: #e7e0d6;           /* "not" segment */
  --teal: #0f766e;
  --err: #b42318;
  --radius: 20px;
  --radius-sm: 14px;
  --gutter: 16px;
  --shadow: 0 1px 2px rgba(28, 25, 23, .04), 0 8px 24px -12px rgba(28, 25, 23, .12);
  --shadow-lg: 0 2px 4px rgba(28, 25, 23, .04), 0 24px 48px -20px rgba(124, 45, 18, .28);
  --hero: radial-gradient(120% 90% at 100% 0%, rgba(245, 158, 11, .55) 0%, rgba(245, 158, 11, 0) 55%),
          radial-gradient(90% 80% at 0% 100%, rgba(15, 118, 110, .45) 0%, rgba(15, 118, 110, 0) 60%),
          linear-gradient(140deg, #3b1206 0%, #7c2d12 45%, #b23a0e 100%);
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 18px/1.6 "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { line-height: 1.12; margin: 0 0 .45em; letter-spacing: -.02em; font-weight: 800; }
h1 { font-size: clamp(2.1rem, 8vw, 3.6rem); }
h2 { font-size: clamp(1.4rem, 4.5vw, 1.75rem); }
h3 { font-size: 1.15rem; font-weight: 700; letter-spacing: -.01em; }
a { color: var(--accent); text-underline-offset: 3px; }
p { margin: 0 0 1em; }

.wrap { max-width: 1040px; margin: 0 auto; padding: 0 var(--gutter); }
.narrow { max-width: 760px; }
@media (min-width: 720px) { :root { --gutter: 28px; } }

/* ---------- header / footer ---------- */
.site-head {
  position: sticky; top: 0; z-index: 10;
  background: rgba(250, 247, 242, .82); backdrop-filter: saturate(1.6) blur(14px); -webkit-backdrop-filter: saturate(1.6) blur(14px);
  border-bottom: 1px solid rgba(233, 227, 218, .8);
}
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 64px; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.05rem; color: var(--ink); text-decoration: none; letter-spacing: -.01em; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex: none;
  background: var(--hero); color: #fff; font-size: .95rem; font-weight: 800; letter-spacing: 0;
}
.nav { display: flex; gap: 2px; flex-wrap: wrap; }
.nav a { padding: 9px 13px; border-radius: 999px; text-decoration: none; color: var(--muted); font-weight: 600; font-size: .95rem; }
.nav a:hover { color: var(--ink); background: rgba(28, 25, 23, .05); }
.nav a[aria-current="page"] { background: var(--ink); color: #fff; }
/* On phones the menu can wrap to two rows, so the header scrolls away and the
   page's own sticky bars (survey progress, tree search) pin to the very top. */
@media (max-width: 719px) {
  .site-head { position: static; }
  .site-head .wrap { padding-top: 6px; padding-bottom: 6px; }
  .nav a { padding: 8px 11px; }
}

main { padding: 0 0 64px; }
.site-foot { border-top: 1px solid var(--line); color: var(--muted); font-size: .88rem; padding: 26px 0 44px; text-align: center; }

/* ---------- page heading band (inner pages) ---------- */
.page-head { background: linear-gradient(180deg, var(--accent-soft) 0%, var(--bg) 100%); padding: 36px 0 18px; margin-bottom: 8px; }
@media (min-width: 720px) { .page-head { padding: 56px 0 24px; } }
.page-head h1 { font-size: clamp(2rem, 7vw, 2.8rem); }

/* ---------- generic pieces ---------- */
.section { padding-top: 40px; }
@media (min-width: 720px) { .section { padding-top: 64px; } }
.section-head { margin-bottom: 20px; }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; margin: 0 0 18px; box-shadow: var(--shadow);
}
@media (min-width: 720px) { .card { padding: 28px; } }
.lede { font-size: 1.15rem; color: var(--muted); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 56px; padding: 14px 26px; border-radius: 999px; border: 2px solid var(--accent);
  background: var(--accent); color: var(--accent-ink); font: inherit; font-weight: 700; text-decoration: none; cursor: pointer;
  box-shadow: 0 10px 24px -12px rgba(194, 65, 12, .7); transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn:hover { background: var(--accent-strong); border-color: var(--accent-strong); transform: translateY(-1px); }
.btn.ghost { background: transparent; color: var(--accent); box-shadow: none; }
.btn.ghost:hover { background: var(--accent-soft); }
.btn .arrow { transition: transform .15s ease; }
.btn:hover .arrow { transform: translateX(3px); }
.btn:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, summary:focus-visible, .nav a:focus-visible, .tabs button:focus-visible {
  outline: 3px solid var(--ink); outline-offset: 3px;
}
.btn[disabled] { opacity: .6; cursor: progress; transform: none; }
.fine { font-size: .9rem; color: var(--muted); }

/* ---------- survey form ---------- */
.progress {
  position: sticky; top: 64px; z-index: 5; margin: 0 0 18px; padding: 12px 16px; border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, .92); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--line); box-shadow: var(--shadow); font-size: .9rem; font-weight: 600; color: var(--muted);
}
.progress .track { height: 8px; border-radius: 999px; background: var(--track); overflow: hidden; margin-top: 8px; }
.progress .fill { height: 100%; width: 0; border-radius: 999px; background: linear-gradient(90deg, var(--accent), #f59e0b); transition: width .3s ease; }
.q {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; margin: 0 0 16px; box-shadow: var(--shadow);
}
@media (min-width: 720px) { .q { padding: 28px; } }
.q legend, .q > label.q-head { font-size: 1.12rem; font-weight: 700; letter-spacing: -.01em; padding: 0; margin-bottom: 6px; display: block; line-height: 1.35; }
.q .num {
  display: inline-grid; place-items: center; min-width: 30px; height: 30px; padding: 0 6px; margin-right: 10px; border-radius: 9px;
  background: var(--accent-soft); color: var(--accent); font-size: .9rem; font-weight: 800; vertical-align: 2px;
}
.q .req, .q .opt { font-size: .74rem; font-weight: 700; margin-left: 6px; white-space: nowrap; text-transform: uppercase; letter-spacing: .06em; padding: 3px 8px; border-radius: 999px; vertical-align: 2px; }
.q .req { color: var(--err); background: #fdecea; }
.q .opt { color: var(--muted); background: var(--track); }
.q .help { color: var(--muted); font-size: .95rem; margin: 2px 0 14px; }
fieldset.q { min-width: 0; }
fieldset.q > legend { float: left; width: 100%; }  /* keeps the title inside the card instead of on its border */
fieldset.q > legend ~ * { clear: both; }
input[type="text"], input[type="email"], input[type="number"], input[type="password"], textarea {
  width: 100%; font: inherit; color: var(--ink); background: #fcfbf9; border: 1.5px solid var(--line);
  border-radius: 12px; padding: 12px 16px; min-height: 54px; transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
input[type="text"]:focus, input[type="email"]:focus, input[type="number"]:focus, input[type="password"]:focus, textarea:focus {
  border-color: var(--accent); background: #fff; box-shadow: 0 0 0 4px rgba(194, 65, 12, .14);
}
textarea { min-height: 120px; resize: vertical; }
.q.invalid { border-color: var(--err); box-shadow: 0 0 0 3px rgba(180, 35, 24, .14); }
.q .err { color: var(--err); font-weight: 700; font-size: .95rem; margin: 12px 0 0; }
.q .err:empty { display: none; }

.age-grid { display: grid; gap: 10px; }
@media (min-width: 560px) { .age-grid { grid-template-columns: 1fr 1fr; column-gap: 20px; } }
.age-row { display: grid; grid-template-columns: 1fr 6.5em; align-items: center; gap: 12px; padding: 6px 6px 6px 14px; border-radius: 14px; background: var(--track); }
.age-row label { font-weight: 600; }
.age-row input { text-align: center; background: #fff; min-height: 48px; }
.sum-note { font-size: .95rem; color: var(--muted); margin: 12px 0 0; font-weight: 600; }

.rate-item { border-top: 1px solid var(--line); padding: 16px 0 6px; }
.rate-item:first-of-type { border-top: 0; padding-top: 4px; }
.rate-item .act { float: left; width: 100%; padding: 0; font-weight: 700; margin: 0 0 10px; }  /* float lets a legend take normal margins */
.rate-item .choices { clear: both; }
.choices { display: grid; gap: 8px; }
@media (min-width: 560px) { .rate-item .choices { grid-template-columns: repeat(3, 1fr); } }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.choice span {
  display: flex; align-items: center; gap: 12px; min-height: 54px; padding: 10px 16px; border: 1.5px solid var(--line);
  border-radius: 14px; background: #fcfbf9; font-weight: 600; transition: border-color .15s ease, background .15s ease;
}
.choice:hover span { border-color: #d6cdbf; background: #fff; }
.choice span::before { content: ""; flex: none; width: 22px; height: 22px; border-radius: 50%; border: 2px solid #a8a29e; background: #fff; transition: all .15s ease; }
.choice input:checked + span { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-strong); }
.choice input:checked + span::before { border-color: var(--accent); background: radial-gradient(var(--accent) 42%, #fff 47%); }
.choice input:focus-visible + span { outline: 3px solid var(--ink); outline-offset: 2px; }

.form-alert { border-radius: var(--radius-sm); padding: 14px 18px; margin: 0 0 18px; font-weight: 600; }
.form-alert.error { background: #fdecea; color: var(--err); border: 1px solid #f6c7c1; }
.thanks { text-align: center; padding: 44px 22px; }
.thanks .big {
  width: 84px; height: 84px; margin: 0 auto 18px; border-radius: 50%; display: grid; place-items: center;
  font-size: 2.6rem; line-height: 1; background: var(--accent-soft);
}
.loading { color: var(--muted); padding: 30px 0; text-align: center; }

/* ---------- results ---------- */
.gate { max-width: 460px; margin: 28px auto; }
.gate label { display: block; font-weight: 700; margin-bottom: 8px; }
.gate .btn { width: 100%; margin-top: 14px; }
.res-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; margin: 28px 0 22px; }
.res-head .count { font-size: 3rem; font-weight: 800; line-height: 1; letter-spacing: -.03em; color: var(--accent); }
.res-head .meta { color: var(--muted); font-size: .92rem; }
.res-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.res-actions .btn { min-height: 46px; padding: 10px 18px; font-size: .95rem; }
.tabs { display: inline-flex; gap: 4px; padding: 5px; border-radius: 999px; background: var(--track); margin: 0 0 20px; max-width: 100%; }
.tabs button {
  font: inherit; font-weight: 700; font-size: .95rem; padding: 10px 18px; border: 0; border-radius: 999px; background: none; color: var(--muted); cursor: pointer; min-height: 46px;
}
.tabs button[aria-selected="true"] { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(28, 25, 23, .12); }

.qcard h3 { margin-bottom: 4px; }
.qcard .qnum { color: var(--accent); font-size: .76rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; display: block; margin-bottom: 6px; }
.answered { color: var(--muted); font-size: .88rem; margin: 0 0 16px; }
.answered b { color: var(--ink); }
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(9em, 1fr)); gap: 12px; margin-bottom: 14px; }
.stat { background: var(--track); border-radius: var(--radius-sm); padding: 14px 16px; }
.stat .v { font-size: 1.9rem; font-weight: 800; line-height: 1.1; letter-spacing: -.02em; }
.stat .l { color: var(--muted); font-size: .88rem; }

.bars { display: grid; gap: 10px; }
.bar-row { display: grid; grid-template-columns: minmax(7em, 38%) 1fr; gap: 12px; align-items: center; }
.bar-row .lab { font-weight: 600; font-size: .96rem; }
.bar-track { background: var(--track); border-radius: 10px; min-height: 36px; position: relative; overflow: hidden; }
.bar-fill { background: linear-gradient(90deg, #f59e0b, var(--accent)); height: 100%; min-height: 36px; border-radius: 10px; opacity: .9; }
.bar-val { position: absolute; inset: 0 12px 0 auto; display: flex; align-items: center; font-weight: 700; font-size: .92rem; }
.bar-row.top .lab::after { content: " ★ Top"; color: var(--accent); font-size: .82rem; font-weight: 800; }

.stack-legend { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: .88rem; margin: 0 0 16px; }
.stack-legend span { display: inline-flex; align-items: center; gap: 6px; }
.stack-legend i { width: 14px; height: 14px; border-radius: 4px; display: inline-block; }
.stack { display: grid; gap: 16px; }
.stack-row .lab { font-weight: 700; margin-bottom: 6px; }
.stack-bar { display: flex; min-height: 40px; border-radius: 10px; overflow: hidden; background: var(--track); gap: 2px; }
.seg { display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: .88rem; white-space: nowrap; overflow: hidden; }
.seg.very { background: var(--accent); color: #fff; }
.seg.some { background: var(--mid); color: var(--ink); }
.seg.not { background: var(--low); color: var(--ink); }
.stack-nums { font-size: .88rem; color: var(--muted); margin-top: 6px; }
.stack-nums b { color: var(--ink); }

.names, .texts { list-style: none; padding: 0; margin: 0; }
.names { columns: 2 11em; column-gap: 24px; }
.names li { padding: 8px 0; border-bottom: 1px solid var(--line); break-inside: avoid; }
.texts li { padding: 14px 16px; background: var(--track); border-radius: var(--radius-sm); margin-bottom: 8px; }
.texts li .who { display: block; color: var(--muted); font-size: .84rem; margin-top: 4px; }
.empty { color: var(--muted); font-style: italic; }

.resp { border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); margin-bottom: 10px; box-shadow: var(--shadow); }
.resp summary { list-style: none; cursor: pointer; padding: 16px 18px; display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; min-height: 56px; }
.resp summary::-webkit-details-marker { display: none; }
.resp summary .n { font-weight: 700; }
.resp summary .d { color: var(--muted); font-size: .88rem; text-align: right; }
.resp summary .s { color: var(--muted); font-size: .9rem; grid-column: 1 / -1; }
.resp summary .s::after { content: " ▾"; }
.resp[open] summary .s::after { content: " ▴"; }
.resp dl { margin: 0; padding: 0 18px 18px; display: grid; gap: 12px; }
.resp dt { font-weight: 700; font-size: .9rem; color: var(--muted); }
.resp dd { margin: 0; }
.resp dd ul { margin: 0; padding-left: 1.1em; }

@media (max-width: 719px) { .progress { top: 8px; } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* ================= Heirloom Invitation: bookcloth, gold foil, a printed program ================= */
:root {
  --cloth-weave: repeating-linear-gradient(45deg, rgba(255, 255, 255, .025) 0 1px, transparent 1px 3px), repeating-linear-gradient(-45deg, rgba(0, 0, 0, .12) 0 1px, transparent 1px 3px);
  --hero: var(--cloth-weave), #3b1d12;  /* the tree viewer's root card and any older --hero users get bookcloth */
  --cloth: #3b1d12; --cloth-2: #2c140b; --foil: #e4b866; --foil-soft: #f3dcae; --serif: "Gloock", Georgia, "Times New Roman", serif; }
::selection { background: var(--foil-soft); color: var(--ink); }
h1, h2 { font-family: var(--serif); font-weight: 400; letter-spacing: -.01em; }
h2 { font-size: clamp(1.8rem, 6vw, 2.5rem); }
a:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 6px; }
.btn .arrow { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.btn { border-radius: 14px; box-shadow: 0 6px 14px -8px rgba(59, 29, 18, .55); }

/* header */
.site-head { background: rgba(246, 239, 228, .9); border-bottom: 1px solid var(--line); }
.brand { font-family: var(--serif); font-weight: 400; font-size: 1.3rem; letter-spacing: 0; }
.brand em { font-style: normal; color: var(--accent); }
.brand-mark { background: var(--cloth); color: var(--foil); border-radius: 50%; font-family: var(--serif); font-weight: 400; font-size: 1.1rem; box-shadow: inset 0 0 0 2px var(--cloth), inset 0 0 0 3px var(--foil); }
.nav a[aria-current="page"] { background: var(--cloth); color: var(--foil-soft); }

/* cover: a foil-stamped program cover on bookcloth */
.cover {
  background-color: var(--cloth);
  background-image: var(--cloth-weave),
    radial-gradient(120% 80% at 50% 0%, rgba(255, 214, 150, .10), transparent 60%);
  padding: 22px 14px 88px; color: var(--foil-soft);
}
@media (min-width: 720px) { .cover { padding: 44px 28px 150px; } }
.cover-frame {
  max-width: 980px; margin: 0 auto; text-align: center; padding: 44px 20px 40px;
  border: 1.5px solid rgba(228, 184, 102, .75); outline: 1px solid rgba(228, 184, 102, .4); outline-offset: 6px; border-radius: 4px;
}
@media (min-width: 720px) { .cover-frame { padding: 72px 40px 64px; } }
.cover-pre { font-size: 1rem; letter-spacing: .02em; color: var(--foil-soft); margin: 0 0 10px; }
.cover h1 { color: var(--foil); font-size: clamp(2.6rem, 11vw, 5.6rem); line-height: 1; margin: 0 auto .1em; max-width: 12ch; text-wrap: balance; text-shadow: 0 1px 0 rgba(0, 0, 0, .35); }
.ornament { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 18px auto 14px; max-width: 320px; color: var(--foil); }
.ornament span { flex: 1; height: 1px; background: currentColor; opacity: .7; }
.ornament i { font-style: normal; font-size: .9rem; }
.cover-title { font-family: var(--serif); font-size: clamp(1.5rem, 5vw, 2.1rem); color: #fff; margin: 0 0 18px; }
.cover-date { font-size: 1.15rem; font-weight: 700; color: #fff; line-height: 1.5; margin: 0 0 28px; }
.btn.foil { background: var(--foil); border-color: var(--foil); color: var(--cloth-2); width: 100%; max-width: 340px; box-shadow: 0 10px 24px -12px rgba(0, 0, 0, .7); }
.btn.foil:hover { background: var(--foil-soft); border-color: var(--foil-soft); }
.cover .btn:focus-visible { outline-color: var(--foil-soft); }
.cover-fine { font-size: .95rem; color: var(--foil-soft); margin: 12px 0 0; }
.cover-count { margin: 26px 0 0; font-family: var(--serif); font-size: 1.25rem; color: #fff; }
.cover-count b { font-weight: 400; color: var(--foil); font-size: 1.6rem; }
@media (prefers-reduced-motion: no-preference) {
  .cover-frame > * { animation: rise .7s cubic-bezier(.16, 1, .3, 1) both; }
  .cover-frame > :nth-child(2) { animation-delay: .08s; } .cover-frame > :nth-child(3) { animation-delay: .16s; }
  .cover-frame > :nth-child(n+4) { animation-delay: .24s; }
  @keyframes rise { from { opacity: 0; transform: translateY(10px); } }
}

.intro-line { font-family: var(--serif); font-size: clamp(1.35rem, 4.6vw, 1.75rem); line-height: 1.4; text-align: center; color: var(--ink); margin: 0 auto; max-width: 30ch; text-wrap: balance; }

/* program */
.program-title { text-align: center; }
.program { list-style: none; margin: 8px 0 0; padding: 0; border-top: 2px solid var(--ink); }
.program li { display: grid; grid-template-columns: 3.2rem 1fr; gap: 6px 16px; padding: 24px 0; border-bottom: 1px solid var(--line); align-items: start; }
.program .num { font-family: var(--serif); font-size: 2rem; line-height: 1; color: var(--accent); padding-top: 2px; }
.program h3 { font-size: 1.35rem; font-weight: 800; letter-spacing: -.015em; margin-bottom: 4px; }
.program p { color: var(--muted); margin: 0; }
.program p b { color: var(--ink); }
.program .btn { grid-column: 2; margin-top: 12px; width: 100%; white-space: nowrap; }
@media (min-width: 760px) {
  .program li { grid-template-columns: 4.5rem 1fr 16.5rem; align-items: center; gap: 24px; padding: 28px 0; }
  .program .num { font-size: 2.6rem; }
  .program .btn { grid-column: 3; margin: 0; }
}

/* weekend card with dot leaders */
.card-program { background: #fffaf2; border: 1px solid var(--line); border-radius: 6px; padding: 30px 22px 24px; box-shadow: 0 1px 0 var(--line), 0 18px 30px -24px rgba(59, 29, 18, .45); position: relative; }
.card-program::before { content: ""; position: absolute; inset: 7px; border: 1px solid var(--line); border-radius: 3px; pointer-events: none; }
@media (min-width: 720px) { .card-program { padding: 44px 48px 36px; } }
.card-program h2 { text-align: center; margin-bottom: 20px; }
.leaders { margin: 0; display: grid; gap: 16px; }
.leaders > div { display: grid; gap: 2px; }
.leaders dt { font-weight: 700; color: var(--accent-strong); font-size: .98rem; }
.leaders dd { margin: 0; font-size: 1.15rem; font-weight: 600; color: var(--ink); }
@media (min-width: 640px) {
  .leaders > div { grid-template-columns: auto 1fr auto; align-items: baseline; gap: 12px; }
  .leaders > div::after { content: ""; order: 2; border-bottom: 2px dotted #c7b192; transform: translateY(-5px); }
  .leaders dt { order: 1; } .leaders dd { order: 3; text-align: right; max-width: 30ch; }
}
.card-note { text-align: center; color: var(--muted); margin: 22px 0 0; font-size: .98rem; }

/* album */
.album-teaser h2, .album-teaser .lede { text-align: center; }
.album-teaser .lede { max-width: 34em; margin: 0 auto 26px; }
.album { display: grid; gap: 26px; grid-template-columns: 1fr; max-width: 980px; margin: 0 auto; }
@media (min-width: 560px) { .album { grid-template-columns: 1fr 1fr; } }
@media (min-width: 900px) { .album { grid-template-columns: repeat(3, 1fr); } }
.frame { margin: 0; background: #fffdf8; padding: 12px 12px 14px; box-shadow: 0 1px 2px rgba(59, 29, 18, .12), 0 14px 26px -16px rgba(59, 29, 18, .45); transform: rotate(var(--tilt)); position: relative; }
.frame::before, .frame::after { content: ""; position: absolute; width: 26px; height: 26px; background: var(--cloth); clip-path: polygon(0 0, 100% 0, 0 100%); top: 6px; left: 6px; opacity: .9; }
.frame::after { left: auto; right: 6px; transform: rotate(90deg); }
.photo { aspect-ratio: 4 / 3; display: grid; place-content: center; justify-items: center; gap: 8px; background: #efe4d3; box-shadow: inset 0 0 0 2px #fffdf8, inset 0 0 0 3.5px #cdb593; color: #5c4532; font-weight: 600; font-size: .95rem; }
.photo svg { width: 34px; height: 34px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.frame figcaption { font-family: var(--serif); font-size: 1.15rem; text-align: center; margin-top: 10px; color: var(--ink); }
@media (max-width: 559px) {
  .album { grid-template-columns: 1fr 1fr; gap: 16px; }
  .album-teaser .frame:nth-child(3) { display: none; }
  .frame { padding: 8px 8px 10px; }
  .frame::before, .frame::after { width: 18px; height: 18px; }
  .photo span { display: none; }
  .frame figcaption { font-size: .98rem; }
}
.album-btn { display: flex; width: 100%; max-width: 340px; margin: 34px auto 0; }
.album-page { margin-top: 18px; }
.album-cta { text-align: center; margin: 44px auto 0; max-width: 30em; }
.album-cta p { font-family: var(--serif); font-size: 1.3rem; }

/* inner page head */
.page-head { background: var(--cloth); color: var(--foil-soft); background-image: var(--cloth-weave); padding: 40px 0 34px; margin-bottom: 26px; }
.page-head h1 { color: var(--foil); font-size: clamp(2.3rem, 8vw, 3.4rem); }
.page-head .lede { color: var(--foil-soft); }
.q .req { display: none; }
.progress .fill { background: var(--accent); }

/* footer */
.site-foot { background: var(--cloth); color: var(--foil-soft); border: 0; padding: 36px 0 44px; }
.site-foot p { margin: 0; }
.foot-mark { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; font-family: var(--serif); font-size: 1.3rem; color: var(--foil); box-shadow: inset 0 0 0 1px var(--foil); margin-bottom: 12px; }
.foot-date { color: #fff; font-weight: 700; margin-top: 4px !important; }

/* the family portrait: a mounted print laid over the bottom of the cover */
.portrait { margin: -68px auto 0; padding: 0 var(--gutter); max-width: 960px; position: relative; z-index: 1; }
@media (min-width: 720px) { .portrait { margin-top: -120px; } }
.print { background: #fffdf8; padding: 10px; box-shadow: 0 2px 4px rgba(36, 22, 15, .18), 0 26px 46px -22px rgba(36, 22, 15, .6); transform: rotate(-.6deg); }
@media (min-width: 720px) { .print { padding: 16px; } }
.print img { display: block; width: 100%; height: auto; }
.portrait figcaption { font-family: var(--serif); font-size: 1.05rem; text-align: center; margin-top: 16px; color: var(--muted); text-wrap: balance; }
.frame.has-photo .photo { background: none; display: block; }
.frame.has-photo img { display: block; width: 100%; height: 100%; object-fit: cover; }

/* inner pages without a page-head band (advanced chart) */
.back-link, .tree-head .back-link { margin: 28px 0 6px; font-weight: 700; }
.back-link a { text-decoration: none; }
.back-link a:hover { text-decoration: underline; }
.tree-head h1 { color: var(--ink); }

/* photo albums (Reunions Past): key-gated grid of mounted snapshots + full-size viewer */
.page-head .back-link { margin: 0 0 10px; }
.page-head .back-link a { color: var(--foil-soft); }
.snap-album { margin: 8px 0 40px; }
.snap-album h2 { margin: 0 0 4px; }
.snap-sub { color: var(--muted); font-size: 1.05rem; margin: 0 0 4px; }
.snap-count { color: var(--muted); font-size: .92rem; font-weight: 600; margin: 0 0 18px; }
.snaps { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 640px) { .snaps { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; } }
@media (min-width: 1000px) { .snaps { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.snap { display: block; width: 100%; padding: 6px; border: 0; background: #fffdf8; cursor: zoom-in; box-shadow: 0 1px 2px rgba(59, 29, 18, .12), 0 12px 22px -16px rgba(59, 29, 18, .5); }
.snap img { display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; background: #efe4d3; }
.snap:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.viewer { width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: #140904; color: #fff; }
.viewer[open] { display: grid; grid-template-rows: auto 1fr auto; }
.viewer::backdrop { background: #140904; }
.viewer-bar, .viewer-nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px max(12px, env(safe-area-inset-left)); }
.viewer-nav { padding-bottom: max(12px, env(safe-area-inset-bottom)); }
.viewer-count { font-weight: 700; color: var(--foil-soft); }
.viewer-btn { min-height: 56px; min-width: 56px; padding: 0 18px; border: 1px solid rgba(243, 220, 174, .4); border-radius: 14px; background: rgba(255, 255, 255, .06); color: #fff; font: inherit; font-weight: 700; font-size: 1.05rem; cursor: pointer; }
.viewer-close { font-size: 1.3rem; }
.viewer-btn:focus-visible { outline: 3px solid var(--foil); outline-offset: 2px; }
.viewer-fig { margin: 0; min-height: 0; display: grid; grid-template-rows: 1fr auto; place-items: center; padding: 0 8px; }
.viewer-fig img { max-width: 100%; max-height: 100%; min-height: 0; object-fit: contain; }
.viewer-fig figcaption { font-family: var(--serif); font-size: 1.1rem; color: var(--foil-soft); text-align: center; padding: 8px 0 0; }
.viewer-fig figcaption:empty { display: none; }
a.frame { display: block; text-decoration: none; color: inherit; }
a.frame:hover .photo, a.frame:focus-visible .photo { background: #e7d7bf; }
a.frame:focus-visible { outline: 3px solid var(--ink); outline-offset: 4px; }
.frame .frame-cap { font-family: var(--serif); font-size: 1.15rem; text-align: center; margin: 10px 0 0; color: var(--ink); }
@media (max-width: 559px) { .frame .frame-cap { font-size: .98rem; } .photo span.keep { display: block; } }
.snap-videos { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin: 24px 0 0; }
.snap-videos .fine { margin: 0; }

/* "Contact Daryl" form */
.contact-form .q-head { margin-top: 18px; }
.contact-form .q-head:first-of-type { margin-top: 0; }
.contact-form .help { margin: 0 0 8px; }
.contact-form .btn { width: 100%; margin-top: 22px; }
.contact-form #c-turnstile:not(:empty) { margin-top: 18px; }
.contact-note { text-align: center; margin: 12px 0 0; }
.thanks h2 { margin-top: 0; }
.thanks .btn { margin-top: 10px; }

/* T-shirt color vote: tap-to-rank photos (/tshirts/) and the segmented results section (/results/). */
.shirts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 8px 0 14px; }
.shirt { position: relative; display: flex; flex-direction: column; align-items: stretch; gap: 8px; padding: 6px 6px 10px; margin: 0; font: inherit; color: var(--ink); cursor: pointer; background: var(--surface); border: 2px solid var(--line); border-radius: var(--radius-sm); -webkit-tap-highlight-color: transparent; }
.shirt img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 8px; background: #000; }
.shirt-name { font-weight: 700; text-align: center; }
.shirt.placed { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
.shirt:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.shirt .badge { position: absolute; top: 12px; left: 12px; z-index: 1; min-width: 2.6em; padding: 4px 8px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-weight: 800; font-size: .85rem; text-align: center; }
.shirt .badge:empty { display: none; }
.rank-line { font-weight: 700; min-height: 1.5em; margin: 0; }
.shirt-results { margin-top: 36px; padding-top: 26px; border-top: 3px double var(--line); }
.shirt-results table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.shirt-results th, .shirt-results td { padding: 9px 6px; text-align: center; border-bottom: 1px solid var(--line); }
.shirt-results th:first-child, .shirt-results td:first-child { text-align: left; font-weight: 700; }
.shirt-results .tbl-wrap { overflow-x: auto; }
