/* Tuition and fees (TuitionAndFees.aspx): the cost calculator of the approved mockup (design/payment-plan-student-mockup.png).
   Loaded after css/home.css (fonts, header, .wrap, .btn) and css/ctec-choice.css (the tap buttons). Brand colors only;
   every target at least 44 px; one column on phones (no sideways scrolling at 390 px). */

.tf-calc { padding: 2.5rem 0 3rem; background: var(--bg); }
.tf-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); grid-template-areas: "steps summary" "steps full";
           grid-template-rows: auto 1fr; /* the tall steps column stretches the 2nd row only: the two cards stay together */
           gap: 1.5rem; align-items: start; }
.tf-summary { grid-area: summary; }
.tf-steps { grid-area: steps; display: grid; gap: 1.5rem; min-width: 0; }
.tf-full { grid-area: full; }

.tf-card { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 1.5rem; min-width: 0; margin: 0; }
fieldset.tf-card { min-inline-size: 0; }
.tf-step legend, .tf-legend { display: flex; align-items: center; gap: .6rem; float: left; width: 100%; padding: 0; margin: 0 0 1rem;
                              font-weight: 700; font-size: 1.1rem; color: var(--navy); }
.tf-step legend + * { clear: both; }
.tf-num { display: inline-flex; align-items: center; justify-content: center; width: 2rem; height: 2rem; border-radius: 50%; flex: 0 0 auto;
          background: var(--gold); color: var(--navy); font-weight: 800; font-size: 1rem; }

/* This year's cost: navy card, as the mockup */
.tf-summary { background: var(--navy); border-color: var(--navy); color: #fff; }
.tf-summary-title { font-family: var(--body); font-size: 1.05rem; font-weight: 700; letter-spacing: 0; line-height: 1.3; }
.tf-big { font-family: var(--display); font-size: clamp(3rem, 6vw, 4rem); line-height: 1; margin-top: .4rem; }
.tf-detail { font-size: 1rem; }
.tf-formula { margin-top: 1rem; padding-top: .9rem; border-top: 1px solid rgba(255, 255, 255, .3); font-weight: 700; font-size: 1rem; }

/* How to pay: the amount per payment, the 3-stop slider, the option buttons, one block per payment month */
.tf-per { text-align: center; margin-bottom: .5rem; }
.tf-per .tf-big { display: block; }
.tf-navy { color: var(--navy); }
.tf-every { display: block; color: var(--ink-soft); font-size: 1rem; }
.tf-slider { width: 100%; height: 44px; margin: .5rem 0 0; accent-color: var(--navy); cursor: pointer; }
.tf-slider:focus-visible { outline: 3px solid var(--navy); outline-offset: 2px; box-shadow: var(--ctec-focus-ring); }
.tf-stops { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem; margin-top: .25rem; }
.tf-stop { min-height: 44px; padding: .4rem .5rem; border: 2px solid transparent; border-radius: 8px; background: none; cursor: pointer;
           font: inherit; font-size: .95rem; color: var(--ink-soft); line-height: 1.2; }
.tf-stop:first-child { text-align: left; }
.tf-stop:last-child { text-align: right; }
.tf-stop[aria-pressed="true"] { color: var(--navy); font-weight: 700; text-decoration: underline; text-underline-offset: 4px; }
.tf-stop:hover { border-color: var(--line); }
.tf-stop:focus-visible { outline: 3px solid var(--navy); outline-offset: 2px; box-shadow: var(--ctec-focus-ring); }
.tf-months { list-style: none; margin: 1.25rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(5.5rem, 1fr)); gap: .5rem; }
.tf-months li { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 52px; padding: .35rem;
                border-radius: 8px; background: var(--bg-alt); border: 1px solid var(--line); font-size: .95rem; line-height: 1.25; }
.tf-month { font-weight: 700; color: var(--navy); }
.tf-amount { color: var(--ink); }

/* The whole program: an estimate */
.tf-full h2 { font-family: var(--body); font-size: 1.2rem; font-weight: 700; letter-spacing: 0; line-height: 1.3; color: var(--navy); }
.tf-which { color: var(--ink-soft); font-size: 1rem; margin-top: .25rem; }
.tf-full dl { margin: 1rem 0 0; }
.tf-full dl > div { display: flex; justify-content: space-between; gap: 1rem; padding: .45rem 0; border-bottom: 1px solid var(--line); font-size: 1rem; }
.tf-full dt { font-weight: 400; }
.tf-full dd { margin: 0; font-weight: 700; white-space: nowrap; }
.tf-full .tf-total { border-bottom: 0; font-size: 1.1rem; }
.tf-full .tf-total dt { font-weight: 700; }
.tf-note { margin-top: .75rem; font-size: .95rem; color: var(--ink-soft); }
.tf-note strong { color: var(--navy); }
.tf-apply { display: flex; justify-content: center; margin-top: 1.25rem; min-height: 48px; }

/* Refund wording (a draft until approved: hidden on the live site) */
.tf-refund { background: var(--bg-alt); padding: 2.5rem 0; border-top: 1px solid var(--line); }
.tf-refund h2 { font-size: 2rem; color: var(--navy); }
.tf-refund p { margin-top: .75rem; max-width: 52rem; font-size: 1rem; }

@media (max-width: 900px) {
  .tf-grid { grid-template-columns: minmax(0, 1fr); grid-template-areas: "summary" "steps" "full"; grid-template-rows: none; }
}
@media (max-width: 575.98px) {
  .tf-calc { padding: 1.5rem 0 2rem; }
  .tf-card { padding: 1.1rem; }
  .tf-stop { font-size: .85rem; }
  .tf-months { grid-template-columns: repeat(auto-fill, minmax(4.4rem, 1fr)); }
}
