/* Shared Current/Voltage Feedback layouts; approved fields, themes and actions. */
html:root body[data-caluler-category] .calculator:is(.current-feedback-calculator,.voltage-feedback-calculator) {
 display:grid!important; grid-template-columns:repeat(2,minmax(0,1fr))!important; align-items:center!important; gap:18px 24px!important;
}
:is(.current-feedback-calculator,.voltage-feedback-calculator) > :is(form,.ee-panel) { min-width:0; }
:is(.current-feedback-calculator,.voltage-feedback-calculator) .cf-help { margin:5px 0 0; color:var(--muted); font-size:12px; line-height:1.45; }
:is(.current-feedback-calculator,.voltage-feedback-calculator) { --cf-error:#B52E38; }
:is(html[data-theme="dark"],html.dark-mode) :is(.current-feedback-calculator,.voltage-feedback-calculator),body.dark-mode :is(.current-feedback-calculator,.voltage-feedback-calculator) { --cf-error:#FF929B; }
:is(.current-feedback-calculator,.voltage-feedback-calculator) :is(#cf-validation,#vf-validation) { margin:10px 0 0; color:var(--cf-error); font-size:13px; line-height:1.45; }
html:root body[data-caluler-category] .calculator:is(.current-feedback-calculator,.voltage-feedback-calculator) > :is(.result,.caluler-result-actionbar) {
 grid-column:1/-1!important; justify-self:start!important; box-sizing:border-box!important; width:var(--caluler-result-section-width,75%)!important; max-width:100%!important; min-width:0!important;
}
html:root body[data-caluler-category] .calculator:is(.current-feedback-calculator,.voltage-feedback-calculator) > .caluler-result-actionbar { margin-top:0!important; }
.cf-panel > h2 { margin-inline-end:0; }
.cf-panel .ee-svg { max-width:360px; margin:6px auto 0; }
.cf-panel .ee-svg text { font-size:15px; }
.cf-panel .ee-svg .cf-label { fill:var(--muted); font-size:13px; }
.cf-panel .ee-svg .cf-number { font-weight:650; fill:var(--ee-blue); font-variant-numeric:tabular-nums; }
.cf-panel .ee-svg .cf-output { fill:var(--ee-green); }
.cf-panel .ee-svg .cf-feedback { fill:var(--ee-amber); }
.cf-panel .cf-block { fill:var(--card); stroke:var(--ee-blue); stroke-width:1.5; }
.cf-panel .cf-beta-block { stroke:var(--ee-amber); }
.cf-panel .cf-path { fill:none; stroke:var(--ee-blue); stroke-width:2; stroke-linejoin:round; }
.cf-panel .cf-trace { fill:none; stroke:var(--ee-blue); stroke-width:3; stroke-linecap:round; stroke-dasharray:12 36; opacity:0; pointer-events:none; }
.cf-panel .cf-trace-feedback { stroke:var(--ee-amber); }
.cf-panel :is(#cf-model-note,#vf-model-note) { margin:6px 0 0; color:var(--muted); font-size:11.5px; line-height:1.45; }
.cf-panel[data-feedback-sign="regenerative-signs"] :is(#cf-model-note,#vf-model-note) { color:var(--ee-amber); }
:is(.current-feedback-calculator,.voltage-feedback-calculator) [hidden] { display:none!important; }
@media(max-width:900px) {
 html:root body[data-caluler-category] .calculator:is(.current-feedback-calculator,.voltage-feedback-calculator) { grid-template-columns:minmax(0,1fr)!important; }
}
@media(prefers-reduced-motion:reduce) { .cf-panel .cf-trace { display:none; } }
@media print { .cf-panel .cf-trace { display:none!important; } }

/* Compact fixed feedback model and calculated gain; this calculator only. */
:is(.current-feedback-calculator,.voltage-feedback-calculator) .cf-fixed-feedback { display:flex; flex-wrap:wrap; align-items:center; gap:4px 10px; margin:8px 0 0; }
:is(.current-feedback-calculator,.voltage-feedback-calculator) .cf-fixed-feedback > span { padding:3px 8px; border-radius:999px; color:var(--caluler-brand-primary); background:color-mix(in srgb,var(--caluler-brand-primary) 8%,transparent); font-size:12px; line-height:1.4; font-weight:600; }
:is(.current-feedback-calculator,.voltage-feedback-calculator) .cf-fixed-feedback > small { color:var(--muted); font-size:11.5px; line-height:1.4; }
:is(html[data-theme="dark"],html.dark-mode) :is(.current-feedback-calculator,.voltage-feedback-calculator) .cf-fixed-feedback > span,body.dark-mode :is(.current-feedback-calculator,.voltage-feedback-calculator) .cf-fixed-feedback > span { color:var(--caluler-brand-accent); background:color-mix(in srgb,var(--caluler-brand-accent) 8%,transparent); }
.cf-panel .cf-gain-summary { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:baseline; gap:2px 10px; padding:6px 8px; border-radius:8px; background:color-mix(in srgb,var(--ee-green) 6%,transparent); }
.cf-panel .cf-gain-summary > span { min-width:0; color:var(--muted); font-size:12px; line-height:1.4; }
.cf-panel .cf-gain-summary > strong { min-width:0; max-width:100%; color:var(--ee-green); font-size:17px; line-height:1.3; font-weight:650; font-variant-numeric:tabular-nums; overflow-wrap:anywhere; }
.cf-panel .cf-gain-summary > small { grid-column:1/-1; color:var(--muted); font-size:11.5px; line-height:1.4; }
.cf-panel .cf-path-output { stroke:var(--ee-green); }
.cf-panel .cf-path-feedback { stroke:var(--ee-amber); }
.cf-panel .cf-trace-output { stroke:var(--ee-green); }
.cf-panel .ee-svg .cf-positive,.cf-panel .ee-svg .cf-summing { fill:var(--ee-blue); font-weight:650; }
.cf-panel .ee-svg .cf-negative { fill:var(--ee-amber); font-weight:650; }
@media(max-width:430px) { .cf-panel .cf-gain-summary { grid-template-columns:minmax(0,1fr) minmax(0,auto); gap:2px 6px; } .cf-panel .cf-gain-summary > strong { font-size:15px; } }

/* Feedback diagram polish: readable text within a compact, export-safe SVG frame. */
.cf-panel:is(.vf-polished-diagram,.cf-polished-diagram) .ee-svg { max-width:320px; }
.cf-panel:is(.vf-polished-diagram,.cf-polished-diagram) .ee-svg .cf-label { font-size:14px; }
.cf-panel:is(.vf-polished-diagram,.cf-polished-diagram) .cf-path { stroke-opacity:.65; }
.cf-panel:is(.vf-polished-diagram,.cf-polished-diagram) .cf-trace { stroke-width:3.2; stroke-dasharray:10 38; }
@media print { .cf-panel:is(.vf-polished-diagram,.cf-polished-diagram) .cf-path { stroke-opacity:1; } }
