@import url('colors_and_type.css');

/* ============================================================
   PRISM — Federal Solicitation Monitoring (Stratavex)
   Dashboard application shell. Extends brand tokens.
   ============================================================ */

:root {
  /* functional status colors — harmonious with the teal accent, used sparingly */
  --go:        #5FB8A8;   /* PURSUE / GO / positive */
  --go-surface: rgba(95,184,168,0.10);
  --go-border:  rgba(95,184,168,0.26);
  --warn:      #C99A5B;   /* MONITOR / CONDITIONAL / caution (brand bronze) */
  --warn-surface: rgba(201,154,91,0.10);
  --warn-border:  rgba(201,154,91,0.28);
  --bad:       #C97E84;   /* PASS / NO-GO / negative (cool rose) */
  --bad-surface: rgba(201,126,132,0.10);
  --bad-border:  rgba(201,126,132,0.26);
  --violet:    #7E93D6;   /* secondary categorical */
  --lilac:     #9B8FD0;
  --sidebar-w: 244px;
  --topbar-h: 66px;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: 16px; }
body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}
.app-scroll { width: 100vw; height: 100vh; overflow-x: auto; overflow-y: hidden; }
button { background: none; border: none; color: inherit; font: inherit; cursor: pointer; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
::selection { background: rgba(91,163,192,0.3); color: var(--text-white); }

/* scrollbars */
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: #2e425f; }
::-webkit-scrollbar-track { background: transparent; }

/* ============================================================
   APP SHELL
   ============================================================ */
.app {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  height: 100vh;
  width: 100%;
  min-width: 1240px;
}

/* ─── Sidebar ─── */
.sidebar {
  background: var(--page-bg);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
}
.sb-brand {
  display: flex; align-items: center; gap: 11px;
  padding: 20px 22px 18px;
  border-bottom: 1px solid var(--border);
}
.sb-brand img { width: 30px; height: 30px; }
.sb-brand .wm {
  font-family: var(--font-display); font-weight: 700; font-size: 1.12rem;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-white);
}
.sb-brand .wm .v { color: var(--accent); }
.sb-brand .tier {
  font-size: 0.5rem; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--text-muted); margin-top: 2px;
}
.sb-scroll { flex: 1; overflow-y: auto; padding: 14px 12px; }
.sb-group { margin-bottom: 18px; }
.sb-group-label {
  font-size: 0.56rem; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--text-muted); font-weight: 600; padding: 0 12px 9px;
}
.sb-item {
  display: flex; align-items: center; gap: 10px;
  width: 100%; text-align: left;
  padding: 9px 11px; border-radius: var(--radius-sm);
  color: var(--text-secondary); font-size: 0.82rem; font-weight: 400;
  position: relative; transition: all 0.18s var(--ease); margin-bottom: 1px;
}
.sb-item svg { width: 17px; height: 17px; stroke: currentColor; stroke-width: 1.6; fill: none; flex-shrink: 0; }
.sb-item .sb-count {
  margin-left: auto; font-family: var(--font-mono); font-size: 0.62rem;
  color: var(--text-muted); background: var(--bg-secondary);
  border: 1px solid var(--border); border-radius: 20px; padding: 1px 7px; flex-shrink: 0;
}
.sb-item span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; flex: 1; }
.sb-item:hover { background: var(--bg-secondary); color: var(--text-primary); }
.sb-item.active { background: var(--accent-surface); color: var(--text-white); }
.sb-item.active::before {
  content: ''; position: absolute; left: -12px; top: 7px; bottom: 7px; width: 2px;
  background: var(--accent); border-radius: 2px;
}
.sb-item.active svg { stroke: var(--accent); }
.sb-item.active .sb-count { color: var(--accent); border-color: var(--accent-border); background: var(--accent-surface); }

.sb-foot { border-top: 1px solid var(--border); padding: 14px 16px; }
.sb-profile { display: flex; align-items: center; gap: 11px; }
.sb-avatar {
  width: 34px; height: 34px; border-radius: var(--radius-sm); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--accent-surface); border: 1px solid var(--accent-border);
  font-family: var(--font-display); font-weight: 700; font-size: 0.82rem; color: var(--accent);
}
.sb-profile .nm { font-size: 0.8rem; color: var(--text-primary); font-weight: 500; }
.sb-profile .co { font-size: 0.64rem; color: var(--text-muted); margin-top: 1px; }

/* ─── Main column ─── */
.main { display: flex; flex-direction: column; height: 100vh; overflow: hidden; min-width: 0; min-height: 0; }

.topbar {
  height: var(--topbar-h); flex-shrink: 0;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 20px;
  padding: 0 28px;
  background: var(--bg-primary);
}
.tb-title { display: flex; flex-direction: column; gap: 2px; }
.tb-title h1 {
  font-family: var(--font-display); font-size: 1.12rem; font-weight: 600;
  letter-spacing: -0.01em; color: var(--text-white); line-height: 1.1;
}
.tb-title .crumb { font-size: 0.64rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-muted); }
.tb-search {
  margin-left: auto;
  display: flex; align-items: center; gap: 9px;
  background: var(--bg-secondary); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 8px 13px; width: 280px;
  color: var(--text-muted); font-size: 0.8rem;
}
.tb-search svg { width: 15px; height: 15px; stroke: currentColor; stroke-width: 1.6; fill: none; }
.tb-search .kbd {
  margin-left: auto; font-family: var(--font-mono); font-size: 0.6rem;
  color: var(--text-muted); border: 1px solid var(--border); border-radius: 3px; padding: 1px 5px;
}
.tb-icon {
  width: 38px; height: 38px; border-radius: var(--radius-sm); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--border); color: var(--text-secondary);
  position: relative; transition: all 0.2s var(--ease);
}
.tb-icon:hover { border-color: var(--border-light); color: var(--text-primary); background: var(--bg-secondary); }
.tb-icon svg { width: 17px; height: 17px; stroke: currentColor; stroke-width: 1.6; fill: none; }
.tb-icon .dot {
  position: absolute; top: 8px; right: 9px; width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 0 2px var(--bg-primary);
}

.content { flex: 1; min-height: 0; overflow-y: auto; padding: 28px; }
.content-inner { max-width: 1320px; margin: 0 auto; }

/* ============================================================
   GENERIC ATOMS
   ============================================================ */
.card {
  background: var(--bg-secondary); border: 1px solid var(--border);
  border-radius: var(--radius-md); overflow: hidden;
}
.card-h {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 20px; border-bottom: 1px solid var(--border);
}
.card-h .ch-ic {
  width: 30px; height: 30px; border-radius: var(--radius-sm); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--accent-surface); border: 1px solid var(--accent-border);
}
.card-h .ch-ic svg { width: 15px; height: 15px; stroke: var(--accent); stroke-width: 1.6; fill: none; }
.card-h h3 {
  font-family: var(--font-display); font-size: 0.94rem; font-weight: 600;
  color: var(--text-white); letter-spacing: -0.01em;
}
.card-h .sub { font-size: 0.68rem; color: var(--text-muted); margin-top: 1px; }
.card-h .link {
  margin-left: auto; font-size: 0.7rem; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--accent); display: inline-flex; align-items: center; gap: 5px; font-weight: 500;
}
.card-h .link svg { width: 13px; height: 13px; stroke: currentColor; stroke-width: 2; fill: none; }
.card-h .link:hover { color: var(--accent-bright); }
.card-b { padding: 20px; }

.eyebrow {
  font-size: 0.62rem; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--accent); font-weight: 600; display: inline-flex; align-items: center; gap: 9px;
}
.eyebrow::before { content: ''; width: 22px; height: 1px; background: var(--accent-dim); }

/* badges */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-family: var(--font-mono); font-size: 0.6rem; font-weight: 500;
  letter-spacing: 0.08em; text-transform: uppercase;
  padding: 3px 8px; border-radius: 4px; border: 1px solid;
  white-space: nowrap;
}
.badge svg { width: 11px; height: 11px; stroke-width: 2; fill: none; stroke: currentColor; }
.badge.go   { color: var(--go);   background: var(--go-surface);   border-color: var(--go-border); }
.badge.warn { color: var(--warn); background: var(--warn-surface); border-color: var(--warn-border); }
.badge.bad  { color: var(--bad);  background: var(--bad-surface);  border-color: var(--bad-border); }
.badge.accent { color: var(--accent); background: var(--accent-surface); border-color: var(--accent-border); }
.badge.muted { color: var(--text-secondary); background: var(--bg-card); border-color: var(--border-light); }
.badge .pdot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.live .pdot { animation: livePulse 1.6s ease-in-out infinite; }
@keyframes livePulse { 0%,100%{opacity:1} 50%{opacity:0.4} }

/* mono value chips */
.kv { display: flex; flex-direction: column; gap: 3px; }
.kv .k { font-size: 0.58rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-muted); }
.kv .v { font-family: var(--font-mono); font-size: 0.84rem; color: var(--text-primary); }
.kv .v.accent { color: var(--accent); }

/* tag pills (NAICS, vehicles, etc) */
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-mono); font-size: 0.68rem; color: var(--text-primary);
  background: var(--bg-card); border: 1px solid var(--border-light);
  border-radius: 5px; padding: 4px 10px;
}
.pill.accent { background: var(--accent-surface); border-color: var(--accent-border); color: var(--accent); }
.pill.go { background: var(--go-surface); border-color: var(--go-border); color: var(--go); }
.pill.violet { color: var(--violet); border-color: rgba(126,147,214,0.3); background: rgba(126,147,214,0.08); }
.pill.lilac { color: var(--lilac); border-color: rgba(155,143,208,0.3); background: rgba(155,143,208,0.08); }

/* section heading inside content */
.row-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 16px; }
.row-head h2 {
  font-family: var(--font-display); font-size: 1.3rem; font-weight: 600;
  letter-spacing: -0.02em; color: var(--text-white);
}
.row-head .desc { font-size: 0.82rem; color: var(--text-secondary); margin-top: 4px; max-width: 60ch; }

/* fit score donut */
.donut { position: relative; flex-shrink: 0; }
.donut svg { transform: rotate(-90deg); display: block; }
.donut .num {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 700; color: var(--text-white);
}
.donut .num small { font-size: 0.5em; color: var(--text-secondary); font-weight: 500; margin-left: 1px; }

/* score bar */
.scorebar { height: 6px; border-radius: 4px; background: var(--border); overflow: hidden; }
.scorebar i { display: block; height: 100%; border-radius: 4px; }

/* generic grids */
.grid { display: grid; gap: 18px; }
.g-2 { grid-template-columns: repeat(2, 1fr); }
.g-3 { grid-template-columns: repeat(3, 1fr); }
.g-4 { grid-template-columns: repeat(4, 1fr); }

/* hairline tile grid (1px-gap) */
.tilegrid {
  display: grid; gap: 1px; background: var(--border);
  border: 1px solid var(--border); border-radius: var(--radius-md); overflow: hidden;
}
.tile { background: var(--bg-secondary); padding: 20px 22px; transition: background 0.25s var(--ease); }
.tile:hover { background: var(--bg-card); }
.tile .t-label { font-size: 0.62rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-secondary); }
.tile .t-num {
  font-family: var(--font-display); font-size: 2rem; font-weight: 700; line-height: 1;
  color: var(--text-white); letter-spacing: -0.02em; margin-top: 10px;
}
.tile .t-num .u { color: var(--accent); }
.tile .t-delta { font-size: 0.68rem; margin-top: 8px; display: inline-flex; align-items: center; gap: 4px; }
.tile .t-delta svg { width: 12px; height: 12px; stroke-width: 2.2; fill: none; stroke: currentColor; }
.t-delta.up { color: var(--go); }
.t-delta.down { color: var(--bad); }
.t-delta.flat { color: var(--text-muted); }

/* ============================================================
   BRIEFING VIEW
   ============================================================ */
.brief-hero {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 28px;
  margin-bottom: 24px; flex-wrap: wrap;
}
.brief-hero .greet { font-family: var(--font-display); font-size: 1.7rem; font-weight: 600; color: var(--text-white); letter-spacing: -0.02em; }
.brief-hero .greet .accent { color: var(--accent); }
.brief-hero .date { font-size: 0.82rem; color: var(--text-secondary); margin-top: 6px; }
.brief-hero .digest-tag { margin-top: 14px; }

/* source freshness strip */
.sources {
  display: flex; align-items: center; gap: 0;
  background: var(--bg-secondary); border: 1px solid var(--border);
  border-radius: var(--radius-md); overflow: hidden;
}
.source {
  flex: 1; padding: 13px 18px; border-right: 1px solid var(--border);
  display: flex; align-items: center; gap: 11px;
}
.source:last-child { border-right: none; }
.source .sdot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.source .sdot.ok { background: var(--go); box-shadow: 0 0 8px var(--go); }
.source .sdot.warn { background: var(--warn); box-shadow: 0 0 8px var(--warn); }
.source .s-name { font-size: 0.8rem; color: var(--text-primary); font-weight: 500; }
.source .s-fresh { font-family: var(--font-mono); font-size: 0.6rem; color: var(--text-muted); margin-top: 2px; }

/* priority action list */
.actions { display: flex; flex-direction: column; }
.action {
  display: flex; align-items: center; gap: 14px; padding: 14px 20px;
  border-bottom: 1px solid var(--border); transition: background 0.2s var(--ease); cursor: pointer;
}
.action:last-child { border-bottom: none; }
.action:hover { background: var(--bg-card); }
.action .a-rank {
  font-family: var(--font-mono); font-size: 0.74rem; color: var(--text-muted);
  width: 20px; flex-shrink: 0; text-align: center;
}
.action .a-pri {
  width: 4px; align-self: stretch; border-radius: 3px; flex-shrink: 0;
}
.action .a-pri.hi { background: var(--bad); }
.action .a-pri.md { background: var(--warn); }
.action .a-pri.lo { background: var(--accent-dim); }
.action .a-main { flex: 1; min-width: 0; }
.action .a-title { font-size: 0.88rem; color: var(--text-white); font-weight: 500; }
.action .a-meta { font-size: 0.7rem; color: var(--text-secondary); margin-top: 3px; display: flex; gap: 10px; flex-wrap: wrap; }
.action .a-meta .mono { font-family: var(--font-mono); color: var(--text-muted); }
.action .a-due { text-align: right; flex-shrink: 0; }
.action .a-due .d-num { font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; color: var(--text-white); }
.action .a-due .d-num.urgent { color: var(--bad); }
.action .a-due .d-label { font-size: 0.58rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-muted); }
.action .a-chev { color: var(--text-muted); flex-shrink: 0; }
.action .a-chev svg { width: 16px; height: 16px; stroke-width: 1.8; fill: none; stroke: currentColor; transition: transform 0.2s; }
.action:hover .a-chev { color: var(--accent); }
.action:hover .a-chev svg { transform: translateX(3px); }

/* opportunity mini-card (high-fit) */
.opp-mini {
  display: flex; gap: 14px; padding: 16px 18px; border-bottom: 1px solid var(--border);
  align-items: center; cursor: pointer; transition: background 0.2s var(--ease);
}
.opp-mini:last-child { border-bottom: none; }
.opp-mini:hover { background: var(--bg-card); }
.opp-mini .om-main { flex: 1; min-width: 0; }
.opp-mini .om-agency { font-size: 0.62rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); font-weight: 600; }
.opp-mini .om-title { font-size: 0.88rem; color: var(--text-white); font-weight: 500; margin: 3px 0 6px; line-height: 1.35; }
.opp-mini .om-meta { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.opp-mini .om-meta .mono { font-family: var(--font-mono); font-size: 0.68rem; color: var(--text-secondary); }

/* CI highlight item */
.ci-item { padding: 14px 0; border-bottom: 1px solid var(--border); }
.ci-item:last-child { border-bottom: none; padding-bottom: 0; }
.ci-item:first-child { padding-top: 0; }
.ci-item .ci-top { display: flex; align-items: center; gap: 9px; margin-bottom: 7px; }
.ci-item .ci-tag {
  font-family: var(--font-mono); font-size: 0.56rem; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--warn); border: 1px solid var(--warn-border); background: var(--warn-surface);
  border-radius: 3px; padding: 2px 6px;
}
.ci-item .ci-src { font-size: 0.62rem; color: var(--text-muted); margin-left: auto; font-family: var(--font-mono); }
.ci-item .ci-text { font-size: 0.82rem; color: var(--text-primary); line-height: 1.55; }
.ci-item .ci-text b { color: var(--text-white); font-weight: 600; }

/* mini bar chart (pipeline health / spend) */
.minibars { display: flex; align-items: flex-end; gap: 7px; height: 90px; }
.minibars .mb { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; gap: 7px; height: 100%; }
.minibars .mb i { width: 100%; background: var(--accent-dim); border-radius: 3px 3px 0 0; transition: height 0.4s var(--ease); }
.minibars .mb.peak i { background: var(--accent); }
.minibars .mb span { font-size: 0.56rem; color: var(--text-muted); text-align: center; font-family: var(--font-mono); }

/* ============================================================
   OPPORTUNITIES TABLE
   ============================================================ */
.opp-toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.filter-chip {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 0.74rem; color: var(--text-secondary);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 7px 13px; transition: all 0.18s var(--ease);
}
.filter-chip { white-space: nowrap; }
.filter-chip svg { width: 13px; height: 13px; stroke: currentColor; stroke-width: 1.7; fill: none; flex-shrink: 0; }
.filter-chip:hover { border-color: var(--border-light); color: var(--text-primary); }
.filter-chip.on { color: var(--accent); border-color: var(--accent-border); background: var(--accent-surface); }
.filter-chip .ct { font-family: var(--font-mono); font-size: 0.62rem; color: var(--text-muted); }

.dtable { width: 100%; border-collapse: collapse; }
.dtable thead th {
  text-align: left; font-size: 0.58rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--text-muted); font-weight: 600; padding: 0 16px 12px; white-space: nowrap;
}
.dtable tbody tr {
  border-top: 1px solid var(--border); cursor: pointer; transition: background 0.16s var(--ease);
}
.dtable tbody tr:hover { background: var(--bg-card); }
.dtable td { padding: 15px 16px; vertical-align: middle; }
.dtable .c-title { font-size: 0.86rem; color: var(--text-white); font-weight: 500; line-height: 1.35; }
.dtable .c-agency { font-size: 0.64rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); font-weight: 600; margin-bottom: 4px; }
.dtable .c-id { font-family: var(--font-mono); font-size: 0.66rem; color: var(--text-muted); margin-top: 5px; }
.dtable .c-mono { font-family: var(--font-mono); font-size: 0.78rem; color: var(--text-primary); }
.dtable .c-ceiling { font-family: var(--font-mono); font-size: 0.82rem; color: var(--accent); }
.fit-cell { display: flex; align-items: center; gap: 11px; }
.fit-cell .fc-bar { width: 54px; }
.fit-cell .fc-num { font-family: var(--font-display); font-weight: 700; font-size: 1rem; width: 30px; }

/* source dots cluster */
.srcdots { display: flex; gap: 3px; }
.srcdots .sd {
  width: 18px; height: 18px; border-radius: 4px; display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-size: 0.5rem; font-weight: 600;
  background: var(--accent-surface); border: 1px solid var(--accent-border); color: var(--accent);
}
.srcdots .sd.off { background: var(--bg-card); border-color: var(--border); color: var(--text-muted); }

/* ============================================================
   OPPORTUNITY DETAIL
   ============================================================ */
.detail-back {
  display: inline-flex; align-items: center; gap: 7px; font-size: 0.72rem;
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-secondary);
  margin-bottom: 18px; transition: color 0.2s;
}
.detail-back svg { width: 14px; height: 14px; stroke: currentColor; stroke-width: 2; fill: none; }
.detail-back:hover { color: var(--accent); }

.detail-hero { border: 1px solid var(--border-light); border-radius: var(--radius-md); background: var(--bg-secondary); overflow: hidden; margin-bottom: 20px; }
.dh-top { padding: 24px 28px; display: flex; gap: 28px; align-items: flex-start; }
.dh-main { flex: 1; min-width: 0; }
.dh-badges { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.dh-title { font-family: var(--font-display); font-size: 1.65rem; font-weight: 600; color: var(--text-white); letter-spacing: -0.02em; line-height: 1.15; }
.dh-agency { font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); font-weight: 600; margin-bottom: 10px; }
.dh-sub { font-size: 0.88rem; color: var(--text-secondary); line-height: 1.6; margin-top: 12px; max-width: 70ch; }
.dh-score { text-align: center; flex-shrink: 0; }
.dh-score .label { font-size: 0.58rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-muted); margin-top: 10px; }
.dh-meta {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 1px;
  background: var(--border); border-top: 1px solid var(--border);
}
.dh-meta .m { background: var(--bg-secondary); padding: 14px 22px; }

/* two-column detail layout */
.detail-grid { display: grid; grid-template-columns: 1fr 340px; gap: 20px; align-items: start; }

/* fit factor breakdown */
.factor { padding: 13px 0; border-bottom: 1px solid var(--border); }
.factor:last-child { border-bottom: none; }
.factor .f-top { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.factor .f-name { font-size: 0.82rem; color: var(--text-primary); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.factor .f-weight { font-family: var(--font-mono); font-size: 0.58rem; color: var(--text-muted); }
.factor .f-score { margin-left: auto; font-family: var(--font-mono); font-size: 0.8rem; font-weight: 500; }
.factor .f-note { font-size: 0.72rem; color: var(--text-secondary); margin-top: 7px; line-height: 1.5; }

/* black hat CI sections */
.ci-sections { display: flex; flex-direction: column; }
.ci-sec { border-bottom: 1px solid var(--border); }
.ci-sec:last-child { border-bottom: none; }
.ci-sec-h {
  display: flex; align-items: center; gap: 12px; padding: 14px 20px; width: 100%; text-align: left;
  transition: background 0.18s var(--ease);
}
.ci-sec-h:hover { background: var(--bg-card); }
.ci-sec-n { font-family: var(--font-mono); font-size: 0.66rem; color: var(--text-muted); width: 22px; flex-shrink: 0; }
.ci-sec-t { font-size: 0.84rem; color: var(--text-white); font-weight: 500; }
.ci-sec-tag { margin-left: auto; }
.ci-sec-chev { color: var(--text-muted); transition: transform 0.2s; }
.ci-sec-chev svg { width: 15px; height: 15px; stroke: currentColor; stroke-width: 2; fill: none; }
.ci-sec.open .ci-sec-chev { transform: rotate(90deg); color: var(--accent); }
.ci-sec-body { padding: 0 20px 18px 54px; font-size: 0.82rem; color: var(--text-primary); line-height: 1.65; }
.ci-sec-body b { color: var(--text-white); font-weight: 600; }
.ci-sec-body .mono { font-family: var(--font-mono); font-size: 0.86em; color: var(--accent); }

/* capture readiness meter */
.cap-gauge { display: flex; align-items: center; gap: 22px; padding: 4px 0 20px; }
.cap-verdict { flex: 1; }
.cap-verdict .cv-call { font-family: var(--font-display); font-weight: 700; font-size: 2.1rem; letter-spacing: -0.02em; line-height: 1; }
.cap-verdict .cv-call.go { color: var(--go); }
.cap-verdict .cv-call.cond { color: var(--warn); }
.cap-verdict .cv-call.nogo { color: var(--bad); }
.cap-verdict .cv-sub { font-size: 0.76rem; color: var(--text-secondary); margin-top: 8px; line-height: 1.5; }
.cap-dims { display: flex; flex-direction: column; gap: 9px; }
.cap-dim { display: flex; align-items: center; gap: 11px; }
.cap-dim .cd-name { font-size: 0.76rem; color: var(--text-primary); width: 168px; flex-shrink: 0; display: flex; align-items: center; gap: 7px; }
.cap-dim .cd-name .auto { font-family: var(--font-mono); font-size: 0.5rem; color: var(--text-muted); border: 1px solid var(--border); border-radius: 3px; padding: 1px 4px; }
.cap-dim .cd-bar { flex: 1; }
.cap-dim .cd-val { font-family: var(--font-mono); font-size: 0.72rem; color: var(--text-secondary); width: 34px; text-align: right; }
.cap-dim.manual .cd-name { color: var(--text-secondary); }

/* partner cards */
.partner { display: flex; align-items: center; gap: 13px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.partner:last-child { border-bottom: none; }
.partner .p-logo, .p-logo {
  width: 40px; height: 40px; border-radius: var(--radius-sm); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-card); border: 1px solid var(--border-light);
  font-family: var(--font-display); font-weight: 700; font-size: 0.9rem; color: var(--text-primary);
}
.partner .p-main { flex: 1; min-width: 0; }
.partner .p-name { font-size: 0.84rem; color: var(--text-white); font-weight: 500; }
.partner .p-meta { font-size: 0.66rem; color: var(--text-secondary); margin-top: 3px; display: flex; gap: 8px; flex-wrap: wrap; }
.partner .p-meta .mono { font-family: var(--font-mono); color: var(--text-muted); }
.partner .p-match { text-align: center; flex-shrink: 0; }
.partner .p-match .pm-num { font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; }
.partner .p-match .pm-label { font-size: 0.52rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-muted); }

/* content studio actions */
.studio-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.studio-act {
  display: flex; align-items: center; gap: 12px; padding: 14px 16px;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--bg-card); transition: all 0.2s var(--ease); text-align: left;
}
.studio-act:hover { border-color: var(--accent-border); background: var(--bg-card-hover); }
.studio-act .sa-ic { width: 32px; height: 32px; border-radius: var(--radius-sm); flex-shrink: 0; display: flex; align-items: center; justify-content: center; background: var(--accent-surface); border: 1px solid var(--accent-border); }
.studio-act .sa-ic svg { width: 16px; height: 16px; stroke: var(--accent); stroke-width: 1.6; fill: none; }
.studio-act .sa-t { font-size: 0.8rem; color: var(--text-white); font-weight: 500; }
.studio-act .sa-d { font-size: 0.64rem; color: var(--text-muted); margin-top: 2px; }
.studio-act .sa-gem { margin-left: auto; font-size: 0.54rem; color: var(--lilac); font-family: var(--font-mono); letter-spacing: 0.06em; }

/* ============================================================
   LIFECYCLE / PIPELINE BOARD
   ============================================================ */
.lifecycle { display: flex; gap: 0; border: 1px solid var(--border); border-radius: var(--radius-md); overflow: hidden; }
.lc-stage { flex: 1; padding: 12px 14px; border-right: 1px solid var(--border); position: relative; }
.lc-stage:last-child { border-right: none; }
.lc-stage .lc-n { font-family: var(--font-mono); font-size: 0.54rem; color: var(--text-muted); }
.lc-stage .lc-label { font-size: 0.66rem; color: var(--text-secondary); margin-top: 5px; font-weight: 500; line-height: 1.3; }
.lc-stage .lc-count { font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; color: var(--text-white); margin-top: 8px; }
.lc-stage.active { background: var(--accent-surface); }
.lc-stage.active .lc-label { color: var(--accent); }
.lc-stage.done .lc-count { color: var(--text-secondary); }
.lc-bar { position: absolute; bottom: 0; left: 0; right: 0; height: 2px; background: var(--border); }
.lc-bar i { display: block; height: 100%; background: var(--accent); }

/* kanban */
.kanban { display: grid; grid-auto-flow: column; grid-auto-columns: 280px; gap: 14px; overflow-x: auto; padding-bottom: 8px; }
.kan-col { background: var(--bg-secondary); border: 1px solid var(--border); border-radius: var(--radius-md); display: flex; flex-direction: column; }
.kan-h { padding: 13px 16px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 8px; }
.kan-h .kh-t { font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-primary); font-weight: 600; }
.kan-h .kh-c { margin-left: auto; font-family: var(--font-mono); font-size: 0.62rem; color: var(--text-muted); }
.kan-h .kh-dot { width: 7px; height: 7px; border-radius: 50%; }
.kan-b { padding: 12px; display: flex; flex-direction: column; gap: 10px; min-height: 60px; }
.kan-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 13px; transition: all 0.2s var(--ease); cursor: pointer; }
.kan-card:hover { border-color: var(--accent-border); background: var(--bg-card-hover); }
.kan-card .kc-agency { font-size: 0.58rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); font-weight: 600; }
.kan-card .kc-title { font-size: 0.78rem; color: var(--text-white); font-weight: 500; margin: 4px 0 9px; line-height: 1.4; }
.kan-card .kc-foot { display: flex; align-items: center; gap: 8px; justify-content: space-between; }
.kan-card .kc-ceiling { font-family: var(--font-mono); font-size: 0.68rem; color: var(--accent); }

/* reconciliation gaps */
.recon { display: grid; grid-template-columns: repeat(3,1fr); gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: var(--radius-md); overflow: hidden; }
.recon-col { background: var(--bg-secondary); padding: 20px 22px; }
.recon-col .rc-num { font-family: var(--font-display); font-weight: 700; font-size: 2.2rem; color: var(--text-white); letter-spacing: -0.02em; }
.recon-col .rc-label { font-size: 0.72rem; color: var(--text-primary); font-weight: 500; margin-top: 4px; }
.recon-col .rc-desc { font-size: 0.68rem; color: var(--text-muted); margin-top: 6px; line-height: 1.5; }
.recon-col.warn .rc-num { color: var(--warn); }
.recon-col.go .rc-num { color: var(--go); }

/* ============================================================
   ANALYTICS
   ============================================================ */
.chart-area { padding: 24px 22px 14px; }
.bars-x { display: flex; align-items: flex-end; gap: 14px; height: 220px; padding-top: 10px; }
.bars-x .bx { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 9px; height: 100%; justify-content: flex-end; }
.bars-x .bx-stack { width: 100%; display: flex; flex-direction: column; justify-content: flex-end; gap: 2px; height: 100%; }
.bars-x .bx-stack i { width: 100%; border-radius: 2px; }
.bars-x .bx-stack i.s1 { background: var(--accent); }
.bars-x .bx-stack i.s2 { background: var(--accent-dim); }
.bars-x .bx-stack i.s3 { background: var(--violet); opacity: 0.7; }
.bars-x .bx-label { font-family: var(--font-mono); font-size: 0.6rem; color: var(--text-muted); }
.chart-legend { display: flex; gap: 18px; padding: 14px 22px; border-top: 1px solid var(--border); flex-wrap: wrap; }
.chart-legend .lg { display: flex; align-items: center; gap: 7px; font-size: 0.7rem; color: var(--text-secondary); }
.chart-legend .lg i { width: 10px; height: 10px; border-radius: 2px; }

/* theme briefs */
.theme { padding: 16px 0; border-bottom: 1px solid var(--border); }
.theme:last-child { border-bottom: none; }
.theme .th-top { display: flex; align-items: center; gap: 10px; margin-bottom: 7px; }
.theme .th-name { font-size: 0.86rem; color: var(--text-white); font-weight: 600; }
.theme .th-trend { margin-left: auto; }
.theme .th-text { font-size: 0.78rem; color: var(--text-secondary); line-height: 1.55; }

/* generic placeholder note */
.note { font-size: 0.72rem; color: var(--text-muted); line-height: 1.55; }

/* cta action button */
.cta-act {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 11px 22px; background: var(--accent-dim); color: var(--bg-primary);
  border-radius: var(--radius-xs); font-size: 0.78rem; font-weight: 600;
  letter-spacing: 0.06em; text-transform: uppercase; transition: all 0.25s var(--ease);
  border: 1px solid var(--accent-dim);
}
.cta-act svg { width: 15px; height: 15px; stroke: currentColor; stroke-width: 2; fill: none; }
.cta-act:hover { background: transparent; color: var(--accent); }

/* studio output preview cards */
.studio-out { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.studio-card { background: var(--bg-secondary); border: 1px solid var(--border); border-radius: var(--radius-md); overflow: hidden; transition: border-color 0.25s var(--ease); }
.studio-card:hover { border-color: var(--border-light); }
.studio-prev { height: 150px; position: relative; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-primary) 100%); border-bottom: 1px solid var(--border); overflow: hidden; }
.studio-prev .pv-ic { width: 46px; height: 46px; opacity: 0.85; }
.studio-prev .pv-ic svg { width: 100%; height: 100%; stroke: var(--accent); stroke-width: 1.2; fill: none; }
.studio-prev .gemtag { position: absolute; top: 12px; right: 12px; font-family: var(--font-mono); font-size: 0.56rem; letter-spacing: 0.08em; color: var(--lilac); border: 1px solid rgba(155,143,208,0.3); background: rgba(155,143,208,0.08); border-radius: 4px; padding: 3px 8px; }
.studio-prev .wave { display: flex; align-items: flex-end; gap: 3px; height: 40px; }
.studio-prev .wave i { width: 3px; background: var(--accent); border-radius: 2px; opacity: 0.6; }
.studio-prev .barsmini { display: flex; align-items: flex-end; gap: 6px; height: 56px; }
.studio-prev .barsmini i { width: 14px; border-radius: 2px 2px 0 0; }
.studio-cb { padding: 16px 18px; }
.studio-cb .sc-t { font-size: 0.88rem; color: var(--text-white); font-weight: 600; font-family: var(--font-display); letter-spacing: -0.01em; }
.studio-cb .sc-d { font-size: 0.72rem; color: var(--text-secondary); margin-top: 5px; line-height: 1.5; }
.studio-cb .sc-foot { display: flex; align-items: center; gap: 8px; margin-top: 14px; }

/* star-map (subtle, only behind content top) */
.app::before {
  content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background:
    radial-gradient(1px 1px at 70% 12%, rgba(91,163,192,0.10) 50%, transparent 100%),
    radial-gradient(1.5px 1.5px at 88% 30%, rgba(91,163,192,0.08) 50%, transparent 100%),
    radial-gradient(1px 1px at 60% 48%, rgba(91,163,192,0.06) 50%, transparent 100%),
    radial-gradient(1px 1px at 92% 66%, rgba(91,163,192,0.07) 50%, transparent 100%);
}
.app > * { position: relative; z-index: 1; }

/* utility */
.mt-20 { margin-top: 20px; }
.mt-18 { margin-top: 18px; }
.mb-0 { margin-bottom: 0; }
.muted { color: var(--text-muted); }
.flex { display: flex; }
.fcol { flex-direction: column; }
.between { justify-content: space-between; }
.center { align-items: center; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.wrap { flex-wrap: wrap; }
