/* ============================================================================
   SCIKIQ — Indian Air Force demo · brand stylesheet
   Executive command-center look. Projector-legible (designed for 1080p).
   Tokens match the pitch deck (SPEC §2).
   ========================================================================== */

:root {
  /* Brand */
  --teal: #0F4C5C;
  --teal-deep: #0A3640;
  --teal-mid: #1C6175;
  --orange: #C97B4B;
  --orange-dk: #B5673A;

  /* Surfaces / text */
  --card: #EEF3F4;
  --sand: #F7EEE4;
  --text: #23323A;
  --muted: #5E7078;
  --line: #D8E0E2;
  --white: #FFFFFF;
  --bg: #F4F7F8;

  /* Classification */
  --cls-public: #2E7D5B;
  --cls-restricted: #C9A227;
  --cls-confidential: #C97B4B;
  --cls-secret: #B23A48;

  /* Semantic status */
  --ok: #2E7D5B;
  --warn: #C9A227;
  --bad: #B23A48;

  --sidebar-w: 252px;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 3px rgba(16, 40, 48, .10), 0 1px 2px rgba(16, 40, 48, .06);
  --shadow-lg: 0 8px 28px rgba(16, 40, 48, .14);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: Calibri, "Segoe UI", system-ui, -apple-system, sans-serif;
  color: var(--text);
  background: var(--bg);
  font-size: 16px;
  line-height: 1.45;
}

a { color: var(--teal-mid); text-decoration: none; }
a:hover { text-decoration: underline; }

code {
  font-family: "Cascadia Code", Consolas, monospace;
  background: var(--card);
  padding: 1px 6px;
  border-radius: 5px;
  font-size: .9em;
}

/* ------------------------------------------------------------------ Sidebar */
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--sidebar-w);
  background: var(--teal-deep);
  color: #DCE8EA;
  display: flex;
  flex-direction: column;
  padding: 20px 0;
  z-index: 30;
}
.sidebar .brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 4px 20px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  margin-bottom: 10px;
}
.sidebar .brand .hex { flex: 0 0 auto; }
.sidebar .brand .wordmark {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: #fff;
  line-height: 1;
}
.sidebar .brand .tagline {
  display: block;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: .5px;
  color: var(--orange);
  margin-top: 2px;
}
.sidebar .nav { display: flex; flex-direction: column; gap: 3px; padding: 6px 12px; }
.sidebar .nav a {
  display: flex;
  flex-direction: column;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  color: #C6D6D9;
  text-decoration: none;
  border-left: 3px solid transparent;
  transition: background .12s, color .12s;
}
.sidebar .nav a .lbl { font-size: 15.5px; font-weight: 600; }
.sidebar .nav a .sub { font-size: 11px; color: #8FAAB0; letter-spacing: .3px; }
.sidebar .nav a:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.sidebar .nav a.active {
  background: var(--teal);
  color: #fff;
  border-left-color: var(--orange);
}
.sidebar .nav a.active .sub { color: var(--sand); }
.sidebar .spacer { flex: 1; }
.sidebar .foot {
  padding: 14px 22px 2px;
  font-size: 11px;
  color: #6E8990;
  border-top: 1px solid rgba(255, 255, 255, .08);
}
.sidebar .foot .fourc { color: var(--orange); font-weight: 600; letter-spacing: .5px; }

/* --------------------------------------------------------------- Main / top */
.main {
  margin-left: var(--sidebar-w);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--white);
  border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 28px;
  height: 62px;
}
.topbar .page-title { font-size: 20px; font-weight: 700; color: var(--teal); }
.topbar .page-title .crumb { color: var(--muted); font-weight: 400; font-size: 14px; }
.topbar-right { display: flex; align-items: center; gap: 12px; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
}
.pill-synthetic { background: var(--sand); color: var(--orange-dk); border: 1px solid #E9D6C3; }
.pill-synthetic .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--orange); }
.pill-llm-on { background: #E4F1EA; color: var(--ok); border: 1px solid #C2E0CE; }
.pill-llm-off { background: var(--card); color: var(--muted); border: 1px solid var(--line); }

.content { padding: 24px 28px 8px; flex: 1; width: 100%; max-width: 1480px; }
.appfoot {
  padding: 14px 28px 22px;
  color: var(--muted);
  font-size: 12.5px;
  border-top: 1px solid var(--line);
  margin-top: 18px;
}

.banner-warn {
  background: #FBF3DA;
  border: 1px solid #ECD98C;
  color: #7A6411;
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  margin: 18px 28px 0;
  font-weight: 600;
}

/* ----------------------------------------------------------------- Headings */
.section-title {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 26px 0 12px;
}
.section-title h2 { font-size: 18px; color: var(--teal); margin: 0; font-weight: 700; }
.section-title .hint { color: var(--muted); font-size: 13px; }
.page-intro { color: var(--muted); font-size: 14.5px; margin: 2px 0 14px; max-width: 80ch; }

/* --------------------------------------------------------------- KPI cards */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 6px;
}
/* Keep a fixed set of "vitals" cards on a single row on desktop (no lonely wrap) */
@media (min-width: 1080px) {
  .kpi-grid-onerow {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: minmax(0, 1fr);
  }
}
.kpi-card {
  background: var(--white);
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  box-shadow: var(--shadow);
  border-top: 3px solid var(--teal);
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-height: 0;
}
.kpi-card.accent { border-top-color: var(--orange); }
.kpi-card.good { border-top-color: var(--ok); }
.kpi-card.warn { border-top-color: var(--warn); }
.kpi-card.bad { border-top-color: var(--bad); }
.kpi-card .label {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--muted);
  font-weight: 700;
}
.kpi-card .value { font-size: 23px; font-weight: 700; color: var(--teal); line-height: 1.15; margin-top: 1px; }
.kpi-card.accent .value { color: var(--orange-dk); }
.kpi-card.bad .value { color: var(--bad); }
.kpi-card.warn .value { color: #9A7B12; }
.kpi-card .value small { font-size: 13px; color: var(--muted); font-weight: 600; }
.kpi-card .sub { font-size: 11.5px; color: var(--muted); line-height: 1.3; }

/* ----------------------------------------------------------------- Panels */
.panel {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px 20px;
  margin-bottom: 18px;
}
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.panel-head h3 { margin: 0; font-size: 16px; color: var(--teal); font-weight: 700; }
.panel-head .meta { color: var(--muted); font-size: 12.5px; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.grid-1-2 { display: grid; grid-template-columns: 1fr 2fr; gap: 18px; }
.grid-2-1 { display: grid; grid-template-columns: 2fr 1fr; gap: 18px; }
@media (max-width: 1100px) {
  .grid-2, .grid-3, .grid-1-2, .grid-2-1 { grid-template-columns: 1fr; }
}

/* ----------------------------------------------------------------- Charts */
.chart-wrap { position: relative; width: 100%; }
/* Compact chart heights (names kept; values trimmed so charts don't run past the fold) */
.chart-wrap.h-240 { height: 206px; }
.chart-wrap.h-280 { height: 236px; }
.chart-wrap.h-320 { height: 264px; }
@media (max-width: 1200px) {
  .chart-wrap.h-320 { height: 240px; }
  .chart-wrap.h-280 { height: 220px; }
}

/* ----------------------------------------------------------------- Tables */
.table-wrap { overflow-x: auto; border-radius: var(--radius-sm); }
table.data { width: 100%; border-collapse: collapse; font-size: 14px; }
table.data thead th {
  background: var(--teal);
  color: #fff;
  text-align: left;
  padding: 10px 12px;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: .2px;
  white-space: nowrap;
  position: sticky;
  top: 0;
}
table.data tbody td { padding: 9px 12px; border-bottom: 1px solid var(--line); }
table.data tbody tr:nth-child(even) { background: var(--card); }
table.data tbody tr:hover { background: #E3EEF0; }
table.data td.num, table.data th.num { text-align: right; font-variant-numeric: tabular-nums; }
table.data td.strong { font-weight: 700; color: var(--teal); }
.table-empty { padding: 22px; text-align: center; color: var(--muted); }
/* Compact table variant for dense multi-column tables (e.g. maintenance history) */
table.data.tight thead th { padding: 7px 9px; font-size: 11.5px; }
table.data.tight tbody td { padding: 6px 9px; font-size: 12.5px; }
table.data.tight .badge { padding: 1px 7px; font-size: 11px; }

/* ----------------------------------------------------------------- Badges */
.badge {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .2px;
  border: 1px solid transparent;
}
.cls-public      { background: #E4F1EA; color: var(--cls-public);      border-color: #BFE0CD; }
.cls-restricted  { background: #FBF3D6; color: #9A7B12;               border-color: #EAD89A; }
.cls-confidential{ background: #F7E7DA; color: var(--cls-confidential);border-color: #E9CDB6; }
.cls-secret      { background: #F7DEE2; color: var(--cls-secret);      border-color: #EBBDC5; }

.st-operational { background: #E4F1EA; color: var(--ok); border-color: #BFE0CD; }
.st-maintenance { background: #FBF3D6; color: #9A7B12; border-color: #EAD89A; }
.st-aog         { background: #F7DEE2; color: var(--bad); border-color: #EBBDC5; }

.risk-high { background: #F7DEE2; color: var(--bad); border-color: #EBBDC5; }
.risk-med  { background: #FBF3D6; color: #9A7B12; border-color: #EAD89A; }
.risk-low  { background: #E4F1EA; color: var(--ok); border-color: #BFE0CD; }

.pii-yes { background: #F7DEE2; color: var(--bad); border-color: #EBBDC5; }
.pii-no  { background: var(--card); color: var(--muted); border-color: var(--line); }

.chip-criticality.High { color: var(--bad); font-weight: 700; }
.chip-criticality.Med  { color: #9A7B12; font-weight: 700; }
.chip-criticality.Low  { color: var(--muted); }

/* Tiny inline health bar */
.healthbar { display: inline-flex; align-items: center; gap: 7px; }
.healthbar .track { width: 70px; height: 7px; border-radius: 4px; background: var(--line); overflow: hidden; }
.healthbar .fill { height: 100%; border-radius: 4px; }

/* ----------------------------------------------------------------- Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--teal);
  background: var(--teal);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background .12s, transform .04s;
}
.btn:hover { background: var(--teal-mid); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-orange { background: var(--orange); border-color: var(--orange); }
.btn-orange:hover { background: var(--orange-dk); }
.btn-ghost { background: #fff; color: var(--teal); }
.btn-ghost:hover { background: var(--card); }
.btn-sm { padding: 6px 12px; font-size: 13px; }

/* ----------------------------------------------------------------- Filters */
.filterbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 14px;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 14px 18px;
  margin-bottom: 18px;
}
.field { display: flex; flex-direction: column; gap: 4px; }
.field label { font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .4px; }
.field select, .field input[type=text] {
  font-family: inherit;
  font-size: 14.5px;
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--text);
  min-width: 190px;
}
.field select:focus, .field input:focus { outline: 2px solid var(--teal-mid); border-color: var(--teal-mid); }

/* ----------------------------------------------------------------- NLQ box */
.nlq {
  background: linear-gradient(135deg, var(--teal) 0%, var(--teal-mid) 100%);
  border-radius: var(--radius);
  padding: 20px 22px;
  color: #fff;
  box-shadow: var(--shadow-lg);
  margin-bottom: 18px;
}
.nlq h3 { margin: 0 0 4px; font-size: 18px; display: flex; align-items: center; gap: 9px; }
.nlq .sub { color: #CFE4E8; font-size: 13px; margin-bottom: 14px; }
.nlq-form { display: flex; gap: 10px; }
.nlq-form input[type=text] {
  flex: 1;
  font-family: inherit;
  font-size: 15.5px;
  padding: 11px 15px;
  border: none;
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--text);
}
.nlq-form input:focus { outline: 3px solid var(--orange); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.chip {
  background: rgba(255, 255, 255, .14);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, .28);
  padding: 7px 13px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background .12s;
}
.chip:hover { background: var(--orange); border-color: var(--orange); }

.nlq-answer {
  background: var(--white);
  color: var(--text);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border-left: 4px solid var(--orange);
  padding: 18px 20px;
  margin-bottom: 18px;
}
.nlq-answer .q { font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.nlq-answer .a { font-size: 17px; font-weight: 600; color: var(--teal); margin-bottom: 12px; }
.nlq-answer .a .big { color: var(--orange-dk); }
.source-line {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
  color: var(--muted);
  font-size: 12.5px;
  display: flex;
  align-items: center;
  gap: 7px;
}
.source-line .lock { color: var(--ok); }
.nlq-loading { color: var(--muted); font-style: italic; }
.nlq-suggest { color: var(--muted); font-size: 13.5px; }

/* ----------------------------------------------------------------- Home */
.hero {
  background: linear-gradient(125deg, var(--teal-deep) 0%, var(--teal) 55%, var(--teal-mid) 100%);
  border-radius: 16px;
  padding: 38px 40px;
  color: #fff;
  margin-bottom: 22px;
  position: relative;
  overflow: hidden;
}
.hero h1 { margin: 0 0 8px; font-size: 32px; letter-spacing: .3px; }
.hero p { margin: 0; font-size: 16.5px; color: #D6E6E9; max-width: 70ch; }
.hero .hero-mark { position: absolute; right: -30px; bottom: -40px; opacity: .12; }

.c4-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
@media (max-width: 1100px) { .c4-grid { grid-template-columns: repeat(2, 1fr); } }
.c4-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  border-top: 4px solid var(--orange);
}
.c4-card .step { font-size: 12px; font-weight: 700; color: var(--orange); letter-spacing: 1px; }
.c4-card h3 { margin: 4px 0 8px; color: var(--teal); font-size: 19px; }
.c4-card p { margin: 0; color: var(--muted); font-size: 13.5px; }

.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 4px; }
@media (max-width: 1100px) { .tiles { grid-template-columns: 1fr; } }
.tile {
  display: block;
  background: var(--white);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
  border-left: 5px solid var(--teal);
  transition: transform .1s, box-shadow .1s;
  color: var(--text);
}
.tile:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); text-decoration: none; }
.tile .uc { font-size: 12px; font-weight: 700; color: var(--orange); letter-spacing: .6px; }
.tile h3 { margin: 5px 0 8px; color: var(--teal); font-size: 20px; }
.tile p { margin: 0 0 12px; color: var(--muted); font-size: 13.5px; }
.tile .go { color: var(--teal-mid); font-weight: 700; font-size: 14px; }

/* ------------------------------------------------------ Connected thread */
.thread { display: flex; align-items: stretch; gap: 0; overflow-x: auto; padding: 4px 0; }
.thread .node {
  flex: 1 1 0;
  min-width: 170px;
  background: var(--white);
  border: 1px solid var(--line);
  border-top: 3px solid var(--teal);
  border-radius: var(--radius-sm);
  padding: 13px 15px;
}
.thread .node .stage { font-size: 11px; font-weight: 700; color: var(--orange); text-transform: uppercase; letter-spacing: .5px; }
.thread .node .headline { font-size: 19px; font-weight: 700; color: var(--teal); margin: 3px 0; }
.thread .node .detail { font-size: 12.5px; color: var(--muted); }
.thread .arrow { display: flex; align-items: center; color: var(--orange); font-size: 26px; padding: 0 8px; flex: 0 0 auto; }

/* ----------------------------------------------------------------- Lineage */
#lineage { height: 420px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #FbFcFc; }

/* Record-to-report lineage as readable stage columns */
.lineage-cols { display: flex; align-items: flex-start; gap: 0; overflow-x: auto; padding: 4px 0 8px; }
.lin-col { flex: 1 1 0; min-width: 190px; display: flex; flex-direction: column; gap: 9px; }
.lin-col-head {
  font-size: 12px; font-weight: 700; color: var(--orange); text-transform: uppercase;
  letter-spacing: .6px; text-align: center; padding: 4px 2px 9px; border-bottom: 2px solid var(--line);
  margin-bottom: 3px;
}
.lin-flow { align-self: center; color: var(--orange); font-size: 26px; padding: 0 10px; flex: 0 0 auto; }
.lin-card {
  background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--muted);
  border-radius: 8px; padding: 9px 11px; cursor: pointer; transition: opacity .12s, box-shadow .12s;
}
.lin-card:hover { box-shadow: var(--shadow); }
.lin-card .lin-name { font-weight: 700; color: var(--teal); font-size: 13.5px; line-height: 1.25; }
.lin-card .lin-meta { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.lin-card[data-cls="Public"] { border-left-color: var(--cls-public); }
.lin-card[data-cls="Restricted"] { border-left-color: var(--cls-restricted); }
.lin-card[data-cls="Confidential"] { border-left-color: var(--cls-confidential); }
.lin-card[data-cls="Secret"] { border-left-color: var(--cls-secret); }
.lin-card.hl { box-shadow: 0 0 0 2px var(--orange); }
.lin-card.dim { opacity: .28; }
@media (max-width: 900px) { .lineage-cols { flex-direction: column; } .lin-flow { transform: rotate(90deg); } }
.legend { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 10px; font-size: 12.5px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend .sw { width: 13px; height: 13px; border-radius: 3px; display: inline-block; }

/* ----------------------------------------------------------------- RBAC */
.rbac-row.redacted td { color: #B6C2C6; font-style: italic; }
.redacted-cell { color: var(--bad); font-weight: 700; }
.role-desc { background: var(--card); border-radius: var(--radius-sm); padding: 12px 15px; font-size: 13.5px; color: var(--text); margin-bottom: 14px; }
.role-desc b { color: var(--teal); }

/* ----------------------------------------------------------------- Misc */
.rec {
  background: var(--sand);
  border-left: 3px solid var(--orange);
  padding: 7px 10px;
  border-radius: 5px;
  font-size: 12.5px;
  color: #6b4a2f;
}
/* ----------------------------------------------------------------- Tabs */
.tabset { width: 100%; }
.tabbar {
  position: sticky;
  top: 62px;                 /* sits directly under the sticky top bar */
  z-index: 15;
  display: flex;
  gap: 2px;
  flex-wrap: wrap;
  background: var(--bg);
  border-bottom: 2px solid var(--line);
  margin: 0 0 18px;
  padding-top: 6px;
}
.tab-btn {
  padding: 11px 20px;
  border: none;
  background: none;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  white-space: nowrap;
  transition: color .12s;
}
.tab-btn:hover { color: var(--teal); }
.tab-btn.active { color: var(--teal); border-bottom-color: var(--orange); }
.tab-btn .pip {
  display: inline-block;
  margin-left: 7px;
  background: var(--card);
  color: var(--muted);
  border-radius: 999px;
  padding: 1px 8px;
  font-size: 12px;
}
.tab-btn.active .pip { background: var(--sand); color: var(--orange-dk); }
.tab-panel { display: none; }
.tab-panel.active { display: block; animation: fadein .18s ease; }
@keyframes fadein { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* ------------------------------------------------- Expandable rows (3-way) */
tr.row-toggle { cursor: pointer; }
tr.row-toggle:hover > td { background: #E3EEF0; }
tr.row-toggle .exp { color: var(--orange); font-weight: 700; display: inline-block; transition: transform .12s; }
tr.row-toggle.open .exp { transform: rotate(90deg); }
tr.detail-row { display: none; }
tr.detail-row.open { display: table-row; }
tr.detail-row > td { background: var(--sand); padding: 0; border-bottom: 1px solid var(--line); }
.recon-wrap { padding: 14px 16px; }
.three-way { display: flex; align-items: stretch; gap: 0; flex-wrap: wrap; }
.three-way .tw-node {
  flex: 1 1 0; min-width: 160px; background: #fff; border: 1px solid var(--line);
  border-top: 3px solid var(--teal); border-radius: 8px; padding: 10px 13px;
}
.three-way .tw-node.bad { border-top-color: var(--bad); }
.three-way .tw-stage { display: block; font-size: 11px; font-weight: 700; color: var(--orange); text-transform: uppercase; letter-spacing: .4px; margin-bottom: 3px; }
.three-way .tw-node b { color: var(--teal); font-size: 15px; }
.three-way .tw-arrow { display: flex; align-items: center; color: var(--orange); font-size: 22px; padding: 0 8px; }
.recon-verdict { margin-top: 11px; padding: 9px 12px; border-radius: 8px; font-weight: 600; font-size: 13.5px; }
.recon-verdict.ok { background: #E4F1EA; color: var(--ok); border: 1px solid #C2E0CE; }
.recon-verdict.bad { background: #F7DEE2; color: var(--bad); border: 1px solid #EBBDC5; }
.recon-verdict .lines { margin-top: 5px; font-weight: 400; color: var(--text); }

/* ------------------------------------------------- Command 360 theatre */
.theatre {
  position: relative; height: 330px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: radial-gradient(circle at 58% 45%, #EAF1F2, #F7EEE4); overflow: hidden;
}
.theatre .hub {
  position: absolute; left: 50%; top: 47%; transform: translate(-50%, -50%);
  background: var(--teal); color: #fff; border-radius: 10px; padding: 9px 15px; text-align: center;
  box-shadow: var(--shadow-lg);
}
.theatre .hub b { font-size: 18px; }
.theatre .hub span { display: block; font-size: 11px; color: var(--sand); }
.theatre .front {
  position: absolute; width: 40%; max-width: 215px; background: #fff; border: 1px solid var(--line);
  border-top: 3px solid var(--bad); border-radius: 8px; padding: 8px 11px; box-shadow: var(--shadow);
}
.theatre .front.p { border-top-color: var(--muted); }
.theatre .front .fcode { font-weight: 700; color: var(--bad); font-size: 11px; letter-spacing: .4px; }
.theatre .front.p .fcode { color: var(--muted); }
.theatre .front .fname { font-weight: 700; color: var(--teal); font-size: 13.5px; }
.theatre .front .fmeta { font-size: 11px; color: var(--muted); line-height: 1.3; }
.theatre .front.w { left: 2.5%; top: 25%; }
.theatre .front.n { right: 2.5%; top: 4%; }
.theatre .front.p { left: 31%; bottom: 5%; }
.theatre .axis { position: absolute; font-size: 11.5px; font-weight: 700; color: var(--orange-dk); white-space: nowrap; }
.theatre .axis.w { left: 3%; top: 64%; }
.theatre .axis.n { right: 3%; top: 48%; }

.domain-strip { display: flex; flex-wrap: wrap; gap: 8px; }
.domain-chip {
  display: flex; flex-direction: column; gap: 1px; background: var(--card); border-radius: 8px;
  padding: 8px 12px; text-decoration: none; color: var(--text); border-left: 3px solid var(--teal-mid);
}
.domain-chip:hover { background: #E3EEF0; text-decoration: none; }
.domain-chip .dn { font-weight: 700; color: var(--teal); font-size: 12.5px; }
.domain-chip .dm { font-size: 11px; color: var(--muted); }

/* ------------------------------ Command 360 dark command-center board */
.cmd-dash {
  background: linear-gradient(135deg, #0A2A33 0%, #0A3640 55%, #0B2730 100%);
  border-radius: 14px; padding: 16px 18px 18px; box-shadow: var(--shadow-lg);
  color: #DCE8EA; margin-bottom: 18px;
}
.cmd-dash-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  border-bottom: 1px solid rgba(255,255,255,.12); padding-bottom: 10px; margin-bottom: 14px;
}
.cmd-dash-head .t { font-size: 15.5px; font-weight: 700; letter-spacing: 1px; color: #fff; }
.cmd-dash-head .s { font-size: 11px; letter-spacing: 1px; color: var(--orange); white-space: nowrap; }
.cd-row { display: grid; gap: 14px; margin-bottom: 14px; }
.cd-row.r3 { grid-template-columns: 0.95fr 1.25fr 1.05fr; }
.cd-row.r2 { grid-template-columns: 1fr 1fr; }
.cd-row.r4 { grid-template-columns: repeat(4, 1fr); }
.cd-row:last-child { margin-bottom: 0; }
@media (max-width: 1150px) { .cd-row.r3, .cd-row.r2 { grid-template-columns: 1fr; } .cd-row.r4 { grid-template-columns: 1fr 1fr; } }
.cd-panel { background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.09); border-radius: 10px; padding: 12px 14px; }
.cd-title {
  font-size: 11px; font-weight: 700; letter-spacing: .6px; color: #9DC0C7; text-transform: uppercase;
  margin-bottom: 11px; border-left: 3px solid var(--orange); padding-left: 8px;
  display: flex; justify-content: space-between; align-items: center;
}
.cd-kpi { display: flex; align-items: baseline; justify-content: space-between; padding: 6px 0; border-bottom: 1px dashed rgba(255,255,255,.09); }
.cd-kpi:last-child { border-bottom: none; }
.cd-kpi .cl { font-size: 13px; color: #B8CDD2; }
.cd-kpi .cv { font-size: 20px; font-weight: 700; color: #fff; }
.cd-kpi .cv small { font-size: 12px; color: #8FA8AE; }
.cv.bad { color: #FF8A98; } .cv.warn { color: #F2C94C; } .cv.good { color: #67D69A; } .cv.accent { color: #F0A35E; }
.cd-bars { display: flex; flex-direction: column; gap: 9px; }
.cd-bar { display: grid; grid-template-columns: 130px 1fr 52px; align-items: center; gap: 10px; }
.cd-bar .bl { font-size: 12.5px; color: #C2D6DA; }
.cd-bar .bt { height: 14px; background: rgba(255,255,255,.10); border-radius: 7px; overflow: hidden; }
.cd-bar .bf { height: 100%; border-radius: 7px; }
.cd-bar .bv { font-size: 12.5px; font-weight: 700; color: #fff; text-align: right; }
.cd-mini .cl { font-size: 11px; font-weight: 700; letter-spacing: .5px; color: #9DC0C7; text-transform: uppercase; }
.cd-mini .cv { font-size: 24px; font-weight: 700; color: #fff; margin-top: 2px; }
.cd-mini .cs { font-size: 11.5px; color: #8FA8AE; }
.cd-rec { font-size: 12.5px; color: #D7E5E8; background: rgba(255,255,255,.05); border-left: 3px solid var(--orange); border-radius: 5px; padding: 7px 9px; margin-bottom: 7px; }
.cd-rec b { color: #fff; }
.cd-link { color: #6FD3C2; font-weight: 600; font-size: 12px; text-decoration: none; }
.cd-link:hover { text-decoration: underline; color: #8FE0D2; }
.cd-radar { width: 100%; height: 232px; display: block; }
#c360-ai p { color: #D7E5E8; font-size: 13px; }

/* ------------------------------------------ Executive briefing (LLM narrative) */
.briefing {
  background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow);
  border-left: 4px solid var(--orange); padding: 15px 20px; margin-bottom: 18px;
}
.briefing > h3 {
  margin: 0 0 9px; color: var(--teal); font-size: 16px; display: flex; align-items: center; gap: 9px;
}
.briefing > h3 .spark { color: var(--orange); }
.briefing .body { font-size: 14.5px; line-height: 1.62; color: var(--text); }
.briefing .body p { margin: 0 0 9px; }
.briefing .body p:last-child { margin-bottom: 0; }
.briefing.sand { background: var(--sand); }

/* Compact AI "so-what" caption under a chart/visual */
.ai-sowhat { margin-top: 9px; padding-top: 8px; border-top: 1px dashed var(--line); font-size: 12.5px; color: var(--muted); }
.ai-sowhat p { margin: 0; display: inline; }
.ai-sowhat .spark { color: var(--orange); margin-right: 5px; }
.cd-panel .ai-sowhat { border-top-color: rgba(255,255,255,.13); color: #AEC6CB; }
.cd-panel .ai-sowhat p { color: #AEC6CB; }

.muted { color: var(--muted); }
.nowrap { white-space: nowrap; }
.tag-soft { background: var(--card); color: var(--teal-mid); padding: 2px 8px; border-radius: 6px; font-size: 12px; font-weight: 600; }
.flex { display: flex; }
.gap-8 { gap: 8px; }
.mt-0 { margin-top: 0; }
.spacer-v { height: 8px; }
hr.soft { border: none; border-top: 1px solid var(--line); margin: 16px 0; }

/* ============================================================================
   Capability Diagnostic — narrative "strategic report" styling (Command 360)
   Eyebrow -> serif headline -> intro -> data viz -> AI read -> KEY INSIGHT / ACTION
   ========================================================================== */
.rpt { --serif: Georgia, "Times New Roman", "PT Serif", serif; }

/* Sticky section index */
.rpt-nav {
  position: sticky; top: 62px; z-index: 15;
  display: flex; flex-wrap: wrap; gap: 6px;
  background: rgba(244, 247, 248, .94); backdrop-filter: blur(4px);
  padding: 10px 2px; margin: -6px 0 18px; border-bottom: 1px solid var(--line);
}
.rpt-nav a {
  display: inline-flex; align-items: baseline; gap: 6px;
  font-size: 12px; font-weight: 600; color: var(--muted);
  padding: 5px 11px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--white); white-space: nowrap;
}
.rpt-nav a .n { font-family: var(--serif); color: var(--orange); font-weight: 700; }
.rpt-nav a:hover { border-color: var(--orange); color: var(--teal); text-decoration: none; }
.rpt-nav a.active { background: var(--teal); border-color: var(--teal); color: #fff; }
.rpt-nav a.active .n { color: #F4C9A8; }

/* Section block — shown one at a time, selected from the .rpt-nav tab bar */
.rpt-sec { display: none; padding: 8px 0 30px; }
.rpt-sec.active { display: block; }
.rpt-eyebrow {
  font-size: 12px; font-weight: 700; letter-spacing: 1.4px; text-transform: uppercase;
  color: var(--orange); margin: 0 0 8px;
}
.rpt-headline {
  font-family: var(--serif); font-weight: 700; color: var(--teal-deep);
  font-size: 27px; line-height: 1.2; margin: 0 0 10px; max-width: 60ch;
}
.rpt-intro { font-size: 15px; line-height: 1.6; color: var(--muted); margin: 0 0 18px; max-width: 78ch; }

/* Stat cards with coloured top border */
.rpt-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 205px)); justify-content: start; gap: 12px; margin: 0 0 18px; }
.rpt-card {
  background: var(--white); border: 1px solid var(--line); border-top: 4px solid var(--teal);
  border-radius: var(--radius-sm); padding: 12px 15px; box-shadow: var(--shadow);
}
.rpt-card.red    { border-top-color: var(--bad); }
.rpt-card.amber  { border-top-color: var(--warn); }
.rpt-card.navy   { border-top-color: var(--teal); }
.rpt-card.green  { border-top-color: var(--ok); }
.rpt-card.orange { border-top-color: var(--orange); }
.rpt-card .v { font-family: var(--serif); font-size: 24px; font-weight: 700; color: var(--teal-deep); line-height: 1.08; }
.rpt-card .v small { font-size: 13px; color: var(--muted); font-family: Calibri, sans-serif; font-weight: 600; }
.rpt-card.red .v    { color: var(--bad); }
.rpt-card.amber .v  { color: #9A7B16; }
.rpt-card.green .v  { color: var(--ok); }
.rpt-card .l { display: block; margin-top: 7px; font-size: 12.5px; line-height: 1.4; color: var(--muted); }

/* Labelled horizontal bars */
.rpt-bars { margin: 0 0 18px; }
.rpt-bars-title {
  font-size: 12px; font-weight: 700; letter-spacing: .8px; text-transform: uppercase;
  color: var(--teal); margin: 0 0 12px;
}
.rpt-bar { display: grid; grid-template-columns: 190px 1fr 64px; align-items: center; gap: 12px; margin-bottom: 9px; }
.rpt-bar .rl { font-size: 13px; color: var(--text); text-align: right; }
.rpt-bar .rt { height: 16px; background: var(--card); border-radius: 5px; overflow: hidden; }
.rpt-bar .rf { display: block; height: 100%; border-radius: 5px; background: var(--teal); min-width: 3px; }
.rpt-bar .rf.red { background: var(--bad); } .rpt-bar .rf.amber { background: var(--warn); }
.rpt-bar .rf.navy { background: var(--teal); } .rpt-bar .rf.green { background: var(--ok); }
.rpt-bar .rf.orange { background: var(--orange); }
.rpt-bar .rv { font-family: var(--serif); font-weight: 700; font-size: 15px; color: var(--teal-deep); }
.rpt-bar .rv small { font-family: Calibri, sans-serif; font-weight: 600; font-size: 12px; color: var(--muted); }
.rpt-bar.money { grid-template-columns: 200px 1fr 104px; }
@media (max-width: 720px) {
  .rpt-bar { grid-template-columns: 120px 1fr 48px; }
  .rpt-bar.money { grid-template-columns: 120px 1fr 92px; }
}

/* Two-up layout (readiness tables, threat) */
.rpt-two { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 18px; }
@media (max-width: 900px) { .rpt-two { grid-template-columns: 1fr; } }
.rpt-block-title { font-size: 14px; font-weight: 700; color: var(--teal); margin: 0 0 10px; }
.rpt-block-title small { font-weight: 600; color: var(--muted); font-size: 12px; }

/* Decomposed bullet list (orange squares) */
.rpt-bullets { list-style: none; margin: 0 0 18px; padding: 0; }
.rpt-bullets li { position: relative; padding: 6px 0 6px 22px; font-size: 14px; line-height: 1.5; color: var(--text); }
.rpt-bullets li::before { content: ""; position: absolute; left: 0; top: 11px; width: 9px; height: 9px; background: var(--orange); border-radius: 2px; }
.rpt-bullets li b { color: var(--teal); }

/* Compact live AI read under the data viz */
.rpt-ai { margin: 4px 0 18px; padding: 9px 13px; background: var(--sand); border-radius: var(--radius-sm);
          font-size: 13px; line-height: 1.5; color: var(--text); }
.rpt-ai .spark { color: var(--orange); margin-right: 6px; }
.rpt-ai .tag-soft { margin-left: 6px; }
.rpt-ai p { margin: 0; display: inline; }
.rpt-ai .nlq-loading { display: inline; }

/* KEY INSIGHT (navy) + ACTION (orange) callouts */
.rpt-callout { display: flex; align-items: stretch; gap: 0; border-radius: var(--radius-sm); overflow: hidden;
               box-shadow: var(--shadow); margin: 0 0 12px; border: 1px solid var(--line); }
.rpt-callout .lab {
  flex: 0 0 116px; display: flex; align-items: center;
  font-size: 12px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: #fff;
  padding: 14px 16px; line-height: 1.25;
}
.rpt-callout .txt { flex: 1; padding: 14px 18px; background: var(--white); font-size: 14px; line-height: 1.6; color: var(--text); }
.rpt-callout .txt b { color: var(--teal); }
.rpt-callout.key .lab { background: var(--teal-deep); }
.rpt-callout.key .txt { background: #F3F7F8; }
.rpt-callout.act .lab { background: var(--orange); }
.rpt-callout.act .txt { background: #FCF6F0; }
@media (max-width: 620px) { .rpt-callout { flex-direction: column; } .rpt-callout .lab { flex-basis: auto; } }

/* "What needs senior attention now" list */
.rpt-attention { background: var(--white); border: 1px solid var(--line); border-left: 4px solid var(--orange);
                 border-radius: var(--radius-sm); padding: 14px 20px; margin: 0 0 12px; box-shadow: var(--shadow); }
.rpt-attention h4 { margin: 0 0 10px; font-size: 12px; font-weight: 700; letter-spacing: 1px;
                    text-transform: uppercase; color: var(--orange-dk); }
.rpt-attention ul { list-style: none; margin: 0; padding: 0; }
.rpt-attention li { position: relative; padding: 6px 0 6px 22px; font-size: 14px; line-height: 1.5;
                    border-top: 1px dashed var(--line); }
.rpt-attention li:first-child { border-top: none; }
.rpt-attention li::before { content: ""; position: absolute; left: 0; top: 12px; width: 9px; height: 9px;
                            background: var(--orange); border-radius: 2px; }

/* Bottom line */
.rpt-bottomline { background: linear-gradient(120deg, var(--teal-deep), var(--teal)); color: #EAF3F4;
                  border-radius: var(--radius-sm); padding: 18px 22px; margin: 14px 0 0; box-shadow: var(--shadow-lg); }
.rpt-bottomline h4 { margin: 0 0 8px; font-size: 12px; font-weight: 700; letter-spacing: 1.2px;
                     text-transform: uppercase; color: var(--orange); }
.rpt-bottomline p { margin: 0; font-family: var(--serif); font-size: 16px; line-height: 1.62; }
.rpt-bottomline p b { color: #fff; }

.rpt-foot { font-size: 12px; color: var(--muted); margin: 22px 0 6px; padding-top: 14px;
            border-top: 1px solid var(--line); line-height: 1.55; font-style: italic; }

/* --- Full-width section flow: data spans width, AI strip, then INSIGHT|ACTION band --- */
.rpt-strip { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 20px; margin: 2px 0 16px; }
.rpt-strip .rpt-ai { flex: 1 1 360px; margin: 0; }
.rpt-strip .rpt-ask { flex: 0 1 auto; }
.rpt-callouts { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: stretch; margin-bottom: 14px; }
.rpt-callouts .rpt-callout { margin: 0; height: 100%; }
@media (max-width: 820px) { .rpt-callouts { grid-template-columns: 1fr; } }

/* Clickable data points (drill-down cue) */
.rpt-card[data-drill], .rpt-bar[data-drill] { cursor: pointer; }
.rpt-card[data-drill] { transition: box-shadow .12s, transform .12s; position: relative; }
.rpt-card[data-drill]:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.rpt-card .drill-cue { display: block; margin-top: 9px; font-size: 10.5px; font-weight: 700; letter-spacing: .6px;
                       text-transform: uppercase; color: var(--orange); opacity: 0; transition: opacity .12s; }
.rpt-card[data-drill]:hover .drill-cue { opacity: 1; }
.rpt-bar[data-drill] { border-radius: 6px; padding: 3px 8px; margin-left: -8px; transition: background .12s; }
.rpt-bar[data-drill]:hover { background: var(--sand); }
.rpt-bar[data-drill]:hover .rt { box-shadow: 0 0 0 2px var(--orange); }
table.data tr[data-drill] { cursor: pointer; }
table.data tr[data-drill]:hover > td { background: var(--sand); }
table.data tr[data-drill]:hover td.strong { color: var(--orange-dk); }
table.data tr[data-drill] td.strong::after { content: " \203A"; color: var(--orange); font-weight: 700; opacity: 0; }
table.data tr[data-drill]:hover td.strong::after { opacity: 1; }

/* Interactive "ask" chips */
.rpt-ask { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; }
.rpt-ask-label { font-size: 12px; font-weight: 700; color: var(--orange-dk); margin-right: 2px; }
.ask-chip { font-family: inherit; font-size: 12.5px; cursor: pointer; background: var(--white);
            border: 1px solid var(--line); color: var(--teal); padding: 5px 11px; border-radius: 999px; }
.ask-chip:hover { border-color: var(--orange); background: var(--sand); }

/* Drill-through slide-over drawer */
.drawer-overlay { position: fixed; inset: 0; background: rgba(10, 40, 48, .34); z-index: 60; animation: skfade .2s ease; }
@keyframes skfade { from { opacity: 0; } to { opacity: 1; } }
.drawer { position: fixed; top: 0; right: 0; height: 100vh; width: 440px; max-width: 92vw; background: var(--white);
          box-shadow: -10px 0 36px rgba(16, 40, 48, .24); z-index: 61; transform: translateX(100%);
          transition: transform .24s ease; display: flex; flex-direction: column; }
.drawer.open { transform: translateX(0); }
.drawer-head { padding: 20px 22px 17px; position: relative; color: #EAF3F4;
               background: linear-gradient(122deg, var(--teal-deep), var(--teal)); }
.drawer-eyebrow { font-size: 11px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; color: #F4C9A8; }
.drawer-head h3 { margin: 8px 0 0; font-family: Georgia, "Times New Roman", serif; font-size: 20px; line-height: 1.28; color: #fff; }
.drawer-value { margin-top: 7px; font-size: 14px; font-weight: 600; color: #BFE0E6; }
.drawer-x { position: absolute; top: 12px; right: 14px; background: transparent; border: none; color: #EAF3F4;
            font-size: 27px; line-height: 1; cursor: pointer; padding: 2px 6px; }
.drawer-x:hover { color: #fff; }
.drawer-body { padding: 18px 22px 26px; overflow-y: auto; font-size: 14px; line-height: 1.62; color: var(--text); }
.drawer-body .nlq-loading { color: var(--muted); }
.drawer-body p { margin: 0 0 11px; }
.through-btn { display: block; margin-top: 16px; background: var(--orange); color: #fff; font-weight: 700;
               padding: 12px 16px; border-radius: 8px; text-align: center; }
.through-btn:hover { background: var(--orange-dk); text-decoration: none; color: #fff; }
.through-cap { margin-top: 18px; font-size: 11.5px; font-weight: 700; letter-spacing: .8px; text-transform: uppercase; color: var(--muted); }

/* --- Collapsible page intro (toggle in topbar) + collapsible filter bars --- */
.intro-toggle { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; font-family: inherit;
  font-size: 12.5px; font-weight: 600; color: var(--teal-mid); background: var(--card);
  border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px; white-space: nowrap; }
.intro-toggle:hover { border-color: var(--orange); color: var(--teal); }
.intro-toggle .chev { font-size: 9px; transition: transform .15s; }
.intro-toggle[aria-expanded="false"] .chev { transform: rotate(-90deg); }
.page-intro.collapsed { display: none; }

.filterbar .filter-toggle { display: inline-flex; align-items: center; gap: 7px; cursor: pointer; font-family: inherit;
  font-size: 13px; font-weight: 700; color: var(--teal); background: transparent; border: none; padding: 7px 2px; }
.filterbar .filter-toggle:hover { color: var(--orange-dk); }
.filterbar .filter-toggle .chev { font-size: 9px; color: var(--orange); transition: transform .15s; }
.filterbar.collapsed .filter-toggle .chev { transform: rotate(-90deg); }
.filterbar .filter-summary { font-size: 13px; color: var(--muted); }
.filterbar .filter-summary b { color: var(--teal); font-weight: 600; }
.filterbar.collapsed { align-items: center; row-gap: 8px; }
.filterbar.collapsed .field,
.filterbar.collapsed .btn-ghost,
.filterbar.collapsed > div[style*="flex"] { display: none; }
.filterbar.collapsed .btn-orange { margin-left: auto; }
.filterbar:not(.collapsed) .filter-summary { display: none; }

/* ============================================================================
   Blueprint tab — Taxonomy / Ontology / Process / Data / Business visuals
   ========================================================================== */
/* Colored-top taxonomy panels with bullet hierarchy */
.bp-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 18px; }
@media (max-width: 900px) { .bp-grid { grid-template-columns: 1fr; } }
.bp-panel { background: var(--white); border: 1px solid var(--line); border-top: 3px solid var(--teal);
  border-radius: var(--radius-sm); padding: 14px 18px 16px; box-shadow: var(--shadow); }
.bp-panel.navy { border-top-color: var(--teal); } .bp-panel.green { border-top-color: var(--ok); }
.bp-panel.amber { border-top-color: var(--orange); } .bp-panel.red { border-top-color: var(--bad); }
.bp-panel h4 { margin: 0 0 9px; font-size: 14.5px; color: var(--teal); font-weight: 700; }
.bp-tree, .bp-tree .sub { list-style: none; margin: 0; padding: 0; }
.bp-tree > li { position: relative; padding: 4px 0 4px 16px; font-size: 13.5px; color: var(--text); line-height: 1.4; }
.bp-tree > li::before { content: "\203A"; position: absolute; left: 1px; top: 4px; color: var(--orange); font-weight: 700; }
.bp-tree .sub { margin: 3px 0 2px; }
.bp-tree .sub li { position: relative; padding: 2px 0 2px 16px; font-size: 12.5px; color: var(--muted); line-height: 1.4; }
.bp-tree .sub li::before { content: "·"; position: absolute; left: 5px; top: 1px; color: var(--teal-mid); font-weight: 700; }

/* Ontology entity cards */
.bp-groups { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }
.bp-chip { font-size: 11.5px; font-weight: 600; padding: 3px 11px; border-radius: 999px; border: 1px solid var(--line); }
.bp-chip.navy { background: #E7EEF0; color: var(--teal); } .bp-chip.green { background: #E4F1EA; color: #216B4A; }
.bp-chip.amber { background: var(--sand); color: var(--orange-dk); } .bp-chip.red { background: #FBEDEE; color: var(--bad); }
.bp-ents { display: grid; grid-template-columns: repeat(auto-fit, minmax(225px, 1fr)); gap: 11px; margin-bottom: 18px; }
.bp-ent { background: var(--white); border: 1px solid var(--line); border-left: 4px solid var(--teal);
  border-radius: var(--radius-sm); padding: 9px 13px; box-shadow: var(--shadow); }
.bp-ent.navy { border-left-color: var(--teal); } .bp-ent.green { border-left-color: var(--ok); }
.bp-ent.amber { border-left-color: var(--orange); } .bp-ent.red { border-left-color: var(--bad); }
.bp-ent .en { font-weight: 700; color: var(--teal-deep); font-size: 13.5px; }
.bp-ent .ea { font-family: "Cascadia Code", Consolas, monospace; font-size: 11px; color: var(--teal-mid); margin-top: 2px; word-spacing: -1px; }
.bp-ent .enote { font-size: 11.5px; color: var(--muted); margin-top: 2px; }

/* Ontology II knowledge-graph SVG */
.bp-graph { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 8px; box-shadow: var(--shadow); margin-bottom: 18px; }
.bp-graph svg { width: 100%; height: auto; display: block; aspect-ratio: 1150 / 595; }

/* Process-map swimlanes */
.bp-swim-wrap { overflow-x: auto; margin-bottom: 18px; }
.bp-swim { display: grid; grid-template-columns: 150px repeat(5, minmax(150px, 1fr)); min-width: 760px;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; box-shadow: var(--shadow); }
.bp-swim-corner { background: var(--teal-deep); color: #fff; font-weight: 700; font-size: 12px; padding: 11px 12px; display: flex; align-items: center; }
.bp-swim-ph { background: #EEF3F4; color: var(--teal); font-weight: 700; font-size: 11.5px; text-transform: uppercase;
  letter-spacing: .5px; text-align: center; padding: 11px 8px; border-left: 1px solid var(--line); }
.bp-swim-lane { background: #F4F7F8; font-weight: 700; font-size: 12.5px; color: var(--teal); padding: 10px 12px;
  border-top: 1px solid var(--line); display: flex; align-items: center; }
.bp-swim-cell { border-top: 1px solid var(--line); border-left: 1px solid var(--line); padding: 14px 10px; min-height: 72px; }
.bp-step { position: relative; border: 1.5px solid var(--teal); border-radius: 6px; background: var(--white);
  padding: 7px 10px; box-shadow: 0 1px 2px rgba(16,40,48,.08); }
.bp-step .n { position: absolute; top: -9px; left: -9px; width: 19px; height: 19px; border-radius: 50%;
  background: var(--orange); color: #fff; font-size: 10.5px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.bp-step .t { font-weight: 700; font-size: 12.5px; color: var(--teal-deep); line-height: 1.2; }
.bp-step .s { font-size: 11px; color: var(--muted); margin-top: 2px; }
.bp-step.green { border-color: var(--ok); background: #EAF5EF; } .bp-step.green .t { color: #216B4A; }
.bp-step.red { border-color: var(--bad); background: #FBEDEE; } .bp-step.red .t { color: var(--bad); }

/* Data-flow 4C pipeline */
.bp-src-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin-bottom: 4px; }
.bp-src { border: 1px dashed #B9C6CB; border-radius: var(--radius-sm); background: var(--white); padding: 8px 11px; }
.bp-src b { color: var(--teal); display: block; font-size: 12px; } .bp-src span { color: var(--muted); font-size: 11.5px; }
.bp-src-arrows { display: grid; grid-template-columns: repeat(5, 1fr); text-align: center; color: var(--orange); font-size: 13px; margin: 3px 0 9px; }
.bp-stages { display: flex; align-items: stretch; margin-bottom: 12px; }
.bp-stage { flex: 1; background: var(--white); border: 1px solid var(--line); border-top: 3px solid var(--teal);
  border-radius: var(--radius-sm); padding: 12px 15px; }
.bp-stage.navy { border-top-color: var(--teal); } .bp-stage.green { border-top-color: var(--ok); } .bp-stage.amber { border-top-color: var(--orange); }
.bp-stage-arrow { display: flex; align-items: center; color: var(--orange); font-size: 22px; padding: 0 7px; }
.bp-stage .eb { font-size: 11px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase; color: var(--orange); }
.bp-stage h4 { margin: 1px 0 8px; font-size: 14px; color: var(--teal); font-weight: 700; }
.bp-stage ul { list-style: none; margin: 0 0 9px; padding: 0; }
.bp-stage li { font-size: 12.5px; padding: 2px 0 2px 14px; position: relative; color: var(--text); }
.bp-stage li::before { content: "–"; position: absolute; left: 0; color: var(--muted); }
.bp-store { background: #EEF3F4; border-left: 3px solid var(--teal-mid); border-radius: 4px; padding: 6px 9px; font-size: 11.5px; color: var(--muted); }
.bp-store b { color: var(--teal); }
.bp-control { background: #FCF6F0; border: 1px solid #E9D6C3; border-radius: var(--radius-sm); padding: 10px 14px; margin: 0 0 14px; font-size: 12.5px; line-height: 1.5; }
.bp-control b { color: var(--orange-dk); }
.bp-outputs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 18px; }
.bp-output { background: var(--teal-deep); color: #fff; text-align: center; font-weight: 700; font-size: 13px; padding: 12px; border-radius: var(--radius-sm); }
@media (max-width: 820px) { .bp-stages { flex-direction: column; } .bp-stage-arrow { transform: rotate(90deg); padding: 6px 0; } .bp-outputs { grid-template-columns: 1fr; } }

/* Business-flow sense-to-act loop */
.bp-loop { display: flex; align-items: flex-start; justify-content: space-between; gap: 2px; margin-bottom: 10px; }
.bp-loop-step { flex: 1; text-align: center; padding: 0 4px; }
.bp-loop-circ { width: 50px; height: 50px; border-radius: 50%; background: var(--teal-deep); color: #fff;
  font-family: Georgia, serif; font-size: 21px; font-weight: 700; display: flex; align-items: center; justify-content: center; margin: 0 auto 7px; }
.bp-loop-step.amber .bp-loop-circ { background: var(--orange); }
.bp-loop-step .lt { font-weight: 700; color: var(--teal-deep); font-size: 13px; }
.bp-loop-step .ls { font-size: 11px; color: var(--muted); margin-top: 3px; line-height: 1.35; }
.bp-loop-arrow { display: flex; align-items: flex-start; padding-top: 16px; color: var(--orange); font-size: 15px; }
.bp-feedback { border: 1px dashed var(--teal-mid); border-radius: var(--radius-sm); padding: 8px 14px; text-align: center;
  font-size: 12.5px; color: var(--teal); margin-bottom: 16px; }
.bp-feedback b { color: var(--orange-dk); }
.bp-subhead { font-size: 12px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase; color: var(--orange); margin: 4px 0 10px; }
@media (max-width: 820px) { .bp-loop { flex-wrap: wrap; } .bp-loop-step { flex: 0 0 30%; margin-bottom: 10px; } .bp-loop-arrow { display: none; } }
