/* SciEncephalon Labs: shared stylesheet.
   Hand-written CSS. No utility CDN, no build step.
   Palette and type follow the brand guide (brand_review_shared.html). */

:root {
  --sci-navy: #1a2744;
  --sci-blue: #0076a3;
  --sci-blue-dark: #005f84;
  --sci-onyx: #0a1628;
  --sci-white: #ffffff;
  --sci-subtle: #f8fafc;      /* default page surface (open decision 10) */
  --sci-surface: #f1f5f9;     /* CMO surface, used only for inset panels */
  --sci-muted: #94a3b8;
  --sci-cyan: #00c2e8;        /* signal accent only, never a large fill */

  --text: #1a2744;
  --text-2: #475569;
  --text-3: #64748b;
  --line: #e2e8f0;
  --line-2: #cbd5e1;

  --ok: #15803d;
  --warn: #b45309;
  --risk: #b91c1c;
  --ok-bg: #f0fdf4;
  --warn-bg: #fffbeb;
  --risk-bg: #fef2f2;

  --rule: linear-gradient(90deg, #00c2e8, #0076a3 45%, #1a2744);

  --font-body: 'Aptos', 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-label: 'Quicksand', 'Aptos', 'Inter', system-ui, sans-serif;

  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(10, 22, 40, .05), 0 6px 24px rgba(10, 22, 40, .06);
  --max: 1160px;
  --gutter: 16px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--sci-subtle);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: var(--sci-blue); text-underline-offset: 2px; }
a:hover { color: var(--sci-blue-dark); }
h1, h2, h3, h4 { color: var(--sci-navy); line-height: 1.2; margin: 0 0 .5em; font-weight: 700; letter-spacing: -.01em; }
h1 { font-size: clamp(1.9rem, 4.2vw, 2.9rem); }
h2 { font-size: clamp(1.4rem, 2.8vw, 1.9rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--sci-cyan); outline-offset: 2px; border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: -999px; top: 8px; background: var(--sci-navy); color: #fff; padding: 8px 14px; border-radius: 6px; z-index: 100; }
.skip-link:focus { left: 8px; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
@media (min-width: 768px) { :root { --gutter: 28px; } }

/* ---------- Header ---------- */
.site-header { background: var(--sci-white); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 40; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--sci-navy); }
/* The lockup PNG carries its own clear space; crop visually with negative margin, not by editing the file. */
.brand-lockup { width: 168px; margin: -10px -6px -10px -14px; }
.brand-lab { font-family: var(--font-label); font-weight: 600; font-size: .95rem; letter-spacing: .04em; color: var(--sci-blue); border-left: 1px solid var(--line-2); padding-left: 10px; }
@media (max-width: 380px) { .brand-lockup { width: 140px; } }

.nav-toggle { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--sci-navy); cursor: pointer; }
.site-nav { display: none; }
.site-nav.open { display: block; position: absolute; top: 68px; left: 0; right: 0; background: #fff; border-bottom: 1px solid var(--line); padding: 8px var(--gutter) 16px; box-shadow: var(--shadow); }
.site-nav ul { list-style: none; margin: 0; padding: 0; }
.site-nav a { display: block; padding: 12px 4px; text-decoration: none; color: var(--sci-navy); font-weight: 500; }
.site-nav a[aria-current="page"] { color: var(--sci-blue); }
.site-nav .btn { margin-top: 8px; }
@media (min-width: 900px) {
  .nav-toggle { display: none; }
  .site-nav, .site-nav.open { display: block; position: static; padding: 0; box-shadow: none; border: 0; }
  .site-nav ul { display: flex; align-items: center; gap: 4px; }
  .site-nav a { padding: 8px 12px; border-radius: 8px; font-size: .95rem; }
  .site-nav a:hover { background: var(--sci-subtle); }
  .site-nav .btn { margin: 0 0 0 8px; }
  .site-nav a.btn:hover { background: var(--sci-blue-dark); }
}

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 18px; border-radius: 10px; font-weight: 600; font-size: .95rem; text-decoration: none; border: 1px solid transparent; cursor: pointer; font-family: inherit; line-height: 1.2; }
.btn-primary { background: var(--sci-blue); color: #fff; }
.btn-primary:hover { background: var(--sci-blue-dark); color: #fff; }
.btn-secondary { background: #fff; color: var(--sci-navy); border-color: var(--line-2); }
.btn-secondary:hover { border-color: var(--sci-blue); color: var(--sci-blue); }
.btn-ghost-dark { background: transparent; color: #fff; border-color: rgba(255,255,255,.35); }
.btn-ghost-dark:hover { border-color: #fff; color: #fff; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; }

/* ---------- Labels, badges, rules ---------- */
.eyebrow { font-family: var(--font-label); font-weight: 600; font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; color: var(--sci-blue); margin: 0 0 .6em; }
.tag { display: inline-block; font-family: var(--font-label); font-weight: 600; font-size: .75rem; letter-spacing: .04em; color: var(--sci-navy); background: var(--sci-surface); border: 1px solid var(--line); padding: 3px 10px; border-radius: 999px; }
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; font-weight: 600; color: var(--sci-blue-dark); background: #e6f4f9; border: 1px solid #b9e2f0; padding: 4px 10px; border-radius: 999px; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--sci-cyan); }
.placeholder-flag { display: inline-block; font-size: .72rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: #92400e; background: #fef3c7; border: 1px dashed #d97706; padding: 2px 8px; border-radius: 6px; }
.rule { height: 3px; border: 0; background: var(--rule); border-radius: 3px; margin: 0; }

/* ---------- Sections ---------- */
.section { padding: 48px 0; }
.section-tight { padding: 32px 0; }
.section-dark { background: var(--sci-onyx); color: #cbd5e1; }
.section-dark h1, .section-dark h2, .section-dark h3 { color: #fff; }
.section-white { background: #fff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.lede { font-size: 1.1rem; color: var(--text-2); max-width: 760px; }
.section-dark .lede { color: #cbd5e1; }
.section-head { margin-bottom: 24px; max-width: 760px; }
@media (min-width: 768px) { .section { padding: 72px 0; } }

/* ---------- Hero ---------- */
.hero { background: var(--sci-onyx); color: #cbd5e1; padding: 56px 0 48px; position: relative; overflow: hidden; }
.hero::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--rule); }
.hero h1 { color: #fff; max-width: 820px; }
.hero .lede { color: #cbd5e1; margin-bottom: 1.6em; }
.hero .eyebrow { color: var(--sci-cyan); }
@media (min-width: 768px) { .hero { padding: 88px 0 72px; } }

.page-head { background: #fff; border-bottom: 1px solid var(--line); padding: 36px 0 28px; }
.crumbs { font-size: .85rem; color: var(--text-3); margin-bottom: 12px; }
.crumbs a { color: var(--text-3); }
.crumbs span[aria-hidden] { margin: 0 6px; }

/* ---------- Grids and cards ---------- */
.grid { display: grid; gap: 18px; grid-template-columns: 1fr; }
@media (min-width: 700px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } .grid-4 { grid-template-columns: repeat(4, 1fr); } }

.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.card h3 { margin: 4px 0 2px; }
.card .card-meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.card dl { margin: 0; display: grid; gap: 8px; }
.card dt { font-size: .74rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--text-3); }
.card dd { margin: 0; color: var(--text-2); font-size: .95rem; }
.card .btn-row { margin-top: auto; padding-top: 8px; }
.card-foot { font-size: .78rem; color: var(--text-3); border-top: 1px solid var(--line); padding-top: 10px; margin-top: 4px; }
.card-muted { background: var(--sci-subtle); box-shadow: none; border-style: dashed; }

.industry-link { text-decoration: none; color: inherit; }
.industry-link .card { height: 100%; transition: border-color .15s, transform .15s; }
.industry-link:hover .card { border-color: var(--sci-blue); transform: translateY(-2px); }
.industry-link .arrow { color: var(--sci-blue); font-weight: 600; margin-top: auto; }

.group-title { display: flex; align-items: baseline; gap: 12px; margin: 36px 0 14px; }
.group-title h2 { margin: 0; font-size: 1.3rem; }
.group-title p { margin: 0; color: var(--text-3); font-size: .9rem; }

.empty-state { background: #fff; border: 1px dashed var(--line-2); border-radius: var(--radius); padding: 28px; color: var(--text-2); }

/* ---------- Demo page ---------- */
.demo-layout { display: grid; gap: 24px; grid-template-columns: 1fr; }
@media (min-width: 1000px) { .demo-layout { grid-template-columns: minmax(0, 1fr) 320px; align-items: start; } }
.demo-aside { display: grid; gap: 16px; }
@media (min-width: 1000px) { .demo-aside { position: sticky; top: 88px; } }
.capture { position: relative; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: var(--sci-onyx); aspect-ratio: 16 / 9; }
.capture img { width: 100%; height: 100%; object-fit: cover; }
.capture video { width: 100%; height: 100%; object-fit: cover; display: block; }
.capture figcaption { position: absolute; left: 10px; bottom: 10px; right: 10px; font-size: .75rem; color: #fff; background: rgba(10,22,40,.78); padding: 6px 10px; border-radius: 8px; }
.capture-placeholder { display: flex; align-items: center; justify-content: center; text-align: center; padding: 20px; color: #cbd5e1; font-size: .85rem; }
.capture-placeholder code { color: var(--sci-cyan); }

.blocks { display: grid; gap: 14px; grid-template-columns: 1fr; margin: 0; }
@media (min-width: 700px) { .blocks { grid-template-columns: repeat(3, 1fr); } }
.blocks div { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 16px; }
.blocks dt { font-size: .74rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--sci-blue); margin-bottom: 4px; }
.blocks dd { margin: 0; color: var(--text-2); font-size: .95rem; }

.footnote { font-size: .85rem; color: var(--text-2); background: var(--warn-bg); border: 1px solid #fcd34d; border-radius: var(--radius-sm); padding: 10px 14px; }

/* ---------- Demo app frame ---------- */
.app { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; scroll-margin-top: 84px; }
.app-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--sci-subtle); }
.app-title { font-weight: 700; color: var(--sci-navy); font-size: .95rem; }
.tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.tab { min-height: 40px; padding: 8px 14px; border-radius: 8px; border: 1px solid var(--line); background: #fff; color: var(--text-2); font: inherit; font-size: .88rem; font-weight: 600; cursor: pointer; }
.tab[aria-selected="true"] { background: var(--sci-navy); color: #fff; border-color: var(--sci-navy); }
.app-body { padding: 18px; }
@media (min-width: 768px) { .app-body { padding: 24px; } }
.panel[hidden] { display: none; }

.kpis { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin-bottom: 18px; }
.kpi { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px; background: #fff; }
.kpi .k-label { font-size: .74rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--text-3); }
.kpi .k-value { font-size: 1.7rem; font-weight: 800; color: var(--sci-navy); line-height: 1.15; font-variant-numeric: tabular-nums; }
.kpi .k-note { font-size: .78rem; color: var(--text-3); }

.two-col { display: grid; gap: 18px; grid-template-columns: 1fr; }
@media (min-width: 860px) { .two-col { grid-template-columns: 1fr 1fr; } }

.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field label, .field .label { font-size: .85rem; font-weight: 600; color: var(--sci-navy); display: flex; justify-content: space-between; gap: 8px; }
.field output, .field .val { font-variant-numeric: tabular-nums; color: var(--sci-blue); font-weight: 700; }
.field select, .field input[type="number"] { min-height: 44px; border: 1px solid var(--line-2); border-radius: 8px; padding: 8px 10px; font: inherit; background: #fff; color: var(--text); width: 100%; }
input[type="range"] { width: 100%; accent-color: var(--sci-blue); min-height: 32px; }
.check { display: flex; align-items: center; gap: 10px; min-height: 40px; font-size: .92rem; color: var(--text); cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--sci-blue); }

.meter { height: 12px; background: var(--sci-surface); border-radius: 999px; overflow: hidden; }
.meter > span { display: block; height: 100%; width: 0; border-radius: 999px; background: var(--sci-blue); transition: width .35s ease, background-color .35s ease; }
.level-low { color: var(--ok); }
.level-mid { color: var(--warn); }
.level-high { color: var(--risk); }
.meter > span.level-low { background: #16a34a; }
.meter > span.level-mid { background: #d97706; }
.meter > span.level-high { background: #dc2626; }

.score-big { font-size: 3rem; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.result-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; background: var(--sci-subtle); }

.bars { display: grid; gap: 10px; }
.bar-row { display: grid; grid-template-columns: minmax(110px, 38%) 1fr 54px; gap: 10px; align-items: center; font-size: .88rem; }
.bar-row .b-track { height: 10px; background: var(--sci-surface); border-radius: 999px; position: relative; overflow: hidden; }
.bar-row .b-fill { position: absolute; top: 0; bottom: 0; left: 0; background: var(--sci-blue); border-radius: 999px; transition: width .3s ease; }
.bar-row .b-fill.neg { background: var(--sci-muted); }
.bar-row .b-val { text-align: right; font-variant-numeric: tabular-nums; color: var(--text-2); }

.list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.row-btn { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px; text-align: left; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; font: inherit; color: var(--text); cursor: pointer; min-height: 56px; }
.row-btn:hover { border-color: var(--sci-blue); }
.row-btn[aria-pressed="true"] { border-color: var(--sci-blue); box-shadow: inset 3px 0 0 var(--sci-blue); }
.row-btn .r-name { font-weight: 700; color: var(--sci-navy); }
.row-btn .r-sub { font-size: .8rem; color: var(--text-3); }
.row-btn .r-score { font-weight: 800; font-variant-numeric: tabular-nums; font-size: 1.15rem; }

.pill { display: inline-block; font-size: .72rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--sci-surface); color: var(--text-2); }
.pill-risk { background: var(--risk-bg); color: var(--risk); }
.pill-warn { background: var(--warn-bg); color: var(--warn); }
.pill-ok { background: var(--ok-bg); color: var(--ok); }

.note { font-size: .82rem; color: var(--text-3); }
.inset { background: var(--sci-surface); border-radius: var(--radius-sm); padding: 14px; }

.chart { width: 100%; height: auto; display: block; }
.chart text { font-family: var(--font-body); font-size: 11px; fill: var(--text-3); }
.chart-wrap { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 8px; background: #fff; }
.legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: .8rem; color: var(--text-2); margin-top: 8px; }
.legend i { display: inline-block; width: 12px; height: 3px; border-radius: 2px; vertical-align: middle; margin-right: 6px; }

.stages { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.stage { text-align: center; padding: 10px 4px; border-radius: 8px; border: 1px solid var(--line); font-size: .78rem; font-weight: 700; color: var(--text-3); background: #fff; }
.stage.on { color: #fff; border-color: transparent; }
.stage.on.s0 { background: #16a34a; }
.stage.on.s1 { background: #d97706; }
.stage.on.s2 { background: #ea580c; }
.stage.on.s3 { background: #dc2626; }

.transcript { display: grid; gap: 10px; min-height: 120px; }
.transcript p { margin: 0; font-size: .92rem; }
.transcript .who { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--sci-blue); margin-right: 6px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font-size: .78rem; font-weight: 600; padding: 4px 10px; border-radius: 8px; background: #e6f4f9; color: var(--sci-blue-dark); border: 1px solid #b9e2f0; }

/* ---------- Learn ---------- */
.level { font-size: .75rem; font-weight: 700; color: var(--sci-navy); }
.level::before { content: "Level: "; font-weight: 500; color: var(--text-3); }

/* ---------- Footer ---------- */
.site-footer { background: var(--sci-onyx); color: #94a3b8; padding: 40px 0 28px; margin-top: 48px; font-size: .9rem; }
.site-footer a { color: #cbd5e1; }
.site-footer .foot-grid { display: grid; gap: 24px; grid-template-columns: 1fr; }
@media (min-width: 768px) { .site-footer .foot-grid { grid-template-columns: 2fr 1fr 1fr; } }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.site-footer h4 { color: #fff; font-size: .85rem; letter-spacing: .05em; text-transform: uppercase; margin-bottom: 10px; }
.foot-lockup { width: 200px; margin: -12px 0 6px -16px; }
.foot-base { border-top: 1px solid rgba(255,255,255,.1); margin-top: 28px; padding-top: 16px; font-size: .8rem; }

/* ---------- Driver-monitoring sub-brand (that page only) ---------- */
.dm-lockup { width: 320px; max-width: 100%; margin-bottom: 12px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

/* Fixes after first visual pass */
.card > .tag, .card > .level, .card > .placeholder-flag, .card > .badge { align-self: flex-start; }
.site-nav a.btn-primary, .site-nav a.btn-primary:hover { color: #fff; }
.brand-lockup { width: 190px; }
@media (max-width: 380px) { .brand-lockup { width: 150px; } }
.kpi.row-btn { min-height: 0; padding: 14px; }
.kpi .k-value.level-low, .k-note.level-low { color: var(--ok); }
.kpi .k-value.level-mid, .k-note.level-mid { color: var(--warn); }
.kpi .k-value.level-high, .k-note.level-high { color: var(--risk); }
.result-card .score-big.level-low { color: var(--ok); }
.result-card .score-big.level-mid { color: var(--warn); }
.result-card .score-big.level-high { color: var(--risk); }
.site-nav a.btn { display: inline-flex; }
/* ?poster=1 renders only the demo, used to make poster stills */
.poster-mode .site-header, .poster-mode .site-footer, .poster-mode main > section:not(#demo), .poster-mode #demo > .wrap > .note { display: none; }
.poster-mode #demo { padding: 24px 0; }
.demo-layout > *, .two-col > *, .grid > *, .blocks > * { min-width: 0; }
code { overflow-wrap: anywhere; }

/* Demo access gate */
.access-wrap { max-width: 560px; }
.access-form { display: grid; gap: 4px; }
.access-form .field input { min-height: 44px; border: 1px solid var(--line-2); border-radius: 8px; padding: 8px 10px; font: inherit; background: #fff; color: var(--text); width: 100%; }
.access-form .muted { font-weight: 500; color: var(--sci-muted); }
.access-form .consent { display: flex; gap: 10px; align-items: flex-start; font-size: .9rem; margin: 6px 0 14px; }
.access-form .consent input { margin-top: 4px; flex: none; }
.access-form .btn { justify-self: start; }
.access-msg { background: var(--warn-bg); color: var(--warn); border-radius: var(--radius-sm); padding: 10px 14px; margin-bottom: 14px; font-weight: 600; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* Benefit link: income vs program limits (HTML bars, readable at any width) */
.bl-cliff { display: grid; gap: 10px; margin: 8px 0 4px; }
.bl-cliff-row { display: grid; grid-template-columns: minmax(110px, 30%) 1fr; gap: 12px; align-items: center; }
.bl-cliff-name { font-size: .9rem; font-weight: 600; color: var(--ink, #1a2744); line-height: 1.25; }
.bl-cliff-name small { display: block; font-weight: 500; color: #64748b; font-size: .8rem; }
.bl-cliff-track { position: relative; height: 18px; background: #eef2f7; border-radius: 4px; }
.bl-cliff-fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 4px; opacity: .85; }
.bl-cliff-now { position: absolute; top: -4px; bottom: -4px; width: 3px; margin-left: -1.5px; background: #1a2744; border-radius: 2px; }
.bl-cliff-next { background: #dc2626; }
.bl-cliff-key { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: .8rem; color: #64748b; margin: 4px 0 0; }
.bl-key-now::before, .bl-key-next::before { content: ""; display: inline-block; width: 3px; height: 12px; margin-right: 6px; vertical-align: -1px; background: #1a2744; }
.bl-key-next::before { background: #dc2626; }
@media (max-width: 520px) { .bl-cliff-row { grid-template-columns: 1fr; gap: 4px; } }

/* review-C (healthcare demos, learn lessons): chart sizing.
   .cw-cap keeps small-viewBox charts from growing huge on wide screens;
   .cw-scroll lets wide charts keep a readable size on phones and scroll inside their frame. */
.chart.cw-cap { max-width: 620px; margin: 0 auto; }
.chart-wrap.cw-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
@media (max-width: 600px) {
  .chart-wrap.cw-scroll > .chart { min-width: 600px; }
  .chart-wrap.cw-scroll.cw-400 > .chart { min-width: 400px; }
}
.nb { white-space: nowrap; }
.wc-detail-top { scroll-margin-top: 80px; }
/* end review-C */

/* review-A: finance, FEC and driver demo fixes */
.bar-row .b-track.b-diverging .b-fill { border-radius: 0; }
.bar-row .b-track .b-zero { position: absolute; top: 0; bottom: 0; left: 50%; width: 1px; background: #64748b; z-index: 1; }
@media (min-width: 481px) { .fh-report #fh-rep-kpis.kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
#fh-rep-ind .fin-table td { white-space: normal; }
#fh-rep-ind .fin-table td.wrap-cell { min-width: 0; }
#sp-e-table .fin-table td.wrap-cell { min-width: 130px; }
.ps-table td.ps-reason { white-space: normal; min-width: 7em; }
.ps-table-wrap .ps-table th { white-space: normal; }
.ps-table-wrap .ps-table th, .ps-table-wrap .ps-table td { padding-left: 7px; padding-right: 7px; }
/* end review-A */

/* review-B: nurse scheduling rules table, patient intake ack error and staff queue (scoped by id/class) */
.ns-rules-table td:first-child { white-space: normal; }
#pi-ack-err { font-size: .78rem; color: var(--risk); margin: 6px 0 0; }
#pi-ack-err[hidden] { display: none; }
@media (max-width: 599px) {
  #pi-queue thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  #pi-queue, #pi-queue tbody, #pi-queue tr { display: block; }
  #pi-queue tr { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; padding: 12px; border-bottom: 1px solid var(--line); }
  #pi-queue tr:last-child { border-bottom: 0; }
  #pi-queue td { display: block; padding: 0; border: 0; text-align: left; white-space: normal; }
  #pi-queue td[data-label]::before { content: attr(data-label); display: block; font-size: .7rem; letter-spacing: .04em; text-transform: uppercase; color: var(--text-3); }
  #pi-queue td[data-label="Follow-up"], #pi-queue td[data-label="Status"] { grid-column: 1 / 3; }
}
/* end review-B */

/* review-C (2): supply-chain FDA tables. Text columns wrap and read left-aligned; counts stay right-aligned. */
#sc-fda-drugs th, #sc-fda-drugs td, #sc-fda-devices th, #sc-fda-devices td { white-space: normal; text-align: left; vertical-align: top; }
#sc-fda-drugs th:nth-child(n+3):nth-child(-n+6), #sc-fda-drugs td:nth-child(n+3):nth-child(-n+6) { text-align: right; white-space: nowrap; }
#sc-fda-drugs td:nth-child(7), #sc-fda-drugs td:nth-child(8), #sc-fda-devices td:nth-child(5), #sc-fda-devices td:nth-child(6) { white-space: nowrap; }
#sc-fda-drugs td:first-child { min-width: 14em; }
#sc-fda-drugs td:last-child { min-width: 12em; }
#sc-fda-devices td:first-child { min-width: 12em; }
#sc-fda-devices td:nth-child(2), #sc-fda-devices td:nth-child(4) { min-width: 14em; }
#sc-fda-devices td:nth-child(3) { min-width: 9em; }
/* end review-C (2) */
