/* Kollel-years budget (tools/kollel-budget.html). Frame: tool-frame.css + tools/kit.css. */

/* Huge answer */
.kb-figure { font-size: clamp(64px, 8vw, 112px); letter-spacing: -0.04em; margin-top: 14px; }
.kb-figure--long { font-size: clamp(52px, 5.6vw, 80px); }
.kb-summary { align-self: stretch; display: flex; flex-direction: column; justify-content: center; }
.kb-summary .tf-subs { grid-template-columns: repeat(2, minmax(0, 1fr)); }

/* Chart (hero visual, on the stage) */
.kb-chart { margin: 56px 0 0; padding: clamp(20px, 3vw, 36px); background: var(--stage-2); border: 1px solid var(--hair-stage); border-radius: var(--r-panel); }
.kb-chart-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 12px 24px; margin-bottom: 12px; }
.kb-chart-title { font: 400 clamp(22px, 2vw, 28px)/1.2 var(--font-display); letter-spacing: -0.015em; color: var(--parchment); }
.kb-legend { display: flex; flex-wrap: wrap; gap: 8px 16px; font: 400 13px/1 var(--font-sans); color: var(--parchment-2); }
.kb-legend > span { display: inline-flex; align-items: center; gap: 7px; }
.kb-sw { display: inline-block; width: 12px; height: 12px; border-radius: 3px; }
.kb-sw--0 { background: rgba(236, 230, 216, .86); }
.kb-sw--1 { background: rgba(236, 230, 216, .62); }
.kb-sw--2 { background: rgba(236, 230, 216, .44); }
.kb-sw--3 { background: rgba(236, 230, 216, .3); }
.kb-sw--4 { background: rgba(236, 230, 216, .18); box-shadow: inset 0 0 0 1px rgba(236, 230, 216, .4); }
.kb-sw--inc { height: 3px; width: 16px; border-radius: 2px; background: var(--kesef); }
.kb-plot { width: 100%; min-height: 300px; }
@media (min-width: 600px) { .kb-plot { min-height: 380px; } }
.kb-svg { display: block; width: 100%; height: auto; overflow: visible; }
.kb-grid { stroke: rgba(236, 230, 216, .1); stroke-width: 1; }
.kb-axis { font: 400 12px var(--font-sans); fill: rgba(236, 230, 216, .62); font-variant-numeric: tabular-nums; }
.kb-axis--hot { fill: var(--parchment); font-weight: 500; }
.kb-seg { stroke: var(--stage-2); stroke-width: 1; }
.kb-seg--0 { fill: rgba(236, 230, 216, .86); }
.kb-seg--1 { fill: rgba(236, 230, 216, .62); }
.kb-seg--2 { fill: rgba(236, 230, 216, .44); }
.kb-seg--3 { fill: rgba(236, 230, 216, .3); }
.kb-seg--4 { fill: rgba(236, 230, 216, .18); }
.kb-income { stroke: var(--kesef); stroke-width: 2.5; stroke-linecap: round; }
.kb-inc-label { font: 500 13px var(--font-sans); fill: var(--parchment); font-variant-numeric: tabular-nums; }
.kb-mark { font: 400 13px var(--font-sans); fill: var(--parchment-2); }
.kb-mark--hot { fill: var(--parchment); font-weight: 500; }
.kb-tick { stroke: rgba(236, 230, 216, .35); stroke-width: 1; stroke-dasharray: 2 3; }
.kb-dot { fill: var(--stage-2); stroke: var(--kesef); stroke-width: 2.5; }

@media (prefers-reduced-motion: no-preference) {
  .kb-svg--intro .kb-bar { transform-box: fill-box; transform-origin: 50% 100%; animation: kb-rise .7s cubic-bezier(.215, .61, .355, 1) both; animation-delay: calc(var(--i) * 60ms); }
  @keyframes kb-rise { from { transform: scaleY(0); } to { transform: scaleY(1); } }
}

@media (max-width: 760px) {
  .kb-chart { margin-top: 40px; }
  .kb-legend { gap: 8px 12px; font-size: 12px; }
}

/* Work area */
.kb-hint { margin-top: 16px; }
.kb-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.kb-item { display: grid; grid-template-columns: 7.5em minmax(0, 1fr) 44px; align-items: center; gap: 12px; }
.tf-work .kb-item label { font: 400 15px/1.3 var(--font-sans); color: var(--ink); }
.kb-empty { font: 400 14px/1.4 var(--font-sans); color: var(--ink-2); }
.tf-work .kb-remove { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 1px solid var(--hair-strong); border-radius: var(--r-pill); background: var(--paper-2); color: var(--ink-2); cursor: pointer; }
.tf-work .kb-remove:hover { color: var(--ink); border-color: var(--ink); }
.kb-remove svg { width: 16px; height: 16px; }
.tf-work .kb-add { justify-self: start; margin-top: 4px; }
.tf-work .kb-add:disabled { opacity: .5; cursor: not-allowed; }
.kb-tuition { margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--hair); }
.kb-tuition-title { margin: 0 0 4px; }
.kb-tuition .tk-two { margin-top: 16px; }
.kb-years-field { margin-top: 28px; }

.kb-table-wrap { margin-top: 20px; overflow-x: auto; }
.kb-table { width: 100%; border-collapse: collapse; font: 400 14px/1.2 var(--font-sans); font-variant-numeric: tabular-nums; }
.kb-table th, .kb-table td { padding: 11px 0 11px 10px; text-align: right; border-bottom: 1px solid var(--hair); white-space: nowrap; }
.kb-table th:first-child { text-align: left; padding-left: 0; }
.kb-table thead th { font: 500 12.5px/1.2 var(--font-sans); color: var(--ink-2); }
.kb-table tbody th { font-weight: 500; color: var(--ink); }
.kb-table td { color: var(--ink); }
.kb-table tr.kb-hot { background: var(--paper-3); }
.kb-table-note { margin-top: 12px; }
.kb-status:empty { display: none; }
.kb-status { margin-top: 12px; }
.tk-range-head output { font-size: 28px; }
@media (max-width: 420px) { .kb-item { grid-template-columns: 6em minmax(0, 1fr) 44px; gap: 10px; } .kb-table { font-size: 13px; } }
@media (max-width: 340px) { .kb-item { grid-template-columns: 1fr 44px; } .kb-item label { grid-column: 1 / -1; } }
.kb-inc-plate { fill: var(--stage-2); stroke: rgba(255, 214, 2, .55); stroke-width: 1; }
