/* Fivestones Wealth Planner – styled to sit inside the fivestones.co.za theme (Qi + Elementor).
   Everything is scoped to .fswp so the theme is not affected. */
.fswp {
  --navy: #2E375E; --gold: #D99100; --gold-d: #B87A00; --slate: #455B6B; --cream: #E3DAC9;
  --text: #6B6767; --muted: #7A7A7A; --line: #E7E3DC; --soft: #F7F5F1; --bad: #B4442E; --good: #2F7A4F;
  font-family: Mulish, "Muli", Arial, sans-serif; font-size: 15px; line-height: 1.6; color: var(--text);
  max-width: 1300px; margin: 0 auto; box-sizing: border-box; -webkit-font-smoothing: antialiased;
}
.fswp *, .fswp *::before, .fswp *::after { box-sizing: border-box; }
.fswp h2, .fswp h3 { font-family: inherit; margin: 0; letter-spacing: 0; text-transform: none; }
.fswp p { margin: 0; }
.fswp button { font-family: inherit; cursor: pointer; text-transform: none; letter-spacing: 0; }

/* Layout */
.fswp-grid { display: grid; grid-template-columns: minmax(300px, 380px) 1fr; gap: 28px; align-items: start; }
.fswp-inputs { min-width: 0; }
.fswp-results { display: grid; gap: 22px; min-width: 0; }
.fswp-card { background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 26px; box-shadow: 0 10px 30px -18px rgba(46, 55, 94, .25); }
.fswp-h { color: var(--navy); font-size: 20px; font-weight: 700; line-height: 1.3; }
.fswp-sub { color: var(--muted); font-size: 14px; margin-top: 4px !important; }
.fswp-card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }

/* Inputs */
.fswp-field { padding: 16px 0 6px; border-bottom: 1px solid var(--line); }
.fswp-field:last-child { border-bottom: 0; }
.fswp-field-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.fswp-field label { color: var(--navy); font-weight: 600; font-size: 14.5px; line-height: 1.3; margin: 0; }
.fswp-field label small { display: block; color: var(--muted); font-weight: 400; font-size: 12.5px; margin-top: 2px; }
.fswp-num { display: flex; align-items: center; border: 1px solid #D9D4CA; border-radius: 5px; background: #fff; padding: 0 10px; height: 40px; flex: 0 0 auto; transition: border-color .15s, box-shadow .15s; }
.fswp-num:focus-within { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(217, 145, 0, .15); }
.fswp-num span { color: var(--muted); font-size: 14px; font-weight: 600; }
.fswp .fswp-num input[type="text"] { border: 0 !important; outline: 0; background: transparent !important; box-shadow: none !important; height: 38px; margin: 0; padding: 0 4px !important;
  font: 700 15px/1 Mulish, Arial, sans-serif; color: var(--navy); text-align: right; width: 120px; min-width: 0; }
.fswp-num.int input[type="text"] { width: 44px; }
.fswp-num.pct input[type="text"] { width: 52px; }

.fswp input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 22px; margin: 8px 0 0; background: transparent; padding: 0; border: 0; --p: 50%; }
.fswp input[type="range"]::-webkit-slider-runnable-track { height: 4px; border-radius: 2px; background: linear-gradient(to right, var(--gold) var(--p), #E5E0D6 var(--p)); }
.fswp input[type="range"]::-moz-range-track { height: 4px; border-radius: 2px; background: #E5E0D6; }
.fswp input[type="range"]::-moz-range-progress { height: 4px; border-radius: 2px; background: var(--gold); }
.fswp input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 2px solid var(--gold); margin-top: -7px; box-shadow: 0 1px 4px rgba(0, 0, 0, .2); }
.fswp input[type="range"]::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 2px solid var(--gold); box-shadow: 0 1px 4px rgba(0, 0, 0, .2); }
.fswp input[type="range"]:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

.fswp-assume { margin-top: 14px; border-top: 1px solid var(--line); }
.fswp-assume > summary, .fswp-tablebox > summary { list-style: none; cursor: pointer; display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 14px 0 4px; }
.fswp-assume > summary::-webkit-details-marker, .fswp-tablebox > summary::-webkit-details-marker { display: none; }
.fswp-assume > summary span { color: var(--navy); font-weight: 700; font-size: 15px; }
.fswp-assume > summary small, .fswp-tablebox > summary small { color: var(--gold-d); font-size: 13px; font-weight: 600; }
.fswp-assume > summary small::after, .fswp-tablebox > summary small::after { content: " +"; }
.fswp-assume[open] > summary small::after, .fswp-tablebox[open] > summary small::after { content: " −"; }

.fswp-check { display: flex !important; gap: 10px; align-items: flex-start; margin: 14px 0 0; font-size: 13.5px; line-height: 1.5; color: var(--text); font-weight: 400; cursor: pointer; }
.fswp .fswp-check input[type="checkbox"] { width: 18px; height: 18px; margin: 1px 0 0; flex: 0 0 18px; accent-color: var(--gold); }
.fswp-check a { color: var(--navy); text-decoration: underline; }
.fswp-link { background: none !important; border: 0 !important; padding: 0 !important; margin-top: 18px; color: var(--slate) !important; font-size: 13px !important; text-decoration: underline; }
.fswp-link:hover { color: var(--gold-d) !important; }

/* Hero */
.fswp-hero { position: relative; overflow: hidden; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 30px 34px; border-radius: 6px; color: var(--cream);
  background: linear-gradient(120deg, rgba(46, 55, 94, .97), rgba(69, 91, 107, .93)), var(--navy); }
.fswp-hero::after { content: ""; position: absolute; right: -60px; top: -60px; width: 240px; height: 240px; border-radius: 50%; border: 1px solid rgba(227, 218, 201, .12); pointer-events: none; }
.fswp-eyebrow { font-size: 12px; font-weight: 700; letter-spacing: 1.4px; text-transform: uppercase; color: var(--cream); opacity: .85; }
.fswp-big { font-size: clamp(34px, 4.6vw, 52px); font-weight: 800; color: #fff; line-height: 1.1; margin: 8px 0 6px; letter-spacing: -.5px; font-variant-numeric: tabular-nums; }
.fswp-note { font-size: 14px; color: var(--cream); }
.fswp-note b { color: #fff; }
.fswp-pill { display: inline-flex; align-items: center; gap: 8px; margin-top: 16px; padding: 6px 14px; border-radius: 30px; font-size: 13px; font-weight: 700; background: rgba(255, 255, 255, .1); }
.fswp-pill i { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.fswp-pill.ok { color: #A9E2C2; }
.fswp-pill.short { color: #F7B9A9; }
.fswp-ring { position: relative; width: 150px; height: 150px; flex: 0 0 150px; }
.fswp-ring svg { width: 100%; height: 100%; }
.fswp-ring circle { fill: none; stroke-width: 9; }
.fswp-ring .bg { stroke: rgba(227, 218, 201, .18); }
.fswp-ring .fg { stroke: var(--gold); stroke-linecap: round; stroke-dasharray: 326.73; transition: stroke-dashoffset .5s ease; }
.fswp-ring-txt { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.fswp-ring-txt b { font-size: 32px; font-weight: 800; color: #fff; line-height: 1; }
.fswp-ring-txt span { font-size: 12px; letter-spacing: 1.2px; text-transform: uppercase; color: var(--cream); margin-top: 6px; }

/* KPIs */
.fswp-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.fswp-kpi { background: var(--soft); border-radius: 6px; padding: 16px 16px 14px 18px; position: relative; }
.fswp-kpi::before { content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 3px; background: var(--gold); border-radius: 0 2px 2px 0; }
.fswp-kpi .k { color: var(--slate); font-size: 13px; font-weight: 700; }
.fswp-kpi .v { color: var(--navy); font-size: 21px; font-weight: 800; margin-top: 4px; line-height: 1.25; font-variant-numeric: tabular-nums; }
.fswp-kpi .v small { font-size: 13px; font-weight: 600; color: var(--muted); }
.fswp-kpi .s { color: var(--muted); font-size: 12.5px; margin-top: 4px; line-height: 1.4; }
.fswp-band { position: relative; height: 6px; border-radius: 3px; background: #E5E0D6; margin: 9px 0 2px; }
.fswp-band i { position: absolute; left: 10%; width: 60%; top: 0; bottom: 0; background: rgba(217, 145, 0, .35); border-radius: 3px; }
.fswp-band b { position: absolute; top: 50%; width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%; background: var(--gold); border: 2px solid #fff; box-shadow: 0 0 0 1px var(--gold); transition: left .3s; }
.fswp-band b.bad { background: var(--bad); box-shadow: 0 0 0 1px var(--bad); }

/* Segmented toggle */
.fswp-seg { display: inline-flex; border: 1px solid #D9D4CA; border-radius: 5px; overflow: hidden; }
.fswp .fswp-seg button { background: #fff; border: 0; padding: 8px 14px; font-size: 13px; font-weight: 600; color: var(--slate); line-height: 1.2; border-radius: 0; }
.fswp .fswp-seg button + button { border-left: 1px solid #D9D4CA; }
.fswp .fswp-seg button[aria-pressed="true"] { background: var(--navy); color: #fff; }

/* Chart */
.fswp-chart svg { width: 100%; height: auto; display: block; overflow: visible; }
.fswp-chart .grid line { stroke: #EEEAE3; stroke-width: 1; }
.fswp-chart .grid line.base { stroke: #CFC9BE; }
.fswp-chart text { font: 600 11px Mulish, Arial, sans-serif; fill: #8C8780; }
.fswp-chart rect.pre { fill: var(--slate); }
.fswp-chart rect.post { fill: var(--gold); }
.fswp-chart rect:hover { opacity: .8; }
.fswp-chart .mark { stroke: var(--navy); stroke-width: 1.2; stroke-dasharray: 4 3; }
.fswp-chart .mark.bad { stroke: var(--bad); }
.fswp-chart .mark-t { fill: var(--navy); font-weight: 700; font-size: 12px; }
.fswp-chart .mark-t.bad { fill: var(--bad); }
.fswp-legend { display: flex; gap: 20px; margin-top: 10px; font-size: 13px; color: var(--muted); }
.fswp-legend span { display: inline-flex; align-items: center; gap: 7px; }
.fswp-legend i { width: 12px; height: 12px; border-radius: 2px; display: inline-block; }
.fswp-legend i.slate { background: var(--slate); }
.fswp-legend i.gold { background: var(--gold); }

/* Levers */
.fswp-levers { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin-top: 16px; }
.fswp-lever { border: 1px solid var(--line); border-top: 3px solid var(--gold); border-radius: 0 0 6px 6px; padding: 16px; display: flex; flex-direction: column; }
.fswp-lever .k { color: var(--slate); font-size: 13px; font-weight: 700; }
.fswp-lever .v { color: var(--navy); font-size: 19px; font-weight: 800; margin: 4px 0 2px; font-variant-numeric: tabular-nums; }
.fswp-lever .d { color: var(--muted); font-size: 12.5px; line-height: 1.45; flex: 1; }
.fswp .fswp-lever button { align-self: flex-start; margin-top: 12px; background: #fff; color: var(--navy); border: 1px solid var(--navy); border-radius: 4px; padding: 6px 16px; font-size: 13px; font-weight: 700; line-height: 1.3; transition: background .15s, color .15s; }
.fswp .fswp-lever button:hover { background: var(--navy); color: #fff; }
.fswp-lever.na { border-top-color: #CFC9BE; }
.fswp-lever.na .v { color: var(--muted); font-size: 16px; }
.fswp-gapnote { margin-top: 16px !important; font-size: 14px; }
.fswp-gapnote b { color: var(--navy); }

/* Table */
.fswp-tablebox > summary { padding: 0; align-items: center; }
.fswp-scroll { overflow-x: auto; margin-top: 16px; -webkit-overflow-scrolling: touch; }
.fswp-table { width: 100%; border-collapse: collapse; font-size: 13.5px; font-variant-numeric: tabular-nums; margin: 0; border: 0; }
.fswp-table th { background: var(--navy); color: #fff; font-weight: 700; padding: 10px 12px; text-align: right; white-space: nowrap; border: 0; }
.fswp-table td { padding: 7px 12px; text-align: right; border: 0; border-bottom: 1px solid #F0EDE7; white-space: nowrap; color: var(--text); }
.fswp-table th:first-child, .fswp-table td:first-child { text-align: left; font-weight: 700; color: var(--navy); }
.fswp-table tr.ret td { background: #FBEFD6; font-weight: 700; }
.fswp-table td.neg { color: var(--bad); }

/* Lead capture */
.fswp-book { display: flex; align-items: center; justify-content: space-between; gap: 32px; margin-top: 56px; padding: 32px; border-radius: 6px; background: #333A5C; }
.fswp-book h3 { color: #fff; font-size: 22px; font-weight: 600; line-height: 1.3; margin: 0 0 10px; }
.fswp-book p { color: #D5D7E0; font-size: 15px; line-height: 1.6; margin: 0; max-width: 540px; }
.fswp .fswp-book-btn { flex: 0 0 auto; background: var(--gold); color: #fff; font-weight: 700; font-size: 15px; padding: 14px 26px; border-radius: 5px; text-decoration: none; transition: background .15s; }
.fswp .fswp-book-btn:hover, .fswp .fswp-book-btn:focus { background: var(--gold-d); color: #fff; }
.fswp-book + .fswp-lead { margin-top: 32px; }
@media (max-width: 700px) { .fswp-book { flex-direction: column; align-items: flex-start; gap: 20px; padding: 26px 22px; margin-top: 40px; } .fswp .fswp-book-btn { width: 100%; text-align: center; box-sizing: border-box; } }
.fswp-lead { display: grid; grid-template-columns: 1fr 1.1fr; gap: 48px; align-items: center; margin-top: 56px; padding: 52px; border-radius: 6px; background: var(--cream); position: relative; overflow: hidden; }
.fswp-lead .fswp-eyebrow { color: var(--gold-d); opacity: 1; }
.fswp-lead h2 { color: var(--navy); font-size: clamp(26px, 3vw, 36px); font-weight: 600; line-height: 1.15; margin-top: 10px; }
.fswp-rule { display: block; width: 146px; height: 2px; background: var(--gold); margin: 18px 0; }
.fswp-lead-copy p { color: #5D5A57; }
.fswp-lead-copy ul { list-style: none; margin: 18px 0 0; padding: 0; }
.fswp-lead-copy li { position: relative; padding-left: 26px; margin: 8px 0; color: var(--navy); font-weight: 600; }
.fswp-lead-copy li::before { content: ""; position: absolute; left: 0; top: 6px; width: 12px; height: 12px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 4px rgba(217, 145, 0, .18); }
.fswp-formbox { background: #fff; border-radius: 6px; padding: 30px; box-shadow: 0 18px 40px -24px rgba(46, 55, 94, .45); }
.fswp-form { display: grid; gap: 14px; }
.fswp-form[hidden], .fswp-done[hidden] { display: none; }
.fswp-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.fswp-form label { display: grid; gap: 6px; font-size: 14px; font-weight: 600; color: var(--navy); margin: 0; }
.fswp-form label em { font-style: normal; font-weight: 400; color: var(--muted); }
.fswp .fswp-form input[type="text"], .fswp .fswp-form input[type="email"], .fswp .fswp-form input[type="tel"] {
  width: 100%; height: 46px; margin: 0; padding: 0 14px; border: 1px solid #D9D4CA; border-radius: 5px; background: #fff; box-shadow: none;
  font: 400 15px Mulish, Arial, sans-serif; color: var(--navy); transition: border-color .15s, box-shadow .15s; }
.fswp .fswp-form input:focus { outline: 0; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(217, 145, 0, .15); }
.fswp .fswp-form input.invalid { border-color: var(--bad); }
.fswp-form .fswp-check { font-weight: 400; color: var(--text); font-size: 13px; margin-top: 2px; }
.fswp-check input.invalid + span { color: var(--bad); }
.fswp-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.fswp .fswp-btn { display: inline-flex; justify-content: center; align-items: center; background: var(--gold); color: #fff; border: 0; border-radius: 5px; padding: 15px 46px; font: 700 15px Mulish, Arial, sans-serif; text-decoration: none; transition: background .2s; }
.fswp .fswp-btn:hover { background: var(--gold-d); color: #fff; }
.fswp .fswp-btn:disabled { opacity: .7; cursor: wait; }
.fswp-msg { font-size: 13.5px; min-height: 1px; }
.fswp-msg.err { color: var(--bad); font-weight: 600; }
.fswp-done { text-align: center; padding: 10px 0; }
.fswp-done h3 { color: var(--navy); font-size: 22px; font-weight: 700; margin: 14px 0 8px; }
.fswp-done p { margin-bottom: 22px !important; }
.fswp-done-icon { width: 56px; height: 56px; border-radius: 50%; background: var(--gold); margin: 0 auto; display: grid; place-items: center; }
.fswp-done-icon svg { width: 28px; height: 28px; fill: none; stroke: #fff; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }

.fswp-disclaimer { font-size: 12.5px; color: var(--muted); margin: 26px 0 0 !important; line-height: 1.6; }

/* Mobile summary bar (only shown on small screens) */
.fswp-mini { display: none; }

@media (max-width: 1100px) {
  .fswp-kpis { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  .fswp-grid { grid-template-columns: 1fr; }
  .fswp-lead { grid-template-columns: 1fr; gap: 28px; padding: 32px 22px; margin-top: 40px; }
  .fswp-mini { display: flex; align-items: center; justify-content: space-between; gap: 10px; position: sticky; top: 0; z-index: 20; margin: 0 0 14px;
    background: var(--navy); color: var(--cream); border-radius: 6px; padding: 8px 8px 8px 16px; font-size: 13.5px; box-shadow: 0 10px 24px -14px rgba(0, 0, 0, .5); white-space: nowrap; }
  .fswp-mini b { color: #fff; }
  .fswp-mini a { background: var(--gold); color: #fff; text-decoration: none; font-weight: 700; border-radius: 4px; padding: 7px 12px; font-size: 13px; }
}
@media (max-width: 600px) {
  .fswp { font-size: 14.5px; }
  .fswp-card { padding: 20px 18px; }
  .fswp-hero { flex-direction: column; align-items: flex-start; padding: 24px 22px; }
  .fswp-ring { width: 120px; height: 120px; flex-basis: 120px; align-self: center; }
  .fswp-ring-txt b { font-size: 26px; }
  .fswp-kpis { gap: 10px; }
  .fswp-kpi { padding: 14px 12px 12px 14px; }
  .fswp-kpi .v { font-size: 17px; }
  .fswp-row { grid-template-columns: 1fr; }
  .fswp-formbox { padding: 22px 18px; }
  .fswp .fswp-btn { width: 100%; }
  .fswp-num { height: 38px; }
  .fswp .fswp-num input[type="text"] { width: 104px; }
  .fswp-chart text { font-size: 15px; }
  .fswp-chart .mark-t { font-size: 15px; }
}
@media (prefers-reduced-motion: reduce) { .fswp * { transition: none !important; } }
