.cost-page{display:grid;gap:16px;font-size:.875rem;color:var(--ink)}
.cost-page .page-head{margin-bottom:0}.cost-page p{line-height:1.65}.cost-page .page-head p{max-width:72ch}
.cost-surface{background:var(--surface);border:1px solid var(--line);border-radius:12px;min-width:0;overflow:hidden}
.cost-surface>h3{margin:0;padding:16px;border-bottom:1px solid var(--line);font-size:1rem}
.cost-note{margin:0;padding:12px 16px;background:#eef4fc;border:1px solid #cadcf4;border-radius:8px;color:#314d6d}
.cost-source{margin:0;color:#506078;font-size:.8125rem}
.cost-pricing-editor .cost-source{margin:0 0 16px}.cost-pricing-editor form{max-width:1120px}.cost-pricing-editor .form-error:empty{display:none}
.cost-filters{display:flex;flex-wrap:wrap;gap:12px;align-items:end;padding:16px}.cost-filters>label{min-width:120px;flex:1}.cost-filters>label:first-child{flex:2;min-width:220px}
.cost-page input::placeholder{color:#5e6a7b}.cost-page input[readonly]{background:#f0f3f7;color:#4d5e75}.cost-page button:disabled{opacity:.55;cursor:not-allowed}.cost-page button:focus-visible,.cost-page summary:focus-visible{outline:3px solid #709de9;outline-offset:2px}
.cost-scroll{overflow:auto;max-height:620px}.cost-table{border-collapse:separate;border-spacing:0;width:100%;min-width:960px;font-size:.8125rem;font-variant-numeric:tabular-nums}
.cost-table th{position:sticky;top:0;background:#f4f7fb;z-index:1;text-align:left;color:#455a72;white-space:nowrap}.cost-table th,.cost-table td{padding:12px;border-bottom:1px solid var(--line)}.cost-table td{vertical-align:top}.cost-table tbody tr:hover{background:#f8fbff}.cost-table button{white-space:nowrap}.cost-table .cost-strategy{min-width:220px;max-width:360px;white-space:normal;line-height:1.6}
.cost-details{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:12px;margin:0;padding:16px;background:#f5f8fc;max-width:1100px;white-space:normal}.cost-details dt{font-size:.75rem;color:#52657b}.cost-details dd{margin:4px 0 0;overflow-wrap:anywhere;font-weight:600}.cost-details+.cost-note{margin-top:8px}
.cost-scroll{container-type:inline-size}.cost-details,.cost-table .cost-note{width:min(1100px,calc(100cqw - 24px));box-sizing:border-box}
.cost-pagination{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 16px}.cost-pagination>div{display:flex;gap:8px}
.cost-editor{padding:20px;scroll-margin-top:16px}.cost-editor h3{padding:0 0 12px;border:0}.cost-editor form{display:grid;gap:16px}.cost-editor fieldset{border:0;border-bottom:1px solid var(--line);padding:16px 0;margin:0}.cost-editor legend{font-weight:700;padding:0}.cost-form-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:16px}.cost-form-grid small{min-height:1em;font-size:.75rem;font-weight:400;color:#52657b;line-height:1.5}.cost-editor .cost-note{margin-bottom:16px}
.cost-summary-table{width:100%;border-collapse:collapse;font-variant-numeric:tabular-nums}.cost-summary-table td,.cost-summary-table th{padding:10px 16px;border-bottom:1px solid var(--line);text-align:left}.cost-summary-table td:last-child,.cost-summary-table th:last-child{text-align:right}.cost-summary-table th{background:#f4f7fb;color:#455a72}.cost-distributions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}
.cost-guide{padding:24px}.cost-guide h3{padding:0;border:0;margin:24px 0 12px}.cost-guide h3:first-child{margin-top:0}.cost-guide li,.cost-guide dd,.cost-guide p{line-height:1.8;max-width:80ch}.cost-guide dt{font-weight:700;margin-top:16px}.cost-guide dd{margin:6px 0 0}.cost-table details{min-width:180px}.cost-table summary{cursor:pointer;color:#1f57b8}
@media(max-width:800px){.cost-distributions{grid-template-columns:1fr}.cost-filters>label:first-child{min-width:180px}.cost-pagination{flex-wrap:wrap}.cost-editor{padding:16px}.cost-form-grid{grid-template-columns:1fr}.cost-guide{padding:16px}.cost-page .page-head{align-items:flex-start;flex-direction:column}.cost-scroll{max-height:65vh}}
@media(prefers-reduced-motion:reduce){.cost-page *{scroll-behavior:auto!important;transition:none!important}}
@media(max-width:800px){.cost-editor{scroll-margin-top:80px}}
.cost-import-panel .cost-source{margin-bottom:16px}
.cost-import-file{align-items:flex-end;gap:16px;flex-wrap:wrap}
.cost-import-file label{display:grid;gap:8px;max-width:100%}
.cost-import-file input{max-width:100%}
.cost-import-panel .form-error:empty{display:none}
.cost-import-scroll{max-height:360px;border:1px solid #e1e7f1;border-radius:8px}
.cost-import-scroll .cost-table{min-width:880px}
.cost-import-confirm{margin-top:16px}
.cost-dashboard{container-type:inline-size}
.cost-dashboard-grid{display:grid;grid-template-columns:minmax(0,1.1fr) minmax(0,1fr);gap:16px;align-items:stretch}
.cost-inventory-overview{display:flex;flex-direction:column}
.cost-overview-head{padding:16px;border-bottom:1px solid var(--line)}
.cost-overview-head h2{margin:0;font-size:1.25rem;line-height:1.5;text-wrap:balance}
.cost-overview-head p{margin:6px 0 0;color:#506078;font-size:.8125rem;overflow-wrap:anywhere}
.cost-overview-head .cost-source{margin-top:12px}
.cost-overview{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));margin:0;flex:1;font-variant-numeric:tabular-nums}
.cost-overview>div{min-width:0;padding:16px;border-bottom:1px solid var(--line)}
.cost-overview>div:not(:nth-child(3n+1)){border-left:1px solid var(--line)}
.cost-overview dt{color:#455a72;font-size:.8125rem;line-height:1.5}
.cost-overview dd{margin:8px 0 0;font-size:1.25rem;font-weight:700;overflow-wrap:anywhere}
.cost-overview-note{padding:12px 16px;margin:0;color:#506078;font-size:.8125rem;background:#f7f9fc}
.cost-overview-note p{margin:0}.cost-overview-note p+p{margin-top:4px}
.cost-partial{display:block;font-size:.75rem;font-weight:400;color:#805000;margin-top:5px;white-space:normal}
.cost-ranking{display:flex;flex-direction:column}
.cost-ranking>header{padding:16px}.cost-ranking h3{margin:0;font-size:1rem;text-wrap:balance}.cost-ranking header p{margin:8px 0 0;color:#506078;font-size:.8125rem}
.cost-ranking-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:40px}
.cost-ranking-heading button{flex:none;white-space:nowrap}
.cost-rank-scroll{max-height:430px;overflow:auto;height:320px;min-height:0;flex:1 1 auto;overscroll-behavior:contain;scrollbar-gutter:stable;border-top:1px solid var(--line)}
.cost-rank-scroll:focus-visible{outline:3px solid #709de9;outline-offset:-3px}
.cost-rank-table{min-width:540px;table-layout:fixed}.cost-ranking-loss .cost-rank-table{min-width:440px}
.cost-rank-table th:first-child{width:40%}.cost-rank-table th.cost-rank-number,.cost-rank-number{text-align:right}
.cost-rank-table th{white-space:normal;line-height:1.5}.cost-rank-number{overflow-wrap:anywhere}
.cost-rank-table td{vertical-align:middle}.cost-rank-identity{display:flex;align-items:center;gap:8px;min-height:40px}.cost-rank-identity>span:last-child{min-width:0}.cost-rank-label small{display:block;color:#52657b;font-size:.75rem;margin-top:5px;overflow-wrap:anywhere}.cost-rank-label strong{font-weight:600;overflow-wrap:anywhere}
.cost-rank-position{color:#52657b;min-width:20px;font-size:.75rem}.cost-rank-spacer{width:28px;flex:none}.cost-rank-table .expand-toggle{flex:none}
.cost-rank-table tr[hidden]{display:none}.cost-rank-table .cost-rank-level-1{background:#f5f8fc}.cost-rank-table .cost-rank-level-2{background:#fafbfe}
.cost-rank-level-1 .cost-rank-label{padding-left:28px}.cost-rank-level-2 .cost-rank-label{padding-left:44px}
@container(max-width:1050px){.cost-dashboard-grid{grid-template-columns:minmax(0,1fr)}}
@container(max-width:560px){.cost-overview>div{padding:12px 8px}.cost-overview dt{font-size:.75rem}.cost-overview dd{font-size:1rem}.cost-overview-head,.cost-ranking>header{padding:12px}.cost-overview-note{padding:12px}.cost-rank-scroll{max-height:60vh}}
@container(max-width:360px){.cost-overview{grid-template-columns:1fr}.cost-overview>div:not(:nth-child(3n+1)){border-left:0}.cost-overview>div{padding:12px}.cost-overview dd{font-size:1.125rem}}
.cost-receipts{display:flex;flex-direction:column;container:receipts / inline-size}
.cost-receipts>header{padding:16px;border-bottom:1px solid var(--line)}.cost-receipts h3{margin:0;font-size:1rem}.cost-receipts>header p{margin:8px 0 0}
.cost-receipts-toolbar{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:12px;margin-top:12px}.cost-receipts h3{line-height:1.5;text-wrap:pretty}
.cost-receipts-year{display:flex;align-items:center;gap:8px;white-space:nowrap;font-size:.8125rem;margin:0}.cost-receipts-year label{display:flex;align-items:center;gap:8px}.cost-receipts-year input{width:104px;padding:8px}.cost-receipts-year button{padding:8px 12px}
.cost-receipts-loading{padding:24px 16px;color:#506078;min-height:340px}.cost-receipts-loading p{margin:0 0 12px}
.cost-receipts-form{display:flex;flex-direction:column;flex:1}
.cost-receipts-body{display:grid;grid-template-columns:minmax(0,3fr) minmax(160px,1fr);flex:1}
.cost-receipts-months{display:grid;grid-template-columns:repeat(3,minmax(0,1fr))}
.cost-receipts-months label{display:flex;flex-direction:column;align-items:stretch;justify-content:flex-start;min-width:0;padding:12px;border-right:1px solid var(--line);border-bottom:1px solid var(--line);font-size:.8125rem;font-weight:500;gap:8px}
.cost-receipts-months input{padding:8px;font-size:.875rem;font-variant-numeric:tabular-nums;border-radius:6px;min-width:0}
.cost-receipts-months input:disabled{background:#f4f7fb;color:#506078}
.cost-receipt-month-source{display:block;color:#285788;font-size:.75rem;font-weight:400;line-height:1.5;overflow-wrap:anywhere}.cost-receipt-month-source:empty{display:none}.cost-receipt-month-source.cost-partial{color:#805000;margin-top:0}.cost-receipt-complete{display:block;margin-top:5px}
.cost-receipts-summary{display:flex;flex-direction:column;margin:0;font-variant-numeric:tabular-nums;background:#f7f9fc}
.cost-receipts-summary>div{padding:16px 12px;flex:1;border-bottom:1px solid var(--line);display:flex;flex-direction:column;justify-content:center;gap:12px}
.cost-receipts-summary dt{font-size:.8125rem;line-height:1.6;color:#455a72}.cost-receipts-summary dd{margin:0;font-size:1.25rem;font-weight:700;overflow-wrap:anywhere}.cost-receipts-summary small{font-size:.75rem;color:#506078;line-height:1.6}
.cost-receipt-year-link{padding:0;border:0;background:none;color:#1f57b8;text-align:left;font-size:.75rem;cursor:pointer;text-decoration:underline;text-underline-offset:3px}
.cost-receipts-calculator{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));background:#f7f9fc}.cost-receipts-factors{display:contents}.cost-receipts-factors>label{display:flex;flex-direction:column;gap:8px;min-width:0;padding:16px 12px;border-right:1px solid var(--line);font-size:.8125rem;font-weight:500;color:#455a72}.cost-receipts-factors input{width:100%;min-width:0;padding:8px;border-radius:6px;font-size:.875rem;font-variant-numeric:tabular-nums}.cost-receipts-factors small{font-size:.75rem;font-weight:400;color:#506078}.cost-receipts-calculator>[data-receipt-budget]{grid-column:span 3}.cost-receipts-calculator .cost-receipts-budget dl>div{padding:16px 12px}.cost-receipts-calculator .cost-receipts-budget dd{font-size:1rem}
.cost-receipts-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap;flex:1 1 280px}.cost-receipts-actions button{font-size:.8125rem;white-space:nowrap}.cost-receipts-actions span{flex:1;min-width:60px}
.cost-receipts .form-error{margin:8px 0}.cost-receipts .form-error:empty{display:none}
.cost-receipts-budget dl{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));margin:0;font-variant-numeric:tabular-nums;background:#f7f9fc}
.cost-receipts-budget dl>div{position:relative;padding:16px;min-width:0}.cost-receipts-budget dl>div+div{border-left:1px solid var(--line)}
.cost-receipts-budget dl>div+div:before{content:'−';position:absolute;left:-9px;top:46px;width:18px;text-align:center;background:#f7f9fc;color:#455a72;font-size:1rem}.cost-receipts-budget dl>div.cost-budget-result:before{content:'＝'}
.cost-receipts-budget dt{font-size:.8125rem;color:#455a72;line-height:1.6;min-height:3.2em}.cost-receipts-budget dd{margin:8px 0 0;font-size:1.125rem;font-weight:700;overflow-wrap:anywhere}.cost-receipts-budget small{display:block;font-size:.75rem;font-weight:400;line-height:1.6;margin-top:8px;color:#506078}.cost-receipts-budget small.cost-partial{color:#805000}
.cost-budget-result{background:#eef4fc}.cost-budget-result dd{color:#174a84}.cost-budget-negative dd{color:#a13232}
.cost-receipts-budget-note{margin:0;padding:12px 16px;font-size:.75rem;color:#506078;border-top:1px solid var(--line)}
.cost-ranking-category .cost-rank-table{min-width:620px}.cost-ranking-category .cost-rank-table th:first-child{width:32%}
.cost-category-note{padding:12px 16px;margin:0;color:#506078;font-size:.75rem;border-top:1px solid var(--line);background:#f7f9fc}
.cost-category-basis-note{margin-top:12px;padding:8px 12px;background:#fff8e8;border:1px solid #ead7aa;border-radius:6px;overflow-wrap:anywhere}.cost-ranking .cost-category-basis-note p{margin:0;color:#805000;font-size:.75rem}.cost-ranking .cost-category-basis-note p+p{margin-top:4px}
@container receipts (max-width:680px){.cost-receipts-calculator{grid-template-columns:repeat(2,minmax(0,1fr))}.cost-receipts-calculator>[data-receipt-budget]{grid-column:1/-1;border-top:1px solid var(--line)}.cost-receipts-factors>label:last-child{border-right:0}}
@container(max-width:560px){.cost-receipts-body{grid-template-columns:1fr}.cost-receipts-summary{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}.cost-receipts-summary>div+div{border-left:1px solid var(--line)}.cost-receipts-months label:nth-child(3n){border-right:0}.cost-receipts>header{padding:12px}.cost-receipts-summary dd{font-size:1.125rem}}
@container(max-width:360px){.cost-receipts-months label{padding:10px 8px}.cost-receipts-year{gap:4px}.cost-receipts-year input{width:90px}.cost-receipts-budget dl{grid-template-columns:1fr}.cost-receipts-budget dl>div+div{border-left:0;border-top:1px solid var(--line)}.cost-receipts-budget dl>div+div:before{left:16px;top:-12px}.cost-receipts-budget dt{min-height:0}.cost-receipts-budget dl>div{padding:16px}}
