/* Rabin FinCalc. Theme with the --rfc-* custom properties (the Bricks Look controls set them). */

.rfc,
.rfc-hub,
.rfc-legal,
.rfc-lang,
.rfc-risk {
	--rfc-accent: #0f766e;
	--rfc-accent-2: #f59e0b;
	--rfc-accent-3: #6366f1;
	--rfc-bg: #ffffff;
	--rfc-surface: #f3f6f5;
	--rfc-text: #0f172a;
	--rfc-muted: #5b6475;
	--rfc-line: #e2e8ee;
	--rfc-radius: 20px;
	--rfc-pad: clamp(20px, 4vw, 40px);
	--rfc-font-num: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
.rfc--dark,
.rfc-hub--dark {
	--rfc-accent: #2dd4bf;
	--rfc-accent-2: #fbbf24;
	--rfc-accent-3: #a5b4fc;
	--rfc-bg: #0b1220;
	--rfc-surface: #131d31;
	--rfc-text: #e8eef8;
	--rfc-muted: #94a3b8;
	--rfc-line: #24324d;
}

.rfc,
.rfc-risk {
	--rfc-c1: color-mix(in srgb, var(--rfc-accent) 28%, var(--rfc-bg));
	--rfc-c2: var(--rfc-accent);
	--rfc-c3: var(--rfc-accent-2);
	--rfc-c4: var(--rfc-accent-3);
	container-type: inline-size;
	position: relative;
	box-sizing: border-box;
	width: 100%;
	padding: var(--rfc-pad);
	border: 1px solid var(--rfc-line);
	border-radius: var(--rfc-radius);
	background: var(--rfc-bg);
	color: var(--rfc-text);
	font-variant-numeric: tabular-nums;
	line-height: 1.5;
}
.rfc *,
.rfc *::before,
.rfc *::after { box-sizing: border-box; }

.rfc-c1 { --c: var(--rfc-c1); }
.rfc-c2 { --c: var(--rfc-c2); }
.rfc-c3 { --c: var(--rfc-c3); }
.rfc-c4 { --c: var(--rfc-c4); }

/* Heading */
.rfc__head { margin-bottom: clamp(20px, 3vw, 32px); }
.rfc__title { margin: 0 0 6px; font-size: clamp(1.4rem, 1.1rem + 1.2vw, 2rem); line-height: 1.15; letter-spacing: -0.01em; color: inherit; }
.rfc__desc { margin: 0; color: var(--rfc-muted); max-width: 60ch; }

/* Body: inputs beside results */
.rfc__body { display: grid; gap: clamp(20px, 3vw, 40px); grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); align-items: start; }
.rfc--stacked .rfc__body { grid-template-columns: minmax(0, 1fr); }
@container (max-width: 760px) {
	.rfc__body { grid-template-columns: minmax(0, 1fr); }
}

/* Inputs */
.rfc__form { display: grid; gap: 22px; margin: 0; }
.rfc__row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.rfc__label { font-size: 0.95rem; font-weight: 500; color: var(--rfc-text); }
.rfc__box {
	display: inline-flex; align-items: center; gap: 4px; flex: none;
	min-width: 7.5em; padding: 6px 12px;
	border: 1px solid var(--rfc-line); border-radius: 10px;
	background: var(--rfc-surface); color: var(--rfc-accent);
	font-weight: 600; transition: border-color .15s, box-shadow .15s;
}
.rfc__box:focus-within { border-color: var(--rfc-accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--rfc-accent) 22%, transparent); }
.rfc__field.is-out .rfc__box { border-color: #dc2626; }
.rfc__unit { color: var(--rfc-muted); font-weight: 500; font-size: 0.9em; }
.rfc__num {
	width: 100%; min-width: 0; padding: 0; margin: 0; border: 0; outline: 0; background: transparent;
	color: inherit; font: inherit; font-family: var(--rfc-font-num); text-align: right;
}
.rfc__field--money .rfc__box { min-width: 9.5em; }

/* The input is 32px tall so it is easy to grab on a phone; the visible track is a 6px line inside it */
.rfc__range {
	--rfc-fill: 50%;
	--rfc-track: linear-gradient(to right, var(--rfc-accent) var(--rfc-fill), var(--rfc-line) var(--rfc-fill));
	-webkit-appearance: none; appearance: none;
	display: block; width: 100%; height: 32px; margin: -10px 0 -16px; padding: 0; cursor: pointer;
	background: transparent; touch-action: pan-y;
}
.rfc__range:focus-visible { outline: 2px solid var(--rfc-accent); outline-offset: 2px; border-radius: 8px; }
.rfc__range::-webkit-slider-runnable-track { height: 6px; border-radius: 99px; background: var(--rfc-track); }
.rfc__range::-moz-range-track { height: 6px; border-radius: 99px; background: var(--rfc-line); }
.rfc__range::-moz-range-progress { height: 6px; border-radius: 99px; background: var(--rfc-accent); }
.rfc__range::-webkit-slider-thumb {
	-webkit-appearance: none; appearance: none;
	width: 22px; height: 22px; margin-top: -8px; border-radius: 50%;
	background: var(--rfc-bg); border: 6px solid var(--rfc-accent);
	box-shadow: 0 2px 6px rgb(0 0 0 / .18); transition: transform .15s;
}
.rfc__range::-moz-range-thumb {
	width: 12px; height: 12px; border-radius: 50%;
	background: var(--rfc-bg); border: 6px solid var(--rfc-accent); box-shadow: 0 2px 6px rgb(0 0 0 / .18);
}
.rfc__range:active::-webkit-slider-thumb { transform: scale(1.15); }

/* Results */
.rfc__results {
	display: grid; gap: 18px; padding: clamp(18px, 2.5vw, 28px);
	border-radius: calc(var(--rfc-radius) - 4px); background: var(--rfc-surface);
}
@container (min-width: 761px) {
	.rfc--split .rfc__results { position: sticky; top: 24px; }
}
.rfc__primary { display: grid; gap: 2px; padding-bottom: 16px; border-bottom: 1px solid var(--rfc-line); }
.rfc__primary-label { font-size: 0.9rem; color: var(--rfc-muted); }
.rfc__primary-value {
	font-family: var(--rfc-font-num); font-size: clamp(1.8rem, 1.3rem + 2vw, 2.6rem); font-weight: 700;
	line-height: 1.1; letter-spacing: -0.02em; color: var(--rfc-accent);
}
.rfc__list { display: grid; gap: 10px; margin: 0; }
.rfc__item { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.rfc__item dt { color: var(--rfc-muted); font-size: 0.92rem; }
.rfc__item dd { margin: 0; font-weight: 600; font-family: var(--rfc-font-num); text-align: right; white-space: nowrap; }

.rfc__split { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 18px; align-items: center; padding-top: 16px; border-top: 1px solid var(--rfc-line); }
.rfc__split[hidden] { display: none; }
.rfc__donut-svg { display: block; width: 100%; height: auto; }
.rfc__donut-track { fill: none; stroke: var(--rfc-line); stroke-width: 6; }
.rfc__donut-seg { fill: none; stroke: var(--c); stroke-width: 6; transition: stroke-dasharray .35s ease, stroke-dashoffset .35s ease; }
.rfc__legend { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; font-size: 0.88rem; }
.rfc__legend li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; column-gap: 8px; align-items: center; }
.rfc__legend-label { color: var(--rfc-muted); }
.rfc__legend-value { font-family: var(--rfc-font-num); }
.rfc__legend-pct { grid-column: 2 / 4; font-size: 0.8rem; color: var(--rfc-muted); }
.rfc__swatch { display: inline-block; width: 10px; height: 10px; border-radius: 3px; background: var(--c); flex: none; }

/* Growth chart */
.rfc__chart { position: relative; margin: clamp(24px, 3vw, 36px) 0 0; }
.rfc__chart[hidden] { display: none; }
.rfc__chart-svg svg { display: block; max-width: 100%; height: auto; overflow: visible; }
.rfc__grid { stroke: var(--rfc-line); stroke-width: 1; vector-effect: non-scaling-stroke; }
.rfc__axis { fill: var(--rfc-muted); font-size: 11px; font-family: var(--rfc-font-num); }
.rfc__bar { fill: var(--c); transition: opacity .15s; }
.rfc__hit { fill: transparent; }
.rfc__col:hover .rfc__bar { opacity: .82; }
.rfc__chart-legend { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 10px; font-size: 0.85rem; color: var(--rfc-muted); }
.rfc__chart-legend span,
.rfc__tip span { display: inline-flex; align-items: center; gap: 6px; }
.rfc__tip {
	position: absolute; top: 0; z-index: 2; transform: translateX(-50%);
	display: grid; gap: 3px; padding: 10px 12px; min-width: 170px;
	border: 1px solid var(--rfc-line); border-radius: 10px; background: var(--rfc-bg);
	box-shadow: 0 10px 30px rgb(0 0 0 / .12); font-size: 0.82rem; pointer-events: none;
}
.rfc__tip.is-right { transform: translateX(-100%); }
.rfc__tip b { margin-left: auto; padding-left: 12px; font-family: var(--rfc-font-num); }
.rfc__tip[hidden] { display: none; }

/* Year-by-year table */
.rfc__table { margin-top: 20px; border: 1px solid var(--rfc-line); border-radius: 12px; }
.rfc__table[hidden] { display: none; }
.rfc__table summary { padding: 12px 16px; cursor: pointer; font-weight: 600; font-size: 0.95rem; }
.rfc__table-wrap { max-height: 360px; overflow: auto; border-top: 1px solid var(--rfc-line); }
.rfc__table table { width: 100%; margin: 0; border-collapse: collapse; font-size: 0.88rem; font-family: var(--rfc-font-num); }
.rfc__table th,
.rfc__table td { padding: 9px 16px; border: 0; border-bottom: 1px solid var(--rfc-line); text-align: right; white-space: nowrap; }
.rfc__table th:first-child { text-align: left; }
.rfc__table thead th { position: sticky; top: 0; background: var(--rfc-surface); color: var(--rfc-muted); font-weight: 600; }
.rfc__table tbody tr:last-child > * { border-bottom: 0; }

/* Foot */
.rfc__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; margin-top: clamp(20px, 3vw, 32px); }
.rfc__cta {
	display: inline-flex; align-items: center; gap: 10px; padding: 13px 24px; border-radius: 999px;
	background: var(--rfc-accent); color: var(--rfc-bg); font-weight: 600; text-decoration: none;
	transition: transform .15s, box-shadow .15s;
}
.rfc__cta:hover { transform: translateY(-1px); box-shadow: 0 8px 20px color-mix(in srgb, var(--rfc-accent) 35%, transparent); color: var(--rfc-bg); }
.rfc__cta span { transition: transform .15s; }
.rfc__cta:hover span { transform: translateX(3px); }
.rfc__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.rfc__legal { flex: 1 1 320px; display: grid; gap: 6px; }
.rfc__disclaimer { flex: 1 1 320px; margin: 0; font-size: 0.78rem; line-height: 1.5; color: var(--rfc-muted); }
.rfc__reg { margin: 0; font-size: 0.78rem; line-height: 1.5; font-weight: 600; color: var(--rfc-text); }
.rfc__report {
	display: inline-flex; align-items: center; gap: 8px; padding: 12px 20px; border-radius: 999px; cursor: pointer;
	border: 1px solid var(--rfc-line); background: var(--rfc-bg); color: var(--rfc-text); font: inherit; font-weight: 600;
	transition: border-color .15s, color .15s;
}
.rfc__report:hover { border-color: var(--rfc-accent); color: var(--rfc-accent); }
.rfc__report:disabled { opacity: .6; cursor: progress; }
.rfc.is-locked .rfc__report { display: none; }
.rfc__noscript { margin: 12px 0 0; color: var(--rfc-muted); }

/* ------------------------------------------------------------------ Calculator Hub */

.rfc-hub { --rfc-hub-min: 240px; --rfc-hub-gap: 20px; --rfc-radius: 18px; width: 100%; color: var(--rfc-text); }
.rfc-hub__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(var(--rfc-hub-min), 100%), 1fr)); gap: var(--rfc-hub-gap); margin: 0; padding: 0; list-style: none; }
.rfc-hub__item { margin: 0; }
.rfc-hub__card {
	display: flex; flex-direction: column; gap: 10px; height: 100%; padding: 24px;
	border: 1px solid var(--rfc-line); border-radius: var(--rfc-radius); background: var(--rfc-bg);
	color: inherit; text-decoration: none; transition: border-color .2s, transform .2s, box-shadow .2s;
}
a.rfc-hub__card:hover,
a.rfc-hub__card:focus-visible { border-color: var(--rfc-accent); transform: translateY(-3px); box-shadow: 0 14px 30px color-mix(in srgb, var(--rfc-accent) 14%, transparent); }
.rfc-hub__icon {
	display: inline-grid; place-items: center; width: 48px; height: 48px; border-radius: 14px;
	background: color-mix(in srgb, var(--rfc-accent) 12%, transparent); color: var(--rfc-accent);
	transition: background .2s, color .2s;
}
a.rfc-hub__card:hover .rfc-hub__icon { background: var(--rfc-accent); color: var(--rfc-bg); }
.rfc-hub__title { margin: 4px 0 0; font-size: 1.1rem; line-height: 1.25; color: inherit; }
.rfc-hub__desc { margin: 0; color: var(--rfc-muted); font-size: 0.92rem; }
.rfc-hub__more { margin-top: auto; padding-top: 6px; color: var(--rfc-accent); font-weight: 600; font-size: 0.9rem; }
.rfc-hub--tiles .rfc-hub__card { flex-direction: row; align-items: center; padding: 16px 18px; }
.rfc-hub--tiles .rfc-hub__title { margin: 0; font-size: 1rem; }
.rfc-hub--tiles .rfc-hub__desc,
.rfc-hub--tiles .rfc-hub__more { display: none; }

/* ------------------------------------------------------------------ Lead capture */

/* Locked: the results stay hidden until the visitor has given their details */
.rfc__lock { display: none; }
.rfc.is-locked .rfc__results > :not(.rfc__lock),
.rfc.is-locked .rfc__chart,
.rfc.is-locked .rfc__table { display: none; }
.rfc.is-locked .rfc__lock { display: grid; gap: 6px; }
.rfc.is-unlocked .rfc__calc-row,
.rfc.is-unlocked .rfc__contact { display: none; }
.rfc__lock-label { font-size: 0.9rem; color: var(--rfc-muted); }
.rfc__lock-value { font-family: var(--rfc-font-num); font-size: clamp(1.8rem, 1.3rem + 2vw, 2.6rem); font-weight: 700; line-height: 1.1; color: var(--rfc-accent); filter: blur(7px); user-select: none; }
.rfc__lock-text { margin: 6px 0 0; color: var(--rfc-muted); font-size: 0.92rem; }
.rfc.is-gating .rfc__lock-label,
.rfc.is-gating .rfc__lock-value { display: none; }
.rfc.is-unlocked .rfc__results { animation: rfc-reveal .45s ease both; }
@keyframes rfc-reveal { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* Calculate button and shared form button */
.rfc__calc-row,
.rfc__lead-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.rfc__calc-row { margin-top: 10px; }
.rfc__lf-hint { grid-column: 1 / -1; margin: -6px 0 0; color: var(--rfc-muted); font-size: 0.8rem; }
.rfc__calc {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 28px;
	border: 0; border-radius: 12px; background: var(--rfc-accent); color: var(--rfc-bg);
	font: inherit; font-weight: 600; cursor: pointer; transition: transform .15s, box-shadow .15s, opacity .15s;
}
.rfc__calc:hover { transform: translateY(-1px); box-shadow: 0 8px 20px color-mix(in srgb, var(--rfc-accent) 30%, transparent); }
.rfc__calc:focus-visible { outline: 2px solid var(--rfc-accent); outline-offset: 3px; }
.rfc__calc:disabled { opacity: .6; cursor: wait; transform: none; }
.rfc__status { margin: 0; color: var(--rfc-muted); font-size: 0.88rem; }
.rfc__status:empty { display: none; }
.rfc__status.is-error { color: #dc2626; }

/* Contact fields */
.rfc__contact { min-width: 0; margin: 0 0 6px; padding: 0 0 22px; border: 0; border-bottom: 1px solid var(--rfc-line); }
.rfc__lf-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); gap: 14px 16px; }
.rfc__lf { display: grid; gap: 6px; margin: 0; }
.rfc__lf--message { grid-column: 1 / -1; }
.rfc__lf label { font-size: 0.9rem; font-weight: 500; color: var(--rfc-text); }
.rfc__opt { color: var(--rfc-muted); font-weight: 400; font-size: 0.85em; }
.rfc__lf input,
.rfc__lf textarea {
	width: 100%; min-height: 44px; margin: 0; padding: 10px 14px;
	border: 1px solid var(--rfc-line); border-radius: 10px; background: var(--rfc-bg); color: var(--rfc-text);
	font: inherit; font-size: 0.95rem; transition: border-color .15s, box-shadow .15s;
}
.rfc__lf textarea { min-height: 88px; resize: vertical; }
.rfc__lf input:focus,
.rfc__lf textarea:focus { border-color: var(--rfc-accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--rfc-accent) 20%, transparent); outline: 0; }
.rfc__consent { display: flex; align-items: flex-start; gap: 8px; margin-top: 12px; color: var(--rfc-muted); font-size: 0.85rem; cursor: pointer; }
.rfc__consent input { margin-top: 3px; accent-color: var(--rfc-accent); }
.rfc__hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.rfc__hello { margin: 0 0 6px; padding: 12px 16px; border-radius: 10px; background: color-mix(in srgb, var(--rfc-accent) 10%, transparent); color: var(--rfc-text); font-size: 0.92rem; }

/* Forms in the results panel and behind the button */
.rfc__lead { display: grid; gap: 14px; margin: 0; }
.rfc__lead[hidden] { display: none; }
.rfc__lead-title { margin: 0; font-size: 1.1rem; font-weight: 600; color: var(--rfc-text); }
.rfc__lead-text { margin: -8px 0 0; color: var(--rfc-muted); font-size: 0.9rem; }
.rfc__results .rfc__lf input,
.rfc__results .rfc__lf textarea { background: var(--rfc-bg); }
.rfc__results .rfc__lf-grid { grid-template-columns: minmax(0, 1fr); }
.rfc__enquiry { margin-top: 20px; padding: clamp(18px, 3vw, 28px); border: 1px solid var(--rfc-line); border-radius: calc(var(--rfc-radius) - 4px); background: var(--rfc-surface); animation: rfc-reveal .3s ease both; }
.rfc__enquiry[hidden] { display: none; }
.rfc__thanks { margin: 0; color: var(--rfc-text); font-weight: 500; }
button.rfc__cta { border: 0; font: inherit; font-weight: 600; cursor: pointer; }
.rfc__cta--wa { background: #25d366; color: #fff; }
.rfc__cta--wa:hover { color: #fff; box-shadow: 0 8px 20px rgb(37 211 102 / .35); }

/* ------------------------------------------------------------------ Hub: list and pills */

.rfc-hub--list .rfc-hub__grid { grid-template-columns: minmax(0, 1fr); gap: 0; border: 1px solid var(--rfc-line); border-radius: var(--rfc-radius); background: var(--rfc-bg); overflow: hidden; }
.rfc-hub--list .rfc-hub__item + .rfc-hub__item { border-top: 1px solid var(--rfc-line); }
.rfc-hub--list .rfc-hub__card { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; grid-template-rows: auto auto; column-gap: 16px; row-gap: 2px; align-items: center; padding: 16px 22px; border: 0; border-radius: 0; }
.rfc-hub--list .rfc-hub__icon { grid-row: 1 / 3; width: 44px; height: 44px; border-radius: 12px; }
.rfc-hub--list .rfc-hub__title { margin: 0; font-size: 1.02rem; }
.rfc-hub--list .rfc-hub__desc { grid-column: 2; font-size: 0.9rem; }
.rfc-hub--list .rfc-hub__more { grid-column: 3; grid-row: 1 / 3; margin: 0; padding: 0; font-size: 0.88rem; white-space: nowrap; }
.rfc-hub--list a.rfc-hub__card:hover,
.rfc-hub--list a.rfc-hub__card:focus-visible { transform: none; box-shadow: none; background: color-mix(in srgb, var(--rfc-accent) 6%, var(--rfc-bg)); }
@container (max-width: 520px) { .rfc-hub--list .rfc-hub__more { display: none; } }
.rfc-hub--list { container-type: inline-size; }

.rfc-hub--pills .rfc-hub__grid { display: flex; flex-wrap: wrap; gap: 10px; }
.rfc-hub--pills .rfc-hub__card { flex-direction: row; align-items: center; gap: 8px; padding: 8px 16px 8px 8px; border-radius: 999px; }
.rfc-hub--pills .rfc-hub__icon { width: 32px; height: 32px; border-radius: 50%; }
.rfc-hub--pills .rfc-hub__icon svg { width: 18px; height: 18px; }
.rfc-hub--pills .rfc-hub__title { margin: 0; font-size: 0.95rem; font-weight: 500; }
.rfc-hub--pills .rfc-hub__desc,
.rfc-hub--pills .rfc-hub__more { display: none; }
.rfc-hub--pills a.rfc-hub__card:hover { transform: translateY(-2px); }

@media (prefers-reduced-motion: reduce) {
	.rfc *, .rfc-hub * { transition: none !important; }
}

/* ------------------------------------------------------------------ Compliance block */

.rfc-legal { display: grid; gap: 8px; color: var(--rfc-muted); font-size: 0.85rem; line-height: 1.55; }
.rfc-legal p { margin: 0; }
.rfc-legal__logo { max-height: 44px; width: auto; margin-bottom: 4px; }
.rfc-legal__title { color: var(--rfc-text); font-weight: 700; font-size: 1rem; }
.rfc-legal__reg { color: var(--rfc-text); font-weight: 600; }
.rfc-legal a { color: inherit; }
.rfc-legal__warn { padding: 8px 12px; border: 1px dashed #d97706; border-radius: 8px; color: #92400e; background: #fffbeb; }

/* ------------------------------------------------------------------ Risk Profiler */

.rfc-risk *, .rfc-risk *::before, .rfc-risk *::after { box-sizing: border-box; }
.rfc-risk [hidden] { display: none !important; }
.rfc-risk__quiz { display: grid; gap: 18px; max-width: 720px; }
.rfc-risk:not(.is-js) .rfc-risk__progress, .rfc-risk:not(.is-js) .rfc-risk__nav { display: none; }
.rfc-risk__progress { display: grid; gap: 8px; }
.rfc-risk__count { font-size: 0.85rem; color: var(--rfc-muted); font-weight: 600; }
.rfc-risk__bar { display: block; height: 6px; border-radius: 99px; background: var(--rfc-surface); overflow: hidden; }
.rfc-risk__bar i { display: block; height: 100%; width: 0; background: var(--rfc-accent); border-radius: inherit; transition: width .3s ease; }
.rfc-risk__q { margin: 0; padding: 0; border: 0; min-width: 0; display: grid; gap: 14px; }
.rfc-risk__legend { padding: 0; margin: 0 0 4px; font-size: clamp(1.1rem, 1rem + .5vw, 1.35rem); font-weight: 650; line-height: 1.3; color: var(--rfc-text); }
.rfc-risk__opts { display: grid; gap: 10px; }
.rfc-risk__opt { position: relative; display: flex; align-items: center; gap: 12px; padding: 14px 16px; border: 1px solid var(--rfc-line); border-radius: 12px; background: var(--rfc-bg); cursor: pointer; transition: border-color .15s, background .15s; }
.rfc-risk__opt:hover { border-color: color-mix(in srgb, var(--rfc-accent) 50%, var(--rfc-line)); }
.rfc-risk__opt input { accent-color: var(--rfc-accent); width: 18px; height: 18px; margin: 0; flex: none; }
.rfc-risk__opt:has(input:checked) { border-color: var(--rfc-accent); background: color-mix(in srgb, var(--rfc-accent) 8%, var(--rfc-bg)); }
.rfc-risk__opt:has(input:focus-visible) { outline: 2px solid var(--rfc-accent); outline-offset: 2px; }
.rfc-risk__nav { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.rfc-risk__nav [data-next] { margin-left: auto; }
.rfc-risk__nav [data-next]:disabled { opacity: .45; cursor: not-allowed; }
.rfc-risk__back { padding: 10px 4px; border: 0; background: none; color: var(--rfc-muted); font: inherit; font-weight: 600; cursor: pointer; }
.rfc-risk__back:hover { color: var(--rfc-accent); }
.rfc-risk__gate { max-width: 560px; }
.rfc-risk__result { display: grid; gap: clamp(18px, 3vw, 28px); }
.rfc-risk__summary { display: grid; grid-template-columns: minmax(180px, 240px) minmax(0, 1fr); gap: clamp(16px, 3vw, 32px); align-items: center; padding: clamp(16px, 3vw, 24px); border-radius: calc(var(--rfc-radius) * .7); background: var(--rfc-surface); }
.rfc-risk__gauge-svg { display: block; width: 100%; height: auto; }
.rfc-risk__needle { stroke: var(--rfc-text); stroke-width: 4; stroke-linecap: round; transition: all .4s ease; }
.rfc-risk__hub { fill: var(--rfc-text); }
.rfc-risk__tick { fill: var(--rfc-muted); font-size: 11px; }
.rfc-risk__score { fill: var(--rfc-text); font-size: 22px; font-weight: 700; font-family: var(--rfc-font-num); }
.rfc-risk__about { display: grid; gap: 6px; }
.rfc-risk__name { margin: 0; font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2.1rem); font-weight: 700; line-height: 1.15; color: var(--rfc-accent); }
.rfc-risk__text { margin: 0; color: var(--rfc-text); }
.rfc-risk__mix { max-width: 520px; }
.rfc-risk__mix-title { margin: 0 0 4px; font-weight: 600; }
.rfc-risk__mix .rfc__split { border-top: 0; padding-top: 6px; }
@container (max-width: 520px) { .rfc-risk__summary { grid-template-columns: 1fr; justify-items: center; text-align: center; } .rfc-risk__gauge { width: min(240px, 100%); } }
.rfc-risk { container-type: inline-size; }

/* ------------------------------------------------------------------ Fund modules (1.2) */

.rfc-fund__top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px 24px; align-items: flex-start; }
.rfc-fund__amc { margin: 0; font-size: 0.85rem; font-weight: 600; color: var(--rfc-accent); }
.rfc-fund__name { margin: 2px 0 8px; font-size: clamp(1.15rem, 1rem + .6vw, 1.5rem); line-height: 1.25; color: var(--rfc-text); }
.rfc-fund__tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; }
.rfc-fund__tags span { padding: 3px 10px; border-radius: 99px; background: var(--rfc-surface); color: var(--rfc-muted); font-size: 0.78rem; }
.rfc-fund__tags span:empty { display: none; }
.rfc-fund__nav { display: grid; justify-items: end; text-align: right; }
.rfc-fund__nav span { font-size: 0.8rem; color: var(--rfc-muted); }
.rfc-fund__nav strong { font-size: 1.6rem; line-height: 1.2; font-family: var(--rfc-font-num); color: var(--rfc-text); }
.rfc-fund__nav small { font-size: 0.78rem; color: var(--rfc-muted); }
.rfc-fund__returns { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; margin: 20px 0 0; }
.rfc-fund__returns div { padding: 12px 14px; border-radius: 12px; background: var(--rfc-surface); }
.rfc-fund__returns dt { font-size: 0.78rem; color: var(--rfc-muted); }
.rfc-fund__returns dd { margin: 2px 0 0; font-size: 1.15rem; font-weight: 700; font-family: var(--rfc-font-num); color: var(--rfc-text); }
.rfc-fund__returns dd.is-up { color: #15803d; }
.rfc-fund__returns dd.is-down { color: #b91c1c; }
.rfc--dark .rfc-fund__returns dd.is-up { color: #4ade80; }
.rfc--dark .rfc-fund__returns dd.is-down { color: #f87171; }
.rfc-fund__periods { display: inline-flex; gap: 4px; margin-top: 18px; padding: 4px; border-radius: 10px; background: var(--rfc-surface); }
.rfc-fund__periods button { padding: 6px 12px; border: 0; border-radius: 8px; background: none; color: var(--rfc-muted); font: inherit; font-size: 0.85rem; font-weight: 600; cursor: pointer; }
.rfc-fund__periods button[aria-pressed="true"] { background: var(--rfc-bg); color: var(--rfc-text); box-shadow: 0 1px 3px rgb(0 0 0 / .08); }
.rfc-fund__chart { position: relative; margin: 14px 0 0; }
.rfc-fund__chart:empty { display: none; }
.rfc-fund__svg { display: block; width: 100%; height: auto; overflow: visible; }
.rfc-fund__line { fill: none; stroke: var(--c); stroke-width: 2; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.rfc-fund__area { fill: color-mix(in srgb, var(--c) 14%, transparent); stroke: none; }
.rfc-fund__guide { stroke: var(--rfc-muted); stroke-dasharray: 3 3; }
.rfc-fund__empty { margin: 0; color: var(--rfc-muted); }

.rfc-funds__bar { display: grid; gap: 12px; }
.rfc-funds__q, .rfc-bt__month, .rfc-bt__row select, .rfc-funds__filters select {
	width: 100%; min-height: 46px; padding: 0 14px; border: 1px solid var(--rfc-line); border-radius: 12px;
	background: var(--rfc-surface); color: var(--rfc-text); font: inherit; font-size: 1rem;
}
.rfc-funds__q:focus, .rfc-bt__month:focus, .rfc-bt__row select:focus, .rfc-funds__filters select:focus { outline: 2px solid var(--rfc-accent); outline-offset: 1px; }
.rfc-funds__filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; align-items: center; }
.rfc-funds__filters select { min-height: 40px; font-size: 0.9rem; }
.rfc-funds__check { display: flex; align-items: center; gap: 8px; font-size: 0.9rem; color: var(--rfc-muted); }
.rfc-funds__check input { accent-color: var(--rfc-accent); width: 16px; height: 16px; }
.rfc-funds__status { margin: 12px 0 0; min-height: 1.2em; color: var(--rfc-muted); font-size: 0.9rem; }
.rfc-funds__status:empty { margin: 0; min-height: 0; }
.rfc-funds__list { display: grid; gap: 6px; margin: 10px 0 0; padding: 0; list-style: none; max-height: 460px; overflow: auto; }
.rfc-funds__list[hidden], .rfc-funds__list:empty { display: none; }
.rfc-funds__list li { margin: 0; }
.rfc-funds__item {
	display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 16px; width: 100%; padding: 12px 14px; text-align: left;
	border: 1px solid var(--rfc-line); border-radius: 12px; background: var(--rfc-bg); color: var(--rfc-text); font: inherit; cursor: pointer;
}
.rfc-funds__item:hover, .rfc-funds__item:focus-visible { border-color: var(--rfc-accent); outline: 0; }
.rfc-funds__iname { font-weight: 600; }
.rfc-funds__imeta { grid-row: 2; font-size: 0.8rem; color: var(--rfc-muted); }
.rfc-funds__inav { grid-row: 1 / 3; grid-column: 2; display: grid; justify-items: end; align-content: center; font-family: var(--rfc-font-num); font-weight: 600; }
.rfc-funds__inav small { font-size: 0.75rem; font-weight: 400; color: var(--rfc-muted); }
.rfc-funds__card { margin-top: 20px; padding: clamp(16px, 3vw, 24px); border: 1px solid var(--rfc-line); border-radius: calc(var(--rfc-radius) * .7); }
.rfc-funds__card .rfc__actions { margin-top: 16px; }
.rfc-funds__list--pick { position: relative; max-height: 320px; }

.rfc-bt__form { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; align-items: end; }
.rfc-bt__fund { grid-column: 1 / -1; display: grid; gap: 8px; }
.rfc-bt__label, .rfc-bt__row label { font-size: 0.9rem; font-weight: 600; color: var(--rfc-text); }
.rfc-bt__chosen:empty { display: none; }
.rfc-bt__chosen { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; padding: 12px 14px; border-radius: 12px; background: var(--rfc-surface); }
.rfc-bt__chosen span { color: var(--rfc-muted); font-size: 0.85rem; }
.rfc-bt__chosen .rfc-risk__back { margin-left: auto; padding: 0; }
.rfc-bt__row { display: grid; gap: 8px; margin: 0; }
.rfc-bt__row .rfc__box { min-height: 46px; }
.rfc-bt__results { margin-top: 22px; display: grid; gap: 14px; }
.rfc-bt__results .rfc__primary { padding: 18px 20px; border-radius: calc(var(--rfc-radius) * .7); background: var(--rfc-surface); }
.rfc-bt__results .rfc__list { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.rfc-bt [hidden], .rfc-funds [hidden], .rfc-fund [hidden] { display: none !important; }

/* ------------------------------------------------------------------ Booking */

.rfc-book [hidden] { display: none !important; }
.rfc-book__pick { display: grid; gap: 22px; }
.rfc-book__h { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; font-weight: 650; color: var(--rfc-text); }
.rfc-book__h span { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--rfc-accent); color: var(--rfc-bg); font-size: 0.8rem; }
.rfc-book__days { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; scroll-snap-type: x proximity; }
.rfc-book__day {
	flex: none; display: grid; justify-items: center; gap: 2px; min-width: 72px; padding: 10px 8px; scroll-snap-align: start;
	border: 1px solid var(--rfc-line); border-radius: 12px; background: var(--rfc-bg); color: var(--rfc-text); font: inherit; cursor: pointer;
}
.rfc-book__day span, .rfc-book__day small { font-size: 0.75rem; color: var(--rfc-muted); }
.rfc-book__day b { font-size: 1.25rem; line-height: 1.2; font-family: var(--rfc-font-num); }
.rfc-book__day:hover { border-color: var(--rfc-accent); }
.rfc-book__day[aria-pressed="true"] { border-color: var(--rfc-accent); background: var(--rfc-accent); color: var(--rfc-bg); }
.rfc-book__day[aria-pressed="true"] span, .rfc-book__day[aria-pressed="true"] small { color: inherit; opacity: .85; }
.rfc-book__times { display: grid; gap: 14px; }
.rfc-book__group p { margin: 0 0 8px; font-size: 0.8rem; color: var(--rfc-muted); text-transform: uppercase; letter-spacing: .05em; }
.rfc-book__group div { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.rfc-book__time {
	padding: 10px 8px; border: 1px solid var(--rfc-line); border-radius: 10px; background: var(--rfc-bg); color: var(--rfc-text);
	font: inherit; font-weight: 600; font-variant-numeric: tabular-nums; cursor: pointer;
}
.rfc-book__time:hover, .rfc-book__time:focus-visible { border-color: var(--rfc-accent); color: var(--rfc-accent); outline: 0; }
.rfc-book__form { max-width: 620px; }
.rfc-book__chosen { margin: 0; padding: 12px 14px; border-radius: 12px; background: var(--rfc-surface); font-weight: 600; }
.rfc-book__types { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; margin: 0; padding: 0; border: 0; }
.rfc-book__types legend { margin-bottom: 8px; padding: 0; font-weight: 600; font-size: 0.9rem; }
.rfc-book__types .rfc-risk__opt { padding: 10px 12px; }
.rfc-book__done { display: grid; justify-items: center; gap: 8px; padding: clamp(18px, 4vw, 32px); text-align: center; border-radius: calc(var(--rfc-radius) * .7); background: var(--rfc-surface); }
.rfc-book__tick { display: grid; place-items: center; width: 56px; height: 56px; margin: 0; border-radius: 50%; background: var(--rfc-accent); color: var(--rfc-bg); font-size: 1.8rem; }
.rfc-book__done-title { margin: 0; font-size: 1.4rem; font-weight: 700; color: var(--rfc-text); }
.rfc-book__done-text { margin: 0; color: var(--rfc-text); }
.rfc-book__cal { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: 8px 0 0; }
.rfc-book__cal a { text-decoration: none; }
.rfc-book__done-note { margin: 0; font-size: 0.85rem; color: var(--rfc-muted); }

/* ------------------------------------------------------------------ Phones (1.2) */

/* Booking: the day strip scrolls on its own instead of widening the widget */
.rfc-book__pick { grid-template-columns: minmax(0, 1fr); }
.rfc-book__step, .rfc-book__days { min-width: 0; }
.rfc-book__days { -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; }
/* Comfortable tap targets */
.rfc-fund__periods button { min-height: 36px; padding: 6px 14px; }
.rfc-risk__back { display: inline-flex; align-items: center; min-height: 40px; }
.rfc-bt__chosen .rfc-risk__back { min-height: 32px; }
/* Fund card on a narrow column: the NAV sits under the name, left-aligned */
@container (max-width: 520px) {
	.rfc-fund__nav { justify-items: start; text-align: left; }
	.rfc-book__days { scrollbar-width: thin; }
}

/* Language Switcher ([fincalc_language]): pills like a light / dark toggle, a dropdown, or links */
.rfc-lang { --rfc-on-accent: #ffffff; display: inline-flex; flex-wrap: wrap; align-items: center; gap: 2px; box-sizing: border-box; color: var(--rfc-muted); font-size: 0.85rem; font-weight: 500; line-height: 1.2; }
.rfc-lang.rfc--dark { --rfc-on-accent: #0b1220; }
.rfc-lang__icon { flex: none; margin: 0 4px 0 8px; color: var(--rfc-muted); }
.rfc-lang__opt { padding: 6px 14px; border-radius: 999px; color: var(--rfc-muted); text-decoration: none; white-space: nowrap; transition: color .15s, background-color .15s; }
.rfc-lang__opt:hover { color: var(--rfc-text); }
.rfc-lang__opt:focus-visible, .rfc-lang summary:focus-visible { outline: 2px solid var(--rfc-accent); outline-offset: 2px; }
.rfc-lang__opt[aria-current] { color: var(--rfc-text); }

.rfc-lang--pills { padding: 3px; border: 1px solid color-mix(in srgb, var(--rfc-text) 20%, transparent); border-radius: 999px; background: color-mix(in srgb, var(--rfc-accent) 4%, transparent); }
.rfc-lang--pills .rfc-lang__opt[aria-current] { background: var(--rfc-accent); color: var(--rfc-on-accent); }

.rfc-lang--links { gap: 0; }
.rfc-lang--links .rfc-lang__icon { margin-left: 0; }
.rfc-lang--links .rfc-lang__opt { padding: 4px 8px; }
.rfc-lang--links .rfc-lang__opt + .rfc-lang__opt { border-left: 1px solid var(--rfc-line); border-radius: 0; }
.rfc-lang--links .rfc-lang__opt[aria-current] { color: var(--rfc-accent); font-weight: 700; }

.rfc-lang--dropdown { position: relative; display: inline-block; }
.rfc-lang--dropdown summary { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border: 1px solid color-mix(in srgb, var(--rfc-text) 20%, transparent); border-radius: 999px; color: var(--rfc-text); cursor: pointer; list-style: none; }
.rfc-lang--dropdown summary::-webkit-details-marker { display: none; }
.rfc-lang--dropdown .rfc-lang__icon { margin: 0; }
.rfc-lang__chev { transition: transform .15s; }
.rfc-lang--dropdown[open] .rfc-lang__chev { transform: rotate(180deg); }
.rfc-lang__menu { position: absolute; z-index: 50; top: calc(100% + 6px); left: 0; display: grid; min-width: 100%; padding: 6px; border: 1px solid var(--rfc-line); border-radius: 12px; background: var(--rfc-bg); box-shadow: 0 12px 28px rgb(15 23 42 / .14); }
.rfc-lang__menu .rfc-lang__opt { border-radius: 8px; }
.rfc-lang__menu .rfc-lang__opt:hover { background: var(--rfc-surface); }
.rfc-lang__menu .rfc-lang__opt[aria-current] { color: var(--rfc-accent); font-weight: 700; }
