*{box-sizing:border-box}body{margin:0;background:#f2f5f6;color:#1d2c36;font:16px/1.5 "Segoe UI",Arial,sans-serif}header{background:#183744;color:white}header .wrap{display:flex;justify-content:space-between;align-items:center;gap:12px;padding-block:16px}header b{font-size:21px}header span{font-size:14px;color:#cfdee1}.wrap{width:min(100% - 32px,1060px);margin:auto}main{padding:26px 0 64px}h1{font-size:clamp(28px,4vw,42px);line-height:1.12;letter-spacing:-.035em;margin:10px 0 28px}fieldset,section{margin:0;background:white;border:1px solid #cbd7da;border-radius:12px;padding:22px}legend{font-weight:650;padding:0 6px}h2,h3,h4{margin:22px 0 12px}section>h2{margin-top:0}.grid,.cards{display:grid;grid-template-columns:repeat(3,1fr);gap:14px}label{display:flex;flex-direction:column;gap:4px;font-size:14px;font-weight:600;margin:8px 0;min-width:0}input,select,button{font:inherit;border-radius:6px}input,select{padding:9px;border:1px solid #a3b4b9;background:white;max-width:100%}input[type=file]{font-weight:400;background:#f5f8f9}button{border:1px solid #006358;background:#006358;color:white;padding:9px 14px;cursor:pointer;font-weight:600}button.secondary,.chips button{background:white;color:#154b49;border-color:#afbfbd}button:disabled{opacity:.45;cursor:default}button[aria-pressed=true],.chips button[aria-pressed=true]{background:#164b49;color:white}.actions,.toolbar,.plans,.chips{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin:14px 0 0}.plans{border-top:1px solid #d7dfe1;padding-top:14px}.plans span{font-size:13px;color:#52666c}.cards article{background:#e8f3f0;padding:16px;border-radius:8px}.cards strong{display:block;font-size:clamp(20px,2.2vw,30px);white-space:nowrap}.cards span{font-size:14px}p{margin:10px 0}summary{cursor:pointer;font-weight:600}.scroll{overflow-x:auto;max-width:100%;margin:8px 0}table{width:100%;border-collapse:collapse;text-align:left;font-size:14px}th,td{padding:7px;border-bottom:1px solid #dce3e4;vertical-align:top}th{background:#eef3f4}#items{max-height:400px;overflow:auto}#alerts{color:#744809}#print{display:none}[hidden]{display:none!important}
@media(max-width:680px){.grid,.cards{grid-template-columns:1fr}.wrap{width:calc(100% - 20px)}fieldset,section{padding:14px}.cards{gap:6px}.cards article{padding:9px 12px}header span{font-size:12px}.toolbar>*{width:100%}}
@media print{header,main{display:none}#print{display:block}body{background:white;font:10pt Arial}#print h1{font-size:20pt}#print h2{font-size:14pt;break-after:avoid}#print .scroll{overflow:visible}thead{display:table-header-group}tr{break-inside:avoid}td,th{overflow-wrap:anywhere}}
.offer{margin:22px 0;padding:16px 20px;border:1px solid #bdd3cd;background:#f2f8f6;border-radius:8px}.offer h3{margin:0}.muted,#base,#counts{color:#4c6068}.text-button{border:0;background:transparent;color:#006358;text-decoration:underline;text-underline-offset:3px;padding:5px 3px;text-align:left}.text-button:hover{color:#123c36}.check{flex-direction:row;align-items:center;gap:7px}.check input{width:auto}#categories details button{display:block;margin:5px 0 0 12px}#categories td:nth-child(2),#categories td:nth-child(3){white-space:nowrap;font-variant-numeric:tabular-nums;text-align:right}#categories th:nth-child(2),#categories th:nth-child(3){text-align:right}#categories td:last-child{width:90px}#incomeBox{margin:16px 0}#incomeBox summary{color:#15574e}#items{max-height:490px}#items th{position:sticky;top:0}#items td,#items th{min-width:65px}#items td:nth-child(7){min-width:150px}#advice>div{padding:9px 0;border-top:1px solid #dce3e4}#bridge:empty,#alerts:empty,#common:empty{display:none}button:focus-visible,summary:focus-visible{outline:3px solid #3787ae;outline-offset:2px}fieldset{min-width:0}

.product-amounts{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:5px 12px;max-width:620px}
.product-amounts dd{margin:0;text-align:right;font-variant-numeric:tabular-nums}
.product-amounts :nth-last-child(-n+2){font-weight:700;border-top:1px solid #bdd3cd;padding-top:6px}
#items .scroll:focus-visible{outline:2px solid #3787ae;outline-offset:-2px}

html{scrollbar-gutter:stable}
@media screen {
  html:has(#detailDialog[open]){overflow:hidden}
  #detailDialog{width:min(880px,calc(100% - 32px));max-width:100%;max-height:calc(100dvh - 36px);padding:0;border:1px solid #b0c3c5;border-radius:12px;color:inherit;background:white;box-shadow:0 16px 56px #122e3940}
  #detailDialog[open]{display:flex;flex-direction:column;overflow:hidden}
  #detailDialog::backdrop{background:#162d38a8}
  .dialog-heading,.dialog-actions{display:flex;align-items:center;gap:12px;flex:none;padding:12px 20px}
  .dialog-heading{justify-content:space-between;background:#eef5f4;border-bottom:1px solid #cfdbdb}
  .dialog-heading h2{font-size:clamp(17px,2vw,22px);line-height:1.3;margin:0;overflow-wrap:anywhere;max-height:22dvh;overflow:auto}
  #dialogX{width:44px;height:44px;flex:none;padding:0;font-size:28px;line-height:1;color:#184d4b;border:0;background:transparent}
  #dialogBody{padding:12px 20px;min-height:0;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;overflow-wrap:anywhere}
  #dialogBody .scroll{overscroll-behavior-x:contain}
  #dialogBody table{overflow-wrap:normal}
  #lines :is(th,td):last-child,#productCard td:nth-child(2),.product-amounts dd{white-space:nowrap}
  #dialogBody .text-button{overflow-wrap:normal}
  .dialog-actions{justify-content:flex-end;border-top:1px solid #d7e1e1}
  #backToProduct{margin-right:auto}
}
@media screen and (max-width:680px){
  #detailDialog{width:100%;max-height:100dvh;border-radius:8px}
  .dialog-heading,.dialog-actions,#dialogBody{padding:10px 14px}
  .dialog-actions{padding-bottom:max(10px,env(safe-area-inset-bottom))}
}
@media print{#detailDialog,#detailDialog::backdrop{display:none!important}}

a.button { display:inline-flex; align-items:center; min-height:44px; padding:.35rem .75rem; border:1px solid currentColor; border-radius:.45rem; font-weight:600; }

a.paid-details { background:#006358; color:white; text-decoration:none; }
a.paid-details:focus-visible { outline:3px solid #3787ae; outline-offset:2px; }
header #siteName { color: white; text-decoration: none; overflow-wrap: anywhere; }
header #siteName:focus-visible { outline:3px solid #3787ae; outline-offset:2px; }
.cards small { display:block; color:#174641; font-weight:650; }
.meaning { margin-block: .8rem; color: #29464f; }
.financial-table :is(th,td) { vertical-align: middle; }
.financial-table .number { text-align:right; font-variant-numeric:tabular-nums; white-space:nowrap; }
.expense-table { table-layout:fixed; min-width:34rem; }
.expense-table th:nth-child(2) { width:8.5rem; }
.expense-table th:nth-child(3) { width:8rem; }
.expense-table th:nth-child(4) { width:7rem; }
.expense-table td:first-child { overflow-wrap:anywhere; }
.expense-scroll-note { display:none; }
@media(max-width:600px){
  .expense-scroll-note { display:block; }
  .expense-table :is(th,td):first-child { position:sticky; left:0; z-index:1; border-inline-end:1px solid #c4d4d4; }
  .expense-table tbody td:first-child { background:white; }
  .expense-table .expense-child td:first-child { background:#f3f7f7; }
}
.financial-table .expense-child td { background:#f3f7f7; }
.financial-table .expense-child td:first-child { padding-inline-start:1.4rem; }
button.text-button { min-height:44px; padding:.35rem .45rem; color:#00594e; background:transparent; text-align:left; }
button.text-button:is(:hover,:focus-visible):not(:disabled) { color:#123d38; background:#e1efe9; text-decoration-thickness:2px; }
button.text-button:active:not(:disabled) { color:#123832; background:#cfe7dd; box-shadow:inset 0 0 0 2px currentColor; }
button.text-button:focus-visible { outline:2px solid #006056; outline-offset:2px; }
button:is(:disabled,.text-button:disabled) { color:#3d5157; background:#e6ecee; border-color:#a6b8bd; opacity:1; cursor:not-allowed; }
.expense-toggle::before { content:'▸'; margin-inline-end:.45rem; }
.expense-toggle[aria-expanded="true"]::before { content:'▾'; }
#common:not(:empty) { padding:.8rem 1rem; border:1px solid #b3cac4; border-radius:8px; }
#common h4 { margin:0 0 .35rem; }
#common strong { font-size:1.18rem; font-variant-numeric:tabular-nums; }
.report-flow { display:grid; gap:24px; }
.report-flow > * { min-width:0; }
.report-flow > :empty { display:none; }
.report-flow > div > h3:first-child { margin-top:0; }
@media(max-width:680px){.report-flow{gap:20px;}}
#itemOrder { width:100%; }
