/* Shared presentation for the refreshed public journeys. */
body:is(.cf-front, .cf-calculators, .cf-request, .cf-refresh) {
  --refresh-paper: #f7f3ec;
  --refresh-line: #dcd2c5;
  --refresh-night: #172333;
  --refresh-red: #ae2330;
  --refresh-muted: #5d5148;
  background: var(--refresh-paper);
}
:is(.cf-front, .cf-calculators, .cf-request, .cf-refresh) .cf-header-wrap,
:is(.cf-front, .cf-calculators, .cf-request, .cf-refresh) .cf-header {
  background: var(--refresh-paper);
}
:is(.cf-front, .cf-calculators, .cf-request, .cf-refresh) .cf-header-wrap,
:is(.cf-front, .cf-calculators, .cf-request, .cf-refresh) .cf-footer {
  border-color: var(--refresh-line);
}
:is(.cf-front, .cf-calculators, .cf-request, .cf-refresh) .cf-nav a {
  font-size: .8rem;
}
:is(.cf-front, .cf-calculators, .cf-request, .cf-refresh) .cf-action {
  background-color: var(--refresh-red);
  border-radius: 5px;
}
:is(.cf-front, .cf-calculators, .cf-request, .cf-refresh) :focus-visible {
  outline: 2px solid var(--refresh-red);
  outline-offset: 4px;
}

.cf-front .cf-hero {
  display: grid;
  grid-template-columns: 1.04fr .96fr;
  align-items: center;
  gap: clamp(28px, 5vw, 72px);
  padding: clamp(40px, 6.5vw, 94px) 0;
  text-align: left;
}
.cf-front .cf-hero h1 {
  margin: 18px 0 20px;
  font-size: clamp(52px, 7.1vw, 102px);
  line-height: .94;
  letter-spacing: -.045em;
  text-wrap: balance;
}
.cf-front .cf-hero p {
  margin-inline: 0;
  max-width: 37ch;
  font-size: clamp(15px, 1.7vw, 18px);
  color: var(--refresh-muted);
}
.cf-front .cf-hero-actions { justify-content: flex-start; flex-wrap: wrap; }
.cf-front .cf-hero-foot { margin-top: 27px; color: var(--refresh-muted); }
.cf-front .cf-cover {
  margin: 0;
  min-width: 0;
  padding: 10px 10px 0;
  background: var(--refresh-night);
  border-radius: 8px;
  box-shadow: 0 18px 36px #37271824;
}
.cf-front .cf-cover img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1.1;
  object-fit: cover;
  border-radius: 3px;
}
.cf-front .cf-cover figcaption {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 18px;
  padding: 14px 5px;
  color: #f3e9da;
  font: 500 .62rem/1.5 var(--cf-sans);
  letter-spacing: .11em;
}
.cf-front .cf-section { border-color: var(--refresh-line); }
.cf-front .cf-feature { background: var(--refresh-night); border-radius: 8px; }
.cf-front .cf-tools { gap: clamp(12px, 2vw, 24px); }
.cf-front .cf-tools > a.cf-tool,
.cf-front .cf-stories > a.cf-story {
  padding: clamp(18px, 2.5vw, 28px);
  border: 1px solid var(--refresh-line);
  border-radius: 8px;
  background: #fffdf8;
}
.cf-front .cf-tools > a.cf-tool:hover,
.cf-front .cf-stories > a.cf-story:hover { border-color: var(--refresh-red); }
.cf-front .cf-tool-index {
  display: flex;
  justify-content: space-between;
  margin-bottom: 28px;
  color: var(--refresh-red);
  font-size: .82rem;
  font-variant-numeric: tabular-nums;
}
.cf-front .cf-tool h3 {
  font: 400 clamp(25px, 3vw, 37px)/1 var(--cf-serif);
}
.cf-front .cf-tool p, .cf-front .cf-story p { color: var(--refresh-muted); }

.cf-calculators .cf-page-intro,
.cf-calculators .calc-top {
  padding-block: clamp(36px, 6vw, 76px);
}
.cf-calculators .cf-page-intro h1,
.cf-calculators .calc-top h1 {
  font-size: clamp(46px, 7vw, 92px);
  line-height: .96;
  letter-spacing: -.04em;
}
.cf-calculators .cf-tool-rows {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(12px, 2vw, 24px);
}
.cf-calculators .cf-tool-rows .cf-tool-row {
  display: grid;
  position: relative;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto auto 1fr;
  gap: 12px;
  align-items: start;
  padding: clamp(18px, 2.6vw, 34px);
  border: 1px solid var(--refresh-line);
  border-radius: 8px;
  background: #fffdf8;
}
.cf-calculators .cf-tool-rows .cf-tool-row:hover { border-color: var(--refresh-red); }
.cf-calculators .cf-tool-row > span:first-child { color: var(--refresh-red); }
.cf-calculators .cf-tool-row .cf-arrow {
  display: block;
  grid-column: 2;
  grid-row: 1;
  color: var(--refresh-red);
}
.cf-calculators .cf-tool-row h3 {
  grid-column: 1 / -1;
  font-size: clamp(26px, 3vw, 42px);
  line-height: 1;
}
.cf-calculators .cf-tool-row p { grid-column: 1 / -1; }
.cf-tool-fallback { padding-block: 55px; }
.cf-calculators .calc-grid :is(.panel, .second, .cta-card) { border-radius: 8px; }
.cf-calculators #rm-result .result-card {
  background: var(--refresh-night);
  border: 0;
  border-radius: 8px;
  padding: clamp(18px, 3.2vw, 34px);
}
.cf-calculators #rm-result .result-card :is(.kicker, .sub, .neutral) { color: #f5ebdc; }
.cf-calculators .rm-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 14px 0 4px;
}
.cf-calculators .rm-summary > div { min-width: 0; }
.cf-calculators .rm-summary dt, .cf-calculators .rm-cost-note {
  color: #e8d7c3;
  font-size: .85rem;
}
.cf-calculators .rm-summary dd {
  margin: 5px 0 0;
  color: #fff;
  font: 500 clamp(20px, 4vw, 43px)/1.05 var(--cf-sans);
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
.cf-calculators .rm-decade-label {
  border-top: 1px solid #fbefdc4d;
  margin-top: 20px;
  padding-top: 18px;
}
.cf-calculators #rm-big { font-size: clamp(27px, 4vw, 47px); overflow-wrap: anywhere; }

.cf-request .request-page { max-width: 820px; }
.cf-request .request-heading h1 { margin: 12px 0; letter-spacing: -.04em; }
.cf-request .request-heading .request-expectation { color: var(--refresh-muted); }
.cf-request .request-card {
  padding: clamp(20px, 4vw, 40px);
  border: 1px solid var(--refresh-line);
  border-top: 3px solid var(--refresh-red);
  border-radius: 8px;
  background: #fffdf8;
  box-shadow: 0 16px 40px #37271812;
}
.cf-request .request-card :is(input:not([type=radio]):not([type=checkbox]), .request-intents label) {
  border-radius: 5px;
}
.cf-request .request-card .request-submit { background: var(--refresh-red); border-color: var(--refresh-red); }
.cf-request .request-card .request-submit:hover { background: #8d1824; }
.cf-request .request-note { font-size: .79rem; }

@media (max-width: 760px) {
  .cf-front .cf-hero { grid-template-columns: 1fr; }
  .cf-front .cf-hero h1 { font-size: clamp(48px, 11vw, 78px); }
  .cf-front .cf-cover img { aspect-ratio: 1.7; }
  .cf-calculators .cf-tool-rows { grid-template-columns: 1fr; }
  .cf-calculators .cf-tool-rows .cf-tool-row { grid-template-rows: auto; }
  .cf-front .cf-tools { grid-template-columns: 1fr; }
  .cf-front .cf-tool-index { margin-bottom: 15px; }
}

.cf-itin-refresh .itin-landing { background: var(--refresh-paper); }
.cf-itin-refresh .itin-landing .itin-hero { padding-block: clamp(45px, 7vw, 100px); }
.cf-itin-refresh .itin-landing .itin-hero h1 { letter-spacing: -.04em; line-height: .98; }
.cf-itin-refresh .itin-landing .itin-btn { background: var(--refresh-red); border-radius: 5px; }
.cf-itin-refresh .itin-section { border-color: var(--refresh-line); }
.cf-itin-refresh .itin-landing :is(.itin-opportunity, .itin-journey) {
  border-radius: 8px;
  background: #fffdf8;
  border-color: var(--refresh-line);
}
.cf-stories-refresh .cf-story-card {
  border-radius: 8px;
  border-color: var(--refresh-line);
  background: #fffdf8;
}
.cf-mortgage-refresh .hero h1 { letter-spacing: -.04em; }
.cf-mortgage-refresh .simulation :is(.result, .comparison) { border-radius: 8px; }

@media (max-width: 700px) {
  :is(.cf-front, .cf-calculators, .cf-request, .cf-refresh) .cf-header {
    flex-wrap: wrap;
    gap: 12px;
  }
  :is(.cf-front, .cf-calculators, .cf-request, .cf-refresh) .cf-nav {
    flex-wrap: wrap;
    gap: 5px 14px;
  }
  :is(.cf-front, .cf-calculators, .cf-request, .cf-refresh) .cf-nav :is(.cf-nav-tools, .cf-nav-stories) {
    display: inline-flex;
  }
  :is(.cf-front, .cf-calculators, .cf-request, .cf-refresh) .cf-nav a {
    min-height: 44px;
    align-content: center;
  }
}

:is(.cf-front, .cf-calculators, .cf-request, .cf-refresh) .cf-header-wrap .cf-header {
  padding-inline: clamp(20px, 4vw, 48px);
}
@media (max-width: 470px) {
  :is(.cf-front, .cf-calculators, .cf-request, .cf-refresh) .cf-header {
    padding-block: 14px 8px;
    gap: 6px;
  }
  :is(.cf-front, .cf-calculators, .cf-request, .cf-refresh) .cf-nav {
    flex-basis: 100%;
    justify-content: space-between;
    gap: 4px 10px;
  }
}

/* Interactive introduction to the three calculators. */
.tools-lab {
  padding-block: clamp(32px, 5vw, 65px) 52px;
}
.tools-lab-intro {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, .7fr);
  align-items: end;
  gap: 10px 24px;
  margin-bottom: clamp(22px, 4vw, 42px);
}
.tools-lab-intro .cf-kicker { grid-column: 1 / -1; }
.cf-calculators .tools-lab-intro h1 {
  margin: 0;
  font-size: clamp(46px, 7vw, 96px);
  line-height: .91;
  letter-spacing: -.05em;
}
.tools-lab-intro p {
  max-width: 30ch;
  margin: 0 0 4px;
  color: var(--refresh-muted);
  font-size: clamp(15px, 1.6vw, 18px);
  line-height: 1.6;
}
.tools-lab-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}
.tools-lab-tabs button {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-width: 0;
  min-height: 56px;
  gap: 12px;
  padding: 8px 14px;
  border: 1px solid var(--refresh-line);
  border-radius: 8px;
  background: #fffdf8;
  color: var(--refresh-night);
  font-size: clamp(13px, 1.5vw, 16px);
  font-weight: 600;
  cursor: pointer;
}
.tools-lab-tabs button:hover { border-color: var(--refresh-night); }
.tools-lab-tabs button[aria-selected="true"] {
  background: var(--refresh-night);
  border-color: var(--refresh-night);
  color: #fff;
}
.tools-lab-icon { display: flex; }
.tools-lab-icon svg { width: 20px; height: 20px; }
.tools-lab-index {
  margin-left: auto;
  opacity: .78;
  font-size: .68em;
  letter-spacing: .11em;
}
.tools-lab-panel {
  --demo-background: #2f2926;
  --demo-accent: #ffb997;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  border: 1px solid var(--refresh-line);
  border-radius: 10px;
  background: #fffdf8;
}
.tools-lab-panel[data-theme="remesas"] { --demo-background: #193832; --demo-accent: #a6e0bc; }
.tools-lab-panel[data-theme="hipoteca"] { --demo-background: #282c47; --demo-accent: #c5c7ff; }
.tools-lab-input, .tools-lab-result { min-width: 0; padding: clamp(18px, 3.3vw, 38px); }
.tools-lab-input { display: grid; align-content: start; padding-bottom: 18px; }
.tools-lab-next { padding: 0 clamp(18px, 3.3vw, 38px) clamp(18px, 3.3vw, 38px); }
.cf-calculators .tools-lab-input h2 {
  margin: 0 0 23px;
  font-size: clamp(29px, 4vw, 49px);
  line-height: 1.02;
  text-wrap: balance;
}
.tools-lab-field {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 5px 12px;
  font-size: .89rem;
}
#demo-number { font-size: 1.2rem; font-weight: 650; font-variant-numeric: tabular-nums; }
.tools-lab .tools-lab-slider { width: 100%; min-height: 44px; margin: 0; }
.tools-lab-presets { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 2px; }
.tools-lab-presets button {
  min-height: 44px;
  padding: 5px 12px;
  border: 1px solid var(--refresh-line);
  border-radius: 5px;
  background: transparent;
  color: var(--refresh-night);
  font-size: .8rem;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
}
.tools-lab-presets button[aria-pressed="true"],
.tools-lab-presets button:hover { border-color: var(--refresh-night); background: #efe9df; }
.tools-lab .tools-lab-action {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  justify-self: start;
  min-height: 46px;
  gap: 16px;
  padding: 11px 15px;
  font-size: .86rem;
}
.tools-lab-result {
  grid-area: 1 / 2 / 3 / 3;
  background: var(--demo-background);
  background-image: repeating-linear-gradient(90deg, transparent 0 39px, #ffffff0d 39px 40px);
  border-radius: 0 9px 9px 0;
  color: #fff;
}
.tools-lab-result-label { color: var(--demo-accent); font-size: .86rem; }
.tools-lab-result .tools-lab-total {
  margin: 5px 0 18px;
  color: #fff;
  font: 500 clamp(36px, 6vw, 69px)/1.03 var(--cf-sans);
  font-variant-numeric: tabular-nums;
  letter-spacing: -.065em;
  overflow-wrap: anywhere;
}
.tools-lab-chart { display: grid; gap: 13px; }
.tools-lab-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 5px 10px;
  font-size: .8rem;
}
.tools-lab-row strong { font-weight: 500; font-variant-numeric: tabular-nums; }
.tools-lab-track {
  grid-column: 1 / -1;
  display: block;
  height: 7px;
  background: #ffffff29;
  border-radius: 8px;
}
.tools-lab-track > span {
  display: block;
  width: var(--bar, 0%);
  height: 100%;
  border-radius: inherit;
  background: var(--demo-accent);
  transition: width 160ms ease-out;
}
.tools-lab-note { margin: 17px 0 0; color: #ffffffd9; font-size: .8rem; line-height: 1.55; }
.tools-lab-foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 14px 20px;
  margin-top: 16px;
  color: var(--refresh-muted);
  font-size: .8rem;
}
.tools-lab-foot p { display: flex; align-items: center; gap: 7px; margin: 0; }
.tools-lab-foot a { text-decoration: underline; text-underline-offset: 3px; }

@media (max-width: 640px) {
  .tools-lab-intro, .tools-lab-panel { grid-template-columns: 1fr; }
  .tools-lab { padding-top: 24px; }
  .tools-lab-intro { margin-bottom: 16px; }
  .cf-calculators .tools-lab-intro h1 { font-size: clamp(37px, 10.5vw, 60px); }
  .tools-lab-intro br { display: none; }
  .tools-lab-tabs button { justify-content: center; gap: 5px; padding: 6px; }
  .tools-lab-index { display: none; }
  .tools-lab-icon svg { width: 16px; height: 16px; }
  .tools-lab-result { grid-area: auto; border-radius: 0; }
  .tools-lab-next { padding-top: 15px; }
  .cf-calculators .tools-lab-input h2 { margin-bottom: 15px; }
  .tools-lab .tools-lab-action { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .tools-lab-track > span { transition: none; }
}
