/* ============================================================
   /product/manufacturers — page-scoped styles

   COMPOSITION
   -----------
   1. Universal helpers come from globals.css. THIS FILE DOES NOT
      REDEFINE .eyebrow, .lede, .display, .h-display, .h-section-sm,
      .h-section, .h-card, .btn, .btn-accent, .btn-ghost, .btn-ink,
      .btn-lg, .wrap, or main > section padding.
   2. Inside .screen-body mockups, platform CSS is copied verbatim
      from client/src/styles/tokens.css + the component CSS files.
   3. FAQ CSS is copied verbatim from /public/audit-trail.css.

   CORNER POLICY
   -------------
   ZERO border-radius on any frame, card, panel, table, button,
   badge, KPI, score-card, capacity grid card, pm-row, alert.
   The only radii in this file:
     - 50% on circular dots (chrome traffic-lights, comp-dots,
       FAQ chevron, src-cap-legend-dot)
     - 4px on .faq-q:focus-visible keyboard-focus ring
   ============================================================ */

/* ============== TOKENS (platform-aligned) ============== */
:root {
  --bg: #F4F5F7;
  --surface: #FFFFFF;
  --navy: #0F1923;
  --border: #E2E6EB;
  --divider: #F0F2F5;
  --text: #0F1923;
  --text2: #4A5568;
  --text3: #6B7A8A;
  --text4: #B8C4CE;

  --accent: #B08D57;
  --accent-hover: #96773E;
  --accent-light: rgba(176, 141, 87, 0.07);
  --accent-border: rgba(176, 141, 87, 0.25);

  --red: #DC3545;      --red-bg: #FEF2F2;      --red-t: #B91C1C;
  --amber: #D97706;    --amber-bg: #FFFBEB;    --amber-t: #92400E;
  --green: #059669;    --green-bg: #ECFDF5;    --green-t: #065F46;
  --blue: #3B82F6;     --blue-bg: #EFF6FF;     --blue-t: #1E40AF;
  --purple: #7C3AED;   --purple-bg: #F5F3FF;   --purple-t: #5B21B6;
  --teal: #0D9488;     --teal-bg: #F0FDFA;     --teal-t: #115E59;

  --font: 'DM Sans', sans-serif;
  --sh: 0 1px 3px rgba(15, 25, 35, 0.05);
  --sh-h: 0 8px 24px rgba(15, 25, 35, 0.08);
}

/* ============== SECTION SCAFFOLDING ============== */
/* Hero — centered, matches canonical /product/* hero pattern */
.s-hero {
  background: var(--paper, #fff);
  text-align: center;
}
.s-hero-inner {
  max-width: 920px;
  margin: 0 auto;
}
.s-hero .eyebrow { display: inline-block; margin-bottom: 28px; }
.s-hero h1 { margin-bottom: 24px; }
.s-hero .lede { max-width: 820px; margin: 0 auto 36px; }
.cta-row {
  display: inline-flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

.s-screen {
  background: var(--paper, #fff);
  padding-top: 0;
  padding-bottom: 96px;
  overflow-x: clip;
}

.s-connections { background: var(--paper, #fff); }

.s-num {
  display: inline-block;
  font-size: 13px;
  letter-spacing: 0.18em;
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 16px;
  text-transform: uppercase;
}
.s-head {
  max-width: var(--max-w, 1440px);
  margin: 0 auto;
  padding: 96px var(--inner-pad, 32px) 36px;
}
.s-head h2 { margin: 0 0 22px 0; max-width: 32ch; }
.s-head .lede { max-width: 72ch; }

/* ============== BROWSER-MOCKUP FRAME ============== */
.screen-frame {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--inner-pad, 32px);
}
.screen-chrome {
  background: var(--bg);
  border: 1px solid var(--border);
  border-bottom: none;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.screen-chrome-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--text4);
  opacity: 0.5;
}
.screen-chrome-dot:nth-child(1) { background: #ED6A5E; opacity: 0.85; }
.screen-chrome-dot:nth-child(2) { background: #F4BF50; opacity: 0.85; }
.screen-chrome-dot:nth-child(3) { background: #61C554; opacity: 0.85; }
.screen-chrome-url {
  margin-left: 16px;
  font-size: 14px;
  color: var(--text3);
  font-family: var(--font);
}
.screen-body {
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 24px 28px 28px;
}

/* ============================================================
   PLATFORM CSS — copied verbatim
   ============================================================ */

/* ── Page header ── */
.page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}
.page-header-h1 { font-size: 22px; font-weight: 700; color: var(--text); margin: 0; }
.page-header-sub { font-size: 15px; color: var(--text3); margin: 2px 0 0; }

/* ── PageTabs ── */
.page-tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.ptab {
  padding: 10px 18px;
  font-size: 17px;
  font-weight: 500;
  color: var(--text2);
  text-decoration: none;
  border: none;
  border-bottom: 2px solid transparent;
  background: none;
  display: inline-block;
  font-family: var(--font);
  cursor: pointer;
  transition: all 0.12s;
}
.ptab:hover { color: var(--text); }
.ptab-active, .ptab.on {
  color: var(--text);
  border-bottom-color: var(--accent);
  font-weight: 600;
}

/* ── SubTabs ── */
.sub-tabs {
  display: flex;
  gap: 2px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.sub-tab {
  padding: 7px 16px;
  font-size: 15px;
  font-weight: 500;
  color: var(--text2);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0;
  cursor: pointer;
  font-family: var(--font);
  white-space: nowrap;
}
.sub-tab:hover { color: var(--text); border-color: var(--text3); }
.sub-tab.on {
  color: var(--bg);
  background: var(--text);
  border-color: var(--text);
}

/* ── KPI cards ── */
.pd-kpis {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}
.pd-kpis.cols-5 { grid-template-columns: repeat(5, 1fr); }
.pd-kpis.cols-6 { grid-template-columns: repeat(6, 1fr); }
.pd-kpi {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 20px 24px;
  box-shadow: var(--sh);
  position: relative;
  overflow: hidden;
}
.pd-kpi-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0 0 8px;
}
.pd-kpi-val {
  font-size: 28px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--text);
  display: block;
}
.pd-kpi-val .unit {
  font-size: 14px;
  font-weight: 400;
  color: var(--text3);
  margin-left: 4px;
}
.pd-kpi-sub {
  font-size: 14px;
  color: var(--text3);
  margin: 8px 0 0;
}

.kpi-green { color: var(--green-t); }
.kpi-amber { color: var(--amber-t); }
.kpi-red   { color: var(--red-t); }

.pd-sec-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 16px 0 12px;
}

/* ── .input + .btn-add-product ── */
.input {
  width: 100%;
  padding: 8px 12px;
  font-size: 16px;
  font-family: var(--font);
  border: 1px solid var(--border);
  outline: none;
  background: var(--surface);
  color: var(--text);
  min-height: 36px;
  border-radius: 0;
}
.input::placeholder { color: var(--text4); }

.btn-add-product {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  background: var(--text);
  color: var(--bg);
  font-size: 16px;
  font-weight: 600;
  border: none;
  border-radius: 0;
  cursor: pointer;
  white-space: nowrap;
  min-height: 36px;
}

/* ── Filter bar (also used as sub-tabs in Performance / Pricing) ── */
.filter-bar {
  display: flex;
  gap: 2px;
  overflow-x: auto;
  scrollbar-width: none;
  flex-shrink: 0;
  border: none;
  padding: 0;
  margin: 0;
  flex-wrap: wrap;
}
.filter-bar::-webkit-scrollbar { display: none; }
.filter-item {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 16px;
  font-size: 15px;
  font-weight: 500;
  color: var(--text2);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0;
  cursor: pointer;
  font-family: var(--font);
  white-space: nowrap;
}
.filter-item:hover { color: var(--text); background: var(--bg); }
.filter-item-active {
  color: var(--bg);
  background: var(--text);
  border-color: var(--text);
}

.fdrop {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 0 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 15px;
  font-weight: 500;
  color: var(--text2);
  font-family: var(--font);
  cursor: pointer;
  white-space: nowrap;
  border-radius: 0;
}
.fdrop-caret { color: var(--text3); font-size: 12px; }

.tool-row {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.tool-search {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 8px 12px;
  flex: 3 1 320px;
  max-width: 480px;
  height: 36px;
  overflow: hidden;
}
.tool-search-icon { color: var(--text3); font-size: 16px; flex-shrink: 0; }
.tool-search-text {
  color: var(--text3);
  font-size: 15px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}
.tool-spacer { flex: 1; }

/* ── Table ── */
.tbl {
  width: 100%;
  border-collapse: collapse;
  font-size: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
}
.tbl th {
  padding: 10px 16px;
  text-align: left;
  font-size: 14px;
  font-weight: 700;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.tbl td { padding: 10px 16px; }
.tbl tbody tr { border-bottom: 1px solid var(--divider); }
.tbl tbody tr:last-child { border-bottom: none; }
.tbl .tc { text-align: center; }
.tbl .tr { text-align: right; }
.tbl-dim { color: var(--text3); margin: 2px 0 0; font-size: 14px; }

.tbl-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-top: none;
  font-size: 15px;
  color: var(--text3);
}

/* Density override for tables inside the screen-body mockup */
.screen-body .tbl { font-size: 14px; }
.screen-body .tbl th { padding: 8px 8px; font-size: 12px; }
.screen-body .tbl td { padding: 8px 8px; }
.screen-body .tbl-dim { font-size: 12px; }
.screen-body .tbl-foot { padding: 10px 12px; font-size: 14px; }
.tbl-pager { display: inline-flex; align-items: center; gap: 10px; }
.tbl-page-btn {
  padding: 5px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 14px;
  font-weight: 500;
  color: var(--text2);
  cursor: pointer;
}
.tbl-page-disabled { color: var(--text4); cursor: default; }

/* ── Badge ── */
.badge {
  font-size: 13px;
  font-weight: 700;
  padding: 3px 10px;
  display: inline-block;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.badge-green   { background: var(--green-bg); color: var(--green-t); }
.badge-amber   { background: var(--amber-bg); color: var(--amber-t); }
.badge-red     { background: var(--red-bg); color: var(--red-t); }
.badge-blue    { background: var(--blue-bg); color: var(--blue-t); }
.badge-purple  { background: var(--purple-bg); color: var(--purple-t); }
.badge-teal    { background: var(--teal-bg); color: var(--teal-t); }
.badge-accent  { background: rgba(176, 141, 87, 0.12); color: var(--accent); }
.badge-neutral { background: var(--bg); color: var(--text3); }

/* ── Inline capacity bar in Directory column ── */
.cap-cell {
  display: block;
  width: 130px;
  line-height: 1.3;
}
.cap-cell-pct {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
}
.cap-cell-pct.cap-good { color: var(--green); }
.cap-cell-pct.cap-warn { color: var(--amber); }
.cap-cell-pct.cap-bad  { color: var(--red); }
.cap-cell-ratio {
  font-size: 12px;
  color: var(--text3);
  white-space: nowrap;
  margin-top: 2px;
}

/* On-time and Quality colored dots */
.metric-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 15px;
  font-weight: 600;
}
.metric-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  display: inline-block;
}
.metric-dot.good { background: var(--green); }
.metric-dot.warn { background: var(--amber); }
.metric-dot.bad  { background: var(--red); }

/* ============================================================
   PERFORMANCE — score-card grid (the differentiator)

   Composite score donut + per-factor weighted bars per manufacturer
   tile in a responsive 4-column grid.
   ============================================================ */
.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.score-card {
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--sh);
  padding: 20px 18px 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  cursor: pointer;
}

.score-ring {
  position: relative;
  width: 100px;
  height: 100px;
  margin: 0 0 12px;
}
.score-ring svg { width: 100%; height: 100%; }
.score-ring-val {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  font-weight: 700;
  line-height: 1;
}
.score-ring-val.c-green-t  { color: var(--green-t); }
.score-ring-val.c-amber-t  { color: var(--amber-t); }
.score-ring-val.c-red-t    { color: var(--red-t); }

.score-card-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 2px;
}
.score-card-meta {
  font-size: 14px;
  color: var(--text3);
  margin: 0 0 12px;
}
.score-card-class { font-weight: 600; color: var(--accent); }

.score-factors { width: 100%; }
.score-factor {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  margin-bottom: 5px;
}
.score-factor-label {
  text-align: left;
  color: var(--text2);
  font-weight: 500;
  flex: 0 0 102px;
}
.score-factor-bar {
  flex: 1;
  height: 6px;
  background: var(--divider);
  position: relative;
}
.score-factor-bar-fill {
  position: absolute;
  inset: 0 auto 0 0;
  height: 100%;
}
.score-factor-bar-fill.good { background: var(--green); }
.score-factor-bar-fill.warn { background: var(--amber); }
.score-factor-bar-fill.bad  { background: var(--red); }
.score-factor-val {
  flex: 0 0 22px;
  text-align: right;
  font-weight: 700;
}
.score-factor-val.c-green-t  { color: var(--green-t); }
.score-factor-val.c-amber-t  { color: var(--amber-t); }
.score-factor-val.c-red-t    { color: var(--red-t); }

/* Customize weights button row */
.score-tools {
  display: flex;
  align-items: center;
  margin-bottom: 16px;
}
.score-tools-spacer { flex: 1; }
.score-tools-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  font-size: 15px;
  color: var(--text2);
  background: transparent;
  border: 1px solid var(--border);
  cursor: pointer;
  font-family: var(--font);
}
.score-tools-btn:hover { color: var(--accent); border-color: var(--accent); }

/* ============================================================
   CAPACITY — utilization rings, summary rows, sourcing table
   ============================================================ */
.cap-card-summary {
  width: 100%;
  font-size: 14px;
}
.cap-card-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 4px;
}
.cap-card-row .lbl { color: var(--text3); }
.cap-card-row .val { font-weight: 600; color: var(--text); }
.cap-card-row .val.c-green-t { color: var(--green-t); font-weight: 700; }
.cap-card-row .val.c-red-t   { color: var(--red-t); font-weight: 700; }
.cap-card-warn {
  margin-top: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--red-t);
}
.cap-card-extra {
  margin-top: 8px;
  font-size: 13px;
  color: var(--text4);
}

/* Total-capacity stacked bar in summary card */
.src-cap-summary {
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--sh);
  padding: 24px;
  margin-top: 16px;
}
.src-cap-summary h3 {
  font-size: 17px;
  font-weight: 700;
  margin: 0 0 16px;
  color: var(--text);
}
.src-cap-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 16px;
}
.src-cap-card { text-align: center; }
.src-cap-card-val {
  font-size: 22px;
  font-weight: 700;
  line-height: 1;
  color: var(--text);
}
.src-cap-card-val.c-green-t  { color: var(--green-t); }
.src-cap-card-val.c-red-t    { color: var(--red-t); }
.src-cap-card-label {
  font-size: 13px;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
  margin-top: 6px;
}
.src-cap-total-bar {
  height: 24px;
  background: var(--divider);
  width: 100%;
  overflow: hidden;
  display: flex;
}
.src-cap-total-fill { height: 100%; }
.src-cap-legend {
  display: flex;
  gap: 16px;
  margin-top: 10px;
  font-size: 14px;
  color: var(--text3);
  flex-wrap: wrap;
}
.src-cap-legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
  vertical-align: middle;
  margin-right: 4px;
}

/* ============================================================
   COMPLIANCE — manufacturer-level (factory certs + alerts)
   ============================================================ */
.al-mini {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-top: 1px solid var(--divider);
  font-size: 15px;
}
.al-mini:first-of-type { border-top: none; }
.al-mini-text { flex: 1; color: var(--text); font-weight: 500; }
.al-mini-meta { font-size: 14px; color: var(--text3); }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--sh);
}
.card.bl-red { border-left: 3px solid var(--red); }
.card-head {
  padding: 14px 20px;
  border-bottom: 1px solid var(--divider);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.card-head h3 { font-size: 17px; font-weight: 700; margin: 0; color: var(--text); }

/* Cert matrix table cell variants */
.cm-dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 18px;
  font-size: 13px;
  font-weight: 700;
}
.cm-dot.valid    { background: var(--green-bg); color: var(--green-t); }
.cm-dot.expiring { background: var(--amber-bg); color: var(--amber-t); }
.cm-dot.expired  { background: var(--red-bg); color: var(--red-t); }
.cm-dot.missing  { background: var(--divider); color: var(--text4); }
.cm-dot.na       { color: var(--text4); }

/* ── Utility classes used by JSX ── */
.w-500 { font-weight: 500; }
.w-600 { font-weight: 600; }
.w-700 { font-weight: 700; }
.t-11 { font-size: 13px; }
.t-12 { font-size: 14px; }
.t-13 { font-size: 15px; }
.t-14 { font-size: 16px; }
.t-16 { font-size: 17px; }
.c-text2 { color: var(--text2); }
.c-text3 { color: var(--text3); }
.c-text4 { color: var(--text4); }
.c-green-t { color: var(--green-t); }
.c-amber-t { color: var(--amber-t); }
.c-red-t   { color: var(--red-t); }
.c-accent  { color: var(--accent); }
.tc-center { text-align: center; }

/* ============================================================
   CONNECTIONS
   ============================================================ */
.conn-grid {
  max-width: var(--max-w, 1440px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.conn-card {
  background: var(--surface);
  border: 1px solid var(--line, #e5e5e5);
  padding: 22px 24px;
}
.conn-head {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  letter-spacing: 0.06em;
  color: var(--ink, #0F1923);
  font-weight: 700;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line, #e5e5e5);
}
.conn-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px; height: 22px;
  background: var(--accent-light);
  color: var(--accent);
  font-weight: 700;
  font-size: 15px;
}
.conn-card p {
  font-size: 15px;
  line-height: 1.55;
  color: var(--muted, #525252);
  margin: 0;
}
.conn-card code {
  font-family: var(--font);
  background: var(--accent-light);
  color: var(--accent);
  padding: 1px 5px;
  font-size: 14px;
}

/* ============================================================
   FAQ — VERBATIM from marketing/site/product/index.html
   non-interactive: all Q&A visible, no accordion, no chevron
   ============================================================ */
.faq-list {
  max-width: 880px;
  margin: 0 auto;
  border-top: 1px solid var(--line, #e5e5e5);
}
.faq-item {
  border-bottom: 1px solid var(--line, #e5e5e5);
  padding: 24px 0;
}
.faq-q {
  font-size: 20px;
  font-weight: 600;
  color: var(--ink, #0F1923);
  margin: 0 0 12px;
  letter-spacing: -0.01em;
}
.faq-a {
  font-size: 17px;
  color: var(--muted, #525252);
  line-height: 1.65;
  max-width: 760px;
  margin: 0;
}

/* ============================================================
   FINAL CTA STRIP
   ============================================================ */
.s-cta {
  background: var(--ink, #0F1923);
  color: #fff;
}
.s-cta-inner {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}
.s-cta-h2 {
  font-weight: 600;
  font-size: clamp(28px, 3.6vw, 44px);
  line-height: 1.1;
  letter-spacing: -0.015em;
  color: #fff;
  margin: 0 0 18px 0;
}
.s-cta-lede {
  font-size: 18px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.7);
  margin: 0 0 32px 0;
}
.s-cta-row {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin: 0;
}
.s-cta .btn-ghost {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.25);
}
.s-cta .btn-ghost:hover { border-color: #fff; }

/* ============================================================
   GRID ITEM MIN-WIDTH FIX
   ─────────────────────────────────────────────────────────────
   Grid items default to `min-width: auto` (= min-content of the
   cell). When min-content exceeds the 1fr allocation, the column
   overflows the container. Setting `min-width: 0` lets the grid
   honor 1fr. Scoped to .screen-body mockup screens.
   ============================================================ */
.screen-body .grid-2 > *,
.screen-body .grid-3 > *,
.screen-body .grid-4 > *,
.screen-body .pd-kpis > *,
.screen-body .pipe-cols > * {
  min-width: 0;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1200px) {
  .pd-kpis { grid-template-columns: repeat(2, 1fr); }
  .pd-kpis.cols-5 { grid-template-columns: repeat(3, 1fr); }
  .pd-kpis.cols-6 { grid-template-columns: repeat(3, 1fr); }
  .src-cap-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .s-head { padding: 64px 20px 28px; }
  .screen-frame { padding: 0 16px; }
  .screen-body { padding: 16px 14px 18px; }
  .pd-kpis, .pd-kpis.cols-5, .pd-kpis.cols-6 { grid-template-columns: repeat(2, 1fr); }
  .pd-kpi-val { font-size: 22px; }
  .pd-kpi { padding: 14px 16px; }
  .grid-4 { grid-template-columns: 1fr; }
  .src-cap-grid { grid-template-columns: 1fr 1fr; }
  .conn-grid { grid-template-columns: 1fr; }
  .ptab { font-size: 16px; padding: 8px 12px; }
  .score-factor-label { flex-basis: 80px; font-size: 12px; }
  .cap-cell { min-width: 120px; }

  /* Fix 2 — directory table: show Manufacturer + Products + Capacity only */
  [aria-labelledby="dir-h2"] .tbl th:nth-child(n+4),
  [aria-labelledby="dir-h2"] .tbl td:nth-child(n+4) { display: none; }
  /* Collapse double padding so the 3-col table fills available width */
  [aria-labelledby="dir-h2"] .screen-frame { padding: 0; }
  [aria-labelledby="dir-h2"] .tbl th { white-space: normal; }
  /* Directory: hide Performance / Capacity / Pricing / Compliance tabs */
  [aria-labelledby="dir-h2"] .ptab:nth-child(3),
  [aria-labelledby="dir-h2"] .ptab:nth-child(4),
  [aria-labelledby="dir-h2"] .ptab:nth-child(5),
  [aria-labelledby="dir-h2"] .ptab:nth-child(6) { display: none; }

  /* Fix 3 — performance mock: hide Overview, Directory, Compliance tabs + Trends/Delivery/Quality sub-filters */
  [aria-labelledby="perf-h2"] .ptab:nth-child(1),
  [aria-labelledby="perf-h2"] .ptab:nth-child(2),
  [aria-labelledby="perf-h2"] .ptab:nth-child(6) { display: none; }
  [aria-labelledby="perf-h2"] .filter-item:nth-child(3),
  [aria-labelledby="perf-h2"] .filter-item:nth-child(4),
  [aria-labelledby="perf-h2"] .filter-item:nth-child(5) { display: none; }

  /* Fix 4 — capacity mock: hide Overview, Directory, Performance tabs */
  [aria-labelledby="cap-h2"] .ptab:nth-child(1),
  [aria-labelledby="cap-h2"] .ptab:nth-child(2),
  [aria-labelledby="cap-h2"] .ptab:nth-child(3) { display: none; }

  /* Fix 5 — compliance mock: hide Overview, Directory, Performance tabs + table scrolls */
  [aria-labelledby="comp-h2"] .ptab:nth-child(1),
  [aria-labelledby="comp-h2"] .ptab:nth-child(2),
  [aria-labelledby="comp-h2"] .ptab:nth-child(3) { display: none; }
  .tbl-scroll-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  [aria-labelledby="comp-h2"] .tbl { min-width: 540px; width: max-content; max-width: none; }

  /* ─── DIRECTORY: full-width scrollable table ─── */
  /* Remove column hiding — show all columns, let user scroll */
  [aria-labelledby="dir-h2"] .tbl th:nth-child(n+4),
  [aria-labelledby="dir-h2"] .tbl td:nth-child(n+4) { display: table-cell; }
  [aria-labelledby="dir-h2"] .tbl { min-width: 640px; width: max-content; max-width: none; }
  [aria-labelledby="dir-h2"] .tbl-scroll-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }

  /* ─── PERFORMANCE: hide Capacity + Pricing tabs · 1 card · no customize button ─── */
  [aria-labelledby="perf-h2"] .screen-frame { display: block; }
  [aria-labelledby="perf-h2"] .ptab:nth-child(4),
  [aria-labelledby="perf-h2"] .ptab:nth-child(5) { display: none; }
  [aria-labelledby="perf-h2"] .score-tools-btn { display: none; }
  [aria-labelledby="perf-h2"] .grid-4 .score-card:nth-child(n+2) { display: none; }
  [aria-labelledby="perf-h2"] .grid-4 { grid-template-columns: 1fr; }

  /* ─── CAPACITY: show only one factory card ─── */
  [aria-labelledby="cap-h2"] .screen-frame { display: block; }
  [aria-labelledby="cap-h2"] .grid-4 .score-card:nth-child(n+2) { display: none; }
  [aria-labelledby="cap-h2"] .grid-4 { grid-template-columns: 1fr; }

  /* ─── COMPLIANCE: KPI cards only · hide sub-title · full-width upload button ─── */
  [aria-labelledby="comp-h2"] .screen-frame { display: block; }
  [aria-labelledby="comp-h2"] .page-header-sub { display: none; }
  [aria-labelledby="comp-h2"] .page-header { flex-direction: column; gap: 8px; }
  [aria-labelledby="comp-h2"] .btn-add-product { width: 100%; text-align: center; box-sizing: border-box; }
  [aria-labelledby="comp-h2"] .page-tabs { display: none; }
  [aria-labelledby="comp-h2"] .sub-tabs { display: none; }
  [aria-labelledby="comp-h2"] .tbl-scroll-wrap { display: none; }
  [aria-labelledby="comp-h2"] .card.bl-red { display: none; }
}
