/* tools-calc.css: the SAFE and dilution calculator and the runway calculator (30 Oct 2026).
   Extends the shared calculator layout (.calc, .calc-inputs, .calc-out in site.css, learn.css
   and studio.css): the currency switch, SAFE rows, the ownership bar and the runway table. */

.tc-calc .calc-inputs{gap:20px}
.tc-sr{position:absolute!important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}
/* Rows can be added, so the inputs never pin themselves taller than the screen. */
@media (min-width:801px){.tc-calc .calc-inputs{position:static}}

/* ---------- Currency switch: four radios as one segmented control ---------- */
.tc-cur{margin:0;padding:0;border:0;min-width:0}
.tc-cur legend{padding:0;margin-bottom:7px;font-size:.84rem;font-weight:600;color:var(--muted)}
.tc-seg{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:4px;padding:4px;border:1px solid #d6e1ed;border-radius:13px;background:#f6f9fc}
.tc-seg label{position:relative;display:block;min-width:0;cursor:pointer}
.tc-seg input{position:absolute;inset:0;width:100%;height:100%;margin:0;opacity:0;cursor:pointer}
.tc-seg span{display:flex;align-items:center;justify-content:center;min-height:40px;border-radius:9px;font-family:var(--font-display);font-size:13.5px;font-weight:600;color:#4a5872;transition:background .2s,color .2s,box-shadow .2s}
.tc-seg input:checked+span{background:#fff;color:var(--ink,#0b1440);box-shadow:0 2px 8px -3px #1d365b44}
.tc-seg input:focus-visible+span{outline:3px solid #087eae;outline-offset:1px}
.tc-peg{margin:6px 0 0;color:#66738b;font-size:12px;line-height:1.5}

/* ---------- SAFE rows ---------- */
.tc-safes{display:grid;gap:12px;margin:0;padding:0;list-style:none}
.tc-safe{display:grid;gap:10px;padding:14px;border:1px solid #e0e8f1;border-radius:14px;background:#fbfcfe}
.tc-safe-h{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:0}
.tc-safe-h b{font-family:var(--font-display);font-size:14px;font-weight:600;color:var(--ink)}
.tc-safe .calc-field label{font-size:.8rem;margin-bottom:5px}
.tc-safe .calc-field input{padding:10px 12px}
.tc-remove{min-height:32px;padding:4px 10px;border:1px solid #d6e1ed;border-radius:9px;background:#fff;color:#4a5872;font:inherit;font-size:12.5px;font-weight:600;cursor:pointer}
.tc-remove:hover{border-color:#e7b4b4;color:#a33b3b}
.tc-remove:focus-visible,.tc-add:focus-visible{outline:3px solid #087eae;outline-offset:2px}
.tc-add{justify-self:start;display:inline-flex;align-items:center;gap:8px;min-height:40px;padding:8px 14px;border:1px dashed #9fcde4;border-radius:11px;background:#f1f9fe;color:#08729d;font:inherit;font-size:14px;font-weight:600;cursor:pointer}
.tc-add:hover{background:#e6f4fb}
.tc-add[disabled]{opacity:.5;cursor:not-allowed}
.tc-check{display:flex;align-items:flex-start;gap:10px;font-size:14px;font-weight:600;color:var(--ink);cursor:pointer}
.tc-check input{width:18px;height:18px;margin-top:3px;accent-color:#087eae;flex:none}
.tc-round{display:grid;gap:14px;padding:14px;border:1px solid #e0e8f1;border-radius:14px;background:#fbfcfe}
.tc-round[hidden]{display:none}
.tc-error{margin:0;padding:12px 14px;border:1px solid #f0c9c9;border-radius:12px;background:#fff6f6;color:#8a2c2c;font-size:14px;line-height:1.55}
.tc-error[hidden]{display:none}

/* ---------- Ownership bar ---------- */
.tc-own{display:grid;gap:12px}
.tc-own-row{display:grid;gap:6px}
.tc-own-row>p{margin:0;font-size:13px;font-weight:600;color:#293461}
.tc-bar{display:flex;height:16px;border-radius:8px;overflow:hidden;background:#eef2f7}
.tc-bar i{display:block;height:100%;min-width:0;transition:flex-basis .35s ease}
.tc-c-founders{background:#0b1440}
.tc-c-safes{background:#0a8ab8}
.tc-c-new{background:#8fd0e8}
.tc-legend{display:flex;flex-wrap:wrap;gap:6px 16px;margin:0;padding:0;list-style:none;font-size:12.5px;color:#4f5b73}
.tc-legend li{display:inline-flex;align-items:center;gap:6px}
.tc-legend i{width:10px;height:10px;border-radius:3px}

/* ---------- Tables ---------- */
.tc-calc .calc-table td.num,.tc-calc .calc-table th.num{text-align:end;white-space:nowrap}
.tc-calc .calc-table tr.is-out td{color:#a33b3b}
.tc-cash{display:grid;gap:4px;min-width:96px}
.tc-cash span{font-variant-numeric:tabular-nums}
.tc-mini{display:block;height:5px;border-radius:3px;background:#eef2f7;overflow:hidden}
.tc-mini i{display:block;height:100%;border-radius:3px;background:#0a8ab8}
.tc-mini.is-raise i{background:#8fd0e8}
.tc-more{margin:10px 0 0;color:#66738b;font-size:12.5px}

.tc-calc .calc-kpis .calc-big small{font-size:.38em;font-weight:600;letter-spacing:0;color:#5c6780;margin-inline-start:6px}

@media (max-width:560px){
  .tc-seg span{min-height:44px;font-size:13px}
  .tc-calc .calc-kpis .calc-big{font-size:2.4rem!important}
}
@media (prefers-reduced-motion:reduce){
  .tc-bar i,.tc-seg span{transition:none}
}
@media (max-width:760px),(pointer:coarse){.tc-remove{min-height:44px}}
