/* Moneyfold website. The new design (2026-11-29), rule for rule, with its colours as
   tokens so the site also has a dark theme (same palette as the previous site's dark mode). */
:root {
  --mf-ink: #05393B;
  --mf-text-muted: #4D6665;
  --mf-green: #028B77;
  --mf-green-deep: #06605A;
  --mf-gold: #E3A93F;
  --mf-gold-deep: #9A6A12;
  --mf-bg: #F5F8F6;
  --mf-surface: #FFFFFF;
  --mf-black: #101010;
  --mf-line: #DCE6E3;
  --mf-on-green: #FFFFFF;
  --mf-on-ink: #FFFFFF;
  --mf-tint: #EEF5F2;
  --mf-gold-tint: #FBF1DC;
  --mf-ghost-hover: #E7F3F0;
  --mf-notice-bg: #FFF9EC;
  --mf-input-line: #B9CCC7;
  --mf-input-bg: #FFFFFF;
  --mf-error: #9B1C1C;
  --mf-shadow: rgba(5, 57, 59, .14);
  --mf-footer-bg: #05393B;
  --mf-footer-text: #DDE9E6;
  --mf-footer-strong: #FFFFFF;
  --mf-footer-muted: #B9D0CB;
  --mf-footer-line: rgba(255, 255, 255, .2);
  --mf-radius: 12px;
  --mf-max: 1100px;
  --mf-font-head: "Bricolage Grotesque", "Trebuchet MS", system-ui, sans-serif;
  --mf-font-body: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --mf-ink: #EAF4F1; --mf-text-muted: #9DB8B3; --mf-green: #3FC1A5; --mf-green-deep: #4FD1B0;
    --mf-gold: #EDB757; --mf-gold-deep: #EDB757; --mf-bg: #07201F; --mf-surface: #0D2E2D;
    --mf-black: #DCEAE6; --mf-line: #1F4745; --mf-on-green: #04211F; --mf-on-ink: #07201F;
    --mf-tint: #123B39; --mf-gold-tint: #3B3018; --mf-ghost-hover: #123B39; --mf-notice-bg: #2A2616;
 --mf-input-line: #2F5B57; --mf-input-bg: #0A2625; --mf-error: #FF9C94;
    --mf-shadow: rgba(0, 0, 0, .45); --mf-footer-bg: #041615; --mf-footer-text: #B9D0CB;
    --mf-footer-strong: #FFFFFF; --mf-footer-muted: #8DAEA8; --mf-footer-line: rgba(255, 255, 255, .14);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --mf-ink: #EAF4F1; --mf-text-muted: #9DB8B3; --mf-green: #3FC1A5; --mf-green-deep: #4FD1B0;
  --mf-gold: #EDB757; --mf-gold-deep: #EDB757; --mf-bg: #07201F; --mf-surface: #0D2E2D;
  --mf-black: #DCEAE6; --mf-line: #1F4745; --mf-on-green: #04211F; --mf-on-ink: #07201F;
  --mf-tint: #123B39; --mf-gold-tint: #3B3018; --mf-ghost-hover: #123B39; --mf-notice-bg: #2A2616;
 --mf-input-line: #2F5B57; --mf-input-bg: #0A2625; --mf-error: #FF9C94;
  --mf-shadow: rgba(0, 0, 0, .45); --mf-footer-bg: #041615; --mf-footer-text: #B9D0CB;
  --mf-footer-strong: #FFFFFF; --mf-footer-muted: #8DAEA8; --mf-footer-line: rgba(255, 255, 255, .14);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--mf-bg);
  color: var(--mf-black);
  font-family: var(--mf-font-body);
  font-size: 16px;
  line-height: 1.6;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--mf-green-deep); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--mf-gold);
  outline-offset: 2px;
}
h1, h2, h3 { font-family: var(--mf-font-head); color: var(--mf-ink); line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: clamp(1.9rem, 4.5vw, 2.8rem); }
h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); margin-top: 1.5em; }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
.skip-link { position: absolute; left: -9999px; top: 0; background: var(--mf-ink); color: var(--mf-on-ink); padding: 8px 12px; z-index: 100; }
.skip-link:focus { left: 12px; top: 12px; }

.wrap { width: 100%; max-width: var(--mf-max); margin: 0 auto; padding: 0 16px; }
main { padding: 24px 0 48px; }
section { padding: 28px 0; }

/* Header */
.site-header { background: var(--mf-surface); border-bottom: 1px solid var(--mf-line); position: sticky; top: 0; z-index: 50; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; }
.brand { font-family: var(--mf-font-head); font-weight: 700; font-size: 1.4rem; color: var(--mf-ink); text-decoration: none; }
.brand span { color: var(--mf-gold-deep); }
.nav { display: none; }
.nav a { color: var(--mf-ink); text-decoration: none; font-weight: 500; margin-left: 20px; }
.nav a[aria-current="page"] { color: var(--mf-green); border-bottom: 2px solid var(--mf-gold); }
.menu-toggle { background: none; border: 1px solid var(--mf-line); border-radius: 8px; padding: 8px 12px; font: inherit; color: var(--mf-ink); cursor: pointer; }
.mobile-nav { display: none; border-top: 1px solid var(--mf-line); padding: 8px 0 16px; }
.mobile-nav.open { display: block; }
.mobile-nav a { display: block; padding: 10px 0; color: var(--mf-ink); text-decoration: none; font-weight: 500; }
.nav a.btn-primary, .mobile-nav a.btn-primary { color: var(--mf-on-green); border-bottom: 0; }
.mobile-nav a.btn-primary { padding: 12px 22px; text-align: center; }
@media (min-width: 900px) {
  .nav { display: flex; align-items: center; }
  .menu-toggle { display: none; }
  .mobile-nav { display: none !important; }
}

/* Buttons */
.btn { display: inline-block; padding: 12px 22px; border-radius: 999px; font: 600 1rem var(--mf-font-body); text-decoration: none; border: 2px solid var(--mf-green); cursor: pointer; text-align: center; transition: background .2s, color .2s; }
.btn-primary { background: var(--mf-green); color: var(--mf-on-green); }
.btn-primary:hover { background: var(--mf-green-deep); border-color: var(--mf-green-deep); }
.btn-ghost { background: transparent; color: var(--mf-green-deep); }
.btn-ghost:hover { background: var(--mf-ghost-hover); }
.btn-block { display: block; width: 100%; }

/* Hero */
.hero { padding: 36px 0 28px; }
.hero .lead { font-size: 1.1rem; color: var(--mf-text-muted); max-width: 60ch; }
.check-list { list-style: none; padding: 0; margin: 0; }
.check-list li { padding: 10px 0 10px 28px; border-bottom: 1px solid var(--mf-line); position: relative; }
.check-list li::before { content: ""; position: absolute; left: 0; top: 17px; width: 12px; height: 12px; border-radius: 50%; background: var(--mf-green); }
.tagline {font-family: var(--mf-font-head); font-size: 1.3rem; font-weight: 600; color: var(--mf-green-deep); margin: 0 0 12px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 20px 0 16px; }
.trust-line { font-size: .92rem; color: var(--mf-text-muted); }

/* Cards and grids */
.grid { display: grid; gap: 16px; }
.card { background: var(--mf-surface); border: 1px solid var(--mf-line); border-radius: var(--mf-radius); padding: 20px; }
.card h3 { margin-bottom: .4em; }
.card .meta { color: var(--mf-text-muted); font-size: .95rem; margin: 0 0 12px; }
.tag { display: inline-block; background: var(--mf-gold-tint); color: var(--mf-gold-deep); border-radius: 999px; padding: 2px 10px; font-size: .82rem; font-weight: 600; }
@media (min-width: 700px) { .grid-2 { grid-template-columns: 1fr 1fr; } .grid-3 { grid-template-columns: repeat(3, 1fr); } }

/* Key facts table */
table { width: 100%; border-collapse: collapse; background: var(--mf-surface); border-radius: var(--mf-radius); overflow: hidden; }
th, td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--mf-line); vertical-align: top; }
th { background: var(--mf-tint); color: var(--mf-ink); font-weight: 600; width: 38%; }
.table-wrap { overflow-x: auto; }

/* Notices */
.notice { border-left: 4px solid var(--mf-gold); background: var(--mf-notice-bg); padding: 14px 16px; border-radius: 8px; margin: 16px 0; font-size: .95rem; }

/* Calculator */
.calc { display: grid; gap: 20px; }
@media (min-width: 900px) { .calc { grid-template-columns: 1fr 1fr; } }
.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 600; color: var(--mf-ink); margin-bottom: 6px; }
.field .hint { font-size: .85rem; color: var(--mf-text-muted); margin-top: 4px; }
.field input[type="number"], .field select {
  width: 100%; padding: 12px; border: 1px solid var(--mf-input-line); border-radius: 8px; font: inherit; color: var(--mf-black); background: var(--mf-input-bg); min-height: 46px;
}
.field input[type="range"] { width: 100%; accent-color: var(--mf-green); }
.result-box { background: var(--mf-surface); border: 1px solid var(--mf-line); border-radius: var(--mf-radius); padding: 20px; }
.result-row { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px dashed var(--mf-line); }
.result-row:last-child { border-bottom: 0; }
.result-row strong { color: var(--mf-ink); }
.result-big { font-family: var(--mf-font-head); font-size: 1.8rem; color: var(--mf-green-deep); margin: 0 0 8px; }
.bar { display: flex; height: 14px; border-radius: 999px; overflow: hidden; background: var(--mf-tint); margin: 12px 0 6px; }
.bar .p { background: var(--mf-green); }
.bar .i { background: var(--mf-gold); }
.legend { display: flex; gap: 16px; font-size: .9rem; color: var(--mf-text-muted); }
.legend span::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: middle; }
.legend .lp::before { background: var(--mf-green); }
.legend .li::before { background: var(--mf-gold); }
.error { color: var(--mf-error); font-size: .9rem; min-height: 1.2em; }

/* Steps */
.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.steps li { counter-increment: step; background: var(--mf-surface); border: 1px solid var(--mf-line); border-radius: var(--mf-radius); padding: 16px 16px 16px 60px; position: relative; }
.steps li::before { content: counter(step); position: absolute; left: 16px; top: 14px; width: 30px; height: 30px; border-radius: 50%; background: var(--mf-gold); color: var(--mf-ink); font-weight: 700; display: flex; align-items: center; justify-content: center; }

/* Footer */
.site-footer { background: var(--mf-footer-bg); color: var(--mf-footer-text); padding: 36px 0 24px; font-size: .93rem; }
.site-footer a { color: var(--mf-footer-strong); }
.site-footer h3 { color: var(--mf-footer-strong); font-size: 1rem; }
.footer-grid { display: grid; gap: 24px; }
@media (min-width: 800px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr; } }
.disclaimer { border-top: 1px solid var(--mf-footer-line); margin-top: 24px; padding-top: 16px; font-size: .85rem; color: var(--mf-footer-muted); }

/* Navigation tabs (v2): pill tabs, Products dropdown, mobile accordion */
.nav { display: none; }
.nav .tabs { list-style: none; margin: 0; padding: 6px; display: flex; align-items: center; gap: 4px; background: var(--mf-tint); border-radius: 999px; }
.nav .tabs > li { position: relative; }
.nav .tab {
  display: inline-flex; align-items: center; gap: 6px; padding: 9px 16px; border-radius: 999px;
  color: var(--mf-ink); text-decoration: none; font-weight: 600; font-size: .95rem; white-space: nowrap;
  transition: background .2s, color .2s;
}
.nav .tab:hover { background: var(--mf-surface); color: var(--mf-green-deep); }
.nav .tab[aria-current="page"] { background: var(--mf-ink); color: var(--mf-on-ink); }
.nav .tab[aria-current="page"]:hover { background: var(--mf-green-deep); }
.caret { width: 0; height: 0; border-left: 5px solid transparent; border-right: 5px solid transparent; border-top: 6px solid currentColor; transition: transform .2s; }
.has-menu:hover > .tab .caret, .has-menu:focus-within > .tab .caret { transform: rotate(180deg); }
.nav .dropdown {
  position: absolute; top: calc(100% + 10px); left: 0; min-width: 280px; list-style: none; margin: 0; padding: 8px;
  background: var(--mf-surface); border: 1px solid var(--mf-line); border-radius: 14px;
  box-shadow: 0 14px 36px var(--mf-shadow);
  opacity: 0; visibility: hidden; transform: translateY(6px); transition: opacity .18s, transform .18s, visibility .18s;
}
.has-menu:hover > .dropdown, .has-menu:focus-within > .dropdown { opacity: 1; visibility: visible; transform: none; }
.nav .dropdown a { display: block; padding: 10px 12px; border-radius: 10px; text-decoration: none; color: var(--mf-ink); }
.nav .dropdown a:hover, .nav .dropdown a:focus-visible { background: var(--mf-tint); }
.nav .dropdown a[aria-current="page"] { background: var(--mf-gold-tint); }
.dd-title { display: block; font-weight: 700; font-family: var(--mf-font-head); }
.dd-note { display: block; font-size: .84rem; color: var(--mf-text-muted); }
.nav .cta { margin-left: 12px; padding: 10px 18px; white-space: nowrap; }
.nav .cta, .nav .cta:hover { color: var(--mf-on-green); }

.menu-toggle { background: var(--mf-surface); border: 1px solid var(--mf-line); border-radius: 999px; padding: 8px 16px; font: 600 .95rem var(--mf-font-body); color: var(--mf-ink); cursor: pointer; }
.mobile-nav { display: none; border-top: 1px solid var(--mf-line); background: var(--mf-surface); }
.mobile-nav.open { display: block; }
.mobile-nav .wrap { padding-top: 8px; padding-bottom: 16px; }
.m-tab { display: block; padding: 12px 4px; border-bottom: 1px solid var(--mf-line); color: var(--mf-ink); text-decoration: none; font-weight: 600; }
.m-sub { display: block; padding: 10px 4px 10px 22px; border-bottom: 1px solid var(--mf-line); color: var(--mf-text-muted); text-decoration: none; font-weight: 500; }
.m-tab[aria-current="page"], .m-sub[aria-current="page"] { color: var(--mf-green-deep); }
.m-cta { margin-top: 14px; }
.mobile-nav a.btn-primary { color: var(--mf-on-green); border-bottom: 0; padding: 12px 22px; }
@media (min-width: 900px) {
  .nav { display: flex; align-items: center; }
  .menu-toggle, .mobile-nav { display: none !important; }
}

/* Products page */
.product-card { position: relative; overflow: hidden; }
.product-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--mf-green); }
.product-card.zero::before { background: var(--mf-gold); }
.product-card .btn { margin-top: 8px; }

/* Motion: subtle only, respects reduced motion */
@media (prefers-reduced-motion: no-preference) {
  .card { transition: transform .2s ease; }
  .card:hover { transform: translateY(-2px); }
}
.site-footer a { text-decoration: none; }

/* Additions for the published site */
.figures { margin: 0; }
.figures p { margin: 0 0 4px; }
.spaced { margin-top: 16px; }
thead th { width: auto; }
td:last-child { overflow-wrap: anywhere; }
html { scroll-padding-top: 84px; }
@media print { .menu-toggle, .mobile-nav, .skip-link { display: none !important; } }

/* Legal pages: the approved text's <main> is kept byte for byte from the previous site. These rules
   give it back the base styles and token names it was written for; its own rules follow verbatim. */
.legal-main{--ink:var(--mf-ink);--muted:var(--mf-text-muted);--line:var(--mf-line);--surface:var(--mf-surface);--paper:var(--mf-bg);--interest:var(--mf-gold);--gold-text:var(--mf-gold-deep);color:var(--mf-ink);font-size:1.0625rem;line-height:1.55}
.legal-main h1,.legal-main h2,.legal-main h3{font-family:var(--mf-font-head);font-weight:700;line-height:1.05;letter-spacing:-0.02em;margin:0;color:var(--mf-ink)}
.legal-main p{margin:0}
.legal-main a{color:inherit}
.legal-main section{padding:0}
.legal-main table{background:transparent;border-radius:0;overflow:visible}
.legal-main th,.legal-main td{padding:0;border-bottom:0;width:auto;background:transparent;color:inherit;font-weight:inherit}
/* legal page layout — uses only existing tokens/classes above */
.legal-main{padding:clamp(2.2rem,5vw,3.5rem) 0 clamp(3rem,6vw,5rem)}
.legal-wrap{width:min(72ch,100% - 2.5rem);margin-inline:auto}
.legal-header{border-bottom:1.5px solid var(--ink);padding-bottom:1.6rem;margin-bottom:1.8rem}
.legal-header h1{font-size:clamp(2rem,4.4vw,3rem);font-stretch:90%}
.legal-updated{margin-top:.6rem;color:var(--muted);font-size:.98rem}
.legal-crumb{margin-top:0;margin-bottom:1.2rem;font-size:.92rem;color:var(--muted)}
.legal-crumb a{text-decoration:underline;text-underline-offset:3px;color:var(--ink);font-weight:600}
.in-short{background:var(--surface);border:1.5px solid var(--line);border-radius:14px;padding:1.3rem 1.5rem;margin-bottom:2rem}
.in-short h2{font-size:1.05rem;margin-bottom:.6rem}
.in-short ul{margin:0;padding-left:1.2rem;display:grid;gap:.5rem;color:var(--muted);font-size:.98rem}
.in-short li::marker{color:var(--interest)}
.toc{border:1.5px solid var(--line);border-radius:14px;padding:1.2rem 1.5rem;margin-bottom:2.2rem;background:var(--paper)}
.toc h2{font-size:1rem;margin-bottom:.7rem}
.toc ol{margin:0;padding-left:0;list-style:none;display:grid;gap:.4rem;font-size:.97rem}
.toc a{text-decoration:none;color:var(--ink)}
.toc a:hover{text-decoration:underline}
.legal-body section{padding:1.8rem 0;border-top:1.5px solid var(--line);scroll-margin-top:calc(env(safe-area-inset-top,0px) + 84px)}
.legal-body section:first-of-type{border-top:0;padding-top:0}
.legal-body h2{font-size:clamp(1.35rem,2.6vw,1.7rem);font-stretch:92%;margin-bottom:.9rem}
.legal-body h3{font-size:1.1rem;margin:1.2rem 0 .5rem}
.legal-body p{color:var(--ink);margin:0 0 .9rem}
.legal-body p:last-child{margin-bottom:0}
.legal-body ul,.legal-body ol.plain{margin:0 0 .9rem;padding-left:1.3rem;display:grid;gap:.5rem;color:var(--ink)}
.legal-body li::marker{color:var(--gold-text)}
.legal-body a{text-decoration:underline;text-underline-offset:3px;font-weight:600}
.legal-table-wrap{overflow-x:auto;-webkit-overflow-scrolling:touch;margin:1rem 0 1.3rem}
.legal-table{width:100%;min-width:560px;border-collapse:collapse;margin:0;font-size:.95rem}
.legal-table caption{text-align:left;color:var(--muted);font-size:.85rem;margin-bottom:.5rem}
.legal-table th,.legal-table td{text-align:left;padding:.65rem .8rem;border-bottom:1px solid var(--line);vertical-align:top}
.legal-table thead th{color:var(--muted);font-weight:600;font-size:.85rem;border-bottom:1.5px solid var(--ink)}
.legal-table tbody tr:last-child td{border-bottom:0}
.legal-note{font-size:.9rem;color:var(--muted)}
.back-to-top{display:inline-block;margin-top:2rem;font-weight:600}
@media print{
  .site-header,.menu-btn,footer,.toc,.back-to-top{display:none !important}
  .legal-wrap{width:100%}
}
