.compound { display:grid; grid-template-columns:minmax(0, 2fr) minmax(320px, .85fr); gap:20px; align-items:start; color:#202923; margin:32px auto 72px; }
.compound * { box-sizing:border-box; }
.compound [hidden] { display:none !important; }
.compound-results { min-width:0; display:grid; gap:14px; }
.compound-intro { padding:12px 0 18px; }
.compound h1 { margin:0 0 12px; font-size:clamp(32px, 3vw, 44px); line-height:1.12; }
.compound-intro p { margin:0; color:#66736b; font-size:17px; }
.compound-intro .compound-note { margin-top:12px; font-size:14px; }
.compound h2 { margin:0; font-size:22px; line-height:1.25; }
.compound-cards, .compound-panel, .compound-settings, .compound-explanation { background:#fff; border:1px solid #e4e7e1; border-radius:16px; }
.compound-cards { display:grid; grid-template-columns:repeat(auto-fit,minmax(150px,1fr)); gap:12px; padding:16px; }
.compound-card { min-width:0; padding:20px 16px; border:1px solid #e4e7e1; border-radius:12px; display:grid; grid-template-columns:minmax(0,1fr); gap:10px; }
.compound-card-primary { background:#edf5f0; border-color:#edf5f0; }
.compound-card .compound-card-icon { color:#0b5d4b; background:#edf5f0; border-radius:8px; padding:6px; width:36px; height:36px; }
.compound-card-icon svg { display:block; width:24px; height:24px; }
.compound-card span { color:#66736b; font-size:14px; }
.compound-card strong { font-size:clamp(19px,2vw,26px); overflow-wrap:anywhere; }
.compound-card-primary strong { color:#0b5d4b; }
.compound-panel { min-width:0; padding:22px; }
.compound-muted { color:#66736b; font-size:14px; margin:7px 0 16px; }
.compound-legend { display:flex; flex-wrap:wrap; gap:8px 18px; font-size:12px; color:#66736b; margin:12px 0; }
.compound-legend span { display:inline-flex; align-items:center; gap:6px; }
.compound-legend i { width:10px; height:10px; border-radius:50%; background:#0b5d4b; }
.compound-legend i[data-color="#77b69c"] { background:#77b69c; }.compound-legend i[data-color="#dda653"] { background:#dda653; }.compound-legend i[data-color="#9b7160"] { background:#9b7160; }.compound-legend i[data-color="#bd7e77"] { background:#bd7e77; }
.compound-chart-scroll, .compound-table-scroll { overflow-x:auto; max-width:100%; }
.compound-chart-scroll svg { display:block; max-width:none; }
.compound-chart-scroll svg text { fill:#66736b; font-size:12px; }.compound-axis { stroke:#b9c3bd; stroke-width:1; }.compound-chart-hit { cursor:pointer; }.compound-chart-scroll g:focus { outline:none; }.compound-chart-scroll g:focus-visible .compound-chart-hit { stroke:#202923; stroke-width:2; }
.compound-chart-detail { min-height:22px; color:#4f6056; font-size:13px; overflow-wrap:anywhere; }
.compound-table-heading { display:flex; flex-wrap:wrap; gap:14px; align-items:center; justify-content:space-between; margin-bottom:12px; }.compound-export { display:flex; flex-wrap:wrap; align-items:center; gap:8px; font-size:13px; }.compound-export label { display:flex; align-items:center; gap:5px; }.compound-export button { padding:8px 14px; border:1px solid #0b5d4b; color:#0b5d4b; border-radius:8px; background:white; cursor:pointer; }.compound-export button:disabled { opacity:.45; cursor:not-allowed; }
.compound table { border-collapse:collapse; width:100%; min-width:670px; font-size:13px; text-align:left; }.compound th, .compound td { padding:12px; border-bottom:1px solid #e4e7e1; white-space:nowrap; }.compound th { background:#f5f7f5; color:#66736b; font-weight:500; }
.compound-explanation { padding:20px 22px; }.compound-explanation summary { cursor:pointer; font-weight:600; }.compound-explanation p { color:#66736b; line-height:1.6; }
.compound-settings { padding:22px; }.compound-settings-heading { display:flex; justify-content:space-between; align-items:center; gap:10px; margin-bottom:22px; }.compound-reset { background:none; border:0; color:#0b5d4b; text-decoration:underline; cursor:pointer; font:inherit; }.compound-settings form { display:grid; gap:17px; }.compound-settings label:not(.compound-check) { display:block; color:#34433a; font-size:14px; }.compound-settings input:not([type=checkbox]), .compound-settings select { display:block; width:100%; height:42px; padding:0 12px; margin-top:7px; border:1px solid #d9e0db; border-radius:8px; background:#fff; color:#202923; font:inherit; }.compound-term { display:flex; gap:7px; }.compound-term input { min-width:0; }.compound-term select { max-width:125px; }.compound-help { color:#66736b; cursor:help; font-size:14px; }.compound-option { border-top:1px solid #e4e7e1; padding-top:15px; }.compound-check { display:flex; align-items:center; gap:8px; font-size:14px; font-weight:600; cursor:pointer; }.compound-check input, .compound-export input { width:18px; height:18px; accent-color:#0b5d4b; flex:none; }.compound-settings fieldset { border:0; margin:12px 0 0; padding:0 0 0 26px; display:grid; gap:13px; min-width:0; }.compound-submit { min-height:50px; border:0; border-radius:10px; background:#0b5d4b; color:white; font:inherit; font-weight:600; cursor:pointer; }.compound-submit:hover { background:#084c3d; }.compound-reset-bottom { justify-self:center; font-size:14px; }.compound-error { color:#a33232; background:#fff1f1; border-radius:8px; padding:10px; margin:0; }.compound-stale { padding:12px 16px; border-radius:10px; background:#fff4dc; color:#704a0a; }
.compound :focus-visible { outline:3px solid #dda653; outline-offset:3px; }
.compound-settings fieldset[data-controls] { margin:0; padding:0; gap:17px; min-width:0; }
.compound-option:has(> .compound-check > input:checked) { padding:16px; border:0; border-radius:12px; background:#edf5f0; }
.compound noscript { grid-column:1 / -1; }
@media (max-width:850px) { .compound { grid-template-columns:minmax(0,1fr); margin-top:20px; }.compound h1 { font-size:32px; }.compound-panel,.compound-settings { padding:18px; } }
@media (max-width:400px) { .compound-cards { grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; padding:10px; }.compound-card { padding:14px 10px; }.compound-card strong { font-size:18px; }.compound-table-heading { align-items:flex-start; }.compound-settings-heading h2 { font-size:20px; } }
.calculator-navigation{border-bottom:1px solid var(--line);margin-top:-28px;background:#fff}
.calculator-navigation-inner{display:flex;gap:4px;align-items:center;overflow-x:auto;padding-block:14px;scrollbar-width:thin;white-space:nowrap}
.calculator-navigation-inner>a,.calculator-navigation-upcoming{flex:none;display:inline-flex;align-items:center;gap:8px;padding:10px;border-radius:9px;font-size:13px;text-decoration:none;min-height:44px}
.calculator-navigation-inner>a:hover,.calculator-navigation-inner>a:focus-visible{background:var(--mint)}
.calculator-navigation-inner>a[aria-current=page]{background:var(--green);color:#fff}
.calculator-navigation-upcoming{color:#77847b}.calculator-navigation-upcoming small{font-size:9px;padding:2px 5px;background:#f1f4f1;border-radius:4px}
.calculator-navigation-inner svg{width:24px;height:24px;flex:none;color:var(--green)}
.calculator-navigation-inner>a[aria-current=page] svg{color:#fff}
.calculator-navigation-upcoming>span{display:grid;gap:2px}.calculator-navigation-upcoming small{justify-self:start;padding:0;background:none}
.calculator-navigation-all{margin-left:auto;border-left:1px solid var(--line)}
.calculator-index{margin:40px 0 70px}.calculator-index-intro{max-width:780px;margin-bottom:32px}.calculator-index-intro p{color:var(--muted)}
.calculator-index-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px}.calculator-index-card{background:#fff;border:1px solid var(--line);padding:28px;border-radius:16px}.calculator-index-card h2{font-size:23px}.calculator-index-card p{color:var(--muted);font-size:14px}.calculator-index-card-upcoming{background:#f3f5f1;color:var(--muted)}
@media(max-width:850px){.calculator-index-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:600px){.calculator-navigation-inner>a,.calculator-navigation-upcoming{font-size:12px;padding:9px 12px}.calculator-index-grid{grid-template-columns:1fr}}

/* Порядок блоков сохраняет заголовок перед настройками на узком экране. */
.compound { grid-template-areas:"intro settings" "results settings"; grid-template-rows:auto 1fr; }
.compound-intro { grid-area:intro; }
.compound-results { grid-area:results; }
.compound-settings { grid-area:settings; }
.compound-gridline { stroke:#e4e7e1; stroke-width:1; }
.compound-chart-scroll svg .compound-tick { font-size:11px; }
.compound-help { position:relative; display:inline-block; border-radius:50%; line-height:1; }
.compound-help::after { content:attr(data-help); position:absolute; z-index:10; right:-20px; bottom:calc(100% + 8px); width:max-content; max-width:min(200px, 50vw); padding:9px 11px; border:1px solid #d9e0db; border-radius:8px; background:#fff; color:#202923; box-shadow:0 4px 16px #20292324; font-size:12px; font-weight:400; line-height:1.4; white-space:normal; visibility:hidden; opacity:0; pointer-events:none; }
.compound-help.is-open::after, .compound-help:focus-visible:not(.is-dismissed)::after { visibility:visible; opacity:1; }
@media (hover:hover) { .compound-help:hover:not(.is-dismissed)::after { visibility:visible; opacity:1; } }
@media (max-width:850px) { .compound { grid-template-areas:"intro" "settings" "results"; grid-template-rows:auto; } }

/* Результаты и настройки начинаются на одной высоте; экспорт находится рядом с заголовком. */
.compound { grid-template-areas:"intro export" "results settings"; }
.compound-export-open { grid-area:export; align-self:center; justify-self:stretch; min-height:50px; padding:0 18px; border:0; border-radius:10px; background:#0b5d4b; color:#fff; font:inherit; font-weight:600; cursor:pointer; }
.compound-export-open:hover { background:#084c3d; }
.compound-export-open:disabled, .compound-dialog button:disabled { opacity:.45; cursor:not-allowed; }
.compound-card strong { min-width:0; width:100%; max-width:100%; white-space:nowrap; overflow-wrap:normal; }
.compound-chart-scroll { position:relative; overflow:visible; width:100%; }
.compound-chart-scroll svg { width:100%; max-width:100%; }
.compound-chart-scroll svg .compound-year-label { font-size:10px; font-weight:300; }
.compound-chart-detail { position:absolute; z-index:5; width:max-content; max-width:100%; min-height:0; padding:14px 16px; border:1px solid #e4e7e1; border-radius:12px; background:#fff; color:#202923; box-shadow:0 6px 24px #20292326; font-size:13px; pointer-events:none; }
.compound-chart-detail > strong { display:block; margin-bottom:9px; }
.compound-tooltip-row, .compound-tooltip-total { display:grid; grid-template-columns:10px minmax(0,1fr) auto; gap:8px; align-items:center; margin-top:6px; }
.compound-tooltip-row i { width:9px; height:9px; border-radius:50%; background:#0b5d4b; }
.compound-tooltip-row i[data-color="#77b69c"] { background:#77b69c; }.compound-tooltip-row i[data-color="#dda653"] { background:#dda653; }.compound-tooltip-row i[data-color="#9b7160"] { background:#9b7160; }.compound-tooltip-row i[data-color="#bd7e77"] { background:#bd7e77; }
.compound-tooltip-row b, .compound-tooltip-total b { text-align:right; white-space:nowrap; }
.compound-tooltip-total { grid-template-columns:1fr auto; border-top:1px solid #e4e7e1; padding-top:8px; margin-top:10px; }
.compound-dialog { width:min(420px, calc(100% - 32px)); padding:24px; border:1px solid #e4e7e1; border-radius:16px; color:#202923; box-shadow:0 16px 50px #20292333; }
.compound-dialog::backdrop { background:#20292380; }
.compound-dialog-heading { display:flex; justify-content:space-between; align-items:center; gap:16px; }
.compound-dialog-heading button { border:0; background:none; font-size:28px; cursor:pointer; }
.compound-dialog fieldset { display:flex; gap:20px; margin:22px 0; padding:0; border:0; }
.compound-dialog legend { margin-bottom:12px; font-weight:600; }
.compound-dialog label { display:flex; align-items:center; gap:8px; }
.compound-dialog input { width:18px; height:18px; accent-color:#0b5d4b; }
.compound-dialog .compound-submit { width:100%; margin-top:22px; }
.compound-dialog .compound-error { margin-top:16px; }
@media (max-width:850px) { .compound { grid-template-areas:"intro" "export" "settings" "results"; }.compound-export-open { justify-self:stretch; }.compound-cards { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media (max-width:400px) { .compound-cards { grid-template-columns:1fr; } }

.compound-faq { display:grid; gap:12px; }
.compound-faq p { line-height:1.6; }
.compound-formula { overflow-wrap:anywhere; font-weight:600; }

.compound-chart-scroll svg.has-selection g[role=button] > rect:not(.compound-chart-hit) { opacity:.28; }
.compound-chart-scroll svg.has-selection g.is-selected > rect:not(.compound-chart-hit) { opacity:1; filter:brightness(1.18); }
.compound-chart-detail { max-height:100%; overflow-y:auto; pointer-events:auto; }
.compound-tooltip-row { grid-template-columns:10px minmax(0,1fr) minmax(0,auto); }
.compound-tooltip-total { grid-template-columns:minmax(0,1fr) minmax(0,auto); }
.compound-tooltip-row b, .compound-tooltip-total b { min-width:0; white-space:normal; overflow-wrap:anywhere; }
.compound tbody tr:hover { background:#e4f0e9; }
.calculator-index-card-link { display:block; color:inherit; text-decoration:none; transition:background-color .16s, border-color .16s; }
.calculator-index-card-link:hover, .calculator-index-card-link:focus-visible { background:#e4f0e9; border-color:#b7d6c4; }
.calculator-index-card-link:focus-visible { outline:3px solid #dda653; outline-offset:3px; }
.calculator-index-card-link:active { background:#d2e8db; }
.calculator-index-open { display:inline-block; margin-top:8px; color:#0b5d4b; font-weight:600; }
@media (prefers-reduced-motion:reduce) { .calculator-index-card-link { transition:none; } }

.compound-settings .calculator-input-unit { position:relative; display:block; margin-top:7px; }
.compound-settings .calculator-input-unit input:not([type=checkbox]) { margin-top:0; padding-right:52px; }
.compound-settings .calculator-input-unit > span { position:absolute; right:13px; top:50%; transform:translateY(-50%); color:#66736b; pointer-events:none; }
.compound-term .calculator-input-unit { flex:1; min-width:0; }

.calculator-pager { display:flex; flex-wrap:wrap; align-items:center; gap:8px; margin-top:14px; color:#34433a; font-size:14px; }
.calculator-pager[hidden] { display:none; }
.calculator-pager button, .calculator-pager select { min-height:44px; padding:8px 12px; border:1px solid #d9e0db; border-radius:8px; background:#fff; color:#0b5d4b; font:inherit; }
.calculator-pager button:disabled { opacity:.45; }
.calculator-pager button:not(:disabled):hover, .calculator-pager button:focus-visible, .calculator-pager select:focus-visible { background:#edf5f0; }
@media(max-width:600px){
 .calculator-pager{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);}
 .calculator-pager>label{grid-column:1/-1;grid-row:1;display:flex;align-items:center;justify-content:space-between;gap:8px;min-width:0;}
 .calculator-pager select{min-width:0;max-width:65%;}
 .calculator-pager>button{grid-row:2;}
}
