/* Runway calculator. Uses the tokens in /assets/site.css. */
.rc { margin-top: 34px; }
.rc-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--grid-strong); border: 1px solid var(--grid-strong); border-radius: 6px; overflow: hidden; }
.rc-fields.two { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 14px; }
.rc-field { display: flex; flex-direction: column; gap: 8px; background: var(--bg-3); padding: 16px; }
.rc-field > span:first-child { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-2); }
.rc-field small { font-size: 12.5px; color: var(--ink-3); line-height: 1.45; }
.rc-input { display: flex; align-items: center; gap: 6px; border-bottom: 1px solid var(--grid-strong); padding-bottom: 4px; }
.rc-input:focus-within { border-bottom-color: var(--accent); }
.rc-input i { font-style: normal; font-family: var(--mono); color: var(--ink-3); font-size: 18px; }
.rc-input input {
  flex: 1; min-width: 0; border: 0; background: transparent; outline: none;
  font-family: var(--mono); font-size: 22px; font-weight: 500; color: var(--ink); padding: 2px 0;
}
.rc-input input::placeholder { color: var(--grid-strong); }

.rc-whatif { margin-top: 18px; }
.rc-whatif summary { cursor: pointer; font-weight: 500; list-style: none; display: flex; gap: 10px; align-items: baseline; }
.rc-whatif summary::-webkit-details-marker { display: none; }
.rc-whatif summary::before { content: '+'; font-family: var(--mono); color: var(--accent); width: 12px; }
.rc-whatif[open] summary::before { content: '−'; }
.rc-whatif summary span { font-size: 13.5px; color: var(--ink-3); font-weight: 400; }

.rc-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.rc-actions .btn { padding: 11px 16px; font-size: 11px; }

.rc-error { margin-top: 22px; padding: 14px 16px; border-radius: 4px; background: var(--accent-soft); color: var(--ink); font-size: 14.5px; }

#rc-results { margin-top: 30px; }
#rc-results .results .stat .n { font-size: 22px; }
.rc-note { margin-top: 14px; font-size: 14px; color: var(--ink-2); line-height: 1.6; max-width: 64ch; }

.rc-chart { margin-top: 26px; background: var(--bg-3); border: 1px solid var(--grid-strong); border-radius: 6px; padding: 14px 10px 6px; }
.rc-chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.rc-chart text { font-family: var(--mono); font-size: 10px; fill: var(--ink-3); }
.rc-chart .line { fill: none; stroke: var(--accent); stroke-width: 2; }
.rc-chart .dot { fill: var(--accent); }
.rc-chart .dot.neg { fill: var(--ink); }
.rc-chart .zero { stroke: var(--ink); stroke-width: 1; stroke-dasharray: 3 3; }
.rc-chart .gridline { stroke: var(--grid); stroke-width: 1; }

.rc-table-wrap { margin-top: 22px; overflow-x: auto; border: 1px solid var(--grid-strong); border-radius: 6px; background: var(--bg-3); }
.rc-table-wrap:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.rc-table { width: 100%; border-collapse: collapse; font-family: var(--mono); font-size: 12.5px; min-width: 520px; }
.rc-table th { text-align: right; font-weight: 500; font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); padding: 10px 12px; border-bottom: 1px solid var(--grid-strong); }
.rc-table td { text-align: right; padding: 8px 12px; border-bottom: 1px solid var(--grid); }
.rc-table th:first-child, .rc-table td:first-child { text-align: left; }
.rc-table tr:last-child td { border-bottom: 0; }
.rc-table td.neg { color: var(--accent); font-weight: 700; }

.rc .prose { margin-top: 20px; }

@media (max-width: 760px) {
  .rc-fields, .rc-fields.two { grid-template-columns: 1fr; }
}
