/* ==========================================================================
   mcnz — shared site styles
   Base reset, typography, colour tokens, layout primitives and reusable
   components used across all pages.
   ========================================================================== */

@view-transition {
  navigation: auto;
}

/* Load-more grids name each card inline (view-transition-name: vt-card-N) so a
   card keeps its identity across the ?page=N navigation. A matched group
   cross-fades by default, which Safari renders as a white flash mid-fade; we
   tag every persistent group (cards + the fixed header) with a shared class and
   suppress its animation so they simply hold their place while the root group
   cross-fades the surrounding chrome. The header carries its own name here so
   it too is lifted out of the flashing root. */
.cat-grid .article-card,
.search-grid .article-card {
  view-transition-class: vt-hold;
}

.site-header {
  view-transition-name: site-header;
}

::view-transition-group(.vt-hold) {
  animation-duration: 0.001s;
}

/* Cards keep both snapshots held in place: the old one still carries the
   already-loaded image, which covers the gap while Safari decodes the new
   card's image (dropping it flashes the image). The cost is a faint overlap of
   the two cards' drop shadows, which is subtle enough to live with. New-only
   cards have no old snapshot, so they animate in as before. */
::view-transition-old(.vt-hold),
::view-transition-new(.vt-hold) {
  animation: none;
  mix-blend-mode: normal;
}

/* The header has no image to flash, so show only its new snapshot — holding
   both would double its prominent full-width drop shadow. */
::view-transition-group(site-header) {
  animation-duration: 0.001s;
}

::view-transition-old(site-header) {
  animation: none;
  opacity: 0;
}

::view-transition-new(site-header) {
  animation: none;
  mix-blend-mode: normal;
}

/* --- Colour tokens --- */

:root {
  --color-primary: #002b39;
  --color-accent: #AA4E87;
  --color-accent-hover: #CE3D96;
  --color-text: #5d5b5b;
  --color-text-muted: #777;
  --color-text-faint: #838383;
  --color-heading: #002b39;
  --color-bg-light: #F0F6FC;
  --color-bg-white: #fff;
  --color-bg-shaded: #f9f9f9;
  --color-teal: #2f99a9;
  --color-teal-dark: #227a8d;
  --color-border: #e0e4e8;
  --color-border-light: #e3e3e3;
  --color-nav-text: #54595f;
  --color-lc-nav-bg: #e1eefb;
  --shadow-card: 0 0 10px rgba(0, 0, 0, 0.15);
  --content-width: 1180px;
  --max-width: 1366px;
  --section-pad-block: clamp(40px, 7.3vw, 100px);
  --section-pad-inline: clamp(20px, 3.66vw, 50px);
  --section-text-inset: 180px;
  --header-height: 90px;
}

/* --- Base --- */

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  /* Reserve the scrollbar gutter so short pages (e.g. a blank search) don't
     shift horizontally relative to tall pages when the scrollbar appears. */
  scrollbar-gutter: stable;
}

body {
  font-family: "proxima-nova", sans-serif;
  font-size: 18px;
  line-height: 1.6;
  color: var(--color-text);
  margin: 0;
  padding-block-start: var(--header-height);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-family: "proxima-nova", sans-serif;
  font-weight: 700;
  line-height: 1;
  color: var(--color-heading);
  margin-block: 0 0.5em;
}

h1 { font-size: 46px; }
h2 { font-size: 40px; }
h3 { font-size: 30px; }
h4 { font-size: 22px; }
h5 { font-size: 20px; }
h6 { font-size: 14px; text-transform: uppercase; letter-spacing: 0.5px; }

a {
  color: var(--color-accent);
  text-decoration: none;
}

a:hover {
  color: var(--color-accent-hover);
}

blockquote {
  margin: 1em;
  font-style:  italic;
}

/* --- Section rhythm --- */

section {
  padding-inline: var(--section-pad-inline);
}

/* --- Center (constrained width container) --- */

.center {
  max-width: var(--center-width, var(--max-width));
  margin-inline: auto;
}

/* --- Stack (vertical rhythm) --- */

.stack > * + * {
  margin-block-start: var(--stack-space, 1.5rem);
}

.stack--sm > * + * { --stack-space: 0.75rem; }
.stack--lg > * + * { --stack-space: 3rem; }

/* --- Sidebar layout --- */

.sidebar-layout {
  display: grid;
  grid-template-columns: var(--sidebar-width, 300px) 1fr;
  gap: var(--sidebar-gap, 2rem);
  align-items: start;
}

.sidebar-layout--end {
  grid-template-columns: 1fr var(--sidebar-width, 300px);
}

/* --- Split layout (50/50 default) --- */

.split {
  display: grid;
  grid-template-columns: var(--split-columns, 1fr 1fr);
  gap: var(--split-gap, 3rem);
  align-items: center;
}

/* --- Card grid --- */

.card-grid {
  display: grid;
  grid-template-columns: repeat(var(--card-cols, 5), 1fr);
  gap: var(--card-gap, 1.5rem);
  margin-block-start: 2rem;
}

.card-grid.cols-3 {
  grid-template-columns: repeat(3, 1fr);
}

/* --- Card base --- */

.card {
  background: var(--color-bg-white);
  border-radius: var(--card-radius, 8px);
  overflow: hidden;
  box-shadow: 0 0 30px 0 rgba(0, 0, 0, 0.06);
}

.card img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

.card-body {
  padding: var(--card-padding, 20px);
}

.card-body h3,
.card-body h4,
.card-body h5 {
  margin-block: 0 5px;
}

.card-body h3 a,
.card-body h4 a,
.card-body h5 a {
  color: var(--color-heading);
  text-decoration: none;
  transition: color 0.3s;
}

.card-body h3 a:hover,
.card-body h4 a:hover,
.card-body h5 a:hover {
  color: var(--color-accent-hover);
}

.card-body p {
  font-size: 16px;
  color: var(--color-text);
  margin-block: 0;
}

/* --- Content card --- */

.content-card {
  background: var(--color-bg-white);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 0 30px 0 rgba(0, 0, 0, 0.06);
}

.content-card img {
  width: 100%;
  height: auto;
  display: block;
}

.content-card h3 {
  font-size: 22px;
  margin: 20px 0 5px;
  padding: 0 20px;
}

.content-card h3 a {
  color: var(--color-heading);
  text-decoration: none;
  transition: color 0.3s;
}

.content-card h3 a:hover {
  color: var(--color-accent-hover);
}

.content-card p {
  font-size: 16px;
  color: var(--color-text);
  padding: 0 20px 20px;
  margin-block: 0;
}

/* --- Calculator card (shared between homepage and calculator pages) --- */

.calculator-card {
  text-align: start;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.2s;
}

.calculator-card:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}

.calculator-card h3 {
  font-size: 22px;
  margin: 20px 0 5px 20px;
  padding: 0;
}

.calculator-card h3 a {
  color: var(--color-heading);
}

.calculator-card h3 a:hover {
  color: var(--color-accent-hover);
}

.calculator-card p {
  font-size: 16px;
  color: var(--color-text);
  padding: 0;
  margin: 0 20px 0;
}

.calculator-card .btn {
  align-self: flex-start;
  margin: auto 0 0 0;
  background: transparent;
  color: var(--color-accent);
  border: none;
  font-size: 18px;
  font-weight: 700;
  text-transform: capitalize;
  padding: 8px 22px;
  line-height: normal;
}

.calculator-card .btn:hover {
  color: var(--color-accent-hover);
  background: transparent;
}

/* --- Card list (e.g. article cards in a compact grid) --- */

.card-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.card-list .content-card {
  display: flex;
  flex-direction: column;
  border-radius: 6px;
  box-shadow: var(--shadow-card);
}

.card-list .content-card img {
  aspect-ratio: 2 / 1;
  object-fit: cover;
}

.card-list .content-card h3 {
  line-height: 1.2;
  margin-block: 20px 5px;
  padding-inline: 17px;
}

.card-list .content-card p {
  color: var(--color-text-muted);
  font-size: 16px;
  line-height: 1.4;
  margin-block: 0;
  padding-inline: 17px;
}

.card-list .calculator-card h3,
.card-list .calculator-card p {
  margin-inline: 0;
  padding-inline: 22px;
}

.card-list .content-card .read-more {
  margin-block: auto 9px;
}

.article-cards-cta .card-list {
  grid-template-columns: repeat(2, 1fr);
}

/* --- Section divider --- */

.divider {
  border: none;
  border-block-start: 2px solid var(--color-teal);
  width: var(--divider-width, 100px);
  margin-block: 1rem;
  margin-inline: auto;
}

/* --- Text utilities --- */

.text-center { text-align: center; }
.text-highlight { color: var(--color-teal); }

/* --- Sticky --- */

.sticky {
  position: sticky;
  top: calc(var(--header-height) + 20px);
}

/* --- Rates CTA section (shared between homepage and calculator pages) --- */

.rates {
  background: var(--color-bg-light);
  border-block-start: 1px solid var(--color-border-light);
  border-block-end: 1px solid var(--color-border-light);
  overflow: visible;
  z-index: 10;
  position: relative;
  margin-block: 70px;
}

.rates .split {
  min-height: 422px;
  align-items: center;
  grid-template-columns: 55% 45%;
  gap: 0;
}

.rates h2 {
  line-height: 1;
  color: var(--color-heading);
}

.rates .split > div:first-child {
  padding-inline-end: 62px;
}

.rates .split > div:last-child {
  overflow: visible;
  position: relative;
  align-self: center;
}

.rates img {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  max-width: 91%;
  height: auto;
}

/* --- Adviser CTA section (shared between homepage and calculator pages) --- */

.adviser-cta {
  background: var(--color-bg-light);
  padding-block: 70px;
}

.adviser-cta .split {
  grid-template-columns: 34% 1fr;
}

.adviser-copy {
  padding-inline: 43px 10px;
}

.adviser-cta h6 {
  text-transform: uppercase;
  color: var(--color-teal);
  font-size: 14px;
  letter-spacing: 0.5px;
  margin-block: 0 10px;
}

.adviser-copy h2 {
  margin-block: 0 20px;
}

.adviser-copy p {
  margin-block: 0;
}

.adviser-cta .btn {
  margin-block-start: 1.5rem;
  border: none;
}

/* --- Read more link --- */

.read-more {
  display: block;
  padding-inline: 17px;
  color: var(--color-accent);
  text-decoration: none;
  font-size: 18px;
  font-weight: 700;
}

.read-more:hover {
  color: var(--color-accent-hover);
}

/* --- Check list --- */

.check-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.check-list li {
  position: relative;
  padding-inline-start: 1.75rem;
  padding-block-end: 3.5px;
  font-size: 16px;
  line-height: 1.4;
  color: var(--color-text);
}

.check-list li::before {
  content: "\2714";
  position: absolute;
  inset-inline-start: 0;
  color: var(--color-teal);
  font-weight: 900;
  font-size: 17px;
}

/* --- Buttons --- */

.btn {
  display: inline-block;
  padding: 8px 22px;
  background: var(--color-accent);
  color: #fff;
  text-decoration: none;
  border-radius: 50px;
  font-size: 14px;
  font-weight: 400;
  text-transform: uppercase;
  text-align: center;
  line-height: 14px;
  border: 2px solid var(--color-accent);
  transition: background 0.2s;
}

.btn:hover {
  background: var(--color-accent-hover);
  color: #fff;
}

.btn-secondary {
  background: transparent;
  border: 2px solid var(--color-accent);
  color: var(--color-accent);
}

.btn-secondary:hover {
  background: var(--color-accent);
  color: #fff;
}

.btn-group {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
}

/* --- Site header --- */

.site-header {
  position: fixed;
  inset-block-start: 0;
  inset-inline: 0;
  z-index: 99;
  height: var(--header-height);
  background: var(--color-bg-white);
  box-shadow: 0 0 20px 0 rgba(0, 0, 0, 0.1);
  padding-inline: 50px;
}

.header-inner {
  max-width: var(--max-width);
  margin-inline: auto;
  height: 100%;
  display: flex;
  align-items: center;
}

.header-logo img {
  display: block;
  width: 236px;
  height: auto;
}

.header-nav {
  margin-inline-start: auto;
}

.header-nav > ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
}

.header-nav > ul > li {
  position: relative;
}

.header-nav > ul > li > a,
.header-nav > ul > li > span {
  display: block;
  padding: 8px 12px;
  font-size: 17px;
  font-weight: 400;
  line-height: 20px;
  color: var(--color-nav-text);
  text-decoration: none;
  cursor: pointer;
}

.header-nav > ul > li > a::after,
.header-nav > ul > li > span::after {
  content: "";
  display: block;
  height: 3px;
  background: var(--color-teal);
  transform: scaleX(0);
  transition: transform 0.2s, opacity 0.2s;
  opacity: 0;
}

.header-nav > ul > li:hover > a::after,
.header-nav > ul > li:hover > span::after {
  transform: scaleX(1);
  opacity: 1;
}

.header-nav .sub-menu {
  display: none;
  position: absolute;
  inset-block-start: 100%;
  inset-inline-start: 0;
  list-style: none;
  margin: 0;
  padding: 0;
  background: var(--color-bg-white);
  box-shadow: 0 6px 10px 0 rgba(0, 0, 0, 0.04);
  border-radius: 0 0 6px 6px;
  min-width: 220px;
}

.header-nav > ul > li:hover > .sub-menu {
  display: block;
}

.header-nav .sub-menu a {
  display: block;
  padding: 12px;
  font-size: 16px;
  color: var(--color-text);
  text-decoration: none;
  white-space: nowrap;
}

.header-nav .sub-menu a:hover {
  color: var(--color-accent);
}

.header-search {
  position: relative;
  display: flex;
  align-items: center;
  margin-inline-start: 1rem;
  color: var(--color-teal);
  flex-shrink: 0;
}

/* Absolutely positioned so the expanded input overlays the nav (expanding
   leftward from the magnifier) rather than reflowing it and squeezing the
   nav items onto two lines. */
.header-search-input {
  position: absolute;
  inset-inline-end: calc(100% + 4px);
  inline-size: 180px;
  padding-block: 6px;
  padding-inline: 10px;
  border: 1px solid #ccc;
  border-radius: 4px;
  background: var(--color-bg-white);
  /* White halo fills the transparent gap between the border and the focus
     ring so the overlaid nav text doesn't show through it. Invisible against
     the white header when unfocused. */
  box-shadow: 0 0 0 4px var(--color-bg-white);
  font: inherit;
  transition: inline-size 0.2s ease, opacity 0.2s ease;
}

.header-search--collapsed .header-search-input {
  inline-size: 0;
  padding-inline: 0;
  border-color: transparent;
  opacity: 0;
  pointer-events: none;
}

.header-search-toggle {
  display: inline-flex;
  align-items: center;
  background: none;
  border: 0;
  padding: 4px;
  cursor: pointer;
  color: inherit;
}

.header-cta {
  margin-inline-start: 1rem;
  flex-shrink: 0;
  border: none;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  color: var(--color-heading);
}

/* --- Mobile nav dropdown --- */

.mobile-nav {
  display: none;
}

.close-icon {
  display: none;
}

.menu-open .hamburger-icon {
  display: none;
}

.menu-open .close-icon {
  display: block;
}


/* --- Learning Centre category nav --- */

.lc-nav {
  display: flex;
  justify-content: center;
  background-color: var(--color-lc-nav-bg);
  overflow-x: auto;
  padding-inline: 0;
}

.lc-nav a {
  color: var(--color-teal-dark);
  text-decoration: none;
  font-size: 16px;
  font-weight: 400;
  line-height: 22.4px;
  padding-block: 29px;
  padding-inline: 25px;
  white-space: nowrap;
}

.lc-nav a:hover {
  color: var(--color-accent);
}

/* --- Article card --- */

.article-card {
  display: flex;
  flex-direction: column;
  border-radius: 6px;
  box-shadow: var(--shadow-card);
  overflow: hidden;
  min-width: 0;
  max-width: 100%;
}

.article-card img {
  width: 100%;
  height: 190px;
  object-fit: cover;
  display: block;
}

.article-card h3 {
  font-size: 22px;
  font-weight: 700;
  line-height: 26.4px;
  color: var(--color-heading);
  margin-block: 0 5px;
  padding-block-start: 15px;
  padding-inline: 23px;
}

.article-card h3 a {
  color: inherit;
  text-decoration: none;
}

.article-card p {
  font-size: 16px;
  line-height: 22.4px;
  color: var(--color-text-muted);
  margin-block: 0;
  padding-inline: 23px;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.article-card .read-more {
  margin-block-start: auto;
  padding-block: 15px;
  padding-inline: 23px;
  font-size: 18px;
  font-weight: 700;
  line-height: 25.2px;
  color: var(--color-accent);
  text-decoration: none;
}

/* --- Subscribe section --- */

.lc-subscribe {
  background-color: var(--color-bg-light);
  padding-block: 100px;
  text-align: center;
}

.subscribe-content {
  max-width: 704px;
}

.lc-subscribe h2 {
  font-size: 40px;
  font-weight: 700;
  line-height: 40px;
  color: var(--color-heading);
  margin-block: 0 15px;
}

.lc-subscribe p {
  font-size: 18px;
  line-height: 28.8px;
  color: var(--color-text);
  margin-block-end: 14px;
}

.subscribe-form {
  margin-block: 20px;
}

.subscribe-status {
  margin-block: 16px;
  padding-block: 12px;
  padding-inline: 16px;
  border-radius: 6px;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.4;
  text-align: start;
}

/* doubled class to win over .sidebar-subscribe p in article.css */
.subscribe-status.subscribe-status--ok {
  background-color: #c3e6cd;
  color: #0d3a1f;
  border: 1px solid #1c5b34;
}

.subscribe-status.subscribe-status--err {
  background-color: #f5c6cb;
  color: #58151c;
  border: 1px solid #842029;
}

.subscribe-fields {
  display: flex;
  gap: 24px;
}

.subscribe-fields input {
  flex: 1;
  height: 47px;
  padding-inline: 10px;
  font-size: 16px;
  border: 1px solid var(--color-teal);
  border-radius: 6px;
}


.subscribe-form button {
  display: block;
  margin-block-start: 20px;
  margin-inline: auto;
  padding-block: 8px;
  padding-inline: 22px;
  font-size: 14px;
  text-transform: uppercase;
  color: #fff;
  background-color: var(--color-accent);
  border: none;
  border-radius: 50px;
  cursor: pointer;
}

.privacy-note {
  font-size: 16px;
  line-height: 22.4px;
}

.privacy-note a {
  color: var(--color-accent);
  text-decoration: none;
}

/* --- FAQ --- */

.faq {
  background: var(--color-bg-white);
  padding-block: var(--section-pad-block);
}

.faq h2,
.faq hr,
.faq > .center > p {
  text-align: center;
}

.faq > .center > p {
  padding-inline: var(--section-text-inset);
}

.faq hr {
  width: 60px;
  border: none;
  border-block-start: 2px solid var(--color-teal);
  margin: 1rem auto;
}

.faq-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  margin-top: 2rem;
}

.faq-col:first-child {
  padding-inline: 100px 40px;
}

.faq-col:last-child {
  padding-inline: 40px 100px;
}

.faq-item {
  border: none;
  border-bottom: 1px solid var(--color-border);
  padding: 0.75rem 1rem;
}

.faq-item summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--color-heading);
}

.faq-item[open] > summary {
  color: var(--color-teal);
}

.faq-item summary::marker {
  color: inherit;
}

.faq-item[open] > :not(summary) {
  animation: faq-open 0.25s ease;
}

@keyframes faq-open {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.faq-item p {
  margin-top: 0.75rem;
  color: var(--color-text);
  font-size: 18px;
}

/* --- Calculators (shared component) --- */

.calculators {
  padding-block: var(--section-pad-block);
}

.calculators h2,
.calculators .divider,
.calculators > .center > p {
  text-align: center;
}

.calculators > .center > p {
  padding-inline: var(--section-text-inset);
}

.calculators .card-grid {
  margin-inline: auto;
  max-width: 1130px;
}

/* --- Site footer --- */

.site-footer {
  background: var(--color-primary);
  color: #fff;
}

.footer-inner {
  max-width: var(--max-width);
  margin-inline: auto;
}

.footer-top {
  padding-block: 60px 34px;
  padding-inline: 50px;
}

.footer-logo img {
  display: block;
  margin-block-end: 20px;
}

.footer-body {
  display: flex;
  align-items: flex-start;
  gap: 2rem;
}

.footer-about {
  flex: 1;
  font-size: 16px;
  line-height: 24px;
  color: #fff;
  margin: 0;
}

.footer-nav {
  display: flex;
  gap: 3rem;
}

.footer-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-nav a {
  display: block;
  font-size: 16px;
  line-height: 24px;
  color: #fff;
  padding-block: 5px;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.4s;
}

.footer-nav a:hover {
  color: var(--color-teal);
}

.footer-social {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--color-border-light);
  color: var(--color-teal);
  font-size: 19px;
  text-decoration: none;
  transition: transform 0.3s, color 0.3s, border-color 0.3s;
}

.footer-social a:hover {
  transform: scale(0.9);
  color: #fff;
  border-color: #fff;
}

.footer-disclaimer {
  padding-inline: 50px;
}

.footer-disclaimer .footer-inner {
  border-block: 1px solid rgba(255, 255, 255, 0.14);
  padding-block: 11px;
}

.footer-disclaimer p {
  font-size: 14px;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.48);
  margin: 0;
}

.footer-disclaimer strong {
  color: rgba(255, 255, 255, 0.48);
}

.footer-bottom {
  padding-block: 17px;
  padding-inline: 50px;
}

.footer-bottom .footer-inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 14.4px;
  line-height: 2;
}

.footer-bottom a {
  color: #fff;
  text-decoration: underline;
}

.footer-bottom span {
  color: #fff;
}

/* --- Form fields --- */

.form-group {
  margin-block-end: 16px;
}

.form-group label,
.form-group legend {
  display: block;
  margin-block-end: 4px;
  font-weight: 400;
  font-size: 16px;
  color: var(--color-text);
}

.form-group select,
.form-group input[type="text"],
.form-group input[type="tel"],
.form-group input[type="email"],
.form-group textarea {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--color-teal);
  border-radius: 4px;
  font-size: 16px;
  font-family: inherit;
  box-sizing: border-box;
}

.form-group select:focus,
.form-group input[type="text"]:focus,
.form-group input[type="tel"]:focus,
.form-group input[type="email"]:focus,
.form-group textarea:focus {
  box-shadow: 0px 0px 4px 0px #2F99A9;
  outline-color: var(--color-teal);
}

.form-group-inline {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.radio-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-inline-end: 16px;
  font-weight: normal;
  font-size: 16px;
}

/* --- Responsive --- */

@media (max-width: 1024px) {
  :root {
    --section-text-inset: 0;
  }
  h1 { font-size: 40px; }
  h2 { font-size: 34px; }
  h3 { font-size: 26px; }
  .card-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .lc-nav a {
    font-size: 13px;
    padding-inline: 9px;
  }
  .site-header { padding-inline: 20px; }
  .header-nav { display: none; }
  .header-search { margin-inline-start: auto; }
  .menu-toggle { display: block; }
  .mobile-nav {
    display: block;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: var(--color-bg-white);
    border-block-start: 1px solid #e3e3e3;
    position: absolute;
    inset-block-start: var(--header-height);
    inset-inline: 0;
    z-index: 98;
  }
  .menu-open .mobile-nav {
    max-height: 100vh;
  }
  .mobile-nav > ul {
    list-style: none;
    margin: 0;
    padding: 0;
  }
  .mobile-nav > ul > li {
    border-block-end: 1px solid #e3e3e3;
  }
  .mobile-nav > ul > li:last-child {
    border-block-end: none;
  }
  .mobile-nav > ul > li > a,
  .mobile-nav > ul > li > span {
    display: block;
    padding: 14px 20px;
    font-size: 16px;
    line-height: 20px;
    color: #5d5b5b;
    text-decoration: none;
    cursor: pointer;
  }
  .mobile-nav .nav-split {
    display: flex;
    align-items: center;
  }
  .mobile-nav .nav-split > a,
  .mobile-nav .nav-split > span {
    padding: 14px 0 14px 20px;
    font-size: 16px;
    line-height: 20px;
    color: #5d5b5b;
    text-decoration: none;
  }
  .mobile-nav .submenu-toggle {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    align-self: stretch;
    padding-inline-end: 20px;
    background: none;
    border: none;
    cursor: pointer;
  }
  .mobile-nav .submenu-toggle::after {
    content: "";
    display: block;
    width: 8px;
    height: 8px;
    border-inline-end: 2px solid #aaa;
    border-block-end: 2px solid #aaa;
    transform: rotate(45deg);
    transition: transform 0.2s;
  }
  .mobile-nav .has-children.expanded .submenu-toggle::after {
    transform: rotate(-135deg);
  }
  .mobile-nav .sub-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: #fafafa;
  }
  .mobile-nav .has-children.expanded > .sub-menu {
    max-height: 500px;
  }
  .mobile-nav .sub-menu a {
    display: block;
    padding-block: 10px;
    padding-inline: 36px 20px;
    font-size: 15px;
    color: #5d5b5b;
    text-decoration: none;
    border-block-end: 1px solid #eee;
  }
  .mobile-nav .sub-menu li:last-child a {
    border-block-end: none;
  }
  .btn-group { flex-wrap: wrap; }
  .adviser-cta {
    padding-block: 60px;
  }
  .adviser-copy {
    padding-inline: 20px 0;
  }
  .rates {
    position: static;
    z-index: auto;
  }
  .rates .split {
    grid-template-columns: 60% 40%;
  }
  .rates .split > div:last-child {
    position: static;
  }
  .rates img {
    position: static;
    transform: none;
    max-width: 100%;
  }
  .faq-col:first-child {
    padding-inline: 0 20px;
  }
  .faq-col:last-child {
    padding-inline: 20px 0;
  }
  .lc-subscribe h2 {
    font-size: 34px;
    line-height: 34px;
  }
}

@media (max-width: 767px) {
  :root {
    --section-text-inset: 0;
    --header-height: 60px;
  }
  h1 { font-size: 36px; }
  h2 { font-size: 30px; }
  .split,
  .sidebar-layout {
    grid-template-columns: 1fr;
  }
  body {
    font-size: 16px;
  }
  .card-grid,
  .card-grid.cols-3,
  .card-list,
  .article-cards-cta .card-list {
    grid-template-columns: 1fr;
  }
  .calculator-card .btn {
    font-size: 16px;
  }
  .adviser-cta {
    padding-block: 30px;
  }
  .adviser-cta .split {
    grid-template-columns: 1fr;
  }
  .adviser-copy {
    padding-inline: 0;
  }
  .adviser-photos {
    max-width: 400px;
    margin-inline: auto;
  }
  .rates {
    padding-block: 30px;
    position: static;
    z-index: auto;
  }
  .rates .split {
    grid-template-columns: 1fr;
    min-height: auto;
  }
  .rates .split > div:first-child {
    padding-inline-end: 0;
    text-align: center;
  }
  .rates h2 {
    border-inline-start: none;
    padding-inline-start: 0;
  }
  .rates .btn-group {
    justify-content: center;
  }
  .rates .split > div:last-child {
    position: static;
  }
  .rates img {
    position: static;
    transform: none;
    max-width: 100%;
    margin-inline: auto;
    display: block;
  }
  .lc-nav {
    justify-content: flex-start;
  }
  .lc-nav a {
    font-size: 13px;
    line-height: 18.2px;
    padding-block: 18px;
    padding-inline: 13px;
  }
  .site-header { padding-inline: 14px; }
  .header-logo img { width: 175px; }
  .header-cta { display: none; }
  .faq {
    padding-block: 30px;
  }
  .faq h2,
  .faq hr,
  .faq > .center > p {
    text-align: start;
  }
  .faq hr {
    margin-inline: 0;
  }
  .faq-columns {
    grid-template-columns: 1fr;
  }
  .faq-col:first-child,
  .faq-col:last-child {
    padding-inline: 0;
  }
  .footer-body {
    flex-direction: column;
  }
  .footer-social {
    flex-direction: row;
  }
  .footer-top,
  .footer-disclaimer,
  .footer-bottom {
    padding-inline: 20px;
  }
  .footer-bottom .footer-inner {
    flex-wrap: wrap;
  }
  .adviser-cta .check-list li {
    font-size: 16px;
  }
  .faq-item p {
    font-size: 16px;
  }
  .lc-subscribe {
    padding-block: 60px;
  }
  .lc-subscribe h2 {
    font-size: 30px;
    line-height: 30px;
  }
  .lc-subscribe p {
    font-size: 16px;
    line-height: 24px;
  }
  .subscribe-fields {
    flex-direction: column;
    gap: 10px;
  }
  .subscribe-fields input {
    flex: none;
  }
  .subscribe-content {
    max-width: 400px;
  }
  .form-group-inline {
    grid-template-columns: 1fr;
  }
}

/* --- Content columns grid --- */

.content-cols {
  display: grid;
  gap: 2rem;
  align-items: start;
}

.content-cols--2 {
  grid-template-columns: 1fr 1fr;
}

.content-cols--2-35 {
  grid-template-columns: 35% 1fr;
}

.content-cols--5 {
  grid-template-columns: repeat(5, 1fr);
}

@media (max-width: 767px) {
  .content-cols--2,
  .content-cols--2-35,
  .content-cols--5 {
    grid-template-columns: 1fr;
  }
}

/* --- Heading accent (teal left border) --- */

.heading-accent {
  border-inline-start: 3px solid var(--color-teal);
  padding-inline-start: 10px;
}

/* --- Adviser photos crossfade --- */

.adviser-photos {
  position: relative;
}

.adviser-photos img {
  width: 100%;
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  opacity: 0;
  animation: crossfade 10s infinite;
}

.adviser-photos img:first-child {
  position: relative;
  animation-delay: 0s;
}

.adviser-photos img:last-child {
  animation-delay: 5s;
}

@keyframes crossfade {
  0%   { opacity: 0; }
  8%   { opacity: 1; }
  50%  { opacity: 1; }
  58%  { opacity: 0; }
  100% { opacity: 0; }
}

/* --- Logo carousel (stepped scroll) --- */

.logo-carousel {
  overflow: hidden;
  margin-block-start: 2rem;
}

.logo-track {
  display: flex;
  align-items: center;
  width: max-content;
  animation: logo-scroll 45s ease-out infinite;
}

.logo-track img {
  width: 200px;
  height: 100px;
  padding-inline: 1.5rem;
  box-sizing: border-box;
  object-fit: contain;
}

@media (max-width: 1024px) {
  .logo-track img {
    width: 160px;
    height: 80px;
  }
}

@media (max-width: 767px) {
  .logo-track img {
    width: 140px;
    height: 60px;
    padding-inline: 0.75rem;
  }
}

@keyframes logo-scroll {
  0%,     7.7%  { transform: translateX(0); }
  10%,    17.7% { transform: translateX(-3.704%); }
  20%,    27.7% { transform: translateX(-7.407%); }
  30%,    37.7% { transform: translateX(-11.111%); }
  40%,    47.7% { transform: translateX(-14.815%); }
  50%,    57.7% { transform: translateX(-18.519%); }
  60%,    67.7% { transform: translateX(-22.222%); }
  70%,    77.7% { transform: translateX(-25.926%); }
  80%,    87.7% { transform: translateX(-29.630%); }
  90%,    100%  { transform: translateX(-33.333%); }
}

/* --- Logo scroller (continuous horizontal scroll) --- */

.logo-scroller {
  overflow: hidden;
  margin-block-start: 2rem;
}

.logo-scroller-track {
  display: flex;
  align-items: center;
  width: max-content;
  animation: logo-scroll-continuous 30s linear infinite;
}

.logo-scroller-track img {
  height: 60px;
  padding-inline: 1.5rem;
  box-sizing: border-box;
  object-fit: contain;
}

.logo-scroller--greyscale .logo-scroller-track img {
  filter: grayscale(100%);
  opacity: 0.7;
}

@keyframes logo-scroll-continuous {
  0% { transform: translateX(0); }
  100% { transform: translateX(-33.333%); }
}

/* --- Page hero (shared across home, LC, category) --- */

.page-hero {
  position: relative;
  overflow: hidden;
  background-color: var(--color-primary);
  display: flex;
  align-items: center;
  min-height: 450px;
  color: #fff;
}

.page-hero-bg {
  position: absolute;
  inset: 0;
  inline-size: 100%;
  block-size: 100%;
  object-fit: cover;
  z-index: 0;
}

.page-hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.page-hero-content {
  position: relative;
  z-index: 2;
  max-width: 480px;
  margin-inline: 0;
}

.page-hero-content .btn {
  margin-block-start: 1.25rem;
}

.page-hero h1,
.page-hero h2 {
  font-size: 46px;
  font-weight: 700;
  line-height: 1;
  color: #fff;
  margin-block: 0;
}

.page-hero .hero-divider {
  border: none;
  border-block-start: 2px solid var(--color-teal);
  inline-size: 144px;
  margin-block: 10px;
  margin-inline: 0;
}

.page-hero p {
  font-size: 20px;
  line-height: 1.5;
  color: #fff;
  margin-block: 0;
}

@media (max-width: 1024px) {
  .page-hero { min-height: 280px; }
  .page-hero h1 { font-size: 40px; }
}

@media (max-width: 767px) {
  .page-hero { min-height: 250px; }
  .page-hero h1 { font-size: 36px; }
  .page-hero p { font-size: 18px; line-height: 25.2px; }
}

.lc-cta {
  padding-block: 30px;
}

@media (max-width: 1024px) {
  .lc-cta {
    padding-block: 30px;
  }
}

@media (max-width: 767px) {
  .lc-cta {
    padding-block: 20px;
  }
}

.lc-cta .page-hero-content {
  max-width: 580px;
}

.lc-cta h2 {
  margin-block-end: 20px;
}

.lc-cta p {
  margin-block: 10px 20px;
}

/* === Top 6 rates table === */
.top-6-table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid #e0e8ef;
  background-color: #fff;
}

.top-6-table thead {
  background-color: #002b3a;
  color: #fff;
}

.top-6-table th {
  padding: 0.75rem 1rem;
  text-align: start;
  font-size: 0.95rem;
  font-weight: 600;
}

.top-6-table td {
  padding: 0.5rem 1rem;
  vertical-align: middle;
}

.top-6-table td:first-child {
  font-size: 16px;
}

.top-6-table tr.top-6-sub td {
  padding-block: 0.15rem;
}

.top-6-table tr:not(.top-6-sub) td {
  border-block-start: 1px solid #e0e8ef;
}

.top-6-rate {
  font-weight: 700;
  font-size: 1.1rem;
  color: #002b3a;
}

.top-6-lender-cell {
  text-align: center;
}

.top-6-lender-cell img {
  height: 1.5lh;
  width: auto;
  display: inline-block;
  object-fit: contain;
}

/* === Top 6 dialog === */
.top-6-dialog {
  border: none;
  border-radius: 7px;
  padding: 0;
  max-width: 95%;
  width: 32rem;
  background-color: #f0f6fc;
}

.top-6-dialog::backdrop {
  background-color: rgba(0, 0, 0, 0.8);
}

.top-6-dialog-content {
  padding: 2rem;
  max-height: 85vh;
  overflow-y: auto;
}

.top-6-dialog-content h2 {
  margin-block-end: 1rem;
}

.top-6-dialog-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
  padding: 0.5rem;
}

.top-6-dialog-content > .btn {
  display: inline-block;
  margin-block-start: 1.5rem;
}

@media (max-width: 767px) {
  .top-6-dialog-content {
    padding: 20px;
  }
}

