/* VSA Tuition Calculator. Every rule is scoped to .vsa-tc so it never
   affects the rest of the site. Colors match the sitewide brand tokens. */

.vsa-tc {
  --tc-blue: #005789;
  --tc-blue-dark: #003f63;
  --tc-gold: #fbb321;
  --tc-gold-deep: #8f6200;
  --tc-ink: #0b0c08;
  --tc-text: #4a4a4a;
  --tc-muted: #5f6368;
  --tc-soft: #f3f6f8;
  --tc-line: #dde3e8;
  --tc-radius: 12px;
  --tc-shadow: 0 6px 20px rgba(0, 40, 70, .06);
  container-type: inline-size;
  container-name: vsatc;
  color: var(--tc-text);
  font-size: 16px;
  line-height: 1.5;
  text-align: left;
}
.vsa-tc :where(p, li, label, span, small, strong, output, legend, summary, th, td, select, button, a) { letter-spacing: normal; }
.vsa-tc :where(p, li, label, summary, th, td, select, button, a) { font-size: 1rem; }
.vsa-tc *, .vsa-tc *::before, .vsa-tc *::after { box-sizing: border-box; }
.vsa-tc [hidden] { display: none !important; }
.vsa-tc .screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.vsa-tc__layout { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(300px, 1fr); gap: 28px; align-items: start; }

/* ---------- Quick Estimate / Detailed Plan switch ---------- */
.vsa-tc__modes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; max-width: 560px; margin: 0 auto 20px; padding: 6px; border: 1px solid var(--tc-line); border-radius: 16px; background: var(--tc-soft); }
.vsa-tc .vsa-tc__mode { display: block; padding: .7rem 1rem; border: 0; border-radius: 11px; background: transparent; color: var(--tc-blue); font: inherit; text-align: center; cursor: pointer; transition: background-color .15s, box-shadow .15s; }
.vsa-tc__mode strong { display: block; font-size: 1rem; line-height: 1.3; color: inherit; }
.vsa-tc__mode span { display: block; margin-top: .1rem; font-size: .82rem; color: var(--tc-muted); }
.vsa-tc__mode:hover { background: rgba(255, 255, 255, .6); }
.vsa-tc .vsa-tc__mode[aria-pressed="true"] { background: #fff; color: var(--tc-ink); box-shadow: 0 2px 10px rgba(0, 40, 70, .12), inset 0 -3px 0 var(--tc-gold); }
.vsa-tc__mode:focus-visible { outline: 3px solid var(--tc-gold); outline-offset: 2px; }
.vsa-tc__mode-note { max-width: 560px; margin: -8px auto 20px; padding: .55rem .9rem; border-left: 3px solid var(--tc-gold); border-radius: 0 8px 8px 0; background: rgba(251, 179, 33, .14); font-size: .9rem; color: var(--tc-ink); }
.vsa-tc__assume { margin: .75rem 0 0; font-size: .85rem; color: var(--tc-muted); }

/* ---------- Steps ---------- */
.vsa-tc__step { margin: 0 0 20px; padding: 24px; border: 1px solid var(--tc-line); border-radius: var(--tc-radius); background: #fff; box-shadow: var(--tc-shadow); }
.vsa-tc .vsa-tc__step-title { display: flex; align-items: center; gap: .65rem; margin: 0 0 .35rem; font-size: 1.2rem; line-height: 1.3; color: var(--tc-ink); text-align: left; }
.vsa-tc__num { display: inline-grid; flex: 0 0 auto; place-items: center; width: 1.9rem; height: 1.9rem; border-radius: 50%; background: var(--tc-gold); color: var(--tc-ink); font-size: .95rem; font-weight: 800; }
.vsa-tc__step-sub { margin: 0 0 1rem; font-size: .95rem; color: var(--tc-muted); }
.vsa-tc__customized { margin: .25rem 0 1rem; padding: .6rem .9rem; border-left: 3px solid var(--tc-gold); border-radius: 0 8px 8px 0; background: rgba(251, 179, 33, .14); font-size: .92rem; font-weight: 600; color: var(--tc-ink); }

/* Presets */
.vsa-tc__presets { display: flex; flex-wrap: wrap; gap: 10px; }
.vsa-tc__preset { padding: .6em 1.15em; border: 2px solid var(--tc-line); border-radius: 999px; background: #fff; color: var(--tc-blue); font: inherit; font-size: .95rem; font-weight: 700; cursor: pointer; transition: border-color .15s, background-color .15s, color .15s; }
.vsa-tc__preset:hover { border-color: var(--tc-blue); }
.vsa-tc__preset[aria-pressed="true"] { border-color: var(--tc-blue); background: var(--tc-blue); color: #fff; }

/* Radio "cards" */
.vsa-tc__choice { margin: 1.1rem 0 0; padding: 0; border: 0; min-width: 0; }
.vsa-tc__choice legend { margin-bottom: .45rem; padding: 0; font-size: .8rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--tc-muted); }
.vsa-tc__options { display: grid; gap: 10px; }
.vsa-tc__options--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.vsa-tc__options--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.vsa-tc__options label { position: relative; display: block; margin: 0; cursor: pointer; }
.vsa-tc__options input { position: absolute; opacity: 0; pointer-events: none; }
.vsa-tc__options span { display: block; height: 100%; font-size: 1rem; overflow-wrap: break-word; padding: .75rem .9rem; border: 2px solid var(--tc-line); border-radius: 10px; background: #fff; font-weight: 700; line-height: 1.3; color: var(--tc-ink); transition: border-color .15s, background-color .15s; }
.vsa-tc__options small { display: block; margin-top: .2rem; font-size: .82rem; font-weight: 400; color: var(--tc-muted); }
.vsa-tc__options label:hover span { border-color: #9fb6c6; }
.vsa-tc__options input:checked + span { border-color: var(--tc-blue); background: #eaf2f7; box-shadow: inset 0 0 0 1px var(--tc-blue); }
.vsa-tc__options input:focus-visible + span { outline: 3px solid var(--tc-gold); outline-offset: 2px; }
.vsa-tc__fee-hint { margin: .5rem 0 0; font-size: .88rem; color: var(--tc-muted); }
.vsa-tc__legacy { margin-top: 1.25rem; }
.vsa-tc__legacy .vsa-tc__select { display: block; max-width: 360px; }

/* Counters */
.vsa-tc__counters { margin-top: 1.1rem; border-top: 1px solid var(--tc-line); }
.vsa-tc__counter { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: .8rem 0; border-bottom: 1px solid var(--tc-line); }
.vsa-tc__counter-text { min-width: 0; }
.vsa-tc__counter-label { display: block; font-size: 1rem; font-weight: 700; line-height: 1.35; color: var(--tc-ink); }
.vsa-tc__counter-hint { display: block; font-size: .85rem; color: var(--tc-muted); }
.vsa-tc__stepper { display: flex; flex: 0 0 auto; align-items: center; gap: 4px; }
.vsa-tc__stepper button { display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 2px solid var(--tc-line); border-radius: 50%; background: #fff; color: var(--tc-blue); font: inherit; font-size: 1.3rem; font-weight: 700; line-height: 1; cursor: pointer; }
.vsa-tc__stepper button:hover:not(:disabled) { border-color: var(--tc-blue); }
.vsa-tc__stepper button:disabled { opacity: .35; cursor: default; }
.vsa-tc__stepper button:focus-visible, .vsa-tc__preset:focus-visible, .vsa-tc__btn:focus-visible, .vsa-tc summary:focus-visible { outline: 3px solid var(--tc-gold); outline-offset: 2px; }
.vsa-tc__stepper output { min-width: 2.2ch; font-size: 1.15rem; font-weight: 800; text-align: center; color: var(--tc-ink); }

/* More options */
.vsa-tc__more { margin-top: 1rem; }
.vsa-tc__more > summary { display: flex; flex-wrap: wrap; align-items: baseline; gap: .25rem .6rem; padding: .7rem 0; list-style: none; font-weight: 700; color: var(--tc-blue); cursor: pointer; }
.vsa-tc__more > summary::-webkit-details-marker { display: none; }
.vsa-tc__more > summary::before { content: "+"; display: inline-grid; place-items: center; width: 1.4rem; height: 1.4rem; border-radius: 50%; background: var(--tc-soft); font-size: 1.1rem; line-height: 1; }
.vsa-tc__more[open] > summary::before { content: "\2212"; }
.vsa-tc__more > summary span { font-size: .85rem; font-weight: 400; color: var(--tc-muted); }
.vsa-tc__more .vsa-tc__counters { margin-top: .25rem; }

/* Checkbox rows */
.vsa-tc__check { display: flex; flex-wrap: wrap; align-items: flex-start; gap: .6rem; margin: 1rem 0 0; cursor: pointer; }
.vsa-tc__check input { flex: 0 0 auto; width: 1.2rem; height: 1.2rem; margin: .15rem 0 0; accent-color: var(--tc-blue); }
.vsa-tc__check > span { flex: 1 1 14rem; font-size: 1rem; font-weight: 700; line-height: 1.35; color: var(--tc-ink); }
.vsa-tc__check small { display: block; font-size: .85rem; font-weight: 400; color: var(--tc-muted); }
.vsa-tc__badge { align-self: center; padding: .2em .65em; border-radius: 4px; background: rgba(251, 179, 33, .25); font-size: .75rem; font-style: normal; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: #6b4a00; }

/* Month + method row */
.vsa-tc__row { display: grid; grid-template-columns: 1fr; gap: 0; margin-top: 1.1rem; }
.vsa-tc__select span { display: block; margin-bottom: .45rem; font-size: .8rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--tc-muted); }
.vsa-tc__select select { width: 100%; min-height: 48px; padding: .6rem .8rem; border: 2px solid var(--tc-line); border-radius: 10px; background: #fff; font: inherit; color: var(--tc-ink); }
.vsa-tc__select select:focus-visible { outline: 3px solid var(--tc-gold); outline-offset: 2px; }
.vsa-tc__choice--inline { margin-top: 1.1rem; }
.vsa-tc__select select { max-width: 22rem; }

/* ---------- Summary ---------- */
.vsa-tc__summary { position: static; }
/* Only stick the summary on screens tall enough to show all of it. */
@media (min-width: 901px) and (min-height: 1100px) { .vsa-tc__summary { position: sticky; top: 120px; } }
.vsa-tc__card { padding: 24px; border: 2px solid var(--tc-gold); border-radius: var(--tc-radius); background: #fff; box-shadow: 0 10px 30px rgba(0, 40, 70, .08); }
.vsa-tc__eyebrow { margin: 0; font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--tc-blue); }
.vsa-tc__total { margin: .2rem 0 0; font-size: clamp(2.3rem, 5vw, 3rem); font-weight: 800; line-height: 1.1; color: var(--tc-blue); }
.vsa-tc__total-sub { margin: .35rem 0 0; font-size: .9rem; color: var(--tc-muted); }
.vsa-tc__schedule { margin-top: 1rem; padding: .9rem 1rem; border-radius: 10px; background: var(--tc-soft); }
.vsa-tc__schedule p { margin: 0; font-size: .95rem; color: var(--tc-ink); }
.vsa-tc__schedule p + p { margin-top: .35rem; }
.vsa-tc__schedule strong { color: var(--tc-blue); }
.vsa-tc__schedule span { font-size: .85rem; color: var(--tc-muted); }

.vsa-tc__savings, .vsa-tc__notes { margin: .9rem 0 0; padding: 0; list-style: none; }
.vsa-tc__savings:empty, .vsa-tc__notes:empty { display: none; }
.vsa-tc__savings li { position: relative; margin: 0 0 .4rem; padding: .5rem .75rem .5rem 2rem; border-radius: 8px; background: rgba(251, 179, 33, .16); font-size: .9rem; line-height: 1.4; color: var(--tc-ink); }
.vsa-tc__savings li::before { content: "$"; position: absolute; left: .7rem; top: .5rem; font-weight: 800; color: var(--tc-gold-deep); }
.vsa-tc__notes li { margin: 0 0 .4rem; padding-left: .9rem; border-left: 3px solid var(--tc-line); font-size: .87rem; line-height: 1.45; color: var(--tc-muted); }

.vsa-tc__breakdown { margin-top: 1rem; border-top: 1px solid var(--tc-line); }
.vsa-tc__breakdown > summary { padding: .7rem 0; font-weight: 700; color: var(--tc-blue); cursor: pointer; }
.vsa-tc__breakdown table { width: 100%; margin: 0; border-collapse: collapse; font-size: .9rem; }
.vsa-tc__breakdown th, .vsa-tc__breakdown td { padding: .4rem 0; border: 0; border-bottom: 1px solid var(--tc-line); background: none; vertical-align: top; }
.vsa-tc__breakdown th { font-weight: 400; text-align: left; color: var(--tc-text); }
.vsa-tc__breakdown th span { display: block; font-size: .8rem; color: var(--tc-muted); }
.vsa-tc__breakdown td { padding-left: 1rem; text-align: right; white-space: nowrap; font-weight: 700; color: var(--tc-ink); }
.vsa-tc__breakdown .is-credit td { color: #2f6b3a; }
.vsa-tc__breakdown .is-total th, .vsa-tc__breakdown .is-total td { border-bottom: 0; padding-top: .6rem; font-weight: 800; color: var(--tc-blue); }
.vsa-tc__books { margin: .8rem 0 0; font-size: .88rem; color: var(--tc-muted); }

/* Comparison bars */
.vsa-tc__compare { margin-top: 1.1rem; padding-top: 1rem; border-top: 1px solid var(--tc-line); }
.vsa-tc__compare:empty { display: none; }
.vsa-tc .vsa-tc__compare h4 { margin: 0 0 .75rem; font-size: 1rem; color: var(--tc-ink); text-align: left; }
.vsa-tc__compare-note { margin: 0; font-size: .88rem; color: var(--tc-muted); }
.vsa-tc__bars { margin: 0; padding: 0; list-style: none; }
.vsa-tc__bars li { margin: 0 0 .8rem; }
.vsa-tc__bar-label { display: flex; justify-content: space-between; gap: 10px; font-size: .88rem; line-height: 1.3; }
.vsa-tc__bar-label strong { white-space: nowrap; color: var(--tc-ink); }
.vsa-tc__bar-track { height: 10px; margin-top: .3rem; border-radius: 999px; background: var(--tc-soft); overflow: hidden; }
.vsa-tc__bar-fill { height: 100%; border-radius: 999px; background: #8aa6ba; }
.vsa-tc__bars .is-vsa .vsa-tc__bar-fill { background: var(--tc-gold); }
.vsa-tc__bars .is-vsa .vsa-tc__bar-label { font-weight: 700; color: var(--tc-blue); }
.vsa-tc__bars small { display: block; margin-top: .2rem; font-size: .75rem; color: var(--tc-muted); }

/* Actions */
.vsa-tc__actions { display: flex; flex-direction: column; gap: 10px; margin-top: 1.25rem; }
.vsa-tc .vsa-tc__btn { display: block; font-size: 1rem; line-height: 1.3; width: 100%; padding: .8em 1.4em; border: 2px solid transparent; border-radius: 999px; font: inherit; font-weight: 700; text-align: center; text-decoration: none; cursor: pointer; transition: background-color .2s, color .2s, border-color .2s; }
.vsa-tc .vsa-tc__btn--gold { background: var(--tc-gold); color: var(--tc-ink); }
.vsa-tc .vsa-tc__btn--gold:hover { border-color: var(--tc-gold); background: #fff; color: var(--tc-ink); }
.vsa-tc .vsa-tc__btn--outline { border-color: var(--tc-blue); background: #fff; color: var(--tc-blue); }
.vsa-tc .vsa-tc__btn--outline:hover { background: var(--tc-soft); }
.vsa-tc .vsa-tc__btn--text { padding-block: .4em; background: none; color: var(--tc-blue); text-decoration: underline; text-underline-offset: 3px; }
.vsa-tc__disclaimer { margin: 1rem 0 0; padding: .7rem .85rem; border-radius: 8px; background: var(--tc-soft); font-size: .82rem; line-height: 1.5; color: var(--tc-text); }
.vsa-tc__disclaimer strong { color: var(--tc-ink); }
.vsa-tc__printinfo { display: none; }
.vsa-tc__fine { margin: 1rem 0 0; font-size: .8rem; line-height: 1.5; color: var(--tc-muted); }
.vsa-tc__fine a { color: var(--tc-blue); }

/* Floating total bar (phones) */
.vsa-tc__bar { display: none; }

/* Layout follows the calculator's own width, so it works in narrow theme columns too. */
@container vsatc (max-width: 860px) {
  .vsa-tc__layout { grid-template-columns: 1fr; }
  .vsa-tc__summary { position: static !important; }
}
@container vsatc (max-width: 560px) {
  .vsa-tc__step, .vsa-tc__card { padding: 18px 16px; }
  .vsa-tc__options--3 { grid-template-columns: 1fr; }
  .vsa-tc__stepper button { width: 44px; height: 44px; }
}
@container vsatc (max-width: 380px) {
  .vsa-tc__options--2 { grid-template-columns: 1fr; }
  .vsa-tc__mode span { display: none; }
}
/* Floating total bar: phones only. */
@media (max-width: 900px) {
  .vsa-tc__bar {
    position: fixed; right: 0; bottom: 0; left: 0; z-index: 50;
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
    border-top: 3px solid var(--tc-gold); background: var(--tc-blue); color: #fff;
    box-shadow: 0 -6px 20px rgba(0, 0, 0, .15);
    transition: transform .2s;
  }
  .vsa-tc__bar.is-hidden { transform: translateY(110%); visibility: hidden; }
  .vsa-tc__bar span { display: block; font-size: .75rem; letter-spacing: .06em; text-transform: uppercase; opacity: .85; }
  .vsa-tc__bar strong { font-size: 1.35rem; font-weight: 800; color: var(--tc-gold); }
  .vsa-tc .vsa-tc__bar .vsa-tc__btn { width: auto; padding: .55em 1.1em; }
}
@media (prefers-reduced-motion: reduce) {
  .vsa-tc *, .vsa-tc__bar { transition: none !important; }
}

/* ---------- Typical costs table (static, crawlable) ---------- */
.vsa-tc-typical { overflow-x: auto; margin: 1.5rem 0; container-type: inline-size; }
.vsa-tc-typical table { width: 100%; border-collapse: collapse; background: #fff; font-size: .97rem; }
.vsa-tc-typical th, .vsa-tc-typical td { padding: .8rem 1rem; border: 1px solid #dde3e8; text-align: left; vertical-align: top; }
.vsa-tc-typical thead th { background: #005789; color: #fff; font-weight: 700; }
.vsa-tc-typical tbody th { color: #0b0c08; }
.vsa-tc-typical tbody th span, .vsa-tc-typical td span { display: block; margin-top: .15rem; font-size: .85rem; font-weight: 400; color: #5f6368; }
.vsa-tc-typical td strong { font-size: 1.15rem; color: #005789; }
.vsa-tc-typical tbody tr:nth-child(even) > * { background: #f3f6f8; }
.vsa-tc-typical caption { caption-side: bottom; padding-top: .6rem; font-size: .88rem; text-align: left; color: #5f6368; }

@container (max-width: 560px) {
  .vsa-tc-typical thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .vsa-tc-typical :is(table, tbody, tr, th, td) { display: block; width: auto; }
  .vsa-tc-typical table { background: none; }
  .vsa-tc-typical caption { display: block; padding: 0 0 1rem; }
  .vsa-tc-typical tbody tr { margin-bottom: 1rem; overflow: hidden; border: 1px solid #dde3e8; border-radius: 12px; background: #fff; }
  .vsa-tc-typical tbody tr > * { border: 0; background: #fff !important; }
  .vsa-tc-typical tbody th { background: #005789 !important; color: #fff; }
  .vsa-tc-typical tbody th span { color: rgba(255, 255, 255, .85); }
  .vsa-tc-typical td { border-top: 1px solid #dde3e8; }
  .vsa-tc-typical td::before { content: attr(data-label); display: block; margin-bottom: .2rem; font-size: .75rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #5f6368; }
}

/* ---------- Print ---------- */
@media print {
  .vsa-tc__controls, .vsa-tc__bar, .vsa-tc__actions, .vsa-tc__modes, .vsa-tc__mode-note, .vsa-tc__assume { display: none !important; }
  .vsa-tc__layout { display: block; }
  .vsa-tc__summary { position: static; }
  .vsa-tc__card { border: 1px solid #999; box-shadow: none; }
  .vsa-tc__printinfo { display: block; margin: .75rem 0 0; font-size: .8rem; font-weight: 700; color: #000; }
  .vsa-tc__disclaimer { border: 1px solid #999; background: none; }
  .vsa-tc__bar-fill { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
