
/* Family Money Matters: typographic accessibility refinements.
   Keep established blue/red brand, illustrations and card compositions. */
html { -webkit-text-size-adjust:100%; text-size-adjust:100%; }
body { font-size:16px; line-height:1.6; }
main :is(p,li,dd,dt,blockquote),
footer :is(p,li,dd,dt) {
  font-size:max(1rem,16px);
  line-height:1.62;
}
main :is(h1,h2,h3,h4), footer :is(h2,h3,h4) {
  line-height:1.3;
  overflow-wrap:break-word;
  text-wrap:pretty;
}
main h1 { line-height:1.14; }
main :is(.fmm-small,.fmm-search-help,.fmm-result-count,.fmm-editorial,.fmm-citation),
main :is(.eyebrow,.tag,.fmm-pill,.fmm-kicker,.fmm-result-category),
footer small {
  font-size:max(.875rem,14px);
  line-height:1.5;
}
main .fmm-card h3, main .card h3 {font-size:max(1.125rem,18px);line-height:1.35}
/* Legacy Guides cards specify .96rem, which becomes only 15.36px in some
   browsers. Preserve the hero scale but make card summaries 16px minimum. */
main.guide-landing article p {font-size:16px!important;line-height:1.62;}
/* Small-print paragraphs remain full-size; badges and compact labels may use 14px. */
main p:is(.fmm-small,.fmm-search-help,.fmm-result-count,.fmm-citation,.fmm-editorial){font-size:16px!important;line-height:1.6;}


main :is(.fmm-card,.card) p {color:#263e54;}
main :is(.fmm-note,.notice,.fmm-editorial,.fmm-small) {color:#294259;}
main :is(.fmm-card,.card) > a:not(.button),
main :is(.fmm-card,.card) p > a:not(.button) {
  color:#075494;
  font-size:max(1rem,16px);
  font-weight:700;
  text-underline-offset:3px;
}
main a:not(.button):hover, footer a:hover{text-decoration:underline;text-underline-offset:3px;}
main :is(.fmm-pill,.tag){color:#0b2557;background:#eaf4ff;}
main :is(.fmm-results,.fmm-result-card,.fmm-answer) {color:#17344f;}
main :is(input,textarea,select) {
  font-size:16px;
  color:#0b2557;
  background-color:#fff;
}
main :is(input,textarea)::placeholder {color:#3f586b;opacity:1;}
main label {font-size:max(1rem,16px);color:#17344f;line-height:1.5;}
/* Contrast fixes for the dark navy desktop navigation. */
nav.menu .fmm-menu-items > a,
nav.menu .fmm-menu-items > details > summary {
  color:#fff!important;
  opacity:1!important;
  font-size:max(1rem,16px)!important;
  font-weight:700;
  line-height:1.45;
  text-shadow:none;
}
nav.menu .fmm-menu-items > a:visited,
nav.menu .fmm-menu-items > a:hover,
nav.menu .fmm-menu-items > details > summary:hover {color:#fff!important;}
nav.menu .fmm-menu-items details > div {background:#fff!important;color:#0b2557!important;}
nav.menu .fmm-menu-items details > div a,
nav.menu .fmm-menu-items details > div a:visited {
  color:#0b2557!important;
  opacity:1!important;
  font-size:max(1rem,16px);
  line-height:1.45;
  font-weight:650;
}
nav.menu .fmm-menu-items details > div a:hover,
nav.menu .fmm-menu-items details > div a:focus-visible {
  color:#0b2557!important;
  background:#eaf4ff!important;
}
nav.menu .fmm-menu-toggle {color:#0b2557!important;background:#fff!important;font-size:1rem;}
/* Text legibility in cards and numerical result summaries. */
.fmm-maths-card .fmm-answer,
.fmm-cohesive-page main .fmm-answer {
  color:#0b2557!important;
  font-size:max(1rem,16px);
  line-height:1.6;
}
.fmm-calculator-grid .fmm-maths-card label{color:#0b2557;}
.fmm-cohesive-page main .fmm-original-layout .fmm-hero-copy p {color:#263e54!important;}
/* Improve keyboard orientation without replacing existing buttons or layout. */
:where(a,button,input,summary,select,textarea):focus-visible {
  outline:3px solid #d12536!important;
  outline-offset:3px!important;
}
@media (max-width:650px){
  main :is(p,li,dd,dt,blockquote) {font-size:16px;line-height:1.65;}
  nav.menu .fmm-menu-items {line-height:1.5;}
  main .fmm-card,main .card {min-width:0;}
}
@media (prefers-reduced-motion:reduce){
  html{scroll-behavior:auto!important;}
}


/* Guide article paragraphs and disclaimers must not drop below 16px.
   Use an article-specific body class so the rest of the site stays unchanged. */
body.fmm-guide-article main p {
  font-size:16px!important;
  line-height:1.65!important;
}
body.fmm-guide-article main section.hero p {
  font-size:18px!important;
  line-height:1.6!important;
}
/* Guide article toolkit CTA must wrap when text is magnified to 200%.
   Otherwise 'Explore planning tools' grows beyond the narrow viewport. */
body.fmm-guide-article main a[href*="tools"],
body.fmm-guide-article main a[href*="worksheets"],
body.fmm-guide-article footer a[href*="tools"],
body.fmm-guide-article footer a[href*="worksheets"] {
  display:inline-block!important;
  box-sizing:border-box!important;
  max-width:100%!important;
  min-width:0!important;
  white-space:normal!important;
  overflow-wrap:anywhere!important;
  padding:.65rem 1rem!important;
  line-height:1.5!important;
}
/* Guide articles: editorial transparency must be legible at all breakpoints. */
main .fmm-editorial-wrap {
  background:#fff;
  padding:1.2rem 0 .25rem;
}
main .fmm-editorial-wrap .fmm-editorial,
main .fmm-editorial {
  box-sizing:border-box;
  display:block;
  max-width:920px;
  margin:1rem auto 1.6rem;
  padding:1.15rem 1.35rem;
  border:1px solid #cfdeed;
  border-left:5px solid #0868c7;
  border-radius:12px;
  background:#edf6ff!important;
  color:#0b2557!important;
  font-size:16px!important;
  line-height:1.65!important;
  overflow-wrap:break-word;
}
main .fmm-editorial :is(p,span,strong,small),
main section.hero .fmm-editorial :is(p,span,strong,small) {
  color:#0b2557!important;
  font-size:16px!important;
  line-height:1.65!important;
  opacity:1!important;
}
main .fmm-editorial a,
main .fmm-editorial a:link,
main .fmm-editorial a:visited,
main section.hero .fmm-editorial a {
  color:#075494!important;
  font-size:16px!important;
  font-weight:700!important;
  line-height:1.6!important;
  text-decoration:underline!important;
  text-underline-offset:3px;
  opacity:1!important;
}
main .fmm-editorial a:hover { color:#0b2557!important; }
main .fmm-editorial a:focus-visible {outline:3px solid #c72936!important;}
@media(max-width:650px) {
  main .fmm-editorial-wrap {padding:.85rem 0 .2rem}
  main .fmm-editorial{padding:1rem;margin:.75rem auto 1.2rem}
}

/* Source-linked factual panels: clear, readable and visually consistent. */
main .fmm-official-sources{
 box-sizing:border-box;max-width:980px;margin:2rem auto;padding:1.3rem 1.5rem;
 border:1px solid #cbddec;border-left:5px solid #0868c7;border-radius:12px;
 background:#f1f8ff;color:#0b2557;
}
main .fmm-official-sources h2{color:#0b2557;font-size:clamp(1.25rem,2.3vw,1.7rem);margin:0 0 .65rem}
main .fmm-official-sources p{color:#173e5c!important;font-size:16px!important;line-height:1.65!important}
main .fmm-official-sources a,main .fmm-official-sources a:visited{
 color:#075494!important;font-size:16px!important;font-weight:700;
 text-decoration:underline;text-underline-offset:3px;overflow-wrap:anywhere;
}
main .fmm-official-sources .fmm-source-caution{font-size:16px!important;font-style:italic}
@media(max-width:650px){main .fmm-official-sources{padding:1rem;margin:1rem auto}}
