/* E-Commerce Fraud page: selection and decision figures (stagea, stageb, lag, capacity, cost).
   Everything is scoped to body.pc-fr .fr-rounds (the renderer adds fr-rounds to its own .fr-body). */

/* palette: dark is the base theme, light is set on html[data-theme="light"] */
body.pc-fr .fr-rounds { --fr-pass:#81c784; --fr-hurt:#ef9a9a; --fr-bag:#8fb8e8; position:relative; min-width:0; }
html[data-theme="light"] body.pc-fr .fr-rounds { --fr-pass:#2e7d32; --fr-hurt:#c62828; --fr-bag:#3b6ea8; }

body.pc-fr .fr-rounds .fr-controls { display:flex; flex-wrap:wrap; align-items:center; gap:10px 22px; margin:0 0 14px; }
body.pc-fr .fr-rounds .fr-pills { display:flex; flex-wrap:wrap; gap:8px; }
html body.pc-fr .fr-rounds .fr-pills button { margin:0; min-height:34px; padding:6px 14px; border-radius:999px; cursor:pointer;
  font:500 12.5px/1.4 'DM Mono',ui-monospace,monospace; text-align:left;
  border:1px solid var(--pc-line) !important; background:transparent !important; color:var(--pc-muted) !important; box-shadow:none !important;
  transition:color .15s,border-color .15s; }
html body.pc-fr .fr-rounds .fr-pills button:hover { color:var(--pc-text) !important; border-color:var(--pc-muted) !important; background:transparent !important; }
html body.pc-fr .fr-rounds .fr-pills button[aria-pressed="true"] { color:var(--pc-text) !important; border-color:var(--pc-accent) !important; background:var(--pc-chip) !important; }
html body.pc-fr .fr-rounds .fr-pills button:focus-visible { outline:2px solid var(--pc-text); outline-offset:2px; }

body.pc-fr .fr-rounds .fr-view { min-width:0; }
body.pc-fr .fr-rounds .fr-svg { display:block; width:100%; height:auto; overflow:visible; }

/* text inside the charts (sizes are viewBox units = CSS px; never changed in media queries) */
body.pc-fr .fr-rounds .fr-svg text { font:500 12.5px 'DM Mono',ui-monospace,monospace; fill:var(--pc-muted); }
body.pc-fr .fr-rounds .fr-svg text.t-b { fill:var(--pc-text); }
body.pc-fr .fr-rounds .fr-svg text.t-hi { fill:var(--pc-accent); font-weight:600; }
body.pc-fr .fr-rounds .fr-svg text.t-tick { fill:var(--pc-muted); }
body.pc-fr .fr-rounds .fr-svg text.t-sub { fill:var(--pc-muted); letter-spacing:.06em; text-transform:uppercase; }
body.pc-fr .fr-rounds .fr-svg text.t-val { fill:var(--pc-text); font-size:12.5px; }
/* values sit over grid and zero lines: halo in the page background */
body.pc-fr .fr-rounds .fr-svg text.t-val, body.pc-fr .fr-rounds .fr-svg text.t-hi { paint-order:stroke; stroke:var(--pc-bg); stroke-width:4px; stroke-linejoin:round; }
body.pc-fr .fr-rounds .fr-svg .grid { stroke:var(--pc-line); stroke-width:1; }
body.pc-fr .fr-rounds .fr-svg .axis { stroke:var(--pc-muted); stroke-width:1; }
body.pc-fr .fr-rounds .fr-svg .fr-zero { stroke:var(--pc-text); stroke-width:1.4; }

/* bars */
body.pc-fr .fr-rounds .fr-svg .fr-bar { fill:var(--pc-muted); }
body.pc-fr .fr-rounds .fr-svg .fr-bar.fr-pass { fill:var(--fr-pass); }
body.pc-fr .fr-rounds .fr-svg .fr-bar.fr-no { fill:none; stroke:var(--pc-muted); stroke-width:1.5; }
body.pc-fr .fr-rounds .fr-svg .fr-bar.fr-p { fill:var(--pc-muted); }
body.pc-fr .fr-rounds .fr-svg .fr-bar.fr-amt { fill:var(--pc-accent); }
body.pc-fr .fr-rounds .fr-svg .fr-bar.fr-m1 { fill:var(--pc-text); }
body.pc-fr .fr-rounds .fr-svg .fr-bar.fr-m2 { fill:var(--pc-text); opacity:.72; }
body.pc-fr .fr-rounds .fr-svg .fr-bar.fr-m3 { fill:var(--pc-text); opacity:.5; }
body.pc-fr .fr-rounds .fr-svg .fr-break { stroke:var(--pc-bg); stroke-width:3; }

/* dumbbell */
body.pc-fr .fr-rounds .fr-svg .fr-stem { stroke:var(--pc-muted); stroke-width:2.5; }
body.pc-fr .fr-rounds .fr-svg .fr-dot { stroke:var(--pc-bg); stroke-width:1.5; }
body.pc-fr .fr-rounds .fr-svg .fr-dot.fr-ref { fill:var(--pc-bg); stroke:var(--pc-muted); stroke-width:2; }
body.pc-fr .fr-rounds .fr-svg .fr-dot.fr-cand { fill:var(--pc-accent); }

/* lines: final muted solid, final_lag14 muted dashed, refit_lag14 accent dashed */
body.pc-fr .fr-rounds .fr-svg .fr-line { stroke-width:2.2; stroke-linejoin:round; }
body.pc-fr .fr-rounds .fr-svg .fr-line.fr-l-final { stroke:var(--pc-muted); }
body.pc-fr .fr-rounds .fr-svg .fr-line.fr-l-refit { stroke:var(--pc-accent); }
body.pc-fr .fr-rounds .fr-svg .fr-line.fr-dash { stroke-dasharray:6 4; }
body.pc-fr .fr-rounds .fr-svg .fr-pt { stroke:var(--pc-bg); stroke-width:1.2; }
body.pc-fr .fr-rounds .fr-svg .fr-pt.fr-l-final { fill:var(--pc-muted); }
body.pc-fr .fr-rounds .fr-svg .fr-pt.fr-l-refit { fill:var(--pc-accent); }

/* hover and focus backdrops */
body.pc-fr .fr-rounds .fr-svg .fr-hitbg { fill:var(--pc-chip); stroke:none; opacity:0; pointer-events:all; }
body.pc-fr .fr-rounds .fr-svg .fr-hit:hover .fr-hitbg { opacity:.7; }
body.pc-fr .fr-rounds .fr-svg g[tabindex] { outline:none; }
body.pc-fr .fr-rounds .fr-svg g[tabindex]:focus-visible .fr-hitbg { opacity:1; stroke:var(--pc-text); stroke-width:1.5; }
body.pc-fr .fr-rounds .fr-svg .fr-hit { cursor:default; }

/* sentence under a chart (Stage B verdict, lag note) */
body.pc-fr .fr-rounds .fr-sentence { margin:14px 0 0; font-size:15px; line-height:1.55; color:var(--pc-text); max-width:760px; }
body.pc-fr .fr-rounds .fr-sentence:empty { display:none; }
body.pc-fr .fr-rounds .fr-passed { font-weight:600; color:var(--fr-pass); }
body.pc-fr .fr-rounds .fr-failed { font-weight:600; color:var(--pc-muted); }

/* tooltip: one per figure, no shadow */
body.pc-fr .fr-rounds .fr-tip { position:absolute; z-index:5; max-width:300px; pointer-events:none; padding:8px 11px;
  border:1px solid var(--pc-muted); border-radius:6px; background:var(--pc-bg); color:var(--pc-text);
  font:400 13px/1.45 'DM Sans',system-ui,sans-serif; box-shadow:none; }
body.pc-fr .fr-rounds .fr-tip[hidden] { display:none; }
body.pc-fr .fr-rounds .fr-tip span { display:block; }
body.pc-fr .fr-rounds .fr-tip .fr-tip-h { font-weight:600; }
body.pc-fr .fr-rounds .fr-tip .fr-tip-l { color:var(--pc-muted); font-family:'DM Mono',ui-monospace,monospace; font-size:12px; }

@media (prefers-reduced-motion:no-preference) {
  body.pc-fr .fr-rounds .fr-view .fr-svg { animation:fr-rounds-in .2s ease-out; }
  @keyframes fr-rounds-in { from { opacity:0; } to { opacity:1; } }
}
@media (prefers-reduced-motion:reduce) {
  html body.pc-fr .fr-rounds .fr-pills button { transition:none; }
  body.pc-fr .fr-rounds .fr-view .fr-svg { animation:none; }
}
