/* FitInFinance brand tokens and interactive states. Loaded last on every page, so one change here
   applies everywhere. Navy: brand and dark sections. Cream: reading. Black: body text. Gold: the main
   action and small accents. White: inputs, results and cards. Dark gold: accent text on light. */
:root {
  /* The six brand colours. Every other colour on the site is built from these. */
  --navy: #17243A; --cream: #F3F0E8; --black: #101010; --gold: #C9A227; --white: #FFFFFF;
  --gold-ink: #886712;            /* gold for text on cream or white: 4.62:1 on cream, 5.26:1 on white */

  /* Surfaces */
  --surface-brand: var(--navy);       /* header, footer, hero panels, professional service sections */
  --surface-reading: var(--cream);    /* guide, articles, FAQs, education sections */
  --surface-form: var(--white);       /* inputs, calculator panels, cards on cream */
  --surface-editorial: var(--black);  /* manifesto and newsletter only */

  /* Text */
  --text: var(--black); --ink-2: #4A4A48; --text-2: var(--ink-2);          /* on light */
  --text-on-dark: var(--cream);                                            /* on navy or near-black */
  --text-on-dark-2: rgba(243,240,232,.72); --text-on-dark-3: rgba(243,240,232,.6);   /* 5.8:1 or more on navy */

  /* Lines and fields */
  --hair-dark: rgba(16,16,16,.14); --hair-light: rgba(255,255,255,.16);  /* decorative dividers */
  --border-field: #8C877D;                                                /* input borders, 3.57:1 on white */

  /* Actions */
  --gold-hover: #D6B03A; --gold-active: #B38F1F; --navy-hover: #22324D;
  --disabled-bg: #DAD5CB; --disabled-ink: #4A4A48;

  /* Status: always paired with words, never colour alone */
  --error: #B3261E; --success: #24513B; --success-bg: #E8EFE9;

  /* Pillar markers, from the brand palette only. Always shown next to the pillar's name and number. */
  --pillar-money: var(--navy); --pillar-muscle: var(--black); --pillar-mindset: var(--gold);
}

/* Keyboard focus never ends up behind the sticky tool tabs or the phone guide bar */
html { scroll-padding-top: 72px; scroll-padding-bottom: 96px; }

/* Primary: gold with dark text */
.btn--dark, .btn--light, .btn--gold, .btn.gold, .sh-cta { background: var(--gold); color: var(--black); font-weight: 700; }
.btn--dark:hover, .btn--light:hover, .btn--gold:hover, .btn.gold:hover, .sh-cta:hover { background: var(--gold-hover); color: var(--black); }
.btn--dark:active, .btn--light:active, .btn--gold:active, .btn.gold:active, .sh-cta:active { background: var(--gold-active); transform: none; }
/* Quieter navy action on light backgrounds */
.btn--navy, .btn.navy { background: var(--navy); color: var(--cream); }
.btn--navy:hover, .btn.navy:hover { background: var(--navy-hover); }
.btn--navy:active, .btn.navy:active { background: var(--black); transform: none; }
/* Secondary on light: navy text and border */
.btn--line, .btn.line { background: transparent; border: 1px solid var(--navy); color: var(--navy); }
.btn--line:hover, .btn.line:hover { background: rgba(23,36,58,.08); border-color: var(--navy); }
.btn--line:active, .btn.line:active { background: rgba(23,36,58,.16); transform: none; }
/* Secondary on dark: cream text and border */
.btn--ghost, .btn--line-light { background: transparent; border: 1px solid rgba(243,240,232,.6); color: var(--cream); }
.btn--ghost:hover, .btn--line-light:hover { background: rgba(243,240,232,.1); border-color: var(--cream); }
.sec--navy .btn--line, .sec--black .btn--line, .dark .btn--line, .black .btn--line, .callout .btn--line, .prose .tool .btn--line { border-color: rgba(243,240,232,.6); color: var(--cream); }
/* Tertiary: an underlined text link in the section's own text colour */
.btn--text, .text-link, .rs-link, .start-more, .hr-more { background: none; border: 0; padding: 0; color: inherit; text-decoration: underline; text-underline-offset: 4px; font-weight: 600; }
.btn--text:hover, .text-link:hover, .rs-link:hover, .start-more:hover, .hr-more:hover { text-decoration-thickness: 2px; }
/* Disabled: shape and text change too, so it never depends on colour alone */
.btn[disabled], .btn[aria-disabled="true"], button[disabled] { background: var(--disabled-bg); border-color: var(--disabled-bg); color: var(--disabled-ink); cursor: not-allowed; transform: none; box-shadow: none; }

/* Focus: gold with a dark ring, visible on navy, cream and white */
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; box-shadow: 0 0 0 2px var(--black); }

/* Text links in reading areas */
.prose a, .byline a, .fine a, .year-note a, .assume-top a, .sec--cream p a, .summary a, main.wrap p a { color: var(--navy); text-decoration: underline; text-underline-offset: 3px; }
.prose a:hover, .byline a:hover, .fine a:hover, .year-note a:hover, .assume-top a:hover, .sec--cream p a:hover, main.wrap p a:hover { color: var(--gold-ink); }
.prose .btn, .prose a.btn { text-decoration: none; color: var(--black); }
.prose .tool a:not(.btn) { color: var(--cream); }
.prose .tool a.btn--line { color: var(--cream); }

/* Gold is kept for actions: dividing lines go quiet */
.prose h2 { border-top-color: var(--hair-dark); }
.steps, .standards { border-top-color: var(--hair-light); }
.sec--cream .steps { border-top-color: var(--hair-dark); }
.expect, .prep { border-top-color: var(--hair-dark); }

/* Same palette for all three pillars */
.logo-chip { background: var(--navy); }

/* Pillar markers: a 4px top rule and the label dot in the pillar's colour (home cards and pillar pages) */
#money, [data-pillar="money"] { --pillar: var(--pillar-money); }
#muscle, [data-pillar="muscle"] { --pillar: var(--pillar-muscle); }
#mindset, [data-pillar="mindset"] { --pillar: var(--pillar-mindset); }
.phero[data-pillar] { border-top: 4px solid var(--pillar); }
.phero[data-pillar] .label .dot { background: var(--pillar); }
/* Home pillar cards sit on a navy panel, so each pillar gets its own card surface instead of a rule */
.card#money { background: var(--navy); border-color: rgba(243,240,232,.32); }
.card#muscle { background: var(--black); }
.card#mindset { background: var(--cream); border-color: var(--cream); color: var(--black); }
.card#mindset .card-k { color: var(--gold-ink); }
.card#mindset .card-d { color: var(--ink-2); }
.card#mindset .card-cta { color: var(--black); border-bottom-color: rgba(16,16,16,.32); }
.card#mindset .card-cta:hover { border-color: var(--black); }

/* Photos light up on scroll (assets/photo-light.js). Hover and keyboard focus do the same on desktop. */
img.pl { filter: grayscale(1) brightness(.5) contrast(1.05) !important; transform: scale(1); transition: filter .9s cubic-bezier(.22,.8,.24,1), transform 1.2s cubic-bezier(.22,.8,.24,1), opacity .8s !important; }
img.pl.is-lit { filter: grayscale(0) brightness(1.18) contrast(1.03) !important; transform: scale(1.03); }
/* "Before" stays black and white so the journey still reads from past to present */
.j-grid li:first-child img.pl.is-lit, .strip li:first-child img.pl.is-lit { filter: grayscale(1) brightness(1.15) contrast(1.05) !important; }
@media (hover: hover) {
  .card:hover img.pl, .card:focus-within img.pl, .j-grid li:hover img.pl, .phero-img:hover img.pl, .split-img:hover img.pl, .author-img:hover img.pl { filter: grayscale(0) brightness(1.18) contrast(1.03) !important; }
}

/* Static dividers use hairlines, not gold (gold kept for hover, focus, selected tab and callout accents) */
.standards, .five, .principles, .chapters li, .creds, .expect, .prep { border-top-color: var(--hair-dark); }
.sec--navy .standards, .dark .chapters li, .dark .creds, .dark .five, .dark .principles, .phero .creds { border-top-color: var(--hair-light); }
main h2 { border-top-color: var(--hair-dark); }

/* Guide FAQ: reading surface (cream, near-black text) */
section.dark.faq { background: var(--surface-reading); color: var(--text); }
section.dark.faq h2, section.dark.faq h3, section.dark.faq summary { color: var(--text); }
section.dark.faq p, section.dark.faq li, section.dark.faq dd { color: var(--ink-2); }
section.dark.faq details { border-color: var(--hair-dark); }
section.dark.faq a:not(.btn) { color: var(--navy); }
section.dark.faq .label, section.dark.faq .eyebrow { color: var(--gold-ink); }
section.dark.faq details, section.dark.faq details:last-child { border-color: var(--hair-dark); }
section.dark.faq summary::after { color: var(--gold-ink); }
section.dark.faq .btn--ghost { border-color: var(--navy); color: var(--navy); }
section.dark.faq .btn--ghost:hover { background: rgba(23,36,58,.08); }
section.dark.faq .closing p { color: var(--ink-2); }
section.dark.faq h2 em { color: var(--gold-ink); }

/* ==========================================================================
   Design polish (Nov 2026): one heading voice, one radius scale, one arrow system, one gold action per view
   ========================================================================== */
:root { --r-s: 8px; --r-m: 12px; --r-l: 16px; }   /* fields · cards · panels. Buttons stay pills. */

/* Headings speak in one typeface. No italic serif or gold on a single word. */
h1 em, h2 em, h3 em, h1 .serif, h2 .serif, h3 .serif, .lede em, .intro p em,
.p-title em, .j-title em, .news-t em, .rs-h em, .hr-h em, .hw-h em, .start-h em {
  font-family: inherit !important; font-style: normal !important; font-weight: inherit !important; font-size: inherit !important;
  text-transform: inherit !important; letter-spacing: inherit !important; color: inherit !important;
}

/* Arrows: → slides along its direction. ↗ (links that leave the site) keeps the diagonal nudge. */
a:hover .arr, a:focus-visible .arr, button:hover .arr { transform: translateX(3px); }
a[target="_blank"]:hover .arr, a[target="_blank"]:focus-visible .arr { transform: translate(2px, -2px); }

/* One gold action above the fold: the deadline bar's button is an outline, so the page's own main button leads */
.deadline-bar button.db-btn { background: transparent; color: var(--cream); border: 1px solid rgba(243,240,232,.6); }
.deadline-bar button.db-btn:hover { background: rgba(243,240,232,.12); }

/* Labels that remain carry a fact (a date, a length, a price), so they read as text, not decoration */
.label { letter-spacing: .08em; }

/* Compact secondary-page heroes (Nov 2026 review): content starts sooner. Headline about two-thirds the
   old size, portrait landscape and capped, less padding. The home page hero is a different block and is untouched. */
.phero { padding: 16px 0 48px; }
.phero .crumbs { margin-bottom: 24px; }
.phero h1 { font-size: clamp(40px, 5.4vw, 80px); margin: 12px 0 14px; }
.phero h1.h1--long { font-size: clamp(36px, 4.4vw, 64px); max-width: 16ch; }
.phero .lede { margin-bottom: 22px; }
.phero-grid { grid-template-columns: 1.6fr 1fr; gap: 48px; }
.phero-img { aspect-ratio: 4 / 3; max-height: 360px; }
@media (max-width: 900px) {
  .phero-img { max-width: 100%; max-height: 220px; aspect-ratio: 16 / 9; }
  .phero-grid { gap: 24px; }
}
@media (max-width: 560px) { .phero h1, .phero h1.h1--long { font-size: 36px; } }

/* Phones: the bottom guide bar is slimmer (about 56px instead of 70px). nav.js hides it on task pages,
   while a form is on screen and while a field has focus. */
.guide-bar { padding-top: 6px !important; padding-bottom: calc(6px + env(safe-area-inset-bottom, 0px)) !important; }
.guide-bar a { min-height: 44px !important; padding: 4px 16px !important; }
.guide-bar .gb-note { display: none; }

/* Jump links to the main task (calculators, enquiry form): phones and tablets only, where the task sits
   below a long introduction */
.jump { display: none; margin: 4px 0 20px; }
@media (max-width: 900px) { .jump { display: block; } }

/* Phones: room under the footer so the back-to-top button never covers its last lines */
@media (max-width: 760px) { body { padding-bottom: 72px; } }

/* Home philosophy section: one link on to the full story */
.m-second p { text-transform: none !important; letter-spacing: -.02em; }
.m-second { margin-top: 64px !important; }
.m-more { display: inline-flex; gap: 8px; margin-top: 32px; padding-bottom: 2px; color: var(--gold); font: 600 17px/1.3 var(--f-body, system-ui), sans-serif; text-decoration: none; border-bottom: 1px solid currentColor; }

/* Readability (review): headings in sentence case instead of all capitals, so they scan faster.
   Small labels and the home hero keep their capitals. */
.phero h1, .article-hero h1, h2, .cards b, .cards h3, .steps b, .callout h3 {
  text-transform: none; letter-spacing: -.025em; line-height: 1.02;
}
.prose h2 { line-height: 1.15; }
h1:not(#hero-title) { text-transform: none !important; letter-spacing: -.025em; line-height: 1.02 !important; }

/* Supporting text never below 13px (card kickers, read times, small print in the toolkit) */
.rs-k, .card-k, .card-num, .m-label, main small, main .label { font-size: max(13px, 1em) !important; }
.rs-link, .card-cta { font-size: max(14px, 1em) !important; }
.rs-list a span, .divider-inner > *, #main-menu a { font-size: 13px !important; }

/* Articles: one fixed gap from the author line to the first paragraph on every article */
.article-hero { padding-bottom: 24px; }
.article-hero .byline { margin-bottom: 0; }
.prose-wrap { padding-top: 24px; }

/* Phones: article titles fit in about three lines at 360px */
@media (max-width: 560px) {
  .article-hero h1 { font-size: 30px; line-height: 1.08; max-width: none; }
  .article-hero.article-hero--hub h1 { font-size: 30px; }
  h2 { font-size: 28px; }
}

/* Core offer, named once beside each free-call button */
.offer-line { margin: 12px 0 0; font-size: 15px; line-height: 1.5; opacity: .9; }
.offer-line a { font-weight: 600; text-decoration: underline; text-underline-offset: 3px; color: inherit; }

/* Home: "Tax shouldn't be a surprise" problem section */
.pain { background: var(--cream, #F3F0E8); color: var(--black, #101010); padding: 72px max(16px, env(safe-area-inset-left, 0px)) 72px; }
.pain-in { max-width: 1120px; margin: 0 auto; display: grid; grid-template-columns: 1fr 1.25fr; gap: 48px; align-items: start; }
.pain-k { margin: 0 0 10px; font: 700 13px/1.2 var(--f-body, Arial, sans-serif); letter-spacing: .12em; text-transform: uppercase; color: var(--gold-ink, #8A6D12); }
.pain h2 { margin: 0 0 14px; font: 400 clamp(34px, 4.4vw, 52px)/1.05 Georgia, 'Times New Roman', serif !important; text-transform: none !important; letter-spacing: -.01em; color: var(--navy, #17243A); }
.pain-sub { margin: 0; font-size: 18px; line-height: 1.55; color: rgba(16,16,16,.72); max-width: 38ch; }
.pain-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid rgba(16,16,16,.15); }
.pain-list li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 18px; padding: 18px 0; border-bottom: 1px solid rgba(16,16,16,.15); font-size: 18px; line-height: 1.4; }
.pain-list b { font-weight: 600; }
.pain-list a { font-size: 15px; font-weight: 600; color: var(--navy, #17243A); text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; }
.pain-foot { grid-column: 1 / -1; margin: 6px 0 0; font: italic 19px/1.5 Georgia, 'Times New Roman', serif; color: var(--navy, #17243A); }
.pain-foot a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 860px) { .pain-in { grid-template-columns: 1fr; gap: 24px; } .pain { padding-block: 52px; } }
