/* Investor calculators (/tools/). Builds on design-2026.css tokens. */
.cx { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: clamp(1.4rem, 3vw, 2.4rem); align-items: start; }
.cx-form, .cx-results { min-width: 0; background: #fff; border: 1px solid var(--rule); border-radius: 16px; box-shadow: var(--shadow); padding: clamp(1.1rem, 3vw, 1.8rem); }
.cx-results { position: sticky; top: 6.5rem; border-top: 4px solid var(--go); }

/* inputs */
.cx-group { border: 0; margin: 0 0 1.4rem; padding: 0; min-width: 0; }
.cx-group + .cx-group { border-top: 1px solid var(--rule); padding-top: 1.2rem; }
.cx-group > legend, .cx-radios > legend { padding: 0; margin-bottom: 0.8rem; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--go); }
.cx-group .fields { gap: 1rem 1.1rem; }
.cx-field { min-width: 0; }
.cx-field label { font-weight: 600; color: var(--ink); }
.cx-in { position: relative; display: block; }
.cx-in input, .cx-field select { width: 100%; min-width: 0; font-size: 1rem; background: #fff; }
.cx-in input { -moz-appearance: textfield; appearance: textfield; }
.cx-in input::-webkit-outer-spin-button, .cx-in input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.cx-in.has-pre input { padding-left: 1.75rem; }
.cx-in.has-suf input { padding-right: 2rem; }
.cx-pre, .cx-suf { position: absolute; top: 50%; transform: translateY(-50%); color: var(--muted); font-weight: 600; pointer-events: none; }
.cx-pre { left: 0.85rem; }
.cx-suf { right: 0.85rem; }
.cx-hint { display: block; font-size: 0.8rem; font-weight: 400; line-height: 1.4; color: var(--muted); }
.cx-hint sup a { color: var(--go); }
.cx-radios { border: 0; margin: 0; padding: 0; min-width: 0; }
.cx-radios > legend { font-size: 0.9rem; letter-spacing: 0; text-transform: none; color: var(--ink); font-weight: 600; margin-bottom: 0.4rem; }
.cx-radios > div { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.cx-radios label { display: inline-flex; align-items: center; gap: 0.5rem; min-height: 44px; padding: 0.5rem 0.95rem; border: 1px solid #b7c4cf; border-radius: 8px; cursor: pointer; font-weight: 600; color: var(--ink); }
.cx-radios label:has(input:checked) { border-color: var(--go); background: #eaf6f2; box-shadow: inset 0 0 0 1px var(--go); }
.cx-radios input { accent-color: var(--go); width: 1.1rem; height: 1.1rem; margin: 0; }
.cx-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.8rem; }

/* results */
.cx-res-h { margin: 0 0 1rem; font-size: 0.85rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--go); }
.cx-big { background: var(--navy); color: #fff; border-radius: 12px; padding: 1rem 1.2rem; }
.cx-big small, .cx-pair small { display: block; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--mint); }
.cx-big b { display: block; font-size: clamp(2rem, 1.6rem + 1.4vw, 2.6rem); font-weight: 800; font-stretch: 112%; line-height: 1.1; margin-top: 0.2rem; overflow-wrap: anywhere; }
.cx-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; margin-top: 0.6rem; }
.cx-pair > div { background: var(--field); border-radius: 10px; padding: 0.7rem 0.9rem; }
.cx-pair small { color: var(--muted); }
.cx-pair b { display: block; font-size: 1.35rem; font-weight: 800; color: var(--ink); font-stretch: 112%; }
.cx-gauge { position: relative; height: 10px; border-radius: 5px; margin: 2.6rem 0.7rem 0.6rem; background: linear-gradient(90deg, #c8d2db 0 50%, var(--go) 50% 100%); }
.cx-gauge i { position: absolute; left: 50%; top: -6px; width: 2px; height: 22px; background: var(--ink); }
.cx-gauge b { position: absolute; top: -8px; width: 24px; height: 24px; margin-left: -12px; border-radius: 50%; background: #fff; border: 4px solid var(--ink); transition: left .2s ease; }
.cx-gauge b::after { content: attr(data-v); position: absolute; top: -28px; left: 50%; transform: translateX(-50%); font-weight: 800; font-size: 0.85rem; color: var(--ink); white-space: nowrap; }
.cx-ticks { font-size: 0.78rem; }
.cx-verdict { margin: 1rem 0 0.4rem; padding: 0.8rem 0.95rem; border-left: 4px solid var(--muted); background: var(--field); border-radius: 0 8px 8px 0; font-size: 0.95rem; line-height: 1.5; color: var(--text); }
.cx-verdict[data-tone="good"] { border-left-color: var(--go); background: #eaf6f2; }
.cx-verdict[data-tone="ok"] { border-left-color: #2f7fb5; background: #edf4fa; }
.cx-verdict[data-tone="warn"] { border-left-color: #b26a00; background: #fbf3e6; }
.cx-verdict[data-tone="bad"] { border-left-color: #b3261e; background: #fbecea; }
.cx-sub { margin: 1.3rem 0 0.2rem; font-size: 0.95rem; color: var(--ink); }
.cx-dl { margin: 0.3rem 0 0; }
.cx-dl > div { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding: 0.55rem 0; border-bottom: 1px solid var(--rule); }
.cx-dl dt { color: var(--muted); font-size: 0.92rem; min-width: 0; }
.cx-dl dd { margin: 0; font-weight: 700; color: var(--ink); text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cx-dl .is-total dt { color: var(--ink); font-weight: 700; }
.cx-dl .is-total dd { font-size: 1.1rem; }
.cx-dl .is-note dd { font-weight: 500; font-size: 0.85rem; color: var(--muted); white-space: normal; }
.cx-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; margin-top: 0.4rem; font-variant-numeric: tabular-nums; }
.cx-table th, .cx-table td { padding: 0.5rem 0.4rem; border-bottom: 1px solid var(--rule); text-align: right; white-space: nowrap; }
.cx-table th:first-child { text-align: left; }
.cx-table thead th { font-size: 0.75rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.cx-table tbody th { color: var(--ink); }
.cx-table td:last-child { font-size: 0.8rem; color: var(--muted); }
.cx-table tr.is-over td, .cx-table tr.is-over th { background: #fbf3e6; }
.cx-table tr.is-over td:last-child { color: #8a5200; font-weight: 600; }
.cx-disc { margin: 1.1rem 0 0; font-size: 0.8rem; line-height: 1.5; color: var(--muted); }

/* how it works */
.cx-how { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: clamp(1.6rem, 4vw, 3rem); align-items: start; }
.cx-formulas { padding-left: 1.2rem; margin: 0; }
.cx-formulas li { margin-bottom: 0.8rem; line-height: 1.55; }
.cx-formulas strong { color: var(--ink); }
.cx-ex-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.cx-ex-table th, .cx-ex-table td { padding: 0.5rem 0; border-bottom: 1px solid var(--rule); font-size: 0.92rem; }
.cx-ex-table th { text-align: left; font-weight: 500; color: var(--muted); padding-right: 1rem; }
.cx-ex-table td { text-align: right; font-weight: 700; color: var(--ink); white-space: nowrap; }
.cx-ex-table .is-total th { color: var(--ink); font-weight: 700; }
.cx-ex-table .is-total td { font-size: 1.1rem; }
.cx-cta .band-title { margin: 0 0 1rem; }
.cx-cta .band-title::before { content: none; counter-increment: none; }

/* hub */
.cx-cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.4rem; }
.cx-card { background: #fff; border: 1px solid var(--rule); border-top: 4px solid var(--go); border-radius: 14px; box-shadow: var(--shadow); padding: 1.4rem 1.4rem 1.2rem; display: flex; flex-direction: column; }
.cx-card h3 { margin: 0 0 0.6rem; font-size: 1.25rem; }
.cx-card h3 a { text-decoration: none; color: var(--ink); }
.cx-card h3 a:hover { color: var(--go); }
.cx-card p { margin: 0 0 0.8rem; }
.cx-card-ex { font-size: 0.88rem; color: var(--muted); background: var(--field); border-radius: 8px; padding: 0.55rem 0.75rem; }
.cx-card-links { margin-top: auto !important; display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem 1rem; }
.cx-card-links .pill { padding: 0.75rem 1.2rem; }
.cx-card-prog { font-size: 0.9rem; font-weight: 600; }

@media (max-width: 960px) {
  .cx, .cx-how, .cx-cards { grid-template-columns: minmax(0, 1fr); }
  .cx-results { position: static; }
}
@media (max-width: 420px) {
  .cx-table th, .cx-table td { padding: 0.45rem 0.25rem; font-size: 0.82rem; }
  .cx-table td:last-child { font-size: 0.72rem; white-space: normal; }
  .cx-dl dt { font-size: 0.86rem; }
}
