/* Compound interest calculator (#56) */
.compound-panel{display:grid;gap:1.25rem}.compound-heading,.compound-result-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:1rem}.compound-heading h2,.compound-result-heading h2{margin:.15rem 0}.compound-heading-actions,.compound-result-actions{display:flex;align-items:center;gap:.65rem;flex-wrap:wrap}.compound-step{margin:0;color:var(--color-primary);font-size:.75rem;font-weight:800;letter-spacing:.12em}.compound-mode-tabs{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.5rem}.compound-mode-tabs button{min-width:0;padding:.8rem .55rem;border:1px solid var(--color-border);border-radius:.7rem;background:#fff;color:var(--color-text);font:inherit;font-weight:700;cursor:pointer}.compound-mode-tabs button[aria-selected="true"]{border-color:var(--color-primary);background:#e8f6f3;color:#0c5c55;box-shadow:inset 0 0 0 1px var(--color-primary)}.compound-mode-tabs button:focus-visible,.compound-input:focus-visible,.compound-timing input:focus-visible+label{outline:3px solid #f2a93b;outline-offset:2px}.compound-field-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1rem}.compound-field-grid>label,.compound-period-grid label{display:grid;gap:.45rem;min-width:0;font-weight:700}.compound-input-wrap{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:.55rem}.compound-input{width:100%;min-width:0;padding:.78rem .85rem;border:1px solid var(--color-border);border-radius:.6rem;background:#fff;color:var(--color-text);font:inherit}.compound-period,.compound-timing{min-width:0;margin:0;padding:1rem;border:1px solid var(--color-border);border-radius:.75rem}.compound-period legend,.compound-timing legend{padding:0 .3rem;font-weight:800}.compound-period-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1rem}.compound-timing>div{display:flex;gap:.65rem;flex-wrap:wrap}.compound-timing input{position:absolute;opacity:0;pointer-events:none}.compound-timing label{display:inline-flex;padding:.65rem .9rem;border:1px solid var(--color-border);border-radius:999px;background:#fff;cursor:pointer;font-weight:700}.compound-timing input:checked+label{border-color:var(--color-primary);background:#e8f6f3;color:#0c5c55}.compound-field-note,.compound-disclaimer{margin:0;padding:.85rem 1rem;border-radius:.65rem;background:#f3f7f6;color:#3e5552;font-size:.9rem}.compound-calculate{width:100%}.compound-results{display:grid;gap:1rem;padding-top:1rem;border-top:1px solid var(--color-border)}.compound-main-result{display:grid;gap:.25rem;padding:1.1rem;border-radius:.85rem;background:linear-gradient(135deg,#0e675f,#17877c);color:#fff}.compound-main-result strong{overflow-wrap:anywhere;font-size:clamp(1.65rem,6vw,2.5rem)}.compound-result-grid,.compound-target-result{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.7rem}.compound-result-grid>div,.compound-target-result>div{display:grid;gap:.35rem;min-width:0;padding:.85rem;border:1px solid var(--color-border);border-radius:.7rem;background:#fff}.compound-result-grid strong,.compound-target-result strong{overflow-wrap:anywhere;font-size:1.15rem}.compound-target-result{grid-template-columns:repeat(2,minmax(0,1fr));padding:.9rem;border-radius:.8rem;background:#fff8e8}.compound-breakdown{display:grid;gap:.55rem}.compound-breakdown-bar{display:flex;overflow:hidden;height:1rem;border-radius:999px;background:#eef1f0}.compound-breakdown-bar span{display:block;min-width:0}.compound-breakdown-bar span:first-child{background:#559c93}.compound-breakdown-bar span:last-child{background:#f2a93b}.compound-legend,.compound-chart-legend{display:flex;gap:1rem;flex-wrap:wrap;font-size:.88rem}.compound-key{display:inline-block;width:.85rem;height:.85rem;margin-right:.35rem;border-radius:.2rem;vertical-align:-.1rem}.compound-key--principal{background:#559c93}.compound-key--gain{background:#f2a93b}.compound-chart-section,.compound-table-section{min-width:0;padding:1rem;border:1px solid var(--color-border);border-radius:.8rem;background:#fff}.compound-chart-section h3,.compound-table-section h3{margin-top:0}.compound-chart{display:block;width:100%;height:auto;min-height:220px;overflow:visible}.compound-chart-grid{stroke:#dbe5e3;stroke-width:1}.compound-chart-label{fill:#536663;font-size:11px}.compound-line{fill:none;stroke-linecap:round;stroke-linejoin:round;stroke-width:4}.compound-line--asset{stroke:#d98d16}.compound-line--principal{stroke:#26796f;stroke-width:3;stroke-dasharray:8 6}.compound-table-scroll{max-width:100%;overflow-x:auto}.compound-table-scroll table{width:100%;border-collapse:collapse;font-size:.92rem}.compound-table-scroll th,.compound-table-scroll td{padding:.65rem .55rem;border-bottom:1px solid var(--color-border);text-align:right;white-space:nowrap}.compound-table-scroll th:first-child{text-align:left}.compound-result-actions{justify-content:flex-start}.compound-result-actions [role="status"]{min-height:1.4em}.compound-disclaimer{border-left:4px solid #d98d16;background:#fff8e8}
@media (max-width:640px){.compound-heading,.compound-result-heading{display:grid}.compound-field-grid,.compound-result-grid,.compound-target-result{grid-template-columns:1fr}.compound-mode-tabs{grid-template-columns:1fr}.compound-heading-actions .button-secondary{flex:1}.compound-chart-section,.compound-table-section{padding:.75rem}.compound-chart{min-height:180px}}
@media (max-width:360px){.compound-panel,.compound-field-grid,.compound-period-grid,.compound-results{min-width:0}.compound-period-grid{grid-template-columns:1fr}.compound-heading-actions{display:grid;grid-template-columns:1fr;width:100%}.compound-heading-actions .button-secondary{width:100%}.compound-input-wrap{grid-template-columns:minmax(0,1fr) auto}.compound-main-result{padding:.9rem}.compound-table-scroll th,.compound-table-scroll td{padding:.5rem .38rem;font-size:.78rem}.compound-chart-label{font-size:9px}.compound-result-actions{display:grid}.compound-result-actions .button-primary{width:100%}}
