@font-face{font-family:Instrument;src:url("./assets/instrument-sans-latin-wght-normal.woff2") format("woff2");font-weight:400 700;font-display:swap}
@font-face{font-family:Archivo;src:url("./assets/archivo-latin-standard-normal.woff2") format("woff2");font-weight:400 900;font-display:swap}
@font-face{font-family:JetBrains;src:url("./assets/jetbrains-mono-latin-500-normal.woff2") format("woff2");font-weight:500;font-display:swap}
:root{color-scheme:dark;--ink:#0b0a14;--panel:#16132a;--lift:#1e1a36;--line:#30294e;--text:#faf8ff;--muted:#b0a8ca;--paper:#ece7f6;--pencil:#3a3358;--purple:#bd94ff;--pink:#f08cce;--green:#91dcbe;--title:Archivo,system-ui,sans-serif;--mono:JetBrains,monospace}
*{box-sizing:border-box}
[hidden]{display:none!important}
body{margin:0;background:var(--ink);color:var(--text);font:16px/1.5 Instrument,system-ui,sans-serif}
button,input,select{font:inherit}
button,a,input,select{-webkit-tap-highlight-color:transparent}
a{color:inherit}
button{cursor:pointer}
button:disabled{cursor:wait;opacity:.6}
:focus-visible{outline:3px solid var(--pink);outline-offset:3px}
h1,h2,p{margin:0}
h1,h2{font-family:var(--title);letter-spacing:-.045em;line-height:1.04}
h2{font-size:1.5rem}
small{font-size:.8125rem}
.sr-only{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
[data-icon]{display:inline-flex;flex:none;align-items:center;justify-content:center;line-height:1}
svg{width:19px;height:19px;display:block}
.top{border-bottom:1px solid var(--line)}
.top-inner,main{width:min(1144px,calc(100% - 64px));margin:auto}
.top-inner{min-height:76px;display:flex;align-items:center;justify-content:space-between;gap:12px}
.brand{display:inline-flex;gap:12px;align-items:center;text-decoration:none;line-height:1.08}
.brand img{object-fit:contain}
.brand strong{display:block;font:750 1.17rem var(--title);letter-spacing:-.045em}
.brand small{color:var(--muted);font:500 .68rem var(--mono);letter-spacing:.09em}
.top-actions,.hero-actions,.photo-actions,.dialog-actions{display:flex;gap:10px;align-items:center;flex-wrap:wrap}
.primary,.secondary,.quiet,.danger,.icon-button,.csv-button{min-height:44px;border-radius:8px;border:1px solid transparent;padding:8px 14px;display:inline-flex;align-items:center;justify-content:center;gap:8px;line-height:1.18;font-weight:700;text-decoration:none;color:var(--text);background:transparent}
.primary{background:linear-gradient(104deg,#ad71ef,#f184c6);color:#1a1029}
.secondary,.quiet,.icon-button{border-color:var(--line)}
.quiet{font-size:.875rem;color:var(--muted)}
.primary:hover{filter:brightness(1.12)}
.secondary:hover,.quiet:hover,.icon-button:hover,.csv-button:hover{background:rgba(171,140,241,.12);color:var(--text)}
.danger{color:#ffb1c0;border-color:#75384e}
.danger:hover{background:#452539}
.icon-button{padding:8px;min-width:44px}
main{padding:34px 0 0;display:grid;grid-template-columns:minmax(0,1.74fr) minmax(295px,1fr);column-gap:18px}
main>.hero{grid-area:1/1}
main>.summary{grid-area:1/2}
main>.review{grid-area:2/1/3/-1}
main>.vault{grid-area:3/1/4/-1}
main>.notice{grid-area:4/1/5/-1}
main>footer{grid-area:5/1/6/-1}
.hero,.summary{border:1px solid var(--line);border-radius:16px;background:var(--panel)}
.hero{position:relative;overflow:hidden;display:grid;grid-template-columns:minmax(0,1fr) 226px;align-items:center;min-height:338px;padding:39px 36px;background-color:#18132c;background-image:linear-gradient(90deg,rgba(207,177,255,.055) 1px,transparent 1px),linear-gradient(rgba(207,177,255,.055) 1px,transparent 1px),radial-gradient(ellipse at 85% 48%,#3f265d,transparent 67%);background-size:25px 25px,25px 25px,auto}
.hero-copy{position:relative;z-index:1}
.eyebrow,.summary-caption,.receipt-meta,.category,.art,.vault-head p{font-family:var(--mono)}
.eyebrow{display:flex;align-items:center;gap:7px;font-size:.7rem;letter-spacing:.12em;color:var(--purple);margin-bottom:16px}
.eyebrow svg{width:15px;height:15px}
.hero h1{font-size:clamp(2.85rem,5vw,4.65rem);font-weight:850;max-width:7.4ch}
.hero p{color:#c8bedf;max-width:31ch;margin:14px 0 22px}
.hero .secondary{background:#211b39;border-color:#52446d}
.hero .secondary:hover{background:#34274e}
.art{position:relative;height:235px;width:188px;justify-self:center;margin-right:5px;color:#372950;pointer-events:none;transform:scale(1.2)}
.paper,.ghost{position:absolute;top:30px;left:36px;width:120px;height:170px;border-radius:4px}
.ghost{border:1px dashed #9175c9;transform:translate(-30px,14px) rotate(-14deg)}
.paper{background:var(--paper);transform:rotate(11deg);padding:16px 14px;clip-path:polygon(0 0,100% 0,100% 100%,94% 96%,88% 100%,82% 96%,76% 100%,70% 96%,64% 100%,58% 96%,52% 100%,46% 96%,40% 100%,34% 96%,28% 100%,22% 96%,16% 100%,10% 96%,5% 100%,0 96%)}
.paper span{font:850 1.5rem/1 var(--title);letter-spacing:-.06em}
.paper span.paper-dot{color:#a33593}
.paper small{display:block;font:500 .52rem var(--mono);letter-spacing:.09em;margin:6px 0 11px}
.paper i{display:block;width:92%;height:3px;border-radius:2px;background:#b6a9cc;margin:5px 0}
.paper i:nth-of-type(2){width:65%}
.paper-rule{border-top:1px dashed #8f7da9;margin:9px 0 6px}
.paper b{font-size:.77rem}
.barcode{margin-top:7px;width:70%;height:13px;background:repeating-linear-gradient(90deg,#514363 0 1px,transparent 1px 3px,#514363 3px 5px,transparent 5px 8px)}
.art-corner{position:absolute;width:17px;height:17px;border-color:#b594ea;border-style:solid}
.art-corner.one{left:1px;top:15px;border-width:1px 0 0 1px}
.art-corner.two{right:7px;bottom:11px;border-width:0 1px 1px 0}
.scan-line{position:absolute;z-index:1;left:1px;right:7px;top:53%;height:1px;background:#e99ddc;box-shadow:0 0 10px 2px #e0389855;opacity:.75}
.summary{padding:23px 22px;display:flex;flex-direction:column;background:var(--paper);color:#221936;border-color:#e5def1}
.summary-head{display:flex;align-items:center;justify-content:space-between;gap:8px}
.summary-head h2{font-size:1.25rem}
select,input{min-height:44px;border:1px solid var(--line);border-radius:8px;color:var(--text);background:#100e20;padding:8px 11px;min-width:0}
select{appearance:none;padding-right:36px;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14'%3E%3Cpath d='m3 5 4 4 4-4' fill='none' stroke='%23b0a8ca' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 12px center}
#summary-year{font:500 .75rem var(--mono);color:#584472;background:#f8f4fd;border:1px solid #d6c9e8;border-radius:6px;padding:6px 8px;white-space:nowrap}
.money{font:850 clamp(1.9rem,3.25vw,2.85rem)/1.1 var(--title);letter-spacing:-.055em;margin:12px 0 4px;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
.summary-caption{color:#5b4a72;font-size:.74rem}
.breakdown{display:grid;gap:8px;margin:16px 0 10px}
.bar-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:3px 10px;font-size:.875rem;color:#3a2a54}
.bar-row strong{font-weight:600;font-variant-numeric:tabular-nums}
.bar{grid-column:1/-1;height:5px;background:#d9cee8;border-radius:7px;overflow:hidden}
.bar i{display:block;height:100%;border-radius:inherit;background:#753dcc}
.bar-row:nth-child(2) i{background:#b4428d}
.bar-row:nth-child(3) i{background:#277963}
.csv-button{margin-top:auto;justify-content:flex-start;padding-left:0;color:#5f2c9b;font-size:.875rem;min-height:44px}
.summary .csv-button:hover{color:#442075;background:#e1d6f0}
.summary :focus-visible{outline-color:#6428a0}
.csv-button svg{width:16px;height:16px}
.vault{margin-top:34px}
.vault-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:16px}
.vault-head h2{font-size:1.9rem}
.vault-head p{color:var(--muted);font-size:.74rem;margin-top:5px}
.manual svg{width:16px;height:16px}
.vault-filters{display:grid;grid-template-columns:minmax(0,1fr) 190px auto;gap:10px;margin-bottom:12px}
.search{display:flex;align-items:center;gap:8px;border:1px solid var(--line);border-radius:8px;background:#100e20;padding-left:12px;color:var(--muted)}
.search input{flex:1;background:transparent;border:none;padding-left:0;width:100%}
.search:focus-within{outline:2px solid var(--pink);outline-offset:2px}
.search input:focus-visible{outline:none}
input::placeholder{color:#a39cbf;opacity:1}
.receipt-list{border:1px solid var(--line);border-radius:12px;overflow:hidden;background:#121022}
.receipt{width:100%;min-height:72px;display:grid;text-align:left;align-items:center;grid-template-columns:42px minmax(0,1fr) minmax(112px,.34fr) minmax(90px,.34fr);gap:13px;padding:11px 16px;border:none;background:transparent;color:var(--text)}
.receipt+.receipt{border-top:1px solid var(--line)}
.receipt:hover{background:var(--lift)}
.receipt:focus-visible{outline-offset:-4px}
.receipt-thumb{width:40px;height:40px;border-radius:8px;background:#271d40;color:var(--purple);display:grid;place-items:center}
.receipt-name{display:block;overflow-wrap:anywhere;font-weight:700}
.receipt-meta{display:block;color:var(--muted);font-size:.71rem;margin-top:2px}
.category{justify-self:start;font-size:.67rem;color:#dfc5ff;border:1px solid #4a3864;background:#231a38;border-radius:5px;padding:3px 7px}
.receipt-amount{justify-self:end;white-space:nowrap;font-weight:700;font-variant-numeric:tabular-nums}
.empty{padding:24px;color:var(--muted)}
.notice{display:flex;gap:11px;align-items:flex-start;margin:18px 0 0;padding:15px 16px;background:#181427;color:#c9bedf;border:1px solid var(--line);border-radius:9px;font-size:.875rem}
.notice strong{color:var(--text)}
.notice svg{margin-top:2px}
footer{color:var(--muted);display:flex;justify-content:space-between;gap:12px;padding:23px 0;font-size:.8125rem}
dialog{padding:0;border:1px solid #5e4c7d;border-radius:14px;background:var(--panel);color:var(--text);width:min(535px,calc(100% - 26px));max-height:calc(100% - 26px);overflow:auto}
dialog::backdrop{background:rgba(8,6,16,.78)}
#editor{width:min(745px,calc(100% - 26px))}
.dialog-head{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:16px 20px;border-bottom:1px solid var(--line)}
.dialog-content{padding:18px 20px}
.dialog-content p+p{margin-top:10px}
.dialog-actions{justify-content:flex-end;margin-top:14px}
#receipt-form>.dialog-actions{padding:10px 20px 17px;background:var(--panel);border-top:1px solid var(--line)}
#delete{margin-right:auto}
.editor-body{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.25fr);gap:16px;padding:16px 20px 8px}
.photo-panel{background:#100e20;min-width:0;border:1px solid var(--line);border-radius:8px;padding:10px;align-self:start}
.photo-panel img{display:block;width:100%;max-height:310px;object-fit:contain;border-radius:4px}
.photo-zoom{position:relative;display:block;width:100%;padding:0;border:0;background:transparent;color:var(--text)}
.zoom-icon{position:absolute;right:6px;bottom:6px;display:grid;place-items:center;background:#211738;border:1px solid #6a5587;border-radius:8px;width:34px;height:34px}
#photo-dialog{width:min(810px,calc(100% - 26px));background:#100e20}
#enlarged-photo{display:block;width:100%;height:auto}
.photo-panel p{color:var(--muted);padding:12px 0}
.photo-actions{margin-top:8px}
.editor-fields{display:grid;gap:10px}
.editor-fields label{display:grid;gap:4px;font-size:.875rem;font-weight:650;min-width:0}
.editor-fields input,.editor-fields select{width:100%;font-size:1rem}
.split{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.scan p,.editor-note{color:var(--muted);font-size:.875rem}
.scan p:not(:empty){margin-top:5px}
.scan:has(button[hidden]):has(p:empty){display:none}
.error{color:#ffb1c0;margin:3px 20px;font-size:.875rem}
#camera-video{width:100%;max-height:52vh;object-fit:contain;background:#0b0a14;border-radius:8px}
.toast{position:fixed;z-index:5;bottom:max(16px,env(safe-area-inset-bottom));right:16px;background:var(--paper);color:#2d2345;box-shadow:0 8px 35px #0b0a14;max-width:calc(100vw - 32px);padding:12px 17px;border-radius:8px;font-weight:700}
.review{margin-top:20px;background:#19132b;border:1px solid #543774;border-radius:14px;overflow:hidden}
.review-head{display:flex;align-items:center;gap:12px;padding:13px 16px}
.review-head h2{font-size:1.19rem}
.review-head p{color:var(--muted);font-size:.875rem;margin-top:3px}
#review-list{display:grid}
.review-row{display:flex;justify-content:space-between;align-items:center;gap:12px;min-height:58px;width:100%;padding:10px 16px;text-align:left;color:var(--text);background:#130f22;border:0;border-top:1px solid var(--line)}
.review-row:hover{background:#29203e}
.review-row:focus-visible{outline-offset:-4px}
.review-description{display:grid;overflow-wrap:anywhere}
.review-description small{color:var(--muted)}
.review-link{color:var(--purple);font-weight:700}
@media(max-width:900px){.hero{padding:27px;grid-template-columns:minmax(0,1fr) 132px}.art{transform:scale(.8);transform-origin:right center;margin-right:0}}
@media(max-width:715px){.top-inner,main{width:calc(100% - 32px)}main{padding-top:16px}.top-inner{min-height:65px}.hero{min-height:280px;grid-template-columns:minmax(0,1fr) 108px;padding:22px}.hero h1{font-size:clamp(2.65rem,8.8vw,4rem)}.hero p{margin:10px 0 16px}.art{transform:scale(.68);margin-right:-8px}.hero-actions{margin-right:-70px}.summary{padding:16px}.money{font-size:2.25rem}.vault{margin-top:26px}}
@media(max-width:475px){.top-actions{gap:5px}.top-actions button{padding:6px 8px}.brand{gap:7px}.brand img{width:25px;height:25px}.brand strong{font-size:1rem}.brand small{font-size:.61rem}.hero{padding:18px;grid-template-columns:minmax(0,1fr) 76px}.art{transform:scale(.55);margin-right:-7px;margin-top:-34px}.hero p{font-size:.9375rem}.hero-actions{gap:6px}.hero-actions button{padding:8px 9px;font-size:.875rem}.vault-filters{grid-template-columns:minmax(0,1fr)}.receipt{gap:3px 10px;grid-template-columns:35px minmax(0,1fr) auto;padding:12px 10px}.receipt-thumb{grid-row:1/3;width:34px;height:34px}.receipt-amount{grid-row:1;grid-column:3}.category{grid-column:2;grid-row:2}.editor-body{grid-template-columns:minmax(0,1fr);padding-inline:13px}.photo-panel img{max-height:165px}.dialog-head,.dialog-content{padding-inline:13px}#receipt-form>.dialog-actions{padding-inline:13px}footer{flex-direction:column;gap:4px}}
@media(max-width:475px){.art{margin-top:-68px}.hero p{max-width:25ch}}
@media(max-width:350px){.art{transform:scale(.48)}.hero h1{font-size:2.5rem}}
@media(max-width:715px){
  main{display:flex;flex-direction:column;gap:18px}
  .hero{padding:23px 20px;min-height:254px}
  .art{justify-self:end}
  .review{margin-top:0}
  .vault{margin-top:1px}
  .vault-filters{grid-template-columns:minmax(0,1fr) auto}
  .search{grid-column:1/-1}
  .notice{margin-top:0}
  footer{padding-top:0}
  #editor{margin:auto auto 0;width:100%;max-width:none;max-height:calc(100% - 14px);border-radius:17px 17px 0 0;border-bottom:0}
  #receipt-form>.dialog-actions{position:sticky;bottom:0;z-index:2;padding-bottom:max(12px,env(safe-area-inset-bottom))}
}
@media(max-width:475px){.hero{grid-template-columns:minmax(0,1fr) 75px}.hero p{max-width:22ch}.hero .art{margin-top:-60px;margin-right:-4px}.photo-actions .quiet{min-height:44px}}

