/* KinInfo’s shared interface. See docs/design/style-guide.md. */
@font-face {
  font-family: "Instrument Sans"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url("fonts/instrument-sans-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C4,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
@font-face {
  font-family: "Instrument Sans"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url("fonts/instrument-sans.woff2") format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
/* latin-ext */
@font-face {
  font-family: "Baskervville";
  font-style: italic;
  font-weight: 400 700;
  font-display: swap;
  src: url("fonts/baskervville-italic-ext.woff2") format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: "Baskervville";
  font-style: italic;
  font-weight: 400 700;
  font-display: swap;
  src: url("fonts/baskervville-italic.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* latin-ext */
@font-face {
  font-family: "Baskervville";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("fonts/baskervville-ext.woff2") format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: "Baskervville";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("fonts/baskervville.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
:root {
  --photo-wall-joint: rgba(94, 85, 76, .10);
  --panel-shadow: 0 0 12px rgba(43, 32, 23, .055), 0 2px 4px rgba(43, 32, 23, .035);
  --panel-tint: #f2e8d7;
  --panel-tint-hover: var(--panel-2);
  color-scheme: light dark;
  --bg: #f8f3ea; --panel: #fcf8f0; --panel-2: #eee3d1; --ink: #26211b; --muted: #685744;
  --accent: #26211b; --on-accent: #fcf8f0; --link: #795521; --warm: #795521; --brass: #9a7a4e;
  --line: #dbceba; --control: #917c63; --focus: #936838; --ok: #2f6b3c; --bad: #9c2b23;
  --serif: "Baskervville", Georgia, "Iowan Old Style", "Noto Serif", Cambria, serif;
  --sans: "Instrument Sans", system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", Ubuntu, Cantarell, "Helvetica Neue", Arial, sans-serif;
  --s1: .25rem; --s2: .5rem; --s3: .75rem; --s4: 1rem; --s5: 1.5rem; --s6: 2rem; --s7: 3rem; --s8: 4.5rem;
}
@media (prefers-color-scheme: dark) { :root {
  --photo-wall-joint: rgba(181, 171, 160, .10);
  --panel-tint: #362d22;
  --panel-shadow: 0 0 14px rgba(0, 0, 0, .24), 0 2px 5px rgba(0, 0, 0, .16);
  --bg: #201c17; --panel: #2a241d; --panel-2: #362e24; --ink: #f4eadc; --muted: #c9bba8;
  --accent: #f4eadc; --on-accent: #201c17; --link: #e6bd84; --warm: #e6bd84; --brass: #bf975e;
  --line: #56493a; --control: #ac967a; --focus: #edbd7d; --ok: #8fce9f; --bad: #f2a29b;
} }
* { box-sizing: border-box; }
html { font-size: 112.5%; scroll-padding-top: 1rem; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 1rem/1.6 var(--sans); font-synthesis: style; text-align: left; }
h1, h2, h3, .brand, .name { font-family: var(--serif); font-synthesis: none; font-weight: 400; }
h1 { font-size: clamp(2.55rem, 1.9rem + 3.35vw, 4.2rem); line-height: 1.03; letter-spacing: -.025em; margin: .2em 0 .5em; }
h2 { font-size: 1.85rem; line-height: 1.15; margin: 1.8em 0 .5em; }
h3 { font-size: 1.4rem; line-height: 1.2; margin: 1.2em 0 .3em; }
.story { max-width: 65ch; }
p, li, dd { max-width: 65ch; } .events li, .rels li, .cards li, .ruled li, .gallery li, .family-grid li { max-width: none; }
.muted, .meta { color: var(--muted); font-size: .889rem; }
.when, time { font-variant-numeric: lining-nums; }
a { color: var(--link); text-decoration: none; }
main :is(p, dd, .story-paragraph) a:not(.button) { font-weight: 600; }
main a:not(.button):hover { color: var(--ink); }
header.site { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s5); align-items: center; padding: var(--s4) max(1rem, calc((100% - 68rem) / 2 + 1rem)) var(--s3); border-bottom: 1px solid var(--line); background: var(--panel); }
.brand { font-size: 1.444rem; font-weight: 700; letter-spacing: -.01em; line-height: 1.25; color: var(--ink); text-decoration: none; display: inline-flex; align-items: center; min-height: 2.75rem; }
nav { display: flex; flex-wrap: wrap; gap: 0 var(--s4); align-items: center; font-size: 1rem; }
nav a { display: inline-flex; align-items: center; min-height: 2.75rem; padding: 0 var(--s1); color: var(--ink); text-decoration: none; border-bottom: 3px solid transparent; }
nav a:hover { color: var(--accent); }
header.site nav a { min-inline-size: 44px; }
nav a[aria-current="page"] { font-weight: 700; }
header.site nav a[aria-current] {
  color: var(--link);
  font-weight: 700;
}
main { overflow-wrap: anywhere; max-width: 68rem; margin: 0 auto; padding: var(--s5) var(--s4) var(--s7); }
footer.site { text-align: center; color: var(--muted); padding: var(--s4); font-size: .889rem; border-top: 1px solid var(--line); }
footer.site p { margin-inline: auto; }
footer.site nav { justify-content: center; }
.narrow { max-width: 26rem; margin: var(--s6) auto; }
.panel { box-shadow: var(--panel-shadow); background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: var(--s1) var(--s5) var(--s4); margin: var(--s5) 0; }
.panel > h2:first-child { margin-top: var(--s4); }
.notice, .error { padding: var(--s3) var(--s4); border-radius: 4px; border: 1px solid var(--line); box-shadow: var(--panel-shadow); background: var(--panel); }
.notice { color: var(--ok); } .error { color: var(--bad); }
[data-connection-preview]:empty { display: none; }
.field-error { color: var(--bad); font-weight: 600; }
.error a {
  display: inline-flex;
  align-items: center;
  min-block-size: 44px;
  font-weight: 700;
}
main :is(input, select, textarea)[aria-invalid="true"] { border-color: var(--bad); }
main :is(input, select, textarea)[aria-invalid="true"]:target {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}
.notice::before, .error::before { font-weight: 700; }
.error::before { content: "Problem. "; }
.titlebar h1, .titlebar p { margin-block: 0; }
.titlebar { margin-bottom: var(--s4); display: flex; justify-content: space-between; align-items: center; gap: var(--s4); flex-wrap: wrap; }
label { display: block; font-size: .889rem; color: var(--muted); }
input, select, textarea { display: block; width: 100%; max-width: 100%; min-width: 0; min-height: 2.75rem; padding: var(--s2) var(--s3); margin-top: var(--s1); font: inherit; color: var(--ink); background: var(--panel); border: 1px solid var(--control); border-radius: 4px; }
input[type=file] { padding: var(--s1) 0; border: 0; background: none; }
input[type=checkbox], input[type=radio] { min-height: 0; }
.stack > * { margin-bottom: var(--s4); }
.row { display: flex; flex-wrap: wrap; gap: var(--s3); align-items: flex-end; margin: var(--s4) 0; }
.row label { flex: 1 1 14rem; min-width: 0; overflow: hidden; padding: 2px; } /* WebKit lets a long <select> option widen its label */
fieldset { border: 1px solid var(--line); border-radius: 8px; margin: 0 0 var(--s4); }
legend { font: 700 .889rem var(--sans); padding: 0 var(--s2); }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); gap: var(--s3); }
.member-name-details { margin-block-end: 0; }
.member-name-details summary { display: list-item; list-style-position: inside; }
.member-edit-subject { display: none; }
fieldset:target > .member-edit-subject { display: block; grid-column: 1 / -1; margin-block-start: 0; }
[data-member-editor] > fieldset {
  min-inline-size: 0;
  scroll-margin-block-start: var(--s4);
  background: var(--panel);
  box-shadow: var(--panel-shadow);
}
[data-member-editor] > fieldset:target {
  background: var(--panel-tint);
}
[data-member-editor] > fieldset > legend {
  font-size: 1rem;
  color: var(--ink);
}
#save-member { scroll-margin-block-start: var(--s4); }
.member-save {
  padding: var(--s3) var(--s4);
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel-2);
}
.member-save > p { margin: 0; }
.member-save > p + p { margin-block-start: var(--s2); }
[data-member-edit-status]:empty { margin: 0; }
button, .button {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  max-inline-size: 100%;
  padding: var(--s2) var(--s4);
  font: inherit;
  font-weight: 600;
  color: var(--on-accent);
  background: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 4px;
  cursor: pointer;
  text-decoration: none;
  white-space: normal;
  overflow-wrap: anywhere;
}
button:hover, .button:hover { filter: brightness(1.1); }
button.link { padding: 0 var(--s1); color: var(--link); background: none; border: 0;  font-weight: 400; font-size: .889rem; }
button.link:hover { filter: none; text-decoration-thickness: 2px; }
.button.quiet { color: var(--link); background: transparent; border-color: var(--accent); }
.button.quiet:hover { background: var(--panel-2); filter: none; }
form.inline { display: inline; }
.actions { display: flex; gap: var(--s2) var(--s3); align-items: center; flex-wrap: wrap; }
p.actions { margin-block: var(--s3); }
.actions > a:not(.button) { display: inline-flex; min-block-size: 44px; align-items: center; }
[hidden] { display: none !important; }
.js-only { display: none; }
.password-field [data-password-toggle] { margin-block-start: var(--s2); }
.cards { list-style: none; padding: 0; margin: var(--s4) 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: var(--s3); }
.cards li { max-width: none; }
.cards > li > .person-card { height: 100%; }
.empty { color: var(--muted); list-style: none; }
.qr { width: 14rem; max-width: 100%; background: #fff; padding: var(--s2); }
[data-share-link] {
  padding: var(--s4);
  margin-block: var(--s3);
  background: var(--panel-2);
  border: 1px solid var(--line);
  box-shadow: var(--panel-shadow);
  border-radius: 10px;
}
[data-share-link] h3 { margin-block-start: 0; }
[data-share-link] [data-copy-status]:empty { margin: 0; }
.share-recipient strong { display: block; overflow-wrap: anywhere; }
.share-qr { margin-block-start: var(--s3); }
.share-qr summary {
  width: fit-content;
  min-height: 2.75rem;
  padding: var(--s2) var(--s3);
  border: 1px solid var(--control);
  border-radius: 4px;
  background: var(--panel);
}
.history { list-style: none; padding: 0; }
.history > li {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  justify-items: start;
  gap: var(--s3);
  max-width: none;
  padding: var(--s4);
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
}
.history > li + li { margin-block-start: var(--s3); }
.history > li > p { margin: 0; }
.history-relationship {
  grid-column: 1 / -1;
  padding: var(--s2) var(--s3);
  border-radius: 8px;
  background: var(--panel-tint);
}
.history > li:target {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  scroll-margin-block-start: var(--s4);
}
.history > li:focus-within, .history > li:target { box-shadow: var(--panel-shadow); }
.history > li > details { justify-self: stretch; min-width: 0; margin: 0; }
.history > li > details > summary {
  display: list-item;
  list-style-position: inside;
  min-block-size: 44px;
  padding: var(--s2) var(--s3);
  border: 1px solid var(--control);
  border-radius: 8px;
  background: var(--panel-2);
  font-weight: 600;
}
.history > li > details > summary:is(:hover, :focus-visible) { background: var(--panel-tint); }
.history > li > details[open] > summary { margin-block-end: var(--s2); }
.history > li > form { max-width: 100%; }
.history > li > form .button { white-space: normal; text-align: start; }
.history-diffs { list-style: none; padding: 0; }
.history-diffs > li {
  padding: var(--s3);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  max-width: none;
}
.history-diffs > li + li { margin-top: var(--s3); }
.history-diffs h3 { margin: 0 0 var(--s2); }
.history-diffs dl { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr)); gap: var(--s2) var(--s3); margin: 0; }
.history-diffs dt { font-weight: 700; margin-block-end: var(--s1); }
.history-before, .history-after {
  min-width: 0;
  padding: var(--s2) var(--s3);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 4px;
}
.history-diffs dd { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.history-before { background: var(--panel-tint); }
.history-after { background: var(--panel-2); }
.history-undo-help {
  padding: var(--s3);
  background: var(--panel-tint);
  border-radius: 8px;
}
.history-undo-review {
  display: block;
  margin-block-start: var(--s3);
  padding-block-start: var(--s3);
  border-block-start: 1px solid var(--line);
}
.history-undo .button { max-inline-size: 100%; white-space: normal; overflow-wrap: anywhere; }
.history-story-diff dl { grid-template-columns: minmax(0, 1fr); gap: var(--s3); }
.history-story-diff dd { max-inline-size: 65ch; line-height: 1.65; }
.history-page { max-width: 50rem; margin-inline: auto; }
.history-cover { margin-block-end: var(--s4); }
.history-cover.page-cover { padding: clamp(1rem, 3vw, 2rem); }
.history-cover h1 { margin-block: 0 var(--s2); font-size: clamp(1.75rem, 4vw, 3rem); overflow-wrap: anywhere; }
.history-subject { max-width: 32rem; margin-block: var(--s3); }
.history-result-action { grid-column: 2; color: var(--link); font-weight: 700; }
.history-search-options > summary {
  display: list-item;
  list-style-position: inside;
  min-block-size: 44px;
  padding-block: var(--s2);
}

.history-page .button {
  max-inline-size: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
}
.history-photo { margin: var(--s3) 0; width: min(100%, 16rem); }
.history-photo img { display: block; width: 100%; max-height: 12rem; object-fit: contain; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; }
.history-photo figcaption { overflow-wrap: anywhere; }
table { border-collapse: collapse; font-size: .889rem; margin: var(--s2) 0; width: 100%; } th, td { text-align: left; padding: var(--s1) var(--s2); border: 1px solid var(--line); vertical-align: top; overflow-wrap: anywhere; }
/* Easy to see and to press: targets at least 44px, a clear keyboard focus, and a label for every field. */
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
summary, button.link { min-height: 2.75rem; }
.dates { display: grid; grid-template-columns: 6rem minmax(8rem, 12rem) 5rem; gap: var(--s3); margin-bottom: var(--s3); }
.check { display: flex; align-items: center; gap: var(--s3); min-height: 2.75rem; color: var(--ink); }
.check input { width: 1.5rem; height: 1.5rem; margin: 0; }
.hidden-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
details { margin: var(--s3) 0; } summary { display: flex; align-items: center; cursor: pointer; color: var(--link); font-size: 1rem; }
.inline-details { margin: 0; }

/* People: avatar, tones and person card (shared components) */
.avatar { display: inline-flex; flex: none; align-items: center; justify-content: center; width: 3.5rem; height: 3.5rem; border-radius: 50%; overflow: hidden; background: var(--panel-2); color: var(--muted); font: 700 1.167rem/1 var(--serif); text-transform: uppercase; }
.avatar img { display: block; width: 100%; height: 100%; object-fit: cover; }
.avatar-s { width: 2.5rem; height: 2.5rem; font-size: .889rem; }
.avatar-l { width: 5rem; height: 5rem; font-size: 1.444rem; }
.tone-0 { background: #e6ddcf; color: #4b3f30; }
.tone-1 { background: #e8d9c4; color: #57432d; }
.tone-2 { background: #eadcc2; color: #60492a; }
.tone-3 { background: #e7d9d2; color: #5c3a2e; }
.tone-4 { background: #e2d3bf; color: #554431; }
.tone-5 { background: #e9dcd3; color: #533e32; }
@media (prefers-color-scheme: dark) {
  .tone-0 { background: #40382e; color: #e6ddcf; }
  .tone-1 { background: #49382a; color: #e8d9c4; }
  .tone-2 { background: #493820; color: #eadcc2; }
  .tone-3 { background: #47332b; color: #e7d9d2; }
  .tone-4 { background: #493a2b; color: #e2d3bf; }
  .tone-5 { background: #49372b; color: #e9dcd3; }
}
.person-card { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; column-gap: var(--s3); min-height: 2.75rem; padding: var(--s3); color: var(--ink); text-decoration: none; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; }
.welcome { background: var(--panel-tint); margin-top: 0; padding-block: var(--s4); }
.welcome-intro h2 { margin: 0; }
.welcome-intro p { margin: var(--s2) 0; }
.welcome-actions .identify-search { margin-top: 0; }
.welcome-missing-page { grid-column: 1 / -1; margin: 0; }
.welcome-missing-page > summary { display: list-item; list-style-position: inside; min-block-size: 44px; padding-block: var(--s2); cursor: pointer; }
.home-recent { padding-block: var(--s2); }
.home-recent summary { display: list-item; font-weight: 600; }
@media (min-width: 54rem) {
  .welcome { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: var(--s2) var(--s6); align-items: center; }
}
@media (max-width: 34rem) {
  .welcome-actions .identify-search button { width: 100%; }
}
.identify-search { max-width: 32rem; margin-bottom: var(--s4); }
.choice-card { display: flex; flex-direction: column; gap: var(--s2); }
.choice-card .person-card { flex: 1; }
.directory-cards > .choice-card > .person-card { height: auto; }
.person-card:has(> .directory-profile-arrow) { grid-template-columns: auto minmax(0, 1fr) auto; }
.person-card:has(> .directory-profile-arrow) .name {
  color: var(--link);


}
.directory-profile-arrow {
  grid-column: 3;
  grid-row: 1 / span 2;
  color: var(--link);
}
.directory-cards .directory-story-available { margin-block-start: var(--s1); }
@media (max-width: 24rem) {
  .person-card:has(> .directory-profile-arrow) { grid-template-columns: auto minmax(0, 1fr); }
  .directory-profile-arrow { display: none; }
}
.directory-card-actions { padding-inline: var(--s2); }
.contact-cards .contact-card-details {
  margin-inline: var(--s2);
  padding: var(--s2) var(--s3);
  border-radius: 8px;
  background: var(--panel-tint);
  overflow-wrap: anywhere;
}
.directory-review-profile { color: var(--link); }
.directory-cards .directory-relationship {
  display: inline-block;
  margin-block: var(--s1);
  padding-inline: var(--s2);
  background: var(--panel-2);
  color: var(--ink);
  border-radius: 4px;
}
.relative-step { max-width: 40rem; }
.connection-flow { margin-inline: auto; }
.connection-cover.page-cover { padding: clamp(1rem, 3vw, 2rem); overflow-wrap: anywhere; }
.relative-create-choice {
  margin-block-start: var(--s4);
  padding-block-start: var(--s3);
  border-block-start: 1px solid var(--line);
}
.relative-create-choice p { margin-block: 0 var(--s2); }
.connection-people { list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr)); gap: var(--s2); padding: 0; }
.connection-person-label { font-size: 1rem; margin: 0 0 var(--s1); }
.connection-cover .connection-people .person-card {
  min-height: 100%;
  background: var(--panel-tint);
  border-color: var(--line);
  box-shadow: var(--panel-shadow);
}
.connection-cover > .person-card { max-width: 26rem; }
.upload-cover .upload-profile {
  background: var(--panel-tint);
  border-color: var(--line);
  box-shadow: var(--panel-shadow);
}
.upload-cover .upload-profile:hover { border-color: var(--accent); }
.upload-cover #upload-destination { overflow-wrap: anywhere; }
.contact-edit-form #edit-contact {
  padding: var(--s4);
  border: 1px solid var(--line);
  box-shadow: var(--panel-shadow);
  background: var(--panel);
}
.contact-edit-form #edit-contact > label + label { margin-block-start: var(--s3); }
.connection-form label { font-weight: 700; }
.connection-form select { max-width: 100%; font-weight: 400; }
.upload-retry li + li { margin-block-start: var(--s2); }
.upload-retry li { overflow-wrap: anywhere; }
.upload-retry li span { display: block; }
.upload-receipt .button, .upload-retry .button {
  max-inline-size: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
}
.relative-add-heading { margin-block-end: var(--s4); }
.relative-add-heading h1 { margin-block: 0 var(--s2); font-size: clamp(1.75rem, 4vw, 3rem); }
.relative-add-context {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s2) var(--s3);
  margin-block: var(--s3);
}
.relative-add-context p { margin: 0; }
.relative-progress { color: var(--muted); font-weight: 700; font-variant-numeric: tabular-nums; }
.relative-step label, .identify-search label { font-size: 1rem; color: var(--ink); }
dl.relative-review { display: block; padding-block-start: var(--s4); }
.relative-review dt { font-weight: 700; }
.relative-review dd { margin-inline-start: 0; overflow-wrap: anywhere; }
.relative-review dd + dt { margin-block-start: var(--s3); padding-block-start: var(--s3); border-block-start: 1px solid var(--line); }
.relative-review button.link { display: block; padding-inline: 0; }
#relative-review-connection {
  margin-block-start: var(--s2);
  padding: var(--s2) var(--s3);
  border-radius: 8px;
  background: var(--panel-tint);
}
a.person-card { box-shadow: var(--panel-shadow); }
a.person-card:hover, a.person-card:focus-visible { border-color: var(--accent); }
a.person-card .name {
  color: var(--link);


}
.person-card .avatar { grid-row: 1 / span 2; } .person-card .name, .person-card .meta { grid-column: 2; }
.person-card .name { font-size: 1.167rem; line-height: 1.35; font-weight: 700; }
.person-card .meta { display: block; color: var(--muted); }
.person-card .name, .person-card .meta { overflow-wrap: anywhere; }

/* Home page lists: ruled, not boxed */
ul.ruled { list-style: none; padding: 0; margin: 0; } ul.ruled li { padding: var(--s2) 0; border-bottom: 1px solid var(--line); } ul.ruled li:last-child { border: 0; }
.panel > :last-child { margin-bottom: var(--s4); }

/* ==================================================
   PERSON PAGE
   ================================================== */

.profile { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.5rem; align-items: start; margin-bottom: 2rem; }
.profile .portrait img { display: block; width: 100%; max-width: 13rem; aspect-ratio: 4 / 5; object-fit: cover; object-position: center 25%; border-radius: 8px; background: var(--panel-2); }
.profile .intro { min-width: 0; }
#profile-saved .button {
  box-sizing: border-box;
  max-inline-size: 100%;
  white-space: normal;
}
.profile .sentence { margin: .5rem 0; font-size: 1.1rem; }
@media (min-width: 48rem) { .profile { grid-template-columns: minmax(14rem, 20rem) minmax(0, 1fr); gap: 2rem; } .profile .portrait img { max-width: none; } }
dl { margin: 1rem 0 0; display: grid; grid-template-columns: auto 1fr; gap: .25rem 1rem; } dt { font: .889rem system-ui, sans-serif; color: var(--muted); } dd { margin: 0; overflow-wrap: anywhere; }
.profile-details { grid-template-columns: auto minmax(0, 1fr); align-items: baseline; }
.profile-details a { display: inline-block; padding-block: .5rem; max-width: 100%; }
.profile-address { white-space: pre-line; overflow-wrap: anywhere; scroll-margin-block-start: var(--s4); }
.authenticator-key { display: block; overflow-wrap: anywhere; }
@media (max-width: 36rem) {
  .profile-contact-actions > a { flex: 1 1 100%; text-align: center; }
}
#contact-details dd, #contact-details .button { overflow-wrap: anywhere; }
#contact-details .button { white-space: normal; }
.lead { font-size: 1.1em; }
.story { max-width: 40rem; margin-bottom: 2rem; }
.story-paragraph { white-space: pre-line; overflow-wrap: anywhere; }
.reading-story { margin-inline: auto; }
@media screen and (min-width: 64rem) {
  .reading-story:has(.story-reading-layout) { max-width: 64rem; }
  .story-reading-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
    align-items: start;
    gap: var(--s5);
    margin-block: var(--s4);
 }
  .story-reading-layout > .story-photo {
    margin: 0;
 }
  .story-reading-layout > .story-reading-page {
    margin: 0;
 }
}
.story-reading-page:empty { display: none; }
.story-reading-page {
  margin-block: var(--s4);
  padding: clamp(1rem, 4vw, 2.25rem);
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  box-shadow: var(--panel-shadow);
}
.story-reading-page > :first-child { margin-block-start: 0; }
.story-reading-page > :last-child { margin-block-end: 0; }
.story-reading-page #story-summary {
  border-radius: 8px;
  padding: var(--s2) var(--s3);
  background: var(--panel-tint);
}
.story-writing-page textarea {
  font: 1.15rem/1.6 var(--serif);
  background: var(--bg);
  scroll-margin-block-start: var(--s5);
}
.story-writing-page label { font-weight: 700; color: var(--ink); }
.story-writing-page [data-story-status]:empty { display: none; }
.story-prompts {
  padding-block: var(--s2);
  border: 1px solid var(--line);
  box-shadow: var(--panel-shadow);
  background: var(--panel-2);
}
.story-prompts summary { display: list-item; padding-block: var(--s2); font-weight: 700; }
.story-prompts li + li { margin-block-start: var(--s2); }
.story-writing-hint { display: block; margin-block: var(--s1) var(--s2); }
.story-writing-actions {
  border-block-start: 1px solid var(--line);
  padding-block-start: var(--s3);
}
.story-writing-actions > * { max-width: 100%; white-space: normal; overflow-wrap: anywhere; }
.story-photo { margin: var(--s4) 0 var(--s5); }
.story-photo .news-photo { margin-block-start: 0; }
.story-library-photo {
  min-width: 0;
  margin-block-end: var(--s2);
  padding: var(--s2);
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.story-library-photo img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  border-radius: 4px;
}
.story-photo .news-photo img { max-height: 24rem; object-fit: contain; }
.reading-story .story-paragraph {
  max-inline-size: 60ch;
  font-size: 1.15rem;
  line-height: 1.75;
}
.reading-story-large .story-paragraph { font-size: 1.45rem; }
.story-reading-page .story-paragraph + .story-paragraph { margin-block-start: 1.25em; }
@media (max-width: 36rem) {
  .story-reading-page { padding-inline: var(--s3); }
}
.reading-story .story-speaking {
  background: var(--panel-2);
  outline: 2px solid var(--accent);
}
.reading-edit-link { display: inline-flex; align-items: center; min-height: 2.75rem; }
#reading-text { scroll-margin-block-start: var(--s4); }
.reading-story .story-read-cover { margin-block-end: var(--s4); }
.story-read-cover > .actions:first-child { margin-block-start: 0; }
.reading-story .story-read-cover h1 {
  margin: 0;
  font-size: clamp(1.75rem, 4vw, 3rem);
  overflow-wrap: anywhere;
}
.story-reader-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--s3);
}
.story-reader-heading .story-reader-person { min-width: 0; margin: 0; }
.story-reader-heading > .share-qr { margin: 0; max-width: 100%; }
.story-reader-heading > .share-qr:not([open]) {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}
.story-reader-heading > .share-qr[open] { flex-basis: 100%; }
.story-read-cover.page-cover { padding: clamp(1rem, 3vw, 2rem); }
.story-reader-person {
  display: flex;
  align-items: center;
  gap: var(--s3);
  margin-block: var(--s3);
}
.story-reader-person .meta { display: block; }
.story-reading-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: start;
  gap: var(--s2) var(--s4);
  margin-block: var(--s4);
}
.story-reading-tools > .page-links, .story-reading-tools > .story-listen { margin: 0; }
.story-listen [role="status"]:empty { margin: 0; }
.story-section-links { margin-block: var(--s3); }
.story-section-links a {
  padding-inline: var(--s1);
  border: 0;
  background: transparent;
}
@media (max-width: 36rem) {
  .story-reading-tools, .story-section-links { margin-block: var(--s2); }
  .story-reading-tools {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
 }
  #story-text-size {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
 }
  #story-text-size a { justify-content: center; text-align: center; }
}
#story-prose { scroll-margin-block-start: var(--s4); }
.search-results-title { overflow-wrap: anywhere; }
.upload-selection { flex: 0 0 100%; min-width: 0; overflow-wrap: anywhere; }
.upload-selection ul { list-style: none; padding: 0; }
.upload-selection li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s2);
  max-width: none;
  padding-block: var(--s2);
  border-block-end: 1px solid var(--line);
}
.upload-file-details { display: flex; align-items: center; gap: var(--s2); min-width: 0; }
.upload-file-details span { min-width: 0; }
.upload-selection li img {
  flex: none;
  width: clamp(2rem, 12vw, 4rem);
  height: auto;
  aspect-ratio: 1;
  object-fit: contain;
  border-radius: 4px;
}
.tree-match-current, .connection-birthplace, .identify-review-label { grid-column: 2; }
.tree-match-action {
  grid-column: 2;
  color: var(--link);
  font-weight: 600;

}
.tree-comparison-links a {
  display: grid;
  gap: var(--s1);
  max-width: 100%;
  text-decoration: none;
}
.tree-comparison-links span { color: var(--muted); font-size: .889rem; }
.tree-comparison-links .tree-comparison-current { color: var(--ink); font-weight: 700; }
.tree-comparison-links a[aria-current="true"] {
  background: var(--panel-2);
  box-shadow: inset 0 -3px var(--accent);
}
.identify-review-label { }
#family-directory { scroll-margin-block-start: var(--s4); }
.directory-cards .person-card { scroll-margin-block-start: var(--s4); }
.directory-cards .directory-return-label { display: none; }
.directory-cards .person-card:target .directory-return-label {
  display: block;
  color: var(--ink);
  font-weight: 700;
}
#story-text-size a {
  gap: var(--s2);
  min-block-size: 44px;
}
#story-text-size a[aria-current="true"] {
  color: var(--ink);
  background: var(--panel-tint);
  font-weight: 700;
  border-color: var(--accent);
  box-shadow: inset 0 -3px var(--accent);
}
.story-size-current { color: var(--link); }
.story > p:target, .reading-story .story-paragraph:target { outline: 3px solid var(--focus); outline-offset: 4px; scroll-margin-top: var(--s4); }
.story-paragraph[aria-describedby="matching-passage"] {
  padding: var(--s3);
  border: 1px solid var(--line);
  box-shadow: var(--panel-shadow);
  border-radius: 6px;
  background: var(--panel-2);
}
.story-match-note {
  margin-block: var(--s2) var(--s3);
  color: var(--muted);
  font: 600 .889rem/1.5 var(--sans);
}
#story-end {
  margin-block: var(--s5) var(--s3);
  scroll-margin-block-start: var(--s4);
  background: radial-gradient(ellipse at 0% 0%, var(--panel), transparent 80%), var(--panel-2);
}
#story-end:target { outline: 3px solid var(--focus); outline-offset: 2px; }
.story-memory-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr));
  gap: var(--s2);
  margin: 0;
  padding: 0;
  list-style: none;
}
.story-memory-links a {
  display: grid;
  align-content: center;
  gap: var(--s1);
  min-height: 2.75rem;
  height: 100%;
  padding: var(--s3);
  border: 1px solid var(--control);
  box-shadow: var(--panel-shadow);
  border-radius: 10px;
  background: var(--panel);
  font: 700 1.1rem/1.35 var(--serif);
}
.story-memory-links .story-memory-described { text-decoration: none; }
.story-memory-preview {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 6px;
}
.story-memory-links strong { }
.story-memory-links span { color: var(--muted); font: 400 1rem/1.45 var(--sans); }
.story-memory-links a:is(:hover, :focus-visible) { background: var(--panel-2); border-color: var(--accent); }
.story-return-links {
  border-block-start: 1px solid var(--line);
  padding-block-start: var(--s3);
  margin-block-end: 0;
}
.story-passage-back { display: none; }
.story > p:target + .story-passage-back { display: block; margin-block: var(--s3); }
.family { margin-bottom: 2rem; }
.family-grid { list-style: none; padding: 0; margin: 0 0 1rem; display: grid; grid-template-columns: minmax(0, 1fr); gap: .75rem; }
.family-grid li { min-width: 0; }
.family-grid .person-card { min-height: 2.75rem; }
.family-grid > li:target { scroll-margin-block-start: var(--s4); }
.family-grid > li:target > .person-card { outline: 3px solid var(--focus); outline-offset: 2px; }
.family-grid .family-link-added {
  grid-column: 1 / -1;
  padding: var(--s3);
  background: var(--panel-tint);
  border: 1px solid var(--line);
  box-shadow: var(--panel-shadow);
  border-radius: 8px;
}
.family-link-added > :first-child { margin-block-start: 0; }
.family-link-added > :last-child { margin-block-end: 0; }
.family-link-added .person-card { background: var(--panel); }
@media (min-width: 36rem) { .family-grid { grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); } }
.media { margin-bottom: 2rem; }
.recording-index { margin-block: var(--s3); overflow-wrap: anywhere; }
.recording-index summary { cursor: pointer; padding-block: var(--s2); }
.recording-index li { padding-block: var(--s1); }
.recording-index a { display: inline-flex; align-items: center; min-block-size: 44px; }
.family-recording { display: grid; gap: var(--s2); overflow-wrap: anywhere; }
.family-recording:target {
  scroll-margin-block-start: var(--s4);
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}
.family-recording figcaption { display: grid; gap: var(--s1); padding-block-end: var(--s2); border-block-end: 1px solid var(--line); }
.family-recording figcaption strong { font: 700 1.2rem/1.3 var(--serif); }
.family-recording audio { min-width: 0; }
.family-recording > a {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  min-height: 2.75rem;
  padding-block: var(--s2);
}
.changes { margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.profile-edit-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr));
  align-items: stretch;
  gap: var(--s2);
}
.profile-edit-links .button { text-align: center; }
.changes details { margin: .5rem 0; }
.changes summary { display: flex; align-items: center; min-height: 2.75rem; cursor: pointer; }
.rels { list-style: none; padding: 0; margin: 0; }
.rels li { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem 1rem; padding: .35rem 0; border-bottom: 1px solid var(--line); }
.rels li:last-child { border: 0; }
.rels .rel-name { flex: 1 1 12rem; min-width: 0; overflow-wrap: anywhere; }
.rels .inline-details { flex: 1 1 100%; }
.add-relatives { gap: .5rem; }
.events { list-style: none; padding: 0; margin: 0; } .events li { display: grid; grid-template-columns: minmax(7rem, 14rem) 1fr auto; gap: .2rem 1rem; padding: .35rem 0; border-bottom: 1px solid var(--line); } .events li:last-child { border: 0; }
.when { font-family: system-ui, sans-serif; font-size: .95rem; color: var(--muted); }
.chain { padding-left: 1.4rem; } .chain li { padding: .2rem 0; }


/* ==================================================
   PHOTOS
   ================================================== */

.gallery { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr)); gap: .75rem; }
.gallery img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px; background: var(--line); }
.photo-wall {
  grid-template-columns: minmax(0, 1fr);
  gap: var(--s4);
  padding: var(--s4);
  background: var(--panel-2);
  background-image: radial-gradient(ellipse at 50% 18%, var(--panel), transparent 75%);
  border: 1px solid var(--line);
  border-radius: 14px;
}
.contact-cards { gap: var(--s4); }
.contact-cards > .choice-card {
  padding: var(--s3);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--panel-shadow);
}
.contact-cards > .choice-card > .person-card {
  flex: none;
  background: var(--panel-2);
}
.contact-card-details {
  display: grid;
  gap: var(--s2);
  overflow-wrap: anywhere;
}
.contact-card-details strong {
  display: block;
  color: var(--muted);
  font-size: .889rem;
}
.contact-cards .actions { margin-block-start: auto; padding-block-start: var(--s2); gap: var(--s2); }
.contact-identity { display: flex; align-items: center; gap: var(--s3); margin-block: var(--s2); overflow-wrap: anywhere; }
.contact-identity .avatar { flex: none; }
.contact-identity .meta { display: block; }
.contact-card-details {
  padding-block: var(--s2);
  border-block-end: 1px solid var(--line);
}
.contact-card-details bdi { display: block; }
.photo-wall li { min-width: 0; }
.photo-wall li[id^="saved-photo-"] {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}
.photo-wall li[id^="saved-photo-"] > .notice { margin-block: 0 var(--s2); }
.photo-wall a {
  position: relative;
  scroll-margin-block: var(--s4);
  display: block;
  height: 100%;
  padding: var(--s2);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: var(--panel-shadow), 0 3px 8px rgba(43, 32, 23, .12);
}
.photo-wall a:hover, .photo-wall a:focus-visible { border-color: var(--accent); }
.photo-wall-position { display: none; }
.photo-wall a:target .photo-wall-position,
.photo-wall a:focus-visible .photo-wall-position {
  display: block;
  position: absolute;
  inset-block-end: var(--s2);
  inset-inline-start: var(--s2);
  max-inline-size: calc(100% - 2 * var(--s2));
  padding: var(--s1) var(--s2);
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--panel);
  color: var(--ink);
  font-weight: 700;
}
.photo-wall a:target .photo-wall-position { box-shadow: var(--panel-shadow); }
.photo-wall img { border-radius: 4px; background: var(--panel-2); }
.photo-wall-featured > li:first-child img { object-fit: contain; object-position: center; }
.photo-wall-featured > li:first-child a {
  border-color: var(--control);
  box-shadow: inset 0 0 0 3px var(--panel-2), var(--panel-shadow), 0 5px 14px rgba(43, 32, 23, .16);
}
.photo-wall-featured > li:first-child a:hover,
.photo-wall-featured > li:first-child a:focus-visible { border-color: var(--accent); }
@media (max-width: 53.999rem) {
  .photo-wall-featured > li:first-child img {
    aspect-ratio: auto 3 / 2;
    max-block-size: min(64vh, 26rem);
 }
}
@media (max-width: 21.999rem) {
  .photo-wall { padding: var(--s2); gap: var(--s3); }
  .photo-wall-featured > li:first-child img { aspect-ratio: 1; }
}
@media (min-width: 22rem) and (max-width: 53.999rem) {
  .photo-wall-featured {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--s3);
    padding: var(--s3);
 }
  .photo-wall-featured > li:first-child { grid-column: 1 / -1; }
  .photo-wall-featured > li:first-child a { padding: var(--s3); }
}
@media (min-width: 36rem) {
  .photo-wall { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .photo-wall li:only-child { max-width: 30rem; }
}
@media (min-width: 54rem) {
  .photo-wall { grid-template-columns: repeat(3, minmax(0, 1fr)); padding: var(--s5); }
  .photo-wall-featured { grid-auto-rows: clamp(8rem, 16vw, 13rem); }
  .photo-wall-featured li:first-child { grid-column: span 2; grid-row: span 2; }
  .photo-wall-featured img { height: 100%; }
  .photo-wall-featured > li:not(:first-child) img { object-position: center 38%; }
  .photo-wall-centered, .photo-wall-surround {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    padding-inline: max(var(--s5), calc((100% - 64rem) / 2));
    background-image:
      radial-gradient(ellipse at 50% 22%, var(--panel), transparent 72%),
      repeating-linear-gradient(to bottom, var(--photo-wall-joint) 0 1px, transparent 1px 2rem);
 }
  .photo-wall-centered > li, .photo-wall-surround > li { grid-column: span 4; }
  .photo-wall-centered > li:first-child, .photo-wall-surround > li:first-child { grid-column: 4 / 10; }
  .photo-wall-centered { grid-auto-rows: clamp(8rem, 12vw, 11rem); }
  .photo-wall-centered > li:nth-child(2), .photo-wall-centered > li:nth-child(4) { grid-column: 1 / 4; }
  .photo-wall-centered > li:nth-child(3), .photo-wall-centered > li:nth-child(5) { grid-column: 10 / 13; }
  .photo-wall-centered > li:nth-child(-n+3) { grid-row: 1; }
  .photo-wall-centered > li:first-child { grid-row: 1 / 3; }
  .photo-wall-centered > li:nth-child(4), .photo-wall-centered > li:nth-child(5) { grid-row: 2; }
  .photo-wall-centered > li:nth-child(6):last-child { grid-column: 5 / 9; }

  .photo-wall-surround {
    gap: clamp(.55rem, 1.2vw, 1rem);
    grid-template-rows: clamp(6rem, 8vw, 8rem) repeat(2, clamp(8rem, 12vw, 11rem)) clamp(6rem, 8vw, 8rem);
 }
  .photo-wall-surround > li:first-child { grid-row: 2 / 4; }
  .photo-wall-surround > li:nth-child(2) { grid-area: 1 / 1 / 3 / 4; }
  .photo-wall-surround > li:nth-child(3) { grid-area: 1 / 5 / 2 / 9; }
  .photo-wall-surround > li:nth-child(4) { grid-area: 1 / 10 / 2 / 13; }
  .photo-wall-surround > li:nth-child(5) { grid-area: 2 / 10 / 4 / 13; }
  .photo-wall-surround > li:nth-child(6) { grid-area: 3 / 1 / 5 / 4; }
  .photo-wall-surround > li:nth-child(7) { grid-area: 4 / 5 / 5 / 9; }
  .photo-wall-surround > li:nth-child(3), .photo-wall-surround > li:nth-child(7) {
    justify-self: center;
    width: min(100%, 14rem);
 }
  /* Balance the last row of the three-column layout beneath the centerpiece. */
  .photo-wall-surround > li:nth-child(3n + 8):last-child {
    grid-column: 5 / 9;
 }
  .photo-wall-surround > li:nth-child(3n + 8):nth-last-child(2) {
    grid-column: 2 / 6;
 }
  .photo-wall-surround > li:nth-child(3n + 9):last-child {
    grid-column: 8 / 12;
 }
  .photo-wall-centered > li > a,
  .photo-wall-surround > li > a,
  .photo-wall-featured > li:first-child a {
    display: grid;
    grid-template: minmax(0, 1fr) / minmax(0, 1fr);
    place-items: center;
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
 }
  .photo-wall-centered > li img,
  .photo-wall-surround > li img,
  .photo-wall-featured > li:first-child img {
    width: auto;
    height: auto;
    max-height: 100%;
    object-fit: contain;
    max-width: 100%;
    min-height: 0;
    aspect-ratio: auto;
    padding: var(--s2);
    background: var(--panel);
    border: 1px solid var(--control);
    border-radius: 6px;
    box-shadow: var(--panel-shadow), 0 5px 14px rgba(43, 32, 23, .16);
 }
  .photo-wall-featured > li:first-child img { height: 100%; }
  .photo-wall-surround > li:first-child img {
    padding: clamp(.65rem, 1.5vw, 1.2rem);
    border: 2px solid var(--control);
    box-shadow: inset 0 0 0 3px var(--panel-2), var(--panel-shadow), 0 6px 18px rgba(43, 32, 23, .18);
 }
  .photo-wall-centered a:is(:hover, :focus-visible) img,
  .photo-wall-surround a:is(:hover, :focus-visible) img,
  .photo-wall-featured > li:first-child a:is(:hover, :focus-visible) img {
    border-color: var(--accent);
 }
}
.photo { margin: 1rem 0; }
.photo-mat { display: flex; justify-content: center; padding: .5rem; background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; }
.photo-people-list .actions { margin: 0; }
.photo-cover h1 { overflow-wrap: anywhere; }
.photo-mat img { display: block; max-width: 100%; max-height: 80vh; width: auto; height: auto; object-fit: contain; }
.photo-mat.photo-actual { display: block; max-height: 70vh; overflow: auto; }
.photo-mat.photo-actual img { max-width: none; max-height: none; }
#original-photo { scroll-margin-block-start: var(--s4); }
.photo figcaption { margin-top: .5rem; overflow-wrap: anywhere; }
.photo-caption-people { display: inline-flex; align-items: center; min-height: 2.75rem; font-weight: 600; }
#view-photo, #photo-people { scroll-margin-block-start: var(--s4); }
.photo-nav { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); margin: var(--s4) 0 var(--s2); }
.photo-position { margin: 0; padding: var(--s2); color: var(--muted); }
.photo-nav-primary { padding: var(--s2); background: var(--panel-tint); border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--panel-shadow); }
#view-photo { scroll-margin-block-start: var(--s4); }
.photo-nav-primary .photo-position { font-weight: 700; color: var(--ink); }
.photo-nav-primary .photo-step-names { margin-inline-start: auto; }
.photo-size-status { margin-block-end: var(--s2); color: var(--muted); }
@media (max-width: 36rem) {
  .photo-nav-primary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
 }
  .photo-nav-primary .photo-position {
    grid-column: 1 / -1;
    grid-row: 1;
    padding-block: 0;
 }
  .photo-nav-primary .photo-step { justify-content: center; text-align: center; }
  .photo-nav-primary [rel="prev"] { grid-column: 1; }
  .photo-nav-primary [rel="next"] { grid-column: 2; }
  .photo-nav-primary .photo-step-names {
    grid-column: 1 / -1;
    margin-inline-start: 0;
 }
  .photo-nav-primary > .button {
    grid-column: 1 / -1;
    justify-self: start;
 }
}
.photo-cover .button, .photo-nav .button, .photo-view-actions .button, #photo-people .button, #photo-people button {
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
}
#photo-people .cards { grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr)); }
.photo-match-review {
  grid-column: 2;
  color: var(--link);

}
.photo-picker-preview {
  display: flex;
  align-items: center;
  gap: var(--s3);
  width: fit-content;
  max-width: 100%;
  margin-block: var(--s3);
}
.photo-picker-preview img { object-fit: contain; background: var(--panel-2); border-radius: 6px; max-width: 40%; }
.photo-picker-preview strong, .photo-picker-preview .meta { display: block; }
.photo-picker-preview > span { min-width: 0; overflow-wrap: anywhere; }
.photo-remove-name { margin-block-start: var(--s3); padding-block-start: var(--s2); border-block-start: 1px solid var(--line); }
.photo-wall a:target, .person-card:target, .news-photo:target { outline: 3px solid var(--focus); outline-offset: 2px; }
.photo-step { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; min-width: 44px; padding: .4rem 1rem; color: var(--link); background: var(--panel); border: 1px solid var(--line); border-radius: 6px; text-decoration: none; }
video { width: 100%; max-height: 70vh; background: #000; } audio { width: 100%; } figure { margin: 1rem 0; } figcaption { font-size: .9em; }


/* ==================================================
   FAMILY TREE
   ================================================== */

main.wide { max-width: none; }
.tree-view { display: flex; flex-direction: column; gap: 1.5rem; }
.tree-view > * { min-width: 0; }
.tree-wrap { overflow: auto; max-width: 100%; max-height: 78vh; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; cursor: grab; }
.tree-chart .tree-wrap {
  background: var(--panel-2);
  background-image: radial-gradient(ellipse at 50% 20%, var(--panel), transparent 85%);
}
.tree-chart .t-card { stroke: var(--control); }
.tree-chart .t-focus { stroke: var(--accent); }
.tree-wrap:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.tree-wrap.dragging { cursor: grabbing; }
.tree-wrap.dragging a { pointer-events: none; }
.tree { display: block; max-width: none; margin: 0 auto; }
.tree path { fill: none; stroke: var(--muted); stroke-width: 1.5; }
.tree .t-spouse { stroke: var(--accent); stroke-width: 2.5; }
.tree .t-former { stroke-dasharray: 6 4; }
.tree .t-step { stroke-dasharray: 3 4; }
.tree .t-sibling { stroke-dasharray: 1 4; stroke-linecap: round; }
.t-card { fill: var(--panel); stroke: var(--line); stroke-width: 1.5; }
.tree a:hover .t-card, .tree a:focus .t-card { stroke: var(--link); }
.t-focus { fill: var(--accent); stroke: var(--accent); }
.tree .t-memory:not(.t-isfocus) .t-card { fill: var(--panel-2); }
.tree text { text-anchor: start; font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", Ubuntu, Cantarell, "Helvetica Neue", Arial, sans-serif; fill: var(--ink); }
.tree .t-name { font-size: 14px; font-weight: 600; }
.tree .t-sub { font-size: 13px; fill: var(--muted); }
.tree .t-ini { font-size: 14px; font-weight: 600; text-anchor: middle; }
.tree .t-more { font-size: 13px; font-weight: 600; text-anchor: middle; fill: var(--link); }
.tree .t-isfocus .t-name, .tree .t-isfocus .t-sub, .tree .t-isfocus .t-more { fill: var(--on-accent); }
.tree-chart .tree .t-near .t-card { stroke: var(--link); stroke-width: 4; }
.tree-chart .tree .t-near.t-isfocus .t-card { fill: var(--panel-tint); }
.tree-chart .tree .t-near.t-isfocus :is(.t-name, .t-sub, .t-more) { fill: var(--ink); }
.tree-chart .tree .t-selected .t-card { stroke: var(--focus); stroke-width: 5; stroke-dasharray: 8 3; }
.tree-chart .tree a:focus-visible .t-card { stroke: var(--focus); stroke-width: 5; }
.tree-selection [data-tree-selection-status] { margin-block: var(--s2); }
.tree-selection [data-tree-selection-status]:empty { margin: 0; }
.tree-selection-active {
  margin-block: var(--s3);
  padding: var(--s3);
  background: var(--panel-tint);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--panel-shadow);
}
.tree-selection-active [data-tree-selection-status] {
  margin-block-start: 0;
  font-weight: 700;
}
.tree-selection .actions:not([hidden]) {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s2);
  margin-block: var(--s2);
}
.tree-selection .actions > .button { width: auto; max-width: 100%; white-space: normal; }
.tree-highlight-guide {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s2) var(--s4);
  margin-block: var(--s3) var(--s2);
  padding: 0;
  list-style: none;
}
.tree-highlight-guide li { display: flex; align-items: center; gap: var(--s2); }
.tree-outline-sample {
  flex: none;
  inline-size: 1.55rem;
  block-size: 1rem;
  border-radius: 4px;
  background: var(--panel);
}
.tree-outline-selected { border: 3px dashed var(--focus); }
.tree-outline-relative { border: 3px solid var(--link); }
.tree-highlight-title { margin: 0 0 var(--s2); font-size: 1.15rem; }
.tree-highlight-hint { margin: var(--s2) 0; }
.tree-highlight-links {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 12rem), 1fr));
  gap: var(--s2);
  list-style: none;
  padding: 0;
  margin-block: var(--s2) var(--s3);
}
.tree-highlight-links:last-child { margin-block-end: 0; }
.tree-highlight-links > li { min-inline-size: 0; max-inline-size: 100%; }
.tree-highlight-links .button {
  display: block;
  inline-size: 100%;
  block-size: 100%;
  min-block-size: 44px;
  max-inline-size: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
  text-align: start;
  background: var(--panel);
  box-shadow: var(--panel-shadow);
}
.tree-highlight-links .button:is(:hover, :focus-visible) { background: var(--panel-tint); }
.tree-highlight-relationship { display: block; font-weight: 400; }
@media (min-width: 64rem) {
  .tree-selection-active {
    display: grid;
    grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
    align-items: start;
    column-gap: var(--s5);
 }
  .tree-selection-active [data-tree-selection-status],
  .tree-selection-active .actions { grid-column: 1; }
  .tree-selection-active .actions:not([hidden]) { max-width: none; margin-block: 0; }
  .tree-selection-active [data-tree-highlight-guide] {
    grid-column: 2;
    grid-row: 1 / span 2;
 }
  .tree-selection-active .tree-highlight-guide { margin-block-start: 0; }
}
.tree .tone-0 circle { fill: #e6ddcf; }
.tree .tone-0 .t-ini { fill: #4b3f30; }
.tree .tone-1 circle { fill: #e8d9c4; }
.tree .tone-1 .t-ini { fill: #57432d; }
.tree .tone-2 circle { fill: #eadcc2; }
.tree .tone-2 .t-ini { fill: #60492a; }
.tree .tone-3 circle { fill: #e7d9d2; }
.tree .tone-3 .t-ini { fill: #5c3a2e; }
.tree .tone-4 circle { fill: #e2d3bf; }
.tree .tone-4 .t-ini { fill: #554431; }
.tree .tone-5 circle { fill: #e9dcd3; }
.tree .tone-5 .t-ini { fill: #533e32; }
@media (prefers-color-scheme: dark) {
  .tree .tone-0 circle { fill: #40382e; }
  .tree .tone-0 .t-ini { fill: #e6ddcf; }
  .tree .tone-1 circle { fill: #49382a; }
  .tree .tone-1 .t-ini { fill: #e8d9c4; }
  .tree .tone-2 circle { fill: #493820; }
  .tree .tone-2 .t-ini { fill: #eadcc2; }
  .tree .tone-3 circle { fill: #47332b; }
  .tree .tone-3 .t-ini { fill: #e7d9d2; }
  .tree .tone-4 circle { fill: #493a2b; }
  .tree .tone-4 .t-ini { fill: #e2d3bf; }
  .tree .tone-5 circle { fill: #49372b; }
  .tree .tone-5 .t-ini { fill: #e9dcd3; }
}
@media print { .tree .t-isfocus .t-name, .tree .t-isfocus .t-sub, .tree .t-isfocus .t-more { fill: #000; } }
.tree-tools:not(.js-only) { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--s1) var(--s4); margin: var(--s2) 0; }
.tree-tools .tree-zoom { margin-block: 0; }
.tree-tools .tree-zoom-status { flex-basis: 100%; margin: 0; }
#family-chart-title { margin-block-start: var(--s3); }
#tree-chart-help { margin-block: var(--s3); }
.tree-zoom { margin-block: var(--s2); }
.tabs { display: flex; flex-wrap: wrap; gap: 0 1.25rem; margin: 0; font-family: system-ui, sans-serif; }
.tabs a { display: inline-flex; align-items: center; min-height: 2.75rem; padding: 0 .25rem; border-bottom: 3px solid transparent; }
.tabs a[aria-current="page"] { font-weight: 700; color: var(--ink); background: var(--panel-tint); border-radius: 6px; }
.tabs.filter-tabs {
  gap: var(--s2);
  scroll-margin-block-start: var(--s4);
}
.filter-tabs a {
  gap: var(--s1);
  justify-content: center;
  padding: var(--s2) var(--s3);
  border: 1px solid var(--control);
  border-radius: 8px;
  background: var(--panel);
  text-align: center;
}
.filter-tabs a[aria-current="page"] {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--on-accent);

}
@media (max-width: 34rem) {
  .tabs.filter-tabs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 7rem), 1fr));
 }
}
.tree-find label { display: block; font-weight: 600; }
.tree-find-row { display: flex; gap: .5rem; max-width: 32rem; }
.tree-find-row input { flex: 1 1 auto; min-width: 0; min-height: 2.75rem; }
.tree-find-row button { min-height: 2.75rem; }
.tree-more summary { cursor: pointer; padding: .6rem 0; min-height: 2.75rem; box-sizing: border-box; }
.tree-form label { flex: 1 1 8rem; }
@media (max-width: 36rem) {
  .tree-form label { flex-basis: 100%; }
}
.tree-matches { margin: 1rem 0; }
.tree-unconnected-cards > li { min-width: 0; }
.tree-unconnected-cards .name { overflow-wrap: anywhere; }
.tree-unconnected-cards .actions { margin-block: 0; }
.tree-unconnected-cards .actions > .button { max-width: 100%; white-space: normal; }
.family-sheet h2 { margin: 0; }
.family-sheet h3 {
  margin: var(--s5) 0 var(--s3);
  padding-block-end: var(--s2);
  border-block-end: 1px solid var(--line);
}
.sheet-focus {
  border: 1px solid var(--line);
  box-shadow: var(--panel-shadow);
  border-radius: 12px;
  padding: var(--s4);
  background: radial-gradient(ellipse at 100% 0%, var(--panel) 0%, transparent 75%), var(--panel-2);
}
.sheet-focus > :last-child { margin-bottom: 0; }
#family-list:focus-visible { outline: none; }
#family-list:focus-visible > .sheet-focus {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}
.sheet-focus-person { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--s3); align-items: center; }
.sheet-focus .meta { margin: .1rem 0 0; color: var(--muted); }
.page-cover .tree-view-tabs {
  width: fit-content;
  max-width: 100%;
  gap: var(--s1);
  padding: var(--s1);
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
}
.tree-view-tabs a { gap: var(--s1); padding-inline: var(--s2); border-radius: 6px; }
.tree-view-tabs a[aria-current="page"] { background: var(--accent); color: var(--on-accent); }
.lifetimes-cover { margin-block-end: var(--s4); }
.lifetimes-cover.page-cover { padding: clamp(1rem, 3vw, 2rem); }
.lifetimes-cover .titlebar { align-items: start; gap: var(--s3) var(--s5); }
.lifetimes-cover h1 { margin: 0; font-size: clamp(1.75rem, 4vw, 3rem); }
.lifetimes-cover p { margin-block: var(--s2) 0; }
.lifetimes-search { max-width: 44rem; padding: var(--s4); }
#lifetimes-views a { gap: var(--s1); }
#lifetimes-views a.button { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
#lifetimes-views a[aria-current="page"] { background: var(--panel-tint); border-color: var(--accent); }
.sheet-view-links {
  padding-block-start: var(--s3);
  border-block-start: 1px solid var(--line);
}
.sheet-list, .sheet-kids { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.family-sheet .sheet-list .person-card, .family-sheet .sheet-kids .person-card { box-shadow: var(--panel-shadow); }
@media (min-width: 48rem) { .sheet-list { grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); } }
.sheet-kids-label { margin: var(--s2) 0 0; }
.sheet-kids { margin: .5rem 0 0 1.25rem; padding-left: .75rem; border-left: 2px solid var(--line); }
@media (max-width: 34rem) { .sheet-kids { margin-inline-start: .25rem; padding-inline-start: .5rem; } }
.legend { display: flex; flex-wrap: wrap; gap: .3rem 1.2rem; }
.key::before { content: ""; display: inline-block; width: 2rem; margin-right: .4rem; vertical-align: middle; border-top: 2px solid var(--muted); }
.key-spouse::before { border-top: 3px solid var(--accent); }
.key-former::before { border-top: 3px dashed var(--accent); }
.key-step::before { border-top: 2px dashed var(--muted); }
.key-sibling::before { border-top: 2px dotted var(--muted); }
.lifetimes { cursor: auto; }
.lifetimes svg.life { display: block; max-width: none; }
.lifetimes .life-years { position: sticky; inset-block-start: 0; z-index: 1; background: var(--panel); }
.lifetimes .life-years + .life { margin-block-start: -28px; }
.lifetimes .lf-row { scroll-margin-block-start: 28px; }
.lifetimes .lf-grid { stroke: var(--line); }
.lifetimes .lf-year { fill: var(--muted); }
.lifetimes .lf-bar { fill: var(--panel-2); stroke: var(--control); }
.lifetimes .lf-edge { fill: var(--accent); }
.lifetimes .lf-me .lf-bar { fill: var(--accent); }
.lifetimes .lf-me .lf-edge { fill: var(--ink); }
.lifetimes .lf-open { stroke: var(--muted); }
.lifetimes .lf-cap { fill: var(--ink); }
.lifetimes .lf-name { fill: var(--ink); stroke: var(--panel); stroke-width: 3px; paint-order: stroke; stroke-linejoin: round; }
.lifetimes a { cursor: pointer; }
.lifetimes a:hover .lf-bar { stroke: var(--accent); stroke-width: 2px; }
.lifetimes a:focus { outline: none; }
.lifetimes .lf-row:focus-visible .lf-hit { stroke: var(--focus); stroke-width: 3px; stroke-dasharray: 6 4; }
.lf-key-live::before { border-top: 8px solid var(--accent); }
.lf-key-gone::before { border-top: 8px solid var(--accent); border-right: 4px solid var(--ink); }
.lf-key-open::before { border-top: 3px dashed var(--muted); }
.lf-key-me::before { border-top: 8px solid var(--accent); outline: 2px solid var(--accent); }
.lf-list { margin: 1.5rem 0 0; }
.lf-list .button { align-self: start; }
.lifetimes-people > li:target { outline: 3px solid var(--focus); outline-offset: 2px; }
.lifetimes-people > li {
  min-width: 0;
  padding: var(--s3);
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  box-shadow: var(--panel-shadow);
}
.lifetimes-people > li > .person-card {
  padding: var(--s2) 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}
.lifetime-person-actions { gap: var(--s2) var(--s3); }
.lifetime-person-actions > a:not(.button) { display: inline-flex; align-items: center; min-height: 44px; }
#timeline-person { overflow-wrap: anywhere; }
.lifetimes .lf-row:is(.lf-selected, :target, :focus-visible) .lf-bar { stroke: var(--focus); stroke-width: 3px; }
.lifetimes .lf-row:is(.lf-selected, :target, :focus-visible) .lf-hit { fill: var(--focus); fill-opacity: .12; }
.lifetimes .lf-row:is(.lf-selected, :target, :focus-visible) .lf-name {
  font-weight: 700;

}
.lifetimes-chart-selection {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 var(--s3);
  padding: var(--s1) var(--s3);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
}
.lifetimes-chart-selection a { display: inline-flex; align-items: center; min-block-size: 44px; }
.dates-page { margin: 1.5rem 0; }
.dates-month-picker {
  margin-block-start: var(--s3);
  border: 1px solid var(--control);
  border-radius: 10px;
  background: var(--panel-2);
}
.dates-month-picker summary {
  display: list-item;
  min-block-size: 44px;
  padding: var(--s3);
  list-style-position: inside;
  font-weight: 600;
  scroll-margin-block-start: var(--s4);
}
.dates-month-picker[open] summary { border-block-end: 1px solid var(--line); }
.dates-month-picker .page-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr));
  gap: var(--s2);
  margin: 0;
  padding: var(--s3);
}
.dates-month-picker .page-links a {
  display: flex;
  justify-content: space-between;
  gap: var(--s1) var(--s2);
  flex-wrap: wrap;
  min-block-size: 44px;
  overflow-wrap: anywhere;
}
.dates-month-picker .page-links .meta {
  color: var(--muted);
  font-size: .875rem;
  font-weight: 400;
  white-space: nowrap;
}
.calendar-month-links a { min-block-size: 44px; }
.calendar-month-links a > :first-child { font-weight: 700; }
.dates-page h2 { scroll-margin-block-start: var(--s4); }
.dates-page .events {
  display: grid;
  gap: var(--s2);
}
.dates-page .events > li {
  grid-template-columns: minmax(7rem, 10rem) minmax(0, 1fr) fit-content(13rem);
  align-items: center;
  padding: var(--s2) var(--s3);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--panel-shadow);
}
.dates-page .event-label {
  justify-self: start;
  max-inline-size: 100%;
  padding: var(--s1) var(--s2);
  background: var(--panel-2);
  border-radius: 6px;
  overflow-wrap: anywhere;
}
.dates-page .events > li:focus-within,
.dates-page .events > li:target {
  background: var(--panel-tint);
}
.dates-page .event-names { min-inline-size: 0; overflow-wrap: anywhere; }
.calendar-person {
  margin-block-start: var(--s4);
  background: var(--panel-2);
}
.date-person-link {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  min-block-size: 44px;
  max-inline-size: 100%;
  vertical-align: middle;
}
.date-person-link img { flex: none; border-radius: 50%; object-fit: cover; }
.date-person-link span { min-inline-size: 0; }
.date-person-link .meta { display: block; font-weight: 400; }
.leap-birthday-note { grid-column: 1 / -1; }
.dates-page .events .event-return { display: none; }
.dates-page .events li:target .event-return { display: inline-flex; grid-column: 1 / -1; justify-self: start; }
.dates-page .events > li:target, .news-dates .events > li:target, #directory-dates .events > li:target {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  scroll-margin-block-start: var(--s4);
}
.dates-page .when { font-weight: 700; }
.dates-page .birthday-saved { grid-column: 1 / -1; }
.events .event-edit { grid-column: 1 / -1; justify-self: start; }
.events .birthday-contact-actions { grid-column: 1 / -1; margin-block: var(--s1); }
.birthday-contact-actions .button { min-height: 44px; }
.dates-page .events .button { min-block-size: 44px; }
.dates-page .event-download {
  grid-column: 1 / -1;
  justify-self: start;
  display: inline-flex;
  align-items: center;
  min-block-size: 44px;
  max-inline-size: 100%;
}
.dates-page .birthday-contact-actions { gap: var(--s2); }
.dates-page .event-names a {
  display: inline-flex;
  align-items: center;
  max-inline-size: 100%;
  min-block-size: 44px;
}


/* ==================================================
   NARROW SCREENS AND PRINT
   ================================================== */

@media (max-width: 34rem) { nav, .tabs { gap: 0 var(--s2); font-size: .95rem; } nav a { padding: 0 2px; }
  .events li { grid-template-columns: 1fr; }
  .dates-page .events > li { grid-template-columns: minmax(0, 1fr); padding-block: var(--s3); }
  .quick { margin-left: 0; width: 100%; } .quick label { flex: 1; } .quick input { width: 100%; }
  header.site { gap: var(--s1) var(--s4); padding-block: var(--s2); }
  header.site nav {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(0, 1fr));
    align-items: stretch;
    gap: 0 var(--s1);
    font-size: .889rem;
 }
  header.site nav a {
    min-width: 0;
    justify-content: center;
    padding: var(--s1) 0;
    text-align: center;
    overflow-wrap: anywhere;
    border-radius: 0;
 }
  nav { gap: 0 var(--s3); width: 100%; }
  .panel { padding-left: var(--s4); padding-right: var(--s4); }
  .cards { grid-template-columns: 1fr; }
  .dates { grid-template-columns: 1fr 1fr; }
  .narrow { margin: var(--s4) auto; }
}
/* ==== Biography page (member_biography.html) ====================================
   Encyclopedia-style reading page for one person, with section editing.
   Every rule is scoped to .bio, so it can be moved or removed as one block. */
.bio { max-width: 62rem; }
.bio::after { content: ""; display: block; clear: both; }
.bio-head { margin-bottom: var(--s5); padding-bottom: var(--s3); border-bottom: 1px solid var(--line); }
.bio-head h1 { margin-bottom: var(--s1); }
.bio-tagline { margin: 0; }
.bio-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.bio-infobox { background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: var(--s4); margin: 0 0 var(--s5); font-size: .944rem; }
.bio-infobox .bio-infobox-name { font-size: 1.35rem; text-align: center; margin: 0 0 var(--s3); }
.bio-infobox-portrait { display: flex; justify-content: center; margin-bottom: var(--s3); }
.bio-infobox-portrait img { display: block; width: 100%; max-width: 16rem; height: auto; border-radius: 4px; }
.bio-infobox dl { display: grid; grid-template-columns: minmax(5rem, auto) 1fr; gap: var(--s2) var(--s3); margin: 0; }
.bio-infobox dt { font-weight: 600; color: var(--muted); }
.bio-infobox dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.bio-infobox dd ul, .bio-family ul { list-style: none; margin: 0; padding: 0; }
.bio-infobox dd li + li { margin-top: var(--s1); }
.bio-infobox .muted { display: block; font-size: .833rem; }
.bio-infobox-edit { margin: var(--s3) 0 0; text-align: center; font-size: .889rem; }
.bio-lead { font-size: 1.056rem; line-height: 1.65; }
.bio-lead-edit { margin: 0 0 var(--s2); font-size: .889rem; }
.bio-summary strong { font-weight: 600; }
.bio-contents { display: inline-block; min-width: 14rem; max-width: 100%; background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: var(--s3) var(--s5) var(--s3) var(--s4); margin: var(--s4) 0 var(--s2); }
.bio-contents h2 { font-size: 1.1rem; margin: 0 0 var(--s2); font-family: var(--sans); font-weight: 600; }
.bio-contents ol { margin: 0; padding-left: 1.4rem; }
.bio-contents li { padding: .15rem 0; }
.bio-contents a { display: inline-block; min-height: 1.75rem; }
.bio-section { margin-top: var(--s6); scroll-margin-top: var(--s4); }
.bio-heading { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--s1) var(--s4); border-bottom: 1px solid var(--line); margin-bottom: var(--s3); }
.bio-heading h2 { margin: 0 0 var(--s1); }
.bio-edit { font-size: .889rem; font-weight: 600; display: inline-flex; align-items: center; min-height: 2.75rem; padding: 0 var(--s1); }
.bio-text { line-height: 1.7; max-width: 42rem; }
.bio-text h3, .bio-family h3 { font-size: 1.25rem; margin: var(--s5) 0 var(--s2); }
.bio-text h4 { font-size: 1.05rem; font-family: var(--sans); font-weight: 600; margin: var(--s4) 0 var(--s1); }
.bio-text a { font-weight: 600; }
.bio-text blockquote { margin: var(--s3) 0; padding-left: var(--s4); border-left: 3px solid var(--brass); color: var(--muted); font-style: italic; }
.bio-text ul, .bio-text ol { padding-left: 1.5rem; }
.bio-empty { font-style: italic; }
.bio-family { display: grid; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); gap: 0 var(--s5); }
.bio-family li { padding: var(--s1) 0; }
.bio-more { font-size: .944rem; }
.bio-gallery { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr)); gap: var(--s2); }
.bio-gallery a { display: block; }
.bio-gallery img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 4px; background: var(--panel-2); }
.bio-sources { padding-left: 1.2rem; }
.bio-sources li { padding: var(--s1) 0; }
.bio-saved { margin-bottom: var(--s3); }
.bio-saved .notice { margin-bottom: var(--s2); }
.bio-editor { background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: var(--s4); max-width: 46rem; }
.bio-editor label { font-weight: 600; }
.bio-editor code { font-size: .9em; background: var(--panel-2); padding: 0 .25em; border-radius: 3px; }
.bio-editor textarea { min-height: 14rem; line-height: 1.6; }
.bio-toolbar { display: flex; flex-wrap: wrap; gap: var(--s1); margin-bottom: 0 !important; padding: var(--s1); background: var(--panel-2); border: 1px solid var(--control); border-bottom: 0; border-radius: 4px 4px 0 0; }
.bio-tool { min-height: 2.75rem; min-width: 2.75rem; padding: 0 var(--s3); font: inherit; font-size: .889rem; font-weight: 600; color: var(--ink); background: var(--panel); border: 1px solid var(--line); border-radius: 4px; cursor: pointer; }
.bio-tool:hover { border-color: var(--control); }
.bio-rich { min-height: 14rem; padding: var(--s2) var(--s3); line-height: 1.7; color: var(--ink); background: var(--panel); border: 1px solid var(--control); border-radius: 0 0 4px 4px; overflow-wrap: anywhere; }
.bio-rich:focus { outline: 3px solid var(--focus); outline-offset: 1px; }
.bio-rich p { margin: 0 0 var(--s3); }
.bio-rich h3 { font-size: 1.25rem; margin: var(--s3) 0 var(--s2); }
.bio-rich a { font-weight: 600; }
.bio-foot { clear: both; margin-top: var(--s7); padding-top: var(--s3); border-top: 1px solid var(--line); }
@media (min-width: 48rem) {
  .bio-infobox { float: right; width: 19rem; margin: 0 0 var(--s5) var(--s6); }
}
@media (max-width: 47.99rem) {
  .bio-infobox-portrait img { max-width: 12rem; }
  .bio-contents { display: block; }
}
@media print { .bio-edit, .bio-lead-edit, .bio-infobox-edit, .bio-foot { display: none !important; } .bio-infobox { break-inside: avoid; } }
.bio-heading-links { display: inline-flex; flex-wrap: wrap; gap: 0 var(--s3); }
.bio-lead-edit { display: flex; flex-wrap: wrap; gap: 0 var(--s3); }
.bio-history { clear: none; margin: var(--s4) 0; padding: var(--s3) var(--s4); background: var(--panel); border: 1px solid var(--line); border-left: 3px solid var(--brass); border-radius: 6px; max-width: 46rem; }
.bio-history h3 { font-size: 1.2rem; margin: var(--s2) 0 var(--s3); }
.bio-versions { list-style: none; margin: 0; padding: 0; }
.bio-versions > li { padding: var(--s3) 0; border-top: 1px solid var(--line); }
.bio-versions > li:first-child { border-top: 0; }
.bio-version-meta { margin: 0 0 var(--s2); font-size: .944rem; display: flex; flex-wrap: wrap; align-items: center; gap: var(--s1) var(--s2); }
.bio-version-text { margin: var(--s2) 0; padding: var(--s2) var(--s3); background: var(--bg); border-radius: 4px; }
.bio-current { color: var(--ok); font-weight: 600; }
.bio-restore { display: inline-block; margin: var(--s2) var(--s2) 0 0; }
.bio-field-rows { display: grid; grid-template-columns: minmax(6rem, auto) 1fr; gap: var(--s2) var(--s3); margin: 0; }
.bio-field-rows dt { font-weight: 600; color: var(--muted); }
.bio-field-rows dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.bio-field-change { margin: 0; }
.bio-removed-thumb { width: 3rem; height: 3rem; object-fit: cover; border-radius: 4px; }
@media (max-width: 30rem) { .bio-field-rows { grid-template-columns: 1fr; } .bio-field-rows dd { margin-bottom: var(--s2); } }
/* ==== End of biography page ===================================================== */

@media print { header.site, footer.site, form, details, .actions, .tree-tools, .js-only { display: none !important; } body { background: #fff; color: #000; font-size: 12pt; } a { color: #000; text-decoration: none; } .panel, .cards li, .gallery li, .rels li { break-inside: avoid; } .tree-wrap { overflow: visible; max-height: none; border: 0; } .t-focus { fill: #fff; stroke: #000; stroke-width: 3; } .tree .t-focus ~ text { fill: #000; } }
/* Album covers and page links give each section a clear place to start. */
.skip-link { position: absolute; inset-inline-start: var(--s4); inset-block-start: var(--s2); clip-path: inset(50%); }
.skip-link:focus { clip-path: none; z-index: 1; background: var(--panel); padding: var(--s2) var(--s4); }
.brand { gap: var(--s2); min-width: 0; max-width: 100%; }
.brand img { flex: none; width: 1.2em; height: 1.2em; }
.brand span { min-width: 0; overflow-wrap: anywhere; }
header.site nav a { padding-inline: var(--s2); }
.page-cover {
  padding: var(--s5);
  margin-bottom: var(--s5);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}
.page-cover h1 {
  margin-top: 0;
  font-size: clamp(2rem, 1.5rem + 2.1vw, 3.15rem);
  letter-spacing: -.035em;
}
.page-cover > :last-child { margin-bottom: 0; }
.next-family-date {
  padding-block: var(--s5);
  border: 1px solid var(--line);
  box-shadow: var(--panel-shadow);
  border-radius: 12px;
  background: var(--panel-tint);
}
.next-family-date h2 { margin: 0; }
.next-family-date h2:target { scroll-margin-block-start: var(--s4); }
.next-family-date:has(h2:target) {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
.next-family-date p { margin: var(--s2) 0 0; }
.next-family-date .next-date-people {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s2);
  font: 700 1.6rem/1.2 var(--serif);
  overflow-wrap: anywhere;
}
.next-date-person { display: inline-flex; align-items: center; gap: var(--s2); min-width: 0; max-width: 100%; }
.next-family-date .next-date-kind { color: var(--muted); }
.next-family-date .actions { margin-block-start: var(--s4); }
.next-family-date .next-date-when {
  color: var(--ink);
  font-weight: 700;
  width: fit-content;
  padding: var(--s1) var(--s3);
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
}
.next-date-download {
  margin-block: var(--s4) 0;
  padding-block-start: var(--s2);
  border-block-start: 1px solid var(--line);
}
.next-date-download > summary {
  display: list-item;
  list-style-position: inside;
  width: fit-content;
  padding-block: var(--s2);
}
.calendar-shortcuts { margin-block-start: var(--s3); }
.calendar-shortcuts a { min-block-size: 44px; }
.dates-page .calendar-month-start { margin-block-start: var(--s2); }
.calendar-month-start a { min-block-size: 44px; }
.dates-page > h2:target { scroll-margin-block-start: var(--s4); }
.dates-page:has(> h2:target) {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}
@media (max-width: 30rem) {
  .page-cover.dates-cover { padding: var(--s4); }
  .calendar-shortcuts { display: grid; }
}
.next-date-download .button, .dates-page .event-edit {
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
}
.dates-cover { margin-block-end: var(--s4); }
.dates-cover h1 {
  margin-block: 0 var(--s2);
  font-size: clamp(1.75rem, 4vw, 3rem);
  overflow-wrap: anywhere;
}
.directory-cover .row, .tree-cover .tree-find { max-width: 42rem; }
.directory-search-mode { margin-block: 0; }
.directory-search-mode a { display: inline-flex; align-items: center; min-height: 44px; }
.directory-search-actions { gap: var(--s2); }
.directory-refine { margin-block: var(--s2); }
.directory-refine > summary {
  display: list-item;
  min-block-size: 44px;
  padding-block: var(--s2);
  cursor: pointer;
}
.directory-refine > .actions { margin-block: var(--s2); }
.tree-branch-jump {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s2) var(--s5);
  padding: var(--s3) var(--s4);
  background: var(--panel-tint);
  border: 1px solid var(--line);
  box-shadow: var(--panel-shadow);
  border-radius: 10px;
}
.tree-branch-jump p, .tree-branch-jump .page-links { margin: 0; }
.tree-branch-jump h3 { width: 100%; margin: 0; }
.tree-branch-jump ul.page-links {
  display: flex;
  flex-wrap: wrap;
  padding: 0;
  list-style: none;
  overflow-wrap: anywhere;
}
.tree-branch-jump li { min-width: 0; }
.tree-branch-jump li a { display: block; min-block-size: 44px; }
.tree-branch-jump strong { font: 700 1.2rem/1.3 var(--serif); overflow-wrap: anywhere; }
.tree-cover-tools > .tree-find {
  margin-block-start: var(--s4);
  padding: var(--s3) var(--s4);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--panel-shadow);
}
.tree-find > :last-child { margin-block-end: 0; }
.sign-in-cover .stack { margin-block-start: var(--s4); }
.sign-in-family {
  margin-block-start: calc(-1 * var(--s2));
  color: var(--muted);
  font-size: 1.1rem;
  overflow-wrap: anywhere;
}
.sign-in-actions { margin-block: var(--s2) 0; }
.sign-in-actions > :is(button, .button) {
  max-inline-size: 100%;
  white-space: normal;
}
.sign-in-cover .invite-email {
  padding: var(--s3);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  overflow-wrap: anywhere;
}
.invite-email strong { display: block; }
.invite-cover form h2 { margin-block-start: 0; }
.invite-cover .invite-next {
  padding-block-start: var(--s3);
  border-block-start: 1px solid var(--line);
  color: var(--muted);
}
.identify-results .person-card { box-shadow: var(--panel-shadow); }
.identify-results .identify-review-label { color: var(--link); font-weight: 700; }
.identify-results form { margin-block-start: var(--s2); }
.lifetimes-decade {
  margin-block: var(--s5) var(--s3);
  padding-block-end: var(--s2);
  border-block-end: 1px solid var(--line);
  font: 700 1.3rem/1.25 var(--serif);
}
#timeline-person {
  border: 1px solid var(--line);
  box-shadow: var(--panel-shadow);
  border-radius: 12px;
  background: radial-gradient(ellipse at 100% 0%, var(--panel) 0%, transparent 75%), var(--panel-2);
}
.timeline-person-summary { font: 1.35rem/1.45 var(--serif); overflow-wrap: anywhere; }
.timeline-memory-links {
  padding-block-start: var(--s3);
  border-block-start: 1px solid var(--line);
}
.timeline-memory-links > a { white-space: normal; }
#timeline-person { scroll-margin-block-start: var(--s4); }
.timeline-person-layout { max-inline-size: 52rem; }
.timeline-return .button { max-inline-size: 100%; white-space: normal; overflow-wrap: anywhere; }
.timeline-story-excerpt {
  margin-inline: 0;
  padding: var(--s3) var(--s4);
  border: 1px solid var(--line);
  box-shadow: var(--panel-shadow);
  border-radius: 8px;
  background: var(--panel);
  font: 1.15rem/1.6 var(--serif);
}
.timeline-story-excerpt h3 { margin: 0; }
.timeline-story-excerpt blockquote { margin: var(--s2) 0 var(--s3); }
.timeline-story-excerpt { max-inline-size: 44rem; }
.timeline-person-links a { white-space: normal; }
.timeline-person-links {
  margin-block: var(--s4);
  gap: var(--s2) var(--s3);
}
#timeline-person details > summary {
  display: list-item;
  list-style-position: inside;
  padding: var(--s2) var(--s3);
  border: 1px solid var(--control);
  border-radius: 8px;
  background: var(--panel);
  font-weight: 700;
}
.lifetime-shared-years {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--s1) var(--s3);
  margin-block: var(--s2);
  padding: var(--s2) var(--s3);
  background: var(--panel-tint);
  border-radius: 8px;
}
.lifetime-shared-years > :first-child { flex-basis: 100%; }
.lifetime-shared-years strong { font-variant-numeric: tabular-nums; }
.lifetime-estimate-help > summary {
  display: list-item;
  list-style-position: inside;
  min-block-size: 2.75rem;
  align-content: center;
}
.lifetime-overlap-action {
  display: block;
  margin-block-start: var(--s2);
  color: var(--link);
  font-weight: 600;


}
.lifetime-overlaps > li:target > .person-card {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}
.directory-paths {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr));
  align-items: stretch;
  gap: var(--s3);
  margin: var(--s4) 0 var(--s2);
}
.directory-paths a { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-content: center; gap: .2rem var(--s3); padding: var(--s4); background: var(--panel); border: 1px solid var(--control); border-radius: 12px; box-shadow: var(--panel-shadow); line-height: 1.4; }
.directory-paths a strong { grid-column: 1; color: var(--link); font: 700 1.2rem/1.2 var(--serif); }
.directory-paths a span { color: var(--muted); }
.directory-paths a .directory-path-arrow {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  color: var(--link);
  background: var(--panel-2);
  font-size: 1.3rem;
}
.directory-paths a:hover { border-color: var(--accent); background: var(--panel-2); }
.directory-paths.birthplace-paths > a {
  min-width: 0;
  overflow-wrap: anywhere;
  background: var(--panel-tint);
  border-color: var(--line);
}
.directory-paths.birthplace-paths > a:hover,
.directory-paths.birthplace-paths > a:focus-visible {
  background: var(--panel-tint-hover);
  border-color: var(--accent);
}
.linked-cover h2 { margin-block-start: 0; }
.linked-profile-card { width: fit-content; max-width: 100%; }
.account-identity { margin-block: 0 var(--s4); overflow-wrap: anywhere; }
.account-identity span { display: block; color: var(--muted); }
.account-cover .directory-paths { gap: 0 var(--s4); }
.account-cover .directory-paths a {
  background: transparent;
  border: 0;
  border-block-end: 1px solid var(--line);
  border-radius: 0;
  box-shadow: none;
}
.account-cover .directory-paths a:is(:hover, :focus-visible) { background: var(--panel); }
.account-sign-in-links { margin-block-start: var(--s4); }
.account-sign-in-links h2 { flex-basis: 100%; margin: 0; font-size: 1.17rem; }
.directory-cover ~ .cards .person-card { padding: var(--s4); }

.family-browse { margin-block: var(--s3); }
.tabs.family-browse {
  width: fit-content;
  max-width: 100%;
  padding: var(--s1);
  gap: var(--s1);
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
}
.tabs.family-browse a { border-radius: 6px; }
.tabs.family-browse a[aria-current="page"] {
  background: var(--accent);
  color: var(--on-accent);
}
@media (max-width: 30rem) {
  .tabs.family-browse {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
 }
  .tabs.family-browse a {
    justify-content: center;
    text-align: center;
    overflow-wrap: anywhere;
 }
}
.news-cover .news-profile-return {
  width: fit-content;
  max-width: 100%;
  margin-block: var(--s3);
  padding: var(--s2) var(--s4) var(--s2) var(--s2);
}
.profile.page-cover { align-items: start; }
.profile-portrait-link { display: inline-block; }
.profile-picture-preview { display: block; width: 6rem; max-width: 100%; border-radius: 8px; }
.profile.page-cover .portrait img {
  border: 1px solid var(--control);
  background: var(--panel);
  padding: var(--s2);
  box-shadow: var(--panel-shadow);
}
.profile.page-cover .intro h1 { overflow-wrap: anywhere; }
.member .button { max-width: 100%; white-space: normal; overflow-wrap: anywhere; }
.profile-links { grid-column: 1 / -1; margin-top: 0; }
.profile-links.directory-paths { margin-block: 0; }
.profile-links.directory-paths a { min-width: 0; }
.profile-links.profile-paths { gap: var(--s2); }
.profile-paths a {
  border: 1px solid var(--line);
  background: var(--panel);
}
.profile-paths a:is(:hover, :focus-visible) {
  border-color: var(--accent);
  background: var(--panel-tint);
}
.profile-paths a strong, .profile-paths a span { overflow-wrap: anywhere; }
.profile-photo-path img {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
  object-fit: cover;
  border: 3px solid var(--panel-2);
  border-radius: 5px;
}
#profile-sections {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr));
  gap: var(--s2);
  margin-block-start: var(--s2);
  padding-block-start: var(--s4);
  border-block-start: 1px solid var(--line);
  scroll-margin-block-start: var(--s4);
}
#profile-sections h2 { grid-column: 1 / -1; margin: 0; font-size: 1.17rem; }
#profile-sections a {
  display: flex;
  align-items: center;
  min-block-size: 44px;
  min-inline-size: 0;
  overflow-wrap: anywhere;
  border-radius: 8px;
  box-shadow: var(--panel-shadow);
}
#profile-sections a:is(:hover, :focus-visible) { border-color: var(--accent); }
.profile-change-groups {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 24rem), 1fr));
  align-items: start;
  gap: var(--s4);
}
.profile-change-group.panel { min-width: 0; margin: 0; padding: var(--s4); }
.profile-change-group > h3 { margin-block-start: 0; }
.profile-change-family { grid-column: 1 / -1; }
#profile-sections a:target {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
  scroll-margin-block-start: var(--s4);
}
.member :is(#family, #photos, #contact-details, #mailing-address, #recordings, #family-documents, #changes, #change-family):target {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
  scroll-margin-block-start: var(--s4);
}
.member :is(#profile-paths, #profile-sections):target {
  outline: 2px solid var(--focus);
  outline-offset: 4px;
  scroll-margin-block-start: var(--s4);
}
.member .gallery a:target, .member .gallery li:target,
.member #family-documents a:target, .member #family-documents li:target {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  scroll-margin-block-start: var(--s4);
}
.family-document.person-card { grid-template-columns: minmax(0, 1fr); row-gap: var(--s1); }
.family-document.person-card > span { grid-column: 1; }
.document-count { color: var(--muted); }
.document-filename { margin: var(--s1) var(--s3) var(--s2); overflow-wrap: anywhere; }
.document-format {
  justify-self: start;
  padding: var(--s1) var(--s2);
  background: var(--panel-2);
  border-radius: 4px;
}
.document-open { margin-block-start: var(--s1); color: var(--link); font-weight: 700; }
.history .button { max-width: 100%; white-space: normal; }
[data-document-status]:empty { margin: 0; }
.document-search-status:not(:empty) {
  padding: var(--s2) var(--s3);
  border: 1px solid var(--line);
  box-shadow: var(--panel-shadow);
  background: var(--panel-2);
}
@media (min-width: 36.01rem) and (max-width: 47.99rem) {
  .profile.page-cover { grid-template-columns: auto minmax(0, 1fr); gap: var(--s4); }
  .profile.page-cover .portrait img { width: 9rem; }
}
@media (max-width: 36rem) {
  .profile.page-cover { grid-template-columns: auto minmax(0, 1fr); gap: var(--s3); padding: var(--s4); }
  .profile.page-cover.profile-with-photo { grid-template-columns: minmax(0, 1fr); }
  .profile.page-cover .portrait img { width: 8rem; max-width: 100%; }
  .profile.page-cover .avatar-l { width: 3.5rem; height: 3.5rem; font-size: 1.167rem; }
}
.page-links { gap: var(--s2) var(--s3); margin-block: var(--s3); }
.page-links a, .help-topics a {
  padding: var(--s2) var(--s3);
  background: var(--panel);
  border: 1px solid var(--control);
  border-radius: 4px;
  color: var(--link);

}
@media (max-width: 30rem) {
  footer.site .page-links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
 }
  footer.site .page-links a {
    justify-content: center;
    min-block-size: 44px;
    overflow-wrap: anywhere;
 }
  .news-cover > .actions,
  .news-shortcuts > .page-links,
  .calendar-shortcuts {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: var(--s2);
 }
  .news-cover > .actions > .button,
  .news-shortcuts > .page-links > a,
  .calendar-shortcuts > a {
    justify-content: flex-start;
    min-block-size: 44px;
    white-space: normal;
    overflow-wrap: anywhere;
 }
}
.help-topics { display: grid; gap: var(--s2); grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); }
.help-quick-links { margin-block: var(--s3) var(--s4); }
.help-cover .button, .help-answers .button {
  max-inline-size: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
}
.help-quick-links a { box-shadow: var(--panel-shadow); }
[data-help-topics] { display: grid; gap: var(--s2); }
.help-topic-group {
  margin: 0;
  min-width: 0;
  border: 1px solid var(--control);
  border-radius: 10px;
  background: var(--panel);
}
.help-topic-group summary {
  display: list-item;
  list-style-position: inside;
  padding: var(--s3);
  min-height: 44px;
  font: 700 1.15rem/1.4 var(--serif);
}
.help-topic-group[open] summary { border-block-end: 1px solid var(--line); }
.help-topic-group .help-topics { padding: var(--s3); }
.help-topic-group .help-topics a { background: var(--panel-2); border-radius: 8px; }
.help-topic-group .help-topics a:hover { background: var(--panel); border-color: var(--accent); }
[data-help-status]:empty { margin: 0; }
.help-answers { max-width: 48rem; }
@media screen and (min-width: 64rem) {
  .help-cover .help-quick-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
    gap: var(--s3);
 }
  .help-cover .help-quick-links a {
    display: flex;
    align-items: center;
    border-color: var(--line);
    border-radius: 8px;
    box-shadow: var(--panel-shadow);
 }
}
.help-answers > section { scroll-margin-block-start: var(--s4); }
.help-answers > section:target { outline: 2px solid var(--accent); outline-offset: 3px; }
.help-answers > section > p:last-child a { display: inline-flex; align-items: center; min-height: 2.75rem; }
.account-sections { max-width: 48rem; }
.account-sections > .panel { scroll-margin-top: var(--s4); }
.account-sections > .panel:target {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}
@media screen and (min-width: 64rem) {
  .account-sections {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--s5);
    align-items: start;
    max-width: none;
 }
  .account-sections > .panel { min-width: 0; margin-block: 0; }
  .account-sections #sign-out { grid-column: 1 / -1; }
}
@media (min-width: 48rem) {
  .profile.page-cover:not(.profile-with-photo) { grid-template-columns: auto minmax(0, 1fr); }
}
@media (min-width: 54rem) {
  .page-cover { padding: var(--s6); }
}
.relative-step > h1 { margin-block-end: var(--s4); }
.changes summary::before, .account-sections summary::before, .tree-more summary::before {
  content: "";
  width: 0;
  height: 0;
  border: 5px solid transparent;
  border-right: 0;
  border-left-color: currentColor;
  margin-right: var(--s2);
}
.changes details[open] > summary::before, .account-sections details[open] > summary::before, .tree-more[open] > summary::before {
  transform: rotate(90deg);
}
.family-news { display: grid; gap: var(--s5); align-items: start; }
.family-news > * { min-width: 0; }
.news-sidebar { display: grid; gap: var(--s4); }
.news-page-position { align-self: center; flex-basis: 100%; color: var(--muted); font-weight: 700; }
.family-news h2 { margin-top: var(--s4); scroll-margin-block-start: var(--s4); }
.news-sidebar h2 { margin-top: 0; }
.news-shortcuts > summary {
  display: list-item;
  min-block-size: 44px;
  padding-block: var(--s2);
  cursor: pointer;
}
.news-shortcuts > .page-links { margin-block-start: var(--s2); }
@media (max-width: 30rem) {
  .page-cover.news-cover {
    margin-block-end: var(--s4);
    padding: var(--s4);
 }
  .news-cover h1 { margin-block: 0 var(--s2); }
  .news-cover > .actions { margin-block: var(--s2); }
  .news-cover + .family-news #memories-title { margin-block-start: var(--s3); }
  .family-news #news-filters .filter-tabs {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--s1);
 }
  .family-news #news-filters a {
    padding-inline: var(--s1);
    overflow-wrap: anywhere;
 }
}
.news-search > summary {
  display: list-item;
  list-style-position: inside;
  min-height: 2.75rem;
  align-content: center;


}
#share-yourself, #share-relative-memory { scroll-margin-block-start: var(--s4); }
.news-share:not(:target, :has(:target)),
.view-family_news:has(> .news-share:is(:target, :has(:target))) > :is(.news-cover, .family-news, #weekly-letter) { display: none; }
.view-family_news > .news-share {
  max-inline-size: 54rem;
  margin-inline: auto;
  scroll-margin-block-start: 8rem;
}
.news-share:focus-visible { outline: none; }
.news-share-back {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  min-block-size: 44px;
}
.news-share h1 { margin-block: var(--s2) var(--s4); font-size: clamp(2.45rem, 1.75rem + 2.5vw, 3.65rem); }
.news-share-choices { display: grid; gap: var(--s4); }
.news-share-choices section { padding-block-start: var(--s3); }
.news-share-choices h2 { margin: 0 0 var(--s1); font: 400 1.65rem/1.15 var(--serif); }
.news-share-choices p { margin-block: var(--s1) var(--s3); color: var(--muted); }
.news-share-choices .news-share-options { gap: var(--s1); margin-block: 0; }
.news-share-choices .news-share-options a {
  justify-content: flex-start;
  border: 0;
  border-radius: 0;
  padding-inline: 0 var(--s3);
  background: transparent;
  font-weight: 500;
  text-decoration: none;
}
@media screen and (min-width: 44rem) {
  .news-share-choices { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s6); }
}
.relative-news-context {
  padding: var(--s3);
  border: 1px solid var(--line);
  box-shadow: var(--panel-shadow);
  border-radius: 12px;
}
.relative-news-context .person-card { background: var(--panel-2); }
.relative-news-context .page-links { margin-block-start: var(--s3); }
.relative-news-profile-label {
  grid-column: 2;
  color: var(--link);


}
.news-share-choices .actions { margin-top: var(--s2); }
.news-share-options {
  display: grid;
  gap: var(--s2);
  list-style: none;
  padding: 0;
  margin: 0 0 var(--s3);
}
.news-share-options a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s2);
  min-height: 2.75rem;
  padding: var(--s2) var(--s3);
  border: 1px solid var(--control);
  border-radius: 10px;
  background: var(--panel-2);
  font-weight: 600;
}
.news-share-options a:hover { background: var(--panel); border-color: var(--accent); }
.news-search > .news-share-options { margin-block: var(--s3) 0; }
.news-share-options a { overflow-wrap: anywhere; }
.news-memories { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s4); }
.news-memory, .news-share, .news-dates { margin: 0; }
.news-dates .events, #directory-dates .events { display: grid; gap: var(--s3); }
.news-dates .events > li, #directory-dates .events > li {
  grid-template-columns: minmax(0, 1fr);
  gap: var(--s1);
  padding: var(--s3);
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.news-dates .events > li:last-child, #directory-dates .events > li:last-child {
  border: 1px solid var(--line);
}
.upcoming-names {
  font-weight: 700;
  overflow-wrap: anywhere;
}
.upcoming-names a {
  display: inline-block;
  align-content: center;
  min-block-size: 44px;
  max-inline-size: 100%;
}
.upcoming-avatar {
  margin-inline-end: .5rem;
  object-fit: cover;
  border-radius: 50%;
  vertical-align: middle;
}
.news-dates .events .when, #directory-dates .events .when {
  color: var(--warm);
  font-weight: 700;
}
.news-memories > li:target, .story-people > li:target, .relationship-matches > li:target,
.identify-results > li:target, .album-people > li:target,
.view-index :is(#recent-photo, #recent-story):target {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  scroll-margin-block-start: var(--s4);
}
.news-memory[aria-describedby="selected-update-label"] { background: var(--panel-tint); }
.news-photo { display: block; margin-top: var(--s3); padding: var(--s2); background: var(--panel-2); border: 1px solid var(--control); border-radius: 8px; }
.news-photo img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 4px; }
.family-albums > li { min-width: 0; border-radius: 12px; box-shadow: var(--panel-shadow); }
.family-albums .news-photo { margin-top: 0; padding: var(--s3); box-shadow: var(--panel-shadow); }
.album-name {
  display: block;
  padding: var(--s1) var(--s2);
  font-size: 1.25rem;
  line-height: 1.25;
  overflow-wrap: anywhere;
}
.family-albums .news-photo img {
  border: 1px solid var(--line);
  background: var(--panel);
  object-fit: contain;
}
.album-open { display: block; padding: var(--s2) var(--s2) 0; color: var(--link); font-weight: 700; }
.family-albums .news-photo, #photos { scroll-margin-block-start: var(--s4); }
#profile-media-title { overflow-wrap: anywhere; }
.album-label { display: grid; gap: var(--s1); padding: 0 var(--s2) var(--s3); overflow-wrap: anywhere; }
.album-label .meta { color: var(--muted); font-size: .9rem; }
.news-memory h3 a { display: inline-flex; align-items: center; min-height: 2.75rem; }
.news-memory h3 .news-person-link { display: grid; }
.news-video { border-radius: 8px; max-height: min(55vh, 28rem); }
.news-playback-hint { margin-block: var(--s3) 0; }
.news-audio, .news-video { display: block; width: 100%; min-width: 0; margin-block: var(--s3); }
.news-person-link .name { }
.news-photo-heading { margin: 0; }
.news-photo-heading .news-photo { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s2); margin: 0; }
.news-photo-caption { padding: var(--s2); overflow-wrap: anywhere; }
.news-photo-caption .meta { display: block; margin-top: var(--s1); }
.news-photo-person { display: flex; align-items: center; gap: var(--s3); }
.family-news .news-photo-person .avatar img {
  height: 100%;
  aspect-ratio: 1;
  border: 0;
  border-radius: 0;
}
.family-news .news-memory { min-width: 0; border-radius: 12px; box-shadow: var(--panel-shadow); }
.family-news .news-memory-photo .news-photo {
  padding: var(--s3);
  background: var(--panel-2);
  box-shadow: inset 0 0 0 3px var(--panel);
}
.family-news .news-memory-photo .news-photo > img {
  border: 1px solid var(--line);
  background: var(--panel);
  object-fit: contain;
}
.news-document-heading {
  margin-block-start: var(--s3);
  padding: var(--s3) var(--s4);
  border: 1px solid var(--line);
  box-shadow: var(--panel-shadow);
  border-radius: 8px;
  background: var(--panel-2);
  overflow-wrap: anywhere;
}
.news-document-heading h3 { margin-block: var(--s1); font-size: 1.25rem; }
.news-document-heading p { margin: 0; }
.news-document-heading .news-document-action { margin-block-start: var(--s3); }
.news-document-action .button { max-inline-size: 100%; white-space: normal; }
.news-memory-story > h3 { margin-block: 0; }
.news-memory-story .news-story-excerpt {
  margin: var(--s3) 0;
  font: 1.12rem/1.6 var(--serif);
}
.family-news .news-credit { border-block-end: 1px solid var(--line); padding-block-end: var(--s2); }
.news-update-links {
  gap: var(--s2);
  margin-block: var(--s3);
}
.news-update-links a {
  min-block-size: 44px;
  max-inline-size: 100%;
  color: var(--link);
  padding: var(--s2) var(--s3);
  border: 1px solid var(--control);
  border-radius: 8px;
  background: var(--panel);

  overflow-wrap: anywhere;
}
.news-update-links a:is(:hover, :focus-visible) {
  border-color: var(--accent);
  background: var(--panel-tint);
}
@media (max-width: 30rem) {
  .news-update-links {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
 }
}
@media screen and (min-width: 64rem) {
  .story-library-browse {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: var(--s3) var(--s5);
    padding-block: var(--s4);
 }
  .story-library-browse > * { margin: 0; }
  .story-library-browse > form { grid-column: 1 / -1; width: min(100%, 42rem); max-width: none; }
  .story-library-browse > .story-library-write { justify-self: end; }
  .story-library-browse > #story-search-example { grid-column: 1 / -1; }
}
.story-library > li { min-width: 0; border-radius: 12px; box-shadow: var(--panel-shadow); }
.story-library > .story-library-feature {
  grid-column: 1 / -1;
  max-width: none;
  padding-block-start: var(--s4);
  background: var(--panel-2);
}
.story-library-feature .story-library-photo { box-shadow: var(--panel-shadow); }
@media (min-width: 54rem) {
  .story-library > .story-library-feature h3 .story-library-with-photo {
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
    align-items: center;
    gap: var(--s4);
 }
}
.story-library > li > .story-paragraph {
  margin: var(--s3) 0 0;
  font: 1.12rem/1.6 var(--serif);
}
.story-library-match {
  padding: var(--s2) var(--s3);
  border-radius: 8px;
  background: var(--panel-tint);
}
.story-library > li > h3 { margin: 0; }
.story-library h3 .person-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}
.story-library h3 .person-card,
.news-memory-story h3 .news-person-link {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}
.story-library-profile { margin-block: var(--s2) 0; }
.story-library-profile a { display: inline-flex; align-items: center; min-block-size: 44px; }
.story-library-person {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  column-gap: var(--s3);
}
.story-library-details { min-width: 0; }
.story-library-details .meta { font: 400 .95rem/1.5 var(--sans); }
.story-library-portrait .avatar {
  width: 4.5rem;
  height: 5.25rem;
  border: 3px solid var(--panel-2);
  border-radius: 6px;
}
.story-library-action { display: block; margin-top: var(--s2); color: var(--link); font-size: 1rem; }
@media (min-width: 54rem) {
  .family-news { grid-template-columns: 2fr 1fr; }
  .news-sidebar { margin-top: var(--s4); }
  .news-memory-featured { grid-column: 1 / -1; max-width: none; }
  .news-memory-featured .news-photo img { aspect-ratio: 16 / 10; }
  .news-memories { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .family-news .news-memories { grid-template-columns: minmax(0, 1fr); }
}
@media (min-width: 66rem) { .family-news .news-memories { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.relationship-result .lead { margin-top: var(--s2); }
.relationship-answer-layout > * { min-width: 0; }
.relationship-answer-main > .relationship-change-actions {
  margin-block-end: 0;
}
.relationship-answer-layout > .relationship-explanation {
  margin-block-start: var(--s4);
}
@media screen and (min-width: 64rem) {
  .relationship-answer-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(18rem, .85fr);
    align-items: start;
    gap: var(--s5);
    margin-block: var(--s4);
 }
  .relationship-answer-layout > .relationship-explanation { margin: 0; }
}
.relationship-summary {
  padding: var(--s4);
  border-radius: 10px;
  background: var(--panel-tint);
  font: 1.35rem/1.45 var(--serif);
  overflow-wrap: anywhere;
}
.timeline-person-heading { display: flex; align-items: center; gap: var(--s3); margin-block-start: var(--s4); }
.timeline-person-heading .avatar { flex: none; }
.timeline-person-heading h2 { margin: 0; }
.relationship-explanation > summary {
  display: list-item;
  list-style-position: inside;
  color: var(--link);
  min-height: 2.75rem;
  padding-block: var(--s2);
  font-weight: 700;
  cursor: pointer;
}
.relationship-ancestors ul { display: flex; flex-wrap: wrap; list-style: none; padding: 0; margin-top: 0; }
.relationship-tree-actions { gap: var(--s2) var(--s3); }
.relationship-heading { margin-block-end: var(--s4); }
.relationship-heading h1 {
  margin: 0;
  font-size: clamp(1.75rem, 4vw, 3rem);
}
.relationship-selected {
  margin-block: var(--s2) var(--s4);
  overflow-wrap: anywhere;
}
.relationship-picker {
  max-width: 50rem;
  padding: 0;
  border: 0;
  box-shadow: none;
  background: transparent;
}
.relationship-picker > h2 { margin-block-start: 0; font-size: clamp(1.45rem, 1.2rem + 1vw, 1.85rem); }
.relationship-selected > .person-card, .relationship-trail .person-card {
  border: 0;
  box-shadow: none;
  background: var(--panel-2);
}
.relationship-picker > :last-child { margin-block-end: 0; }
.relationship-picker-actions { gap: var(--s2) var(--s3); }
.relationship-pair { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); gap: var(--s3); }
.relationship-identities > div {
  min-width: 0;
  padding: var(--s3);
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  box-shadow: var(--panel-shadow);
}
.relationship-identities h3 { margin-block: 0 var(--s2); }
.relationship-identities .meta { display: block; }
.relationship-result h2:first-child { margin-top: var(--s3); }
.relationship-trail { display: grid; gap: var(--s4); padding-inline-start: var(--s6); max-width: 36rem; overflow-wrap: anywhere; }
.relationship-trail li { position: relative; padding: 0; }
.relationship-trail li::marker { color: var(--link); font-weight: 700; }
.relationship-trail li + li::before {
  content: "";
  position: absolute;
  inset-block-start: calc(-1 * var(--s4));
  inset-inline-start: var(--s3);
  block-size: var(--s4);
  border-inline-start: 2px solid var(--control);
  pointer-events: none;
}
.relationship-trail li:target { scroll-margin-block-start: var(--s4); }
.relationship-trail li:target .person-card {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  background: var(--panel-tint);
}
.relationship-trail li:target > p {
  font-weight: 600;
}
.relationship-trail p { margin: 0 0 var(--s2); color: var(--muted); }
.relationship-ancestors h3 { scroll-margin-block-start: var(--s4); }
@media (max-width: 30rem) {
  .page-cover.relationship-result { padding-inline: 0; }
  .relationship-trail { padding-inline-start: var(--s5); }
  .relationship-tree-actions > .button { width: 100%; }
}
.relationship-result .button { white-space: normal; }
.sheet-focus p { display: flex; flex-wrap: wrap; column-gap: var(--s4); }
.sheet-focus .button { white-space: normal; }
.sheet-focus .tree-search-return { align-items: center; gap: var(--s2) var(--s3); }
.family-sheet > .actions .button { white-space: normal; }
.sheet-memories a { display: inline-flex; align-items: center; min-block-size: 44px; }
.sheet-story-preview { margin-block-start: var(--s3); }
.sheet-story-preview summary { align-content: center; min-block-size: 44px; cursor: pointer; }
.sheet-story-preview p { max-width: 55ch; font-family: var(--serif); overflow-wrap: anywhere; }
#family-list, #family-chart, #tree-search-results, #tree-linked-relatives { scroll-margin-block-start: var(--s4); }
#family-chart-title { overflow-wrap: anywhere; }
.tree-tools button { white-space: normal; max-width: 100%; overflow-wrap: anywhere; }

@media screen and (min-width: 64rem) {
  :root {
    --desktop-width: 76rem;
    --desktop-gutter: clamp(1.5rem, 3vw, 2.5rem);
 }
  header.site {
    padding: var(--s4) max(var(--desktop-gutter), calc((100% - var(--desktop-width)) / 2 + var(--desktop-gutter)));
    gap: var(--s3) var(--s5);
    background: var(--panel);
 }
  header.site nav { gap: var(--s1); }
  header.site nav a { padding-inline: var(--s3); }
  header.site .quick input { width: clamp(10rem, 16vw, 15rem); }
  main {
    max-width: var(--desktop-width);
    padding: var(--s6) var(--desktop-gutter) var(--s8);
 }
  .page-cover {
    padding: clamp(var(--s5), 3vw, var(--s7));
    margin-block-end: var(--s6);
 }
  .page-cover h1 { font-size: clamp(2.7rem, 3.6vw, 3.65rem); }
  .profile.page-cover:not(.profile-with-photo), .profile.page-cover.profile-with-photo {
    grid-template-columns: auto minmax(0, 1fr) minmax(15rem, .6fr);
    gap: var(--s4) var(--s5);
 }
  .profile.page-cover.profile-with-photo {
    grid-template-columns: minmax(10rem, 15rem) minmax(0, 1fr) minmax(15rem, .6fr);
 }
  .profile.page-cover .portrait { align-self: start; }
  .profile.page-cover .profile-paths {
    grid-column: 3;
    grid-row: 1 / span 3;
    grid-template-columns: minmax(0, 1fr);
    align-self: start;
    gap: var(--s3);
 }
  .profile.page-cover #profile-sections { grid-column: 1 / 3; }
  .profile.page-cover .profile-paths a { padding: var(--s3); }
  .tree-cover-with-search {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(18rem, .8fr);
    align-items: start;
    gap: var(--s5);
    margin-block-start: var(--s4);
 }
  .tree-cover-context > :first-child, .tree-cover-tools > .tree-find { margin-block-start: 0; }
  .panel { border-radius: 14px; padding-inline: var(--s5); }
  .family-news { grid-template-columns: minmax(0, 2fr) minmax(17rem, 1fr); gap: var(--s6); }
  .news-cover:not(.news-cover-relative) {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: var(--s3) var(--s4);
    padding-block: var(--s4);
    margin-block-end: var(--s4);
 }
  .news-cover:not(.news-cover-relative) > * { margin: 0; }
  .news-sidebar { min-width: 0; gap: var(--s5); }
  .news-sidebar > .panel { padding-block: var(--s5); }
}

.calendar-index, .calendar-month-count, .page-links .calendar-desktop-month-link { display: none; }
@media screen and (min-width: 64rem) {
  .timeline-person-layout {
    display: grid;
    grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
    align-items: start;
    gap: var(--s5);
    max-inline-size: none;
 }
  .timeline-person-layout > * { min-inline-size: 0; }
  .timeline-overlap-panel {
    padding: var(--s3) var(--s4);
    background: var(--panel-2);
    border: 1px solid var(--line);
    border-radius: 12px;
 }
  .timeline-overlap-panel > :first-child { margin: 0; }
  .calendar-overview-with-next {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
    align-items: start;
    gap: var(--s5);
    margin-block: var(--s5);
 }
  .calendar-overview-with-next > .panel { min-width: 0; margin-block: 0; }
  .calendar-controls .family-browse { margin-block-start: 0; }
  .calendar-layout { display: grid; grid-template-columns: 13rem minmax(0, 1fr); gap: var(--s6); align-items: start; }
  .calendar-index { display: block; position: sticky; top: var(--s4); max-height: calc(100vh - 2rem); overflow: auto; margin: 0; }
  .calendar-index h2 { font-size: 1.2rem; }
  .calendar-index .page-links { display: grid; gap: var(--s1); margin-top: var(--s2); }
  .calendar-index .page-links a { display: flex; justify-content: space-between; gap: var(--s2); }
  .calendar-index .page-links a:is(:hover, :focus-visible) {
    background: var(--panel-tint);
    border-color: var(--accent);
 }
  .calendar-index .meta { white-space: nowrap; }
  .calendar-months > :first-child { margin-block-start: 0; }
  .calendar-months .dates-page > h2 {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: var(--s2);
    padding-block-end: var(--s2);
    border-block-end: 1px solid var(--line);
 }
  .calendar-months .dates-page:has(> h2:target, > .events > li:target) > h2 {
    padding-inline: var(--s3);
    background: var(--panel-tint);
    border-block-end-color: var(--focus);
    border-radius: 8px 8px 0 0;
 }
  .calendar-month-count {
    display: inline;
    color: var(--muted);
    font: 400 .889rem/1.5 var(--sans);
 }
  .dates-month-picker, .page-links .calendar-mobile-month-link { display: none; }
  .page-links .calendar-desktop-month-link { display: inline-flex; }
}

/* The public sign-in uses a decorative illustration. Signed-in features use family media. */
.album-cover { display: grid; margin-block-end: var(--s6); }
.album-cover-copy { min-width: 0; padding-block: var(--s4); }
.album-family { margin: 0 0 var(--s2); color: var(--muted); }
.album-art { aspect-ratio: 4 / 3; overflow: hidden; border-radius: 6px; }
.album-art img { display: block; width: 100%; height: 100%; object-fit: cover; }
.sign-in-album {
  max-width: 64rem;
  margin-inline: auto;
  gap: clamp(1.25rem, 4vw, 3.5rem);
  padding: clamp(1rem, 2.5vw, 2rem);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
}
.sign-in-album .album-cover-copy {
  width: min(100%, 23rem);
  margin-inline: auto;
}
.sign-in-album .album-family { font-size: .9rem; font-weight: 600; color: var(--link); }
.sign-in-album h1 { margin-block: var(--s2) 0; }
.sign-in-album .stack { margin-block-start: var(--s5); }
.sign-in-album label { font-weight: 600; color: var(--ink); }
.sign-in-album .album-art { aspect-ratio: 5 / 4; }
.sign-in-album .sign-in-actions { gap: var(--s2) var(--s4); }
.sign-in-album .sign-in-actions > button { min-width: 7rem; }
.sign-in-access { padding-block-start: var(--s3); border-block-start: 1px solid var(--line); color: var(--muted); font-size: .89rem; }
.sign-in-album .sign-in-actions a { border-color: transparent;  padding-inline: 0; }
@media screen and (min-width: 48rem) {
  .sign-in-album { grid-template-columns: minmax(0, 4fr) minmax(0, 5fr); align-items: stretch; }
  .sign-in-album .album-cover-copy { align-self: center; padding-block: var(--s4); }
  .sign-in-album .album-art { position: relative; width: 100%; min-height: 24rem; aspect-ratio: auto; }
  .sign-in-album .album-art img { position: absolute; inset: 0; }
}
@media screen and (max-width: 47.999rem) {
  .sign-in-album .album-art { aspect-ratio: 2.25; }
}
@media print { .album-art { display: none; } }
@media screen and (min-width: 78rem) {
  .profile.page-cover:not(.profile-with-photo) {
    grid-template-columns: auto minmax(0, 1fr) minmax(25rem, 1.25fr);
 }
  .profile.page-cover.profile-with-photo {
    grid-template-columns: minmax(10rem, 15rem) minmax(0, 1fr) minmax(25rem, 1.25fr);
 }
  .profile.page-cover .profile-paths {
    grid-template-columns: repeat(2, minmax(0, 1fr));
 }
}
#directory-dates .events .when { color: var(--muted); }

/* Shared page structure and the portrait-led views. */
header.site {
  gap: .5rem clamp(1.25rem, 3vw, 3.5rem);
  padding-block: .65rem;
  background: var(--bg);
}
.brand { font-size: clamp(2.05rem, 3vw, 2.65rem); font-weight: 500; letter-spacing: -.045em; }
header.site .site-nav-desktop { margin-inline-start: auto; }
header.site nav a[aria-current], nav.tabs:not(.tree-view-tabs, .filter-tabs) a[aria-current="page"] {
  color: var(--ink);
  background: var(--panel-tint);
  border-radius: 6px;
}
.site-menu { position: relative; margin: 0 0 0 auto; }
.site-menu summary {
  gap: .5rem;
  color: var(--ink);
  padding-inline: .45rem;
}
.site-menu .header-avatar { width: 2rem; height: 2rem; font: 600 .72rem/1 var(--sans); }
.site-menu summary::after {
  content: "";
  width: .45rem;
  height: .45rem;
  border: solid currentColor;
  border-width: 0 1.5px 1.5px 0;
  transform: rotate(45deg);
  margin-block-end: .25rem;
}
.site-menu > nav {
  position: absolute;
  inset-inline-end: 0;
  inset-block-start: 100%;
  z-index: 5;
  display: grid;
  min-width: 13rem;
  max-width: calc(100vw - 2rem);
  padding: .5rem;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: 0 8px 24px rgba(38, 33, 27, .14);
}
.site-menu nav a, .site-menu .link { padding-inline: .65rem; }
.site-menu nav a:hover, .site-menu nav a[aria-current="page"] { background: var(--panel-tint); }
.site-menu-mobile { display: none; }
main { padding-block-start: clamp(1.25rem, 3vw, 3rem); }
.page-cover {
  padding: 0 0 var(--s4);
  background: transparent;
  border-width: 0;
  border-radius: 0;
  box-shadow: none;
}
.page-cover h1 { font-size: clamp(2.15rem, 1.5rem + 2.6vw, 3.5rem); line-height: 1.08; }
.panel { box-shadow: none; border-radius: 6px; }
.button, button { border-radius: 6px; }
input:not([type="file"]), textarea, select { border-radius: 6px; }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: 1; }
input[type="radio"], input[type="checkbox"] { accent-color: var(--link); }
a:not(.button):hover { text-decoration-thickness: 2px; }
.name { font-size: 1.27rem; line-height: 1.2; }
.person-card { box-shadow: none; }
footer.site { background: transparent; }

.home-cover { display: grid; gap: clamp(1.55rem, 4vw, 3.5rem); margin-block-end: var(--s5); }
.home-cover-copy { align-self: start; min-width: 0; }
.home-cover h1 { font-size: clamp(2.3rem, 1.55rem + 3.35vw, 4.15rem); font-weight: 500; letter-spacing: -.035em; }
.directory-search > label { flex: 1 1 9rem; min-width: 0; padding: 0; }
.home-cover .directory-search { display: grid; grid-template-columns: minmax(0, 1fr) auto; }
.home-hero-links { display: grid; justify-items: start; gap: var(--s2); margin-block-start: var(--s4); }
.home-hero-links a { display: inline-flex; align-items: center; gap: var(--s2); min-block-size: 44px; }
.home-hero-links .home-share { margin-block: var(--s1); }
.home-features { min-width: 0; display: grid; gap: var(--s4); }
.home-feature { margin: 0; min-width: 0; }
.home-feature > a { display: block; color: var(--ink); text-decoration: none; }
.home-feature > a:hover .home-caption { color: var(--link); }
.home-feature-label { font: 400 1.3rem/1.2 var(--serif); margin-block-end: var(--s2); }
.home-feature img { display: block; width: 100%; aspect-ratio: 2 / 1; object-fit: cover; border-radius: 6px; }
.home-feature .home-caption { display: flex; justify-content: space-between; gap: .5rem; margin-block: .5rem 0; color: var(--ink); font: italic 500 1.42rem/1.2 var(--serif); }
.home-caption > [aria-hidden] { font: 1rem var(--sans); color: var(--link); }
.home-from-archive img { aspect-ratio: 5 / 3; object-position: center 35%; }
.home-from-archive { max-width: min(100%, 15rem); }
.home-recent-story { margin-block: var(--s5); }
.home-recent-story h2 { margin: 0 0 var(--s2); }
.home-recent-story blockquote { margin-inline: 0; }
#directory-dates { border: 0; background: transparent; padding-inline: 0; }
#directory-dates .events { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); gap: var(--s3) var(--s4); }
#directory-dates .events > li, #directory-dates .events > li:last-child {
  border: 0;
  border-radius: 6px;
  background: var(--panel-2);
  padding: var(--s3);
}
#directory-dates .events .upcoming-names { font-size: 1.05rem; }
.home-recent { padding-block: var(--s2); }
#family-directory > a { display: inline-flex; align-items: center; min-height: 44px; }

.directory-add-link { display: inline-flex; min-height: 2.75rem; align-items: center; gap: .5rem; }
.people-tools { margin-block: var(--s5); }
.cards.portrait-directory {
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
}
.portrait-directory > li {
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
}
.portrait-directory > li > .person-card {
  grid-template-columns: auto minmax(0, 1fr) auto;
  padding: var(--s3) 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.portrait-directory .avatar {
  width: clamp(3.4rem, 21vw, 5.5rem);
  height: auto;
  aspect-ratio: 1;
  border-radius: 6px;
  font-size: 1.5rem;
}
.portrait-directory .person-card:hover .name { color: var(--link); }
.portrait-directory .person-card .name { font-size: 1.35rem; }
.portrait-directory .person-card:not(:hover) .name { color: var(--ink); text-decoration: none; }
.portrait-directory .directory-profile-arrow { grid-column: 3; grid-row: 1; align-self: center; }
.portrait-directory .person-card .avatar img { color: var(--muted); }

.page-cover.news-cover:not(.news-cover-relative) { display: block; }
.news-cover > .actions { margin-block: var(--s4); }
.news-cover .family-browse { margin: 0; }
.news-cover > .actions > a:not(.button) { display: inline-flex; align-items: center; min-height: 44px; }
.family-news .news-memories { grid-template-columns: minmax(0, 1fr); gap: 0; }
.family-news .news-memory {
  border-width: 0;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
  padding: var(--s4) 0;
}
.family-news .news-memory + .news-memory { border-block-start: 1px solid var(--line); }
.family-news .news-memory[aria-describedby="selected-update-label"] { background: var(--panel-tint); }
.family-news .news-memory-photo .news-photo {
  margin: 0;
  padding: 0;
  background: none;
  border: 0;
  color: var(--ink);
}
.family-news .news-memory-photo .news-photo > img { aspect-ratio: 16 / 10; }
.family-news .news-memory-photo .news-photo > img {
  border: 0;
  padding: 0;
  max-height: 13rem;
  background: none;
}
.family-news .news-photo { text-decoration: none; }
.family-news .news-photo-caption { font-family: var(--sans); }
.news-photo-credit { display: block; }
.family-news h2.news-feed-title { font: 600 .95rem/1.3 var(--sans); margin-block: 0 var(--s2); }
.news-photo-caption { padding-inline: 0; }
.news-photo-caption .news-photo-title { display: block; font: 400 1.8rem/1.1 var(--serif); }
.family-news .news-credit { padding: 0; border: 0; }
.family-news .news-update-links a { background: transparent; border-color: var(--line); }
.family-news .news-person-link { background: none; border: 0; padding-inline: 0; }
.family-news .news-memory > .share-qr { border: 0; background: transparent; padding: 0; margin-block: var(--s2) 0; }
.family-news .news-memory > .share-qr > summary { border: 0; background: transparent; padding-inline: 0; }
.family-news .news-update-links { gap: var(--s1) var(--s3); }
.view-family_news .family-news { grid-template-columns: minmax(0, 1fr); }
.view-family_news .news-sidebar { padding-block-start: var(--s4); }
.view-family_news .news-sidebar .news-dates { background: transparent; border: 0; padding-inline: 0; }
.view-family_news .news-dates .events > li { border: 0; }
.news-open-photo {
  display: inline-flex;
  gap: var(--s2);
  margin-block-start: var(--s2);
  color: var(--link);
  font: 600 .93rem/1.35 var(--sans);


}

.view-tree .tree-chart .tree-wrap { border-radius: 6px; }
.view-tree .sheet-focus, .view-tree .tree-cover-tools > .tree-find, .view-tree .tree-cover-context > .tree-branch-jump {
  border: 0;
  box-shadow: none;
  background: transparent;
  padding-inline: 0;
}
.view-tree .sheet-focus .actions, .view-tree .sheet-focus .page-links { gap: var(--s1) var(--s2); margin-block: var(--s2); }
.view-tree .sheet-focus .page-links a { padding-inline: var(--s2); background: none; border-color: var(--line); }
.view-tree .sheet-focus .sheet-view-links { border: 0; padding: 0; }
.view-tree .family-sheet > .sheet-memories { margin-block-start: var(--s4); }
.tree-cover-focused .tree-cover-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s2) var(--s4);
}
.tree-cover-focused .tree-cover-context:not(:has(> *)) { display: none; }
.tree-cover-focused .tree-find { flex: 1 1 17rem; margin: 0; }
.tree-cover-focused .tree-find-row { max-width: none; }
.view-tree #tree-linked-relatives:not(:is(:target, :focus)) {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}
.view-tree .tree-view-focused .family-sheet > h3 { border-block-end: 0; padding-block-end: 0; }
.sheet-secondary { margin-block-start: var(--s4); }
.tree-view-focused .family-sheet .person-card {
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  padding-inline: 0;
}
.tree-view-focused .sheet-list { grid-template-columns: minmax(0, 1fr); }
.sheet-focus-person .avatar { width: 5rem; height: 5rem; }

.relative-steps {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  list-style: none;
  padding: 0;
  margin: var(--s4) 0;
}
.relative-steps { counter-reset: relative-step; }
.relative-steps li {
  display: flex;
  align-items: center;
  gap: var(--s2);
  flex: 1 0 auto;
  counter-increment: relative-step;
  padding: var(--s2) 0;
  font-size: .89rem;
  color: var(--muted);
}
.relative-steps li::before {
  content: counter(relative-step);
  display: grid;
  place-items: center;
  width: 1.45rem;
  height: 1.45rem;
  border-radius: 50%;
  border: 1px solid var(--control);
  font-size: .75rem;
}
.relative-steps [aria-current="step"] { color: var(--ink); font-weight: 700; }
.relative-steps [aria-current="step"]::before { color: var(--on-accent); background: var(--accent); border-color: var(--accent); }
.view-member_add .relative-find, .view-member_add .relative-new { background: transparent; border: 0; padding-inline: 0; }
.view-member_add .relative-review { border: 0; padding-inline: 0; background: transparent; }
.view-member_add .relative-review dt { font-weight: 700; }
.view-member_add .relative-review dd { margin-inline-start: 0; }
.view-member_add #relative-answers fieldset:has(#first-name) {
  padding-inline: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}
.view-member_add #relative-answers fieldset:has(#first-name) legend {
  padding: 0;
  font: 400 1.65rem/1.2 var(--serif);
}
.view-member_add .relative-step-back { margin-block: 0 var(--s2); }
.view-member_add .relative-step-back > a {
  padding-inline: 0;
  border: 0;
  background: transparent;
}
.relative-context-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s3); margin-block-end: 0; }
.relative-context-fields dt { font-size: .89rem; color: var(--muted); }
.relative-context-fields dd { margin-inline: 0; }

.help-overview { display: grid; gap: var(--s5); margin-block-end: var(--s5); }
.help-faq > details { margin: 0; padding: var(--s2) 0; }
.help-faq > details + details { border-block-start: 1px solid var(--line); }
.help-faq summary {
  display: list-item;
  list-style-position: inside;
  padding-block: var(--s2);
  font: 400 1.45rem/1.2 var(--serif);
  color: var(--ink);
}
.help-faq p { margin: var(--s2) 0; }

.account-overview {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: var(--s1) var(--s3);
}
.account-identity { min-width: 0; }
.account-identity strong { display: block; font: 400 1.8rem/1.1 var(--serif); }
.account-avatar.avatar { width: 4.25rem; height: 4.25rem; }
.account-overview #your-details { grid-column: 1 / -1; }
.account-profile-links { display: flex; flex-wrap: wrap; align-items: center; gap: 0 var(--s4); }
.account-profile-links > p, .account-profile-links > details { margin: 0; }
.account-profile-links > details[open] { flex-basis: 100%; }
.account-profile-links summary { min-block-size: 44px; padding-block: var(--s2); }
.account-sections { display: block; max-width: none; }
.account-sections > .panel, .account-sections .account-security > .panel {
  padding: var(--s4) 0;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}
.account-sections > .panel > h2:first-child, .account-sections .account-security h2:first-child { margin-block: 0 var(--s2); }
.account-sections .account-security > .panel + .panel { border-block-start: 1px solid var(--line); }
.account-sections details > summary { display: flex; padding-block: var(--s2); }
.account-sections details > summary::before { content: none; }
.account-sections details > summary::after { content: "⌄"; margin-inline-start: auto; }
.account-sections details[open] > summary::after { transform: rotate(180deg); }
.account-sections .stack { max-width: 26rem; }
.account-security > h2 { margin-block: var(--s4) var(--s2); }
.account-security details > summary { font-weight: 600; }
.account-security details > summary .meta { margin-inline-start: var(--s2); }
.view-account { max-width: 62rem; }
.view-account .account-cover { border: 0; padding-block-end: 0; margin-block-end: var(--s4); }
.view-account #your-details > p { margin-block: var(--s2); }
.view-account #your-details > .page-links { gap: var(--s1) var(--s3); margin-block: 0; }
.view-account #weekly-letter {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  column-gap: var(--s3);
}
.view-account #weekly-letter > :not(form) { grid-column: 1; }
.view-account #weekly-letter > p { margin-block: 0 var(--s1); }
.view-account #weekly-letter-status:not(.notice) {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}
.weekly-setting-control { grid-column: 2; grid-row: 1 / span 3; }
.weekly-switch {
  gap: var(--s2);
  padding-inline: 0;
  background: transparent;
  border-color: transparent;
  color: var(--ink);
}
.switch-track {
  display: flex;
  align-items: center;
  width: 2.5rem;
  height: 1.4rem;
  padding-inline: .15rem;
  border: 1px solid var(--control);
  border-radius: 1rem;
  background: var(--panel-2);
}
.switch-track::before { content: ""; width: 1rem; height: 1rem; border-radius: 50%; background: var(--control); }
.weekly-switch[aria-checked="true"] .switch-track { justify-content: flex-end; background: var(--link); }
.weekly-switch[aria-checked="true"] .switch-track::before { background: var(--bg); }

@media screen and (min-width: 42rem) {
  .cards.portrait-directory { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s5); }
  .portrait-directory > li > .person-card { grid-template-columns: minmax(0, 1fr) auto; align-content: start; padding-block-start: 0; }
  .portrait-directory .avatar { grid-column: 1 / -1; width: 100%; aspect-ratio: 4 / 3; margin-block-end: var(--s3); font-size: 2.75rem; }
  .portrait-directory .directory-profile-arrow { grid-column: 2; grid-row: 2; }
  .help-overview { grid-template-columns: minmax(0, 2.5fr) minmax(12rem, 1fr); }
  .help-organizer h2 { margin-block-start: 0; }
  .family-news .news-memory-photo .news-photo { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: var(--s4); align-items: center; }
}
@media screen and (min-width: 48rem) {
  .site-menu { margin-inline-start: 0; }
  .home-cover { grid-template-columns: minmax(0, 4fr) minmax(0, 5fr); }
  .home-cover-copy { padding-block-start: clamp(2rem, 6vw, 4.5rem); }
  .home-hero-links .home-share { width: min(100%, 23rem); justify-content: flex-start; }
  .home-feature-label { display: none; }
  .home-feature img { max-height: 21rem; }
  #directory-dates { display: grid; grid-template-columns: minmax(8rem, 1fr) minmax(0, 4fr); gap: var(--s3) var(--s5); }
  #directory-dates h2 { margin: var(--s2) 0; }
  #directory-dates > .actions { grid-column: 2; margin-block: 0; }
  .page-cover.news-cover:not(.news-cover-relative) { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3) var(--s5); }
  .news-cover:not(.news-cover-relative) h1, .news-cover:not(.news-cover-relative) > .actions { margin-block: 0; }
}
@media screen and (min-width: 64rem) {
  .view-tree { max-width: 85rem; }
  .tree-view-focused { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 4fr); align-items: start; gap: var(--s6); }
}
@media screen and (max-width: 47.999rem) {
  header.site .site-nav-desktop, .site-menu-account { display: none; }
  span.site-menu-mobile { display: inline; }
  div.site-menu-mobile { display: grid; border-block-end: 1px solid var(--line); margin-block-end: var(--s1); }
  .home-hero-links .home-share { width: 100%; }
  .home-cover .titlebar, .home-cover .directory-search { margin-block-end: var(--s2); }
  .home-hero-links { gap: 0; margin-block-start: var(--s2); }
  .home-feature img { aspect-ratio: 2.15; object-position: center 40%; }
  .home-from-archive { max-width: none; }
  .home-from-archive img { aspect-ratio: 2.7; object-position: center 34%; }
  .page-cover.news-cover { padding-inline: 0; }
  .news-cover:not(.news-cover-relative) > .actions { display: flex; flex-wrap: wrap; gap: var(--s1) var(--s4); }
  .news-cover:not(.news-cover-relative) > .actions > .button { flex-basis: 100%; }
}
@media screen and (max-width: 25rem) {
  .relative-steps li { font-size: .75rem; }
  .relative-add-heading.connection-cover { padding-inline: 0; }
}
@media print {
  .home-cover { grid-template-columns: 1fr; }
  .home-hero-links { display: none; }
}

/* Page widths follow the task: scanning, reading, or entering details. */
.view-member_form, .view-identify, .view-relate,
.view-connect, .view-member_add, .view-media_form,
.view-upload_result, .view-photo_missing, .view-message, .view-link {
  max-width: 50rem;
}
.view-story_read, .view-life_story { max-width: 57rem; }
.view-tree, .view-people { max-width: 75rem; }
:is(.view-accept, .view-invite_expired, .view-forgot, .view-reset,
    .view-reset_requested, .view-mfa, .view-unsubscribe) > .narrow {
  max-inline-size: 35rem;
  padding: 0 0 var(--s4);
  margin-block: var(--s3) var(--s6);
  border: 0;
  border-block-end: 1px solid var(--line);
  background: transparent;
}
:is(.view-accept, .view-invite_expired, .view-forgot, .view-reset,
    .view-reset_requested, .view-mfa, .view-unsubscribe) h1 {
  font-size: clamp(2.2rem, 1.6rem + 2vw, 3.25rem);
}
.sign-in-cover .sign-in-family {
  color: var(--link);
  font-size: .9rem;
  font-weight: 600;
  margin-block: 0 var(--s2);
}
.sign-in-cover h1 { margin-block: 0 var(--s3); }
.sign-in-cover .sign-in-actions { gap: var(--s2) var(--s4); }
.sign-in-cover .stack > .sign-in-actions { margin-block: 0; }
.sign-in-cover .invite-email {
  padding: 0 0 0 var(--s3);
  border: 0;
  border-inline-start: 2px solid var(--brass);
  border-radius: 0;
  background: transparent;
}
.invite-cover #invite-password-help { margin-block: calc(-1 * var(--s2)) 0; }
.sign-in-cover .sign-in-actions > .quiet,
.sign-in-cover .access-secondary {
  border-color: transparent;
  background: transparent;
  padding-inline: 0;


}
.access-option { padding-block-start: var(--s3); border-block-start: 1px solid var(--line); }
.access-option > h2 { font-size: 1.55rem; margin-block: 0 var(--s1); }
.access-option > p { margin-block: var(--s1) var(--s3); }
.recovery-address {
  padding-inline-start: var(--s3);
  border-inline-start: 2px solid var(--brass);
}
.recovery-address > * { display: block; }
.recovery-alternative > summary { min-block-size: 44px; padding-block: var(--s2); }
:is(.view-media_form, .view-upload_result, .view-photo_missing, .view-link) .page-cover {
  padding-inline: 0;
}
:is(.view-member_form, .view-member_add, .view-connect, .view-life_story) fieldset {
  min-inline-size: 0;
  padding: var(--s3) var(--s4);
  border-radius: 6px;
}
:is(.view-member_form, .view-member_add, .view-connect, .view-life_story) legend { color: var(--ink); }
:is(.view-albums, .view-stories, .view-lifetimes, .view-dates, .view-history) .page-cover {
  padding-inline: 0;
}
.view-story_read .story-reading-page { background: var(--panel); border-color: var(--line); box-shadow: none; }
:is(.view-photo, .view-photo_full) .photo-cover { padding-inline: 0; }
.view-member_show .profile.page-cover { padding-inline: 0; }
.view-member_show .profile-paths a { border-color: transparent; background: var(--panel-2); }
.view-member_show .profile-paths a:is(:hover, :focus-visible) { background: var(--panel-tint); }
.view-member_show #profile-sections {
  display: flex;
  gap: var(--s2);
  margin-block-start: var(--s4);
  padding-block-start: 0;
  border: 0;
}
.view-member_show #profile-sections h2 { flex-basis: 100%; margin-block-end: var(--s1); }
.view-member_show #profile-sections a {
  padding-inline: var(--s3);
  border: 0;
  background: var(--panel-2);
  box-shadow: none;
}
.view-member_show #profile-sections a:is(:hover, :focus-visible) { background: var(--panel-tint); }
.photo-return-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 var(--s4);
}
.photo-return-links a {
  display: inline-flex;
  align-items: center;
  min-block-size: 44px;
  font-size: .9rem;
}
.photo-return-links .button { padding-inline: 0; border: 0; background: transparent; }
.view-photo .photo-cover { padding-block-end: var(--s2); margin-block-end: var(--s2); border: 0; }
.view-photo .photo-cover h1 { margin-block: var(--s2) 0; }
.view-photo .photo-cover .meta { margin-block: var(--s2) 0; }
.view-photo .photo { margin-block: var(--s2); }
.view-photo .photo-mat { padding: 0; border: 0; background: transparent; }
.view-photo .photo-mat img { inline-size: 100%; border-radius: 6px; }
.view-photo .photo-view-actions, .view-photo .photo-nav-primary { gap: var(--s2); }
.view-photo #photo-people { padding-inline: 0; border-width: 1px 0 0; border-radius: 0; background: transparent; }
.view-media_form .upload-cover .upload-profile { background: transparent; box-shadow: none; }
.view-media_form .relative-step { margin-inline: auto; }
.view-media_form .panel:has(#upload-files-title) { padding: 0; border: 0; background: transparent; }
.view-media_form #upload-steps { margin-block-start: 0; }
.view-media_form input[type="file"] {
  display: block;
  inline-size: 100%;
  color: var(--ink);
  border: 1px solid var(--control);
  border-radius: 6px;
  padding: var(--s2);
  background: var(--panel);
  font: inherit;
}
.view-media_form input[type="file"]::file-selector-button {
  margin-inline-end: var(--s2);
  border: 1px solid var(--control);
  border-radius: 4px;
  background: var(--panel-2);
  color: var(--ink);
  font: inherit;
  padding: var(--s2);
  min-block-size: 44px;
  cursor: pointer;
}
.view-upload_result .upload-receipt > .page-links:not(:has(a)) { display: none; }
.view-upload_result .news-memories > li { box-shadow: none; }
.directory-empty, .news-empty {
  padding-block: var(--s3);
  border-block: 1px solid var(--line);
}
.directory-empty h2, .news-empty h3 {
  margin-block: 0 var(--s2);
  font-size: clamp(1.5rem, 1.15rem + 1.4vw, 2.1rem);
}
.view-albums .family-albums > li,
.view-stories .story-library > li {
  padding-inline: 0;
  background: transparent;
  border-width: 1px 0 0;
  border-radius: 0;
  box-shadow: none;
}
.view-albums .family-albums .news-photo,
.view-stories .story-library h3 .person-card {
  background: transparent;
  border: 0;
  box-shadow: none;
  padding-inline: 0;
  text-decoration: none;
}
.view-albums .family-albums .news-photo { padding-block: 0; }
.view-albums .family-albums .news-photo img {
  aspect-ratio: 16 / 10;
  object-fit: cover;
  padding: 0;
  border: 0;
  border-radius: 6px;
}
.view-albums .family-albums :is(.album-name, .album-label, .album-open) { padding-inline: 0; }
.view-albums .family-albums .album-name { font-size: 1.5rem; color: var(--ink); }
.view-stories .story-library > li > .story-paragraph { font: 400 1rem/1.65 var(--sans); }
.view-stories .story-library-write a {
  border: 0;
  background: transparent;
  padding-inline: 0;


}
.view-lifetimes #lifetimes-views,
.view-lifetimes .lifetimes-cover .tree-view-tabs { gap: 0 var(--s2); }
.view-lifetimes #lifetimes-views a,
.view-lifetimes .lifetimes-cover .tree-view-tabs a {
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
  color: var(--link);
}
.view-lifetimes :is(#lifetimes-views, .tree-view-tabs) a[aria-current] {
  background: var(--panel-tint);
  color: var(--ink);
  font-weight: 700;
}
.view-lifetimes .lifetimes-cover .tree-view-tabs { background: transparent; border-width: 0; padding: 0; }
.view-lifetimes #lifetimes-chart-title { margin-block: var(--s3) var(--s2); }
.view-lifetimes #lifetimes-chart-help { margin-block: 0 var(--s2); }
.view-lifetimes #lifetimes-views { margin-block: var(--s2) var(--s3); }
.view-lifetimes :is(#lifetimes-views, .tree-view-tabs) a { border-radius: 6px; }
.view-dates .calendar-shortcuts {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s1) var(--s3);
}
.view-dates .calendar-shortcuts > a {
  padding-inline: 0;
  border: 0;
  background: transparent;
  font-weight: 600;
}
.view-dates .dates-cover { margin-block-end: var(--s3); }
.view-dates .dates-cover > :last-child { margin-block-start: 0; }
.view-dates .next-family-date { border: 0; padding: var(--s3) var(--s4); box-shadow: none; }
.view-dates .next-date-when { padding: 0; border: 0; background: transparent; }
.view-history .history-search-options { margin-block-start: var(--s3); }
.view-history .history-search-options > summary { color: var(--link); }
.view-history #history-entries { margin-block-start: var(--s4); }
.view-history .history > li {
  padding-inline: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}
.view-history .history > li + li { border-block-start: 1px solid var(--line); }
.view-history .history > li > details > summary {
  padding-inline: 0;
  border: 0;
  background: transparent;
  color: var(--link);
}
.view-help .help-organizer .avatar { margin-block-end: var(--s3); }
.view-help .help-organizer .name { margin-block: var(--s2); }
footer.site .page-links a {
  background: transparent;
  border-color: transparent;
  border-radius: 0;
  padding-inline: var(--s2);
  box-shadow: none;
  color: var(--link);
}
.people-cover { margin-block-end: var(--s2); padding-block-end: 0; }
.people-cover .directory-add-link { font-weight: 600; }
.people-filters { align-items: center; gap: var(--s1) var(--s2); margin-block: var(--s2) var(--s3); }
.people-filters > a { padding-inline: var(--s2); }
@media screen and (max-width: 30rem) {
  .people-filters { gap: var(--s1) .35rem; }
  .people-filters > a { padding-inline: .35rem; }
}
.people-tools { gap: var(--s2) var(--s3); }
.people-sort { position: relative; margin: 0 0 0 auto; }
.people-sort summary { font-size: .89rem; color: var(--link); padding-inline: var(--s2); }
.people-sort summary::after { content: "⌄"; margin-inline-start: var(--s2); }
.people-sort-options {
  position: absolute;
  z-index: 2;
  inset-inline-end: 0;
  min-width: 9rem;
  padding: var(--s2);
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
}
.people-sort-options a { display: flex; }
.people-sort-options a[aria-current="true"] {  font-weight: 600; }
#invite-family > details > summary {
  width: fit-content;
  gap: var(--s2);
  padding-inline: var(--s3);
  border: 1px solid var(--control);
  border-radius: 6px;
  color: var(--link);
}
.view-account #invite-family > details:not([open]) > summary {
  color: var(--on-accent);
  background: var(--accent);
  border-color: var(--accent);
}
@media screen and (min-width: 48rem) {
  .view-family_news .news-sidebar { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); align-items: start; }
  .view-family_news .news-sidebar .news-shortcuts { grid-column: 1; }
  .view-family_news .news-sidebar .news-dates { grid-column: 2; }
  .view-account .account-cover h1 { margin-block-end: var(--s4); }
  .account-overview { align-items: start; column-gap: var(--s4); }
  .account-avatar.avatar { grid-row: 1 / span 2; width: 6.15rem; height: 6.15rem; }
  .account-overview #your-details { grid-column: 2; }
  #invite-family { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: var(--s2) var(--s3); }
  #invite-family > details { margin: 0; }
  #invite-family > details[open] { grid-column: 1 / -1; }
  #invite-family > h2:first-child { margin: 0; }
}
@media screen and (min-width: 55rem) {
  header.site:has(.site-menu) { display: grid; grid-template-columns: minmax(9rem, 1fr) auto minmax(9rem, 1fr); }
  header.site .site-nav-desktop { margin-inline: 0; justify-content: center; }
  header.site .site-menu { justify-self: end; }
}
@media screen and (max-width: 47.999rem) {
  .sheet-focus-person .avatar { width: 3.5rem; height: 3.5rem; }
  .tree-cover-focused #tree-find-hint { margin-block-end: 0; }
  .view-tree .family-sheet > #relative-groups { gap: 0 var(--s2); }
  .view-tree .family-sheet > #relative-groups > a {
    padding-inline: var(--s1);
    border: 0;
    background: none;
    min-height: 44px;
 }
  .family-news .news-memory-photo .news-photo {
    grid-template-columns: minmax(5rem, 1fr) minmax(0, 1.75fr);
    align-items: start;
    column-gap: var(--s3);
 }
  .family-news .news-memory-photo .news-photo > img { aspect-ratio: 1; }
  .family-news .news-photo-caption { padding-block: 0; }
  .news-photo-caption .news-photo-title { font-size: 1.25rem; }
  .relative-steps li { flex: 1 1 3.4rem; align-items: flex-start; flex-direction: column; }
  .view-account #weekly-letter > h2 { font-size: 1.42rem; }
  .view-account #weekly-letter > p { grid-column: 1 / -1; }
  .weekly-setting-control { grid-row: 1; }
}

.news-cover:not(.news-cover-relative) { padding-block-end: var(--s3); }
.family-news .news-feed-title:not(:is(:focus, :target)) {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}
.news-feed-filters { margin-block: 0 var(--s3); }
.news-feed-filters > summary,
.news-update-options > summary {
  min-block-size: 44px;
  padding-block: .65rem;
  color: var(--link);
  font-size: .9rem;
}
.news-feed-filters > .filter-tabs { margin-block: 0; }
.news-update-options { margin-block-start: var(--s1); }
.news-update-options:not([open]) > summary { color: var(--muted); }
.news-update-options > .share-qr { margin-block: var(--s2) 0; }
.family-news .news-memory { padding-block: var(--s3); }
.family-news .news-memory-photo .news-photo { box-shadow: none; }
.family-news .news-memory-photo .news-photo > img { object-fit: cover; }
.family-news .news-document-heading { padding: 0; border: 0; box-shadow: none; background: transparent; }
.family-news .news-memory-story .news-story-excerpt { font: 400 1rem/1.5 var(--sans); }
.family-news .news-entry {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  align-items: center;
  gap: var(--s4);
}
.news-entry h3 {
  margin-block: 0 var(--s1);
  font: 400 1.8rem/1.1 var(--serif);
}
.news-entry .meta { margin-block: 0; }
.news-entry .news-document-action { margin-block-start: var(--s1); }
.news-byline { display: block; }
.family-news .news-story-excerpt { margin-block: var(--s2) 0; }
.news-entry-action {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  min-block-size: 44px;
  font-weight: 600;
}
.news-story-image, .news-document-art {
  inline-size: 100%;
  aspect-ratio: 16 / 10;
  max-block-size: 13rem;
  border-radius: 6px;
  object-fit: cover;
}
.news-story-image:not(img), .news-document-art {
  display: grid;
  place-items: center;
  background: var(--panel-tint);
  font: 400 2rem/1 var(--serif);
  color: var(--muted);
}
.news-document-art span {
  inline-size: clamp(1.6rem, 4vw, 2.8rem);
  aspect-ratio: 3 / 4;
  border: 1px solid var(--control);
  border-radius: 3px;
  background: repeating-linear-gradient(to bottom, var(--line) 0 1px, transparent 1px 6px) center / 60% 50% no-repeat var(--panel);
}
.news-recording-player { min-width: 0; }
.news-recording-player :is(audio, video) { margin: 0; }
.news-recording-player video { max-block-size: 17rem; }

.tree-cover .tree-person-cover {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: var(--s3);
  margin-block-end: var(--s3);
}
.tree-person-cover .avatar { width: 5.5rem; height: 5.5rem; flex: none; }
.tree-person-cover h1, .tree-person-cover p { margin-block: 0; }
.tree-person-cover .tree-focus-name { font: 400 1.45rem/1.2 var(--serif); }
.tree-cover-focused:has(.tree-person-cover) .tree-cover-tools { align-items: start; }
.tree-cover-focused:has(.tree-person-cover) .tree-find { padding-block: 0; }
.tree-cover-focused:has(.tree-person-cover) #tree-find-hint { margin-block-end: 0; }
.tree-view-focused .tree-chart > h2 { margin-block: 0 var(--s2); font-size: 1.5rem; }
.tree-view-focused .tree-chart > .actions { margin-block: 0 var(--s2); gap: var(--s3); }
.tree-view-focused .tree-chart > .actions > a {
  border: none;
  background: transparent;
  padding-inline: 0;


}
.tree-view-focused .tree-chart #tree-chart-help { margin-block: 0 var(--s2); }
.help-faq details > summary {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--s3);
}
.help-faq details > summary::-webkit-details-marker { display: none; }
.help-faq details > summary::after {
  content: "";
  flex: none;
  inline-size: .5rem;
  block-size: .5rem;
  border-inline-end: 1px solid currentColor;
  border-block-end: 1px solid currentColor;
  transform: rotate(45deg);
}
.help-faq details[open] > summary::after { transform: rotate(225deg); }
.tree-view-focused .family-sheet > h3 { margin-block: var(--s3) var(--s1); }
.tree-view-focused .family-sheet > #relative-groups { margin-block: 0 var(--s2); }

.view-member_add .relative-birth-options {
  border: 0;
  padding: 0;
  background: transparent;
  box-shadow: none;
}
.relative-birth-options .relative-birth-choice {
  display: flex;
  align-items: center;
  gap: var(--s2);
  min-block-size: 44px;
}
.relative-birth-choice input { inline-size: 1rem; block-size: 1rem; margin: 0; accent-color: var(--link); }
.relative-birth-options:has([value="exact"]:checked) .relative-birth-approximate,
.relative-birth-options:has([value="approximate"]:checked) .relative-birth-exact { display: none; }
.relative-birth-options .relative-birth-exact,
.relative-birth-options .relative-birth-approximate { margin-block-start: var(--s2); }
.view-member_add .relative-add-heading { margin-block-end: var(--s3); }
.view-member_add .relative-add-context { padding-block: var(--s2); }
#relative-answers > h2 { margin-block: 0; }
.view-member_add .relative-review { margin: 0; padding-block: var(--s2); }
.view-member_add #relative-review-connection {
  margin-block: 0;
  padding: 0;
  background: transparent;
}
.view-member_add .relative-review-heading .relative-steps { margin-block: var(--s2) 0; }
.relative-review dd + dt { margin-block-start: var(--s3); padding-block-start: 0; border-block-start: 0; }
.relative-review-optional > summary { min-block-size: 44px; padding-block: .6rem; }
.relative-review-actions { margin-block: 0; }

.portrait-directory .meta { font-size: .82rem; line-height: 1.35; }
.view-account .account-sections > .panel,
.view-account .account-sections .account-security > .panel { padding-block: var(--s3); }
.view-account #your-details > .page-links a { background: transparent; border: 0; padding-inline: 0; }
.view-account .account-security details > summary { min-block-size: 44px; }

@media screen and (min-width: 48rem) {
  .help-overview:has(.help-organizer) { grid-template-columns: minmax(12rem, 1fr) minmax(0, 3fr); }
  .help-organizer { grid-column: 1; grid-row: 1; padding-inline: 0 var(--s4); }
  .help-overview:has(.help-organizer) .help-faq { grid-column: 2; grid-row: 1; }
  .help-faq details > div {
    display: grid;
    grid-template-columns: minmax(0, 3fr) minmax(9rem, 2fr);
    align-items: start;
    gap: var(--s3);
    padding-inline: var(--s4) var(--s2);
 }
}
@media screen and (min-width: 64rem) {
  .tree-view-focused .tree-chart .tree-wrap { background: transparent; }
}
@media screen and (max-width: 47.999rem) {
  .home-cover { gap: var(--s3); }
  .home-features { gap: var(--s3); }
  .home-feature img { aspect-ratio: 2.6; }
  .home-from-archive img { aspect-ratio: 3.15; }
  .home-from-archive:has(img) > a {
    display: grid;
    grid-template-columns: minmax(4.5rem, 26%) minmax(0, 1fr);
    grid-template-rows: auto auto;
    align-content: center;
    align-items: end;
    column-gap: var(--s3);
 }
  .home-from-archive:has(img) img {
    grid-row: 1 / span 2;
    aspect-ratio: 4 / 3;
    object-position: center;
 }
  .home-from-archive:has(img) .home-caption { margin-block: 0; }
  .home-from-archive:has(img) .meta { align-self: start; }
  .home-feature-label { font-size: 1.15rem; }
  .home-feature .home-caption { font-size: 1.25rem; }
  .news-cover:not(.news-cover-relative) > .actions { margin-block: var(--s2) 0; }
  .family-news #news-filters .filter-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0 var(--s1);
 }
  .family-news #news-filters .filter-tabs a {
    border: 0;
    border-radius: 0;
    padding-inline: var(--s2);
    background: none;
    color: var(--link);
 }
  .family-news #news-filters .filter-tabs a[aria-current] { border-radius: 6px; background: var(--panel-tint); font-weight: 700; }
  .family-news #news-filters .filter-tabs a > [aria-hidden] { display: none; }
  .family-news .news-entry {
    grid-template-columns: minmax(5rem, 1fr) minmax(0, 1.75fr);
    align-items: start;
    gap: var(--s3);
 }
  .news-entry h3 { font-size: 1.25rem; }
  .news-story-image, .news-document-art { aspect-ratio: 1; }
  .family-news .news-entry-recording { grid-template-columns: minmax(0, 1fr); }
  .news-entry-recording audio { max-inline-size: 24rem; }
  .tree-person-cover .avatar { width: 3.75rem; height: 3.75rem; }
  .tree-cover .tree-person-cover h1 { font-size: clamp(2rem, 7vw, 2.6rem); }
  .tree-cover-focused .tree-compare-action { width: 100%; }
  .relative-review-actions { display: grid; }
  .view-account .account-cover { margin-block-end: var(--s3); padding-block-end: 0; }
  .view-account #your-details > .page-links { margin-block: 0; }
  .view-account .account-profile-links { display: block; }
  .view-account #invite-family > details:not([open]) > summary {
    inline-size: 100%;
 }
}

/* ===== ALBUMS, PHOTO VIEWER, STORIES, LIFE-STORY READER (2026-11-14 spacing pass) =====
   Scoped to these views only. Gives portraits and stories more room, aligns page edges,
   and gives every button group the same gaps. */

/* Shared: return links above a page read as quiet text links, not boxed buttons. */
:is(.view-story_read, .view-life_story) .story-read-cover > .actions:first-child,
.view-life_story .relative-step > p:first-child {
  gap: 0 var(--s4);
  margin-block: 0 var(--s2);
}
:is(.view-story_read, .view-life_story) .story-read-cover > .actions:first-child .button,
.view-life_story .relative-step > p:first-child .button,
.view-stories > nav.page-links:first-child a {
  min-block-size: 44px;
  padding-inline: 0;
  border: 0;
  background: transparent;
  font-size: .95rem;
  font-weight: 600;
}
.view-stories > nav.page-links:first-child { gap: 0 var(--s5); margin-block: 0; }

/* Family albums: a calm grid of covers, separated by whitespace instead of rules. */
.view-albums .family-albums {
  gap: var(--s7) var(--s6);
  margin-block: var(--s4) var(--s7);
}
.view-albums .family-albums > li { border: 0; }
.view-albums .family-albums .news-photo { display: grid; gap: 0; color: inherit; }
.view-albums .family-albums .news-photo img {
  aspect-ratio: 4 / 3;
  border-radius: 8px;
  box-shadow: var(--panel-shadow);
}
.view-albums .family-albums .album-name {
  margin-block-start: var(--s4);
  padding: 0;
  font-size: clamp(1.45rem, 1.2rem + .8vw, 1.75rem);
  line-height: 1.2;
}
.view-albums .family-albums .album-label {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s1) 0;
  padding: var(--s2) 0 0;
}
.view-albums .family-albums .album-label .meta { font-size: .95rem; }
.view-albums .family-albums .album-label .meta + .meta::before {
  content: "\00B7";
  padding-inline: var(--s2);
  color: var(--brass);
}
.view-albums .family-albums .album-open { padding: var(--s3) 0 0; font-size: 1rem; }
.view-albums .family-albums .news-photo:is(:hover, :focus-visible) .album-name { color: var(--link); }
.view-albums #album-results { margin-block-start: var(--s7); }
.view-albums .actions { gap: var(--s2) var(--s3); }

/* Photo viewer: one toolbar style, room around the photo, a clear naming section. */
:is(.view-photo, .view-photo_full) .photo-nav-primary {
  gap: var(--s2) var(--s3);
  padding: var(--s2) var(--s3);
  margin-block: var(--s4);
  box-shadow: none;
}
:is(.view-photo, .view-photo_full) :is(.photo-nav, .photo-view-actions, .photo-options, #photo-people) .button.quiet,
:is(.view-photo, .view-photo_full) .photo-step {
  min-block-size: 44px;
  padding: var(--s2) var(--s4);
  color: var(--link);
  background: var(--panel);
  border: 1px solid var(--control);
  border-radius: 6px;
  font-weight: 600;
}
:is(.view-photo, .view-photo_full) :is(.photo-nav, .photo-view-actions, .photo-options, #photo-people) .button.quiet:is(:hover, :focus-visible),
:is(.view-photo, .view-photo_full) .photo-step:is(:hover, :focus-visible) { background: var(--panel-2); }
.view-photo .photo { margin-block: var(--s5) var(--s4); }
.view-photo .photo figcaption { margin-block-start: var(--s3); }
.view-photo .photo > p { margin-block: var(--s2) 0; }
.view-photo .photo-nav:not(.photo-nav-primary) {
  margin-block: var(--s5) var(--s3);
  gap: var(--s2) var(--s3);
}
.view-photo .photo-view-actions { gap: var(--s2) var(--s3); margin-block: var(--s3) 0; }
.view-photo #photo-people {
  margin-block: var(--s7) var(--s5);
  padding-block-start: var(--s5);
}
.view-photo #photo-people > h2 { margin-block-start: 0; }
.view-photo #photo-people > p { margin-block: var(--s3); }
.view-photo .photo-picker-preview { gap: var(--s4); margin-block: var(--s4); }
.view-photo .photo-picker-preview img { inline-size: 7rem; block-size: auto; border-radius: 6px; }
.view-photo .photo-people-list { display: grid; gap: var(--s5); }
.view-photo .photo-people-list > li { display: grid; gap: var(--s3); }
.view-photo .photo-people-list .actions { gap: var(--s2) var(--s3); }
.view-photo .photo-options { margin-block: 0 var(--s6); }
.view-photo_full .photo-size-status { margin-block: var(--s4) var(--s2); }
.view-photo_full .photo-view-actions { gap: var(--s2) var(--s3); }
.view-photo_full .photo { margin-block: var(--s4); }
@media (max-width: 36rem) {
  :is(.view-photo, .view-photo_full) .photo-nav-primary { padding: var(--s3); }
  /* A lone Previous or Next fills the row instead of leaving an empty cell. */
  :is(.view-photo, .view-photo_full) .photo-nav-primary .photo-position:first-child + [rel="next"] { grid-column: 1 / -1; }
  :is(.view-photo, .view-photo_full) .photo-nav-primary [rel="prev"]:not(:has(~ [rel="next"])) { grid-column: 1 / -1; }
  :is(.view-photo, .view-photo_full) .photo-nav-primary > .button { justify-self: stretch; }
  .view-photo .photo-nav:not(.photo-nav-primary) > .button { flex-basis: 100%; }
}

/* Family stories: open photos, readable names, whitespace between entries, a thin rule kept. */
.view-stories .story-library {
  gap: var(--s7) var(--s6);
  margin-block: var(--s4) var(--s7);
}
.view-stories .story-library > li { padding-block-start: var(--s5); }
.view-stories .story-library > .story-library-feature { padding-block-start: var(--s5); background: transparent; }
.view-stories .story-library-photo {
  margin-block-end: var(--s4);
  padding: 0;
  background: transparent;
  border: 0;
}
.view-stories .story-library-photo img {
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-radius: 8px;
}
.view-stories .story-library-feature .story-library-photo { box-shadow: none; }
.view-stories .story-library-feature .story-library-photo img { box-shadow: var(--panel-shadow); }
@media (min-width: 54rem) {
  .view-stories .story-library > .story-library-feature h3 .story-library-with-photo { gap: var(--s6); }
  .view-stories .story-library-feature .story-library-photo { margin-block-end: 0; }
  .view-stories .story-library > .story-library-feature > .story-paragraph { max-inline-size: 42rem; }
}
.view-stories .story-library-person { align-items: start; column-gap: var(--s4); }
.view-stories .story-library-action {
  margin-block-start: var(--s3);
  font: 600 1rem/1.4 var(--sans);
}
.view-stories .story-library > li > .story-paragraph { margin-block-start: var(--s4); max-inline-size: 60ch; }
.view-stories .story-library-profile { margin-block-start: var(--s2); }
.view-stories .story-library-profile a { font-weight: 600; }

/* Choosing who a story is about: each person and their actions read as one group. */
.view-stories .story-people { gap: var(--s5) var(--s4); }
.view-stories .story-people > li {
  display: grid;
  align-content: start;
  gap: var(--s3);
  padding: var(--s4);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
}
.view-stories .story-people .person-card { padding: 0; border: 0; background: transparent; box-shadow: none; }
.view-stories .story-people .actions { gap: var(--s2) var(--s3); margin: 0; }

/* Life-story reader */
.view-story_read .story-read-cover.page-cover { padding-inline: 0; padding-block: 0 var(--s2); }
.view-story_read .story-reader-heading { gap: var(--s3) var(--s5); }
.view-story_read .story-reader-person { gap: var(--s4); }
.view-story_read .story-reader-person .avatar { inline-size: 4.5rem; block-size: 4.5rem; }
.view-story_read .story-reader-person .meta { margin-block-start: var(--s1); font-size: .95rem; }
.view-story_read .story-reading-tools { gap: var(--s3) var(--s5); margin-block: var(--s5) var(--s3); align-items: center; }
/* Text size as one joined control, so the current choice reads at a glance. */
.view-story_read #story-text-size { display: inline-flex; gap: 0; margin: 0; }
.view-story_read #story-text-size a {
  min-block-size: 44px;
  display: inline-flex;
  align-items: center;
  padding: var(--s2) var(--s4);
  border: 1px solid var(--control);
  border-radius: 0;
  background: var(--panel);
  box-shadow: none;
  color: var(--link);
}
.view-story_read #story-text-size a:first-child { border-radius: 6px 0 0 6px; }
.view-story_read #story-text-size a:last-child { border-radius: 0 6px 6px 0; border-inline-start-width: 0; }
.view-story_read #story-text-size a[aria-current] { background: var(--panel-tint); color: var(--ink); font-weight: 700; }
.view-story_read .story-listen .button { border-color: var(--control); }
.view-story_read .story-section-links { gap: 0 var(--s5); margin-block: 0 var(--s4); }
.view-story_read .story-section-links a {
  min-block-size: 44px;
  display: inline-flex;
  align-items: center;
  padding-inline: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  font-weight: 600;
}
.view-story_read .story-reading-layout { margin-block: var(--s5); }
.view-story_read .story-photo .news-photo {
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}
.view-story_read .story-photo .news-photo img { aspect-ratio: 4 / 5; max-height: none; object-fit: cover; border-radius: 8px; box-shadow: var(--panel-shadow); }
.view-story_read .story-photo .news-photo-caption {
  display: block;
  padding: var(--s3) 0 0;
  color: var(--link);
  font: italic 400 1.05rem/1.4 var(--serif);
}
.view-story_read .story-reading-page { padding: clamp(1.25rem, 4vw, 2.75rem); }
/* Family and memories: an open section with even cards, not a tinted box. */
.view-story_read #story-end {
  margin-block: var(--s7) var(--s4);
  padding: var(--s5) 0 0;
  background: transparent;
  border-width: 1px 0 0;
  border-radius: 0;
  box-shadow: none;
}
.view-story_read #story-end > h2 { margin-block: 0 var(--s4); }
.view-story_read .story-memory-links {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 13.5rem), 1fr));
  gap: var(--s3);
}
.view-story_read .story-memory-links a {
  align-content: start;
  gap: var(--s2);
  padding: var(--s4);
  border-color: var(--line);
  box-shadow: none;
}
.view-story_read .story-memory-preview { margin-block-end: var(--s1); }
.view-story_read #story-end > p:not(.actions) { margin-block: var(--s4) 0; }
.view-story_read .story-return-links {
  gap: var(--s2) var(--s3);
  margin-block-start: var(--s3);
  padding-block-start: 0;
  border: 0;
}
.view-story_read .reading-story > .actions:last-child { gap: var(--s2) var(--s3); margin-block: var(--s5) var(--s6); }
@media (max-width: 36rem) {
  .view-story_read .story-reader-person .avatar { inline-size: 3.5rem; block-size: 3.5rem; }
  .view-story_read #story-text-size { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .view-story_read #story-text-size a { justify-content: center; }
  .view-story_read .story-listen .button { inline-size: 100%; }
  .view-story_read .story-photo .news-photo img { aspect-ratio: 3 / 2; }
}

/* Life-story editor: align the header with the writing area. */
.view-life_story .story-read-cover.page-cover { padding-inline: 0; }
.view-life_story .story-read-cover .actions { gap: var(--s2) var(--s3); }

/* ==================================================
   PHONE POLISH: MENU, PROFILE HEADER, COMING UP
   ================================================== */

/* Account menu: one column at every width. An older narrow-screen rule
   turns header navs into three columns and split words like "Account". */
header.site .site-menu > nav,
header.site .site-menu div.site-menu-mobile {
  grid-template-columns: minmax(0, 1fr);
  gap: 2px;
  font-size: 1rem;
}
header.site .site-menu > nav { min-width: min(15rem, calc(100vw - 2rem)); padding: var(--s2); }
header.site .site-menu nav a,
header.site .site-menu .link {
  justify-content: flex-start;
  width: 100%;
  padding: var(--s2) var(--s3);
  text-align: start;
  overflow-wrap: normal;
  border-radius: 6px;
}
header.site .site-menu form { margin: 0; }
header.site .site-menu div.site-menu-mobile { padding-block-end: var(--s1); }
header.site .site-menu nav > a:first-of-type,
header.site .site-menu div.site-menu-mobile + a { margin-block-start: var(--s1); }

/* Coming up: contact buttons share each row evenly instead of leaving a
   lone button on its own line. */
.birthday-contact-actions { display: flex; flex-wrap: wrap; gap: var(--s2); }
.birthday-contact-actions > .button { flex: 1 1 auto; justify-content: center; text-align: center; white-space: nowrap; margin: 0; }
.events .upcoming-names a { display: inline-flex; align-items: center; min-height: 44px; }
@media (min-width: 48rem) {
  .birthday-contact-actions > .button { flex: 0 1 auto; }
}

/* Profile header: back links read as quiet text, the portrait frame is
   lighter, and the actions line up with even gaps. */
.view-member_show > p > a.button.quiet:only-child {
  min-height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  font-weight: 500;
}
.view-member_show > p > a.button.quiet:only-child::before { content: "\2190"; margin-inline-end: var(--s2); }
.view-member_show > p:has(> a.button.quiet:only-child) { margin-block: 0 var(--s3); }
.view-member_show .profile.page-cover .portrait img { padding: var(--s1); }
.view-member_show .profile .intro > p,
.view-member_show .profile .intro > .profile-relationship { margin-block: var(--s2); }
.view-member_show .profile .intro > h1 { margin-block-end: var(--s2); }
.view-member_show .profile-relationship { display: flex; flex-wrap: wrap; align-items: center; gap: 0 var(--s3); }
.view-member_show .profile-relationship p { margin: 0; }
.view-member_show .profile-relationship .button.quiet {
  min-height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
}
.view-member_show .profile-relationship .button.quiet::after { content: "\2192"; margin-inline-start: var(--s2); }
.view-member_show .profile .intro .actions { display: flex; flex-wrap: wrap; gap: var(--s2); }
.view-member_show .profile .intro .actions > .button { margin: 0; }
@media (max-width: 36rem) {
  .view-member_show .profile .intro .actions > .button,
  .view-member_show .profile .intro > p > #profile-update-path { flex: 1 1 auto; justify-content: center; text-align: center; }
  .view-member_show .profile .intro > p:has(> #profile-update-path) { display: flex; }
  .view-member_show .profile-contact-actions > a { flex: 1 1 auto; }
  .view-member_show .profile.page-cover { padding-inline: 0; }
}

/* Check family records: a calm list of people to tick, with the choices underneath. */
.view-check_records .check-cover.page-cover { padding-inline: 0; }
.view-check_records .check-section { margin-block: var(--s6); max-width: 46rem; }
.view-check_records .check-list { padding: 0; border: 0; margin: 0; }
.view-check_records .check-list legend { padding: 0; margin-block-end: var(--s2); }
.view-check_records .check-list ul,
.view-check_records .check-plain-list { list-style: none; padding: 0; margin: 0; border-block-start: 1px solid var(--line); }
.view-check_records .check-list li,
.view-check_records .check-plain-list li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--s1) var(--s3);
  max-width: none;
  padding-block: var(--s2);
  border-block-end: 1px solid var(--line);
}
.view-check_records .check-person { display: flex; align-items: flex-start; gap: var(--s3); flex: 1 1 18rem; min-height: 44px; margin: 0; cursor: pointer; }
.view-check_records .check-person input { inline-size: 1.4rem; block-size: 1.4rem; margin: .15rem 0 0; flex: none; accent-color: var(--link); }
.view-check_records .check-person-text { display: grid; gap: 2px; }
.view-check_records .check-open { display: inline-flex; align-items: center; min-height: 44px; }
.view-check_records .check-plain-list a { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 var(--s2); min-height: 44px; padding-block: var(--s1); }
.view-check_records .check-actions { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s3); margin-block: var(--s4) var(--s2); }
@media (max-width: 36rem) {
  .view-check_records .check-actions > button { flex: 1 1 100%; }
}

/* Admin page: accounts as a ruled list that wraps on phones, and a log table that scrolls sideways. */
:is(.view-admin, .view-admin_account) .admin-section { margin-block: var(--s6); }
:is(.view-admin, .view-admin_account) .admin-accounts li { display: grid; gap: var(--s1); padding-block: var(--s3); }
:is(.view-admin, .view-admin_account) .admin-account-who { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 var(--s2); }
:is(.view-admin, .view-admin_account) .admin-accounts .meta { margin: 0; }
:is(.view-admin, .view-admin_account) .admin-accounts .actions form { margin: 0; }
:is(.view-admin, .view-admin_account) .admin-results li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0 var(--s3); }
:is(.view-admin, .view-admin_account) .admin-relaunch-form { max-width: 32rem; }
:is(.view-admin, .view-admin_account) .admin-log-scroll { overflow-x: auto; }
:is(.view-admin, .view-admin_account) .admin-log { min-width: 40rem; }
:is(.view-admin, .view-admin_account) .admin-log th { font-weight: 600; background: var(--panel-2); }
:is(.view-admin, .view-admin_account) .admin-back { margin-block: var(--s3) 0; }
:is(.view-admin, .view-admin_account) .admin-manage { margin: var(--s1) 0 0; }
:is(.view-admin, .view-admin_account) .admin-access li { display: grid; gap: var(--s2); padding-block: var(--s3); }
:is(.view-admin, .view-admin_account) .admin-access p { margin: 0; }
:is(.view-admin, .view-admin_account) :is(.admin-access, #person-family) form { margin: 0 0 var(--s3); }
:is(.view-admin, .view-admin_account) .admin-link-form select { max-width: 100%; }
:is(.view-admin, .view-admin_account) .admin-link-form { align-items: flex-end; }
:is(.view-admin, .view-admin_account) .admin-email-title { font-size: clamp(1.9rem, 1.4rem + 2.2vw, 2.8rem); overflow-wrap: anywhere; }

/* Rich-text editing on life stories and summaries (same editor as biography sections). */
.bio-rich-short { min-height: 5.5rem; }
.story-writing-page .bio-rich { min-height: 18rem; font-size: 1.1rem; }
label + .bio-toolbar { margin-block-start: var(--s2); }
.bio-toolbar + .bio-rich + * { margin-block-start: var(--s4); }

/* ==================================================
   LAYOUT SYSTEM (2026-11-15)
   One vertical rhythm, one button scale, quiet links instead of boxed link walls,
   and page structures that fill their columns. Later rules build on these.
   ================================================== */
:root {
  --section-gap: clamp(2.75rem, 2rem + 3vw, 4.5rem);
  --block-gap: var(--s5);
  --radius: 8px;
  --radius-s: 6px;
}
main { max-width: 72rem; padding-inline: clamp(1rem, 3vw, 2rem); padding-block-end: var(--section-gap); }

/* Type: a firmer scale and steady spacing under headings. */
main h2 { font-size: clamp(1.6rem, 1.35rem + .9vw, 2rem); line-height: 1.15; margin-block: 0 var(--s3); }
main h3 { font-size: 1.3rem; margin-block: var(--s4) var(--s2); }
main p { margin-block: 0 var(--s3); }
main p:last-child { margin-block-end: 0; }
.meta, .muted { line-height: 1.45; }

/* Sections: separated by space and one hairline, never by stacked boxes. */
main > section + section,
main > section + details,
main > details + section,
.view-member_show :is(#contact-details, #story, #family, #photos, #family-documents, #changes) {
  margin-block-start: var(--section-gap);
}
.panel { padding: var(--s5); margin-block: var(--block-gap); border-radius: var(--radius); }
.panel > h2:first-child, .panel > :first-child { margin-block-start: 0; }
.panel > :last-child { margin-block-end: 0; }

/* Buttons: one size everywhere. Primary is dark, secondary is a quiet outline. */
button, .button {
  min-height: 2.75rem;
  padding: .5rem 1.1rem;
  font: 600 .944rem/1.25 var(--sans);
  border-radius: var(--radius-s);
  gap: var(--s2);
}
.button.quiet {
  color: var(--ink);
  background: transparent;
  border-color: var(--control);
}
.button.quiet:hover { background: var(--panel-2); border-color: var(--ink); }
button.link { font-size: .944rem; }
.actions, p.actions { gap: var(--s2) var(--s3); }
p.actions { margin-block: var(--s4) 0; }

/* In-page jumps ("Back to ...") read as text, not as more buttons. */
main a.button.quiet[href^="#"] {
  min-height: 44px;
  padding-inline: 0;
  border-color: transparent;
  background: transparent;
  color: var(--link);
}
main a.button.quiet[href^="#"]:hover { background: transparent; color: var(--ink); }

/* Link groups: a row of quiet links with even gaps instead of outlined boxes. */
.page-links { display: flex; flex-wrap: wrap; gap: 0 var(--s5); margin-block: var(--s4) 0; }
.page-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: var(--link);
  font-weight: 600;
  font-size: .944rem;
}
.page-links a:hover { color: var(--ink); background: transparent; }

/* Tabs and filters: one compact segmented style. */
nav.tabs:not(.tree-view-tabs) { gap: var(--s1); }
nav.tabs:not(.tree-view-tabs) > a { padding-inline: var(--s3); border-radius: var(--radius-s); border-bottom: 0; }

/* Header: a slimmer bar that lines up with the content width. */
header.site { padding-block: .5rem; padding-inline: max(clamp(1rem, 3vw, 2rem), calc((100% - 72rem) / 2 + clamp(1rem, 3vw, 2rem))); }
.brand { font-size: clamp(1.75rem, 1.4rem + 1.2vw, 2.2rem); }
header.site .site-nav-desktop { gap: var(--s1); }
header.site .site-nav-desktop a { padding-inline: var(--s3); border-bottom: 0; }

/* Footer: one quiet band, family name on the left and shortcuts on the right. */
footer.site {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--s2) var(--s5);
  max-width: 72rem;
  margin-inline: auto;
  padding: var(--s5) clamp(1rem, 3vw, 2rem);
  text-align: start;
  border-top: 0;
  box-shadow: 0 -1px 0 var(--line);
}
footer.site > p { margin: 0; font: 400 1.15rem/1.3 var(--serif); color: var(--ink); }
footer.site .page-links { display: flex; justify-content: flex-start; gap: 0 var(--s4); margin: 0; }
footer.site .page-links a { padding: 0; font-size: .85rem; font-weight: 500; color: var(--muted); }
footer.site .page-links a:hover { color: var(--link); }
@media (min-width: 64rem) { footer.site .page-links { justify-content: flex-end; max-width: 46rem; } }
@media (max-width: 30rem) {
  footer.site { display: block; }
  footer.site > p { margin-block-end: var(--s2); }
  footer.site .page-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 var(--s3); }
  footer.site .page-links { align-items: start; }
  footer.site .page-links a { justify-content: flex-start; text-align: start; }
}

/* Date cards (Home, Family news): equal heights, name first, actions on one footer line. */
#directory-dates .events > li,
.news-dates .events > li {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--s1);
  padding: var(--s4);
  border: 0;
  border-radius: var(--radius);
  background: var(--panel-2);
}
:is(#directory-dates, .news-dates) .events .when { order: -1; font-size: .8rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
:is(#directory-dates, .news-dates) .events .upcoming-names { font: 400 1.25rem/1.25 var(--serif); }
:is(#directory-dates, .news-dates) .events .upcoming-names a { color: var(--ink); font-weight: 400; min-height: 0; gap: var(--s2); }
:is(#directory-dates, .news-dates) .events .upcoming-names a:hover { color: var(--link); }
:is(#directory-dates, .news-dates) .upcoming-avatar { width: 2rem; height: 2rem; border-radius: 50%; object-fit: cover; }
:is(#directory-dates, .news-dates) .events .muted { font-size: .85rem; }
.birthday-contact-actions.birthday-contact-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 var(--s4);
  width: 100%;
  margin: auto 0 0;
  padding-block-start: var(--s2);
}
.birthday-contact-actions > .button.button {
  flex: 0 0 auto;
  min-height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--link);
  font-size: .889rem;
}
.birthday-contact-actions > .button.button:hover { color: var(--ink); filter: none; }
.birthday-contact-actions > .button:not(.quiet) { order: -1; }

/* Home: the welcome and the photos share the first screen without an empty column. */
.home-cover { align-items: center; margin-block-end: var(--section-gap); }
.home-cover-copy { align-self: center; }
@media (min-width: 48rem) {
  .home-cover { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); }
  .home-cover-copy { padding-block: 0; }
  .home-feature img { max-height: 22rem; aspect-ratio: 3 / 2; }
  .home-from-archive { max-width: none; }
  .home-from-archive:has(img) > a {
    display: grid;
    grid-template-columns: 5.5rem minmax(0, 1fr);
    grid-template-rows: auto auto;
    align-items: end;
    column-gap: var(--s3);
  }
  .home-from-archive:has(img) img { grid-row: 1 / span 2; aspect-ratio: 1; border-radius: var(--radius-s); object-position: center 30%; }
  .home-from-archive:has(img) .home-caption { margin: 0; font-size: 1.2rem; }
  .home-from-archive:has(img) .meta { align-self: start; }
  .home-features { gap: var(--s4); }
  .home-feature .home-caption { font-size: 1.25rem; }
  #directory-dates.panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: var(--s3) var(--s4);
    padding: 0;
  }
  #directory-dates > h2 { grid-column: 1; grid-row: 1; margin: 0; }
  #directory-dates > .actions { grid-column: 2; grid-row: 1; margin: 0; }
  #directory-dates > .events { grid-column: 1 / -1; }
}
#directory-dates .events { grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); }
#directory-dates > .actions > .button.quiet { border-color: transparent; padding-inline: 0; color: var(--link); }
.home-recent-story {
  display: grid;
  gap: var(--s2);
  margin-block: var(--section-gap) 0;
  padding-block-start: var(--s5);
  border-block-start: 1px solid var(--line);
}
.home-recent-story > h2 { margin: 0; }
.home-recent-story blockquote { margin: var(--s2) 0; font: italic 400 1.3rem/1.5 var(--serif); max-width: 46rem; color: var(--ink); }
.home-recent-story > a { font-weight: 600; justify-self: start; }
.home-recent-story + p { margin-block: var(--s2) 0; }
.home-recent-story + p > a { font-weight: 600; }
.home-cover ~ .welcome { margin-block-start: var(--section-gap); }
.home-recent { margin-block-start: var(--s5); }
.home-recent > summary { min-height: 44px; display: flex; align-items: center; gap: var(--s2); font-weight: 600; color: var(--link); }

/* Welcome panel: copy and actions side by side on wide screens. */
.panel.welcome { padding: var(--s5); background: var(--panel); }
@media (min-width: 48rem) {
  .panel.welcome { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); align-items: center; gap: var(--s2) var(--s5); }
  .panel.welcome .welcome-missing-page { grid-column: 1 / -1; }
  .panel.welcome .welcome-actions .actions { margin: 0; justify-content: flex-end; }
}

/* People: a tighter portrait grid with square photos and no stray arrows. */
.people-cover h1 { margin-block-end: var(--s4); }
.people-cover .directory-search { margin-block: 0; max-width: 46rem; }
.people-filters { margin-block: var(--s4) var(--s5); }
@media (min-width: 42rem) {
  .cards.portrait-directory { grid-template-columns: repeat(auto-fill, minmax(12.5rem, 1fr)); gap: var(--s5) var(--s4); }
  .portrait-directory .avatar { aspect-ratio: 1; border-radius: var(--radius); margin-block-end: var(--s2); }
  .portrait-directory .avatar img { width: 100%; height: 100%; object-fit: cover; }
  .portrait-directory .directory-profile-arrow { display: none; }
  .portrait-directory .person-card .name { font-size: 1.3rem; }
}
.people-tools { margin-block-start: var(--section-gap); padding-block-start: var(--s4); border-block-start: 1px solid var(--line); gap: 0 var(--s5); }

/* Family news: the stream and a steady sidebar for dates on wide screens. */
@media (min-width: 64rem) {
  .view-family_news .family-news {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 19rem;
    align-items: start;
    gap: var(--s7);
  }
  .view-family_news .news-sidebar {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: var(--s4);
    position: sticky;
    top: var(--s4);
    padding-block-start: 0;
  }
  .view-family_news .news-sidebar :is(.news-shortcuts, .news-dates) { grid-column: 1; }
  .view-family_news .family-news .news-entry { grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); }
}
.view-family_news .news-sidebar .news-dates { padding: 0; margin: 0; }
.view-family_news .news-dates > h2 { font-size: 1.5rem; }
.view-family_news .news-dates .events { display: grid; gap: var(--s3); }
.view-family_news .news-dates > .page-links { gap: 0 var(--s4); }
.family-news .news-memory { padding-block: var(--s5); margin: 0; }
.family-news .news-memory:first-child { padding-block-start: var(--s2); }
.family-news .news-update-options > summary { font-size: .85rem; }
.news-cover:not(.news-cover-relative) { margin-block-end: var(--s3); }
.news-feed-filters, .family-news .news-search { margin-block: 0; }
.news-update-options > summary { min-height: 44px; }
.view-family_news #weekly-letter { max-width: 40rem; }

/* Profile: name and facts beside the portrait, shortcuts as a quiet line. */
.view-member_show .profile.page-cover { gap: var(--s4) var(--s6); align-items: start; }
.view-member_show .profile .intro > h1 { font-size: clamp(2.2rem, 1.6rem + 2.4vw, 3.4rem); }
.view-member_show .profile-paths { gap: var(--s3); }
.view-member_show .profile-paths a { border-radius: var(--radius); padding: var(--s3) var(--s4); }
.view-member_show #profile-sections {
  grid-column: 1 / -1;
  flex-wrap: wrap;
  gap: 0 var(--s4);
  margin-block-start: var(--s5);
  padding-block: var(--s2);
  border-block: 1px solid var(--line);
}
.view-member_show #profile-sections h2 {
  flex-basis: auto;
  align-self: center;
  margin: 0 var(--s2) 0 0;
  font: 600 .8rem/1 var(--sans);
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--muted);
}
.view-member_show #profile-sections a {
  padding-inline: 0;
  background: transparent;
  font-size: .944rem;
}
.view-member_show #profile-sections a:is(:hover, :focus-visible) { background: transparent; color: var(--ink); }
.view-member_show #contact-details.panel,
.view-member_show #family-documents.panel { background: transparent; border-width: 0; padding: 0; box-shadow: none; }
.view-member_show #changes { padding-block-start: var(--s5); border-block-start: 1px solid var(--line); }
.view-member_show .profile-change-group.panel { padding: var(--s4); margin: 0; background: var(--panel); }
.view-member_show .profile-change-groups { gap: var(--s4); }

/* Account: sections share one rhythm, hairlines between them, controls aligned right. */
.view-account { max-width: 52rem; }
.view-account .account-sections > .panel,
.view-account .account-sections .account-security > .panel { padding-block: var(--s5); }
.view-account .account-sections > * + * { border-block-start: 1px solid var(--line); }
.view-account .account-sections h2 { font-size: 1.6rem; }
.view-account .account-overview { padding-block-end: var(--s5); }
.view-account #invite-family > details:not([open]) > summary {
  color: var(--ink);
  background: transparent;
  border-color: var(--control);
  font-weight: 600;
}
.view-account .account-security { padding-block-start: var(--s5); }
.view-account .account-security > h2 { margin-block: 0; }
.view-account .account-sections .account-security > .panel + .panel { border-block-start: 1px solid var(--line); }

/* Phone: sections keep breathing room without oversized boxes. */
@media (max-width: 36rem) {
  :root { --section-gap: 2.5rem; }
  .panel, .panel.welcome { padding: var(--s4); }
  main h2 { font-size: 1.6rem; }
  .home-recent-story blockquote { font-size: 1.15rem; }
}

/* ==================================================
   EVERY PAGE (2026-11-15, second pass)
   One page frame, one width for focused tasks, text links for secondary
   navigation, unboxed form sections, and calmer tree, help, photo and
   history pages.
   ================================================== */

/* Frame: the footer stays at the bottom of short pages. */
body { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
body > main { flex: 1 0 auto; width: 100%; }

/* Focused tasks share one centred column with one left edge. */
main:is(.view-member_form, .view-member_add, .view-identify, .view-connect, .view-media_form,
  .view-life_story, .view-relate, .view-check_records, .view-history, .view-forgot, .view-reset,
  .view-reset_requested, .view-mfa, .view-accept, .view-link, .view-upload_result, .view-message,
  .view-invite_expired, .view-unsubscribe, .view-photo_missing, .view-account, .view-admin_account) {
  max-width: 50rem;
}
main:is(.view-member_form, .view-member_add, .view-identify, .view-connect, .view-media_form,
  .view-life_story, .view-relate, .view-check_records, .view-history, .view-forgot, .view-reset,
  .view-reset_requested, .view-mfa, .view-accept, .view-link, .view-upload_result, .view-message,
  .view-invite_expired, .view-unsubscribe, .view-photo_missing, .view-admin_account) > :is(section, form, div, header, p, nav) {
  max-width: none;
  margin-inline: 0;
}
main:is(.view-identify, .view-connect, .view-media_form, .view-member_add, .view-relate, .view-forgot, .view-life_story) .page-cover,
main:is(.view-identify, .view-connect, .view-media_form, .view-member_add, .view-relate, .view-forgot, .view-life_story) > section {
  padding-inline: 0;
}

/* Secondary navigation is a text link, not another outlined box.
   Real <button>s keep their outline. */
main a.button.quiet {
  min-height: 44px;
  padding-inline: 0;
  border-color: transparent;
  background: transparent;
  box-shadow: none;
  color: var(--link);
}
main a.button.quiet:hover { background: transparent; color: var(--ink); }
main .actions:has(> a.button.quiet) { column-gap: var(--s5); }
main .actions > .button:not(.quiet) + a.button.quiet { margin-inline-start: var(--s2); }

/* A return link at the top of a page carries a small chevron. */
main > p:first-child > a.button.quiet:first-child,
main > .page-cover > p:first-child > a.button.quiet:first-child,
main > section:first-child > p:first-child > a.button.quiet:first-child,
main .relative-step-back > a.button.quiet:first-child {
  min-height: 2rem;
  font-size: .889rem;
  color: var(--muted);
}
main > p:first-child > a.button.quiet:first-child::before,
main > .page-cover > p:first-child > a.button.quiet:first-child::before,
main > section:first-child > p:first-child > a.button.quiet:first-child::before,
main .relative-step-back > a.button.quiet:first-child::before {
  content: "";
  inline-size: .45em;
  block-size: .45em;
  border-inline-start: 1.5px solid currentColor;
  border-block-end: 1.5px solid currentColor;
  transform: rotate(45deg);
  margin-inline-end: .15em;
}
main > p:first-child:has(> a.button.quiet:first-child) { margin-block-end: var(--s2); }

/* Form sections: a heading and a hairline, not a box with a clipped label. */
[data-member-editor] > fieldset,
main:is(.view-member_form, .view-member_add) form > fieldset {
  border: 0;
  border-block-start: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  padding: var(--s5) 0 0;
  margin: var(--s6) 0 0;
}
[data-member-editor] > fieldset > legend,
main:is(.view-member_form, .view-member_add) form > fieldset > legend {
  float: left;
  width: 100%;
  padding: 0;
  margin-block-end: var(--s3);
  font: 400 1.35rem/1.25 var(--serif);
  color: var(--ink);
}
[data-member-editor] > fieldset > legend + *,
main:is(.view-member_form, .view-member_add) form > fieldset > legend + * { clear: both; }
[data-member-editor] > fieldset:target { outline: 0; box-shadow: none; }
[data-member-editor] > fieldset:target > legend { color: var(--link); }

/* Family tree: view tabs and search in the cover, the chart as the main column,
   the list of relatives beside it, and no duplicate jump links on wide screens. */
.view-tree .tree-cover .titlebar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s4); }
.view-tree .tree-cover .tree-view-tabs { margin: 0; }
.view-tree .tree-cover-tools { display: flex; flex-wrap: wrap; align-items: flex-start; gap: var(--s2) var(--s5); margin-block-start: var(--s5); }
.view-tree .tree-cover-tools > .tree-find { flex: 1 1 22rem; max-width: 36rem; margin: 0; padding: 0; background: transparent; border: 0; box-shadow: none; }
.view-tree .tree-cover-context { display: flex; flex-wrap: wrap; gap: 0 var(--s5); align-items: center; order: 2; }
.view-tree .tree-cover-context > p { margin: 0; }
.view-tree .tree-cover-tools > .tree-compare-action { order: 3; align-self: flex-start; width: auto; }
.view-tree .tree-chart > p.actions,
.view-tree .sheet-secondary > p.actions,
.view-tree .family-sheet > p.actions { margin-block: var(--s2) 0; }
.view-tree .tree-chart .tree-wrap { border-radius: var(--radius); }
.view-tree .tree-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 0 var(--s4); margin-block: var(--s3); }
.view-tree .tree-tools > .button.quiet,
.view-tree .tree-tools .tree-zoom .button.quiet {
  min-height: 44px;
  padding-inline: 0;
  border-color: transparent;
  background: transparent;
  color: var(--link);
  font-size: .889rem;
}
.view-tree .tree-tools > .button.quiet:hover { color: var(--ink); background: transparent; }
.view-tree .tree-tools .tree-zoom-status { flex-basis: 100%; margin: 0; font-size: .833rem; }
.view-tree .tree-more { margin-block: var(--s2); }
.view-tree .family-sheet .sheet-memories { margin-block-start: var(--s5); padding-block-start: var(--s3); border-block-start: 1px solid var(--line); }
.view-tree .sheet-secondary { margin-block-start: var(--s3); }
.view-tree .tree-chart > p:has(> a[href*="/help"]) { margin-block-start: var(--s4); }

@media (min-width: 64rem) {
  .view-tree .tree-view-focused {
    grid-template-columns: minmax(18rem, 2fr) minmax(0, 3fr);
    gap: var(--s7);
  }
  .view-tree .tree-view-focused > .tree-chart { padding-inline-start: var(--s6); border-inline-start: 1px solid var(--line); }
  /* Both columns are on screen, so the jumps between them are redundant. */
  .view-tree .tree-view-focused .family-sheet > nav[aria-label="After the list of relatives"],
  .view-tree .tree-view-focused .family-sheet > p:has(> a[href="#family-list"]),
  .view-tree .tree-view-focused .sheet-secondary a[href="#tree-linked-relatives"],
  .view-tree .tree-view-focused .tree-chart > p.actions > a[href="#tree-linked-relatives"],
  .view-tree .tree-view-focused .tree-chart > p.actions > a[href="#family-list"],
  .view-tree .tree-view-focused .tree-chart > p.actions:last-child:not(:has(> a:not([href^="#"]))) { display: none; }
  .view-tree .tree-view-focused .tree-chart > h2 { font-size: 1.6rem; }
}

/* Help: answers in two columns of quiet sections instead of one long stack of cards. */
.view-help .help-quick-links { gap: 0 var(--s5); }
.view-help .help-quick-links a { box-shadow: none; border: 0; background: transparent; padding: 0; }
.view-help .help-topic-group { border-radius: var(--radius-s); }
.view-help .help-answers { max-width: none; }
@media (min-width: 56rem) {
  .view-help .help-answers { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 var(--s7); align-items: start; }
}
.view-help .help-answers > section.panel {
  margin: 0;
  padding: var(--s5) 0 var(--s6);
  background: transparent;
  border: 0;
  border-block-start: 1px solid var(--line);
  border-radius: 0;
  box-shadow: none;
}
.view-help .help-answers > section.panel > h2 { font-size: 1.45rem; }
.view-help .help-answers > section:target { outline: 0; border-block-start: 2px solid var(--accent); }

/* Photo: one quiet row of actions under the picture. */
.view-photo .photo-nav-primary { background: transparent; border: 0; box-shadow: none; padding: 0; }
.view-photo .photo-nav .photo-step,
.view-photo .photo-nav a.button {
  min-height: 44px;
  padding-inline: 0;
  border-color: transparent;
  background: transparent;
  color: var(--link);
}
.view-photo .photo-nav { column-gap: var(--s5); }
.view-photo .photo-view-actions { margin-block-start: 0; }
.view-photo #photo-people { margin-block-start: var(--section-gap); padding: var(--s5) 0 0; background: transparent; border: 0; border-block-start: 1px solid var(--line); border-radius: 0; box-shadow: none; }

/* History: days separated by a rule; each change is a short row with a small thumbnail. */
.view-history section.panel { padding: 0; background: transparent; border: 0; box-shadow: none; border-radius: 0; margin-block: var(--s6) 0; }
.view-history section.panel > h3 { margin-block: 0 var(--s2); padding-block-end: var(--s2); border-block-end: 1px solid var(--line); font-size: 1.15rem; }
.view-history .history > li { padding: var(--s4) 0; background: transparent; border: 0; border-block-end: 1px solid var(--line); border-radius: 0; box-shadow: none; }
.view-history .history > li + li { margin-block-start: 0; }
.view-history .history > li img { max-width: 7rem; height: auto; border-radius: var(--radius-s); }
.view-history .history > li > p.notice:not([id^="undo-confirmation"]):not([id^="undo-conflict"]) {
  padding: 0;
  background: transparent;
  border: 0;
  color: var(--muted);
  font-size: .889rem;
}

/* Albums: three across on wide screens so a page shows more of the family. */
@media (min-width: 60rem) {
  .view-albums .family-albums { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* Admin: Manage sits close under each account. */
.view-admin .admin-manage { margin-block: var(--s1) 0; }

/* Sign-in pages sit in the middle of the screen. */
main:is(.view-login, .view-forgot, .view-reset, .view-mfa, .view-accept) { display: flex; flex-direction: column; justify-content: center; }

/* Second pass, fixes after review. */
body > footer.site { width: 100%; }
[data-member-editor] > fieldset > legend ~ *,
main:is(.view-member_form, .view-member_add) form > fieldset > legend ~ * { clear: both; }
[data-member-editor] > fieldset > legend,
main:is(.view-member_form, .view-member_add) form > fieldset > legend { grid-column: 1 / -1; }
main.view-member_form :is(form, [data-member-editor]) { max-width: none; }

/* Secondary links win over older page-specific outlines. */
main a.button.quiet:not(#_) {
  min-height: 44px;
  padding-inline: 0;
  border-color: transparent;
  background: transparent;
  box-shadow: none;
  color: var(--link);
}
main a.button.quiet:not(#_):hover { background: transparent; color: var(--ink); }
main > p:first-child > a.button.quiet:first-child:not(#_),
main > .page-cover > p:first-child > a.button.quiet:first-child:not(#_),
main > section:first-child > p:first-child > a.button.quiet:first-child:not(#_),
main .relative-step-back > a.button.quiet:first-child:not(#_) { min-height: 2rem; font-size: .889rem; color: var(--muted); }
.view-photo .photo-nav a:not(#_) { min-height: 44px; padding-inline: 0; border-color: transparent; background: transparent; box-shadow: none; color: var(--link); }
.view-photo .photo-nav { justify-content: flex-start; }

/* History: the undo explanation is a quiet line above the button. */
.view-history .history-undo-help { padding: 0; background: transparent; border: 0; color: var(--muted); font-size: .889rem; }

/* Tree: the person's name sits next to their portrait; tabs go to the right. */
.view-tree .tree-cover .titlebar.tree-person-cover { justify-content: flex-start; }
.view-tree .tree-cover .titlebar.tree-person-cover > .tree-view-tabs { margin-inline-start: auto; }
.view-tree .family-sheet p.actions { margin-block: var(--s1) 0; row-gap: 0; }
.view-tree .sheet-secondary { display: flex; flex-wrap: wrap; column-gap: var(--s5); }
.view-tree .sheet-secondary > * { margin: 0; }
@media (min-width: 64rem) {
  .view-tree .tree-view-focused .sheet-view-links { display: none; }
}

/* Photo: the album return and view actions are links, like everywhere else. */
main:is(.view-photo, .view-photo_full) :is(.photo-nav, .photo-view-actions, .photo-options, #photo-people) a.button.quiet,
main:is(.view-photo, .view-photo_full) a.photo-step {
  padding-inline: 0;
  border-color: transparent;
  background: transparent;
}
main:is(.view-photo, .view-photo_full) :is(.photo-nav, .photo-view-actions, .photo-options, #photo-people) a.button.quiet:is(:hover, :focus-visible),
main:is(.view-photo, .view-photo_full) a.photo-step:is(:hover, :focus-visible) { background: transparent; color: var(--ink); }
main.view-photo .photo-view-actions { column-gap: var(--s5); }

/* Phone: tree view tabs stay on one line; photo links line up on the left. */
@media (max-width: 36rem) {
  .view-tree .tree-cover .tree-view-tabs { flex-wrap: nowrap; width: 100%; }
  .view-tree .tree-cover .tree-view-tabs a { flex: 1 1 auto; justify-content: center; white-space: nowrap; padding-inline: var(--s2); font-size: .833rem; }
}
main.view-photo .photo-nav { justify-content: flex-start; text-align: start; }
main.view-photo .photo-nav > * { justify-content: flex-start; text-align: start; margin-inline: 0; }

/* Profile: on wide screens the story, family and photos run in the main column;
   contact details and the update tools sit beside them. */
@media (min-width: 64rem) {
  .view-member_show article.member {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(17rem, 21rem);
    column-gap: var(--s7);
    row-gap: var(--section-gap);
    align-items: start;
  }
  .view-member_show article.member > * { grid-column: 1; margin-block: 0 !important; min-width: 0; }
  .view-member_show article.member > .profile { grid-column: 1 / -1; grid-row: 1; }
  .view-member_show article.member > #story { grid-row: 2; }
  .view-member_show article.member > #family { grid-row: 3; }
  .view-member_show article.member > #photos { grid-row: 4; }
  .view-member_show article.member > #family-documents { grid-row: 5; }
  .view-member_show article.member > #contact-details { grid-column: 2; grid-row: 2; }
  .view-member_show article.member > #changes { grid-column: 2; grid-row: 3 / span 3; }
  .view-member_show article.member > :is(#contact-details, #changes) { padding: var(--s5) 0 0; border-block-start: 1px solid var(--line); }
  .view-member_show article.member > :is(#contact-details, #changes) h2 { font-size: 1.35rem; }
  .view-member_show #changes .profile-change-groups { grid-template-columns: minmax(0, 1fr); }
  .view-member_show article.member > :not(.profile) :is(a[href="#profile-sections"], a[href^="#profile-"][href$="-path"]) { display: none; }
  .view-member_show article.member > :not(.profile) p:has(> a[href^="#profile-"][href$="-path"]:only-child) { display: none; }
  .view-member_show #changes .profile-change-group { padding: 0; margin: var(--s5) 0 0; background: transparent; border: 0; box-shadow: none; }
  .view-member_show #changes .profile-change-group h3 { font-size: 1.05rem; font-family: var(--sans); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-block-end: var(--s1); }
  .view-member_show #changes .profile-edit-links .button:not(.quiet) { width: auto; }
}
.view-member_show #profile-sections { max-width: none; }
.view-member_show .profile-edit-links { justify-content: flex-start; }
.view-member_show .profile-edit-links a { justify-content: flex-start; text-align: start; }

/* Biography reads in a centred measure with its fact box. */
main.view-member_biography { max-width: 64rem; }
@media (min-width: 64rem) { .view-member_show #changes .profile-edit-links { display: flex; flex-direction: column; align-items: flex-start; gap: 0; } }
.view-member_show #changes .profile-edit-links > a { margin-inline-start: 0; }

/* ==================================================
   GALLERY AND MOTION (2026-11-16)
   Borrowed from museum collection and editorial sites: photographs treated as
   framed pieces with a slow zoom, cards that settle into place as they scroll in,
   and a reading line and drop cap on life stories. Everything is an enhancement: without support, or with reduced motion,
   the page is the same static layout.
   ================================================== */

/* Photographs as framed pieces: the image moves slowly inside a fixed frame. */
:is(.portrait-directory .avatar, .photo-wall a, .family-albums .news-photo, .news-memory .news-photo,
  .home-feature, .story-photo .news-photo, .bio-gallery a) { overflow: hidden; }
:is(.portrait-directory .avatar, .photo-wall a, .family-albums .news-photo, .news-memory .news-photo,
  .home-feature, .bio-gallery a) img {
  transition: transform 1.2s cubic-bezier(.2, .7, .2, 1), filter .6s ease;
  transform-origin: 50% 40%;
}
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .portrait-directory .person-card:hover .avatar img,
  .photo-wall a:hover img,
  .family-albums .news-memory:hover .news-photo img,
  .news-memory:hover .news-photo img,
  .home-feature:hover img,
  .bio-gallery a:hover img { transform: scale(1.045); }
}
.portrait-directory .person-card:focus-visible .avatar,
.photo-wall a:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }

/* Cards and tiles settle into place as they enter the screen. */
@keyframes kin-settle {
  from { transform: translateY(1.25rem); }
  to { transform: none; }
}
@keyframes kin-develop {
  from { opacity: .35; filter: saturate(.6); }
  to { opacity: 1; filter: none; }
}
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .portrait-directory > li,
    .photo-wall > li,
    .family-albums > li,
    .family-news .news-memory,
    .story-library > li,
    .view-help .help-answers > section {
      animation: kin-settle linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 35%;
    }
    :is(.portrait-directory, .photo-wall, .family-albums, .family-news) img {
      animation: kin-develop linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 45%;
    }
  }
}

/* Life stories read like a printed piece: a drop cap, a lead paragraph,
   and a thin reading line along the top of the window. */
.view-story_read .story-reading-page > p:first-of-type::first-letter {
  float: left;
  margin: .08em .1em 0 0;
  font: 400 3.4em/.82 var(--serif);
  color: var(--accent);
}
.view-story_read .story-reading-page > p:first-of-type { font-size: 1.1em; }
@keyframes kin-read { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@supports (animation-timeline: scroll()) {
  @media (prefers-reduced-motion: no-preference) {
    main.view-story_read::before {
      content: "";
      position: fixed;
      inset: 0 0 auto 0;
      z-index: 30;
      block-size: 3px;
      background: var(--accent);
      transform-origin: 0 50%;
      animation: kin-read linear both;
      animation-timeline: scroll(root);
      pointer-events: none;
    }
  }
}

/* Captions and dates sit under pictures like museum labels. */
.photo-wall-position, .news-photo-caption .meta, .family-albums .meta { letter-spacing: .01em; }
.view-photo .photo figcaption { font: italic 400 1.1rem/1.4 var(--serif); color: var(--muted); }

/* Life story: the four ways onward sit in one row on wide screens. */
@media (min-width: 60rem) { .view-story_read .story-memory-links { grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); grid-auto-flow: column; } }

/* Expired invitation: room between the two choices and their dividers. */
main.view-invite_expired section { padding-block: var(--s4); }
main.view-invite_expired section h2 { margin-block-start: 0; }

/* Links inside prose lists get the same stronger weight as links in paragraphs. */
main :is(ol, ul):not([class]) > li a:not(.button), .help-answers li a:not(.button) { font-weight: 600; }

/* Tree: the branch shortcuts stay available as one quiet row under the list. */
.view-tree .family-sheet > .tree-branch-jump { margin-block-start: var(--s5); padding: var(--s3) 0 0; background: transparent; border: 0; border-block-start: 1px solid var(--line); border-radius: 0; box-shadow: none; }
.view-tree .family-sheet > .tree-branch-jump p { font-size: .889rem; color: var(--muted); }
.view-tree .family-sheet > .tree-branch-jump strong { font: inherit; font-weight: 600; color: var(--ink); }

/* ---- Usability pass, November 2026 ---- */

/* Profile: close family comes straight after the name, then the life story. */
@media (min-width: 64rem) {
  .view-member_show article.member > #family { grid-row: 2; }
  .view-member_show article.member > #story { grid-row: 3; }
  .view-member_show article.member > #changes { grid-row: 2 / span 4; }
  .view-member_show article.member:has(> #contact-details) > #changes { grid-row: 3 / span 3; }
}
/* Profile on a phone: the shortcut cards become a compact two-column set so relatives start sooner. */
@media (max-width: 36rem) {
  .view-member_show .profile-links.profile-paths { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s2); }
  .view-member_show .profile-paths a { padding: var(--s3); min-block-size: 44px; grid-template-columns: minmax(0, 1fr); }
  .view-member_show .profile-paths a > span:not(.directory-path-arrow) { display: none; }
  .view-member_show .profile-paths a .directory-path-arrow { display: none; }
  .view-member_show .profile-paths a strong { font-size: 1rem; }
  .view-member_show .profile-paths .profile-photo-path img { display: none; }
  .view-member_show #profile-sections { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .view-member_show #profile-sections a { font-size: .889rem; }
}
/* Tree view switch on a phone: three equal parts that wrap their words instead of running off the edge. */
@media (max-width: 36rem) {
  .view-tree .tree-cover .tree-view-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); width: 100%; max-width: 100%; box-sizing: border-box; }
  .view-tree .tree-cover .tree-view-tabs a { white-space: normal; text-align: center; line-height: 1.2; min-block-size: 44px; padding-inline: var(--s1); min-width: 0; }
}
/* Family news: photos shared together appear as one update with a row of small pictures. */
.news-more-photos { display: flex; flex-wrap: wrap; gap: var(--s2); list-style: none; margin: var(--s3) 0 0; padding: 0; }
.news-more-photos a { display: block; border-radius: 6px; overflow: hidden; }
.news-more-photos img { display: block; width: 4.5rem; height: 4.5rem; object-fit: cover; }
.news-more-photos .news-more-count a { display: flex; align-items: center; min-block-size: 4.5rem; padding-inline: var(--s3); font-weight: 600; background: var(--panel); border: 1px solid var(--line); }
/* Family news: the weekly email setting is a quiet footnote under the feed, not a second main panel. */
.view-family_news #weekly-letter { background: transparent; border: 0; border-block-start: 1px solid var(--line); border-radius: 0; box-shadow: none; padding: var(--s5) 0 0; max-width: 40rem; }
.view-family_news #weekly-letter h2 { font-size: 1.35rem; }
/* Date cards: the last card keeps the same padding as the others. */
#directory-dates .events > li:last-child, .news-dates .events > li:last-child { padding: var(--s4); border: 0; }
/* Dates on wide screens: the Jump to a month list stays beside the months, so each month needs no
   previous, next and choose-a-month links of its own. Phones keep them. */
@media screen and (min-width: 64rem) {
  .view-dates nav[id^="month-links-"] :is(.month-step, .calendar-desktop-month-link) { display: none; }
  .view-dates nav[id^="month-links-"]:not(:has(a:not(.month-step):not(.calendar-mobile-month-link):not(.calendar-desktop-month-link))) { display: none; }
}
/* Tree: "How are we related?" lines up with the search field instead of floating inside a button outline. */
.view-tree .tree-cover-tools > .tree-compare-action { border-color: transparent; background: transparent; padding-inline: 0; width: auto; justify-content: flex-start; text-align: start; }
/* Invitation: the password hint keeps room before the next label. */
.invite-cover #invite-password-help { margin-block: calc(-1 * var(--s2)) var(--s2); }
@media (max-width: 36rem) { .view-tree .tree-cover-tools > .tree-compare-action { flex: 0 0 100%; } }
/* Photo captions: written words under the photo in the same museum-label italic, and a quiet way to add one. */
.photo figcaption .photo-caption-text { margin: 0 0 var(--s2); font: italic 400 1.15rem/1.45 var(--serif); color: var(--ink); max-width: 60ch; }
.photo-caption-edit { margin-block: var(--s4); max-width: 40rem; }
.photo-caption-edit summary { display: inline-flex; align-items: center; min-height: 44px; cursor: pointer; color: var(--link); font-weight: 600; }
.photo-caption-edit textarea { width: 100%; }
.news-photo-title, .home-caption > span:first-child { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
/* History: each change reads as one line of news with its time, a small picture when it is about a photo,
   and the undo button set to the side on wider screens so the list scans as changes, not as buttons. */
.history-time { color: var(--muted); font-variant-numeric: tabular-nums; margin-inline-end: var(--s1); }
.view-history .history-photo { margin: 0; width: auto; display: flex; align-items: center; gap: var(--s3); }
.view-history .history-photo img { width: 5rem; height: 5rem; max-width: none; object-fit: cover; border: 0; }
.view-history .history-photo a { display: block; border-radius: var(--radius-s); line-height: 0; }
.view-history .history-photo figcaption { font-style: italic; color: var(--muted); }
.view-history .history > li { gap: var(--s2); }
@media screen and (min-width: 40rem) {
  .view-history .history > li { grid-template-columns: minmax(0, 1fr) auto; column-gap: var(--s5); row-gap: 0; }
  .view-history .history > li > * { grid-column: 1; }
  .view-history .history > li > * + * { margin-block-start: var(--s2); }
  .view-history .history > li > form.history-undo:not(.history-undo-review) { grid-column: 2; grid-row: 1 / span 12; align-self: start; margin-block-start: 0; }
  .view-history .history > li > .history-undo-help { max-width: 36rem; }
}
/* Family biography: photo captions sit under each picture, like a printed family book. */
.bio-gallery figure { margin: 0; }
.bio-gallery figcaption { margin-block-start: var(--s1); font: italic 400 .889rem/1.35 var(--serif); color: var(--muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
/* Family timeline on wide screens: the chart fills the width instead of leaving an empty third. */
@media screen and (min-width: 64rem) {
  .tree-wrap.lifetimes { container-type: inline-size; }
  .lifetimes svg.life { width: 100%; height: auto; }
  .lifetimes .life-years + .life { margin-block-start: calc(-28 * 100cqi / 960); }
}
/* Your own bar is dark, so its name reads in light letters without the halo used on pale bars. */
.lifetimes .lf-me .lf-name[text-anchor="start"] { fill: var(--on-accent); stroke: none; }
/* Life story with nothing written yet: one plain invitation, not a panel inside a panel. */
.story-reading-page > .story-empty { border: 0; background: transparent; box-shadow: none; padding: 0; margin: 0; }

/* ---- People first, November 2026 ----
   Each page leads with the person. Shortcuts become one quiet row, editing tools fold away,
   and empty sections stay hidden until there is something to show. */
.profile-more { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: var(--s2) var(--s4); align-items: center; margin: 0; padding-block-start: var(--s3); border-block-start: 1px solid var(--line); }
.profile-more a { display: inline-flex; align-items: center; min-block-size: 44px; font-weight: 600; }
.profile-more a:target { outline: 2px solid var(--focus); outline-offset: 3px; }
@media (min-width: 64rem) {
  .view-member_show article.member { display: block; }
  .view-member_show article.member > * + * { margin-block-start: var(--section-gap) !important; }
  .view-member_show article.member > :is(#contact-details) { padding: var(--s5); border-block-start: 0; }
}
.view-member_show .profile.page-cover { grid-template-columns: auto minmax(0, 1fr); }
.view-member_show .profile.page-cover .portrait img { width: 14rem; max-width: 100%; }
@media (max-width: 36rem) {
  .view-member_show .profile.page-cover .portrait img { width: 8rem; }
  .profile-more { gap: 0 var(--s4); }
}
.family-more { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s4); margin-block-start: var(--s3); }
.family-more a { display: inline-flex; align-items: center; min-block-size: 44px; font-weight: 600; }
.profile-add-relative { margin-block: var(--s3); }
.profile-add-relative > summary { display: inline-flex; align-items: center; min-block-size: 44px; cursor: pointer; color: var(--link); font-weight: 600; }
details.changes { margin-top: var(--section-gap); padding-top: var(--s4); border-top: 1px solid var(--line); }
details.changes > summary { display: flex; align-items: center; min-block-size: 44px; cursor: pointer; list-style: none; }
details.changes > summary::-webkit-details-marker { display: none; }
details.changes > summary h2 { display: inline; margin: 0; font-size: 1.35rem; }
details.changes[open] > summary::before { transform: rotate(90deg); }
details.changes[open] > summary { margin-block-end: var(--s3); }
@media (min-width: 64rem) {
  .view-member_show #changes .profile-change-groups { grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr)); }
}
/* Tree: the chart already sits beside the list on wide screens, so the jump link is only for phones. */
@media (min-width: 64rem) { .view-tree .tree-chart-jump { display: none; } }
