/* SPIRITARY 2026 UI system — compact, modern, mobile-first. */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;450;500;550;600;650;700;750;800&display=swap');
:root{
 --paper:#f6f6f7;--white:#fff;--ink:#171a1f;--muted:#7a8780;
 --line:#e8eaec;--sage:#e9ebef;--sage-dark:#303d50;--rose:#f2e5e2;
 --gold:#ad9977;--radius:17px;--shadow:0 14px 55px rgba(20,46,32,.045);
 --ui-accent:#324258;--ui-sub:#6d747e;--ui-radius:16px;
}
*{scrollbar-color:#ced0d4 transparent}
body,button,input,select,textarea{font-family:Inter,ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;letter-spacing:-.017em}
body{background:var(--paper);font-size:13.5px;line-height:1.48;color:var(--ink);-webkit-font-smoothing:antialiased}
h1,h2,h3,h4,.page-title,.serif,.brandword,.quote,.reqnum,.stat b,.person-info h3,.timeline-year-marker span,.profile-title h1,
.rest-result h3,.rest-map-title h2,.life-chronology h3{
 font-family:Inter,ui-sans-serif,system-ui,sans-serif!important;letter-spacing:-.048em!important;font-weight:650!important;
}
h1{font-size:clamp(27px,3.3vw,40px);line-height:1.15}
h2{font-size:20px;line-height:1.25}h3{font-size:15px}
p{color:#717883;line-height:1.55}
.eyebrow,.tiny-label{font-family:inherit;font-size:10px;letter-spacing:.09em;font-weight:700;color:#717883}
button,button.btn,input,textarea,select{transition:background .15s,border-color .15s,box-shadow .15s,transform .15s}
button:focus-visible,a:focus-visible{outline:2px solid #364964;outline-offset:3px}
.btn{border-radius:11px;min-height:39px;padding:10px 15px;font-size:12.5px;font-weight:650;border-color:#e0e2e5;box-shadow:none}
.btn.primary{background:#2f3e54;border-color:#2f3e54;color:white}
.btn.dark{background:#191d23;border-color:#191d23}
.btn.tiny{padding:7px 11px;font-size:11.5px;min-height:32px}
.btn:hover{filter:none;background:#f4f5f6;border-color:#d0d3d7}
.btn.primary:hover{background:#243041;border-color:#243041}
.card{border-radius:17px;padding:23px;border:1px solid #e6e8ea;box-shadow:0 3px 14px rgba(22,42,24,.015)}
.wrap{max-width:1200px;padding-top:29px}
.pagehead{margin-bottom:20px}.pagehead h1{margin:7px 0 0}.pagehead p{display:none}
.rail{width:246px;padding:20px 12px;background:#fff;border-color:#edeef0}
.rail .brand{padding:10px 18px 30px}
.rail .brand img{max-width:165px}
.nav-list{gap:3px}
.nav-item{font-size:13px;border-radius:12px;min-height:46px;padding:11px 16px;color:#6f7782}
.nav-item .ico{font-size:19px;width:22px}
.nav-item.active{background:#ebeef1;color:#313f54}
.nav-item:hover:not(.active){background:#f6f7f8;color:#3d4249}
.rail-bottom{padding:13px 3px 8px}
.topbar{height:67px;background:#f6f6f7;padding:0 clamp(18px,4vw,45px)}
.page-title{font-size:17px}
.search{border-radius:12px;background:#fff}
.hero{grid-template-columns:1.35fr .75fr;gap:15px}
.hero-left,.hero-right{border-radius:18px;padding:29px;min-height:240px}
.hero-left{background:linear-gradient(125deg,#e9ebed 0%,#eff1f3 100%)}
.hero-left:after,.hero-right:after,.person-art:after,.profile-cover:after,.landing-hero .illustration{display:none!important}
.hero-right{background:#313944}
.hero-left h1{font-size:clamp(29px,3.4vw,40px)}
.hero-right h2{font-size:23px}
.statbar{gap:11px;margin:17px 0}
.stat{border-radius:15px;padding:19px}
.stat b{font-size:28px}
.stat small{font-size:11px}
.sectionhead{margin:28px 0 13px}
.sectionhead h2{font-size:17px}
.grid-cards{gap:12px}
.person-card{border-radius:16px;box-shadow:none}
.person-art{height:98px;font-size:34px;background:#dde0e5}
.person-info{padding:14px}
.person-info h3{font-size:14px}
.person-info small{font-size:11px}
.profile-main{border-radius:17px;margin-bottom:14px}
.profile-cover{min-height:140px;background:linear-gradient(135deg,#dfe2e6,#e8e9eb)}
.profile-details{padding:0 22px 18px;gap:16px;margin-top:-45px}
.profile-portrait{width:88px;height:88px;flex:0 0 88px;border-radius:22px;border-width:4px;font-size:30px}
.profile-title{padding-top:48px}
.profile-title h1{font-size:24px!important;margin-bottom:2px}
.profile-title p{font-size:11px}
.profile-actions .btn{min-height:35px}
.tabs{border-color:#e9eaec;gap:14px;padding:0 23px;overflow-x:auto}
.tab{white-space:nowrap;padding:14px 10px;font-size:12px;font-weight:650}
.tab.active{border-color:#313f54;color:#313f54}
.profile-layout{gap:14px}
.stack{gap:14px}
.card.profile-resting-card{margin-top:14px}
.timeline-life-entry{background:white;padding:17px;border:1px solid #e6e8ea;border-radius:13px}
.timeline-life-entry h3{font-size:17px}
.timeline-year-marker span{font-size:12px!important;padding:7px 12px!important;border-radius:11px}
.timeline-photo-item{border-radius:12px}
.timeline-key-date{background:#f3f4f6}
.requirements{gap:12px}
.req{border-radius:14px;min-height:71px;padding:17px;gap:13px}
.req:hover{border-color:#d1d5db}
.reqnum{font-size:14px!important;color:#8d939c}
.reqname{font-size:13px}
.req .chev{font-size:20px}
.pill{font-size:10px;font-weight:650;border-radius:8px;padding:5px 9px}
.info-line{grid-template-columns:minmax(80px,36%) 1fr;gap:10px;padding:12px 0;border-color:#edeef0}
.info-line dt{font-size:11px}
.info-line dd{font-size:12px}
.modal{border-radius:21px;max-width:540px;padding:29px;box-shadow:0 28px 95px #1b1f243b}
.modal h2{font-size:22px;padding-right:30px}
.modal .eyebrow{font-size:10px}
.modal .close{background:#f2f2f3}
.field{gap:7px;margin:15px 0}
.field label{font-size:11px;font-weight:700;color:#5b6169}
.field input,.field textarea,.field select{font-size:13px;border:1px solid #e1e3e6;background:#f9f9fa;border-radius:11px;min-height:43px;padding:11px 12px}
.field textarea{min-height:85px}
.field input:focus,.field textarea:focus,.field select:focus{background:#fff;border-color:#5d6c81;box-shadow:0 0 0 3px rgba(70,140,89,.1)}
.form-actions{margin-top:17px}
.auth-card{border-radius:19px;box-shadow:none;padding:27px}
.auth-card h1{font-size:28px}
.auth-wrap{min-height:calc(100vh - 90px)}
.public-app{background:#f7f7f8}
.public-header{height:66px;background:#fff}
.public-header .spiritary-logo{max-width:164px}
.public-search>input{border-radius:12px}
.public-footer{border-color:#edeef0;padding:16px}
.landing{padding-top:25px}
.landing-header{margin-bottom:22px}
.landing-hero{border-radius:18px;min-height:300px;grid-template-columns:1fr;padding:40px;max-width:100%}
.landing-hero h1{max-width:720px;font-size:clamp(34px,5.5vw,60px)}
.landing-features{gap:11px;margin-top:12px}
.landing-features .card{padding:23px}
.landing-features h2{font-size:17px}
.empty{border-radius:16px;padding:35px 20px}
.empty .symbol{font-size:26px}
.mem-card{border:1px solid #e1e4e8;background:#fff}
.mem-title h2{font-size:21px}
.mem-title .eyebrow{color:#354760}
.mem-stats strong{font-size:22px}
.mem-details summary{font-size:12px}
.mem-actions .btn{flex:0 1 auto}
.mem-payment{font:500 13px/1.6 Inter,system-ui;border-radius:13px}
.rest-list-panel,.rest-map-column,.rest-toolbar{border-radius:16px}
.rest-result h3{font-size:14px!important}
.rest-list-header{padding:14px 17px}
.rest-toolbar input,.rest-toolbar select{border-radius:11px}
@media(max-width:1060px){.rail{width:210px;padding:15px 9px}.wrap{padding-left:24px;padding-right:24px}}
@media(max-width:750px){
 .wrap{padding:20px 14px calc(110px + env(safe-area-inset-bottom))}
 .topbar{height:55px;padding:0 15px}.topbar .page-title{font-size:16px}
 .hero{grid-template-columns:1fr}
 .hero-left,.hero-right{padding:22px;min-height:175px}
 .hero-left h1{font-size:30px}
 .hero-right h2{font-size:22px}
 .stat{padding:14px}
 .grid-cards{gap:9px}
 .person-art{height:80px}
 .person-info{padding:10px}
 .person-info h3{font-size:12px}
 .pagehead h1{font-size:27px}
 .profile-cover{min-height:115px}
 .profile-details{padding:0 15px 16px}
 .profile-title{padding-top:44px}
 .profile-title h1{font-size:21px!important}
 .profile-portrait{width:74px;height:74px;flex-basis:74px}
 .tabs{justify-content:space-evenly;padding:0 8px}
 .tab{padding:13px 11px}
 .mobile-nav{height:calc(68px + env(safe-area-inset-bottom));box-shadow:0 -5px 25px rgba(18,48,26,.025);border-color:#eaebec}
 .mobile-nav button{font-size:10px;gap:3px}
 .mobile-nav button span{font-size:20px}
 .card{padding:19px 17px}
 .modal{top:auto;left:0;right:0;bottom:0;transform:none;max-height:92dvh;width:100%;max-width:none;border-radius:24px 24px 0 0;padding:25px 19px calc(24px + env(safe-area-inset-bottom))}
 .auth-card{padding:23px}
 .requirements{gap:9px}
 .req{padding:13px;min-height:74px}
 .reqname{font-size:11.5px}
 .public-header{padding:0 15px;gap:9px}
 .public-header .spiritary-logo{max-width:130px}
 .landing{padding:15px}
 .landing-hero{padding:29px;min-height:230px}
 .landing-hero h1{font-size:32px}
 .landing-features{grid-template-columns:1fr}
 .mem-stats strong{font-size:19px}
}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;transition:none!important;animation:none!important}}

/* Conditional, humanized death details in person editor */
.deceased-details[hidden]{display:none!important}
.deceased-details{margin:19px 0 4px;padding:15px 17px 6px;background:#f6f6f7;border:1px solid #e5e7e9;border-radius:16px}
.deceased-details .field{margin:9px 0 15px}
.deceased-details select{appearance:auto;max-width:100%;background-color:#fff}
@media(max-width:560px){.deceased-details{padding:11px 12px 2px}}

.cause-of-death-row dd strong{display:block;font-weight:700}
.cause-of-death-row .death-detail{display:block;font-size:12px;color:#6f7680;margin-top:5px;font-weight:400;line-height:1.4}

.death-cause-inline{display:block;margin-top:4px;font:inherit;color:inherit}

/* Profile banner and identity are separate, consistently aligned rows. */
.profile-cover{min-height:205px}
.profile-cover-image{object-fit:cover;object-position:center 38%;opacity:.86;filter:none}
.profile-details{margin-top:0!important;align-items:center!important;padding:17px 22px 20px!important;gap:16px!important;min-height:104px}
.profile-portrait{margin:0!important;width:90px;height:90px;flex:0 0 90px;border:2px solid #fff;border-radius:20px}
.profile-title{padding:0!important;min-width:0;display:flex;flex-direction:column;justify-content:center;align-self:center}
.profile-title h1{margin:0 0 5px!important;line-height:1.2}
.profile-title p{line-height:1.45;overflow-wrap:anywhere}
.profile-actions{align-self:center}
@media(max-width:750px){
 .profile-cover{min-height:160px}
 .profile-details{padding:14px 15px 17px!important;gap:13px!important;min-height:96px}
 .profile-portrait{width:72px;height:72px;flex-basis:72px;border-radius:17px}
 .profile-title{flex:1 1 0}
 .profile-actions:empty{display:none}
 .profile-actions:not(:empty){width:auto;flex:0 0 auto}
}
