@import url('https://fonts.googleapis.com/css2?family=Roboto+Slab:wght@400;500;600;700&family=Barlow:wght@300;400;500;600;700&family=Barlow+Condensed:wght@400;500;600;700&display=swap');

:root {
  --navy: #0F2949;
  --deep-navy: #002A4F;
  --red: #ED1E35;
  --dark-red: #B71C1C;
  --blue: #2762A2;
  --light-blue: #E8F0FA;
  --gray-bg: #F2F4F6;
  --cool-gray: #F8F9FA;
  --text: #333333;
  --muted: #6B7280;
  --border: #E5E7EB;
  --green: #16A34A;
  --amber: #D97706;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  font-family: 'Barlow', Arial, Helvetica, sans-serif;
  color: var(--text);
  background: #fff;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.page { width: 1440px; min-height: 900px; margin: 0 auto; background: #fff; }

/* Top accent */
.top-accent { height: 4px; background: var(--red); }

/* Header */
.header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 32px; border-bottom: 1px solid var(--border);
  background: #fff;
}
.logo { display: flex; align-items: center; gap: 10px; }
.logo-mark {
  width: 36px; height: 36px; background: var(--navy); border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-family: 'Roboto Slab'; font-weight: 700; font-size: 18px;
}
.logo-mark .dot { color: var(--red); }
.logo-text {
  font-family: 'Roboto Slab'; font-weight: 600; font-size: 18px; color: var(--navy);
  letter-spacing: -0.01em;
}
.logo-sub {
  font-family: 'Barlow Condensed'; font-weight: 500; font-size: 12px;
  color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em;
  border-left: 2px solid var(--red); padding-left: 10px; margin-left: 6px;
}
.nav { display: flex; gap: 28px; }
.nav a {
  font-family: 'Barlow Condensed'; font-weight: 600; font-size: 14px;
  color: var(--navy); text-decoration: none; text-transform: uppercase;
  letter-spacing: 0.06em; padding: 8px 0; border-bottom: 2px solid transparent;
}
.nav a.active { border-bottom-color: var(--red); }
.user {
  display: flex; align-items: center; gap: 10px;
}
.avatar {
  width: 32px; height: 32px; border-radius: 50%; background: var(--blue);
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-weight: 600; font-size: 12px;
}
.user-name { font-size: 13px; font-weight: 500; color: var(--navy); }
.user-role { font-size: 11px; color: var(--muted); }

/* Page title bar */
.title-bar {
  padding: 24px 32px 20px; border-bottom: 1px solid var(--border);
  display: flex; align-items: end; justify-content: space-between;
}
.title-bar h1 {
  font-family: 'Roboto Slab'; font-weight: 600; font-size: 28px;
  color: var(--navy); letter-spacing: -0.01em;
}
.title-bar .crumbs {
  font-family: 'Barlow Condensed'; font-size: 12px; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 4px;
}
.title-bar .crumbs span.active { color: var(--red); }
.title-bar .meta {
  display: flex; gap: 18px; font-size: 12px; color: var(--muted);
  font-family: 'Barlow Condensed'; text-transform: uppercase; letter-spacing: 0.06em;
}
.title-bar .meta strong { color: var(--navy); font-weight: 600; }

/* Layout grid */
.content { padding: 28px 32px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.grid-claim { display: grid; grid-template-columns: 360px 1fr; gap: 20px; }

/* Cards */
.card {
  background: #fff; border: 1px solid var(--border); border-radius: 8px;
  padding: 18px 20px;
}
.card-dark { background: var(--navy); color: #fff; border: none; }
.card h3 {
  font-family: 'Barlow Condensed'; font-weight: 600; font-size: 12px;
  color: var(--muted); text-transform: uppercase; letter-spacing: 0.1em;
  margin-bottom: 10px;
}
.card-dark h3 { color: rgba(255,255,255,0.7); }

.stat { font-family: 'Roboto Slab'; font-weight: 600; font-size: 32px; color: var(--navy); }
.card-dark .stat { color: #fff; }
.stat-sub { font-size: 12px; color: var(--muted); margin-top: 4px; }
.card-dark .stat-sub { color: rgba(255,255,255,0.7); }

.badge {
  display: inline-block; padding: 3px 8px; border-radius: 4px;
  font-family: 'Barlow Condensed'; font-weight: 600; font-size: 11px;
  text-transform: uppercase; letter-spacing: 0.06em;
}
.badge-red { background: #FEE2E2; color: var(--red); }
.badge-amber { background: #FEF3C7; color: var(--amber); }
.badge-green { background: #D1FAE5; color: var(--green); }
.badge-blue { background: var(--light-blue); color: var(--blue); }
.badge-gray { background: var(--gray-bg); color: var(--muted); }
.badge-navy { background: var(--navy); color: #fff; }

/* Footer */
.footer {
  background: var(--deep-navy); color: rgba(255,255,255,0.8);
  padding: 14px 32px; font-size: 11px; text-align: center;
  font-family: 'Barlow Condensed'; letter-spacing: 0.08em; text-transform: uppercase;
}
.footer strong { color: #fff; font-weight: 600; }

/* Section heading */
h2.section {
  font-family: 'Roboto Slab'; font-weight: 600; font-size: 20px;
  color: var(--navy); margin-bottom: 16px;
}
h2.section .sub {
  display: block; font-family: 'Barlow'; font-weight: 400; font-size: 13px;
  color: var(--muted); margin-top: 2px;
}

/* Table */
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th {
  text-align: left; font-family: 'Barlow Condensed'; font-weight: 600;
  font-size: 11px; color: var(--muted); text-transform: uppercase;
  letter-spacing: 0.08em; padding: 10px 12px; border-bottom: 1px solid var(--border);
  background: var(--cool-gray);
}
.tbl td {
  padding: 12px; border-bottom: 1px solid var(--border); vertical-align: middle;
}
.tbl tr:hover td { background: var(--cool-gray); }
.tbl .claim-id { font-family: 'Source Code Pro', monospace; font-size: 12px; color: var(--blue); font-weight: 500; }
.tbl .subj-name { font-weight: 600; color: var(--navy); }
.tbl .small { font-size: 11px; color: var(--muted); }

/* === v2 ADDITIONS === */

/* Header v2: logo + product wordmark + toggle */
.logo-mark-v2 {
  width: 36px; height: 36px; background: var(--navy); border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-family: 'Roboto Slab'; font-weight: 700; font-size: 15px;
  letter-spacing: -0.02em; position: relative;
}
.logo-mark-v2 .dot {
  width: 6px; height: 6px; background: var(--red); border-radius: 50%;
  position: absolute; bottom: 7px; right: 7px;
}
.logo-wordmark {
  font-family: 'Roboto Slab'; font-weight: 600; font-size: 18px; color: var(--navy);
  letter-spacing: -0.01em; line-height: 1;
}
.logo-tagline {
  font-family: 'Barlow Condensed'; font-weight: 500; font-size: 10px;
  color: var(--muted); text-transform: uppercase; letter-spacing: 0.14em;
  margin-top: 3px;
}

.persona-toggle {
  display: inline-flex; border: 1px solid var(--border); border-radius: 999px;
  overflow: hidden; margin-right: 14px;
}
.persona-toggle a {
  font-family: 'Barlow Condensed'; font-weight: 600; font-size: 11px;
  color: var(--muted); text-transform: uppercase; letter-spacing: 0.1em;
  padding: 6px 14px; text-decoration: none;
}
.persona-toggle a.active { background: var(--navy); color: #fff; }

.header-right { display: flex; align-items: center; gap: 8px; }

/* Buttons */
.btn {
  display: inline-block; font-family: 'Barlow Condensed'; font-weight: 600; font-size: 12px;
  text-transform: uppercase; letter-spacing: 0.1em; padding: 9px 16px;
  border-radius: 4px; text-decoration: none; cursor: pointer; border: none;
}
.btn-red { background: var(--red); color: #fff; }
.btn-navy { background: var(--navy); color: #fff; }
.btn-ghost { background: transparent; color: var(--navy); border: 1px solid var(--border); }
.btn-sm { padding: 5px 10px; font-size: 10px; }

/* Score chip */
.score-chip {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 36px; padding: 3px 8px; border-radius: 4px;
  font-family: 'Roboto Slab'; font-weight: 600; font-size: 13px;
}
.score-chip.hi { background: #FEE2E2; color: var(--red); }
.score-chip.md { background: #FEF3C7; color: var(--amber); }
.score-chip.lo { background: #D1FAE5; color: var(--green); }

/* Filter chips */
.chip-row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: 999px; border: 1px solid var(--border);
  font-family: 'Barlow Condensed'; font-weight: 600; font-size: 11px;
  color: var(--navy); text-transform: uppercase; letter-spacing: 0.08em;
  background: #fff; cursor: pointer; text-decoration: none;
}
.chip.active { background: var(--navy); color: #fff; border-color: var(--navy); }
.chip.muted { color: var(--muted); background: var(--gray-bg); }
.chip .count {
  background: rgba(15,41,73,0.1); color: var(--navy); padding: 1px 6px;
  border-radius: 999px; font-size: 10px;
}
.chip.active .count { background: rgba(255,255,255,0.2); color: #fff; }

/* Hot row highlight */
.row-hot td:first-child { border-left: 3px solid var(--red); }
.row-hot td { background: #FFF9FA !important; }

/* AI briefing */
.ai-brief {
  background: linear-gradient(180deg, #FFF5F6, #fff); border: 1px solid #FECACA;
  border-left: 4px solid var(--red); border-radius: 6px; padding: 16px 20px;
}
.ai-brief h5 {
  font-family: 'Barlow Condensed'; font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.12em; color: var(--red); margin-bottom: 6px;
}
.ai-brief p { font-size: 14px; color: var(--navy); line-height: 1.55; }
.ai-brief .foot {
  font-size: 11px; color: var(--muted); margin-top: 10px;
  font-family: 'Barlow Condensed'; text-transform: uppercase; letter-spacing: 0.08em;
}

/* Ribbons */
.ribbon {
  background: var(--navy); color: #fff; border-radius: 8px; padding: 18px 22px;
  display: grid; gap: 24px;
}
.ribbon .label {
  font-family: 'Barlow Condensed'; font-size: 10px; color: rgba(255,255,255,0.65);
  text-transform: uppercase; letter-spacing: 0.12em;
}
.ribbon .val {
  font-family: 'Roboto Slab'; font-weight: 600; font-size: 24px; color: #fff; margin-top: 2px;
}
.ribbon .sub { font-size: 11px; color: rgba(255,255,255,0.7); margin-top: 2px; }

/* Pipeline step card (carpe intel) */
.step-card {
  background: #fff; border: 1px solid var(--border); border-radius: 6px; padding: 12px;
  font-size: 12px; position: relative;
}
.step-card .num {
  font-family: 'Roboto Slab'; font-weight: 700; font-size: 11px; color: var(--red);
  letter-spacing: 0.1em;
}
.step-card .t {
  font-family: 'Roboto Slab'; font-weight: 500; font-size: 13px; color: var(--navy);
  margin-top: 2px; line-height: 1.25;
}
.step-card .src {
  font-family: 'Barlow Condensed'; font-size: 10px; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.08em; margin-top: 4px;
}
.step-card .f { font-size: 11px; color: var(--text); margin-top: 6px; line-height: 1.4; }
.step-card .status {
  position: absolute; top: 10px; right: 10px; width: 8px; height: 8px;
  border-radius: 50%; background: var(--green);
}
.step-card details { margin-top: 8px; }
.step-card summary {
  cursor: pointer; font-family: 'Barlow Condensed'; font-size: 10px;
  color: var(--blue); text-transform: uppercase; letter-spacing: 0.08em; font-weight: 600;
}
.step-card details[open] .evidence-raw {
  background: var(--cool-gray); border-radius: 4px; padding: 8px; margin-top: 6px;
  font-size: 11px; color: var(--text); line-height: 1.4;
}

/* Persona card */
.persona-card {
  background: #fff; border: 1px solid var(--border); border-radius: 8px; padding: 28px;
  text-decoration: none; color: inherit; display: block; position: relative; overflow: hidden;
}
.persona-card:hover { border-color: var(--red); }
.persona-card .ptype {
  font-family: 'Barlow Condensed'; font-weight: 700; font-size: 11px;
  color: var(--red); text-transform: uppercase; letter-spacing: 0.12em;
}
.persona-card .pname {
  font-family: 'Roboto Slab'; font-weight: 600; font-size: 22px; color: var(--navy);
  margin-top: 6px;
}
.persona-card .pdesc {
  font-size: 13px; color: var(--text); margin-top: 10px; line-height: 1.5;
}
.persona-card .parrow {
  margin-top: 20px; font-family: 'Barlow Condensed'; font-weight: 600; font-size: 12px;
  color: var(--blue); text-transform: uppercase; letter-spacing: 0.1em;
}

/* Signal tile / alert card */
.alert-card {
  display: grid; grid-template-columns: 80px 1fr auto; gap: 16px; align-items: start;
  padding: 14px 0; border-bottom: 1px solid var(--border);
}
.alert-card:last-child { border-bottom: none; }
.alert-card .src-icon {
  width: 48px; height: 48px; border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-family: 'Barlow Condensed'; font-weight: 700; font-size: 11px;
  letter-spacing: 0.06em;
}
.src-ig { background: linear-gradient(135deg, #F58529, #DD2A7B, #8134AF); }
.src-fb { background: linear-gradient(135deg, #1877F2, #0D47A1); }
.src-yt { background: linear-gradient(135deg, #FF0000, #990000); }
.src-news { background: linear-gradient(135deg, #0F2949, #2762A2); }
.src-ct { background: linear-gradient(135deg, #334155, #0F172A); }
.src-tk { background: linear-gradient(135deg, #010101, #25F4EE); color: #fff; }
.src-gfm { background: linear-gradient(135deg, #00BA4A, #008436); }

.alert-card .meta-line {
  font-family: 'Barlow Condensed'; font-size: 11px; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 4px;
}
.alert-card .alert-title { font-weight: 600; color: var(--navy); font-size: 14px; margin-bottom: 3px; }
.alert-card .alert-body { font-size: 13px; color: var(--text); line-height: 1.5; }
.alert-card .chips { margin-top: 6px; display: flex; gap: 6px; flex-wrap: wrap; }

/* Bar chart as divs */
.bar-chart { display: flex; flex-direction: column; gap: 10px; }
.bar-row { display: grid; grid-template-columns: 120px 1fr 50px; gap: 10px; align-items: center; font-size: 12px; }
.bar-row .lbl { font-family: 'Barlow Condensed'; text-transform: uppercase; letter-spacing: 0.06em; color: var(--navy); font-weight: 600; font-size: 11px; }
.bar-row .bar { height: 10px; background: var(--gray-bg); border-radius: 5px; overflow: hidden; }
.bar-row .bar .fill { height: 100%; background: var(--blue); border-radius: 5px; }
.bar-row .bar .fill.red { background: var(--red); }
.bar-row .bar .fill.navy { background: var(--navy); }
.bar-row .val { font-family: 'Roboto Slab'; font-weight: 600; color: var(--navy); text-align: right; }

/* Claim banner shared */
.claim-banner {
  background: var(--navy); color: #fff; padding: 22px 32px;
  display: grid; grid-template-columns: 1fr 1.3fr 1.3fr 1fr 0.8fr auto; gap: 22px; align-items: center;
}
.claim-banner .label {
  font-family: 'Barlow Condensed'; font-size: 10px; color: rgba(255,255,255,0.6);
  text-transform: uppercase; letter-spacing: 0.12em;
}
.claim-banner .val {
  font-family: 'Roboto Slab'; font-weight: 500; font-size: 16px; margin-top: 3px;
}
.claim-banner .val.id { font-family: 'Source Code Pro', monospace; font-weight: 500; font-size: 15px; }
.claim-banner .score-big {
  font-family: 'Roboto Slab'; font-weight: 700; font-size: 32px; color: #fff; line-height: 1;
}
.claim-banner .score-big .of { font-size: 14px; color: rgba(255,255,255,0.6); font-weight: 400; }

/* Tabs */
.tabs { display: flex; gap: 28px; border-bottom: 1px solid var(--border); padding: 0 28px; }
.tabs a {
  padding: 14px 0; font-family: 'Barlow Condensed'; font-weight: 600; font-size: 13px;
  color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em;
  border-bottom: 2px solid transparent; text-decoration: none;
}
.tabs a.active { color: var(--navy); border-bottom-color: var(--red); }

/* Investigation trail */
.trail { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; margin: 18px 0 24px; position: relative; }
.trail-step {
  padding: 14px 18px; background: #fff; border: 1px solid var(--border); position: relative;
}
.trail-step:first-child { border-radius: 6px 0 0 6px; }
.trail-step:last-child { border-radius: 0 6px 6px 0; }
.trail-step + .trail-step { border-left: none; }
.trail-step.done { background: linear-gradient(180deg, #fff, #FFF5F6); }
.trail-step .n {
  font-family: 'Barlow Condensed'; font-weight: 700; font-size: 10px; color: var(--red);
  text-transform: uppercase; letter-spacing: 0.12em;
}
.trail-step .t { font-family: 'Roboto Slab'; font-weight: 500; font-size: 14px; color: var(--navy); margin-top: 4px; }
.trail-step .s { font-size: 11px; color: var(--muted); margin-top: 3px; font-family: 'Barlow Condensed'; text-transform: uppercase; letter-spacing: 0.06em; }
.trail-step .check {
  position: absolute; top: 12px; right: 12px; color: var(--green); font-size: 14px; font-weight: 700;
}

/* Heat score block */
.heat-score {
  background: linear-gradient(135deg, var(--red), #7C1420); color: #fff;
  border-radius: 8px; padding: 24px; display: flex; align-items: center; gap: 22px;
}
.heat-score .big {
  font-family: 'Roboto Slab'; font-weight: 700; font-size: 56px; line-height: 1;
}
.heat-score .label {
  font-family: 'Barlow Condensed'; font-weight: 600; font-size: 11px;
  text-transform: uppercase; letter-spacing: 0.12em; opacity: 0.8;
}
.heat-score .desc { font-size: 13px; opacity: 0.95; margin-top: 4px; max-width: 480px; line-height: 1.5; }

/* Continuum flow banner */
.continuum-flow {
  display: grid; grid-template-columns: repeat(4, 1fr) ; gap: 12px; position: relative;
}
.cf-step {
  background: #fff; border: 2px solid var(--border); border-radius: 8px; padding: 18px 16px;
  position: relative; text-align: center;
}
.cf-step.active { border-color: var(--red); background: linear-gradient(180deg, #fff, #FFF5F6); }
.cf-step .n { font-family: 'Barlow Condensed'; font-weight: 700; font-size: 10px; color: var(--red); letter-spacing: 0.14em; text-transform: uppercase; }
.cf-step .t { font-family: 'Roboto Slab'; font-weight: 600; font-size: 14px; color: var(--navy); margin-top: 6px; }
.cf-step .d { font-size: 11px; color: var(--muted); margin-top: 4px; line-height: 1.45; }
.cf-arrow {
  position: absolute; top: 50%; right: -14px; width: 14px; height: 2px; background: var(--red); z-index: 1;
}
.cf-arrow::after {
  content: ''; position: absolute; right: -2px; top: -3px; border: 4px solid transparent; border-left-color: var(--red);
}
.continuum-base {
  background: var(--navy); color: #fff; border-radius: 6px; padding: 14px 18px; margin-top: 10px;
  display: flex; justify-content: space-between; align-items: center;
}
.continuum-base .tag {
  font-family: 'Barlow Condensed'; font-weight: 700; font-size: 11px; color: var(--red);
  text-transform: uppercase; letter-spacing: 0.14em;
}
.continuum-base .name {
  font-family: 'Roboto Slab'; font-weight: 600; font-size: 15px; margin-top: 2px;
}
.continuum-base .sub { font-size: 12px; color: rgba(255,255,255,0.75); margin-top: 2px; }

