/* feerefund.net — light theme. Loaded after calc.css: sets the --m-* tokens calc.css uses,
   the base styles that used to come from mionto.css, and the feerefund-only components. */

:root {
    --m-bg: #f5f7fb;
    --m-bg-1: #f8fafc;
    --m-bg-2: #eef2f7;
    --m-bg-3: #e2e8f0;
    --m-surface: #ffffff;
    --m-border: rgba(15, 23, 42, 0.08);
    --m-border-bright: rgba(15, 23, 42, 0.14);
    --m-border-strong: rgba(15, 23, 42, 0.24);
    --m-text: #0f172a;
    --m-text-2: #475569;
    --m-muted: #64748b;
    --m-muted-2: #94a3b8;
    --m-blue: #2563eb;
    --m-blue-glow: rgba(37, 99, 235, 0.28);
    --m-blue-dim: #eaf1ff;
    --m-green: #059669;
    --m-green-glow: rgba(5, 150, 105, 0.25);
    --m-green-dim: #e7f8f1;
    --m-red: #dc2626;
    --m-red-dim: #fdecec;
    --m-yellow: #b45309;
    --m-yellow-dim: #fef6e4;
    --m-font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    --m-font-head: 'Manrope', 'Inter', system-ui, sans-serif;
    --m-font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
    --m-radius: 10px;
    --m-radius-lg: 18px;
    --fr-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 24px rgba(15, 23, 42, 0.06);
    --fr-shadow-hover: 0 2px 4px rgba(15, 23, 42, 0.05), 0 16px 40px rgba(15, 23, 42, 0.10);
    /* Accent per calculator (icon tiles). */
    --fr-c-blue: #2563eb;   --fr-c-blue-bg: #eaf1ff;
    --fr-c-teal: #0d9488;   --fr-c-teal-bg: #e3f7f4;
    --fr-c-violet: #7c3aed; --fr-c-violet-bg: #f1ebff;
    --fr-c-amber: #d97706;  --fr-c-amber-bg: #fef4e2;
    --fr-c-rose: #e11d48;   --fr-c-rose-bg: #fdebef;
    --fr-c-green: #059669;  --fr-c-green-bg: #e7f8f1;
    --fr-c-slate: #475569;  --fr-c-slate-bg: #eef2f7;
    color-scheme: light;
}

/* ---- base (replaces mionto.css on feerefund) ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    background: var(--m-bg); color: var(--m-text); font-family: var(--m-font);
    font-size: 15px; line-height: 1.55; -webkit-font-smoothing: antialiased; min-height: 100vh;
}
h1, h2, h3, .fr-head { font-family: var(--m-font-head); color: var(--m-text); }
a { color: var(--m-blue); }
img, svg { display: block; }
.ic { width: 20px; height: 20px; flex: none; }

.m-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    font-family: var(--m-font); font-size: 15px; font-weight: 700; line-height: 1.2;
    padding: 12px 20px; border-radius: 12px; border: 1px solid transparent;
    text-decoration: none; cursor: pointer; transition: background .15s, box-shadow .15s, transform .15s;
}
.m-btn .ic { width: 18px; height: 18px; }
.m-btn-blue { background: var(--m-blue); color: #fff; box-shadow: 0 6px 16px var(--m-blue-glow); }
.m-btn-blue:hover { background: #1d4ed8; transform: translateY(-1px); }
.m-btn-green { background: var(--m-green); color: #fff; box-shadow: 0 6px 16px var(--m-green-glow); }
.m-btn-green:hover { background: #047857; transform: translateY(-1px); }
.m-btn-ghost { background: var(--m-surface); color: var(--m-text); border-color: var(--m-border-bright); }
.m-btn-ghost:hover { border-color: var(--m-border-strong); }
.m-btn-sm { padding: 8px 14px; font-size: 13px; }
.m-btn-lg { padding: 15px 26px; font-size: 16px; }
:focus-visible { outline: 3px solid rgba(37, 99, 235, 0.45); outline-offset: 2px; }

/* ---- header ---- */
.m-topbar {
    position: sticky; top: 0; z-index: 100; display: flex; align-items: center; justify-content: space-between;
    gap: 12px; padding: 12px max(16px, calc((100% - 1140px) / 2));
    background: rgba(255, 255, 255, 0.85); backdrop-filter: saturate(180%) blur(14px); -webkit-backdrop-filter: saturate(180%) blur(14px);
    border-bottom: 1px solid var(--m-border);
}
.m-topbar-actions { display: flex; align-items: center; gap: 8px; }
.fr-brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.m-logo {
    display: inline-flex; align-items: center; gap: 8px; text-decoration: none; color: var(--m-text);
    font-family: var(--m-font-head); font-weight: 800; font-size: 19px; letter-spacing: -0.3px; font-style: normal;
}
.m-logo .dot { display: none; }
.fr-logo-mark {
    width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; color: #fff;
    background: linear-gradient(135deg, #2563eb, #059669); box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}
.fr-logo-mark .ic { width: 20px; height: 20px; }
.fr-by {
    font-size: 11px; font-weight: 600; letter-spacing: 0.02em; color: var(--m-muted); text-decoration: none;
    padding: 3px 9px; border: 1px solid var(--m-border-bright); border-radius: 999px; white-space: nowrap; background: var(--m-surface);
}
.fr-by:hover { color: var(--m-text); border-color: var(--m-border-strong); }
.fr-nav-link {
    display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; color: var(--m-text-2);
    text-decoration: none; padding: 8px 12px; border-radius: 10px;
}
.fr-nav-link:hover { background: var(--m-bg-2); color: var(--m-text); }
@media (max-width: 480px) {
    .m-topbar { padding: 10px 16px; }
    .m-logo { font-size: 17px; }
    .fr-logo-mark { width: 28px; height: 28px; border-radius: 9px; }
    .fr-by { font-size: 10px; padding: 2px 7px; }
    .fr-nav-link { font-size: 13px; padding: 6px 8px; }
}

/* ---- layout ---- */
.fr-container { max-width: 1140px; }
.fr-section { padding: 48px 0; }
.fr-section h2 { font-size: clamp(22px, 3.4vw, 28px); font-weight: 800; letter-spacing: -0.4px; }

/* ---- home hero ---- */
.fr-home-hero { padding: 56px 0 24px; }
.fr-home-hero .fr-container { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: 48px; align-items: center; }
.fr-home-hero h1 { font-size: clamp(34px, 5.4vw, 54px); font-weight: 800; letter-spacing: -1.2px; line-height: 1.08; margin-bottom: 18px; text-wrap: balance; }
.fr-home-hero h1 em { font-style: normal; background: linear-gradient(90deg, #2563eb, #059669); -webkit-background-clip: text; background-clip: text; color: transparent; }
.fr-home-hero .fr-hero-sub { font-size: 18px; color: var(--m-text-2); margin: 0 0 24px; max-width: 540px; }
.fr-hero-actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: flex-start; margin-bottom: 24px; }
.fr-trust { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 18px; }
.fr-trust li { display: inline-flex; align-items: center; gap: 7px; font-size: 14px; font-weight: 600; color: var(--m-text-2); }
.fr-trust .ic { width: 18px; height: 18px; color: var(--m-green); }
@media (max-width: 900px) {
    .fr-home-hero { padding: 36px 0 8px; }
    .fr-home-hero .fr-container { grid-template-columns: 1fr; gap: 32px; }
}

/* Illustration: a sample result card drawn with HTML/SVG (static example, not a calculation). */
.fr-demo { position: relative; padding: 12px; }
.fr-demo::before {
    content: ''; position: absolute; inset: 0; border-radius: 28px; z-index: 0;
    background: radial-gradient(circle at 30% 20%, rgba(37, 99, 235, 0.16), transparent 60%), radial-gradient(circle at 80% 80%, rgba(5, 150, 105, 0.16), transparent 55%);
}
.fr-demo-card {
    position: relative; z-index: 1; background: var(--m-surface); border: 1px solid var(--m-border); border-radius: 22px;
    box-shadow: var(--fr-shadow-hover); padding: 22px; max-width: 440px; margin: 0 auto;
}
.fr-demo-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.fr-demo-tag { font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--m-muted); }
.fr-demo-chip { font-size: 11px; font-weight: 700; color: var(--m-blue); background: var(--m-blue-dim); padding: 3px 9px; border-radius: 999px; }
.fr-demo-label { font-size: 13px; color: var(--m-text-2); }
.fr-demo-value { font-family: var(--m-font-head); font-size: 38px; font-weight: 800; letter-spacing: -1px; line-height: 1.1; margin: 2px 0 16px; }
.fr-demo-value small { font-size: 16px; font-weight: 700; color: var(--m-muted); letter-spacing: 0; }
.fr-demo-row { display: flex; align-items: center; gap: 18px; }
.fr-demo-legend { display: grid; gap: 8px; font-size: 13px; color: var(--m-text-2); }
.fr-demo-legend b { color: var(--m-text); font-variant-numeric: tabular-nums; }
.fr-demo-save {
    display: flex; align-items: center; gap: 10px; margin-top: 18px; padding: 12px 14px; border-radius: 14px;
    background: var(--m-green-dim); color: #065f46; font-size: 13px; font-weight: 600;
}
.fr-demo-save .ic { color: var(--m-green); }
.fr-demo-float {
    position: absolute; z-index: 2; right: -4px; bottom: -14px; background: var(--m-surface); border: 1px solid var(--m-border);
    border-radius: 14px; box-shadow: var(--fr-shadow); padding: 10px 12px; display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--m-text-2);
}
.fr-demo-float b { display: block; font-size: 15px; color: var(--m-text); font-family: var(--m-font-head); }
@media (max-width: 480px) { .fr-demo-float { display: none; } .fr-demo { padding: 0; } .fr-demo::before { display: none; } }

/* ---- donut chart (shares come from core; pathLength="100" keeps the markup math-free) ---- */
.fr-donut { width: 112px; height: 112px; flex: none; transform: rotate(-90deg); }
.fr-donut circle { fill: none; stroke-width: 7; }
.fr-donut .d-bg { stroke: var(--fr-c-violet); }
.fr-donut .d-fg { stroke: var(--fr-c-blue); stroke-linecap: butt; transition: stroke-dasharray .35s ease; }
.fr-swatch { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.fr-swatch-a { background: var(--fr-c-blue); }
.fr-swatch-b { background: var(--fr-c-violet); }

/* ---- catalog ---- */
.fr-catalog { padding-top: 40px; }
.fr-cat-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 4px; }
.fr-catalog h2 { margin-top: 40px; }
.fr-catalog h2:first-child { margin-top: 0; }
.fr-cat-sub { color: var(--m-muted); font-size: 15px; margin-top: 4px; }
.fr-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; margin-top: 18px; }
.fr-card {
    background: var(--m-surface); border: 1px solid var(--m-border); border-radius: var(--m-radius-lg); padding: 22px;
    box-shadow: var(--fr-shadow);
}
.fr-card-link { display: flex; flex-direction: column; gap: 10px; text-decoration: none; color: inherit; transition: box-shadow .18s, transform .18s, border-color .18s; }
.fr-card-link:hover { box-shadow: var(--fr-shadow-hover); transform: translateY(-3px); border-color: var(--m-border-bright); }
.fr-card h3 { font-size: 18px; font-weight: 800; letter-spacing: -0.2px; margin: 4px 0 0; }
.fr-card p { font-size: 14px; color: var(--m-text-2); line-height: 1.55; margin: 0; }
.fr-card-go { display: inline-flex; align-items: center; gap: 6px; margin-top: auto; padding-top: 6px; font-size: 14px; font-weight: 700; color: var(--m-blue); }
.fr-card-go .ic { width: 16px; height: 16px; transition: transform .18s; }
.fr-card-link:hover .fr-card-go .ic { transform: translateX(3px); }
.fr-card[data-featured] { background: linear-gradient(180deg, #fff, #f7faff); border-color: rgba(37, 99, 235, 0.22); }
.fr-badge { align-self: flex-start; font-size: 11px; font-weight: 700; letter-spacing: 0.04em; color: var(--m-blue); background: var(--m-blue-dim); padding: 3px 9px; border-radius: 999px; }

.fr-tile { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; flex: none; }
.fr-tile .ic { width: 22px; height: 22px; }
.fr-tile-blue { color: var(--fr-c-blue); background: var(--fr-c-blue-bg); }
.fr-tile-teal { color: var(--fr-c-teal); background: var(--fr-c-teal-bg); }
.fr-tile-violet { color: var(--fr-c-violet); background: var(--fr-c-violet-bg); }
.fr-tile-amber { color: var(--fr-c-amber); background: var(--fr-c-amber-bg); }
.fr-tile-rose { color: var(--fr-c-rose); background: var(--fr-c-rose-bg); }
.fr-tile-green { color: var(--fr-c-green); background: var(--fr-c-green-bg); }
.fr-tile-slate { color: var(--fr-c-slate); background: var(--fr-c-slate-bg); }

/* ---- calculator page ---- */
.fr-calc-page { padding-top: 28px; }
.fr-breadcrumb { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--m-muted); margin: 0 0 18px; }
.fr-breadcrumb a { color: var(--m-text-2); text-decoration: none; font-weight: 600; }
.fr-breadcrumb a:hover { color: var(--m-blue); }
.fr-calc-head { display: flex; gap: 16px; align-items: flex-start; margin-bottom: 24px; }
.fr-calc-head .fr-tile { width: 52px; height: 52px; border-radius: 15px; }
.fr-calc-head .fr-tile .ic { width: 26px; height: 26px; }
.fr-calc-page h1 { font-size: clamp(28px, 4.4vw, 40px); font-weight: 800; letter-spacing: -0.8px; line-height: 1.12; margin: 0 0 8px; text-wrap: balance; }
.fr-lead { color: var(--m-text-2); font-size: 17px; margin: 0; max-width: 680px; line-height: 1.55; }
@media (max-width: 520px) { .fr-calc-head .fr-tile { display: none; } .fr-lead { font-size: 15.5px; } }

/* The calculator: inputs card + results panel side by side. */
.calc-card { background: transparent; border: 0; padding: 0; }
.calc-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 420px); gap: 24px; align-items: start; }
@media (max-width: 900px) { .calc-grid { grid-template-columns: 1fr; gap: 16px; } .calc-card { padding: 0; } }
.calc-inputs {
    background: var(--m-surface); border: 1px solid var(--m-border); border-radius: var(--m-radius-lg);
    box-shadow: var(--fr-shadow); padding: 8px 24px 24px; gap: 0;
}
@media (max-width: 520px) { .calc-inputs { padding: 4px 16px 18px; } }
/* Pages not yet split into steps keep the plain field spacing. */
.calc-inputs:not(:has(> .calc-step)) { gap: 16px; padding: 24px; }
@media (max-width: 520px) { .calc-inputs:not(:has(> .calc-step)) { padding: 18px 16px; } }
.calc-results:not(:has(.calc-hero)) { padding: 20px; gap: 14px; }
.calc-results:not(:has(.calc-hero)) .calc-result { padding-bottom: 12px; border-bottom: 1px solid var(--m-border); }
.calc-step { display: flex; flex-direction: column; gap: 14px; padding: 20px 0; border-bottom: 1px solid var(--m-border); }
.calc-step:last-of-type { border-bottom: 0; padding-bottom: 4px; }
.calc-step-title { display: flex; align-items: center; gap: 10px; font-family: var(--m-font-head); font-size: 16px; font-weight: 800; color: var(--m-text); }
.calc-step-num {
    width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 800;
    color: var(--m-blue); background: var(--m-blue-dim); font-family: var(--m-font);
}
.calc-field label, .calc-label { font-size: 13.5px; font-weight: 600; color: var(--m-text); }
.calc-field input, .calc-field select, .calc-search {
    background: var(--m-surface); color: var(--m-text); font-size: 16px; font-weight: 500;
    border: 1.5px solid var(--m-border-bright); border-radius: 12px; padding: 11px 14px; min-height: 46px;
    transition: border-color .15s, box-shadow .15s;
}
.calc-field input:hover, .calc-field select:hover, .calc-search:hover { border-color: var(--m-border-strong); }
.calc-field input:focus, .calc-field select:focus, .calc-search:focus { outline: none; border-color: var(--m-blue); box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.14); }
.calc-search { background: var(--m-bg-1); font-size: 14px; min-height: 40px; }
.calc-field select { appearance: none; -webkit-appearance: none; padding-right: 38px; cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 12px center; background-size: 16px; }
.calc-note { font-size: 12.5px; color: var(--m-muted); }
.calc-toggle { border: 0; background: var(--m-bg-2); border-radius: 12px; padding: 4px; gap: 2px; }
.calc-toggle label { border-radius: 9px; padding: 8px 14px; font-size: 14px; font-weight: 600; color: var(--m-text-2); }
.calc-toggle label:has(input:checked) { background: var(--m-surface); color: var(--m-text); box-shadow: 0 1px 3px rgba(15, 23, 42, 0.12); }
.calc-toggle label { position: relative; }
.calc-toggle input { position: absolute; left: 0; top: 0; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.calc-toggle label:has(input:focus-visible) { outline: 3px solid rgba(37, 99, 235, 0.45); }
.calc-spec { border: 1.5px dashed var(--m-border-bright); border-radius: 12px; background: var(--m-bg-1); }

/* Quick-pick chips set an input to a typical value. */
.calc-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.calc-chip {
    font: inherit; font-size: 13px; font-weight: 600; color: var(--m-text-2); background: var(--m-surface);
    border: 1.5px solid var(--m-border-bright); border-radius: 999px; padding: 5px 12px; cursor: pointer; transition: all .15s;
}
.calc-chip:hover { border-color: var(--m-blue); color: var(--m-blue); }
.calc-chip[aria-pressed="true"] { background: var(--m-blue-dim); border-color: var(--m-blue); color: var(--m-blue); }

/* Results panel. */
.calc-results {
    position: sticky; top: 76px; gap: 0; padding: 0; overflow: hidden;
    background: var(--m-surface); border: 1px solid var(--m-border); border-radius: var(--m-radius-lg); box-shadow: var(--fr-shadow-hover);
}
@media (max-width: 900px) { .calc-results { position: static; } }
.calc-hero {
    padding: 22px 22px 20px; color: #fff;
    background: radial-gradient(circle at 100% 0%, rgba(255, 255, 255, 0.18), transparent 50%), linear-gradient(135deg, #1e3a8a, #2563eb);
}
.calc-hero .calc-result-label { color: rgba(255, 255, 255, 0.78); letter-spacing: 0.02em; text-transform: none; font-size: 14px; font-weight: 600; }
.calc-hero .calc-result-value { color: #fff; font-family: var(--m-font-head); font-size: clamp(34px, 5vw, 44px); letter-spacing: -1px; line-height: 1.1; }
.calc-hero-sub { font-size: 13.5px; color: rgba(255, 255, 255, 0.82); margin-top: 6px; }
.calc-result-value { font-family: var(--m-font-head); }
.calc-panel-body { padding: 18px 22px 20px; display: flex; flex-direction: column; gap: 16px; }
.calc-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.calc-tile { background: var(--m-bg-1); border: 1px solid var(--m-border); border-radius: 14px; padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; }
.calc-tile .calc-result-label { font-size: 12.5px; letter-spacing: 0; text-transform: none; color: var(--m-muted); font-weight: 600; }
.calc-tile .calc-result-value { font-size: 21px; }
.calc-breakdown { display: flex; align-items: center; gap: 18px; }
.calc-breakdown .fr-donut { width: 96px; height: 96px; }
.calc-breakdown-legend { display: grid; gap: 8px; font-size: 13.5px; color: var(--m-text-2); min-width: 0; }
.calc-breakdown-legend b { color: var(--m-text); font-variant-numeric: tabular-nums; }
.calc-breakdown-title { font-size: 12.5px; font-weight: 700; color: var(--m-muted); text-transform: uppercase; letter-spacing: 0.06em; }
.calc-math { border-top: 1px dashed var(--m-border-bright); padding-top: 12px; }
.calc-math > summary {
    display: flex; align-items: center; gap: 8px; cursor: pointer; list-style: none; font-size: 14px; font-weight: 700; color: var(--m-blue);
}
.calc-math > summary::-webkit-details-marker { display: none; }
.calc-math > summary .ic { width: 16px; height: 16px; transition: transform .15s; }
.calc-math[open] > summary .ic:last-child { transform: rotate(180deg); }
.calc-math-body { display: grid; gap: 10px; margin-top: 12px; }
.calc-math-body > div { display: grid; gap: 4px; }
.calc-math-label { font-size: 12px; font-weight: 700; color: var(--m-muted); }
.calc-formula { font-size: 12px; color: var(--m-text-2); background: var(--m-bg-1); border-radius: 8px; padding: 8px 10px; }
.calc-disclaimer { font-size: 12px; color: var(--m-muted); }
.calc-hero.calc-result { border-bottom: 0; }
.calc-tile.calc-result { padding-bottom: 12px; border-bottom: 1px solid var(--m-border); }

/* A changed number flashes briefly. */
@keyframes fr-flash { from { opacity: 0.35; transform: translateY(2px); } to { opacity: 1; transform: none; } }
.fr-flash { animation: fr-flash .28s ease-out; }
@media (prefers-reduced-motion: reduce) { .fr-flash { animation: none; } .m-btn, .fr-card-link { transition: none; } }

/* ---- rebate comparison (trading cost, exchange fee) ---- */
.calc-summary {
    display: flex; align-items: center; gap: 12px; margin: 16px 0 0; padding: 14px 18px; font-size: 15px; color: var(--m-text);
    background: var(--m-surface); border: 1px solid var(--m-border); border-radius: 14px 14px 0 0; border-bottom: 0;
}
.calc-summary::before {
    content: ''; flex: none; width: 34px; height: 34px; border-radius: 10px; background: var(--fr-c-green-bg) no-repeat center / 20px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23059669' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 8v13'/%3E%3Crect x='3' y='8' width='18' height='4' rx='1'/%3E%3Cpath d='M19 12v7a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2v-7'/%3E%3Cpath d='M12 8C10.5 4 7 4 7 6s3 2 5 2zM12 8c1.5-4 5-4 5-2s-3 2-5 2z'/%3E%3C/svg%3E");
}
.rebate-box { margin-top: 0; border: 1px solid var(--m-border); border-top: 1px dashed var(--m-border-bright); border-radius: 0 0 14px 14px; background: var(--m-surface); box-shadow: var(--fr-shadow); }
.calc-summary:empty + .rebate-box { border-radius: 14px; border-top-style: solid; margin-top: 16px; }
.rebate-box > summary { display: flex; align-items: center; gap: 8px; padding: 13px 18px; font-size: 15px; font-weight: 700; color: var(--m-green); }
.rebate-box > summary:hover { background: var(--m-bg-1); }
.rebate-body { max-width: none; padding: 6px 18px 20px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px 24px; align-items: start; }
.rebate-body > .calc-field { grid-column: 1; }
.rebate-body > .rebate-result { grid-column: 2; grid-row: 1 / span 2; }
.rebate-body > .m-btn, .rebate-body > .calc-cta-note { grid-column: 1; }
@media (max-width: 760px) { .rebate-body { grid-template-columns: 1fr; } .rebate-body > * { grid-column: 1 !important; grid-row: auto !important; } }
.rebate-result { background: var(--m-green-dim); border-radius: 14px; padding: 16px; display: grid; gap: 10px; }
.rebate-line { font-family: var(--m-font-head); font-size: 20px; color: #065f46; line-height: 1.3; }
.rebate-bar { height: 10px; border-radius: 999px; background: rgba(5, 150, 105, 0.16); overflow: hidden; }
.rebate-bar > span { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, #10b981, #059669); transition: width .35s ease; }
.rebate-bar-legend { display: flex; justify-content: space-between; font-size: 12px; color: #047857; font-weight: 600; }
.rebate-result .calc-formula { background: rgba(255, 255, 255, 0.7); }
.rebate-body .m-btn { align-self: start; justify-self: start; }

/* ---- explanation and FAQ ---- */
.calc-explain, .faq { margin-top: 40px; }
.calc-explain h2, .faq h2 { font-size: 24px; letter-spacing: -0.3px; margin-bottom: 16px; }
.calc-explain ol { list-style: none; padding: 0; counter-reset: step; display: grid; gap: 10px; }
.calc-explain ol > li {
    counter-increment: step; position: relative; padding: 14px 16px 14px 56px; background: var(--m-surface);
    border: 1px solid var(--m-border); border-radius: 14px; color: var(--m-text-2); line-height: 1.6;
}
.calc-explain ol > li::before {
    content: counter(step); position: absolute; left: 16px; top: 14px; width: 26px; height: 26px; border-radius: 50%;
    display: grid; place-items: center; font-size: 13px; font-weight: 800; color: var(--m-blue); background: var(--m-blue-dim);
}
.calc-explain > .calc-note { margin-top: 12px; }
.faq-item { background: var(--m-surface); border: 1px solid var(--m-border); border-radius: 14px; margin-bottom: 10px; transition: box-shadow .15s; }
.faq-item[open] { box-shadow: var(--fr-shadow); }
.faq-item summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; list-style: none; padding: 16px 18px; font-size: 15.5px; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
    content: ''; flex: none; width: 18px; height: 18px; transition: transform .15s;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat center / contain;
}
.faq-item[open] summary::after { transform: rotate(180deg); }
.faq-a { padding: 0 18px 18px; font-size: 15px; }

/* ---- bottom block on every page ---- */
.fr-lower { padding: 32px 0 64px; }
.fr-lower-card {
    position: relative; overflow: hidden; border: 0; border-radius: 26px; padding: 40px; color: #e2e8f0;
    background: radial-gradient(circle at 90% 10%, rgba(16, 185, 129, 0.35), transparent 45%), radial-gradient(circle at 0% 100%, rgba(37, 99, 235, 0.45), transparent 50%), #0f172a;
}
.fr-lower-card h2, .fr-lower-card h3 { color: #fff; }
.fr-lower-card h2 { font-size: clamp(24px, 3.6vw, 32px); letter-spacing: -0.5px; }
.fr-lower-lead { color: #cbd5e1; font-size: 16px; }
.fr-lower-grid { gap: 32px; }
.fr-lower .fr-steps li { color: #cbd5e1; }
.fr-lower .fr-steps strong { color: #fff; }
.fr-lower .fr-step-num { background: rgba(255, 255, 255, 0.1); border: 1px solid rgba(255, 255, 255, 0.18); color: #fff; font-family: var(--m-font); }
.fr-benefits { list-style: none; padding: 0; color: #cbd5e1; display: grid; gap: 10px; line-height: 1.5; }
.fr-benefits li { position: relative; padding-left: 28px; }
.fr-benefits li::before {
    content: ''; position: absolute; left: 0; top: 1px; width: 18px; height: 18px; border-radius: 50%; background: rgba(16, 185, 129, 0.22) no-repeat center / 12px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2334d399' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5 9-10'/%3E%3C/svg%3E");
}
.fr-lower .m-btn-blue { background: #fff; color: #0f172a; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25); }
.fr-lower .m-btn-blue:hover { background: #f1f5f9; }
.fr-lower .calc-cta-note { color: #94a3b8; }
@media (max-width: 760px) { .fr-lower-card { padding: 28px 20px; border-radius: 20px; } }

/* ---- footer ---- */
.fr-footer { background: var(--m-surface); border-top: 1px solid var(--m-border); padding: 40px 16px 32px; }
.fr-footer-inner { max-width: 900px; font-size: 13px; color: var(--m-text-2); }
.fr-footer-inner a, .fr-link-button { color: var(--m-text-2); }
.fr-footer-legal { font-size: 12px; color: var(--m-muted); }
.fr-footer-copy { color: var(--m-muted-2); font-size: 12px; }

/* ---- legal pages ---- */
.page-main h1 { font-family: var(--m-font-head); }
.fr-legal { background: var(--m-surface); border: 1px solid var(--m-border); border-radius: var(--m-radius-lg); padding: 32px; margin-top: 32px; margin-bottom: 32px; }
@media (max-width: 520px) { .fr-legal { padding: 20px 16px; } }

/* ---- consent banner ---- */
.consent-banner { background: var(--m-surface); border-top: 1px solid var(--m-border-bright); box-shadow: 0 -8px 24px rgba(15, 23, 42, 0.08); }
.consent-banner .m-btn { font-size: 14px; padding: 9px 16px; }

/* ---- phones: main result pinned to the bottom until the results panel is reached ---- */
.calc-sticky {
    position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 90; display: flex; align-items: center; gap: 10px;
    padding: 12px 16px; border-radius: 16px; text-decoration: none; color: #fff;
    background: linear-gradient(135deg, #1e3a8a, #2563eb); box-shadow: 0 10px 30px rgba(15, 23, 42, 0.3);
}
.calc-sticky-label { font-size: 13px; color: rgba(255, 255, 255, 0.8); flex: 1 1 auto; min-width: 0; }
.calc-sticky-value { font-family: var(--m-font-head); font-size: 19px; font-weight: 800; }
.calc-sticky-go { display: inline-flex; align-items: center; gap: 2px; font-size: 13px; font-weight: 700; }
.calc-sticky-go .ic { width: 16px; height: 16px; }
@media (min-width: 901px) { .calc-sticky { display: none !important; } }
.calc-results { scroll-margin-top: 72px; }
/* ---- secondary result group inside the panel; key/value line ---- */
.calc-subpanel { display: grid; gap: 10px; padding-top: 14px; border-top: 1px dashed var(--m-border-bright); }
.calc-kv { font-size: 14px; color: var(--m-text-2); }
.calc-kv b { color: var(--m-text); font-variant-numeric: tabular-nums; }
/* ---- risk/reward bar and win-rate meter ---- */
.calc-optional { font-weight: 500; color: var(--m-muted); font-size: 13px; }
.calc-value-sm { font-size: 17px !important; }
.calc-tile-wide { grid-column: 1 / -1; }
.calc-rr { display: grid; gap: 6px; }
.calc-rr-bar { display: flex; height: 14px; border-radius: 999px; overflow: hidden; background: var(--m-green-dim); }
.calc-rr-risk { background: linear-gradient(90deg, #f87171, #dc2626); width: 0; transition: width .35s ease; }
.calc-rr-reward { flex: 1; background: linear-gradient(90deg, #059669, #34d399); }
.calc-rr-labels { display: flex; font-size: 12px; color: var(--m-muted); font-variant-numeric: tabular-nums; }
.calc-rr-labels > span:first-child { flex: none; }
.calc-rr-labels > span:nth-child(2) { flex: 1; }
.calc-rr-labels b { color: var(--m-text-2); font-weight: 600; white-space: nowrap; }
.calc-meter-wrap { display: grid; gap: 6px; }
.calc-meter { position: relative; height: 10px; border-radius: 999px; background: var(--m-bg-2); }
.calc-meter-fill { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, #fbbf24, #d97706); transition: width .35s ease; }
.calc-meter-mark { position: absolute; top: -5px; width: 4px; height: 20px; margin-left: -2px; border-radius: 2px; background: var(--m-text); transition: left .35s ease; }
.calc-meter-legend { display: flex; justify-content: space-between; font-size: 12px; color: var(--m-muted); }
.calc-pos { color: var(--m-green) !important; }
.calc-neg { color: var(--m-red) !important; }
/* ---- comparison bars (drawdown, futures, sizing) ---- */
.calc-hero-rose { background: radial-gradient(circle at 100% 0%, rgba(255, 255, 255, 0.18), transparent 50%), linear-gradient(135deg, #881337, #e11d48); }
.calc-hero-green { background: radial-gradient(circle at 100% 0%, rgba(255, 255, 255, 0.18), transparent 50%), linear-gradient(135deg, #065f46, #059669); }
.calc-hero-violet { background: radial-gradient(circle at 100% 0%, rgba(255, 255, 255, 0.18), transparent 50%), linear-gradient(135deg, #4c1d95, #7c3aed); }
.calc-bars { display: grid; gap: 10px; }
.calc-bar-row { display: grid; grid-template-columns: 96px minmax(0, 1fr) auto; align-items: center; gap: 10px; font-size: 13px; color: var(--m-text-2); }
.calc-bar-row b { color: var(--m-text); font-variant-numeric: tabular-nums; min-width: 64px; text-align: right; }
.calc-bar-track { height: 12px; border-radius: 999px; background: var(--m-bg-2); overflow: hidden; }
.calc-bar-fill { display: block; height: 100%; width: 0; border-radius: inherit; transition: width .35s ease; }
.calc-bar-red { background: linear-gradient(90deg, #f87171, #dc2626); }
.calc-bar-green { background: linear-gradient(90deg, #34d399, #059669); }
.calc-bar-blue { background: linear-gradient(90deg, #60a5fa, #2563eb); }
.calc-bar-violet { background: linear-gradient(90deg, #a78bfa, #7c3aed); }
.calc-bar-amber { background: linear-gradient(90deg, #fbbf24, #d97706); }
/* ---- line chart (compound growth) ---- */
.calc-chart { margin: 0; display: grid; gap: 8px; }
.calc-chart svg { width: 100%; height: 140px; overflow: visible; }
.calc-chart-area { fill: rgba(5, 150, 105, 0.14); }
.calc-chart-line { fill: none; stroke: #059669; stroke-width: 2.5; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.calc-chart-base { fill: none; stroke: #94a3b8; stroke-width: 2; stroke-dasharray: 5 4; vector-effect: non-scaling-stroke; }
.calc-chart figcaption { display: flex; gap: 16px; font-size: 12.5px; color: var(--m-muted); }
.calc-sw-green { background: #059669; }
.calc-sw-dash { background: repeating-linear-gradient(90deg, #94a3b8 0 4px, transparent 4px 6px); }
.calc-warning { color: #92400e; background: var(--m-yellow-dim); border: 1px solid #fde68a; border-radius: 12px; }
/* ---- price ladder (average entry price) ---- */
.calc-ladder { position: relative; height: 64px; margin: 4px 10px 0; }
.calc-ladder:empty { display: none; }
.calc-ladder::before { content: ''; position: absolute; left: -10px; right: -10px; top: 30px; height: 4px; border-radius: 2px; background: var(--m-bg-2); }
.calc-ladder-dot { position: absolute; top: 25px; width: 14px; height: 14px; margin-left: -7px; border-radius: 50%; background: #0d9488; border: 2px solid #fff; box-shadow: 0 1px 3px rgba(15, 23, 42, 0.25); }
.calc-ladder-mark { position: absolute; top: 0; bottom: 0; width: 0; border-left: 2px solid var(--m-blue); }
.calc-ladder-mark span { position: absolute; top: 0; transform: translateX(-50%); white-space: nowrap; font-size: 11.5px; font-weight: 700; color: var(--m-blue); background: var(--m-surface); padding: 0 4px; }
.calc-ladder-mark.is-now { border-left-style: dashed; border-color: var(--m-text-2); }
.calc-ladder-mark.is-now span { top: auto; bottom: 0; color: var(--m-text-2); }
.dca-row { grid-template-columns: 1fr 1fr 40px; }
.dca-remove { height: 46px; border-radius: 12px; border: 1.5px solid var(--m-border-bright); background: var(--m-surface); }.calc-tile-sub { font-size: 12.5px; color: var(--m-muted); font-variant-numeric: tabular-nums; }
.calc-bar-fill.calc-pos { background: linear-gradient(90deg, #34d399, #059669); }
.calc-bar-fill.calc-neg { background: linear-gradient(90deg, #f87171, #dc2626); }
.calc-hero .calc-result-value.calc-pos, .calc-hero .calc-result-value.calc-neg, .calc-sticky .calc-pos, .calc-sticky .calc-neg { color: #fff !important; }
/* ---- language menu (no JS: <details>) ---- */
.fr-lang { position: relative; }
.fr-lang > summary {
    list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; padding: 7px 10px; border-radius: 10px;
    font-size: 13px; font-weight: 700; color: var(--m-text-2); border: 1px solid var(--m-border-bright); background: var(--m-surface);
}
.fr-lang > summary::-webkit-details-marker { display: none; }
.fr-lang > summary::before {
    content: ''; width: 16px; height: 16px; background: no-repeat center / contain;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23475569' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M3 12h18M12 3a14 14 0 0 1 0 18M12 3a14 14 0 0 0 0 18'/%3E%3C/svg%3E");
}
.fr-lang > summary:hover { border-color: var(--m-border-strong); color: var(--m-text); }
.fr-lang-menu {
    position: absolute; right: 0; top: calc(100% + 6px); z-index: 120; min-width: 160px; display: grid; padding: 6px;
    background: var(--m-surface); border: 1px solid var(--m-border); border-radius: 12px; box-shadow: var(--fr-shadow-hover);
}
.fr-lang-menu a { padding: 8px 10px; border-radius: 8px; font-size: 14px; color: var(--m-text); text-decoration: none; }
.fr-lang-menu a:hover { background: var(--m-bg-2); }
.fr-lang-menu a[aria-current="page"] { font-weight: 700; color: var(--m-blue); background: var(--m-blue-dim); }
@media (max-width: 480px) { .fr-nav-link { display: none; } .fr-lang > summary { padding: 6px 8px; } }