.dm-post .dm-finance-tool { margin: 32px 0 40px; padding: 25px; border: 1px solid #cfddf4; border-radius: 18px; background: #f6f9ff; color: #142844; }
body .dm-sidebar-shell article.dm-post .dm-finance-tool h2 { margin: 0 0 8px; padding: 0; font-size: 23px; line-height: 1.4; }
body .dm-sidebar-shell article.dm-post .dm-finance-tool p { margin: 0 0 14px; text-align: left; }
body .dm-sidebar-shell article.dm-post .dm-finance-tool :is(.dm-finance-lead, .dm-finance-note) { color: #54677f; font-size: 14px; line-height: 1.6; }
.dm-finance-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin: 22px 0; }
.dm-finance-field { display: flex; min-width: 0; flex-direction: column; gap: 7px; font-size: 15px; font-weight: 700; }
.dm-finance-field small { color: #61738a; font-size: 12px; font-weight: 400; line-height: 1.5; }
.dm-finance-input { display: flex; align-items: center; min-width: 0; border: 1px solid #b8c9df; border-radius: 10px; background: #fff; }
.dm-finance-input:focus-within { outline: 2px solid #3474e5; outline-offset: 1px; }
.dm-finance-input input, .dm-finance-field select { box-sizing: border-box; width: 100%; min-width: 0; min-height: 48px; padding: 10px 13px; border: 0; border-radius: 10px; background: #fff; color: #142844; font: inherit; font-size: 16px; outline: 0; }
.dm-finance-field select { border: 1px solid #b8c9df; }
.dm-finance-field select:focus-visible { outline: 2px solid #3474e5; outline-offset: 1px; }
.dm-finance-input > span { flex: none; padding-right: 13px; color: #5d6f87; font-size: 14px; font-weight: 500; }
.dm-finance-actions { display: flex; gap: 9px; }
.dm-finance-actions button { min-height: 48px; padding: 10px 18px; border: 1px solid #c1d1e8; border-radius: 10px; background: #fff; color: #24406a; font: inherit; font-weight: 700; cursor: pointer; }
.dm-finance-actions button[type=submit] { flex: 1; border-color: #285ed8; background: #285ed8; color: #fff; }
.dm-finance-actions button:focus-visible, .dm-finance-results summary:focus-visible { outline: 3px solid #7fa8f5; outline-offset: 2px; }
.dm-finance-error { margin-top: 15px !important; color: #b42318; font-weight: 700; }
.dm-finance-results { margin-top: 22px; padding: 20px; border: 1px solid #cfddf4; border-radius: 13px; background: #fff; }
.dm-finance-results[hidden], .dm-finance-error[hidden] { display: none; }
.dm-finance-hero { display: flex; flex-direction: column; gap: 4px; padding-bottom: 16px; border-bottom: 1px solid #e3eaf4; }
.dm-finance-hero > span { color: #526984; font-size: 14px; font-weight: 700; }
.dm-finance-hero strong { color: #1749b2; font-size: clamp(25px, 5vw, 32px); line-height: 1.2; letter-spacing: -.035em; overflow-wrap: anywhere; }
.dm-finance-hero small { color: #61738a; font-size: 12px; line-height: 1.5; }
.dm-finance-totals { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 18px 0; }
.dm-finance-totals > div { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.dm-finance-totals span { color: #61738a; font-size: 12px; }
.dm-finance-totals strong { font-size: 15px; line-height: 1.35; overflow-wrap: anywhere; }
.dm-finance-results details { margin-top: 15px; }
.dm-finance-results summary { padding: 10px 0; color: #204c9f; font-size: 15px; font-weight: 700; cursor: pointer; }
.dm-finance-table-wrap { max-width: 100%; overflow-x: auto; overscroll-behavior-x: contain; }
body .dm-sidebar-shell article.dm-post .dm-finance-table-wrap table { display: table; width: 100%; min-width: 510px; margin: 10px auto; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
.dm-finance-table-wrap :is(th, td) { padding: 10px; border: 1px solid #dfe7f3; text-align: right; vertical-align: middle; white-space: nowrap; }
.dm-finance-table-wrap thead th { background: #edf3fc; color: #294261; font-size: 12px; }
.dm-finance-table-wrap tbody th { background: #f7f9fd; color: #294261; text-align: left; }
.dm-finance-chart { display: grid; gap: 8px; margin: 14px 0 18px; padding: 0; list-style: none; }
.dm-finance-chart li { display: grid; grid-template-columns: 52px minmax(25px, 1fr) auto; align-items: center; gap: 8px; font-size: 12px; }
.dm-finance-chart-track { height: 9px; overflow: hidden; border-radius: 8px; background: #e7eefb; }
.dm-finance-chart-bar { display: block; height: 100%; border-radius: inherit; background: #3972e4; }
.dm-finance-chart strong { font-size: 12px; font-variant-numeric: tabular-nums; }
html[data-dm-theme=dark] .dm-post .dm-finance-tool { border-color: #455c7a; background: #223148; color: #e7edf7; }
html[data-dm-theme=dark] .dm-finance-tool :is(.dm-finance-lead, .dm-finance-note, small) { color: #bdcce1; }
html[data-dm-theme=dark] body .dm-sidebar-shell article.dm-post .dm-finance-tool :is(.dm-finance-lead, .dm-finance-note) { color: #bdcce1; }
html[data-dm-theme=dark] .dm-finance-input, html[data-dm-theme=dark] .dm-finance-input input, html[data-dm-theme=dark] .dm-finance-field select, html[data-dm-theme=dark] .dm-finance-results, html[data-dm-theme=dark] .dm-finance-actions button:not([type=submit]) { border-color: #526985; background: #172437; color: #eff5ff; }
html[data-dm-theme=dark] .dm-finance-hero strong, html[data-dm-theme=dark] .dm-finance-results summary { color: #a9c9ff; }
html[data-dm-theme=dark] .dm-finance-hero > span, html[data-dm-theme=dark] .dm-finance-totals span { color: #c4d2e5; }
html[data-dm-theme=dark] .dm-finance-table-wrap :is(th, td) { border-color: #526985; }
html[data-dm-theme=dark] .dm-finance-table-wrap :is(thead th, tbody th) { background: #30445f; color: #eff5ff; }
html[data-dm-theme=dark] .dm-finance-error { color: #ffb8aa; }
@media (max-width: 520px) {
  .dm-post .dm-finance-tool { margin-inline: 0; padding: 18px 14px; }
  .dm-finance-grid { gap: 12px; }
  .dm-finance-field--wide { grid-column: 1 / -1; }
  .dm-finance-results { padding: 16px 12px; }
  .dm-finance-totals { grid-template-columns: 1fr; gap: 9px; }
  .dm-finance-totals > div { flex-direction: row; justify-content: space-between; align-items: center; gap: 8px; }
  .dm-finance-chart li { grid-template-columns: 42px minmax(20px, 1fr) auto; }
}
