:root{--serif:Cambria,"Noto Serif","Times New Roman",serif}
html[data-preview=layout] .hero-eyebrow{display:none}
.headinner{gap:clamp(20px,3.8vw,58px)}
.headinner nav{gap:clamp(14px,2.2vw,34px)}
.headinner nav button{white-space:nowrap}
.headinner nav button[aria-current=page]{border-bottom-color:var(--green);color:var(--green);font-weight:670}
.hero-copy{max-width:56%;margin-block:25px}
.hero{min-height:clamp(210px,19vw,280px)}
.hero p{max-width:405px}
.nep-hero-controls{display:flex;flex-wrap:wrap;gap:10px;margin-top:16px}
.nep-hero-controls .btn,.nep-hero-controls .outline{padding-inline:14px}
.nep-hero-controls .outline{background:#fffaf0c9;border-color:#bbbda5}
body:not([data-view=overview]) .nep-hero-controls{display:none}
body[data-view=history] .hero,body[data-view=directory] .hero{display:none}
body[data-view=directory] #summary,body[data-view=history] #summary{display:none}
.nep-overview,.nep-history{display:grid;grid-template-columns:minmax(0,1.8fr) minmax(265px,1fr);gap:18px;align-items:stretch}
.nep-card,.nep-members-section{min-width:0;border:1px solid var(--line);border-radius:15px;background:var(--paper);overflow:hidden}
.nep-cardhead,.nep-cardfoot{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:16px 21px}
.nep-heading{display:flex;align-items:center;gap:10px;min-width:0}
.nep-heading>svg.ico{width:21px;height:21px;color:#5c785a}
.nep-heading h2,.nep-heading h3,.nep-book-heading h3{font:500 clamp(1.38rem,2vw,1.76rem)/1.2 var(--serif);letter-spacing:-.035em;color:var(--ink)}
.nep-textbtn{display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:36px;padding:5px 0;color:#315a3e;font-size:.89rem;font-weight:650;text-underline-offset:4px}
.nep-textbtn:hover{text-decoration:underline}
.nep-cardfoot{border-top:1px solid var(--line);padding-block:12px}
.nep-cardfoot p,.nep-member-empty p{color:var(--muted);font-size:.91rem}
.nep-cardfoot>.soft{flex:none;font-size:.86rem}
.nep-diagram{position:relative;display:grid;place-items:center;min-height:190px;background-color:#f3f6ee;background-image:radial-gradient(#cad7c6 .8px,transparent .9px);background-size:16px 16px;border-top:1px solid var(--line);padding:22px 18px}
.nep-arbor{width:min(510px,100%);margin-inline:auto}
.nep-root,.nep-child{display:flex;justify-content:center;position:relative}
.nep-children{display:grid;grid-auto-flow:column;grid-auto-columns:minmax(0,1fr);padding-top:25px}
.nep-root:has(+.nep-children)::after,.nep-child::before{content:"";position:absolute;left:50%;height:13px;width:1.5px;background:#86a184;transform:translateX(-50%)}
.nep-root:has(+.nep-children)::after{top:100%}
.nep-child::before{bottom:100%;height:12.5px}
.nep-child::after{content:"";position:absolute;left:0;right:0;bottom:calc(100% + 12px);height:1.5px;background:#86a184}
.nep-child:first-child::after{left:50%}.nep-child:last-child::after{right:50%}
.nep-node{display:inline-flex;align-items:center;gap:9px;font-size:.94rem;max-width:calc(100% - 8px);min-height:45px;padding:6px 13px;background:#fffefa;border:1px solid #bdcfb8;border-radius:9px;color:#34513b}
.nep-node.ancestor{background:#e8f0e1;border-color:#839b7b}
.nep-node.placeholder{border-style:dashed}
.nep-node>span:last-child{min-width:0;overflow-wrap:anywhere;text-align:left}
.nep-node strong,.nep-people strong{font:600 1.03rem/1.15 var(--serif);display:block}
.nep-node small,.nep-people small{display:block;font-size:.79rem;color:var(--muted)}
.nep-node-icon{display:grid;place-items:center;width:25px;height:25px;border-radius:50%;background:#e9efe3;color:#788f70}
.nep-diagram-note{text-align:center;font-size:.77rem;color:#5a6e5d;margin-top:9px}
.nep-origin{display:flex;flex-direction:column}
.nep-origin .nep-cardhead{border-bottom:1px solid var(--line)}
.nep-facts{display:grid;gap:0;margin:0;padding:1px 22px 2px}
.nep-facts>div{padding:10px 0;border-bottom:1px solid #e1e6db;display:grid;grid-template-columns:minmax(100px,.9fr) minmax(0,1.25fr);align-items:baseline;gap:10px}
.nep-facts>div:last-child{border:0}
.nep-facts dt{font-size:.9rem;color:#536858}
.nep-facts dd{font-weight:600;font-size:.94rem;margin:0;overflow-wrap:anywhere}
.nep-facts dd.not-set{font-weight:400;color:#66786b}
.nep-origin-link{margin:auto 0 0;padding:9px 22px 13px;background:#f2f5ed;border-top:1px solid var(--line)}
.nep-members-section{margin-top:18px}
.nep-member-empty,.nep-people{border-top:1px solid var(--line);padding:16px 21px}
.nep-member-empty{display:flex;align-items:center;gap:14px}
.nep-member-empty>div{flex:1;min-width:0}
.nep-member-empty strong{font-weight:620;font-size:.99rem}
.nep-picture{display:grid;place-items:center;width:48px;height:52px;flex:none;border:1px dashed #b5c2ad;color:#6c8166;background:#f2f4e9;border-radius:8px}
.nep-picture .ico{width:24px;height:24px}
.nep-people{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(200px,100%),1fr));gap:8px}
.nep-people>button{display:flex;align-items:center;gap:10px;text-align:left;padding:8px;border-radius:8px}
.nep-people>button:hover{background:var(--light)}
.nep-face{width:34px;height:34px;display:inline-grid;place-items:center;border-radius:50%;background:#e1e9dd;color:#455e45;object-fit:cover;flex:none;font:600 .85rem var(--serif)}
.nep-pagehead{margin:12px 0 18px}
.nep-history{align-items:start}
.nep-manuscript{padding:24px clamp(20px,3.2vw,45px) 28px}
.nep-book-heading{display:flex;align-items:center;gap:13px;border-bottom:1px solid var(--line);padding:4px 0 17px}
.nep-book-heading>svg.ico{width:33px;height:33px;color:var(--brass)}
.nep-book-heading h3{font-size:clamp(1.6rem,2.5vw,2.1rem);overflow-wrap:anywhere}
.nep-passage{padding:19px 0 3px}
.nep-passage h3{font:600 1.22rem/1.4 var(--serif);margin-bottom:6px}
.nep-passage p{font-size:1rem;line-height:1.7}
.nep-passage .story + .story { margin-top: .85em; }
.history-figures {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 184px), 1fr));
  align-items: start; gap: 16px; margin: 14px 0 8px;
}
.history-figures figure { margin: 0; min-width: 0; }
.history-figures a { display: block; cursor: zoom-in; }
.history-figures img {
  display: block; width: 100%; height: auto; max-height: 420px; object-fit: contain;
  border: 1px solid var(--line); border-radius: 7px; background: #f4efdf;
}
.history-figures figcaption {
  color: var(--muted); margin-top: 5px; font-size: .92rem; line-height: 1.45;
  overflow-wrap: anywhere; white-space: pre-line;
}
.history-edit-fields { margin: 0; padding: 0; border: 0; min-width: 0; }
.history-media-edit { border-top: 1px solid var(--line); margin-top: 18px; padding-top: 16px; }
.history-media-edit h3 { font: 600 1.2rem/1.4 var(--serif); margin: 0 0 10px; }
.history-edit-photo {
  display: grid; grid-template-columns: clamp(48px, 14vw, 90px) minmax(0, 1fr); gap: 12px;
  border-bottom: 1px solid var(--line); margin-bottom: 12px; padding-bottom: 12px;
}
.history-edit-photo img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 6px; }
.history-edit-photo label + label { margin-top: 8px; }
.history-media-edit [data-history-status] { margin: 6px 0 0; }
.nep-hint{color:var(--muted)}
.nep-preview-explain{display:block;padding:9px 12px;margin:12px 0;color:#5c512c;background:#f6f0dd;border-radius:7px;font-size:.9rem}
.nep-stat-note{font-size:.83rem;color:var(--muted);margin:-12px 2px 18px}
.family-breakdown{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin:0 0 18px}
.family-breakdown section{padding:14px 18px}
.family-breakdown h3{margin:0 0 10px;color:var(--ink);font:600 1.12rem/1.3 var(--serif)}
.family-breakdown dl{display:grid;grid-auto-columns:minmax(0,1fr);grid-auto-flow:column;gap:10px;margin:0}
.family-breakdown dt{font-size:.9rem;line-height:1.3;color:var(--muted)}
.family-breakdown dd{margin:2px 0 0;color:var(--ink);font:500 1.55rem/1.15 var(--serif);font-variant-numeric:tabular-nums}
.family-breakdown dd small{display:block;margin-top:3px;color:var(--muted);font:400 .875rem/1.4 var(--sans,system-ui)}
@media(max-width:640px){.family-breakdown{grid-template-columns:1fr;gap:8px}.family-breakdown section{padding:12px 14px}}
@media(max-width:860px){.nep-overview,.nep-history{grid-template-columns:minmax(0,1.5fr) minmax(225px,1fr);gap:13px}.nep-cardhead,.nep-cardfoot{padding-inline:15px}.nep-facts{padding-inline:15px}.nep-facts>div{grid-template-columns:1fr;gap:1px;padding:5px 0}.headinner{gap:22px}}
@media(max-width:720px){.nep-overview,.nep-history{grid-template-columns:1fr}.headinner{gap:8px}.headinner nav{gap:0;justify-content:space-between;overflow-x:auto;scrollbar-width:thin}.headinner nav button{min-height:36px}.headinner nav button svg{display:none}.nep-facts>div{grid-template-columns:minmax(106px,.85fr) 1.4fr;padding:8px 0}.nep-hero-controls{margin-top:13px;gap:7px}.nep-hero-controls .btn,.nep-hero-controls .outline{font-size:.87rem;min-height:36px}.hero-copy{max-width:69%;margin:18px}.hero{min-height:194px}.nep-diagram{min-height:172px}.nep-stat-note{margin:-7px 2px 13px}.nep-history{gap:12px}}
@media(max-width:450px){.hero{min-height:225px;background-position:61% center}.hero:before{background:linear-gradient(90deg,#f7efdde8 3%,#f7efddd9 41%,#f7efdd70 66%,transparent 95%)}.hero-copy{max-width:85%}.hero-copy p{max-width:83%}.nep-cardhead{padding:13px 14px}.nep-cardfoot,.nep-member-empty{align-items:flex-start;flex-wrap:wrap}.nep-cardfoot p{flex:1 1 135px}.nep-node{font-size:.86rem;padding:6px 8px;gap:5px}.nep-children.cols-3 .nep-face{display:none}.nep-member-empty>div{flex-basis:calc(100% - 65px)}.nep-member-empty>.outline{margin-left:62px}.nep-drawing{padding-inline:10px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;transition:none!important}}
@media(max-width:450px){.nep-cardfoot{align-items:flex-start;flex-direction:column}.nep-cardfoot p{flex:auto}}
.archival-hero{display:grid;grid-template-columns:1.05fr 1fr;background:#f2efe1;min-height:240px}
.archival-hero .hero-copy{max-width:none;margin:clamp(21px,3vw,44px);z-index:1}
.archival-hero .hero-copy p{max-width:35ch}
.archival-hero .hero-eyebrow{color:#516844}
.board-cover{align-self:stretch;position:relative;min-height:240px;display:block;overflow:hidden;background:#d9ccb0}
.board-cover img{position:absolute;width:100%;height:100%;object-fit:cover;object-position:52% 42%;display:block}
.board-cover span{position:absolute;bottom:12px;right:12px;background:#fffaf1f2;color:#253e2e;display:flex;align-items:center;gap:.45rem;padding:.33rem .68rem;border-radius:6px;font-size:.82rem;font-weight:600}
.nep-arbor:has(.cols-4){width:100%}
.nep-root{gap:4px}
.nep-root>.nep-node{max-width:48%}
.nep-children.cols-4 .nep-node{padding-inline:8px}
.nep-children.cols-4 .avatar{display:none}
.board-edition{font:italic 1rem var(--serif);color:#735839}
.board-album{padding:0 21px 18px;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px}
.board-print{display:flex;flex-direction:column;gap:7px;color:var(--ink);text-decoration:none;font-size:.94rem;font-weight:600}
.board-print:hover span{text-decoration:underline;text-underline-offset:3px}
.board-print img{width:100%;aspect-ratio:4/3;object-fit:cover;border-radius:7px;border:1px solid var(--line);background:#e5e2d6}
.board-notes{border-top:1px solid var(--line);padding:7px 21px 20px}
.board-notes h3{font-size:1rem;margin:12px 0 4px}.board-notes p{line-height:1.55;color:var(--muted);margin:4px 0}
.tree-scope{display:flex;align-items:center;gap:9px;padding:8px 12px;border-bottom:1px solid var(--line);color:var(--muted);font-size:.9rem}
.tree-scope select{width:auto;max-width:100%;min-height:34px}
@media(max-width:720px){.archival-hero{grid-template-columns:1.05fr 1fr}.archival-hero:before{display:none}.archival-hero .hero-copy{margin:16px}.archival-hero .hero-copy p{max-width:none}.board-album{grid-template-columns:repeat(2,minmax(0,1fr));padding-inline:14px}.board-notes{padding-inline:14px}.nep-root>.nep-node{max-width:48%}}
@media(max-width:520px){.archival-hero{grid-template-columns:1fr}.board-cover{height:132px;min-height:0}.board-cover img{object-position:center 37%}.board-cover span{bottom:8px;right:8px}.nep-children.cols-4{grid-auto-flow:row;padding:14px 5px 0 16px;gap:5px}.nep-children.cols-4 .nep-child{justify-content:flex-start;padding-left:17px;border-left:1.5px solid #86a184}.nep-children.cols-4 .nep-child::before{top:50%;left:0;width:16px;height:1.5px;transform:none}.nep-children.cols-4 .nep-child::after,.nep-root:has(+.cols-4)::after{display:none}.nep-children.cols-4 .nep-node{max-width:100%;min-height:32px}.nep-children.cols-4 .nep-node>span:last-child{display:flex;align-items:baseline;gap:8px}.nep-root .avatar{display:none}.board-album{gap:12px}}


.avatar-crop { display:grid; gap: .85rem; }
.avatar-frame { position:relative; justify-self:center; width:min(66vw, 15rem); aspect-ratio:1; border-radius:50%; background:#e7ece4; overflow:hidden; box-shadow:0 0 0 2px #819886; touch-action:none; }
.avatar-frame canvas { display:block; width:100%; height:100%; cursor:grab; }
.avatar-frame canvas:active { cursor:grabbing; }
.avatar-frame:focus-within { outline:3px solid currentColor; outline-offset:4px; }
.avatar-frame [data-empty] { position:absolute; inset:0; display:grid; place-content:center; text-align:center; padding:1rem; color:#384a3e; pointer-events:none; }
.avatar-frame [data-empty][hidden] { display:none; }
.avatar-crop label { min-width:0; }
.avatar-crop input[type=range] { padding:0; min-height:1.8rem; width:100%; accent-color:#355c44; }
.avatar-crop .crop-axes { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:.85rem; }

.family-album-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,120px),1fr));gap:12px;margin:14px 0 20px}
.family-album-thumb,.family-album-add{border-radius:10px;aspect-ratio:4/3;overflow:hidden;cursor:pointer;border:1px solid var(--line);padding:0;min-width:0}
.family-album-thumb img{width:100%;height:100%;object-fit:cover;display:block}
.family-album-add{border-style:dashed;background:transparent;color:var(--ink);font:inherit;display:flex;align-items:center;justify-content:center;gap:5px}
.album-stage{display:grid;grid-template:minmax(0,1fr)/minmax(0,1fr);place-items:center;width:100%;height:min(49dvh,28rem);min-height:7rem;overflow:hidden;touch-action:none;user-select:none;border-radius:8px;background:#eeefe9}
.album-stage img{display:block;width:auto;height:auto;max-width:100%;max-height:100%;min-width:0;min-height:0;pointer-events:none;-webkit-user-drag:none}
.album-stage.zoomed{cursor:grab}
.album-stage.zoomed:active{cursor:grabbing}
.album-view-controls,.album-nav{display:flex;align-items:center;flex-wrap:wrap;gap:.45rem}
.album-view-controls{justify-content:space-between;margin:.65rem 0}
.album-view-controls button{min-height:44px}
.album-nav button{min-width:44px;padding:.15rem .45rem;font-size:1.35rem}
.album-nav [data-position]{color:var(--muted);font-variant-numeric:tabular-nums}
.album-viewer [data-caption]{margin:.35rem 0}


.album-card,.album-detail{margin:0;min-width:0}
.album-card .family-album-thumb{width:100%;display:block}
.album-card figcaption{display:grid;gap:2px;margin-top:5px;font-size:.92rem}
.album-card span,.album-detail figcaption{white-space:pre-wrap;overflow-wrap:anywhere}
.album-card small,.album-detail small,.album-draft small{display:block;color:var(--muted);font-size:.8rem}
.family-album-add{align-self:start}
.album-detail figcaption{margin-bottom:16px}
.album-fields{border:0;padding:0;margin:0;display:grid;gap:12px;min-width:0}
.album-drafts{display:grid;gap:12px}
.album-draft{display:grid;grid-template-columns:minmax(62px,25%) minmax(0,1fr);gap:12px;padding-top:12px;border-top:1px solid var(--line)}
.album-draft>img{width:100%;aspect-ratio:1;object-fit:cover;border-radius:7px}
.album-photo-actions{display:flex;align-items:center;flex-wrap:wrap;gap:12px}
.album-photo-actions button{min-height:40px}
#album-editor [data-progress]:empty{display:none}

.form-grid summary{cursor:pointer;padding:.65rem 0;font-weight:600}

/* The home page reads as an illustrated family chronicle. */
:root {
  --ink: #213e35;
  --text: #293c34;
  --muted: #536258;
  --line: #d9d2bd;
  --paper: #fffdf6;
  --light: #eef1e6;
  --green: #244c40;
  --brass: #926733;
  --vermilion: #963d2f;
  --serif: Cambria, "Palatino Linotype", "Times New Roman", serif;
  --content: min(1200px, calc(100% - clamp(40px, 10vw, 168px)));
}
body { background: #faf7ef; }
.headinner, .shell { width: var(--content); }
.shell { padding-top: 0; }
.sitehead { height: 76px; background: #fffdf5; position: relative; z-index: 3; border-bottom: 1px solid #cdbf9d; }
.headinner { gap: clamp(22px, 4vw, 72px); }
.brand { gap: 11px; color: var(--ink); }
.mark { width: 41px; height: 41px; }
.brand-type { display: grid; gap: 5px; }
.brand-type strong { font: 600 1.9rem/.92 var(--serif); letter-spacing: -.06em; }
.brand-type small { font: 650 .74rem/1.15 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: #685c46; }
.headinner nav { margin-left: auto; gap: clamp(15px, 2.2vw, 34px); }
.headinner nav button { min-height: 44px; font-size: 1rem; font-weight: 550; border: 0; position: relative; padding: 0; }
.headinner nav button .ico { display: none; }
.headinner nav button[aria-current="page"], .headinner nav button:hover { color: var(--vermilion); }
.headinner nav button[aria-current="page"]::after {
  content: ""; position: absolute; bottom: 17px; left: 0; right: 0;
  border-top: 2px solid var(--vermilion);
}
#account { margin-left: 0; }
.preview-account, .accountbtn { color: #405448; font-size: .88rem; min-height: 44px; }
.preview-account > .round, .accountbtn > span { border: 1px solid #d4d3bd; background: #f1f1e5; }
body[data-view] .shell > .hero, body[data-view] .family-portals, body[data-view] .family-stats-title { display: none; }
body[data-view="overview"] .shell > .hero, body:not([data-view]) .shell > .hero { display: flex; }
body[data-view="overview"] .family-portals, body:not([data-view]) .family-portals { display: grid; }
body[data-view="overview"] .family-stats-title, body:not([data-view]) .family-stats-title { display: flex; }
.shell > .hero {
  width: calc(100vw - var(--scrollbar-w, 0px));
  margin-inline: calc((100% - 100vw + var(--scrollbar-w, 0px))/2);
  border: 0; border-bottom: 1px solid #baa980; border-radius: 0;
  min-height: clamp(375px, 34vw, 535px);
  align-items: center; isolation: isolate;
  background: #f4e9cd url('/assets/heritage.webp') center center/cover no-repeat;
}
.hero::before {
  content: ""; position: absolute; z-index: -1; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse 37% 86% at 27% 48%, #fff8e6f2 0%, #fff8e6db 42%, #fff8e675 72%, transparent 100%);
}
.hero .hero-copy, .archival-hero .hero-copy {
  width: min(640px, 51%); max-width: none; z-index: 1;
  margin: 32px 0 34px max(calc((100% - 1140px)/2), 8%);
}
.hero .hero-eyebrow, html[data-preview=layout] .hero .hero-eyebrow {
  display: flex; align-items: center; gap: 10px; font: 700 .79rem/1.4 var(--sans);
  letter-spacing: .14em; text-transform: uppercase; color: #653b27; margin: 0 0 18px;
}
.hero .hero-eyebrow::before { content: ""; width: 27px; height: 1px; flex: none; background: #91612e; }
.hero .hero-eyebrow svg { display: none; }
.hero h1 {
  font: 500 clamp(3rem, 5.15vw, 5.1rem)/1.09 var(--serif);
  letter-spacing: -.045em; color: #183d32; overflow-wrap: normal;
}
.hero h1 span, .hero h1 em { display: block; }
.hero h1 em { color: #285548; font-weight: 400; font-style: italic; }
.hero .hero-copy p, .archival-hero .hero-copy p {
  color: #334539; font: 400 clamp(1.12rem, 1.43vw, 1.38rem)/1.5 var(--serif); max-width: none;
  margin-top: 17px; text-wrap: pretty;
}
.nep-hero-controls { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 18px; margin-top: 22px; }
.nep-hero-controls .btn {
  min-height: 47px; font-size: 1rem; font-weight: 640; padding: .73rem 1.35rem;
  background: var(--vermilion); color: #fffaf0; border: 1px solid #783324; border-radius: 4px;
  box-shadow: inset 0 0 0 2px #efd7ac35;
}
.nep-hero-controls .btn:hover { background: #7e3027; }
.nep-hero-controls .board-cover {
  min-height: 44px; height: auto; align-self: auto; display: inline-flex; align-items: center; gap: 7px;
  position: static; background: #fff8e5da; color: #3b493b; font-weight: 620; text-decoration-color: #9f8e69;
  text-underline-offset: 4px; padding: 4px 8px; border-radius: 3px;
}
.nep-hero-controls .board-cover span { display: contents; }
.family-portals {
  grid-template-columns: repeat(3,minmax(0,1fr));
  background: #fffdf6; border-block: 1px solid var(--line); border-top: 0;
  position: relative; padding-block: 22px;
}
.family-portals::before, .family-portals::after {
  content: ""; position: absolute; top: 0; bottom: -1px;
  width: calc((100vw - 100%)/2); background: #fffdf6; border-bottom: 1px solid var(--line);
}
.family-portals::before { right: 100%; } .family-portals::after { left: 100%; }
.family-portals > button {
  position: relative; text-align: left; min-height: 60px; padding: 0 12px; display: flex;
  justify-content: center; align-items: center; gap: clamp(10px,1.5vw,23px);
  color: var(--ink); border-right: 1px solid #d9cbaa;
}
.family-portals > button:last-child { border: 0; }
.family-portals > button:hover .portal-copy strong { color: var(--vermilion); text-decoration: underline; text-underline-offset: 4px; }
.portal-art { flex: none; display: block; width: clamp(45px,4.5vw,64px); height: auto; }
.portal-art svg { display: block; width: 100%; height: auto; }
.portal-copy { display: grid; gap: 4px; }
.portal-copy strong { font: 600 clamp(1.22rem,1.65vw,1.55rem)/1.2 var(--serif); letter-spacing: -.035em; }
.portal-copy small { color: var(--muted); font-size: .92rem; line-height: 1.32; }
.family-stats-title {
  margin: clamp(20px, 2.6vw, 40px) 0 12px; align-items: center; gap: 18px;
  color: var(--ink); font: 500 clamp(1.65rem, 2.45vw, 2.35rem)/1.2 var(--serif); letter-spacing: -.035em;
}
.family-stats-title::after { content: ""; flex: 1; height: 1px; background: #d5c7a7; }
.metrics { border-radius: 4px; border-color: #d6ceb9; background: #fffdf6; padding-block: 16px; }
body[data-view="overview"] .metrics { margin-top: 0; }
.metric strong { color: #31523c; font-size: 2.1rem; }
.metric small { font-size: .94rem; color: #4d584e; }
.metric-icon { background: #f1efdf; color: #746a40; border-radius: 50%; }
.nep-stat-note { font-size: .9rem; }
.sample-notice, .notice.sample-notice {
  font-size: .88rem; line-height: 1.4; background: transparent; border: 0; padding: 0;
  color: var(--muted); border-radius: 0; margin-top: 13px;
}
.sample-notice .linkbtn { min-height: 40px; }
.nep-card,.nep-members-section,.directory,.sidecard,.treebox,.emptycard {
  border-color: #d6ceb9; border-radius: 6px; background-color: var(--paper);
}
.nep-cardhead { padding-block: 18px; }
.nep-cardhead .nep-heading > svg { color: #8b6839; }
.nep-cardhead .nep-textbtn,.nep-origin-link .nep-textbtn,.nep-members-section .nep-textbtn {
  color: #80402e; min-height: 44px; font-size: .94rem;
}
.nep-cardhead h2, .nep-cardhead h3 { font-size: clamp(1.42rem, 1.9vw, 1.8rem); }
.nep-origin-link { background: #f6f2e4; }
.nep-diagram { background-color: #f3f4e8; }
.nep-node,.tree-node { border-color: #bdc8b2; }
footer { align-items:center; color: #50604f; border-top: 1px solid #bfae89; }
footer .footerbrand { font-size: 1.22rem; color: #79412c; }
body[data-view="directory"] #primary, body[data-view="history"] #primary { padding-top: 26px; }
body[data-view="tree"] #summary { padding-top: 4px; }
@supports(width:100cqw) {
  html { container-type: inline-size; }
  .shell > .hero { width: 100cqw; margin-inline: calc((100% - 100cqw)/2); }
  .family-portals::after,.family-portals::before { width: calc((100cqw - 100%)/2); }
}
@media(max-width: 920px) {
  :root { --content: calc(100% - 40px); }
  .headinner { gap: 22px; } .headinner nav { gap: 20px; }
  .hero .hero-copy { margin-left: 6%; }
  .hero h1 { font-size: clamp(2.8rem,5.6vw,3.65rem); }
  .portal-copy small { font-size: .88rem; }
}
@media(max-width:720px) {
  :root { --content: calc(100% - 32px); }
  .sitehead { height: auto; }
  .headinner { min-height: 96px; gap: 0 12px; padding-top: 8px; }
  .brand { gap: 8px; } .mark { width: 34px; height: 34px; }
  .brand-type { gap: 3px; } .brand-type strong { font-size: 1.52rem; } .brand-type small { font-size: .65rem; }
  #account { margin-left: auto; } .accountbtn, .preview-account { font-size: .82rem; }
  .headinner nav { margin: 0; align-items: stretch; height: 44px; gap: 0; }
  .headinner nav button { font-size: .94rem; min-height: 44px; }
  .headinner nav button[aria-current="page"]::after { bottom: 2px; }
  .shell > .hero {
    min-height: 0; display: block; background-color: #f7edd5; background-position: right bottom;
    background-size: auto 66%; align-items: flex-start; padding-bottom: clamp(130px, 35vw, 210px);
  }
  .hero::before, .archival-hero::before {
    display: block; background: linear-gradient(to bottom, #f7edd5 22%, #f7edd5fa 35%,
      #f7edd5df 46%, #f7edd54d 67%, transparent 76%);
  }
  .hero .hero-copy,.archival-hero .hero-copy { width: auto; max-width: calc(100% - 44px); margin: 26px 22px 0; }
  .hero .hero-eyebrow { margin-bottom: 11px; letter-spacing: .105em; font-size: .78rem; }
  .hero h1 { font-size: clamp(2.15rem,10.7vw,3.65rem); line-height: 1.1; }
  .hero .hero-copy p { margin-top: 12px; max-width: 38ch; font-size: 1.08rem; line-height: 1.42; }
  .nep-hero-controls { margin-top: 15px; gap: 7px 12px; }
  .nep-hero-controls .btn { min-height: 44px; font-size: 1rem; padding: 9px 17px; }
  .family-portals { padding-block: 14px; }
  .family-portals > button { padding: 0 5px; gap: 6px; flex-direction: column; text-align: center; justify-content: flex-start; }
  .portal-art { width: 44px; }
  .portal-copy { gap: 2px; }
  .portal-copy strong { font-size: 1.13rem; }
  .portal-copy small { font-size: .82rem; }
  .metrics { padding-block: 12px; }
  .metric strong { font-size: 1.7rem; } .metric small { font-size: .86rem; }
  .nep-stat-note, .notice.sample-notice { font-size: .875rem; }
  .nep-cardhead { padding-block: 12px; }
  .nep-stat-note { margin-top: -6px; }
}
@media(max-width:365px) {
  .hero-verse-break { display: none; }
  .hero .hero-copy p { text-wrap: balance; }
}
@media(max-width:420px) {
  .portal-copy small { display: none; }
  .hero .hero-copy, .archival-hero .hero-copy { margin-top: 21px; max-width: calc(100% - 40px); margin-inline: 20px; }
  .notice.sample-notice { align-items: start; }
  .metric small { font-size: .83rem; }
}

.family-tools{display:flex;justify-content:flex-end;flex-wrap:wrap;gap:6px 22px;margin:14px 0 18px;padding-block:5px;border-bottom:1px solid var(--line)}
.family-tools button{display:inline-flex;align-items:center;gap:7px;min-height:40px;padding:6px 1px;color:var(--muted);font-weight:600}
.family-tools button[aria-current=page],.family-tools button:hover{color:var(--vermilion);text-decoration:underline;text-underline-offset:5px}
.family-tools .ico{width:16px;height:16px}.unread-count{border-radius:1em;background:var(--vermilion);color:white;padding:1px 7px;font-size:.78rem}
body:not([data-view=overview]):not([data-view=tree]) #summary,#family-bulletin:empty{display:none}
.life-home,.kin-directions,.memorial-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
.life-panel,.remembrance-card,.kin-directions>div{border:1px solid #d9cdb7;background:#fffcf4;border-radius:10px;padding:clamp(15px,2.2vw,27px);min-width:0}
.life-panel+.life-panel,.kin-directions{margin-top:15px}.life-home>.life-panel{margin:0}
.life-panel h2,.life-heading h2,.page-heading h2,.remembrance-head h2,.life-panel h3,.life-heading h3,.remembrance-card h3,.message-item h3{font-family:var(--serif);color:var(--ink);line-height:1.2}
.life-heading,.message-actions{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
.life-heading h2{display:flex;align-items:center;gap:9px;font-size:clamp(1.35rem,2vw,1.75rem)}
.life-heading .ico{color:#776335}.life-heading>button{flex:none}
.page-heading,.remembrance-head{margin:22px 0 18px}.page-heading h2,.remembrance-head h2{font-weight:500;font-size:clamp(1.85rem,3.6vw,3rem);letter-spacing:-.034em}
.page-heading p,.life-panel>p{margin-top:8px;color:var(--muted)}
.life-home .life-panel>p{margin-bottom:9px}.life-panel h3,.life-heading h3{font-size:1.25rem}
.life-tabs{display:flex;gap:6px;flex-wrap:wrap;margin-bottom:15px}
.life-tabs button,.day-count,.person-badges span,.region-counts span{border:1px solid #d7c9af;border-radius:3px;background:#faf4e8;color:#4f5547;padding:6px 10px}
.life-tabs button{min-height:39px}.life-tabs button[aria-pressed=true]{background:#285145;color:#fffaf0;border-color:#285145}
.event-row{display:flex;align-items:center;gap:14px;padding:15px 0;border-top:1px solid #e2d8c6;min-width:0}
.event-row:first-child{border-top:0}.life-home .event-row:first-of-type{margin-top:10px}
.event-main{min-width:0;flex:1}.event-main>small,.remembrance-card small,.message-item small{display:block;color:#75543b;font-size:.8rem;letter-spacing:.025em}
.title-link{color:var(--ink);font:inherit;text-align:left;padding:3px 0;overflow-wrap:anywhere}.title-link:hover{text-decoration:underline}
.event-main p,.remembrance-card p,.message-item p,.event-detail p,.person-front p{margin:5px 0 0;overflow-wrap:anywhere}
.event-main p,.remembrance-card p{font-size:.92rem;color:var(--muted)}.event-main p .ico{width:14px;height:14px;vertical-align:middle}
.date-tile{display:grid;justify-items:center;align-content:center;min-width:54px;min-height:54px;border-radius:7px;border:1px solid #d8c8a6;background:#f3e9d3;color:#61482f}
.date-tile strong{font:600 1.65rem/1 var(--serif)}.date-tile small{font-size:.76rem}
.day-count{white-space:nowrap;display:inline-flex;align-items:center;font-size:.82rem;padding:5px 8px}
.day-count.near{background:#f3e5d2;color:#79382e}
.remembrance-head{display:flex;align-items:center;gap:22px;padding:clamp(20px,3.6vw,45px);border:1px solid #d4c09d;border-left:4px solid #9b7441;background:linear-gradient(110deg,#f0e7d4,#fff9ec)}
.remembrance-head p{font:italic 1.12rem/1.5 var(--serif);max-width:58ch;color:#4b594c;margin-top:8px}
.remembrance-cross{font:normal clamp(2.5rem,5vw,4.5rem)/1 Georgia,serif;color:#866438}.memorial-grid{margin-top:16px}
.remembrance-card{display:flex;align-items:center;gap:15px}.remembrance-card .avatar,.memorial-person .avatar,.person-front .avatar{outline:1px solid #be9e67;outline-offset:3px;flex:none}
.memorial-person{display:flex;align-items:center;gap:22px;padding-block:15px}.memorial-person p{font:italic 1.16rem/1.5 var(--serif)}
.event-detail dl>div{display:grid;grid-template-columns:minmax(95px,.5fr) 2fr;gap:12px;padding:7px 0;border-bottom:1px solid var(--line)}.event-detail dt{color:var(--muted)}.event-detail dd{margin:0;overflow-wrap:anywhere}
.kin-select,.geo-controls{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);gap:13px;align-items:end}
.kin-select label,.geo-controls label,.share-label{display:grid;gap:7px;font-size:.9rem;font-weight:650}.geo-controls{grid-template-columns:repeat(2,minmax(0,1fr))}
.geo-controls select{width:100%;min-width:0}.kin-directions{margin-bottom:15px}.kin-directions span{display:block;font-size:.94rem;color:var(--muted)}
.kin-select{align-items:start}
.kin-select #kin-swap{margin-top:1.8rem}
.kin-picker{min-width:0}.kin-picker label{margin-bottom:6px}
.kin-picker input{min-height:44px;font-size:1rem}
.kin-results{margin-top:4px;border:1px solid var(--line);border-radius:7px;background:#fffefa;overflow:hidden}
.kin-results ul{margin:0;padding:0;list-style:none;max-height:min(15rem,36dvh);overflow-y:auto;overscroll-behavior:contain}
.kin-results li{padding:9px 12px;min-height:44px;cursor:pointer;overflow-wrap:anywhere}
.kin-results li+li{border-top:1px solid var(--line)}
.kin-results li[aria-selected=true],.kin-results li:hover{background:#eaf1e5;color:var(--green)}
.kin-results p{padding:9px 12px;color:var(--muted)}
.kin-directions strong{display:block;font:600 clamp(1.6rem,2.8vw,2.4rem)/1.2 var(--serif);color:#773b30;margin-top:6px}
.kin-path,.region-counts{display:flex;align-items:center;flex-wrap:wrap;gap:7px;margin:12px 0}.kin-explain p{line-height:1.6}
.geo-count strong{font-size:1.5rem;color:var(--ink)}.province-list{margin:16px 0}.province{display:grid;grid-template-columns:minmax(100px,1fr) minmax(40px,1.25fr) auto;align-items:center;gap:14px;width:100%;text-align:left;padding:9px 0;border-bottom:1px solid #e5dcc9}
.province[aria-pressed=true]{color:#873a2d}.bar{background:#ebe6d8;height:9px;border-radius:9px;overflow:hidden}.bar i{display:block;height:100%;background:#698573}.region-counts span{font-size:.86rem}
#dialog[data-layout=person]{border:1px solid #aa8f64;background:#fcf7eb}
#dialog[data-layout=person] #dialog-title{font-weight:500;color:#683a2f;letter-spacing:-.03em;font-size:clamp(2rem,4vw,2.7rem)}
.dignified-profile{padding:3px 0 0}.person-front{display:grid;grid-template-columns:auto minmax(0,1fr);align-items:center;gap:12px 24px;padding:20px;background:#f3ead8;border:1px solid #d9c8a7;border-radius:9px}
.profile-album-strip{grid-column:1/-1;justify-self:start;display:flex;align-items:center;gap:5px;max-width:100%;min-height:44px;padding:0;border:0;border-radius:6px;background:transparent;color:var(--green);cursor:pointer}
.profile-album-strip img{width:42px;min-width:0;height:auto;aspect-ratio:1;object-fit:cover;border:1px solid #ccbea3;border-radius:6px}
.profile-album-strip span{margin-left:3px;white-space:nowrap;font-size:.875rem;font-weight:600}
.profile-album-strip:hover span,.profile-album-strip:focus-visible span{text-decoration:underline}
.person-badges{display:flex;flex-wrap:wrap;gap:5px}.person-badges span{font-size:.8rem;padding:2px 8px;background:#fffaf0}
.person-badges span:first-child{color:#713a2f}.person-front p{font-size:.95rem}.dignified-profile .profile-grid:empty,.person-front p:empty{display:none}
.message-item{margin-top:11px;padding-top:14px;border-top:1px solid var(--line)}.message-item small{margin-bottom:3px}.message-actions{margin-top:12px}.message-actions span,.delivery-count{color:var(--muted);font-size:.92rem}
#send-generations{border:1px solid var(--line);padding:12px;border-radius:6px}.checkline{display:flex!important;align-items:center;gap:8px}.checkline input{width:auto}.share-label textarea{font:inherit;font-weight:400;padding:10px}
[hidden]{display:none!important}
.notice-channels,.notice-fields{display:grid;gap:10px;min-width:0;margin:0;padding:12px 14px 14px;border:1px solid var(--line);border-radius:8px}
.notice-channels legend,.notice-fields legend{padding:0 5px;color:var(--green);font-weight:650}
.notice-channel{display:flex!important;align-items:flex-start;gap:10px;padding:4px 0;cursor:pointer}
.notice-channel input,.notice-fields .checkline input{flex:none;width:19px;height:19px;min-height:0;margin:2px 0 0;accent-color:var(--green)}
.notice-channel span{display:grid;gap:3px}.notice-channel small{font-size:.9rem;line-height:1.45;color:var(--muted)}
.notice-preview{padding:10px 13px;border:1px solid var(--line);border-radius:7px}.notice-preview summary{cursor:pointer;font-weight:600;color:var(--green)}.notice-preview h3{margin:12px 0 6px}.notice-preview .story{margin:0 0 3px;overflow-wrap:anywhere}
.zalo-group-line{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:6px 12px;margin:10px 0 16px;padding:12px 15px;background:var(--paper);border:1px solid var(--line);border-radius:9px}
.page-heading .profile-actions{margin:0}.zalo-group-line a{white-space:normal}
.message-item.linked-notice{outline:2px solid var(--green);outline-offset:3px;border-radius:5px}.toast button{color:inherit;text-decoration:underline;font-weight:650}
@media(min-width:721px) and (max-width:1100px){.sitehead{height:auto}.headinner{flex-wrap:wrap;height:auto;padding-top:8px;gap:4px 18px}.headinner nav{order:3;width:100%;min-height:44px;height:auto;justify-content:center;gap:22px}.headinner #account{margin-left:auto}}
@media(max-width:720px){
  .headinner nav{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));grid-auto-rows:minmax(36px,auto);height:auto;width:100%;gap:0;overflow:visible}
  .headinner nav button{justify-content:center;align-self:stretch;min-height:34px}
  .family-tools{justify-content:flex-start;gap:0 12px;margin:8px 0 12px}.family-tools button{min-height:34px}
  .life-home,.memorial-grid{grid-template-columns:1fr}.life-heading h2{font-size:1.4rem}.page-heading h2{font-size:1.88rem}
  .remembrance-head{gap:12px}.kin-select{grid-template-columns:minmax(0,1fr) auto}.kin-select .kin-picker:last-child{grid-column:1/-1}
  .kin-directions>div{padding:12px}.event-row{gap:9px}.day-count{white-space:normal;text-align:center}
}
@media(max-width:420px){.family-tools{display:grid;grid-template-columns:1fr 1fr;gap:0 8px}.family-tools button{justify-content:center}.event-row{display:grid;grid-template-columns:45px 1fr}.date-tile{min-width:44px;min-height:46px}.event-row>.day-count{grid-column:2;justify-self:start}.person-front{gap:14px;padding:14px}.geo-controls{grid-template-columns:1fr}.province{gap:7px}.life-heading .search{width:100%}}

.event-main .rsvp-list-link{display:inline-flex;align-items:center;min-height:36px;padding:3px 0}
.event-detail dd{white-space:pre-line}
.event-rsvp{margin:18px 0;padding:15px;border:1px solid var(--line);border-radius:9px;background:#f8f6ed}
.rsvp-head{display:flex;align-items:baseline;justify-content:space-between;flex-wrap:wrap;gap:3px 12px}
.rsvp-head h3{margin:0;font:600 1.35rem/1.3 var(--serif)}
.rsvp-total{color:var(--green);font-size:.92rem}
.rsvp-date,.rsvp-status,.rsvp-no-results{color:var(--muted);font-size:.9rem}
.event-rsvp p{margin:6px 0 10px}
.rsvp-status:empty{display:none}
.rsvp-search{display:grid;gap:5px;margin:8px 0;font-size:.92rem}
.rsvp-search input{width:100%}
.rsvp-choices{display:grid;gap:0;margin:8px 0 12px;padding:0 10px;min-width:0;max-height:16rem;overflow:auto;border:1px solid var(--line);border-radius:6px;background:#fffdf7}
.rsvp-choice{display:flex;align-items:center;gap:10px;min-height:44px;padding:5px 0;cursor:pointer;overflow-wrap:anywhere}
.rsvp-choice+.rsvp-choice{border-top:1px solid var(--line)}
.rsvp-choice input{width:20px;height:20px;min-height:0;flex:none;accent-color:var(--green)}
.rsvp-choice small{color:var(--muted);margin-left:.45em}
.attendee-names{font-size:.92rem;line-height:1.5;overflow-wrap:anywhere}
.attendee-names p{margin:2px 0 6px}
.attendee-names span{font-weight:600}
.rsvp-roster summary{cursor:pointer;color:var(--green);padding:4px 0}
.rsvp-refresh{min-height:36px}
.profile-contacts{display:grid;grid-template-columns:max-content minmax(0,1fr);align-items:baseline;gap:9px 14px;margin:.65rem 0 1rem}
.profile-contacts dt{white-space:nowrap;color:var(--muted);font-size:.9rem}
.profile-contacts dd{min-width:0;margin:0;overflow-wrap:anywhere}
.profile-contacts a{color:var(--green);text-underline-offset:.15em}
.resting-place {
  margin: 16px 0;
  padding: 16px 18px;
  border: 1px solid #cfc8ae;
  border-left: 3px solid #68795d;
  border-radius: 8px;
  background: #f4f2e7;
  color: #313e35;
  overflow-wrap: anywhere;
}
.resting-place h3 {display:flex;align-items:center;gap:8px;margin:0;font:600 1.28rem/1.3 Georgia,serif;color:#384e40}
.resting-place h3 .ico {width:19px;height:19px;flex:none}
.resting-facts {display:grid;gap:8px;margin:14px 0 0}
.resting-facts div {display:grid;grid-template-columns:minmax(6.5rem, .38fr) 1fr;gap:12px}
.resting-facts dt,.resting-note {color:#566153}
.resting-facts dd {margin:0;white-space:pre-line}
.resting-note {margin:9px 0 0;line-height:1.55}
.resting-actions {display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin-top:14px}
.resting-actions a,.resting-picker a {display:inline-flex;align-items:center;gap:6px}
.resting-actions a {text-decoration:none}
.resting-actions .outline {padding:8px 11px;min-height:42px;max-width:100%;text-align:left}
.resting-thumbs {display:flex;align-items:center;flex-wrap:wrap;gap:5px;margin-top:14px;padding:4px 0;background:transparent;border:0;color:#334d3e;font:inherit;cursor:pointer;text-align:left}
.resting-thumbs img {width:46px;height:46px;border-radius:5px;object-fit:cover}
.resting-thumbs span {padding-left:3px;text-decoration:underline;text-underline-offset:.18em}
.resting-fields {display:grid;gap:13px;min-width:0;border:0;padding:12px 0 0;margin:0}
.resting-picker {display:grid;gap:10px;padding:12px;border-radius:6px;background:#f1f2e9}
.resting-picker .hint {margin:0}
.resting-picker a[hidden],#resting-editor[hidden] {display:none}
@media (max-width:480px) {
  .resting-place {padding:14px}
  .resting-facts div {grid-template-columns:1fr;gap:2px}
  .resting-facts dt {font-size:.85rem}
  .resting-actions {align-items:stretch}
}

.edu-page {display:grid;gap:18px;color:var(--ink);scroll-margin-top:12px}
.edu-page .page-heading,.edu-page .life-panel,.edu-page .life-tabs {margin:0}
.edu-page .life-heading {gap:12px;flex-wrap:wrap}
.edu-page h4,.edu-honours strong {font-family:var(--serif);font-size:1.14rem;line-height:1.3}
.edu-page p,.edu-form p,.edu-honours p,.edu-prose {line-height:1.55;overflow-wrap:anywhere}
.edu-prose {white-space:pre-line}
.edu-page h4 {margin:14px 0 4px}
.edu-date-label,.fund-contact {display:flex;align-items:baseline;flex-wrap:wrap;gap:7px;color:var(--muted);font-size:.9rem}
.edu-banner {display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:18px;padding:clamp(18px,3.1vw,34px);background:linear-gradient(105deg,#edf1e5,#fbf6e8);border:1px solid #c9cfb9;border-inline-start:4px solid #58734f;border-radius:10px}
.edu-banner>div:first-child {flex:1 1 285px}
.edu-banner h3 {font:600 clamp(1.4rem,3vw,1.85rem)/1.25 var(--serif);color:#334e3e;margin:4px 0}
.edu-banner p {max-width:65ch;margin:.3em 0}
.edu-banner .profile-actions,.edu-page .profile-actions {margin:0}
.edu-date-label {font-weight:600;color:#4f684f}
.edu-sections {display:grid;grid-template-columns:minmax(0,.86fr) minmax(0,1.14fr);align-items:start;gap:18px}
.edu-caption,.edu-story small,.edu-round small,.fund-ledger small {color:var(--muted);font-size:.86rem}
.edu-empty {padding:8px 0 2px;color:var(--muted)}
.edu-story {padding:12px 0}
.edu-story h4,.edu-round h4,.fund-entry h4 {margin:3px 0;overflow-wrap:anywhere}
.edu-story+.edu-story,.edu-round+.edu-round,.fund-entry+.fund-entry,.edu-honours li+li {border-top:1px solid var(--line)}
.edu-round,.fund-entry,.edu-honours li {display:flex;justify-content:space-between;align-items:center;gap:12px;padding:14px 0}
.edu-calculator {border-top:1px solid var(--line);margin-top:16px;padding-top:10px}
.edu-calculator summary {cursor:pointer;color:#285444;font-weight:650;padding:7px 0}
.edu-calculator-body,.edu-form,.edu-form [data-goods],.edu-awardee,.edu-form [data-awardees] {display:grid;gap:12px}
.edu-form {margin:12px 0 0;min-width:0}
.edu-form label,.edu-calculator label,.fund-filters label,.edu-page .life-heading>label {display:grid;gap:5px;color:var(--ink);font-size:.94rem;font-weight:600}
.edu-form input:not([type=checkbox]),.edu-form textarea,.edu-form select,.edu-calculator input,.edu-calculator select,.fund-filters select,.edu-page .life-heading select {width:100%;min-width:0;border:1px solid #babdac;border-radius:6px;background:#fffdf7;color:var(--ink);padding:9px 10px;font:inherit;font-weight:400}
.edu-form label.edu-check {display:flex;align-items:baseline;gap:9px}
.edu-form .edu-check input {width:auto;accent-color:#44654d}
.edu-pair,.fund-filters,.edu-counts {display:grid;gap:12px;grid-template-columns:repeat(2,minmax(0,1fr))}
.edu-counts {grid-template-columns:repeat(3,minmax(0,1fr))}
.edu-form [hidden],.edu-calculator [hidden] {display:none!important}
.edu-form output,.edu-calculator output {display:block;padding:12px;border-radius:6px;background:#eef2e6;color:#294c38;line-height:1.5}
.edu-awardee {min-width:0;border:1px solid var(--line);border-radius:7px;margin:0;padding:10px 13px 12px;background:#fbf8ef}
.edu-awardee legend {font-weight:650;color:#4f644e;padding:0 5px}
.edu-awardee [data-remove] {justify-self:start}
.edu-honours,.fund-ledger {list-style:none;margin:10px 0;padding:0}
.edu-honours li>div,.fund-entry>div,.edu-round>div {min-width:0;overflow-wrap:anywhere}
.edu-honours li {align-items:flex-start}
.edu-round-sum,.fund-stats {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin:15px 0}
.edu-round-sum p,.fund-stats>div {margin:0;background:#f4f1e8;border-radius:7px;padding:11px;min-width:0}
.edu-round-sum strong,.fund-stats dd {display:block;margin:5px 0 0;color:#355341;font:600 1.2rem/1.25 var(--serif);overflow-wrap:anywhere}
.fund-stats dt {color:#4c5c51;font-size:.87rem}
.fund-stats>div:last-child {background:#eaf0df}
.fund-filters {max-width:520px;margin:17px 0 9px}
.fund-amount {display:grid;text-align:right;justify-items:end;gap:3px}
.fund-amount span,.fund-amount small {font-size:.83rem;color:var(--muted)}
.fund-amount b {color:#345540}
@media(max-width:690px) {
  .edu-sections {grid-template-columns:minmax(0,1fr)}
  .edu-page .life-panel {padding:15px}
}
@media(max-width:435px) {
  .edu-round,.fund-entry {align-items:flex-start;flex-wrap:wrap}
  .edu-page .fund-entry .fund-amount {text-align:left;justify-items:start}
  .edu-pair,.edu-counts,.fund-filters {grid-template-columns:1fr}
  .edu-round-sum,.fund-stats {grid-template-columns:1fr}
  .edu-round-sum p,.fund-stats>div {display:flex;justify-content:space-between;align-items:baseline;gap:8px;padding:8px 10px}
  .edu-round-sum strong,.fund-stats dd {margin:0}
}

.home-almanac {
  display:grid; grid-template-columns:minmax(0,1.25fr) minmax(0,1fr); gap:clamp(12px,2vw,26px);
  margin:20px 0 26px;
}
.home-almanac > .life-panel { margin:0; padding:clamp(16px,2vw,26px); border-radius:5px; }
.home-almanac .agenda-panel { border-top:3px solid #52705c; }
.home-almanac .news-panel { border-top:3px solid #a16e47; }
.home-almanac .life-heading h2 { font-weight:550; }
.home-almanac .nep-textbtn { min-height:44px; }
.almanac-date { display:flex; flex-wrap:wrap; align-items:baseline; gap:4px 10px; margin:9px 0 7px; font-size:.93rem; color:var(--muted); }
.almanac-date strong { color:var(--ink); }
.almanac-date > span { border-left:1px solid #c8ba98; padding-left:10px; }
.agenda-panel .event-row { align-items:flex-start; }
.agenda-panel .date-tile { border-radius:4px; background:#f2efe1; color:#395341; }
.agenda-panel .day-count { font-size:.88rem; }
.home-almanac:has(.news-empty) { grid-template-columns:minmax(0,1fr); gap:0; }
.home-almanac:has(.news-empty) .agenda-panel { border-radius:5px 5px 0 0; }
.home-almanac .news-empty { display:flex; align-items:center; flex-wrap:wrap; gap:6px 16px; border-top:0; padding-block:8px; border-radius:0 0 5px 5px; background:#f5f1e5; }
.news-empty .life-heading { display:contents; }
.news-empty .life-heading h2 { font:600 1.06rem var(--serif); }
.news-empty p { margin:0; }
.news-empty .life-heading .nep-textbtn { order:2; margin-left:auto; }

.member-directory { margin:18px 0 34px; }
.directory-controls {
  display:grid; grid-template-columns:minmax(210px,1.5fr) minmax(170px,1fr) repeat(2,minmax(130px,.72fr));
  align-items:end; gap:12px 18px; padding:clamp(14px,2vw,24px); border:1px solid var(--line);
  border-top:3px solid #57735e; border-radius:5px; background:var(--paper);
}
.directory-controls label { display:grid; min-width:0; gap:6px; color:var(--ink); font-size:.9rem; font-weight:650; }
.directory-controls input,.directory-controls select { width:100%; min-width:0; min-height:44px; font-size:1rem; }
.directory-controls .search { display:block; }
.directory-controls .search svg { top:50%; transform:translateY(-50%); }
.directory-results { display:flex; align-items:center; gap:16px; min-height:50px; font-size:.93rem; color:var(--muted); }
.directory-results button { min-height:44px; color:var(--vermilion); }
.directory-generation + .directory-generation { margin-top:26px; }
.directory-generation h3 { display:flex; align-items:center; gap:12px; margin:0 0 11px; color:var(--ink); font:600 1.45rem/1.3 var(--serif); }
.directory-generation h3 small { font:500 .91rem var(--sans); color:var(--muted); white-space:nowrap; }
.directory-generation h3::after { content:""; flex:1; height:1px; background:#d4c7aa; }
.directory-generation .dirlist { grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; }
.member-directory .personrow {
  position:relative; min-width:0; min-height:82px; gap:13px; padding:13px 15px;
  background:var(--paper); border-radius:5px; border-color:#d9d1bc;
}
.member-directory .personrow:hover,.member-directory .personrow:focus-visible { border-color:#778e74; background:#f2f2e6; }
.member-directory .avatar { width:43px; height:43px; outline:1px solid #d9c8a6; outline-offset:2px; }
.member-copy { display:grid; min-width:0; gap:4px; overflow-wrap:anywhere; }
.member-copy strong { color:var(--ink); font:600 1.14rem/1.2 var(--serif); }
.member-copy small { color:var(--muted); font-size:.91rem; line-height:1.35; }
.member-tags { display:flex; flex-wrap:wrap; gap:5px; }
.member-tags span { padding:1px 6px; border-radius:3px; font:600 .78rem/1.5 var(--sans); }
.ancestor-tag { background:#f1e5cd; color:#744b26; }
.memorial-tag { color:#465b50; background:#eaf0e7; }
.directory-empty { padding:22px; border:1px dashed var(--line); border-radius:5px; color:var(--muted); }

.memorial-opening {
  display:grid; grid-template-columns:minmax(0,1fr); margin:22px 0 26px; overflow:hidden;
  border:1px solid #62725b; border-radius:6px; background:#28483d;
}
.memorial-opening:has(.next-memorial) { grid-template-columns:minmax(0,1.15fr) minmax(0,1fr); }
.memorial-opening .remembrance-head {
  position:relative; align-items:flex-start; align-self:center; gap:18px; margin:0; border:0; background:none;
  padding:clamp(22px,3vw,44px); color:#faf4e3;
}
.memorial-opening .remembrance-head h2 { color:inherit; }
.memorial-opening .remembrance-head p { margin-top:12px; color:#e9e8d4; }
.memorial-opening .remembrance-cross { color:#ddc491; font-size:2.75rem; }
.next-memorial {
  display:flex; align-items:center; gap:clamp(14px,2vw,24px); margin:8px; padding:clamp(16px,2.2vw,30px);
  color:var(--ink); background:#fbf5e7; border:1px solid #d9c7a0; outline:1px solid #d8c69b; outline-offset:-5px;
}
.memorial-date { flex:0 0 auto; display:grid; justify-items:center; gap:4px; padding:7px clamp(9px,1.4vw,20px) 7px 0; border-right:1px solid #cfbe9b; }
.memorial-date small,.memorial-date span { color:#6b5640; font-size:.87rem; }
.memorial-date strong { color:#773e2c; font:500 clamp(2.5rem,4vw,3.4rem)/1 var(--serif); }
.memorial-invitation { min-width:0; overflow-wrap:anywhere; }
.memorial-invitation h3 { display:inline; font:600 1rem/1.5 var(--sans); color:#5c604d; }
.memorial-count { display:inline-block; margin:2px 0 4px 6px; padding:2px 7px; color:#763f2d; background:#f1e1c6; border-radius:3px; font-size:.87rem; }
.memorial-invitation .title-link { min-height:44px; color:#433b2d; font:600 clamp(1.25rem,1.8vw,1.57rem)/1.25 var(--serif); }
.memorial-invitation small,.memorial-invitation time { display:block; color:#575f52; font-size:.94rem; }
.memorial-invitation time { margin-top:3px; }
.calendar-download { min-height:44px; }
@media(max-width:900px) {
  .directory-controls { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .directory-generation .dirlist { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media(max-width:720px) {
  .home-almanac,.memorial-opening:has(.next-memorial) { grid-template-columns:minmax(0,1fr); }
  .home-almanac { gap:12px; }
  .memorial-opening .remembrance-head { padding:23px 19px 18px; gap:12px; }
  .next-memorial { margin:0 8px 8px; }
  .family-tools button { min-height:44px; }
}
@media(max-width:550px) {
  .directory-generation .dirlist { grid-template-columns:minmax(0,1fr); }
  .directory-controls { gap:10px; }
  .directory-controls .directory-search,.directory-controls label:has(#branch-filter) { grid-column:1 / -1; }
  .member-directory .personrow { min-height:70px; }
  .directory-generation h3 { font-size:1.32rem; }
  .almanac-date > span { flex-basis:100%; padding:0; border:0; }
}
@media(min-width:370px) and (max-width:420px) {
  .family-tools { grid-template-columns:repeat(3,minmax(0,1fr)); gap:0 4px; }
  .family-tools button { gap:4px; font-size:.875rem; }
}
