:root{
color-scheme:dark;
--ink:#110f0d;
--ink-soft:#171411;
--panel:#1e1a16;
--panel-lift:#28221c;
--paper:#e5d5b4;
--gold:#c3a66c;
--gold-bright:#ddc18a;
--red:#a63736;
--red-bright:#d45c54;
--text:#e6dcc8;
--muted:#938775;
--line:#514533;
--green:#91a889;
--serif:Georgia,"Iowan Old Style",serif;
--sans:Arial,Helvetica,sans-serif;
--mono:"SFMono-Regular",Consolas,monospace;
--ease:cubic-bezier(.16,1,.3,1);
--overshoot:cubic-bezier(.34,1.56,.64,1);
font-family:var(--sans);
background:var(--ink);
color:var(--text);
font-synthesis:none}
*{
box-sizing:border-box}
body{
margin:0;
min-width:320px;
min-height:100vh;
background:radial-gradient(ellipse at 67% 2%,#241c14 0,transparent 35%),var(--ink)}
button,input,select{
font:inherit}
button,a{
-webkit-tap-highlight-color:transparent}
a{
color:inherit;
text-decoration:none}
button{
color:inherit}
.app-shell{
max-width:1600px;
margin:auto;
min-height:100vh}
.masthead{
height:79px;
padding:0 48px;
display:flex;
align-items:center;
justify-content:space-between;
border-bottom:1px solid #332b21;
background:rgba(17,15,13,.85)}
.brand{
display:flex;
align-items:center;
gap:13px}
.brand-mark{
width:35px;
height:35px;
display:grid;
place-items:center;
border:1px solid var(--gold);
color:var(--gold-bright);
background:linear-gradient(145deg,#211b14,#090807);
box-shadow:inset 0 0 0 4px #18120c;
font-size:15px}
.brand strong{
font:600 18px var(--serif);
letter-spacing:.035em;
color:var(--gold-bright);
display:block}
.brand small{
display:block;
font:10px var(--mono);
color:var(--muted);
letter-spacing:.035em;
margin-top:3px}
.masthead-right{
display:flex;
align-items:center;
gap:16px}
.local-badge{
font:9px var(--mono);
letter-spacing:.12em;
color:#b4a88f;
border:1px solid #3d3427;
padding:9px 11px}
.local-badge i,.status-pill i{
display:inline-block;
width:6px;
height:6px;
border-radius:50%;
background:var(--green);
margin-right:7px;
vertical-align:1px;
box-shadow:0 0 9px #91a889}
.icon-button{
border:1px solid #514533;
background:transparent;
color:var(--gold);
font:10px var(--mono);
width:33px;
height:33px;
cursor:pointer}
.layout{
display:grid;
grid-template-columns:255px minmax(0,1fr);
min-height:calc(100vh - 79px)}
.rail{
border-right:1px solid #322a20;
padding:33px 18px 22px 27px;
display:flex;
flex-direction:column;
background:#14110f}
.rail-label,.eyebrow{
font:9px var(--mono);
letter-spacing:.16em;
color:var(--gold);
text-transform:uppercase}
.rail-label{
padding:0 12px 18px;
color:#746955}
.main-nav{
display:grid;
gap:5px}
.nav-link{
display:flex;
align-items:center;
gap:12px;
padding:11px 12px;
border:1px solid transparent;
color:#b8ae9d;
transition:background .18s,border-color .18s}
.nav-link:hover{
background:#211c17;
border-color:#3f3424}
.nav-link.active{
background:#241d15;
border-color:#5b4931;
color:var(--gold-bright)}
.nav-icon{
width:24px;
text-align:center;
color:var(--gold);
font-size:17px}
.nav-link b{
display:block;
font-size:11px;
font-weight:600}
.nav-link small{
display:block;
margin-top:3px;
color:#847968;
font:9px var(--mono)}
.rail-note{
margin:auto 10px 17px;
padding:15px 12px;
border:1px solid #3a3024;
background:linear-gradient(145deg,#1d1914,#15120f);
display:flex;
gap:10px;
align-items:flex-start}
.note-glyph{
color:var(--red-bright);
font-size:16px}
.rail-note p{
margin:1px 0 0;
color:#a69a85;
font:10px/1.8 var(--mono)}
.rail-footer{
padding:13px 10px 0;
border-top:1px solid #30291f;
color:#766d60;
font:8px var(--mono);
letter-spacing:.06em}
.workspace{
padding:37px clamp(24px,5vw,78px) 20px;
max-width:1340px;
width:100%;
margin:0 auto}
.view-heading{
display:flex;
justify-content:space-between;
align-items:center;
margin:0 0 24px}
.view-heading h1{
font:500 clamp(28px,3.2vw,41px) var(--serif);
color:var(--gold-bright);
margin:8px 0 4px;
letter-spacing:.015em}
.view-heading p{
margin:0;
color:#aa9e8a;
font:italic 14px var(--serif)}
.heading-mark{
color:#6f4f2c;
font-size:32px;
margin-right:10px}
.hero-card{
position:relative;
min-height:305px;
padding:34px 39px;
display:flex;
align-items:center;
border:1px solid #6a5334;
background:#201910;
isolation:isolate;
overflow:hidden}
.hero-card:before{
content:"";
position:absolute;
inset:0;
z-index:0;
background:linear-gradient(90deg,#211a13 0%,rgba(33,26,19,.97) 28%,rgba(33,26,19,.78) 46%,rgba(33,26,19,.08) 100%),url('/assets/ledger-archive-hero.png') right center/cover no-repeat}
.hero-copy{
position:relative;
z-index:1;
width:58%}
.hero-copy h2{
font:500 clamp(34px,4vw,51px)/1.08 var(--serif);
color:#e7d5ad;
margin:14px 0 12px}
.hero-copy h2 em{
font-weight:500;
color:var(--gold);
}
.hero-copy p{
font-size:12px;
color:#b4a78e;
max-width:355px;
line-height:1.7;
margin:0 0 20px}
.button{
border:0;
display:inline-flex;
align-items:center;
justify-content:center;
gap:20px;
padding:12px 17px;
font:600 10px var(--mono);
letter-spacing:.025em;
cursor:pointer;
transition:filter .15s,transform .15s}
.button:hover{
filter:brightness(1.15);
transform:translateY(-1px)}
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,summary:focus-visible{
outline:2px solid var(--gold-bright);
outline-offset:3px}
.button-gold{
color:#18130c;
background:linear-gradient(120deg,#c9aa70,#dfc38d);
box-shadow:0 4px 15px #09070588}
.button-gold span{
font-size:14px}
.button-quiet{
color:#d3bd91;
background:#262019;
border:1px solid #655238}
.button-danger{
color:#fff0df;
background:#8c2929;
border:1px solid #bb4842}
.hero-status{
position:absolute;
right:21px;
top:18px;
display:grid;
gap:7px;
justify-items:end;
color:#928675;
font:8px var(--mono)}
.status-pill{
padding:6px 8px;
border:1px solid #5d5037;
background:#18140f;
color:#d4c397;
font:8px var(--mono);
text-transform:uppercase;
letter-spacing:.08em}
.status-pill.sealed i{
background:var(--red-bright)}
.stat-grid{
display:grid;
grid-template-columns:repeat(3,1fr);
gap:12px;
margin:14px 0}
.stat-card{
min-height:102px;
padding:17px 18px;
border:1px solid #453a2b;
background:linear-gradient(140deg,#211c17,#191613)}
.stat-card>span{
display:block;
color:#9a8a70;
font:8px var(--mono);
letter-spacing:.12em}
.stat-card strong{
display:block;
color:#dfc58f;
font:500 24px var(--serif);
margin:11px 0 2px}
.stat-card small{
font:9px var(--mono);
color:#817767}
.stat-card strong.condition{
font:500 19px var(--serif)}
.condition.good{
color:#9bb08f}
.condition.pending{
color:#ca8070}
.content-grid{
display:grid;
grid-template-columns:1fr 1fr;
gap:14px;
margin-top:17px}
.panel{
border:1px solid #3d3327;
background:#171411;
padding:21px 22px}
.section-title{
display:flex;
align-items:center;
justify-content:space-between;
gap:12px;
margin-bottom:15px}
.section-title h2,.form-heading h2{
font:500 20px var(--serif);
color:#dfd0b2;
margin:6px 0 0}
.text-button{
border:0;
background:none;
padding:4px 0;
color:#c7ab70;
font:9px var(--mono);
cursor:pointer}
.text-button:hover{
color:#f0d89c;
text-decoration:underline}
.member-list{
display:grid}
.member-row{
display:flex;
align-items:center;
gap:10px;
padding:11px 0;
border-top:1px solid #332b22;
min-width:0}
.avatar{
flex:0 0 30px;
width:30px;
height:30px;
border:1px solid #715a39;
display:grid;
place-items:center;
color:#d6b87d;
background:linear-gradient(145deg,#302619,#17130f);
font:14px var(--serif)}
.member-name{
display:flex;
flex-direction:column;
min-width:0;
flex:1}
.member-name b{
font:500 12px var(--serif);
color:#ddd0b8;
overflow:hidden;
text-overflow:ellipsis}
.member-name small{
font:8px var(--mono);
color:#827766;
margin-top:3px}
.money{
font:10px var(--mono);
white-space:nowrap}
.money.credit{
color:#87a6b0}
.money.debit{
color:#cf746a}
.money.neutral{
color:#aa9b81}
.empty-state{
text-align:center;
padding:23px 12px 20px;
color:#9a8b75;
border:1px dashed #393023;
background:#14120f}
.empty-state>span{
display:block;
color:#725b35;
font-size:22px;
margin-bottom:6px}
.empty-state b{
font:500 13px var(--serif);
color:#d0c0a1}
.empty-state p{
font-size:10px;
color:#8f8473;
line-height:1.6;
margin:6px auto 10px;
max-width:280px}
.event-list{
display:grid}
.event-row{
display:flex;
align-items:flex-start;
gap:10px;
padding:12px 0;
border-top:1px solid #332b22}
.event-icon{
flex:0 0 25px;
width:25px;
height:25px;
display:grid;
place-items:center;
color:#c5a769;
background:#251f17;
border:1px solid #4c402c}
.event-copy{
display:grid;
gap:5px;
color:#b7aa92;
font-size:10px;
line-height:1.5}
.event-copy b{
color:#e1d3b7;
font-weight:600}
.event-copy small{
color:#817666;
font:8px var(--mono)}
.compact .event-row{
padding:9px 0}
.closing-strip{
margin-top:15px;
padding:16px 18px;
display:flex;
align-items:center;
justify-content:space-between;
gap:20px;
border:1px solid #393026;
background:#171411}
.closing-strip b{
display:block;
font:500 13px var(--serif);
color:#dfd0b2;
margin-top:6px}
.closing-strip p{
margin:5px 0 0;
color:#897f6e;
font:9px var(--mono)}
.sealed-banner{
display:flex;
gap:12px;
align-items:center;
margin:16px 0;
padding:15px;
border:1px solid #654237;
background:#211714}
.sealed-banner>span{
font-size:22px;
color:var(--red-bright)}
.sealed-banner b{
font:500 14px var(--serif);
color:#ddc6a3}
.sealed-banner p{
font:9px var(--mono);
color:#988777;
margin:5px 0 0}
.feature-card{
min-height:125px;
display:flex;
align-items:center;
gap:18px;
padding:20px 24px;
border:1px solid #55452e;
background:linear-gradient(110deg,#272019,#1b1713 75%);
margin-bottom:14px;
position:relative}
.feature-symbol{
width:56px;
height:56px;
flex:0 0 56px;
display:grid;
place-items:center;
border:1px solid #846a3e;
color:#d5b776;
background:#120f0c;
font-size:25px}
.feature-symbol.feature-illustrated{
width:74px;
height:74px;
flex:0 0 74px;
border:0;
background:transparent}
.chamber-art{
display:block;
width:100%;
height:100%;
object-fit:contain;
filter:drop-shadow(0 5px 9px #0009)}
.feature-card h2{
font:500 19px var(--serif);
color:#e1d2b2;
margin:6px 0}
.feature-card p{
max-width:560px;
font-size:10px;
line-height:1.7;
color:#a89c88;
margin:0}
.coming-tag{
margin-left:auto;
align-self:flex-start;
padding:6px 7px;
border:1px solid #51432f;
color:#aa9160;
font:8px var(--mono);
letter-spacing:.07em;
white-space:nowrap}
.form-panel{
border:1px solid #4d402d;
background:#1b1713;
padding:23px 25px;
margin:14px 0}
.form-heading{
display:flex;
justify-content:space-between;
align-items:center;
margin-bottom:17px}
.form-index{
color:#766a58;
font:9px var(--mono)}
.field-grid{
display:grid;
grid-template-columns:repeat(2,minmax(0,1fr));
gap:14px}
.field-grid label,.inline-form>label{
display:grid;
gap:7px;
color:#b8aa92;
font:10px var(--mono)}
input,select,textarea{
width:100%;
height:40px;
padding:0 11px;
color:#e3d7c0;
background:#100e0c;
border:1px solid #514431;
border-radius:0;
outline:none}
input:focus,select:focus,textarea:focus{
border-color:#c4a76b;
box-shadow:0 0 0 2px #c4a76b26}
input::placeholder{
color:#665e52}
.field-hint{
color:#8b7651;
margin-left:5px}
.beneficiary-fieldset{
border:1px solid #403629;
padding:12px 13px 13px;
margin:17px 0}
.beneficiary-fieldset legend{
padding:0 7px;
color:#b8aa92;
font:10px var(--mono)}
.check-grid{
display:flex;
gap:9px;
flex-wrap:wrap}
.check-row{
display:flex;
align-items:center;
gap:7px;
padding:8px 10px;
border:1px solid #44392b;
background:#15120f;
color:#cbbd9f;
font:10px var(--sans);
cursor:pointer}
.check-row input{
width:13px;
height:13px;
accent-color:#bea06a}
.custom-shares{
display:grid;
grid-template-columns:repeat(auto-fit,minmax(145px,1fr));
gap:10px;
margin:0 0 15px}
.custom-title{
grid-column:1/-1;
color:#baaa8d;
font:9px var(--mono)}
.custom-shares label{
display:grid;
gap:6px;
color:#b8aa92;
font:9px var(--mono)}
.form-footer{
display:flex;
justify-content:space-between;
align-items:center;
gap:15px;
padding-top:14px;
border-top:1px solid #392f24}
.form-footer p{
max-width:470px;
margin:0;
color:#8e8473;
font:9px/1.6 var(--mono)}
.inline-form small{
display:block;
color:#837868;
font:8px var(--mono);
margin-top:8px}
.inline-form{
padding:18px 20px}
.input-row{
display:flex;
gap:10px}
.input-row input{
max-width:350px}
.list-panel,.history-panel,.balances-panel{
margin-top:14px}
.count{
color:#93856f;
font:9px var(--mono)}
.full-list .member-row{
padding:13px 3px}
.expense-list{
display:grid}
.expense-row{
display:flex;
flex-wrap:wrap;
align-items:center;
gap:11px;
border-top:1px solid #352d23;
padding:13px 2px}
.row-icon{
width:31px;
height:31px;
display:grid;
place-items:center;
background:#272117;
border:1px solid #584a32;
color:#c6a86c;
font-size:18px;
flex:0 0 31px}
.payment-icon{
color:#8da9a5}
.expense-meta{
display:grid;
gap:5px;
flex:1;
min-width:0}
.expense-meta b{
font:500 12px var(--serif);
color:#ded0b3;
overflow:hidden;
text-overflow:ellipsis}
.expense-meta small{
font:8px/1.5 var(--mono);
color:#837968}
.duplicate-notice{
display:grid;
gap:4px;
padding:9px 11px;
border-left:2px solid #c58f52;
background:#241c13;
color:#e2bd83}
.duplicate-notice b{font:9px var(--mono)}
.duplicate-notice small{color:#b4a085}
.expense-row>strong{
font:10px var(--mono);
white-space:nowrap;
color:#d4bd87}
.expense-review{
flex:1 1 100%;
min-width:0;
margin-left:42px;
padding-top:4px;
display:grid;
gap:9px;
color:#a99b84;
font:9px/1.55 var(--mono)}
.expense-review>p,.dispute-note{margin:0}
.expense-review button,.expense-review summary{font-size:9px}
.expense-dispute summary{cursor:pointer;color:#c6a86c;min-height:24px;display:inline-flex;align-items:center}
.discrepancy-form,.resolution-form{display:grid;gap:8px;margin-top:8px;max-width:520px}
.discrepancy-form label,.resolution-form label{display:grid;gap:5px}
.discrepancy-form textarea,.resolution-form textarea{min-height:64px;resize:vertical}
.dispute-note{padding:8px;border-left:2px solid #8b7045;background:#19150f}
.expense-review [role=alert]{color:#e0a298}
.expense-review button:disabled{opacity:.6;cursor:wait}
.commitment-list{display:grid;gap:12px;margin-top:16px}
.commitment-row{display:grid;grid-template-columns:1fr auto;align-items:center;gap:8px 14px;border-top:1px solid #352d23;padding:13px 2px;color:#d4c5a8}
.commitment-row>div:first-child{display:grid;gap:5px;min-width:0}
.commitment-row small{color:#837968;font:8px/1.5 var(--mono)}
.commitment-row>strong{font:10px var(--mono);white-space:nowrap;color:#d4bd87}
.commitment-refund-form,.commitment-actions{grid-column:1/-1;display:flex;align-items:end;flex-wrap:wrap;gap:8px}
.commitment-refund-form label{display:grid;gap:5px;min-width:180px;color:#a99b84;font:9px var(--mono)}
.commitment-refund-form input{max-width:220px}
.commitment-row [role=alert]{flex-basis:100%;color:#e0a298;font:9px var(--mono)}
.empty-inline{color:#a99b84;font:10px/1.6 var(--mono)}
.budget-list{display:grid;gap:10px;margin-top:16px}
.budget-row{display:grid;grid-template-columns:minmax(130px,1fr) minmax(100px,2fr) auto;align-items:center;gap:10px;border-top:1px solid #352d23;padding:12px 2px}
.budget-row>div{display:grid;gap:5px}
.budget-row small{color:#837968;font:8px/1.5 var(--mono)}
.budget-row strong{font:9px var(--mono);white-space:nowrap;color:#d4bd87}
.budget-row progress{width:100%;height:8px;accent-color:#c3a66c}
.honesty-note,.calculation-note{
display:flex;
align-items:flex-start;
gap:10px;
padding:12px;
border:1px solid #53432d;
background:#18140f;
margin-top:16px}
.honesty-note>span,.calculation-note>span{
width:17px;
height:17px;
display:grid;
place-items:center;
flex:0 0 17px;
color:#16110a;
background:#c5a76c;
font:bold 10px var(--serif)}
.honesty-note p,.calculation-note p{
margin:0;
color:#a99b84;
font:9px/1.6 var(--mono)}
.honesty-note b{
color:#d7c397}
.full-events .event-row{
padding:14px 3px}
.verdict-paper{
position:relative;
max-width:760px;
margin:0 auto 17px;
padding:26px 40px 23px;
color:#211c15;
background:repeating-linear-gradient(0deg,#d6c4a1 0,#d6c4a1 30px,#c7b58f 31px,#d6c4a1 32px);
border:8px solid #2a2117;
outline:1px solid #79623d;
box-shadow:0 12px 35px #0008;
text-align:center}
.paper-seal{
width:40px;
height:40px;
display:grid;
place-items:center;
margin:-2px auto 13px;
border-radius:50%;
background:#16120e;
border:1px solid #9e7d46;
color:#d6b86e;
font-size:18px}
.paper-eyebrow{
font:8px var(--mono);
letter-spacing:.17em;
color:#6b5635}
.verdict-paper h2{
font:600 32px var(--serif);
margin:5px 0 3px;
color:#1b1712}
.paper-subtitle{
margin:0;
color:#574731;
font:italic 12px var(--serif)}
.paper-rule{
height:1px;
background:#84704c;
margin:16px 0}
.paper-section-title{
text-align:left;
font:600 17px var(--serif);
margin:0 0 10px}
.transfer-list{
display:grid;
gap:8px}
.transfer-row{
display:grid;
grid-template-columns:35px 1fr auto;
align-items:center;
gap:8px;
padding:10px 12px;
border:1px solid #ab9871;
background:#dfcfadcc;
text-align:left}
.transfer-num{
font:9px var(--mono);
color:#654f2e}
.transfer-row span:nth-child(2){
display:flex;
align-items:center;
gap:8px;
flex-wrap:wrap;
font:12px var(--serif)}
.transfer-row small{
color:#786443;
font:italic 10px var(--serif)}
.transfer-row strong{
font:12px var(--mono);
color:#75592a}
.paper-foot{
margin:0;
color:#574a34;
font:italic 10px var(--serif)}
.paper-empty{
color:#63543d;
font:italic 12px var(--serif)}
.balanced-result{
padding:14px}
.balanced-result span{
display:block;
color:#6e5931;
font-size:24px}
.balanced-result h3{
font:600 18px var(--serif);
margin:7px}
.balanced-result p{
font:italic 11px var(--serif);
color:#64543c}
.balance-grid{
display:grid;
grid-template-columns:repeat(2,minmax(0,1fr));
gap:0 20px}
.balance-grid .member-row{
padding:13px 3px}
.method-tag{
color:#8e7b56;
font:8px var(--mono);
border:1px solid #443a2b;
padding:6px}
.calculation-note{
max-width:760px;
margin:14px auto 0}
.page-footer{
margin-top:24px;
padding:12px 0;
border-top:1px solid #2c251d;
display:flex;
align-items:center;
justify-content:space-between;
color:#665e51;
font:8px var(--mono);
letter-spacing:.07em}
.page-footer b{
color:#ac8c54}
.confirm-dialog{
width:min(480px,calc(100% - 28px));
padding:30px;
border:1px solid #80623d;
background:#211b15;
color:var(--text);
box-shadow:0 25px 70px #000b}
.confirm-dialog::backdrop{
background:#050403c9;
backdrop-filter:blur(3px)}
.confirm-dialog h2{
font:500 27px var(--serif);
color:#e2cea5;
margin:8px 0}
.confirm-dialog p{
font-size:11px;
line-height:1.8;
color:#a99b85}
.dialog-close{
position:absolute;
right:12px;
top:8px;
border:0;
background:none;
color:#a69882;
font-size:22px;
cursor:pointer}
.archive-note{
padding:10px;
border:1px solid #55442d;
background:#17130f;
color:#ccb78b;
font:9px/1.6 var(--mono)}
.dialog-actions{
display:flex;
justify-content:flex-end;
gap:9px;
margin-top:19px}
.storage-error{
margin:20px;
padding:20px;
border:1px solid #a24338;
background:#251512;
color:#f0c8b9;
font:12px/1.7 var(--mono)}
.toast{
position:fixed;
right:22px;
bottom:20px;
max-width:min(420px,calc(100% - 44px));
padding:12px 15px;
border:1px solid #78623e;
background:#211b14;
color:#e1c990;
box-shadow:0 7px 25px #0008;
font:10px/1.5 var(--mono);
opacity:0;
transform:translateY(8px);
pointer-events:none;
transition:.2s}
.toast.visible{
opacity:1;
transform:translateY(0)}


@media(max-width:900px){
.masthead{
padding:0 24px}
.layout{
grid-template-columns:205px minmax(0,1fr)}
.rail{
padding:25px 12px 18px}
.workspace{
padding:30px 24px 18px}
.hero-card{
padding:27px}
.content-grid{
grid-template-columns:1fr}
.hero-copy{
width:66%}
}

@media(max-width:650px){
.masthead{
height:65px;
padding:0 16px}
.brand strong{
font-size:15px}
.brand small{
font-size:8px}
.local-badge{
font-size:7px;
padding:7px}
.layout{
display:block;
min-height:calc(100vh - 65px)}
.rail{
position:sticky;
top:0;
z-index:5;
border-right:0;
border-bottom:1px solid #3a3024;
padding:0;
background:#14110f}
.rail-label,.rail-note,.rail-footer{
display:none}
.main-nav{
display:flex;
overflow-x:auto;
gap:0;
scrollbar-width:none}
.main-nav::-webkit-scrollbar{
display:none}
.nav-link{
flex:0 0 auto;
gap:6px;
padding:10px 12px;
border:0;
border-bottom:2px solid transparent}
.nav-link.active{
border:0;
border-bottom:2px solid var(--gold);
background:#1d1812}
.nav-icon{
font-size:14px;
width:17px}
.nav-link b{
font-size:9px;
white-space:nowrap}
.nav-link small{
display:none}
.workspace{
padding:24px 16px 16px}
.view-heading{
margin-bottom:18px}
.view-heading h1{
font-size:30px}
.view-heading p{
font-size:12px}
.heading-mark{
font-size:23px}
.hero-card{
min-height:280px;
padding:24px}
.hero-card:before{
background:linear-gradient(90deg,rgba(33,26,19,.98) 0%,rgba(33,26,19,.90) 45%,rgba(33,26,19,.30) 100%),url('/assets/ledger-archive-hero.png') 70% center/cover no-repeat}
.hero-copy{
width:76%}
.hero-copy h2{
font-size:37px}
.hero-copy p{
max-width:230px;
font-size:10px}
.hero-status{
top:10px;
right:10px}
.stat-grid{
gap:7px}
.stat-card{
padding:12px 10px;
min-height:90px}
.stat-card>span{
font-size:7px;
line-height:1.4}
.stat-card strong{
font-size:17px;
margin:9px 0 3px}
.stat-card strong.condition{
font-size:14px}
.stat-card small{
font-size:8px}
.panel{
padding:17px 15px}
.section-title h2,.form-heading h2{
font-size:18px}
.field-grid{
grid-template-columns:1fr}
.form-panel{
padding:19px 15px}
.form-footer{
align-items:flex-start;
flex-direction:column}
.form-footer .button{
align-self:stretch}
.feature-card{
gap:12px;
padding:15px;
align-items:flex-start}
.feature-symbol{
width:43px;
height:43px;
flex-basis:43px;
font-size:20px}
.feature-card h2{
font-size:17px}
.feature-card p{
font-size:9px}
.coming-tag{
position:absolute;
right:10px;
bottom:10px;
font-size:6px}
.verdict-paper{
padding:22px 14px 18px;
border-width:5px}
.verdict-paper h2{
font-size:27px}
.transfer-row{
grid-template-columns:24px 1fr;
gap:5px;
padding:9px}
.transfer-row strong{
grid-column:2}
.transfer-row span:nth-child(2){
font-size:11px}
.balance-grid{
grid-template-columns:1fr}
.closing-strip{
align-items:flex-start;
flex-direction:column}
.closing-strip .button{
width:100%}
.page-footer{
font-size:7px;
gap:10px}
.page-footer .text-button{
font-size:7px}
.input-row{
flex-direction:column}
.input-row input{
max-width:none}
.input-row .button{
justify-content:space-between}
}

@media(prefers-reduced-motion:reduce){
*,*::before,*::after{
scroll-behavior:auto!important;
transition:none!important;
animation:none!important}
}

.recurring-list{
display:grid;
gap:12px}
.recurring-row{
display:grid;
grid-template-columns:minmax(0,1fr) minmax(150px,auto) minmax(220px,1fr);
align-items:center;
gap:16px;
padding:16px;
border:1px solid var(--line);
background:rgba(255,255,255,.018)}
.recurring-row>div:first-child,.recurring-periods{
display:grid;
gap:6px}
.recurring-row small{
color:var(--muted)}
.recurring-instance-form{
display:flex;
align-items:end;
gap:10px}
.recurring-instance-form label{
display:grid;
gap:6px;
flex:1;
color:var(--muted);
font-size:10px}
.recurring-instance-form input,.recurring-instance-form select{
min-width:0;
width:100%}
@media(max-width:850px){
.recurring-row{grid-template-columns:1fr}
.recurring-instance-form{align-items:stretch;flex-direction:column}}

.agreement-form{
display:grid;
gap:14px}
.agreement-form>label{
display:grid;
gap:7px}
.agreement-form textarea{
min-height:68px;
resize:vertical}
.agreement-list{
display:grid;
gap:10px}
.agreement-list article{
padding:15px;
border:1px solid var(--line)}
.agreement-list p{
margin:8px 0;
white-space:pre-wrap}
.agreement-list small{
color:var(--muted)}

.forgiveness-list{
display:grid;
gap:12px}
.forgiveness-form{
display:grid;
grid-template-columns:repeat(2,minmax(0,1fr));
align-items:end;
gap:12px;
padding:16px;
border:1px solid var(--line)}
.forgiveness-form>b,.forgiveness-form>small,.forgiveness-form output{
grid-column:1/-1}
.forgiveness-form label{
display:grid;
gap:6px;
color:var(--muted);
font-size:10px}
.forgiveness-form input{width:100%}
@media(max-width:650px){.forgiveness-form{grid-template-columns:1fr}}

.member-row { flex-wrap: wrap; }
.balance-breakdown { flex-basis: 100%; grid-column: 1 / -1; width: 100%; margin-top: .75rem; text-align: left; }
.balance-breakdown summary { cursor: pointer; color: var(--gold, #d4b478); font-size: .85rem; }
.balance-breakdown p { font-size: .8rem; line-height: 1.6; opacity: .8; }
.balance-breakdown ol { list-style: none; margin: 1rem 0; padding: 0; }
.balance-breakdown li, .balance-total { display: flex; justify-content: space-between; gap: 1rem; padding: .75rem 0; border-top: 1px solid rgba(160, 140, 110, .2); }
.balance-breakdown li > span { min-width: 0; }
.balance-breakdown small, .balance-references { display: block; font-size: .75rem; margin-top: .35rem; }
.balance-references a { color: inherit; overflow-wrap: anywhere; }
.balance-breakdown strong { white-space: nowrap; font-size: .85rem; }
.event-row:focus { outline: 2px solid #d4b478; outline-offset: 4px; }

.evidence-thumb{
display:block;
margin-top:8px}
.evidence-thumb img{
display:block;
width:100%;
max-width:260px;
height:auto;
border:1px solid #403629;
border-radius:6px;
background:#171411}
#receipt-note{
flex:1 1 220px;
min-width:0}
#receipt-proposal{
white-space:pre-wrap;
overflow-wrap:anywhere;
max-width:100%;
margin:10px 0 0;
color:#b8aa92;
font-size:13px;
line-height:1.55}

@media(max-width:650px){
.expense-row>.expense-meta{min-width:calc(100% - 42px)}
.expense-row>.button{flex:1 1 100%;width:100%;margin-top:4px}
.text-button{padding:14px 0;min-height:44px}}


/* The Witness Knot visual system: the existing palette stays the source of truth. */
body{position:relative;background:radial-gradient(ellipse at 67% 2%,#241c14 0,transparent 35%),var(--ink)}
body::before{
content:"";
position:fixed;
inset:0;
z-index:0;
pointer-events:none;
opacity:.34;
background-image:repeating-linear-gradient(91deg,rgba(229,213,180,.022) 0 1px,transparent 1px 13px),repeating-linear-gradient(0deg,transparent 0 27px,rgba(195,166,108,.018) 27px 28px,transparent 28px 53px)}
.app-shell{position:relative;z-index:1}
#toast{z-index:20}
.symbol-bank{position:absolute;width:0;height:0;overflow:hidden}
.brand-mark{
width:44px;height:44px;display:grid;place-items:center;flex:0 0 44px;
border:0;background:none;box-shadow:none;
filter:drop-shadow(0 0 10px rgba(195,166,108,.14))}
.brand-mark svg{display:block;width:44px;height:44px}
.brand strong{font:600 27px var(--serif);letter-spacing:.015em}
.seal-thread{stroke:var(--red-bright);stroke-width:2}
.nav-icon{
display:block;flex:0 0 26px;width:26px;height:26px;padding:2px;
color:#b99b63;border:1px solid rgba(129,103,59,.45);
background:linear-gradient(145deg,rgba(195,166,108,.07),rgba(17,15,13,.72));
stroke:currentColor;stroke-width:1.35;stroke-linecap:round;stroke-linejoin:round;
transition:transform .18s ease,color .18s ease,border-color .18s ease}
.nav-icon use{stroke:currentColor}
.nav-icon{fill:none}
.nav-link{position:relative;transition:background .18s,border-color .18s,color .18s,transform .18s}
.nav-link:hover .nav-icon{transform:translateY(-1px);color:var(--gold-bright);border-color:#8b7048}
.nav-link.active{box-shadow:inset 2px 0 0 var(--red)}
.nav-link.active .nav-icon{color:var(--gold-bright);border-color:#967849}
.heading-mark{
display:block;flex:0 0 46px;width:46px;height:46px;margin-right:4px;
padding:5px;color:#8b7046;opacity:.88;stroke:currentColor;stroke-width:1.2;stroke-linecap:round;stroke-linejoin:round;
border:1px solid rgba(129,103,59,.35);background:radial-gradient(circle at 50% 50%,rgba(195,166,108,.08),transparent 72%)}
.heading-mark use{stroke:currentColor}
.heading-mark[data-stamp]{
opacity:0;transform:rotate(-14deg) scale(2.1);
transition:opacity 480ms var(--ease),transform 760ms var(--overshoot)}
.view-heading [data-build-in]{opacity:0;transform:translateY(22px);transition:opacity 560ms var(--ease),transform 700ms var(--ease)}
.view-heading.on .heading-mark[data-stamp]{opacity:.88;transform:rotate(0deg) scale(1)}
.view-heading.on [data-build-in]{opacity:1;transform:none}
@media(prefers-reduced-motion:reduce){
.heading-mark[data-stamp],.view-heading [data-build-in]{transition:none!important}
}

.rail[hidden]{display:none}
.layout:has(.rail[hidden]){grid-template-columns:1fr}
.room-code-panel{border-color:#8b7048;background:linear-gradient(145deg,rgba(195,166,108,.08),transparent 55%),var(--panel)}
.room-code-display{display:flex;align-items:center;gap:16px;margin:10px 0}
.room-code-display strong{
font:600 30px var(--mono);letter-spacing:.06em;color:var(--gold-bright);
font-variant-numeric:tabular-nums lining-nums;font-feature-settings:"tnum" 1,"lnum" 1}
.hero-card{box-shadow:inset 0 0 0 1px rgba(229,213,180,.05),0 14px 40px rgba(0,0,0,.12)}
.hero-card::after{
content:"";position:absolute;inset:10px;z-index:0;pointer-events:none;
border:1px solid rgba(229,213,180,.13);
box-shadow:inset 0 0 24px rgba(8,7,6,.12)}
.stat-card,.panel,.form-panel,.feature-card{
box-shadow:inset 0 0 0 1px rgba(229,213,180,.025)}
.panel{background:linear-gradient(155deg,rgba(229,213,180,.018),transparent 52%),#171411}
.stat-card{border-top-color:#695637;background:linear-gradient(145deg,#211c17,#181512 75%)}
.feature-card{border-color:#695638;background:linear-gradient(110deg,rgba(195,166,108,.07),transparent 46%),linear-gradient(110deg,#272019,#1b1713 75%)}
.feature-symbol.feature-illustrated{
border:1px solid rgba(195,166,108,.44);
background:radial-gradient(circle,#2b2115,#100e0c 73%);
box-shadow:inset 0 0 0 4px rgba(17,15,13,.66)}
.chamber-art{filter:drop-shadow(0 5px 9px #000b) saturate(.88)}
.feature-card p{font-size:11px;line-height:1.65}
.button{transition:filter .15s,transform .15s,box-shadow .15s}
.button:active{transform:translateY(1px) scale(.985);filter:brightness(.96)}
.button-gold:active{box-shadow:inset 0 2px 5px rgba(17,15,13,.28)}
.button-danger:active{box-shadow:inset 0 0 0 2px rgba(229,213,180,.22)}
.local-badge{background:rgba(229,213,180,.018)}
.money,.stat-card strong,.expense-row>strong,.transfer-row strong,.budget-row strong,.commitment-row>strong,.balance-breakdown strong{
font-variant-numeric:tabular-nums lining-nums;
font-feature-settings:"tnum" 1,"lnum" 1}
.money{font-size:12px;letter-spacing:.015em}
.money.credit{color:var(--green)}
.money.debit{color:var(--red-bright)}
.money.neutral{color:var(--paper)}
.stat-card strong{font-size:clamp(19px,2.1vw,27px)}
.expense-row>strong{font-size:12px;color:var(--paper)}
.transfer-row strong{font-size:13px}
.verdict-paper{
background-color:var(--paper);
background-image:linear-gradient(135deg,rgba(255,255,255,.14),transparent 42%)
}
.empty-state>span{margin-bottom:9px}
.empty-mark{width:30px;height:30px;display:block;margin:auto;color:#9a7a47;stroke:currentColor;stroke-width:1.25;stroke-linecap:round;stroke-linejoin:round}
.empty-mark .seal-thread{stroke:var(--red)}
.confirm-dialog[open]{animation:dialog-arrive .2s ease-out both}
@keyframes dialog-arrive{from{opacity:0;transform:translateY(5px) scale(.99)}to{opacity:1;transform:translateY(0) scale(1)}}
@media(max-width:650px){
.brand-mark{width:36px;height:36px;flex-basis:36px}
.brand-mark svg{width:36px;height:36px}
.nav-icon{width:21px;height:21px;flex-basis:21px;padding:1px}
.nav-link{min-height:43px}
.heading-mark{width:34px;height:34px;flex-basis:34px;padding:3px}
.money{font-size:11px}
.stat-card strong{font-size:clamp(17px,4.8vw,21px)}
}

.transfer-row{background:var(--paper)}

@media(prefers-reduced-motion:reduce){
.view-heading,.confirm-dialog[open]{animation:none}
.nav-icon,.nav-link,.button{transition:none}
.nav-link:hover .nav-icon{transform:none}
.button:active{transform:none}
}

/* ------------------------------------------------------------------ */
/* Atmosphere and motion. Everything here is decorative: amounts are   */
/* never animated, and the global reduced-motion rule above disables   */
/* every keyframe and transition in this block. Entrance keyframes use */
/* `both` fill with a neutral resting state so content stays visible   */
/* when animation is turned off.                                       */
/* ------------------------------------------------------------------ */

/* Lamp light behind smoked glass: two warm pools that drift slowly. */
body::after{
content:"";
position:fixed;
inset:-20%;
z-index:0;
pointer-events:none;
background:
radial-gradient(42% 34% at 70% 8%,rgba(195,166,108,.16),transparent 70%),
radial-gradient(38% 42% at 12% 92%,rgba(166,55,54,.10),transparent 72%),
radial-gradient(60% 50% at 50% 50%,transparent 55%,rgba(5,4,3,.55) 100%);
animation:lamp-drift 22s ease-in-out infinite alternate;
will-change:transform}
@keyframes lamp-drift{
0%{transform:translate3d(0,0,0) scale(1)}
50%{transform:translate3d(-2.5%,1.5%,0) scale(1.05)}
100%{transform:translate3d(1.5%,-2%,0) scale(1.02)}}

/* Dust motes rising through the lamp light. */
.motes{position:fixed;inset:0;z-index:0;pointer-events:none;overflow:hidden}
.mote{
position:absolute;
left:var(--x);
bottom:-6px;
width:var(--s,3px);
height:var(--s,3px);
border-radius:50%;
background:radial-gradient(circle,#f1e2bd,rgba(221,193,138,0) 70%);
opacity:0;
animation:mote-rise var(--d,16s) linear infinite;
animation-delay:var(--delay,0s)}
@keyframes mote-rise{
0%{opacity:0;transform:translate3d(0,0,0)}
12%{opacity:.55}
60%{opacity:.35}
100%{opacity:0;transform:translate3d(var(--sway,18px),-105vh,0)}}

/* The reader's own lamp: a soft pool that follows the pointer. */
.lamp{
position:fixed;
left:0;top:0;
width:640px;height:640px;
margin:-320px 0 0 -320px;
z-index:3;
pointer-events:none;
border-radius:50%;
background:radial-gradient(circle,rgba(221,193,138,.085),rgba(221,193,138,.025) 40%,transparent 68%);
mix-blend-mode:screen;
opacity:0;
transition:opacity .6s var(--ease);
will-change:transform}
.lamp.on{opacity:1}

/* Brand and rail life. */
.brand-mark{animation:brand-breathe 5.5s ease-in-out infinite}
@keyframes brand-breathe{
0%,100%{filter:drop-shadow(0 0 8px rgba(195,166,108,.12))}
50%{filter:drop-shadow(0 0 16px rgba(221,193,138,.32))}}
.brand:hover .brand-mark{animation-duration:1.8s}
.local-badge i{animation:pulse-dot 2.6s ease-out infinite}
@keyframes pulse-dot{
0%{box-shadow:0 0 0 0 rgba(145,168,137,.55),0 0 9px #91a889}
70%{box-shadow:0 0 0 7px rgba(145,168,137,0),0 0 9px #91a889}
100%{box-shadow:0 0 0 0 rgba(145,168,137,0),0 0 9px #91a889}}
.note-glyph{animation:glyph-ember 4s ease-in-out infinite}
@keyframes glyph-ember{
0%,100%{color:var(--red);text-shadow:none}
50%{color:#e8746d;text-shadow:0 0 10px rgba(212,92,84,.55)}}
.nav-link{overflow:hidden}
.nav-link::after{
content:"";
position:absolute;
inset:0;
pointer-events:none;
background:linear-gradient(100deg,transparent 35%,rgba(221,193,138,.10) 50%,transparent 65%);
transform:translateX(-120%);
transition:transform .6s var(--ease)}
.nav-link:hover::after{transform:translateX(120%)}
.nav-link:hover .nav-icon{transform:translateY(-1px) rotate(-6deg) scale(1.08)}
.nav-link.active .nav-icon{animation:icon-breathe 3.4s ease-in-out infinite}
@keyframes icon-breathe{
0%,100%{box-shadow:0 0 0 0 rgba(221,193,138,0)}
50%{box-shadow:0 0 14px 0 rgba(221,193,138,.28)}}
.nav-link.active{animation:nav-settle .5s var(--overshoot) both}
@keyframes nav-settle{from{transform:translateX(-4px)}to{transform:none}}
.icon-button{transition:color .25s,border-color .25s,transform .4s var(--overshoot)}
.icon-button:hover{color:var(--gold-bright);border-color:var(--gold)}
.icon-button.flip{animation:flip-badge .55s var(--ease)}
@keyframes flip-badge{
0%{transform:rotateY(0)}
50%{transform:rotateY(90deg);color:transparent}
100%{transform:rotateY(0)}}

/* Metallic type: title and hero line catch the light as it passes. */
.view-heading h1,.hero-copy h2{
background:linear-gradient(100deg,#c9aa70 0%,#f3e5c2 38%,#c3a66c 52%,#e7d5ad 70%,#c9aa70 100%);
background-size:220% 100%;
-webkit-background-clip:text;
background-clip:text;
-webkit-text-fill-color:transparent;
animation:text-sheen 9s linear infinite}
@keyframes text-sheen{from{background-position:120% 0}to{background-position:-120% 0}}

/* Chamber arrival: sections rise in order, and a light leak crosses the page. */
.workspace{overflow:clip}
#view{position:relative}
#view.staged>:not(.view-heading){
animation:chamber-rise .72s var(--ease) both;
animation-delay:calc(var(--i,0)*80ms + 90ms)}
#view.settled>:not(.view-heading){animation:settle-in .32s var(--ease) both}
@keyframes chamber-rise{
from{opacity:0;transform:translateY(26px) scale(.985);filter:blur(5px)}
60%{filter:blur(0)}
to{opacity:1;transform:none;filter:none}}
@keyframes settle-in{from{opacity:.55}to{opacity:1}}
#view.staged::after{
content:"";
position:absolute;
inset:-30px -40px;
z-index:4;
pointer-events:none;
background:linear-gradient(100deg,transparent 38%,rgba(243,229,194,.07) 49%,rgba(243,229,194,.11) 50%,rgba(243,229,194,.07) 51%,transparent 62%);
animation:light-leak 1.1s var(--ease) both}
@keyframes light-leak{from{transform:translateX(-110%)}to{transform:translateX(110%)}}

/* Lists arrive one entry after another. */
#view.staged :is(.member-row,.event-row,.expense-row,.commitment-row,.budget-row,.recurring-row,.agreement-list article,.transfer-row){
animation:row-in .5s var(--ease) both;
animation-delay:calc(var(--i,0)*45ms + 240ms)}
.balance-breakdown li{animation:row-in .5s var(--ease) both;animation-delay:calc(var(--i,0)*45ms)}
@keyframes row-in{from{opacity:0;transform:translateX(-10px)}to{opacity:1;transform:none}}
.member-row,.event-row,.expense-row,.commitment-row,.budget-row,.recurring-row{
position:relative;
transition:background .35s var(--ease),transform .35s var(--ease)}
.member-row::before,.event-row::before,.expense-row::before,.commitment-row::before,.budget-row::before{
content:"";
position:absolute;
left:-10px;top:12px;bottom:12px;
width:2px;
background:linear-gradient(180deg,transparent,var(--gold-bright),transparent);
opacity:0;
transform:scaleY(.3);
transition:opacity .35s var(--ease),transform .45s var(--overshoot)}
.member-row:hover,.event-row:hover,.expense-row:hover,.commitment-row:hover,.budget-row:hover{
background:linear-gradient(90deg,rgba(229,213,180,.035),transparent 70%);
transform:translateX(3px)}
.member-row:hover::before,.event-row:hover::before,.expense-row:hover::before,.commitment-row:hover::before,.budget-row:hover::before{
opacity:1;transform:scaleY(1)}
.avatar,.event-icon,.row-icon{transition:transform .45s var(--overshoot),box-shadow .35s,color .35s,border-color .35s}
.member-row:hover .avatar,.event-row:hover .event-icon,.expense-row:hover .row-icon{
transform:rotate(-5deg) scale(1.08);
color:var(--gold-bright);
border-color:#a7884f;
box-shadow:0 0 14px rgba(221,193,138,.22)}
/* A row that was just written: ink darkens at its edge and settles. */
.event-row.fresh,.expense-row.fresh,.member-row.fresh{animation:ink-settle 1.4s var(--ease) both}
@keyframes ink-settle{
0%{background:linear-gradient(90deg,rgba(221,193,138,.22),transparent 60%);box-shadow:inset 3px 0 0 var(--gold-bright)}
100%{background:transparent;box-shadow:inset 3px 0 0 transparent}}

/* Cards: a pool of light follows the pointer, and the edges catch gold. */
.stat-card,.panel,.form-panel,.feature-card,.hero-card,.closing-strip,.sealed-banner,.room-code-panel{
position:relative;
transition:border-color .45s var(--ease),box-shadow .5s var(--ease),transform .5s var(--ease)}
.stat-card::after,.panel::after,.form-panel::after,.feature-card::after,.closing-strip::after,.sealed-banner::after{
content:"";
position:absolute;
inset:0;
z-index:0;
pointer-events:none;
opacity:0;
transition:opacity .45s var(--ease);
background:radial-gradient(320px circle at var(--mx,50%) var(--my,50%),rgba(221,193,138,.13),rgba(221,193,138,.04) 45%,transparent 70%)}
.stat-card:hover::after,.panel:hover::after,.form-panel:hover::after,.feature-card:hover::after,.closing-strip:hover::after,.sealed-banner:hover::after{opacity:1}
.stat-card>*,.panel>*,.form-panel>*,.feature-card>*,.closing-strip>*,.sealed-banner>*{position:relative;z-index:1}
.stat-card:hover,.feature-card:hover,.panel:hover,.form-panel:hover{
border-color:#8b7048;
box-shadow:inset 0 0 0 1px rgba(229,213,180,.05),0 18px 40px -18px rgba(0,0,0,.8),0 0 0 1px rgba(195,166,108,.08)}
.stat-card,.feature-card{transform-style:preserve-3d;will-change:transform}
.stat-card.tilt,.feature-card.tilt{transition:border-color .45s var(--ease),box-shadow .5s var(--ease),transform .08s linear}
#view.staged .stat-card strong{animation:ink-in .9s var(--ease) both;animation-delay:.35s}
@keyframes ink-in{from{opacity:0;letter-spacing:.12em;filter:blur(6px)}to{opacity:1;letter-spacing:normal;filter:none}}
.hero-card::before{animation:hero-drift 34s ease-in-out infinite alternate;transform-origin:70% 50%;will-change:transform}
@keyframes hero-drift{from{transform:scale(1)}to{transform:scale(1.07) translate3d(-1.2%,.6%,0)}}
.hero-card:hover{border-color:#8b7048;box-shadow:inset 0 0 0 1px rgba(229,213,180,.08),0 24px 60px -20px rgba(0,0,0,.9)}
.hero-status{transition:transform .5s var(--ease)}
.hero-card:hover .hero-status{transform:translateY(-2px)}
.chamber-art{animation:art-float 6.5s ease-in-out infinite;transition:transform .6s var(--overshoot),filter .6s}
@keyframes art-float{0%,100%{translate:0 0}50%{translate:0 -4px}}
.feature-card:hover .chamber-art{transform:rotate(-4deg) scale(1.08);filter:drop-shadow(0 10px 18px #000c) saturate(1)}
.feature-symbol.feature-illustrated{transition:box-shadow .6s,border-color .6s}
.feature-card:hover .feature-symbol.feature-illustrated{border-color:var(--gold);box-shadow:inset 0 0 0 4px rgba(17,15,13,.66),0 0 26px rgba(221,193,138,.22)}
.empty-mark{animation:art-float 6.5s ease-in-out infinite}
.empty-state{transition:border-color .4s,background .4s}
.empty-state:hover{border-color:#6a5334;background:#171411}

/* Buttons: brass with a passing sheen, and a felt press. */
.button{position:relative;overflow:hidden;isolation:isolate}
.button::after{
content:"";
position:absolute;
inset:0;
z-index:-1;
background:linear-gradient(100deg,transparent 30%,rgba(255,255,255,.28) 50%,transparent 70%);
transform:translateX(-130%) skewX(-12deg);
transition:transform .7s var(--ease)}
.button:hover::after{transform:translateX(130%) skewX(-12deg)}
.button-gold::after{animation:idle-sheen 5.5s var(--ease) infinite}
@keyframes idle-sheen{0%,70%{transform:translateX(-130%) skewX(-12deg)}100%{transform:translateX(130%) skewX(-12deg)}}
.button-gold:hover{box-shadow:0 6px 22px rgba(201,170,112,.28),0 4px 15px #09070588}
.button:hover{transform:translateY(-2px)}
.button:active{transform:translateY(1px) scale(.97);transition-duration:.08s}
.button span{display:inline-block;transition:transform .4s var(--overshoot)}
.button:hover span{transform:translate(3px,-2px)}
.text-button{position:relative;transition:color .25s}
.text-button::after{
content:"";
position:absolute;
left:0;right:0;bottom:1px;
height:1px;
background:currentColor;
transform:scaleX(0);
transform-origin:right;
transition:transform .4s var(--ease)}
.text-button:hover{text-decoration:none}
.text-button:hover::after{transform:scaleX(1);transform-origin:left}

/* Inputs: the line under the pen warms when it is picked up. */
input,select,textarea{transition:border-color .3s var(--ease),box-shadow .3s var(--ease),background .3s,transform .3s var(--ease)}
input:focus,select:focus,textarea:focus{
background:#141110;
box-shadow:0 0 0 2px #c4a76b26,0 8px 24px -14px rgba(201,170,112,.5);
transform:translateY(-1px)}
.check-row{transition:border-color .3s,background .3s,transform .3s var(--ease)}
.check-row:hover{border-color:#8b7048;background:#1a1612;transform:translateY(-1px)}
.check-row:has(input:checked){border-color:var(--gold);background:linear-gradient(145deg,rgba(195,166,108,.12),transparent 60%),#15120f}
.balance-breakdown summary{transition:color .25s,letter-spacing .4s var(--ease)}
.balance-breakdown summary:hover{color:var(--gold-bright);letter-spacing:.02em}
details[open]>*:not(summary){animation:settle-in .4s var(--ease) both}

/* The verdict paper unfolds, the seal presses, the transfers are written. */
.verdict-paper{transform-origin:50% 0}
#view.staged .verdict-paper{animation:paper-unfold 1s var(--ease) both;animation-delay:.1s}
@keyframes paper-unfold{
from{opacity:0;transform:perspective(1200px) rotateX(-14deg) translateY(28px)}
to{opacity:1;transform:perspective(1200px) rotateX(0) translateY(0)}}
.paper-seal{box-shadow:0 2px 0 #0003}
#view.staged .paper-seal{animation:seal-press .7s var(--overshoot) both;animation-delay:.55s}
@keyframes seal-press{
from{opacity:0;transform:rotate(-16deg) scale(2.3)}
60%{opacity:1;transform:rotate(2deg) scale(.94)}
to{opacity:1;transform:none}}
.transfer-row{transition:transform .35s var(--ease),box-shadow .35s;animation-delay:calc(var(--i,0)*90ms + .9s)}
.transfer-row:hover{transform:translateX(4px);box-shadow:-3px 0 0 var(--red),0 6px 16px -10px #0008}
.balanced-result span{display:inline-block}
#view.staged .balanced-result span{animation:seal-press .8s var(--overshoot) both;animation-delay:.8s}
.paper-rule{transform-origin:left}
#view.staged .paper-rule{animation:rule-draw .9s var(--ease) both;animation-delay:.6s}
@keyframes rule-draw{from{transform:scaleX(0)}to{transform:scaleX(1)}}

/* Toast: a note slides in, and its time drains along a gold thread. */
.toast{
transform:translateY(14px) scale(.98);
transition:opacity .35s var(--ease),transform .5s var(--overshoot);
overflow:hidden;
padding-left:38px}
.toast::before{
content:"";
position:absolute;
left:12px;top:50%;
width:16px;height:16px;
margin-top:-8px;
border-radius:50%;
background:radial-gradient(circle at 40% 35%,#d45c54,#7d2a28 70%);
box-shadow:inset 0 0 0 2px rgba(241,226,189,.25),0 0 10px rgba(212,92,84,.35)}
.toast::after{
content:"";
position:absolute;
left:0;bottom:0;
height:2px;width:100%;
background:linear-gradient(90deg,var(--gold-bright),var(--gold));
transform:scaleX(0);
transform-origin:left}
.toast.visible::after{animation:toast-drain 3.5s linear both}
@keyframes toast-drain{from{transform:scaleX(1)}to{transform:scaleX(0)}}

/* Dialog: the room darkens before the question is asked. */
.confirm-dialog[open]{animation:dialog-arrive .42s var(--overshoot) both}
@keyframes dialog-arrive{from{opacity:0;transform:translateY(18px) scale(.96)}to{opacity:1;transform:none}}
.confirm-dialog[open]::backdrop{animation:backdrop-in .5s ease-out both}
@keyframes backdrop-in{from{opacity:0}to{opacity:1}}

/* The seal imprint shown when a ledger is archived. */
.seal-imprint{
position:fixed;
inset:0;
z-index:30;
display:grid;
place-items:center;
pointer-events:none;
background:radial-gradient(circle at 50% 50%,rgba(17,15,13,.35),transparent 60%);
animation:imprint-fade 1.3s var(--ease) both}
.seal-imprint svg{width:min(42vw,220px);height:auto;animation:imprint-press .5s var(--overshoot) both;filter:drop-shadow(0 16px 30px rgba(0,0,0,.7))}
@keyframes imprint-press{from{opacity:0;transform:rotate(-14deg) scale(2.2)}55%{opacity:1;transform:rotate(1deg) scale(.96)}to{opacity:1;transform:none}}
@keyframes imprint-fade{0%,55%{opacity:1}100%{opacity:0}}

/* Status pills and tags carry a faint life of their own. */
.status-pill{transition:border-color .3s,box-shadow .3s}
.hero-card:hover .status-pill{border-color:#8b7048;box-shadow:0 0 12px rgba(221,193,138,.14)}
.coming-tag{transition:color .3s,border-color .3s}
.feature-card:hover .coming-tag{color:var(--gold-bright);border-color:#8b7048}
.sealed-banner>span{animation:glyph-ember 4s ease-in-out infinite}

/* Masthead and rail settle once when the app opens. */
.masthead{animation:masthead-in .9s var(--ease) both}
@keyframes masthead-in{from{opacity:0;transform:translateY(-10px)}to{opacity:1;transform:none}}
.rail{animation:rail-in .9s var(--ease) both;animation-delay:.12s}
@keyframes rail-in{from{opacity:0;transform:translateX(-10px)}to{opacity:1;transform:none}}

@media(max-width:650px){
.lamp{display:none}
.member-row:hover,.event-row:hover,.expense-row:hover,.commitment-row:hover,.budget-row:hover{transform:none}
.rail{animation:none}
}
@media(hover:none){
.stat-card::after,.panel::after,.form-panel::after,.feature-card::after{display:none}
}
