@font-face{font-family:"DM Sans";font-style:normal;font-display:swap;font-weight:100 1000;src:url("./vendor/dm-sans-latin-ext.woff2") format("woff2");unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}
@font-face{font-family:"DM Sans";font-style:normal;font-display:swap;font-weight:100 1000;src:url("./vendor/dm-sans-latin.woff2") format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
:root{
  color-scheme:light;
  --page:#f5f7f6;--surface:#fff;--tint:#f6f8f7;--ink:#172925;--muted:#556861;
  --line:#d9e2de;--fine:#e8edea;--accent:#096849;--accent-soft:#e6f2eb;
  --danger:#a32c1c;--track:#e7eee9;--focus:#248261;--shadow:0 2px 4px #152e2510;
  font-family:"DM Sans","Segoe UI",sans-serif;font-synthesis:none;
}
:root[data-theme=dark]{
  color-scheme:dark;
  --page:#14201c;--surface:#1b2a25;--tint:#20322b;--ink:#edf5ef;--muted:#acc2b6;
  --line:#3a4f45;--fine:#2d4237;--accent:#8bdfb2;--accent-soft:#263e31;
  --danger:#ffb5a2;--track:#33483c;--focus:#91e8b9;--shadow:none;
}
*{box-sizing:border-box}
html{scroll-behavior:smooth;scroll-padding-block-start:20px}
body{margin:0;background:var(--page);color:var(--ink);font-size:15px;line-height:1.5}
button,input,textarea{font:inherit;color:inherit}
button,summary{cursor:pointer}
button{border:0;background:none}
button:disabled{cursor:default;opacity:.53}
a{color:var(--accent)}
h1,h2,h3,p,dl,dd{margin:0}
h1,h2,h3{font-weight:650}
.wrap{width:min(1168px,calc(100% - 64px));margin-inline:auto}
.sr-only,.skip:not(:focus){position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.skip:focus{position:fixed;top:8px;left:8px;background:var(--surface);padding:10px;z-index:10}
:focus-visible{outline:3px solid var(--focus);outline-offset:3px}
[hidden]{display:none!important}
.icon{display:inline-block;width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.65;stroke-linecap:round;stroke-linejoin:round;flex-shrink:0}
.site-header{background:var(--surface);border-bottom:1px solid var(--line)}
.header-content{display:flex;align-items:center;gap:45px;min-height:70px}
.brand{display:inline-flex;align-items:center;gap:10px;text-decoration:none;font-weight:750;letter-spacing:-.65px;font-size:21px;color:var(--ink)}
.header-content nav{display:flex;align-items:center;gap:5px}
.header-content nav a{padding:7px 15px;text-decoration:none;color:var(--muted);font-size:14px;font-weight:590;border-radius:7px}
.header-content nav a[aria-current],.header-content nav a:hover{color:var(--accent);background:var(--accent-soft)}
.header-actions{display:flex;margin-inline-start:auto;gap:8px}
.icon-button{display:grid;place-items:center;width:38px;height:38px;border:1px solid var(--line);border-radius:9px;background:var(--surface)}
.icon-button:hover{background:var(--tint)}
#menu{display:none}
.page-heading{display:flex;align-items:center;justify-content:space-between;gap:20px;margin:33px 0 25px}
h1{font-size:clamp(32px,3.1vw,44px);line-height:1.12;letter-spacing:-1.8px;font-weight:660}
.page-heading p{margin-top:8px;color:var(--muted);font-size:16px}
.guide-link{display:flex;align-items:center;gap:8px;color:var(--muted);font-weight:550;font-size:14px;text-decoration:none;white-space:nowrap}
.guide-link:hover{text-decoration:underline;color:var(--accent)}
.work-area{display:grid;grid-template-columns:minmax(0,1.58fr) minmax(0,1fr);gap:24px;align-items:start}
.panel,.summary-panel{border:1px solid var(--line);border-radius:15px;background:var(--surface);box-shadow:var(--shadow)}
.panel-heading,summary{display:flex;align-items:center;justify-content:space-between;gap:10px}
.panel-heading{min-height:63px;padding:10px 23px}
h2{font-size:19px;line-height:1.25;letter-spacing:-.55px}
.panel-heading h2,.stats-panel summary h2{display:flex;align-items:center;gap:11px}
.title-icon{width:21px;height:21px;color:var(--accent)}
.text-button,.guide-link{min-height:38px}
.text-button{color:var(--muted);font-weight:570;font-size:13px;display:inline-flex;align-items:center;gap:7px;padding:5px 3px}
.text-button .icon{width:15px;height:15px}
.text-button:hover:enabled{text-decoration:underline;color:var(--accent)}
.count-table{border-collapse:collapse;width:100%;table-layout:fixed}
.denom-col{width:45%}.quantity-col{width:26%}
.count-table th,.count-table td{padding-inline:23px;text-align:left}
.count-table thead{background:var(--tint)}
.count-table thead th{font-size:11px;letter-spacing:.09em;text-transform:uppercase;color:var(--muted);font-weight:660;height:37px;border-block:1px solid var(--fine)}
.count-table th:last-child,.count-table td:last-child{text-align:right}
.count-table tbody tr:not(:last-child){border-bottom:1px solid var(--fine)}
.count-table tbody td,.count-table tbody th{height:59px;padding-block:7px}
.denomination{display:flex;align-items:center;gap:14px;text-align:left}
.face-value{font-size:17px;font-weight:660;line-height:1.22;letter-spacing:-.3px}
.kind{display:block;font-size:12px;line-height:1.2;font-weight:450;color:var(--muted);margin-top:2px}
.note-art,.coin-art{flex:none;position:relative;display:grid;place-items:center;overflow:hidden;isolation:isolate;user-select:none}
.note-art{width:46px;height:28px;border:1px solid var(--edge);color:var(--edge);border-radius:4px;background:var(--paper);font-size:12px;font-weight:730;letter-spacing:-.5px}
.note-art::before{position:absolute;content:"";inset:3px;border:1px solid currentColor;border-radius:2px;opacity:.55}
.note-art::after{content:"";position:absolute;inset:0;z-index:-1;background:repeating-radial-gradient(ellipse at -6px 50%,transparent 0 3px,currentColor 3.2px 3.8px,transparent 4px 6px);opacity:.23}
.note-art span{border-radius:50%;display:grid;place-items:center;height:17px;min-width:19px;background:var(--paper);border:1px solid color-mix(in srgb,var(--edge) 45%,transparent);line-height:1}
.coin-wrap{display:grid;place-items:center;width:46px;flex:none}
.coin-art{height:30px;width:30px;border:1px solid var(--edge);border-radius:50%;background:var(--paper);color:var(--edge);font-size:14px;font-weight:720;line-height:1}
.coin-art::before{content:"";position:absolute;inset:2px;border:1px dashed currentColor;border-radius:50%;opacity:.7}
.v500{--paper:#e5eade;--edge:#536148}.v200{--paper:#ffdfaa;--edge:#8e5916}.v100{--paper:#e5dcf3;--edge:#75618c}
.v50{--paper:#cce9eb;--edge:#427982}.v20{--paper:#e0e6bc;--edge:#6d7645}.v10{--paper:#efddc9;--edge:#86603d}
.v5{--paper:#ecddb7;--edge:#8a6e32}.v2{--paper:#e0e7e5;--edge:#62716d}.v1{--paper:#e8e2d9;--edge:#776b59}
.count-table input{width:100%;max-width:122px;height:37px;padding:6px 12px;background:var(--surface);border:1px solid var(--line);border-radius:7px;color:var(--ink);font-size:16px;font-variant-numeric:tabular-nums}
.count-table input::placeholder{color:var(--muted);opacity:.8}
.count-table input[aria-invalid=true]{border:2px solid var(--danger)}
.subtotal{font-weight:610;font-size:16px;font-variant-numeric:tabular-nums;letter-spacing:-.35px;overflow-wrap:anywhere}
.has-quantity .subtotal{color:var(--accent)}
.table-foot{display:flex;gap:9px;align-items:center;padding:11px 23px;background:var(--tint);border-top:1px solid var(--fine);border-radius:0 0 15px 15px;color:var(--muted);font-size:12px;min-height:43px}
.table-foot .icon{width:17px;height:17px}
kbd{font:inherit;font-weight:600}
.input-error,.notice{padding:9px 23px;color:var(--danger)}
.side{display:grid;gap:17px;position:sticky;top:14px}
.summary-panel{overflow:hidden}
.summary-top{background:#105540;color:#fff;padding:21px 25px 16px;position:relative;isolation:isolate;overflow:hidden}
.summary-top::before{content:"";position:absolute;right:-87px;top:-116px;width:250px;height:250px;background:repeating-radial-gradient(ellipse at center,transparent 0 7px,#a2e2c42f 8px 8.7px,transparent 9px 14px);border-radius:45%;transform:rotate(-22deg) scaleX(1.23);z-index:-1;pointer-events:none}
.summary-label{display:flex;align-items:center;gap:9px}
.summary-label h2{font-size:13px;font-weight:560;letter-spacing:.01em;color:#e1f1e7}
.summary-label span{font-size:10px;font-weight:650;letter-spacing:.08em;background:#ffffff14;color:#e0f0e6;border:1px solid #ffffff40;border-radius:4px;padding:0 5px;line-height:17px}
.total{font-size:clamp(38px,3.4vw,52px);line-height:1.1;letter-spacing:-2px;font-weight:620;font-variant-numeric:tabular-nums;margin:7px 0 4px;overflow-wrap:anywhere}
.total.long-total{font-size:clamp(22px,2.1vw,33px);letter-spacing:-.7px}
.words{color:#d5e8dc;font-size:13px;line-height:1.4}
.piece-counts{display:grid;grid-template-columns:1fr 1fr;border-top:1px solid #ffffff36;padding-top:13px;margin-top:18px}
.piece-counts > div+div{border-left:1px solid #ffffff36;padding-left:20px}
.piece-counts dt{display:flex;align-items:center;gap:7px;color:#d5e8dc;font-size:12px}
.piece-counts dt .icon{width:16px;height:16px}
.piece-counts dd{font-size:19px;font-weight:590;letter-spacing:-.4px;margin-top:2px}
.export-actions{display:grid;grid-template-columns:1.25fr 1fr;gap:8px;padding:14px}
.button{display:inline-flex;align-items:center;justify-content:center;gap:8px;border:1px solid var(--line);border-radius:7px;min-height:39px;padding:8px 12px;background:var(--surface);color:var(--ink);font-weight:580;font-size:13px;line-height:1.35}
.button:hover:enabled{background:var(--tint);border-color:var(--muted)}
.button.primary{background:#0a7054;color:#fff;border-color:#0a7054}
.button.primary:hover:enabled{background:#08583f;border-color:#08583f}
.button .icon{width:16px;height:16px}
summary{list-style:none}
summary::-webkit-details-marker{display:none}
.chevron{width:16px;height:16px;color:var(--muted)}
details[open]>summary .chevron{transform:rotate(180deg)}
.stats-panel summary{min-height:54px;padding:12px 20px}
.stats-panel summary h2{font-size:17px}
.stats-content{padding:0 20px 14px}
.stats-label{font-size:12px;color:var(--muted);margin-bottom:6px}
.bar-row{display:grid;grid-template-columns:38px minmax(0,1fr) 42px;align-items:center;gap:8px;min-height:19px;font-size:12px;font-weight:530;font-variant-numeric:tabular-nums}
.bar-row>span:last-child{text-align:right;color:var(--muted);font-size:11px}
.track,.bar{height:5px;border-radius:6px}.track{background:var(--track)}.bar{background:var(--accent);width:0}
.stat-totals{display:grid;grid-template-columns:1fr 1fr;border-top:1px solid var(--fine);padding-top:10px;margin-top:12px}
.stat-totals dt{color:var(--muted);font-size:11px}
.stat-totals dd{font-size:16px;font-weight:630;margin-top:2px}
.history-panel{margin-block:22px 39px;scroll-margin-top:15px}
.history-panel .panel-heading{min-height:54px;padding-bottom:0}
#toggle-history{display:inline-flex;align-items:center;gap:10px;min-height:42px;padding:0;color:inherit;font:inherit;text-align:left;letter-spacing:inherit}
#toggle-history[aria-expanded="true"] .chevron{transform:rotate(180deg)}
.history-panel:has(#history-content[hidden]) .panel-heading{padding-bottom:10px}
.history-tip,.history-empty{color:var(--muted);font-size:13px;padding-inline:23px}
.history-tip{padding-top:1px}
.history-empty{margin:13px 23px 17px;padding:12px 15px;background:var(--tint);border:1px dashed var(--line);border-radius:7px}
#history-list{list-style:none;margin:0;padding:0 23px}
#history-list:not(:empty){padding-block:10px}
.history-row{display:flex;align-items:center;gap:12px;padding-block:9px;border-top:1px solid var(--fine)}
.history-row>div{flex:1;min-width:0}
.history-row strong{display:block;overflow-wrap:anywhere}
.history-row small{color:var(--muted)}
.history-row .icon-button{width:36px;height:36px}
#guide{scroll-margin-top:16px}
#guide h2{font-size:25px;letter-spacing:-.75px}
.guide-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:30px;margin-block:19px 34px}
.guide-grid h3{font-size:16px;margin-bottom:6px}
.guide-grid p,.faq p{color:var(--muted);font-size:14px;line-height:1.65}
.faq{margin-top:12px}
.faq details{border-bottom:1px solid var(--line)}
.faq summary{padding:14px 0;font-weight:560;font-size:15px}
.faq p{padding:0 32px 15px 0;max-width:850px}
footer{display:flex;justify-content:space-between;align-items:center;gap:12px;color:var(--muted);padding:25px 0;margin-top:24px;font-size:13px}
footer span{font-weight:650}footer a{text-decoration:none}
.footer-links,.consent-content,.consent-actions{display:flex;align-items:center;gap:16px}
.footer-links{flex-wrap:wrap;justify-content:flex-end;gap:5px 16px}
.footer-links button{padding:4px 0;color:var(--accent);font:inherit}
footer a:hover,.footer-links button:hover{text-decoration:underline}
.consent-strip{background:var(--accent-soft);border-bottom:1px solid var(--line);color:var(--ink);font-size:13px}
.consent-content{justify-content:space-between;padding-block:8px}
.consent-actions{flex-shrink:0;gap:8px}
.consent-actions .button{min-height:35px;padding:6px 12px}
.prose-page{max-width:820px;padding-block:38px}
.prose-page h2{margin-top:29px;font-size:21px}
.prose-page p{margin-top:11px;line-height:1.7}
.prose-page footer{border-top:1px solid var(--line)}
@media(max-width:640px){
  .consent-content{flex-wrap:wrap;gap:7px}
  .consent-actions .button{min-height:40px}
  footer{flex-wrap:wrap}.footer-links{justify-content:flex-start}
}
dialog{color:var(--ink);background:var(--surface);border:1px solid var(--line);border-radius:13px;width:min(410px,calc(100% - 32px));padding:24px;box-shadow:0 24px 70px #0003}
dialog::backdrop{background:#0a1f17a3}
dialog p{margin:10px 0 20px;color:var(--muted)}
dialog textarea{background:var(--tint);width:100%;height:130px;border:1px solid var(--line);border-radius:5px;padding:8px;margin-bottom:12px}
.dialog-actions{display:flex;justify-content:flex-end;gap:8px}
#toast:not(:empty){position:fixed;bottom:20px;left:50%;transform:translateX(-50%);background:#172c24;color:white;padding:10px 18px;border-radius:8px;box-shadow:var(--shadow);font-size:14px;width:max-content;max-width:calc(100% - 32px);z-index:5}
#print-sheet{display:none}
@media(max-width:960px){
  .wrap{width:calc(100% - 40px)}.work-area{grid-template-columns:minmax(0,1.3fr) minmax(0,1fr);gap:17px}
  .count-table th,.count-table td{padding-inline:15px}.panel-heading{padding-inline:16px}
  .denomination{gap:10px}.count-table input{padding-inline:9px}.subtotal{font-size:15px}
  .stats-panel summary{padding-inline:15px}.stats-content{padding-inline:15px}
}
@media(max-width:740px){
  html{scroll-padding-block-start:12px}.wrap{width:calc(100% - 32px)}
  .header-content{min-height:60px;position:relative;gap:12px}
  .brand{font-size:19px}.brand img{width:31px;height:31px}
  #menu{display:grid}.header-content nav{display:none}
  .header-content nav.open{display:flex;position:absolute;top:calc(100% + 1px);right:0;z-index:4;align-items:stretch;flex-direction:column;background:var(--surface);border:1px solid var(--line);border-radius:10px;min-width:170px;padding:7px;box-shadow:var(--shadow)}
  .header-content nav a{padding:10px 13px}
  .page-heading{margin:23px 0 18px}.guide-link{display:none}
  h1{font-size:clamp(29px,5.9vw,38px);letter-spacing:-1.2px}
  .page-heading p{font-size:14px;margin-top:6px;max-width:480px}
  .work-area{grid-template-columns:minmax(0,1fr);gap:15px}
  .side{position:static;gap:15px}
  .count-table thead th{font-size:10px}.count-table tbody td,.count-table tbody th{height:55px}
  .count-table input{height:41px}
  .summary-top{padding:21px 22px 17px}.total{font-size:43px}
  .total.long-total{font-size:clamp(23px,6.2vw,35px)}
  .stats-panel summary{min-height:55px}.bar-row{min-height:22px}
  .button{min-height:43px}.table-foot{display:none}
  .panel-heading{min-height:56px}.history-panel{margin-top:16px}
  .history-tip,.history-empty{padding-inline:16px}.history-empty{margin-inline:16px}
  #history-list{padding-inline:16px}
  .guide-grid{grid-template-columns:1fr;gap:17px}
}
@media(max-width:435px){
  .wrap{width:calc(100% - 24px)}.count-table td,.count-table th{padding-inline:9px}
  .denom-col{width:46%}.quantity-col{width:25%}.denomination{gap:8px}.face-value{font-size:16px}
  .note-art{width:38px;height:25px}.coin-wrap{width:38px}.coin-art{width:26px;height:26px}
  .kind{font-size:11px}.panel-heading h2{font-size:17px}.subtotal{font-size:14px}
  .history-row{gap:6px}.history-row small{font-size:11px}
}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}}
@page{size:auto;margin:17mm}
@media print{
  html,body{background:white!important;color:black!important}
  .calculator-page > :not(#print-sheet),.consent-strip,.footer-links{display:none!important}
  #print-sheet{display:block;font:11pt/1.5 "DM Sans",Arial,sans-serif;color:#152b22}
  #print-sheet h1{font-size:23pt;letter-spacing:-.5pt;margin:12pt 0 2pt}
  #print-sheet h2{font-size:15pt;margin:15pt 0 3pt}
  #print-sheet table{width:100%;border-collapse:collapse;margin-top:18pt}
  #print-sheet th,#print-sheet td{text-align:left;border-bottom:1px solid #bcc7bf;padding:6pt}
  #print-sheet :is(th,td):not(:first-child){text-align:right}
  #print-sheet .print-pieces{margin-top:8pt}
}
