/* pf-segment ("Segment", js/pages/fis/segment.js) and the Segment P&L inside pf-pl (js/pages/fis/pl.js).
   Scoped under .fis-scope; cards, pills, stats and tables reuse css/fis.css, fis-pl.css and fis-data.css.
   Colours are the prototype tokens (--p-*, css/fis-theme.css) — never literal colours. */

/* ── pf-segment ── */
.fis-scope .fsg-kpis .fpd-kpi{height:auto;}
.fis-scope .fsg .fis-sec{margin-top:14px;}
.fis-scope .fsg .fg + .fg{margin-top:14px;}
.fis-scope .fsg-tools{order:3;margin-left:auto;display:inline-flex;gap:6px;}
.fis-scope .fsg-tools .fis-btn{font-size:calc(12px*var(--fz,1));padding:3px 10px;}
.fis-scope .fsg-scroll{max-height:620px;overflow:auto;}
.fis-scope .fsg-hier td:first-child{min-width:190px;}
.fis-scope .fsg-click{cursor:pointer;}
.fis-scope .fsg-click:hover td{background:var(--p-soft);}
.fis-scope .fsg-click:focus-visible{outline:2px solid var(--p-accent);outline-offset:-2px;}
.fis-scope .fsg-h1 td{font-weight:600;}
.fis-scope .fsg-barc{width:110px;min-width:80px;vertical-align:middle;}
.fis-scope .fsg-bar{height:8px;border-radius:4px;background:var(--p-accent);}
.fis-scope .fsg-quad,.fis-scope .fsg-me{margin-top:8px;}
/* heatmap: the cell's share of the largest value, as an accent tint */
.fis-scope .fsg-heat td.n{background:color-mix(in srgb,var(--p-accent) var(--fsg-a,0%),transparent);}
.fis-scope .fsg-heat td.fsg-hot{color:var(--p-on-accent);}
/* fill rate: ≥ 95 good · ≥ 50 watch · below bad (prototype ~1430) */
.fis-scope .fsg-f.good{background:color-mix(in srgb,var(--p-good) 45%,transparent);}
.fis-scope .fsg-f.warn{background:color-mix(in srgb,var(--p-warn) 45%,transparent);}
.fis-scope .fsg-f.bad{background:color-mix(in srgb,var(--p-bad) 45%,transparent);}
.fis-scope .fsg-native{background:var(--p-soft);}
.fis-scope .fsg-fs{font-size:calc(11px*var(--fz,1));white-space:normal;}

/* ── Segment P&L (pf-pl) ── */
.fis-scope .fsp-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;align-items:start;}
.fis-scope .fsp-col{display:flex;flex-direction:column;gap:14px;min-width:0;}
.fis-scope .fsp-grid > .fis-card,.fis-scope .fsp-col > .fis-card{height:auto;}
.fis-scope .fsp-tbl td:first-child{min-width:200px;}
.fis-scope .fsp-cmp td:first-child{min-width:150px;}
.fis-scope .fsp-cmp .fsp-sub td{font-weight:700;background:var(--p-soft);}
.fis-scope .fsp-pass{color:var(--p-good);font-weight:600;}
.fis-scope #plRoot.fsp-busy .fsp-grid,.fis-scope #plRoot.fsp-busy #plSpTrend{opacity:.6;transition:opacity .15s;}

@media (max-width:1000px){
  .fis-scope .fsp-grid{grid-template-columns:minmax(0,1fr);}
}
@media (max-width:767.98px){
  .fis-scope .fsg-hier td:first-child,.fis-scope .fsp-tbl td:first-child{min-width:150px;}
  .fis-scope .fsg-barc{width:60px;min-width:50px;}
  .fis-scope .fsg-tools{margin-left:0;}
}
