:root {
  --forest: #12372a;
  --forest-2: #0b2a20;
  --green: #1d5d45;
  --mint: #dff4e9;
  --cream: #f7f3ea;
  --gold: #e7b84b;
  --ink: #17231e;
  --muted: #65726b;
  --line: #dbe2dd;
  --white: #fff;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--cream);
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; background: var(--cream); }
button, input, select { font: inherit; }

.topbar {
  min-height: 92px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1180px;
  margin: 0 auto;
  padding: 12px 24px;
}

.brand, .footer-brand { display: inline-flex; align-items: center; color: var(--forest); text-decoration: none; }
.brand-logo { display: block; width: 188px; height: auto; }
.footer-brand .brand-logo { width: 150px; }
.header-actions { display: flex; align-items: center; gap: 8px; }
.install-button, .share-button { display: inline-flex; align-items: center; gap: 8px; padding: 10px 15px; border: 1px solid #cbd8d0; border-radius: 999px; background: rgba(255,255,255,.75); color: var(--green); font-size: 13px; font-weight: 800; cursor: pointer; }
.install-button:hover, .share-button:hover { border-color: var(--green); background: var(--white); }
.install-button span, .share-button span { font-size: 17px; line-height: 1; }
.install-message { position: fixed; z-index: 20; right: 20px; bottom: 20px; max-width: 380px; padding: 15px 18px; border-radius: 13px; background: var(--forest-2); color: var(--white); box-shadow: 0 14px 40px rgba(0,0,0,.24); font-size: 14px; line-height: 1.5; }

main { max-width: 1180px; margin: 0 auto; padding: 28px 24px 72px; }
.intro { max-width: 790px; padding: 42px 0 38px; }
.eyebrow, .step-label { margin: 0 0 10px; color: var(--green); font-size: 12px; font-weight: 850; letter-spacing: .13em; }
.step-label.light { color: #a8dec5; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 16px; font-family: Georgia, "Times New Roman", serif; font-size: clamp(42px, 6.4vw, 76px); line-height: .98; letter-spacing: -.045em; color: var(--forest-2); }
h2 { margin-bottom: 0; font-family: Georgia, "Times New Roman", serif; font-size: clamp(25px, 3vw, 36px); letter-spacing: -.025em; }
.intro-copy { max-width: 680px; margin-bottom: 22px; color: #4f5d56; font-size: 19px; line-height: 1.6; }
.trust-note { display: inline-flex; align-items: flex-start; gap: 10px; padding: 11px 15px; border-radius: 10px; background: var(--mint); color: var(--green); font-size: 13px; line-height: 1.45; }
.trust-note span { display: grid; place-items: center; flex: 0 0 auto; width: 21px; height: 21px; border-radius: 50%; background: var(--green); color: var(--white); font-weight: 900; }
.trust-note p { margin: 1px 0 0; }

.calculator-shell { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(360px, .92fr); overflow: hidden; border-radius: 22px; background: var(--white); box-shadow: 0 22px 70px rgba(20,49,38,.13); }
.form-panel, .results-panel { padding: clamp(26px, 4vw, 48px); }
.panel-heading { margin-bottom: 32px; }
.form-panel h2 { color: var(--forest); }
.field-group { min-width: 0; margin: 0 0 24px; padding: 0; border: 0; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
label, legend { display: block; margin-bottom: 9px; color: #25372f; font-size: 14px; font-weight: 760; }

.segmented { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; padding: 5px; border-radius: 12px; background: #eef2ef; }
.segmented label { margin: 0; cursor: pointer; }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented span { display: block; padding: 11px 10px; border-radius: 9px; color: #617068; text-align: center; font-size: 13px; font-weight: 780; transition: .16s ease; }
.segmented input:checked + span { background: var(--white); color: var(--forest); box-shadow: 0 2px 8px rgba(18,55,42,.12); }
.segmented input:focus-visible + span { outline: 3px solid rgba(29,93,69,.25); }

.money-input { position: relative; display: flex; align-items: center; }
.money-input span { position: absolute; left: 17px; color: var(--green); font-size: 20px; font-weight: 850; }
.money-input input { width: 100%; padding: 16px 16px 16px 47px; border: 1.5px solid var(--line); border-radius: 12px; background: #fbfdfb; color: var(--ink); font-size: 21px; font-weight: 800; }
.select-wrap { position: relative; }
.select-wrap::after { content: "⌄"; position: absolute; right: 14px; top: 50%; transform: translateY(-58%); color: var(--green); pointer-events: none; }
.select-wrap.locked::after { content: "Fixed"; right: 13px; transform: translateY(-50%); color: var(--green); font-size: 11px; font-weight: 850; letter-spacing: .03em; }
select, .date-input { width: 100%; min-height: 52px; padding: 13px 40px 13px 14px; appearance: none; border: 1.5px solid var(--line); border-radius: 12px; background: #fbfdfb; color: var(--ink); font-weight: 740; }
select:disabled { opacity: 1; padding-right: 66px; background: #f3f7f4; color: var(--ink); -webkit-text-fill-color: var(--ink); cursor: not-allowed; }
.date-input { padding-right: 14px; }
input:focus, select:focus { outline: 3px solid rgba(29,93,69,.14); border-color: var(--green); }
input[aria-invalid="true"] { border-color: #bd3d3d; }
.help-text, .error-text { margin: 7px 0 0; color: var(--muted); font-size: 12px; line-height: 1.4; }
.error-text { min-height: 0; color: #a82f2f; font-weight: 700; }
.locked-term { display: flex; align-items: center; gap: 13px; min-height: 62px; padding: 12px 15px; border: 1.5px solid var(--line); border-radius: 12px; background: #f3f7f4; }
.lock-mark { display: grid; place-items: center; flex: 0 0 auto; width: 30px; height: 30px; border-radius: 50%; background: var(--mint); color: var(--green); font-weight: 900; }
.locked-term strong, .locked-term small { display: block; }
.locked-term strong { color: var(--forest); font-size: 14px; }
.locked-term small { margin-top: 3px; color: var(--muted); font-size: 12px; }
.terms-notice { margin: -8px 0 24px; padding: 11px 13px; border-left: 3px solid var(--gold); border-radius: 0 9px 9px 0; background: #fff9e8; color: #64552d; font-size: 12px; line-height: 1.5; }

.primary-button { width: 100%; display: flex; justify-content: center; align-items: center; gap: 12px; padding: 16px 20px; border: 0; border-radius: 12px; background: var(--gold); color: #1d2d26; font-weight: 850; cursor: pointer; box-shadow: 0 9px 22px rgba(194,143,28,.18); }
.primary-button:hover { background: #f0c55b; transform: translateY(-1px); }
.primary-button:active { transform: translateY(0); }

.results-panel { display: flex; flex-direction: column; background: var(--forest); color: var(--white); }
.results-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; margin-bottom: 44px; }
.results-panel h2 { color: var(--white); }
.status-badge { flex: 0 0 auto; padding: 7px 10px; border: 1px solid rgba(255,255,255,.22); border-radius: 999px; color: #c9e1d5; font-size: 11px; font-weight: 750; }
.hero-result { padding-bottom: 30px; border-bottom: 1px solid rgba(255,255,255,.17); }
.hero-result span { display: block; color: #bdcfC7; font-size: 14px; }
.hero-result strong { display: block; margin: 7px 0 3px; color: var(--gold); font-family: Georgia, "Times New Roman", serif; font-size: clamp(42px, 5vw, 62px); line-height: 1; letter-spacing: -.04em; }
.hero-result small { color: #bfd0c8; }
.summary-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; margin: 28px 0; }
.summary-grid div { padding: 16px; border: 1px solid rgba(255,255,255,.15); border-radius: 12px; background: rgba(255,255,255,.055); }
.summary-grid .total-card { grid-column: 1 / -1; border-color: rgba(231,184,75,.42); }
.summary-grid dt { margin-bottom: 7px; color: #b6cac0; font-size: 12px; }
.summary-grid dd { margin: 0; color: var(--white); font-size: 21px; font-weight: 820; }
.summary-grid .total-card dd { color: var(--gold); }
.formula-note { display: flex; align-items: flex-start; gap: 10px; margin-top: auto; padding: 15px; border-radius: 12px; background: rgba(0,0,0,.14); color: #c5d8cf; font-size: 12px; line-height: 1.5; }
.formula-note span { display: grid; place-items: center; flex: 0 0 auto; width: 21px; height: 21px; border: 1px solid #87ad9a; border-radius: 50%; color: #bde3d0; font-family: Georgia, serif; font-weight: 800; }
.formula-note p { margin: 1px 0 0; }

.schedule-section { margin-top: 36px; padding: clamp(24px, 4vw, 42px); border-radius: 20px; background: var(--white); box-shadow: 0 14px 50px rgba(20,49,38,.08); scroll-margin-top: 20px; }
.schedule-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 25px; }
.schedule-heading h2 { color: var(--forest); }
.secondary-button { flex: 0 0 auto; padding: 11px 15px; border: 1px solid #c6d1ca; border-radius: 10px; background: var(--white); color: var(--green); font-size: 13px; font-weight: 800; cursor: pointer; }
.secondary-button:hover { background: var(--mint); }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 13px; }
table { width: 100%; border-collapse: collapse; min-width: 570px; }
th, td { padding: 15px 18px; border-bottom: 1px solid #e8ece9; text-align: left; }
th { background: #f3f7f4; color: #526159; font-size: 11px; letter-spacing: .04em; text-transform: uppercase; }
td { color: #34443c; font-size: 14px; }
td:nth-child(3), td:nth-child(4), th:nth-child(3), th:nth-child(4) { text-align: right; }
tr:last-child td { border-bottom: 0; }
td strong { color: var(--forest); }
.disclaimer { max-width: 820px; margin: 18px 0 0; color: #7b8580; font-size: 12px; line-height: 1.55; }

footer { display: flex; align-items: center; justify-content: space-between; gap: 20px; max-width: 1180px; margin: 0 auto; padding: 26px 24px 38px; border-top: 1px solid rgba(18,55,42,.12); color: var(--muted); font-size: 13px; }
footer p { margin: 0; }

@media (max-width: 820px) {
  .calculator-shell { grid-template-columns: 1fr; }
  .results-panel { min-height: 540px; }
  .intro { padding-top: 26px; }
}

@media (max-width: 560px) {
  .topbar { min-height: 76px; padding: 8px 16px; }
  .brand-logo { width: 128px; }
  .header-actions { gap: 5px; }
  .install-button, .share-button { gap: 5px; padding: 8px 9px; font-size: 11px; }
  .install-message { right: 12px; bottom: 12px; left: 12px; max-width: none; }
  main { padding: 8px 12px 48px; }
  .intro { padding: 35px 4px 28px; }
  h1 { font-size: 43px; }
  .intro-copy { font-size: 16px; }
  .calculator-shell { border-radius: 16px; }
  .form-panel, .results-panel { padding: 26px 20px; }
  .field-row { grid-template-columns: 1fr; gap: 0; }
  .segmented.wide span { min-height: 58px; display: grid; place-items: center; }
  .results-heading { flex-direction: column; margin-bottom: 32px; }
  .schedule-section { padding: 25px 16px; border-radius: 16px; }
  .schedule-heading { align-items: flex-start; flex-direction: column; }
  .secondary-button { width: 100%; }
  footer { align-items: flex-start; flex-direction: column; padding: 24px 16px 34px; }
}

@media print {
  body { background: white; }
  .topbar, .intro, .calculator-shell, footer, .secondary-button { display: none !important; }
  main { max-width: none; padding: 0; }
  .schedule-section { margin: 0; padding: 0; box-shadow: none; }
  .schedule-section::before { content: "Kongo Capital — Repayment Estimate"; display: block; margin-bottom: 22px; color: var(--forest); font-family: Georgia, serif; font-size: 26px; font-weight: 700; }
  .table-wrap { overflow: visible; }
}
