/* v3.2 family tools: second income (si-), is our budget normal (bb-), tuition assistance prep (ta-).
   Frame: tool-frame.css + tools/kit.css. Tokens from kesef.css. One accent (--kesef) for the main figure and "what you keep". */

[hidden] { display: none !important; }

/* ---------- Shared ---------- */
.fx-figure { font-size: clamp(60px, 7.4vw, 104px); letter-spacing: -0.04em; margin-top: 14px; }
.fx-summary { align-self: stretch; display: flex; flex-direction: column; justify-content: center; }
.fx-summary .tf-subs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 760px) { .fx-figure { font-size: clamp(52px, 16vw, 88px); } }

.fx-panel { margin: clamp(48px, 6vw, 72px) 0 0; padding: clamp(22px, 3vw, 40px); background: var(--stage-2); border: 1px solid var(--hair-stage); border-radius: var(--r-panel); }
.fx-panel-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 10px 24px; margin-bottom: 28px; }
.fx-panel-title { font: 400 clamp(22px, 2vw, 28px)/1.2 var(--font-display); letter-spacing: -0.015em; color: var(--parchment); }
.fx-panel-note { margin: 24px 0 0; font: 400 14px/1.55 var(--font-sans); color: var(--parchment-2); max-width: 62em; text-wrap: pretty; }

.fx-check { display: flex; align-items: flex-start; gap: 12px; min-height: 44px; margin-top: 20px; cursor: pointer; font: 500 15px/1.35 var(--font-sans); color: var(--ink); }
.fx-check input { width: 20px; height: 20px; margin: 1px 0 0; flex: none; accent-color: var(--ink); }
.fx-check small { display: block; font: 400 13px/1.4 var(--font-sans); color: var(--ink-2); margin-top: 2px; }
.fx-status:empty { display: none; }
.fx-status { margin-top: 12px; }
.tf-work select { min-height: 48px; padding: 0 14px; border: 1px solid var(--hair-strong); border-radius: var(--r-chip); background: var(--paper-2); font: 400 16px/1 var(--font-sans); color: var(--ink); width: 100%; }
.tf-work select:focus-visible { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px var(--kesef-soft); }
.tf-work .ks-disclaimer a, .fx-sources a, .tk-note a { color: var(--ink); text-underline-offset: 3px; }

/* Dated sources table */
.fx-sources { background: var(--paper); padding: 0 0 clamp(64px, 8vw, 104px); }
.fx-sources-title { margin: 0 0 24px; padding-top: clamp(48px, 6vw, 80px); border-top: 1px solid var(--hair); font: 400 clamp(26px, 2.6vw, 34px)/1.15 var(--font-display); letter-spacing: -0.015em; color: var(--ink); }
.fx-sources-lead { margin: -8px 0 24px; font: 400 15px/1.6 var(--font-sans); color: var(--ink-2); max-width: 46em; }
.fx-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.fx-table { width: 100%; border-collapse: collapse; font: 400 14.5px/1.5 var(--font-sans); color: var(--ink-2); }
.fx-table th { text-align: left; font: 500 13px/1.3 var(--font-sans); color: var(--ink); padding: 0 16px 12px 0; border-bottom: 1px solid var(--hair-strong); }
.fx-table td { padding: 14px 16px 14px 0; border-bottom: 1px solid var(--hair); vertical-align: top; }
.fx-table td:last-child, .fx-table th:last-child { white-space: nowrap; padding-right: 0; }
.fx-table td:first-child { color: var(--ink); }
@media (max-width: 640px) {
  .fx-table, .fx-table tbody, .fx-table tr, .fx-table td { display: block; width: 100%; }
  .fx-table thead { display: none; }
  .fx-table tr { padding: 14px 0; border-bottom: 1px solid var(--hair); }
  .fx-table td { padding: 2px 0; border: 0; }
  .fx-table td:last-child { font-size: 13px; color: var(--ink-3); }
}

/* ---------- Second income ---------- */
.si-waffle-wrap { display: grid; gap: clamp(24px, 4vw, 56px); align-items: center; }
@media (min-width: 900px) { .si-waffle-wrap { grid-template-columns: minmax(0, 420px) minmax(0, 1fr); } }
.si-waffle { display: grid; grid-template-columns: repeat(10, 1fr); gap: 5px; width: 100%; max-width: 420px; aspect-ratio: 1; }
.si-cell { border-radius: 3px; background: rgba(236, 230, 216, .06); }
.si-cell[data-k="tax"], .si-sw[data-k="tax"] { background: rgba(236, 230, 216, .62); }
.si-cell[data-k="care"], .si-sw[data-k="care"] { background: rgba(236, 230, 216, .3); }
.si-cell[data-k="work"], .si-sw[data-k="work"] { background: repeating-linear-gradient(135deg, rgba(236, 230, 216, .55) 0 2px, rgba(236, 230, 216, .08) 2px 5px); }
.si-cell[data-k="lose"], .si-sw[data-k="lose"] { background: transparent; box-shadow: inset 0 0 0 1.5px rgba(236, 230, 216, .55); }
.si-cell[data-k="keep"], .si-sw[data-k="keep"] { background: var(--kesef); }
@media (prefers-reduced-motion: no-preference) {
  .si-cell { transition: background-color .45s var(--ease), box-shadow .45s var(--ease); transition-delay: calc(var(--i) * 4ms); }
}
.si-legend { list-style: none; margin: 0; padding: 0; display: grid; }
.si-legend li { display: grid; grid-template-columns: 14px minmax(0, 1fr) auto; align-items: baseline; gap: 4px 14px; padding: 14px 0; border-bottom: 1px solid var(--hair-stage); color: var(--parchment-2); font: 400 15px/1.35 var(--font-sans); }
.si-legend li:first-child { border-top: 1px solid var(--hair-stage); }
.si-legend .si-sw { width: 14px; height: 14px; border-radius: 3px; align-self: center; }
.si-legend b { font: 300 clamp(26px, 2.4vw, 34px)/1 var(--font-sans); letter-spacing: -0.02em; color: var(--parchment); font-variant-numeric: tabular-nums; text-align: right; }
.si-legend em { grid-column: 2 / -1; font: 400 13px/1.3 var(--font-mono); font-style: normal; color: var(--parchment-3); }
.si-legend li:has(.si-sw[data-k="keep"]) b { color: var(--kesef); }

.si-kids { display: grid; gap: 10px; }
.si-kid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 44px; gap: 10px; align-items: center; }
.si-kid-x { width: 44px; height: 44px; border: 1px solid var(--hair); border-radius: var(--r-chip); background: transparent; color: var(--ink-2); font: 300 22px/1 var(--font-sans); cursor: pointer; }
.si-kid-x:hover { border-color: var(--ink); color: var(--ink); }
.si-add { justify-self: start; padding: 0; }
@media (max-width: 520px) { .si-kid { grid-template-columns: minmax(0, 1fr) 44px; } .si-kid .tk-affix { grid-column: 1; grid-row: 2; } .si-kid-x { grid-column: 2; grid-row: 1 / span 2; align-self: stretch; height: auto; } .si-kid { padding-bottom: 10px; border-bottom: 1px solid var(--hair); } }
.si-noncash { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 10px; }
.si-noncash li { font: 400 14px/1.55 var(--font-sans); color: var(--ink-2); }
.si-noncash strong { color: var(--ink); font-weight: 500; }
.si-rates { margin-top: 16px; line-height: 1.55; }

@media print {
  #site-header, footer, .tf-related, .tk-guide, .tf-actions, .ks-reassure, .tk-actions, .kc-verdict__save, .kc-verdict__next, .sr-only { display: none !important; }
  .tf-hero { padding: 24px 0 !important; }
  .tf-work { padding: 0 !important; }
  .tk-grid { display: block !important; }
  .kc-more:not([open]) > .kc-more__body { display: block; }
  body { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* ---------- Is our budget normal ---------- */
.bb-hist-src { font: 400 13px/1.3 var(--font-mono); color: var(--parchment-3); }
.bb-hist { --max: clamp(130px, 17vw, 220px); display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: clamp(4px, 1vw, 12px); align-items: end; }
.bb-h-col { display: flex; flex-direction: column; justify-content: flex-end; min-width: 0; gap: 8px; }
.bb-h-bar { display: block; height: calc(var(--h) * var(--max)); min-height: 3px; border-radius: 6px 6px 2px 2px; background: rgba(236, 230, 216, .22); }
.bb-h-pct { font: 300 clamp(14px, 1.7vw, 24px)/1 var(--font-sans); letter-spacing: -0.01em; color: var(--parchment-2); text-align: center; font-variant-numeric: tabular-nums; }
.bb-h-lab { font: 400 12px/1.25 var(--font-sans); color: var(--parchment-3); text-align: center; overflow-wrap: anywhere; min-height: 2.5em; }
.bb-h-col.is-you .bb-h-bar { background: var(--kesef); }
.bb-h-col.is-you .bb-h-pct, .bb-h-col.is-you .bb-h-lab { color: var(--parchment); }
@media (prefers-reduced-motion: no-preference) { .bb-h-bar { transition: background-color .4s var(--ease); } }
@media (max-width: 640px) { .bb-h-lab { font-size: 10.5px; letter-spacing: -0.02em; } .bb-hist { gap: 4px; } }
.bb-h-lab { white-space: nowrap; overflow-wrap: normal; min-height: 0; }
.bb-hist-axis { margin: 14px 0 0; font: 400 12.5px/1.4 var(--font-sans); color: var(--parchment-3); }

.bb-use { margin-top: 16px; padding: 0; }
.bb-cards-title { margin: clamp(48px, 6vw, 80px) 0 24px; font: 400 clamp(26px, 2.6vw, 34px)/1.15 var(--font-display); letter-spacing: -0.015em; color: var(--ink); }
.bb-cards { display: grid; gap: 20px; }
@media (min-width: 900px) { .bb-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.bb-card { min-width: 0; padding: clamp(22px, 2.6vw, 32px); background: var(--paper-2); border: 1px solid var(--hair); border-radius: var(--r-panel); display: flex; flex-direction: column; }
.bb-card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.bb-card-title { margin: 0; font: 400 clamp(22px, 2vw, 26px)/1.2 var(--font-display); letter-spacing: -0.012em; color: var(--ink); }
.bb-tag { flex: none; padding: 5px 12px; border-radius: var(--r-pill); border: 1px solid var(--hair-strong); font: 500 13px/1.2 var(--font-sans); color: var(--ink-2); }
.bb-tag[data-cls="mid"], .bb-tag[data-cls="near"] { background: var(--paper-3); color: var(--ink); border-color: transparent; }
.bb-you { margin: 14px 0 0; font: 300 clamp(34px, 3.4vw, 44px)/1 var(--font-sans); letter-spacing: -0.025em; color: var(--ink); font-variant-numeric: tabular-nums; }
.bb-you small { font: 400 14px/1 var(--font-sans); letter-spacing: 0; color: var(--ink-2); }
.bb-line { margin: 16px 0 0; font: 400 15px/1.6 var(--font-sans); color: var(--ink-2); text-wrap: pretty; }
.bb-rows { margin: 16px 0 0; }
.bb-rows > div { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 11px 0; border-top: 1px solid var(--hair); }
.bb-rows dt { font: 400 13.5px/1.45 var(--font-sans); color: var(--ink-2); }
.bb-rows dd { margin: 0; font: 400 15px/1.35 var(--font-sans); color: var(--ink); text-align: right; font-variant-numeric: tabular-nums; max-width: 50%; }
.bb-src { margin: auto 0 0; padding-top: 16px; font: 400 12.5px/1.5 var(--font-sans); color: var(--ink-3); }
.bb-dist { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 3px; align-items: end; height: 84px; margin-top: 22px; }
.bb-dist-bar { position: relative; height: calc(var(--h) * 100%); min-height: 2px; border-radius: 3px 3px 1px 1px; background: var(--paper-3); box-shadow: inset 0 0 0 1px var(--hair); }
.bb-dist-bar i { position: absolute; left: 50%; bottom: calc(100% + 4px); transform: translateX(-50%); font: 400 11px/1 var(--font-mono); font-style: normal; color: var(--ink-3); white-space: nowrap; }
.bb-dist-bar.is-you { background: var(--ink); box-shadow: none; }
.bb-dist-bar.is-you i { color: var(--ink); font-weight: 500; }
.bb-dist-axis { display: flex; justify-content: space-between; gap: 8px; margin: 8px 0 0; font: 400 11.5px/1.3 var(--font-sans); color: var(--ink-3); }
.bb-dist-axis span:nth-child(2) { text-align: center; }
.bb-med { position: relative; height: 64px; margin-top: 28px; border-bottom: 1px solid var(--hair-strong); }
.bb-med-mark, .bb-med-you { position: absolute; bottom: 0; left: calc(var(--x) * 100%); width: 0; height: 30px; border-left: 1px dashed var(--ink-3); }
.bb-med-mark[data-i="1"] { height: 52px; }
.bb-med-mark i, .bb-med-you i { position: absolute; bottom: calc(100% + 2px); left: 0; transform: translateX(-50%); font: 400 12px/1.2 var(--font-sans); font-style: normal; color: var(--ink-2); white-space: nowrap; }
.bb-med-you { height: 100%; border-left: 2px solid var(--ink); }
.bb-med-you::after { content: ""; position: absolute; bottom: -5px; left: -6px; width: 10px; height: 10px; border-radius: 50%; background: var(--ink); }
.bb-med-you i { bottom: auto; top: 100%; margin-top: 10px; color: var(--ink); font-weight: 500; }
.bb-med { margin-bottom: 30px; }
[data-a="l"] > i { transform: none; left: -1px; }
[data-a="r"] > i { transform: translateX(-100%); left: 1px; }
.bb-cards { align-items: start; }
@media (max-width: 520px) { .bb-rows > div { flex-direction: column; gap: 4px; } .bb-rows dd { max-width: none; text-align: left; } .bb-med-mark i, .bb-med-you i { font-size: 11px; } }
@media print { .bb-cards { display: block; } .bb-card { break-inside: avoid; margin-bottom: 12px; } }

/* ---------- Tuition assistance prep ---------- */
.ta-bar { display: flex; gap: 2px; height: 76px; border-radius: 10px; overflow: hidden; background: var(--stage-3); }
.ta-seg { position: relative; flex: 0 0 auto; height: 100%; min-width: 0; display: flex; align-items: flex-end; overflow: hidden; }
.ta-seg b { padding: 0 12px 12px; font: 400 clamp(15px, 1.6vw, 20px)/1 var(--font-sans); color: var(--stage); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ta-seg[data-k="tuition"], .ta-sw[data-k="tuition"] { background: var(--kesef); }
.ta-seg[data-k="housing"], .ta-sw[data-k="housing"] { background: rgba(236, 230, 216, .62); }
.ta-seg[data-k="other"], .ta-sw[data-k="other"] { background: rgba(236, 230, 216, .32); }
.ta-seg[data-k="left"], .ta-sw[data-k="left"] { background: transparent; box-shadow: inset 0 0 0 1.5px rgba(236, 230, 216, .5); }
.ta-seg[data-k="left"] b, .ta-seg[data-k="other"] b { color: var(--parchment); }
@media (prefers-reduced-motion: no-preference) { .ta-seg { transition: width .5s var(--ease); } }
.ta-legend { list-style: none; margin: 24px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0 28px; }
.ta-legend li { display: flex; align-items: center; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--hair-stage); font: 400 14.5px/1.3 var(--font-sans); color: var(--parchment-2); }
.ta-legend b { margin-left: auto; font: 300 22px/1 var(--font-sans); letter-spacing: -0.01em; color: var(--parchment); font-variant-numeric: tabular-nums; }
.ta-sw { width: 12px; height: 12px; flex: none; border-radius: 3px; }
@media (max-width: 760px) { .ta-bar { height: 56px; } .ta-seg b { padding: 0 8px 8px; font-size: 13px; } }

.ta-group { margin: 32px 0 0; padding-top: 22px; border-top: 1px solid var(--hair); font: 500 15px/1.3 var(--font-sans); color: var(--ink); }
.kc-more__body > .ta-group:first-child { margin-top: 8px; border-top: 0; padding-top: 0; }
.ta-group + .tk-two, .ta-group + .tk-field { margin-top: 16px; }
.tf-work .ta-text { width: 100%; min-height: 48px; padding: 12px 14px; border: 1px solid var(--hair-strong); border-radius: var(--r-chip); background: var(--paper-2); font: 400 16px/1.5 var(--font-sans); color: var(--ink); box-shadow: none; resize: vertical; }
.tf-work .ta-text:focus-visible { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px var(--kesef-soft); }
#ta-rows > div:nth-child(4) dd { font-weight: 500; }

.ta-sheet-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 12px 24px; }
.ta-sheet-head .ks-btn { flex: none; }
.ta-sheet { max-width: 880px; margin: 0 auto; padding: clamp(24px, 4vw, 56px); background: #fff; color: #12110e; border: 1px solid var(--hair); border-radius: 6px; box-shadow: 0 30px 60px -36px rgba(18, 17, 14, .35); }
.ta-sheet-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 8px 24px; padding-bottom: 18px; border-bottom: 2px solid #12110e; }
.ta-sheet-title { margin: 0; font: 400 clamp(26px, 3vw, 34px)/1.1 var(--font-display); letter-spacing: -0.015em; }
.ta-sheet-sub { margin: 8px 0 0; font: 400 14px/1.5 var(--font-sans); color: #4a473f; max-width: 44em; }
.ta-sheet-date { margin: 0; font: 400 13px/1.4 var(--font-mono); color: #4a473f; }
.ta-sheet-grid { display: grid; gap: 22px 40px; margin-top: 20px; }
@media (min-width: 760px) { .ta-sheet-grid { grid-template-columns: 1fr 1fr; } }
.ta-sheet h3 { margin: 0 0 6px; font: 500 13px/1.3 var(--font-sans); color: #12110e; }
.ta-sheet dl { margin: 0; }
.ta-sheet dl > div { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; border-bottom: 1px solid #e6e2d8; font: 400 13px/1.35 var(--font-sans); }
.ta-sheet dt { color: #4a473f; }
.ta-sheet dd { margin: 0; color: #12110e; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ta-sheet .is-total { border-bottom: 1px solid #12110e; }
.ta-sheet .is-total dt, .ta-sheet .is-total dd { color: #12110e; font-weight: 600; }
.ta-sheet-ask { margin: 0 0 8px; font: 500 13.5px/1.5 var(--font-sans); }
.ta-sheet-notes { margin: 0; min-height: 120px; padding: 10px 12px; border: 1px solid #cfcabe; border-radius: 4px; font: 400 13.5px/1.55 var(--font-sans); white-space: pre-wrap; overflow-wrap: anywhere; }
.ta-sheet-notes.is-empty { background: repeating-linear-gradient(transparent 0 23px, #e6e2d8 23px 24px); }
.ta-sheet-foot { margin: 20px 0 0; padding-top: 12px; border-top: 1px solid #e6e2d8; font: 400 11.5px/1.5 var(--font-sans); color: #6b675d; }
.ta-askfacts { margin-top: 20px; }

@media print {
  .tuition-assistance-page main > *:not(.tf-work), .tuition-assistance-page .tf-work .tk-grid, .tuition-assistance-page .ta-sheet-head,
  .tuition-assistance-page #site-header, .tuition-assistance-page footer, .tuition-assistance-page .sr-only { display: none !important; }
  .tuition-assistance-page .tf-work { padding: 0 !important; background: #fff !important; }
  .tuition-assistance-page .ks-wrap { max-width: none; padding: 0; }
  .tuition-assistance-page .ta-sheet { max-width: none; border: 0; box-shadow: none; padding: 0; }
  .tuition-assistance-page .ta-sheet-grid { grid-template-columns: 1fr 1fr; gap: 14px 28px; }
  .tuition-assistance-page .ta-sheet dl > div { padding: 3px 0; font-size: 11.5px; }
  .tuition-assistance-page .ta-sheet-notes { min-height: 90px; font-size: 12px; }
  @page { margin: 14mm; }
}
