/* =========================================================
   PURE RATE MORTGAGE — Design System
   Brand colors carried over from the client's reference comp.
   See context.md for the full design-token rationale.
   ========================================================= */

:root{
  /* Brand palette (from reference comp — do not change without client sign-off) */
  --blue: #1D70B9;        /* primary brand blue */
  --blue-deep: #17518A;   /* darker blue, used in charts/gradients */
  --blue-dark: #124063;   /* hover/pressed state */
  --turq: #1CCCD6;        /* secondary accent (teal from the logo) */
  --turq-lite: #7BE4EA;   /* light mint, accent text on dark/blue backgrounds */
  --turq-pale: #D9F7F9;   /* pale turq tint */
  --tint: #DFF4FF;        /* pale blue tint for soft backgrounds */
  --band: #FAFAFA;        /* off-white section background */
  --white: #FFFFFF;
  --ink: #2B2F2D;         /* primary text / dark sections */
  --mute: rgba(43,47,45,.72);
  --mute-strong: rgba(43,47,45,.85);
  --rule: #DEE4E8;        /* hairline borders */
  --amber: #FCF4CB;
  --amber-t: #8A6410;
  --flag: #D65F52;        /* accent red, used sparingly */
  --book: #1A6B96;

  /* Elevation */
  --shadow-sm: 0 1px 2px rgba(20,30,40,.06), 0 1px 1px rgba(20,30,40,.04);
  --shadow-md: 0 8px 24px rgba(20,30,40,.08), 0 2px 6px rgba(20,30,40,.04);
  --shadow-lg: 0 20px 50px rgba(20,30,40,.14), 0 6px 16px rgba(20,30,40,.06);

  /* Radius */
  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-pill: 999px;

  /* Type */
  --font-head: 'Archivo Black', 'Arial Black', Arial, sans-serif;
  --font-body: 'Archivo Narrow', 'Arial Narrow', Arial, sans-serif;

  --container: 1240px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body, h1, h2, h3, h4, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }

body{
  background: var(--white);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .blk{
  font-family: var(--font-head);
  font-weight: 400;
  letter-spacing: -.02em;
  line-height: 1.05;
  text-wrap: balance;
}
h1 { font-size: clamp(34px, 4.6vw, 56px); }
h2 { font-size: clamp(26px, 3.2vw, 38px); }
h3 { font-size: clamp(19px, 2vw, 22px); }

p.lede, .lede { font-size: clamp(16px, 1.6vw, 19px); color: var(--mute-strong); max-width: 62ch; }

.eyebrow{
  font-family: var(--font-head);
  font-size: 13px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 8px;
}

.inner{ max-width: var(--container); margin: 0 auto; padding: 0 24px; }

.nb{ color: var(--blue); }

/* ---------- Buttons ---------- */
.btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--blue);
  color: var(--white);
  font-weight: 700;
  font-size: 16px;
  padding: 14px 26px;
  border-radius: var(--r-pill);
  border: 0;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
  box-shadow: var(--shadow-sm);
}
.btn:hover{ transform: translateY(-2px); box-shadow: var(--shadow-md); background: var(--blue-dark); }
.btn:active{ transform: translateY(0); }
.btn-lg{ font-size: 17px; padding: 16px 30px; }
.btn-ghost{ background: transparent; color: var(--white); box-shadow: inset 0 0 0 2px rgba(255,255,255,.5); }
.btn-ghost:hover{ background: rgba(255,255,255,.12); }
.btn-dark{ background: var(--ink); color: var(--white); }
.btn-dark:hover{ background: #15180f; }
.btn-outline{ background: transparent; color: var(--blue); box-shadow: inset 0 0 0 2px var(--blue); }
.btn-outline:hover{ background: var(--tint); }
.btn-turq{ background: var(--turq); color: var(--ink); }
.btn-turq:hover{ background: #16b4bd; }
.btn-sm{ font-size: 14px; padding: 10px 18px; }
.btn-block{ width: 100%; }

.micro{ font-size: 13px; color: var(--mute); margin-top: 12px; line-height: 1.5; }
.cta-block{ margin-top: 28px; }

/* ---------- Topbar + Header/Nav ---------- */
.topbar{
  background: var(--ink);
  color: rgba(255,255,255,.82);
  font-size: 13px;
}
.topbar .inner{
  display: flex; gap: 28px; padding: 8px 24px;
  justify-content: flex-end;
}
.topbar a{ display: inline-flex; align-items: center; gap: 6px; }
.topbar a:hover{ color: var(--turq); }
.topbar svg{ width: 14px; height: 14px; }

header.site-header{
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.92);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--rule);
}
header.site-header .inner{
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 24px;
}
.brand img{ height: 32px; width: auto; }

.nav-links{ display: flex; align-items: center; gap: 26px; }
.nav-links a{
  font-weight: 600; font-size: 15px; color: var(--ink);
  padding: 6px 2px; position: relative;
}
.nav-links a::after{
  content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 2px;
  background: var(--blue); transform: scaleX(0); transform-origin: left;
  transition: transform .18s ease;
}
.nav-links a:hover::after, .nav-links a.on::after{ transform: scaleX(1); }
.nav-links a.on{ color: var(--blue); }

.hdr-r{ display: flex; align-items: center; gap: 18px; }
.nav-toggle{
  display: none;
  background: none; border: 0; padding: 8px;
  flex-direction: column; gap: 5px;
}
.nav-toggle span{ width: 24px; height: 2px; background: var(--ink); display: block; border-radius: 2px; transition: all .2s ease; }

.mobile-panel{
  position: fixed; inset: 0; z-index: 200;
  background: var(--white);
  transform: translateX(100%);
  transition: transform .28s ease;
  display: flex; flex-direction: column;
  overflow-y: auto;
}
.mobile-panel.open{ transform: translateX(0); }
.mobile-panel .mp-head{ display:flex; align-items:center; justify-content:space-between; padding: 18px 24px; border-bottom: 1px solid var(--rule); }
.mobile-panel .mp-close{ background:none; border:0; font-size: 28px; line-height:1; padding: 4px 8px; }
.mobile-panel nav{ padding: 12px 24px; display: flex; flex-direction: column; }
.mobile-panel nav a{ padding: 16px 0; font-size: 20px; font-weight: 700; border-bottom: 1px solid var(--rule); }
.mobile-panel .mp-cta{ padding: 24px; margin-top: auto; }
.mobile-panel .mp-contact{ padding: 0 24px 24px; display: flex; flex-direction: column; gap: 10px; color: var(--mute-strong); }

@media (max-width: 900px){
  .nav-links, .navcta{ display: none; }
  .nav-toggle{ display: flex; }
  .topbar .inner{ justify-content: center; gap: 20px; font-size: 12px; }
}

/* ---------- Hero ---------- */
.hero{ background: var(--blue); padding: 0; overflow: hidden; }

.hero-split .hero-grid{ display: block; }
.hero-split .hero-l, .hero-split .hero-r{ padding: 0; }
.hero-split .hero-l{ background: var(--blue); position: relative; }
.hero-split .hero-l::before{
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(45deg, rgba(255,255,255,.06) 0 10px, rgba(0,0,0,0) 10px 30px);
}
.hero-split .hero-l > *{ position: relative; z-index: 1; }
.hero-split .hero-r{ background: var(--tint); }
.hero-split .hero-pad{ max-width: 640px; padding: 48px 24px 52px; }

.hero .eyebrow{ color: var(--tint); }
.hero h1.tagline{
  color: var(--white);
  font-size: clamp(42px, 7.4vw, 92px);
  line-height: .95;
  letter-spacing: -.03em;
  max-width: none;
  margin: 0 0 6px;
}
.hero h1.tagline .tl2{ color: var(--turq-lite); }

.hero-r .intent{ border-top: 2px solid var(--blue); border-radius: 0; background: transparent; padding: 22px 0 0; margin-top: 0; }
.hero-r .intent-h{ color: var(--blue); }
.hero-r .opt{ background: transparent; border: 0; border-bottom: 1px solid rgba(43,47,45,.18); border-radius: 0; padding: 16px 0; color: var(--ink); }
.hero-r .opt:hover{ background: rgba(29,112,185,.06); transform: translateX(3px); }
.hero-r .opt i{ background: var(--blue); color: #fff; border-radius: var(--r-pill); width: 26px; height: 26px; display: inline-flex; align-items: center; justify-content: center; font-style: normal; }

.intent{ background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.14); border-radius: var(--r-lg); padding: 26px; }
.intent-h{ font-weight: 700; margin-bottom: 14px; display:flex; align-items:center; gap:10px; }
.opt{
  display: flex; align-items: center; justify-content: space-between;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.14);
  border-radius: var(--r-md); padding: 16px 18px; margin-bottom: 10px;
  font-weight: 600; transition: background .18s ease, transform .18s ease;
}
.opt:hover{ background: rgba(255,255,255,.12); transform: translateX(3px); }
.opt i{ color: var(--turq); font-style: normal; }

@media (min-width: 900px){
  .hero-split .hero-grid{ display: grid; grid-template-columns: 1.15fr .85fr; align-items: stretch; }
  .hero-split .hero-pad{ padding: 68px 40px 72px; max-width: none; }
  .hero-split .hero-l .hero-pad{ margin-left: auto; max-width: 640px; }
  .hero-split .hero-r .hero-pad{ max-width: 460px; display: flex; flex-direction: column; justify-content: center; height: 100%; }
}

/* generic page hero (inner pages) */
.page-hero{ background: var(--blue); color: var(--white); padding: 64px 0; position: relative; overflow: hidden; }
.page-hero h1{ color: var(--white); }
.page-hero .eyebrow{ color: var(--tint); }
.page-hero p.lede{ color: var(--tint); }
.page-hero::after{
  content: ""; position: absolute; inset: 0;
  background: repeating-linear-gradient(45deg, rgba(255,255,255,.06) 0 10px, rgba(0,0,0,0) 10px 30px);
  pointer-events: none;
}
.page-hero .inner{ position: relative; z-index: 1; }

/* ---------- Section rhythm ---------- */
section{ padding: 72px 0; }
.band{ background: var(--band); }
.tint{ background: var(--tint); }
.dark{ background: var(--ink); color: var(--white); }
.dark h2, .dark h3{ color: var(--white); }
.dark .eyebrow{ color: var(--turq); }

/* ---------- Cards ---------- */
.card{
  background: var(--white); border: 1px solid var(--rule); border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm); transition: box-shadow .2s ease, transform .2s ease;
}
.card:hover{ box-shadow: var(--shadow-md); }

/* ---------- Rate / today's rate block ---------- */
.ratebox-wrap{
  background: var(--white); border: 1px solid var(--rule); border-radius: var(--r-lg);
  box-shadow: var(--shadow-md); padding: 28px; max-width: 760px;
}
.seg{ display: inline-flex; background: var(--band); border-radius: var(--r-pill); padding: 4px; gap: 4px; }
.seg button{ background: none; border: 0; padding: 10px 20px; border-radius: var(--r-pill); font-weight: 700; color: var(--mute-strong); }
.seg button.on{ background: var(--ink); color: var(--white); }
.pill-row{ display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.chip{
  background: var(--band); border: 1px solid var(--rule); border-radius: var(--r-pill);
  padding: 9px 16px; font-weight: 700; font-size: 14px; color: var(--mute-strong);
  transition: all .15s ease;
}
.chip.on, .chip:hover{ background: var(--blue); color: var(--white); border-color: var(--blue); }

.rate-row{
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 16px 0; border-top: 1px solid var(--rule); flex-wrap: wrap;
}
.rate-nums{ display: flex; gap: 28px; flex-wrap: wrap; }
.rate-nums div{ display: flex; flex-direction: column; }
.rate-nums b{ font-size: 18px; }
.rate-nums .k{ font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--mute); }

.flag-badge{ display: inline-flex; vertical-align: -2px; margin-right: 6px; }
.flag-badge svg{ width: 20px; height: auto; border-radius: 2px; box-shadow: 0 0 0 1px var(--rule); }

/* ---------- Stats ---------- */
.stats-grid{ display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; text-align: center; }
.stats-grid .n{ font-family: var(--font-head); font-size: clamp(28px, 3vw, 40px); color: var(--blue); }
.stats-grid .l{ color: var(--mute); font-size: 14px; margin-top: 4px; }
@media (max-width: 700px){ .stats-grid{ grid-template-columns: repeat(2,1fr); } }

/* ---------- Reviews ---------- */
.rev-grid{ display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.rev-card{ padding: 22px; }
.rev-head{ display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.av{ width: 38px; height: 38px; border-radius: 50%; color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; }
.stars{ color: #F5A623; letter-spacing: 1px; }
.rev-card p{ font-size: 14.5px; color: var(--mute-strong); }
.rev-head{ justify-content: space-between; }
.g-badge{ width: 18px; height: 18px; flex: 0 0 auto; }
@media (max-width: 1000px){ .rev-grid{ grid-template-columns: repeat(2,1fr); } }
@media (max-width: 600px){ .rev-grid{ grid-template-columns: 1fr; } }

/* ---------- Team ---------- */
.team-grid{ display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }
.team-card{ text-align: center; padding: 20px 12px; }
.team-avatar{
  width: 84px; height: 84px; border-radius: 50%; margin: 0 auto 14px;
  background: linear-gradient(135deg, var(--blue), var(--turq));
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-family: var(--font-head); font-size: 22px;
}
.team-card.open .team-avatar{ background: var(--band); color: var(--rule); border: 2px dashed var(--rule); }
.team-card .nm{ font-weight: 700; }
.team-card .rl{ font-size: 13px; color: var(--mute); margin-top: 2px; }
.team-card .nmls{ font-size: 11px; color: var(--mute); margin-top: 6px; }
@media (max-width: 900px){ .team-grid{ grid-template-columns: repeat(3,1fr); } }
@media (max-width: 560px){ .team-grid{ grid-template-columns: repeat(2,1fr); } }

/* ---------- Guarantee band ---------- */
.guarantee{ background: linear-gradient(135deg, var(--blue-deep), var(--blue)); color: #fff; }
.guarantee .inner{ display: grid; grid-template-columns: .8fr 1.6fr; gap: 40px; align-items: center; }
.guarantee .num{ font-family: var(--font-head); font-size: clamp(48px,6vw,84px); line-height: 1; }
.guarantee p{ color: rgba(255,255,255,.9); }
@media (max-width: 800px){ .guarantee .inner{ grid-template-columns: 1fr; text-align: center; } }

/* ---------- Promise list ---------- */
.promise-list{ display: grid; gap: 16px; max-width: 640px; margin: 24px auto 0; }
.promise-list li{ display: flex; align-items: center; gap: 14px; font-size: 18px; font-weight: 600; }
.promise-list .pi{ width: 34px; height: 34px; border-radius: 50%; background: var(--tint); color: var(--blue); display: flex; align-items: center; justify-content: center; flex: none; }
.promise{ text-align: center; }

/* ---------- Day timeline ---------- */
.days-grid{ display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-top: 28px; }
.day-card{ background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.14); border-radius: var(--r-lg); padding: 20px; }
.day-tab{ display: inline-flex; flex-direction: column; align-items: center; justify-content: center; background: var(--turq); color: var(--ink); width: 54px; height: 54px; border-radius: 50%; font-family: var(--font-head); margin-bottom: 14px; }
.day-tab i{ font-style: normal; font-size: 9px; text-transform: uppercase; }
.day-card h3{ color: #fff; font-size: 17px; margin-bottom: 6px; }
.day-card p{ color: rgba(255,255,255,.72); font-size: 14px; }
@media (max-width: 900px){ .days-grid{ grid-template-columns: repeat(2,1fr); } }
@media (max-width: 560px){ .days-grid{ grid-template-columns: 1fr; } }

/* ---------- Comparison cards (wholesale vs retail) ---------- */
.cmp-grid{ display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 24px; }
.cmp-card{ border-radius: var(--r-lg); padding: 28px; }
.cmp-card.us{ background: var(--white); color: var(--ink); border: 2px solid var(--turq); }
.cmp-card.them{ background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.14); color: rgba(255,255,255,.85); }
.cmp-row{ padding: 14px 0; border-top: 1px solid var(--rule); display: flex; flex-direction: column; gap: 4px; }
.cmp-card.them .cmp-row{ border-color: rgba(255,255,255,.14); }
.cmp-row .ck{ font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--mute); }
.cmp-card.them .cmp-row .ck{ color: rgba(255,255,255,.55); }
@media (max-width: 800px){ .cmp-grid{ grid-template-columns: 1fr; } }

/* ---------- Calculator teaser ---------- */
.calc-grid{ display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 28px; }
.calc-tile{ padding: 28px; display: flex; flex-direction: column; gap: 10px; }
.calc-tile .ci{ width: 44px; height: 44px; color: var(--blue); }
.calc-tile.all{ background: var(--blue); color: #fff; align-items: flex-start; justify-content: center; }
@media (max-width: 800px){ .calc-grid{ grid-template-columns: 1fr; } }

/* ---------- States map / list ---------- */
.states-grid{ display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin-top: 28px; }
.state-chip{ background: var(--tint); border-radius: var(--r-md); padding: 14px; text-align: center; font-weight: 700; color: var(--blue-deep); }
@media (max-width: 800px){ .states-grid{ grid-template-columns: repeat(3,1fr); } }
@media (max-width: 500px){ .states-grid{ grid-template-columns: repeat(2,1fr); } }

.strates{ background: var(--band); padding: 48px 0; }
.strates h2{ font-size: clamp(20px, 2.2vw, 26px); margin-bottom: 20px; }
.srlist{ columns: 1; column-gap: 34px; }
.srlist li{ break-inside: avoid; padding: 7px 0; border-bottom: 1px solid var(--rule); font-size: 14.5px; }
.srlist a{ color: var(--mute-strong); }
.srlist a:hover{ color: var(--blue); }
.srlist a b, .srlist span b{ font-weight: 700; }
.srlist span.soon{ color: var(--mute); opacity: .55; }
@media (min-width: 600px){ .srlist{ columns: 2; } }
@media (min-width: 900px){ .srlist{ columns: 3; } }

/* ---------- FAQ (home teaser + full page) ---------- */
.faq-cols{ display: grid; grid-template-columns: 1fr 1fr; gap: 32px; margin-top: 10px; }
.qa{ padding: 20px 0; border-top: 1px solid rgba(255,255,255,.14); }
.qa h3{ font-size: 17px; margin-bottom: 8px; color: #fff; }
.qa p{ color: rgba(255,255,255,.72); font-size: 15px; }
@media (max-width: 800px){ .faq-cols{ grid-template-columns: 1fr; } }

.acc{ background: var(--white); border-radius: 14px; box-shadow: var(--shadow-sm); overflow: hidden; }
.acc details{ border-top: 1px solid var(--rule); padding: 0; }
.acc details:first-child{ border-top: 0; }
.acc summary{
  cursor: pointer; font-weight: 700; display: flex; justify-content: space-between; align-items: center;
  list-style: none; gap: 16px; padding: 18px 22px; transition: background .15s ease;
}
.acc summary:hover{ background: #FAFAFA; }
.acc summary::-webkit-details-marker{ display: none; }
.acc summary::after{
  content: ""; flex: none; width: 10px; height: 10px;
  border-right: 2px solid var(--blue); border-bottom: 2px solid var(--blue);
  transform: rotate(45deg); transition: transform .2s ease; margin-top: -4px;
}
.acc details[open] summary::after{ transform: rotate(-135deg); margin-top: 4px; }
.acc .abody{ margin: 0 22px 20px; color: var(--mute-strong); font-size: 15.5px; }
.acc details[open]{ background: var(--tint); }

.faq-search{ display:flex; align-items:center; gap: 10px; background: var(--white); border: 1px solid var(--rule); border-radius: var(--r-pill); padding: 14px 20px; box-shadow: var(--shadow-sm); }
.faq-search input{ border: 0; outline: none; flex: 1; font-size: 16px; background: transparent; }
.faq-chips{ display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.faq-group h2{ font-size: 20px; margin: 36px 0 6px; color: var(--blue); }
.faq-empty{ text-align: center; padding: 60px 20px; color: var(--mute); }

/* ---------- Community / Reddit ---------- */
.community{ background: var(--ink); color: #fff; }
.community .inner{ display: grid; grid-template-columns: 1fr .8fr; gap: 40px; align-items: center; }
.reddit-card{ background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.14); border-radius: var(--r-lg); padding: 32px; text-align: center; }
@media (max-width: 800px){ .community .inner{ grid-template-columns: 1fr; } }

/* ---------- Rate watch phone mock ---------- */
.watch-grid{ display: grid; grid-template-columns: 1fr .9fr; gap: 48px; align-items: center; }
.phone-mock{
  background: var(--white); border-radius: 28px; box-shadow: var(--shadow-lg);
  padding: 26px; max-width: 340px; margin: 0 auto; border: 1px solid var(--rule);
}
.phone-mock .ph-ico{ width: 34px; height: 34px; color: var(--blue); margin-bottom: 10px; }
.phone-mock h4{ font-size: 20px; margin-bottom: 4px; }
.phone-mock .big{ font-family: var(--font-head); font-size: 28px; color: var(--blue); margin: 14px 0; }
.phone-mock .grid4{ display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 16px 0; }
.phone-mock .grid4 b{ display: block; }
.phone-mock .grid4 span{ font-size: 12px; color: var(--mute); }
.phone-mock hr{ border: 0; border-top: 1px solid var(--rule); margin: 14px 0; }
@media (max-width: 800px){ .watch-grid{ grid-template-columns: 1fr; } }

/* ---------- Footer ---------- */
footer.site-footer{ background: var(--ink); color: rgba(255,255,255,.78); padding-top: 64px; }
.footer-grid{ display: grid; grid-template-columns: 1.4fr 1fr 1.2fr; gap: 40px; padding-bottom: 48px; }
.footer-grid h3{ color: #fff; font-size: 15px; margin-bottom: 16px; }
.footer-grid ul li{ margin-bottom: 10px; }
.footer-grid a:hover{ color: var(--turq); }
.f-logo{ height: 30px; margin-bottom: 16px; filter: brightness(0) invert(1); }
.f-tag{ margin-top: 14px; font-weight: 700; color: #fff; }
.f-social{ display: flex; gap: 12px; margin-top: 18px; }
.f-social a{ width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,.08); display: flex; align-items: center; justify-content: center; }
.f-social a:hover{ background: var(--blue); }
.f-social svg{ width: 16px; height: 16px; }
.f-contact p{ display: flex; gap: 10px; margin-bottom: 12px; align-items: flex-start; font-size: 14.5px; }
.f-contact svg{ width: 16px; height: 16px; flex: none; margin-top: 3px; color: var(--turq); }
.f-legal{ border-top: 1px solid rgba(255,255,255,.12); padding: 24px 0; font-size: 12px; color: rgba(255,255,255,.55); }
.f-strip{ border-top: 1px solid rgba(255,255,255,.12); padding: 18px 0; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; font-size: 12.5px; color: rgba(255,255,255,.55); }
.f-strip a{ margin-right: 16px; }
.f-strip a:hover{ color: #fff; }
@media (max-width: 800px){ .footer-grid{ grid-template-columns: 1fr; } }

/* ---------- Forms (Rate Watch, Shop Rates) ---------- */
.field{ margin-bottom: 16px; }
.field label{ display: block; font-size: 13px; font-weight: 700; margin-bottom: 6px; color: var(--mute-strong); }
.field input, .field select{
  width: 100%; padding: 13px 14px; border: 1px solid var(--rule); border-radius: var(--r-sm);
  background: var(--white); font-size: 15px; transition: border-color .15s ease, box-shadow .15s ease;
}
.field input:focus, .field select:focus{ outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px var(--tint); }
.field-row{ display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 560px){ .field-row{ grid-template-columns: 1fr; } }
.form-note{ font-size: 12.5px; color: var(--mute); }

/* ---------- Slider / range (calculators) ---------- */
input[type=range]{ width: 100%; -webkit-appearance: none; height: 6px; background: var(--rule); border-radius: 4px; }
input[type=range]::-webkit-slider-thumb{
  -webkit-appearance: none; width: 20px; height: 20px; border-radius: 50%;
  background: var(--blue); cursor: pointer; border: 3px solid #fff; box-shadow: var(--shadow-sm);
}
input[type=range]::-moz-range-thumb{ width: 20px; height: 20px; border-radius: 50%; background: var(--blue); border: 3px solid #fff; cursor: pointer; }
.slider-row{ display: flex; justify-content: space-between; margin-bottom: 8px; font-weight: 700; font-size: 14px; }
.slider-row .val{ color: var(--blue); }

/* ---------- Generic two-column content + rail ---------- */
.content-grid{ display: grid; grid-template-columns: 1fr .38fr; gap: 48px; align-items: start; }
.rail{ position: sticky; top: 100px; display: flex; flex-direction: column; gap: 20px; }
.rail .card{ padding: 24px; }
@media (max-width: 900px){ .content-grid{ grid-template-columns: 1fr; } .rail{ position: static; } }

table.cmp-table{ width: 100%; border-collapse: collapse; margin: 20px 0; }
table.cmp-table th, table.cmp-table td{ padding: 12px 14px; border: 1px solid var(--rule); text-align: left; font-size: 14.5px; }
table.cmp-table thead th{ background: var(--band); }
table.cmp-table{ overflow-x: auto; display: block; }

.fact-strip{ display: grid; grid-template-columns: repeat(4,1fr); gap: 18px; margin-top: 32px; }
.fact{ background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.16); border-radius: var(--r-md); padding: 18px; }
.fact .fn{ font-family: var(--font-head); font-size: 22px; display: block; color: var(--turq); }
.fact .fl{ font-weight: 700; display: block; margin-top: 4px; }
.fact .fs{ font-size: 12.5px; color: rgba(255,255,255,.65); }
@media (max-width: 800px){ .fact-strip{ grid-template-columns: repeat(2,1fr); } }

.tabs{ display: flex; gap: 8px; flex-wrap: wrap; border-bottom: 1px solid var(--rule); margin-bottom: 36px; }
.tab-btn{ background: none; border: 0; padding: 14px 6px; font-weight: 700; color: var(--mute); border-bottom: 3px solid transparent; margin-bottom: -1px; }
.tab-btn.on{ color: var(--blue); border-color: var(--blue); }
.tab-panel{ display: none; }
.tab-panel.on{ display: block; }

/* ---------- Blog ---------- */
.blog-filters{ display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 36px; }
.post-grid{ display: grid; grid-template-columns: repeat(3,1fr); gap: 24px; }
.post-card{ overflow: hidden; display: flex; flex-direction: column; }
.post-card.feature{ grid-column: span 3; display: grid; grid-template-columns: 1.1fr 1fr; }
.post-thumb{ background: linear-gradient(135deg, var(--tint), var(--band)); aspect-ratio: 16/10; display: flex; align-items: center; justify-content: center; color: var(--blue); }
.post-card.feature .post-thumb{ aspect-ratio: auto; height: 100%; }
.post-body{ padding: 22px; }
.post-chip{ display: inline-block; background: var(--turq); color: var(--ink); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; padding: 5px 12px; border-radius: var(--r-pill); margin-bottom: 12px; }
.post-body h2{ font-size: 20px; margin-bottom: 10px; }
.post-meta{ font-size: 13px; color: var(--mute); }
@media (max-width: 1000px){ .post-grid{ grid-template-columns: repeat(2,1fr); } .post-card.feature{ grid-column: span 2; grid-template-columns: 1fr; } }
@media (max-width: 640px){ .post-grid{ grid-template-columns: 1fr; } .post-card.feature{ grid-column: span 1; } }

.post-single .post-hero{ aspect-ratio: 21/9; background: linear-gradient(135deg, var(--tint), var(--band)); border-radius: var(--r-lg); margin: 32px 0; display:flex; align-items:center; justify-content:center; color: var(--blue); }
.post-single .prose{ max-width: 72ch; margin: 0 auto; font-size: 17.5px; }
.post-single .prose h2{ margin: 36px 0 12px; font-size: 26px; }
.post-single .prose p{ margin-bottom: 18px; color: var(--mute-strong); }
.post-single .prose ul{ list-style: disc; padding-left: 22px; margin-bottom: 18px; }
.post-single .prose li{ margin-bottom: 8px; color: var(--mute-strong); }

/* ---------- Shop rates page ---------- */
.rate-tool{ background: var(--white); border: 1px solid var(--rule); border-radius: var(--r-lg); box-shadow: var(--shadow-lg); padding: 32px; margin-top: -72px; position: relative; z-index: 2; }
.rate-tool-head{ display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 14px; margin-bottom: 24px; }
.rate-grid-fields{ display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 20px 0; }
@media (max-width: 1000px){ .rate-grid-fields{ grid-template-columns: repeat(2,1fr); } }
@media (max-width: 560px){ .rate-grid-fields{ grid-template-columns: 1fr; } }
.rate-result{ display: flex; justify-content: space-between; align-items: center; padding: 18px 0; border-top: 1px solid var(--rule); flex-wrap: wrap; gap: 14px; }
.rate-badge{ background: var(--tint); color: var(--blue-deep); font-weight: 700; font-size: 12px; padding: 6px 12px; border-radius: var(--r-sm); }

/* ---------- Mortgage blueprint ---------- */
.ladder-rungs{ display: flex; flex-direction: column; gap: 0; border-left: 3px solid var(--rule); margin-left: 18px; }
.rung{ position: relative; padding: 0 0 36px 32px; }
.rung::before{ content: ""; position: absolute; left: -9px; top: 2px; width: 16px; height: 16px; border-radius: 50%; background: var(--blue); border: 3px solid #fff; box-shadow: 0 0 0 2px var(--blue); }
.rung .rv{ font-family: var(--font-head); color: var(--blue); font-size: 22px; }
.rung strong{ display: block; margin: 4px 0; }
.rung span.rp{ color: var(--mute); font-size: 14.5px; }

.path-grid{ display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 36px; }
.path-card{ background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.14); border-radius: var(--r-lg); padding: 28px; text-align: center; }
.path-card h3{ color: #fff; font-size: 20px; margin: 14px 0 8px; }
.path-card p{ color: rgba(255,255,255,.72); font-size: 14.5px; margin-bottom: 18px; }
@media (max-width: 760px){ .path-grid{ grid-template-columns: 1fr; } }

.field input.err, .field select.err{ border-color: var(--flag); box-shadow: 0 0 0 3px rgba(214,95,82,.14); }
.form-error{ display: none; color: var(--flag); font-size: 13.5px; font-weight: 700; margin-top: 10px; }
.form-success{ display: none; text-align: center; padding: 20px; }
.form-success h3{ font-size: 20px; margin-bottom: 8px; }

.feat-grid-2{ display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 28px; }
.feat-grid-3{ display: grid; grid-template-columns: repeat(3,1fr); gap: 24px; margin-top: 28px; }
.feat-card{ background: var(--band); border-radius: var(--r-lg); padding: 24px; }
.feat-card h3{ font-size: 17px; margin: 10px 0 8px; }
.feat-card p{ font-size: 14.5px; color: var(--mute-strong); }
@media (max-width: 800px){ .feat-grid-2, .feat-grid-3{ grid-template-columns: 1fr; } }

.steps-3{ display: grid; grid-template-columns: repeat(3,1fr); gap: 24px; margin-top: 28px; }
.step-card .sn{ font-family: var(--font-head); font-size: 30px; color: var(--tint); display: block; margin-bottom: 8px; -webkit-text-stroke: 1px var(--blue); }
@media (max-width: 800px){ .steps-3{ grid-template-columns: 1fr; } }

/* ---------- Close CTA band ---------- */
.close-band{ background: var(--blue); color: #fff; text-align: center; position: relative; overflow: hidden; }
.close-band::before{
  content: ""; position: absolute; inset: 0;
  background: repeating-linear-gradient(45deg, rgba(255,255,255,.06) 0 10px, rgba(0,0,0,0) 10px 30px);
}
.close-band .inner{ position: relative; z-index: 1; }
.close-band h2{ color: #fff; }

/* ---------- Utility ---------- */
.text-center{ text-align: center; }
.mt-0{ margin-top: 0; }
.max-w{ max-width: 680px; }
.max-w-center{ max-width: 680px; margin-left: auto; margin-right: auto; }
.grid-2{ display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
@media (max-width: 800px){ .grid-2{ grid-template-columns: 1fr; } }
.grid-3{ display: grid; grid-template-columns: repeat(3,1fr); gap: 24px; }
@media (max-width: 900px){ .grid-3{ grid-template-columns: 1fr; } }
.icon-box{ width: 46px; height: 46px; border-radius: var(--r-md); background: var(--tint); color: var(--blue); display: flex; align-items: center; justify-content: center; margin-bottom: 14px; }
.icon-box svg{ width: 24px; height: 24px; }

@media (max-width: 700px){
  section{ padding: 52px 0; }
  .guarantee .inner, .community .inner{ text-align: center; }
}

/* ---------- Calculators ---------- */
.calc-card{ padding: 32px; margin-bottom: 32px; }
.calc-card h2{ margin-bottom: 24px; }
.calc-out{ background: var(--turq-pale); border-radius: var(--r-lg); padding: 24px; text-align: center; }
.calc-out .big{ font-family: var(--font-head); font-size: clamp(30px,4vw,42px); color: var(--ink); }
.calc-out .big small{ font-size: 15px; font-family: var(--font-body); color: var(--mute); }
.calc-out .outlab{ margin-top: 6px; font-size: 13.5px; color: var(--mute-strong); }
.brk-bar{ display: flex; height: 10px; border-radius: var(--r-pill); overflow: hidden; margin: 18px 0 14px; background: var(--rule); }
.brk-bar span{ flex: 0 0 0%; }
.brk-list{ display: grid; gap: 10px; }
.brk-list li{ display: flex; align-items: center; gap: 8px; font-size: 15.5px; }
.brk-list .dot{ width: 13px; height: 13px; border-radius: 50%; flex: none; box-shadow: inset 0 0 0 2px rgba(0,0,0,.08); }
.brk-list .k{ flex: 1; color: var(--mute-strong); }
.brk-list .v{ font-weight: 700; }
.adv-toggle{ background: var(--band); border: 1px solid var(--rule); border-radius: var(--r-pill); padding: 10px 20px; font-weight: 700; font-size: 14px; }
.adv-panel{ display: none; margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--rule); }
.adv-panel.open{ display: block; }
.adv-panel .pair{ display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 14px; }
@media (max-width: 560px){ .adv-panel .pair{ grid-template-columns: 1fr; } }
.adv-note{ font-size: 12.5px; color: var(--mute); margin-top: 6px; }
.calc-disc{ font-size: 12px; color: var(--mute); margin-top: 20px; }

/* ---------- Shop Rates tool (extends .rate-tool / .rate-grid-fields / .rate-result / .rate-badge above) ---------- */
.rate-tool-head .stars{ color: var(--turq); letter-spacing: 2px; }
.check-row{ display: flex; flex-wrap: wrap; gap: 20px; margin: 16px 0; }
.check-row label{ display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; color: var(--mute-strong); cursor: pointer; }
.check-row input{ width: 16px; height: 16px; accent-color: var(--blue); }
.pill{ display: inline-block; font-size: 11px; font-weight: 700; border-radius: var(--r-pill); padding: 2px 9px; margin-left: 8px; vertical-align: middle; }
.pill-pt{ background: var(--tint); color: var(--blue-deep); }
.pill-cr{ background: #E6F9E9; color: #1C7A33; }
.rate-asof{ font-size: 12.5px; color: var(--mute); margin-top: 18px; }
#sr-terms .chip.on, #sr-terms .chip:hover{ background: var(--tint); color: var(--book); border-color: var(--tint); }
.alertstrip{ display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; background: var(--turq-pale); border: 1px solid var(--turq); border-radius: 999px; padding: 20px 28px; margin-top: 24px; }
.alertstrip h3{ font-size: 16px; }
.alertstrip p{ font-size: 13.5px; color: var(--mute-strong); margin-top: 2px; }

/* Reveal-on-scroll (progressive enhancement, no-JS safe) */
.reveal{ opacity: 0; transform: translateY(16px); transition: opacity .5s ease, transform .5s ease; }
.reveal.in{ opacity: 1; transform: none; }
