:root {
  --ink: #102a3a;
  --muted: #5f7481;
  --line: #dce7ed;
  --surface: #ffffff;
  --page: #f1f6f8;
  --navy: #073b5c;
  --blue: #0b5d8a;
  --cyan: #0db4c8;
  --cyan-soft: #dff8fa;
  --yellow: #ffc857;
  --danger: #b42318;
  --shadow: 0 18px 50px rgba(12, 59, 83, 0.10);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--page);
  font-synthesis: none;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; background: var(--page); }
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255,255,255,.94);
  border-bottom: 1px solid rgba(198, 216, 225, .85);
  backdrop-filter: blur(14px);
}
.header-inner, main, .footer-inner { width: min(1180px, calc(100% - 40px)); margin: 0 auto; }
.header-inner { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 12px; }
.brand-mark { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 14px 14px 14px 4px; color: white; font-weight: 850; letter-spacing: -.05em; background: linear-gradient(135deg, var(--cyan), var(--blue)); box-shadow: 0 8px 18px rgba(11,93,138,.23); }
.brand > span:last-child, .footer-brand div { display: flex; flex-direction: column; }
.brand strong { font-size: 1.08rem; letter-spacing: -.02em; }
.brand small { color: var(--muted); font-size: .75rem; margin-top: 2px; }
.header-inner nav { display: flex; gap: 26px; color: #425c6b; font-size: .92rem; font-weight: 650; }
.header-inner nav a:hover { color: var(--blue); }

main { padding-bottom: 72px; }
.intro { padding: 52px 8px 30px; display: flex; align-items: flex-end; justify-content: space-between; gap: 32px; }
.eyebrow, .section-kicker { color: var(--blue); font-size: .75rem; line-height: 1.2; font-weight: 800; letter-spacing: .11em; text-transform: uppercase; }
.intro h1 { max-width: 720px; margin: 10px 0 12px; font-size: clamp(2rem, 5vw, 3.55rem); line-height: 1.02; letter-spacing: -.055em; color: var(--navy); }
.intro p { max-width: 690px; margin: 0; font-size: 1.04rem; line-height: 1.65; color: var(--muted); }
.intro-badge { flex: 0 0 auto; display: flex; align-items: center; gap: 11px; padding: 14px 16px; border: 1px solid #cce8ea; border-radius: 16px; background: var(--cyan-soft); }
.intro-badge > span { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; color: white; background: var(--cyan); font-weight: 900; }
.intro-badge div { display: flex; flex-direction: column; gap: 2px; }
.intro-badge strong { font-size: .9rem; }
.intro-badge small { color: #4d6975; font-size: .76rem; }

.ad-slot { border: 1px dashed #c7d6de; color: #8798a2; background: rgba(255,255,255,.5); text-align: center; }
.ad-slot span { display: block; font-size: .65rem; letter-spacing: .14em; text-transform: uppercase; }
.ad-slot p { margin: 5px 0 0; font-size: .78rem; }
.ad-wide { min-height: 82px; display: grid; align-content: center; border-radius: 16px; margin: 0 0 22px; }

.workspace { display: grid; grid-template-columns: minmax(0, 1.38fr) minmax(320px, .78fr); gap: 22px; align-items: start; scroll-margin-top: 96px; }
.calculator-card, .results-card, .schedule-card { border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow); }
.calculator-card { border-radius: 24px; overflow: hidden; }
.type-tabs { display: grid; grid-template-columns: repeat(4, 1fr); background: #e8f0f4; padding: 7px; gap: 7px; }
.type-tab { min-height: 54px; border: 0; border-radius: 15px; color: #58707e; background: transparent; font-weight: 780; transition: .18s ease; }
.type-tab.active { color: var(--navy); background: white; box-shadow: 0 4px 14px rgba(16,55,76,.09); }
.tab-icon { display: inline-grid; place-items: center; min-width: 38px; min-height: 23px; margin-right: 7px; padding: 0 6px; border-radius: 7px; color: var(--blue); background: var(--cyan-soft); font-size: .6rem; letter-spacing: .05em; }
form { padding: 28px 30px 32px; }
.form-heading, .results-heading, .schedule-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; }
.form-heading { margin-bottom: 25px; }
.section-kicker { margin: 0 0 7px; }
h2 { margin: 0; font-size: clamp(1.35rem, 3vw, 1.72rem); color: var(--navy); letter-spacing: -.035em; }
.text-button { padding: 4px; border: 0; color: var(--blue); background: transparent; font-size: .82rem; font-weight: 700; }
.field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.field { min-width: 0; }
.field > span { display: block; margin-bottom: 8px; font-size: .88rem; font-weight: 700; color: #314d5d; }
.field small { display: block; margin-top: 6px; min-height: 17px; color: #718691; font-size: .74rem; line-height: 1.35; }
.input-wrap { min-height: 51px; display: flex; align-items: center; overflow: hidden; border: 1px solid #cfdde4; border-radius: 12px; background: #fbfdfe; transition: border-color .18s, box-shadow .18s; }
.input-wrap:focus-within, select:focus { border-color: var(--cyan); box-shadow: 0 0 0 4px rgba(13,180,200,.12); outline: none; }
.input-wrap > span { flex: 0 0 auto; color: #68808d; font-size: .84rem; font-weight: 650; }
.input-wrap.prefix > span { padding-left: 14px; }
.input-wrap.suffix > span { padding-right: 14px; }
.input-wrap input { width: 100%; min-width: 0; height: 49px; padding: 0 13px; border: 0; outline: 0; color: var(--ink); background: transparent; font-weight: 720; }
select { width: 100%; min-height: 51px; padding: 0 40px 0 13px; border: 1px solid #cfdde4; border-radius: 12px; color: var(--ink); background: #fbfdfe; font-weight: 650; }
.rate-row { display: grid; grid-template-columns: 1fr 116px; gap: 8px; }
.rate-row select { padding-right: 6px; }
.form-error { margin-top: 18px; padding: 12px 14px; border-radius: 10px; color: var(--danger); background: #fff0ee; font-size: .86rem; font-weight: 650; }
.primary-button { width: 100%; min-height: 56px; margin-top: 24px; border: 0; border-radius: 14px; color: white; background: linear-gradient(110deg, var(--blue), #087c9c); font-weight: 800; box-shadow: 0 12px 22px rgba(8,103,143,.22); transition: transform .18s, box-shadow .18s; }
.primary-button:hover { transform: translateY(-1px); box-shadow: 0 14px 25px rgba(8,103,143,.28); }
.primary-button span { margin-left: 8px; }

.results-card { position: sticky; top: 96px; padding: 28px; border-radius: 24px; color: white; border-color: transparent; background: linear-gradient(155deg, #063653 0%, #07527a 68%, #086b87 100%); box-shadow: 0 20px 55px rgba(2,45,70,.22); overflow: hidden; }
.results-card::after { content: ""; position: absolute; width: 190px; height: 190px; right: -70px; top: -85px; border: 42px solid rgba(255,255,255,.035); border-radius: 50%; pointer-events: none; }
.results-card .section-kicker { color: #7ee6eb; }
.status-pill { padding: 6px 9px; border: 1px solid rgba(255,255,255,.16); border-radius: 99px; color: #c6edf2; background: rgba(255,255,255,.07); font-size: .69rem; }
.payment-highlight { padding: 24px 0 22px; border-bottom: 1px solid rgba(255,255,255,.12); }
.payment-highlight > span { display: block; color: #b6d2df; font-size: .84rem; }
.payment-highlight strong { display: block; margin: 6px 0 3px; font-size: clamp(2rem, 5vw, 2.75rem); line-height: 1.1; letter-spacing: -.055em; }
.payment-highlight small { color: #acd0dc; }
.summary-list { margin: 8px 0 20px; }
.summary-list > div { display: flex; justify-content: space-between; gap: 16px; padding: 11px 0; }
.summary-list dt { color: #b8d2dd; font-size: .84rem; }
.summary-list dd { margin: 0; font-size: .88rem; font-weight: 750; text-align: right; }
.summary-list .summary-total { margin-top: 4px; padding-top: 15px; border-top: 1px solid rgba(255,255,255,.12); }
.summary-list .summary-total dt, .summary-list .summary-total dd { color: white; font-weight: 800; }
.cost-bar-track { height: 8px; display: flex; overflow: hidden; border-radius: 99px; background: rgba(255,255,255,.1); }
.cost-bar-track span { height: 100%; transition: width .3s ease; }
#principal-bar { width: 76%; background: #fff; }
#interest-bar { width: 24%; background: var(--yellow); }
.cost-legend { display: flex; gap: 15px; margin-top: 9px; color: #b8d2dd; font-size: .68rem; }
.cost-legend span { display: flex; align-items: center; gap: 5px; }
.cost-legend i { width: 7px; height: 7px; border-radius: 50%; }
.principal-dot { background: white; }
.interest-dot { background: var(--yellow); }
.secondary-button { width: 100%; min-height: 48px; margin-top: 23px; border: 1px solid rgba(255,255,255,.25); border-radius: 12px; color: white; background: rgba(255,255,255,.08); font-weight: 750; }
.secondary-button:hover { background: rgba(255,255,255,.14); }
.result-note { margin: 14px 0 0; color: #9fc2d0; font-size: .7rem; line-height: 1.45; text-align: center; }

.schedule-card { margin-top: 22px; padding: 28px; border-radius: 22px; }
.schedule-heading { margin-bottom: 20px; }
.icon-button { width: 38px; height: 38px; border: 0; border-radius: 50%; color: #54707e; background: #edf4f6; font-size: 1.5rem; line-height: 1; }
.table-wrap { overflow: auto; border: 1px solid var(--line); border-radius: 14px; }
table { width: 100%; min-width: 720px; border-collapse: collapse; text-align: right; }
th, td { padding: 14px 16px; border-bottom: 1px solid #e5edf1; font-size: .83rem; }
th { position: sticky; top: 0; color: #506a78; background: #f4f8fa; font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; }
th:first-child, td:first-child { text-align: left; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #f8fbfc; }

.ad-middle { margin: 26px 0 0; }
.rates-section { margin-top: 58px; scroll-margin-top: 100px; }
.rates-heading { display: flex; align-items: end; justify-content: space-between; gap: 28px; margin-bottom: 22px; }
.rates-heading > div > p:last-child { max-width: 720px; margin: 10px 0 0; color: var(--muted); line-height: 1.55; }
.refresh-rates { flex: 0 0 auto; min-height: 44px; padding: 0 16px; border: 1px solid #bcd3dc; border-radius: 11px; color: var(--blue); background: white; font-weight: 750; }
.refresh-rates:hover { border-color: var(--cyan); }
.refresh-rates:disabled { cursor: wait; opacity: .6; }
.rates-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.rate-card { padding: 21px; border: 1px solid var(--line); border-radius: 18px; background: white; box-shadow: 0 10px 30px rgba(12,59,83,.06); }
.rate-card > span { display: block; min-height: 38px; color: #435e6d; font-size: .82rem; font-weight: 720; }
.rate-card strong { display: block; margin: 4px 0; color: var(--navy); font-size: 1.42rem; letter-spacing: -.035em; }
.rate-card small { display: block; min-height: 33px; color: var(--muted); font-size: .7rem; line-height: 1.4; }
.rate-card button { width: 100%; min-height: 39px; margin-top: 14px; border: 0; border-radius: 10px; color: var(--blue); background: var(--cyan-soft); font-size: .75rem; font-weight: 780; }
.rate-card button:hover { background: #c8f2f5; }
.rates-note { display: flex; justify-content: space-between; gap: 20px; margin-top: 13px; color: var(--muted); font-size: .73rem; line-height: 1.5; }
.rates-note a { flex: 0 0 auto; color: var(--blue); font-weight: 750; }
.education { margin-top: 60px; scroll-margin-top: 100px; }
.education-intro { display: grid; grid-template-columns: 1fr 1.1fr; gap: 34px; align-items: end; margin-bottom: 26px; }
.education-intro > p:last-child { margin: 0; color: var(--muted); line-height: 1.65; }
.info-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.info-grid article { padding: 25px; border: 1px solid var(--line); border-radius: 18px; background: white; }
.info-grid article > span { display: inline-grid; width: 34px; height: 34px; place-items: center; border-radius: 10px; color: var(--blue); background: var(--cyan-soft); font-size: .73rem; font-weight: 850; }
.info-grid h3 { margin: 17px 0 8px; color: var(--navy); font-size: 1.05rem; }
.info-grid p { margin: 0; color: var(--muted); font-size: .88rem; line-height: 1.58; }
.disclaimer { display: grid; grid-template-columns: 120px 1fr; gap: 24px; margin-top: 22px; padding: 21px 24px; border: 1px solid #d7e5ea; border-radius: 16px; background: #eaf2f5; }
.disclaimer strong { color: var(--navy); }
.disclaimer p { margin: 0; color: #57707c; font-size: .83rem; line-height: 1.55; }
.guides-section { margin-top: 60px; scroll-margin-top: 100px; }
.guides-heading { max-width: 720px; margin-bottom: 24px; }
.guides-heading > p:last-child { margin: 10px 0 0; color: var(--muted); line-height: 1.6; }
.guides-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.guide-card { display: block; padding: 25px; border: 1px solid var(--line); border-radius: 18px; background: white; box-shadow: 0 10px 30px rgba(12,59,83,.05); transition: transform .18s, border-color .18s, box-shadow .18s; }
.guide-card:hover { transform: translateY(-2px); border-color: #a9dbe1; box-shadow: 0 14px 34px rgba(12,59,83,.09); }
.guide-card > span { color: var(--blue); font-size: .7rem; font-weight: 850; letter-spacing: .1em; }
.guide-card h3 { margin: 10px 0 8px; color: var(--navy); font-size: 1.08rem; }
.guide-card p { margin: 0 0 18px; color: var(--muted); font-size: .87rem; line-height: 1.58; }
.guide-card strong { color: var(--blue); font-size: .8rem; }

footer { border-top: 1px solid #d8e4e9; background: white; }
.footer-inner { min-height: 118px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.footer-brand { display: flex; align-items: center; gap: 10px; }
.brand-mark.small { width: 36px; height: 36px; border-radius: 11px 11px 11px 3px; font-size: .76rem; }
.footer-brand strong { font-size: .9rem; }
.footer-brand small { margin-top: 3px; color: var(--muted); font-size: .72rem; }
.footer-links { display: flex; gap: 18px; }
.footer-links button, .footer-links a { border: 0; padding: 0; color: #526d7b; background: transparent; font-size: .78rem; }
.footer-links button:hover, .footer-links a:hover { color: var(--blue); }

dialog { width: min(600px, calc(100% - 32px)); padding: 0; border: 0; border-radius: 22px; box-shadow: 0 30px 90px rgba(8,39,56,.28); }
dialog::backdrop { background: rgba(4,28,42,.6); backdrop-filter: blur(3px); }
.dialog-content { position: relative; padding: 34px; }
.dialog-content h2 { margin-bottom: 18px; }
.dialog-content p:not(.section-kicker) { color: var(--muted); line-height: 1.65; }
.dialog-close { position: absolute; top: 18px; right: 18px; width: 36px; height: 36px; border: 0; border-radius: 50%; color: #506a78; background: #eef4f6; font-size: 1.35rem; }
.cookie-banner { position: fixed; z-index: 30; left: 50%; bottom: 18px; width: min(880px, calc(100% - 32px)); transform: translateX(-50%); display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 18px 20px; border: 1px solid #cbdce4; border-radius: 17px; background: white; box-shadow: 0 20px 60px rgba(8,46,66,.22); }
.cookie-banner strong { font-size: .9rem; }
.cookie-banner p { margin: 4px 0 0; color: var(--muted); font-size: .75rem; line-height: 1.45; }
.cookie-actions { flex: 0 0 auto; display: flex; gap: 8px; }
.cookie-actions button { min-height: 40px; padding: 0 13px; border-radius: 10px; font-size: .76rem; font-weight: 750; }
.cookie-secondary { border: 1px solid #cfdee4; color: #43606f; background: white; }
.cookie-primary { border: 0; color: white; background: var(--blue); }

@media (max-width: 900px) {
  .workspace { grid-template-columns: 1fr; }
  .results-card { position: relative; top: auto; }
  .info-grid { grid-template-columns: 1fr; }
  .education-intro { grid-template-columns: 1fr; gap: 12px; }
  .rates-grid { grid-template-columns: repeat(2, 1fr); }
  .guides-grid { grid-template-columns: 1fr; }
}

@media (max-width: 660px) {
  .header-inner, main, .footer-inner { width: min(100% - 24px, 1180px); }
  .header-inner { min-height: 68px; }
  .header-inner nav { display: none; }
  .brand small { display: none; }
  .intro { padding: 34px 2px 22px; align-items: flex-start; flex-direction: column; gap: 18px; }
  .intro h1 { font-size: 2.35rem; }
  .intro p { font-size: .94rem; }
  .intro-badge { padding: 11px 13px; }
  .ad-wide { min-height: 70px; }
  .field-grid { grid-template-columns: 1fr; gap: 15px; }
  .type-tabs { grid-template-columns: repeat(2, 1fr); }
  .rates-heading, .rates-note { align-items: stretch; flex-direction: column; }
  .refresh-rates { width: 100%; }
  .rates-note a { flex: initial; }
  form { padding: 23px 17px 22px; }
  .form-heading { align-items: center; }
  .text-button { max-width: 95px; text-align: right; }
  .results-card { padding: 23px 20px; }
  .payment-highlight strong { font-size: 2.35rem; }
  .schedule-card { padding: 21px 13px; }
  .education { margin-top: 45px; }
  .info-grid article { padding: 21px; }
  .disclaimer { grid-template-columns: 1fr; gap: 8px; }
  .footer-inner { min-height: 150px; flex-direction: column; justify-content: center; align-items: flex-start; }
  .footer-links { flex-wrap: wrap; gap: 8px 14px; }
  .footer-links button { padding: 0; }
  .cookie-banner { align-items: stretch; flex-direction: column; gap: 13px; bottom: 10px; }
  .cookie-actions button { flex: 1; }
}

@media (max-width: 430px) {
  .rates-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
