/* Fee calculator block. Light only: it sits on the site theme, which has no dark mode. */
.cst-fc {
    --fc-surface: #ffffff;
    --fc-panel: #f6f6f4;
    --fc-line: #e4e3df;
    --fc-ink: #0b0b0b;
    --fc-ink-2: #52514e;
    --fc-ink-3: #6b6a66;
    --fc-accent: #1c5cab;
    --s1: #2a78d6; --s2: #eb6834; --s3: #1baf7a; --s4: #eda100; --s5: #e87ba4;
    position: relative;
    color: var(--fc-ink);
    margin: 2rem 0;
}
.cst-fc .visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.cst-fc-title { margin: 0 0 .35rem; }
.cst-fc-intro { color: var(--fc-ink-2); margin: 0 0 1.25rem; max-width: 60ch; }
.cst-fc-grid { display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); gap: 28px; align-items: start; }
@media (max-width: 860px) { .cst-fc-grid { grid-template-columns: minmax(0, 1fr); } }

/* controls */
.cst-fc-controls { background: var(--fc-panel); border: 1px solid var(--fc-line); border-radius: 14px; padding: 18px; display: flex; flex-direction: column; gap: 16px; }
.cst-fc-controls fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.cst-fc-controls legend { font-size: .95rem; font-weight: 600; margin-bottom: 8px; padding: 0; float: none; width: auto; }
.cst-fc-field label, .cst-fc-check label { font-size: .95rem; }
.cst-fc-field > label { display: block; font-weight: 600; margin-bottom: 6px; }
.cst-fc-field select { width: 100%; padding: 8px 10px; border: 1px solid #b9b8b3; border-radius: 8px; background: var(--fc-surface); color: var(--fc-ink); font: inherit; }
.cst-fc-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 4px; }
.cst-fc-row label { font-weight: 600; margin: 0; }
.cst-fc-num { display: inline-flex; align-items: center; gap: 2px; background: var(--fc-surface); border: 1px solid #b9b8b3; border-radius: 8px; padding: 0 8px; color: var(--fc-ink-2); }
.cst-fc-num:focus-within { outline: 2px solid var(--fc-accent); outline-offset: 1px; }
.cst-fc-num input { width: 5.5em; border: 0; background: transparent; padding: 6px 0; text-align: right; font: inherit; font-variant-numeric: tabular-nums; color: var(--fc-ink); -moz-appearance: textfield; }
.cst-fc-num input:focus { outline: none; }
.cst-fc-num input::-webkit-outer-spin-button, .cst-fc-num input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.cst-fc input[type="range"] { width: 100%; accent-color: var(--fc-accent); margin: 4px 0 0; min-height: 24px; }
.cst-fc-hint { font-size: .85rem; color: var(--fc-ink-3); margin: 4px 0 0; }
.cst-fc-checks { display: flex; flex-direction: column; gap: 8px; }
.cst-fc-check { display: flex; gap: 8px; align-items: flex-start; }
.cst-fc-check input { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--fc-accent); flex-shrink: 0; }
.cst-fc-creds { border-top: 1px solid var(--fc-line) !important; padding-top: 14px !important; display: flex; flex-direction: column; gap: 14px; }

.cst-fc-seg { display: flex; flex-wrap: wrap; gap: 0; }
.cst-fc-seg legend { width: 100%; }
.cst-fc-seg input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.cst-fc-seg label { flex: 1; text-align: center; padding: 9px 12px; border: 1px solid #b9b8b3; background: var(--fc-surface); cursor: pointer; font-weight: 600; color: var(--fc-ink-2); }
.cst-fc-seg label:first-of-type { border-radius: 8px 0 0 8px; }
.cst-fc-seg label:last-of-type { border-radius: 0 8px 8px 0; border-left: 0; }
.cst-fc-seg input:checked + label { background: var(--fc-ink); border-color: var(--fc-ink); color: #fff; }
.cst-fc-seg input:focus-visible + label { outline: 2px solid var(--fc-accent); outline-offset: 2px; }

/* results */
.cst-fc-out { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.cst-fc-hero { display: flex; flex-direction: column; }
.cst-fc-hero-label { font-size: .95rem; color: var(--fc-ink-2); font-weight: 600; }
.cst-fc-hero-value { font-size: clamp(2.6rem, 6vw, 3.4rem); font-weight: 700; line-height: 1.1; letter-spacing: -.01em; }
.cst-fc-hero-sub { color: var(--fc-ink-2); font-size: .95rem; white-space: pre-wrap; }
.cst-fc-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.cst-fc-tile { border: 1px solid var(--fc-line); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; }
.cst-fc-tile-label { font-size: .85rem; color: var(--fc-ink-2); }
.cst-fc-tile-value { font-size: 1.35rem; font-weight: 600; }

.cst-fc-fig { margin: 0; border: 1px solid var(--fc-line); border-radius: 14px; padding: 16px; }
.cst-fc-figtitle { font-weight: 600; margin-bottom: 12px; }
.cst-fc-bar { display: flex; gap: 2px; height: 28px; background: var(--fc-surface); }
.cst-fc-bar.is-empty { background: var(--fc-panel); border-radius: 4px; }
.cst-fc-seg-bar { min-width: 3px; flex-basis: 0; }
.cst-fc-seg-bar:first-child { border-radius: 4px 0 0 4px; }
.cst-fc-seg-bar:last-child { border-radius: 0 4px 4px 0; }
.cst-fc-seg-bar:only-child { border-radius: 4px; }
.cst-fc .s1 { background: var(--s1); } .cst-fc .s2 { background: var(--s2); } .cst-fc .s3 { background: var(--s3); }
.cst-fc .s4 { background: var(--s4); } .cst-fc .s5 { background: var(--s5); }
.cst-fc-legend { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 6px; }
.cst-fc-legend li { display: grid; grid-template-columns: 12px 1fr auto; gap: 10px; align-items: center; font-size: .95rem; }
.cst-fc-legend li.is-zero { color: var(--fc-ink-3); }
.cst-fc-sw { width: 12px; height: 12px; border-radius: 3px; }
.cst-fc-lg-value { font-variant-numeric: tabular-nums; white-space: pre; color: var(--fc-ink-2); }
.cst-fc-legend li:first-child .cst-fc-lg-label, .cst-fc-legend li:first-child .cst-fc-lg-value { font-weight: 600; color: var(--fc-ink); }
.cst-fc-note { font-size: .85rem; color: var(--fc-ink-3); margin: 10px 0 0; }
.cst-fc-note:empty { display: none; }

.cst-fc-line svg { display: block; overflow: visible; }
.cst-fc .cst-fc-gl { stroke: var(--fc-line); stroke-width: 1; }
.cst-fc .cst-fc-axis { fill: var(--fc-ink-3); font-size: 11px; font-variant-numeric: tabular-nums; }
.cst-fc .cst-fc-path { fill: none; stroke: var(--s1); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.cst-fc .cst-fc-area { fill: var(--s1); opacity: .1; }
.cst-fc .cst-fc-dot { fill: var(--s1); stroke: var(--fc-surface); stroke-width: 2; }
.cst-fc .cst-fc-dotlabel { fill: var(--fc-ink); font-size: 12px; font-weight: 600; }
.cst-fc .cst-fc-cross { stroke: var(--fc-ink-3); stroke-width: 1; }

.cst-fc-table summary { cursor: pointer; font-weight: 600; color: var(--fc-accent); text-decoration: underline; }
.cst-fc-tablewrap { overflow-x: auto; margin-top: 10px; }
.cst-fc-table table { width: 100%; border-collapse: collapse; font-size: .95rem; font-variant-numeric: tabular-nums; }
.cst-fc-table th, .cst-fc-table td { padding: 6px 10px; border-bottom: 1px solid var(--fc-line); text-align: right; white-space: nowrap; }
.cst-fc-table th[scope="row"], .cst-fc-table thead th:first-child { text-align: left; font-weight: 500; }
.cst-fc-table thead th { font-weight: 600; color: var(--fc-ink-2); }
.cst-fc-table tr.is-keep th, .cst-fc-table tr.is-keep td { font-weight: 700; }
.cst-fc-fine { margin: 0; padding-left: 1.1rem; font-size: .85rem; color: var(--fc-ink-3); display: grid; gap: 4px; }

.cst-fc-tip { position: absolute; z-index: 5; pointer-events: none; background: var(--fc-ink); color: #fff; font-size: .85rem; padding: 6px 9px; border-radius: 6px; white-space: nowrap; }
@media (prefers-reduced-motion: no-preference) { .cst-fc-seg-bar { transition: flex-grow .15s ease-out; } }

.cst-fc-table h3.cst-fc-figtitle { font: inherit; font-size: 1rem; font-weight: 700; margin: 0 0 4px; }


