/* HG-0108 step 32: tools pages (depreciation calculator, financial ratios analyser). */
html body .hs-tools-page [hidden] { display: none !important; }
html body .hs-tools-eyebrow { margin: 0 0 .5rem; font-size: .875rem; font-weight: 700; color: #7a5a00; }
html body .hs-tools-page .hs-calc-head p:last-child { max-inline-size: 60rem; }

/* Shared tool layout */
html body .hs-tool { display: grid; gap: 1.5rem; padding: clamp(1.25rem, 1rem + 1vw, 2rem); grid-template-columns: minmax(0, 1fr); }
html body .hs-tool-intro h2 { margin: 0 0 .375rem; font-size: clamp(1.25rem, 1.05rem + .6vw, 1.5rem); line-height: 1.35; color: #351b62; }
html body .hs-tool-intro p { margin: 0; max-inline-size: 60rem; color: #4a4257; font-size: .9375rem; line-height: 1.6; }
html body .hs-tool-form { display: grid; gap: 1rem; margin: 0; align-content: start; min-inline-size: 0; }
html body .hs-tool-grid { display: grid; gap: .875rem 1rem; grid-template-columns: minmax(0, 1fr); align-items: end; }
@media (min-width: 36em) {
	html body .hs-tool-grid:not(.is-single) { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
	html body .hs-tool-grid:not(.is-single) > .is-wide { grid-column: 1 / -1; }
}
html body .hs-tool-field { display: grid; gap: .375rem; min-inline-size: 0; }
html body .hs-tool-field > label { font-size: .875rem; font-weight: 600; color: #20182b; line-height: 1.35; }
html body .hs-tool-form input[type="text"], html body .hs-tool-form select, html body .hs-tool-form textarea { inline-size: 100%; min-inline-size: 0; min-block-size: 2.75rem; margin: 0; font: inherit; font-size: 1rem; padding: .625rem .75rem; border: 1px solid #cfc6dc; border-radius: 8px; background-color: #fff; color: #20182b; font-variant-numeric: tabular-nums; }
html body .hs-tool-form select { appearance: none; -webkit-appearance: none; padding-inline-end: 2.25rem; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5l5-5' fill='none' stroke='%23351b62' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right .875rem center; background-size: 12px 8px; text-overflow: ellipsis; cursor: pointer; }
html body .hs-tool-form textarea { resize: vertical; line-height: 1.45; }
html body .hs-tool-form input:focus, html body .hs-tool-form select:focus, html body .hs-tool-form textarea:focus { outline: 2px solid #351b62; outline-offset: 0; border-color: #351b62; }
html body .hs-tool-check { display: flex; align-items: flex-start; gap: .625rem; margin: 0; font-size: .9375rem; line-height: 1.45; color: #20182b; cursor: pointer; }
html body .hs-tool-check input { margin: .2rem 0 0; inline-size: 1.05rem; block-size: 1.05rem; flex: none; accent-color: #351b62; }
html body .hs-tool-hint { margin: 0; font-size: .875rem; line-height: 1.55; color: #6b6378; max-inline-size: none; }
html body .hs-tool-hint.is-method { padding: .75rem 1rem; background: #f7f5fa; border-radius: 8px; color: #4a4257; }
html body .hs-tool-privacy { margin: 0; font-size: .8125rem; line-height: 1.5; color: #6b6378; max-inline-size: none; }
html body .hs-tool-side { display: grid; gap: 1rem; align-content: start; min-inline-size: 0; }
html body .hs-tool-side .hs-calc-warning { margin: 0; }
html body .hs-tool-side .hs-calc-row dd { white-space: normal; text-align: end; }
html body .hs-tool-xlsx { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; }
html body .hs-tool-xlsx svg { flex: none; }
html body .hs-tool-xlsx:disabled { opacity: .5; cursor: not-allowed; }
html body .hs-tool-side .hs-tool-xlsx { inline-size: 100%; }
html body .hs-tool-ghost { background: #fff; color: #351b62; border: 1px solid #351b62; }
html body .hs-tool-ghost:hover, html body .hs-tool-ghost:focus-visible { background: #f7f5fa; color: #351b62; }
html body .hs-tool-link { appearance: none; border: 0; background: none; padding: .5rem .25rem; font: inherit; font-size: .9375rem; font-weight: 600; color: #351b62; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
html body .hs-tool-link:hover { color: #20182b; }
html body .hs-tool-link:focus-visible, html body .hs-tool-ghost:focus-visible { outline: 2px solid #f4c84a; outline-offset: 2px; }
html body .hs-tool-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1rem; }

/* Depreciation schedule table */
html body .hs-tool-table-wrap { min-inline-size: 0; }
html body .hs-tool-table-wrap h3 { margin: 0 0 .75rem; font-size: 1.0625rem; color: #351b62; }
html body .hs-tool-scroll { overflow-x: auto; border: 1px solid #e3deea; border-radius: 10px; -webkit-overflow-scrolling: touch; }
html body .hs-tool-scroll:focus-visible { outline: 2px solid #351b62; outline-offset: 2px; }
html body .hs-tool-table { inline-size: 100%; min-inline-size: 38rem; margin: 0; border-collapse: collapse; font-size: .9375rem; font-variant-numeric: tabular-nums; }
html body .hs-tool-table th, html body .hs-tool-table td { padding: .625rem .875rem; border: 0; border-block-end: 1px solid #ece7f3; text-align: start; white-space: nowrap; }
html body .hs-tool-table thead th { background: #f7f5fa; font-size: .8125rem; font-weight: 700; color: #4a4257; vertical-align: bottom; white-space: normal; }
html body .hs-tool-table thead th:not(:first-child), html body .hs-tool-table .is-num { text-align: end; }
html body .hs-tool-table tbody tr:nth-child(even) td { background: #fcfbfd; }
html body .hs-tool-table tbody tr:hover td { background: #f7f5fa; }
html body .hs-tool-table .is-strong { font-weight: 700; color: #351b62; }
html body .hs-tool-table tfoot td { background: #f7f5fa; font-weight: 700; color: #351b62; border-block-end: 0; }
html body .hs-tool-table th:first-child, html body .hs-tool-table td:first-child { position: sticky; inset-inline-start: 0; z-index: 1; background-clip: padding-box; }
html body .hs-tool-table tbody td:first-child { background: #fff; font-weight: 600; }
html body .hs-tool-table tbody tr:nth-child(even) td:first-child { background: #fcfbfd; }

@media (min-width: 60em) {
	html body .hs-tool--dep { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 1.75rem 2rem; }
	html body .hs-tool--dep > .hs-tool-intro, html body .hs-tool--dep > .hs-tool-table-wrap { grid-column: 1 / -1; }
}

/* Financial ratios */
html body .hs-tool-fs { margin: 0; padding: 1rem 1.25rem 1.25rem; border: 1px solid #e3deea; border-radius: 12px; background: #fff; min-inline-size: 0; }
html body .hs-tool-fs > legend { float: left; inline-size: 100%; margin: 0 0 .875rem; padding: 0; font-size: 1.0625rem; font-weight: 700; color: #351b62; }
html body .hs-tool-fs > legend + * { clear: both; }
html body .hs-tool-grid.is-single { gap: .625rem; }
html body .hs-tool-grid.is-single > .hs-tool-field { grid-template-columns: minmax(0, 1fr) minmax(7.5rem, 9.5rem); align-items: center; gap: .75rem; }
html body .hs-tool-grid.is-single > .hs-tool-field > label { font-weight: 500; font-size: .875rem; color: #4a4257; overflow-wrap: break-word; }
html body .hs-tool-grid.is-single input[type="text"] { text-align: end; padding-inline: .625rem; }
html body .hs-tool-sub { margin: .375rem 0 0; font-size: .8125rem; font-weight: 700; color: #351b62; max-inline-size: none; }
html body .hs-tool-grid.is-single > .hs-tool-sub:first-child { margin-block-start: 0; }
html body .hs-tool-grid.is-single > .hs-tool-field.is-total { grid-template-columns: minmax(0, 1fr) auto; padding-block: .5rem; border-block-start: 1px solid #e3deea; }
html body .hs-tool-total-label { font-size: .875rem; font-weight: 700; line-height: 1.35; color: #20182b; overflow-wrap: break-word; }
html body .hs-tool-field.is-total output { min-inline-size: 6.75rem; padding-inline: .625rem; text-align: end; font-weight: 700; color: #351b62; font-variant-numeric: tabular-nums; white-space: nowrap; }
html body .hs-tool-grid.is-single > .hs-tool-field.is-grand { padding-inline-start: .625rem; border-block-start: 0; border-radius: 8px; background: #f7f5fa; }
html body .hs-tool-field.is-grand .hs-tool-total-label { color: #351b62; }
html body .hs-tool-field.is-total.is-off output, html body .hs-tool-field.is-total.is-off .hs-tool-total-label, html body .hs-tool-field.is-total.is-neg output { color: #b42318; }
html body .hs-tool-fs > .hs-tool-hint { margin-block-end: .75rem; font-size: .8125rem; }
html body .hs-ratio-results { display: grid; gap: 1rem; align-content: start; min-inline-size: 0; }
html body .hs-ratio-results > .hs-calc-warning { margin: 0; }
html body .hs-ratio-summary { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; padding: .75rem 1rem; background: #f7f5fa; border-radius: 10px; }
html body .hs-ratio-summary-title { font-weight: 700; color: #351b62; margin-inline-end: .25rem; }
html body .hs-ratio-pill { display: inline-flex; align-items: center; gap: .375rem; padding: .25rem .75rem; border-radius: 999px; font-size: .875rem; font-weight: 600; }
html body .hs-ratio-pill b { font-variant-numeric: tabular-nums; }
html body .hs-ratio-group { margin: .5rem 0 0; font-size: 1.0625rem; color: #351b62; }
html body .hs-ratio-grid { display: grid; gap: .75rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr)); }
html body .hs-ratio { display: grid; gap: .375rem; align-content: start; margin: 0; padding: 1rem 1rem 1rem 1.125rem; border: 1px solid #e3deea; border-inline-start: 4px solid #cfc6dc; border-radius: 10px; background: #fff; min-inline-size: 0; }
html body .hs-ratio-top { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: .25rem .5rem; }
html body .hs-ratio-name { flex: 1 1 9rem; margin: 0; font-size: .9375rem; font-weight: 700; line-height: 1.35; color: #20182b; }
html body .hs-ratio-chip { flex: none; padding: .125rem .5rem; border-radius: 999px; font-size: .75rem; font-weight: 700; line-height: 1.5; white-space: nowrap; }
html body .hs-ratio-value { margin: 0; font-size: 1.5rem; font-weight: 700; line-height: 1.2; color: #351b62; font-variant-numeric: tabular-nums; }
html body .hs-ratio.is-empty .hs-ratio-value { color: #a39cae; }
html body .hs-ratio-formula { margin: 0; font-size: .8125rem; line-height: 1.45; color: #6b6378; max-inline-size: none; }
html body .hs-ratio-meaning { margin: 0; font-size: .875rem; line-height: 1.5; color: #4a4257; max-inline-size: none; }
html body .hs-ratio.is-good { border-inline-start-color: #1f7a4d; }
html body .hs-ratio.is-watch { border-inline-start-color: #d9a21b; }
html body .hs-ratio.is-weak { border-inline-start-color: #b42318; }
html body .hs-ratio.is-neutral { border-inline-start-color: #8a7fa0; }
html body .hs-ratio.is-good .hs-ratio-chip, html body .hs-ratio-pill.is-good { background: #e5f4ec; color: #17603c; }
html body .hs-ratio.is-watch .hs-ratio-chip, html body .hs-ratio-pill.is-watch { background: #fff3d1; color: #7a5a00; }
html body .hs-ratio.is-weak .hs-ratio-chip, html body .hs-ratio-pill.is-weak { background: #fdeceb; color: #9a1d14; }
html body .hs-ratio.is-neutral .hs-ratio-chip { background: #f0edf5; color: #4a4257; }
html body .hs-ratio-results > .hs-tool-xlsx { justify-self: start; }

@media (min-width: 64em) {
	html body .hs-tool--ratios { grid-template-columns: minmax(20rem, 25rem) minmax(0, 1fr); gap: 1.75rem 2rem; align-items: start; }
	html body .hs-tool--ratios > .hs-tool-intro { grid-column: 1 / -1; }
}
@media (max-width: 35.99em) {
	html body .hs-tool-table { font-size: .875rem; }
	html body .hs-tool-table th, html body .hs-tool-table td { padding: .5rem .625rem; }
	html body .hs-tool-grid.is-single > .hs-tool-field { grid-template-columns: minmax(0, 1fr) 6.75rem; gap: .5rem; }
	html body .hs-tool { padding: 1rem; }
	html body .hs-tool-fs { padding: .75rem .75rem 1rem; }
	html body .hs-tool-actions .hs-button, html body .hs-ratio-results > .hs-tool-xlsx { inline-size: 100%; justify-content: center; }
	html body .hs-tool-field.is-total output { min-inline-size: 0; padding-inline: .5rem; }
	html body .hs-tool-grid.is-single > .hs-tool-field.is-grand { padding-inline-start: .5rem; }
	html body .hs-tool-total-label { font-size: .8125rem; }
}
