/* ===== Who can apply: centered heading, 3x2 grid, check badge on each icon ===== */
.ofw-elig { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: repeat(3, auto); grid-auto-flow: column; gap: 36px 64px; max-width: 880px; margin: 0 auto; padding: 0; list-style: none; }
/* Top-aligned so every title in a row starts at the same height, even when a detail wraps */
.ofw-elig li { display: grid; grid-template-columns: 28px minmax(0, 1fr); grid-template-rows: auto 1fr; column-gap: 14px; row-gap: 4px; align-items: start; }
.ofw-elig li > strong { padding-top: 0; }
.ofw-elig-icon {
  grid-row: span 2; width: 28px; height: 28px; margin-top: 0; border-radius: 50%;
  background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231B6083' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 14px no-repeat;
  box-shadow: inset 0 0 0 2px var(--deep-teal);
  transition: transform 250ms ease, background-color 250ms ease;
}
@media (hover: hover) { .ofw-elig li:hover .ofw-elig-icon { transform: scale(1.1); background-color: var(--deep-teal); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E"); } }
.ofw-elig strong { color: var(--charcoal-navy); font-size: 22px; font-weight: var(--fw-heading); line-height: var(--lh-ui); }
.ofw-elig li > span:last-child { color: var(--muted-blue-gray); font-size: 16px; line-height: var(--lh-body); }

/* ===== What you'll need: centered tabs, applicant and co-maker side by side ===== */
.req-tabs { display: flex; width: fit-content; max-width: 100%; gap: 4px; margin: 0 auto clamp(32px, 4vw, 44px); padding: 6px; border-radius: 999px; background: var(--soft-card); }
.ofw-tab {
  appearance: none; flex: 1 1 0; border: 0; border-radius: 999px; padding: 12px 22px; background: transparent; white-space: nowrap;
  color: var(--muted-blue-gray); font: 700 15px/1.2 'Manrope', sans-serif; cursor: pointer; transition: background-color 220ms ease, color 220ms ease;
}
.ofw-tab:hover { color: var(--deep-teal); }
.ofw-tab[aria-selected="true"] { background: var(--deep-teal); color: #FFFFFF; }
.req-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(32px, 5vw, 72px); max-width: 880px; margin: 0 auto; }
.req-col h3 { margin: 0 0 18px; color: var(--charcoal-navy); font-size: 22px; font-weight: var(--fw-heading); }
.req-panel[hidden] { display: none; }
.req-panel.is-entering { animation: reqFade 360ms ease both; }
@keyframes reqFade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.req-list { display: grid; gap: 14px; margin: 0; padding: 0; list-style: none; }
.req-list li { display: flex; align-items: center; gap: 12px; color: var(--charcoal-navy); font-size: 16px; font-weight: 600; line-height: var(--lh-ui); }
.req-list li::before { content: ""; flex: 0 0 7px; width: 7px; height: 7px; border-radius: 50%; background: var(--deep-teal); }
/* Proof of income: a bulleted lead-in, then its options with hollow (outline) bullets, indented underneath */
.req-list--sub { margin-top: 14px; }
.req-list--outline { margin: 12px 0 0 19px; gap: 12px; }
.req-list--outline li { font-weight: 500; }
.req-list--outline li::before { background: transparent; border: 2px solid var(--deep-teal); box-sizing: border-box; flex-basis: 8px; width: 8px; height: 8px; }
/* Co-maker rule: "Take note" callout, thick orange left border, no background */
.req-note { max-width: 880px; margin: clamp(36px, 4vw, 48px) auto 0; padding: 4px 0 4px 22px; border-left: 5px solid var(--accent-orange); }
.req-note-tag { display: inline-flex; align-items: center; gap: 6px; margin: 0 0 8px; color: #D98A0B; font-size: 13px; font-weight: var(--fw-label); letter-spacing: var(--ls-caps); text-transform: uppercase; }
.req-note-tag svg { width: 16px; height: 16px; }
.req-note h3 { margin: 0 0 12px; color: var(--charcoal-navy); font-size: 22px; font-weight: var(--fw-heading); line-height: var(--lh-ui); }
.req-note > p:last-child { margin: 0; color: var(--muted-blue-gray); font-size: 16px; line-height: var(--lh-body); }

@media (max-width: 960px) {
  .ofw-elig { gap: 32px 40px; }
  .req-grid { grid-template-columns: minmax(0, 1fr); gap: 36px; }
}
@media (max-width: 640px) {
  .ofw-elig { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; grid-auto-flow: row; gap: 24px; }
  .ofw-elig li { grid-template-columns: 24px minmax(0, 1fr); column-gap: 12px; }
  .ofw-elig-icon { width: 24px; height: 24px; margin-top: 0; background-size: 12px; }
  .ofw-elig strong { font-size: 17px; }
  .req-tabs { width: 100%; }
  .ofw-tab { padding: 10px 6px; font-size: 13px; white-space: normal; }
  .req-list li { font-size: 16px; }
  .req-note { padding-left: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .ofw-elig-icon, .ofw-tab { transition: none; }
  .req-panel.is-entering { animation: none; }
}
/* ===== Loan Calculator page (reuses the loan page styles above) ===== */
#calculator, #schedule, #loan-amount { scroll-margin-top: 100px; }

/* Calculator: two panels side by side, like the Help page map + form */
.calc-card { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 20px; max-width: 1120px; margin: 0 auto; }
.calc-inputs { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; align-content: start; padding: clamp(28px, 3.6vw, 44px); border-radius: 32px; background: var(--soft-card); }
.calc-group { margin: 0; padding: 0; border: 0; min-width: 0; }
.calc-group legend, .calc-label { display: block; margin: 0 0 10px; padding: 0; color: var(--charcoal-navy); font-size: 15px; font-weight: var(--fw-heading); }

/* Pill choices: deep-teal when selected, like the requirement tabs */
.calc-seg { display: flex; flex-wrap: wrap; gap: 8px; }
.calc-seg input { position: absolute; opacity: 0; pointer-events: none; }
.calc-seg label {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 20px; border-radius: 999px;
  background: #FFFFFF; border: 1px solid rgba(27,96,131,.16); color: var(--muted-blue-gray); font-size: 14px; font-weight: 700; cursor: pointer;
  transition: background-color 220ms ease, color 220ms ease, border-color 220ms ease;
}
.calc-seg label:hover { border-color: rgba(45,174,224,.65); color: var(--deep-teal); }
.calc-seg input:checked + label { background: var(--deep-teal); border-color: var(--deep-teal); color: #FFFFFF; }
.calc-seg input:focus-visible + label { outline: 3px solid rgba(45,174,224,.55); outline-offset: 3px; }
.calc-collapse { display: grid; grid-template-rows: 1fr; transition: grid-template-rows 300ms cubic-bezier(.22,1,.36,1), opacity 240ms ease, margin 300ms ease; }
.calc-collapse > div { overflow: hidden; min-width: 0; padding: 3px; margin: -3px; }
.calc-collapse.is-collapsed { grid-template-rows: 0fr; opacity: 0; margin-top: -28px; }

/* Amount and term fields */
.calc-field-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.calc-field-head .calc-label { margin: 0; }
.calc-value {
  display: inline-flex; align-items: center; gap: 4px; height: 46px; padding: 0 14px; border-radius: 12px;
  background: #FFFFFF; border: 1px solid rgba(27,96,131,.14); color: var(--charcoal-navy); font-weight: var(--fw-heading);
  transition: border-color 200ms ease, box-shadow 200ms ease;
}
.calc-value:focus-within { border-color: var(--bright-blue); box-shadow: 0 0 0 3px rgba(45,174,224,.2); }
.calc-value input { width: 104px; border: 0; background: transparent; color: inherit; font: 800 17px/1 'Manrope', sans-serif; font-variant-numeric: tabular-nums; text-align: right; outline: none; }
.calc-value--term input { width: 30px; }
.calc-value span { color: var(--muted-blue-gray); font-size: 14px; font-weight: 700; }
.calc-range {
  --fill: 50%;
  -webkit-appearance: none; appearance: none; display: block; width: 100%; height: 6px; margin: 0; border-radius: 999px; cursor: pointer;
  background: linear-gradient(to right, var(--deep-teal) var(--fill), #D6E7EF var(--fill));
}
.calc-range::-webkit-slider-thumb { -webkit-appearance: none; width: 24px; height: 24px; border-radius: 50%; background: #FFFFFF; border: 6px solid var(--deep-teal); box-shadow: 0 2px 8px rgba(19,47,62,.2); }
.calc-range::-moz-range-thumb { width: 12px; height: 12px; border-radius: 50%; background: #FFFFFF; border: 6px solid var(--deep-teal); }
.calc-range:focus-visible { outline: 3px solid rgba(45,174,224,.55); outline-offset: 6px; }
.calc-range-scale { display: flex; justify-content: space-between; margin-top: 10px; color: var(--muted-blue-gray); font-size: 13px; font-weight: 600; }
.calc-range-hint { margin: 8px 0 0; color: var(--muted-blue-gray); font-size: 13px; line-height: var(--lh-body); }

.calc-rate { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px; border-radius: 16px; background: #FFFFFF; }
.calc-rate .calc-label { margin: 0; white-space: nowrap; }
.calc-rate { flex-wrap: wrap; }
.calc-rate strong, .calc-rate small { white-space: nowrap; }
.calc-rate strong { color: var(--deep-teal); font-size: 16px; font-weight: var(--fw-heading); }
.calc-rate small { margin-left: 8px; padding: 3px 10px; border-radius: 999px; background: #EAF5FA; color: var(--deep-teal); font-size: 12px; font-weight: var(--fw-label); }

/* Result: same teal gradient as the "Simple steps" band and final CTA */
.calc-result {
  display: flex; flex-direction: column; padding: clamp(28px, 3.6vw, 44px); border-radius: 32px; color: #FFFFFF;
  background:
    radial-gradient(110% 130% at 100% 0%, rgba(45,174,224,.55) 0%, rgba(45,174,224,0) 60%),
    linear-gradient(135deg, #1B6083 0%, #175473 100%);
}
.calc-result-label { margin: 0; color: rgba(255,255,255,.75); font-size: 15px; font-weight: 700; }
.calc-result-total { margin: 8px 0 28px; font-size: clamp(40px, 4.4vw, 56px); font-weight: var(--fw-display); letter-spacing: var(--ls-display); line-height: var(--lh-display); font-variant-numeric: tabular-nums; }
.calc-lines { margin: 0; padding: 0; list-style: none; display: grid; gap: 14px; }
.calc-lines li { display: flex; justify-content: space-between; gap: 12px; font-size: 15px; }
.calc-lines li > span { color: rgba(255,255,255,.78); }
.calc-lines strong { font-weight: var(--fw-heading); font-variant-numeric: tabular-nums; }
.calc-lines--muted { margin-top: 18px; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.18); }
.calc-cta { margin-top: auto; padding-top: 32px; }
.calc-cta p { margin: 0 0 14px; font-size: 18px; font-weight: var(--fw-heading); letter-spacing: -.01em; }
.calc-cta .ofw-btn { width: 100%; }

/* Estimate disclaimer: info icon and text centered under the calculator */
.calc-note {
  display: flex; align-items: flex-start; gap: 8px; width: fit-content; max-width: 1120px; margin: 20px auto 0; padding: 0;
  color: var(--muted-blue-gray); font-size: 15px; line-height: var(--lh-body);
}
.calc-note svg { flex: 0 0 auto; width: 18px; height: 18px; margin-top: 2px; color: var(--deep-teal); }
.calc-note strong { color: var(--charcoal-navy); font-weight: var(--fw-heading); }
@media (max-width: 640px) { .calc-note { margin-top: 16px; font-size: 14px; } }

/* Schedule: centered heading, grace-period note and table */
/* Summary sits just above the table, aligned with its left edge */
.calc-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); max-width: 960px; margin: 0 auto 36px; padding: 0; }
.calc-summary > div { min-width: 0; padding: 4px 20px; border-left: 1px solid rgba(27,96,131,.14); }
.calc-summary > div:first-child { padding-left: 0; border-left: 0; }
.calc-summary dt { margin: 0 0 4px; color: var(--muted-blue-gray); font-size: 14px; font-weight: 700; }
.calc-summary dd { margin: 0; color: var(--charcoal-navy); font-size: 18px; font-weight: var(--fw-heading); line-height: var(--lh-ui); font-variant-numeric: tabular-nums; }
.calc-summary .calc-summary-key { color: var(--deep-teal); }
.calc-note--schedule { max-width: 960px; margin-top: 32px; }
@media (max-width: 760px) {
  .calc-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 18px; margin-bottom: 28px; }
  .calc-summary > div:nth-child(3) { padding-left: 0; border-left: 0; }
  .calc-summary dt { font-size: 13px; }
  .calc-summary dd { font-size: 16px; }
}
.calc-grace { max-width: 960px; margin: 0 auto 40px; }
.req-note[hidden] { display: none; }
.calc-table-wrap { max-width: 960px; margin: 0 auto; }
/* Schedule table */
.calc-table-wrap { max-width: 960px; margin: 0 auto; border-radius: 24px; background: #FFFFFF; border: 1px solid rgba(27,96,131,.14); overflow: hidden; }
.calc-table { width: 100%; border-collapse: collapse; font-size: 15px; font-variant-numeric: tabular-nums; }
.calc-table th {
  padding: 16px 20px; background: #F2F8FB; border-bottom: 1px solid rgba(27,96,131,.14);
  color: var(--deep-teal); font-size: 12px; font-weight: var(--fw-label); letter-spacing: var(--ls-caps); text-transform: uppercase; text-align: right; white-space: nowrap;
}
.calc-table td { padding: 15px 20px; border-top: 1px solid rgba(27,96,131,.08); color: var(--charcoal-navy); text-align: right; white-space: nowrap; vertical-align: middle; }
.calc-table tbody tr:first-child td { border-top: 0; }
.calc-table th:nth-child(-n+2), .calc-table td:nth-child(-n+2) { text-align: left; }
.calc-table th:first-child, .calc-table td:first-child { width: 56px; padding-right: 0; }
.calc-table tbody tr:nth-child(even) td { background: #FAFCFD; }
.calc-table tbody tr:hover td { background: #F2F8FB; }
/* Payment number badge */
.calc-num { display: inline-grid; place-items: center; width: 30px; height: 30px; color: var(--charcoal-navy); font-size: 13px; font-weight: var(--fw-label); }
.calc-date { font-weight: 700; }
.calc-break { display: none; }
/* Principal and interest repeat every month, so keep them quieter */
.calc-table td.calc-col-detail { color: var(--muted-blue-gray); }
/* Amount due is the number people look for: the only teal in each row */
.calc-table td.calc-col-due { color: var(--deep-teal); font-size: 16px; font-weight: var(--fw-heading); }
/* Total row */
.calc-table tfoot td { padding-top: 18px; padding-bottom: 18px; background: var(--deep-teal); color: #FFFFFF; font-weight: var(--fw-heading); }
.calc-table tfoot td.calc-col-detail { color: rgba(255,255,255,.8); }
.calc-table tfoot td.calc-col-due { color: #FFFFFF; font-size: 17px; }

@media (max-width: 960px) {
  /* Tablets: keep settings left and result right, just tighter */
  .calc-card { grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 14px; }
  .calc-inputs, .calc-result { padding: 24px; }
  .calc-result-total { font-size: 34px; }
}
@media (max-width: 720px) {
  /* Phones: stack the result under the settings */
  .calc-card { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  /* Keep "See what you’ll pay each month" on one line */
  #calc-title { font-size: clamp(20px, 6.1vw, 30px) !important; white-space: nowrap; }
  .calc-inputs, .calc-result { border-radius: 24px; }
  .calc-card { gap: 12px; }
  .calc-seg label { flex: 1 1 auto; padding: 0 14px; font-size: 13px; }
  .calc-value input { width: 92px; font-size: 16px; }
  .calc-table-wrap { border-radius: 20px; }
  /* On phones show #, due date (with principal + interest under it) and amount due */
  .calc-table .calc-col-detail { display: none; }
  .calc-table th, .calc-table td { padding-left: 14px; padding-right: 14px; }
  .calc-table th:first-child, .calc-table td:first-child { width: 44px; padding-right: 0; }
  .calc-break { display: block; margin-top: 2px; color: var(--muted-blue-gray); font-size: 12.5px; font-weight: 600; }
  .calc-table td:nth-child(2) { white-space: normal; }
  .calc-table td.calc-col-due { font-size: 15px; padding-left: 8px; }
  .calc-table tfoot td.calc-col-due { font-size: 16px; }
  .calc-num { width: 26px; height: 26px; font-size: 12px; }
}

/* How much can you borrow: the four facts in a 2x2 grid (one column on phones). */
#loan-amount .ofw-elig { grid-template-rows: repeat(2, auto); }
@media (max-width: 640px) { #loan-amount .ofw-elig { grid-template-rows: none; } }
#loan-amount .ofw-elig li > span:last-child { max-width: none; }
@media (prefers-reduced-motion: reduce) {
  .calc-collapse { transition: none; }
}
