/* ==========================================================================
   PROVERIFY.AI DESIGN SYSTEM
   Harmonized with TokenOps & Proverify Brand Architecture
   ========================================================================== */

:root {
  color-scheme: light;
  --black: #0a0a0a;
  --white: #ffffff;
  --paper: #f5f5f7;
  --line: #dedede;
  --line-dark: #c7d3e2;
  --muted: #63636b;
  --red: #a33b2b;     /* muted danger red */
  --amber: #9c7a3c;   /* muted amber caution */
  --accent: #33507B;  /* Proverify TokenOps blue / slate accent */
  --accent-tint: #EEF2F7;
  --accent-line: #C7D3E2;
  --hairline: 1px;

  --color-1: #0a0a0a;
  --color-2: #33507B;
  --color-3: #7690B3;
  --color-4: #C7D3E2;
  --color-5: #63636b;
  --color-6: #A9BAD1;

  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", Segoe UI, sans-serif;
  --font-serif: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", Segoe UI, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

/* Base Reset & Typography */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  background-color: var(--white);
  color: var(--black);
  font-family: var(--font-sans);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  scroll-behavior: smooth;
  height: 100%;
}

body {
  min-height: 100vh;
  background-color: var(--paper);
  font-family: var(--font-sans);
  color: var(--black);
  line-height: 1.45;
}

button, input, select, textarea {
  font-family: inherit;
  color: inherit;
  background: transparent;
  border: none;
  outline: none;
}

button {
  cursor: pointer;
}

a {
  text-decoration: none;
  color: inherit;
}

button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ==========================================================================
   App Shell & Sidebar Layout
   ========================================================================== */

.app-shell {
  display: grid;
  grid-template-columns: 280px 1fr;
  min-height: 100vh;
  background-color: var(--paper);
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 32px 24px;
  background-color: var(--white);
  border-right: var(--hairline) solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 32px;
  z-index: 100;
}

.brand-lockup, .brand-mark {
  display: flex;
  gap: 16px;
  align-items: center;
  padding-bottom: 24px;
  border-bottom: var(--hairline) solid var(--line);
}

.brand-symbol {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  background-color: var(--black);
  color: var(--accent);
  border: none;
  border-radius: 12px;
  box-shadow: none;
  flex-shrink: 0;
}

.brand-symbol svg {
  width: 32px;
  height: 32px;
}

.brand-lockup strong, .brand-mark strong {
  display: block;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--black);
}

.brand-lockup small, .brand-mark small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.nav-list, .side-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
  flex-grow: 1;
  padding-right: 4px;
}

.nav-list::-webkit-scrollbar, .side-nav::-webkit-scrollbar {
  width: 4px;
}
.nav-list::-webkit-scrollbar-thumb, .side-nav::-webkit-scrollbar-thumb {
  background: var(--line);
}

.nav-item, .nav-button {
  width: 100%;
  min-height: 46px;
  border: var(--hairline) solid transparent;
  border-radius: 12px;
  color: var(--muted);
  display: grid;
  grid-template-columns: 28px 1fr;
  align-items: center;
  padding: 0 16px;
  text-align: left;
  font-weight: 800;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transition: all 0.2s ease;
  cursor: pointer;
  background: transparent;
}

.nav-index, .nav-item span:first-child {
  font-family: var(--font-mono);
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.nav-item:hover, .nav-button:hover {
  background: rgba(0, 0, 0, 0.04);
  color: var(--black);
}

.nav-item.active, .nav-button.is-active {
  background-color: var(--black);
  color: var(--white);
  border-color: var(--black);
}

.nav-item.active .nav-index, .nav-button.is-active span:first-child {
  color: var(--accent);
}

.sidebar-foot, .demo-card {
  border: var(--hairline) solid var(--line);
  border-radius: 16px;
  padding: 20px;
  background-color: var(--white);
  margin-top: auto;
}

.sidebar-foot strong, .demo-card strong {
  display: block;
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -0.03em;
  margin-top: 6px;
  color: var(--black);
}

.sidebar-foot small, .sidebar-foot span, .demo-card span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.04em;
}

/* ==========================================================================
   Workspace & Sticky Topbar
   ========================================================================== */

.main-area, .workspace {
  min-width: 0;
  padding: 44px 40px;
  display: flex;
  flex-direction: column;
  gap: 36px;
  background-color: var(--paper);
}

.topbar {
  position: sticky;
  top: 16px;
  z-index: 50;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 18px 28px;
  border: var(--hairline) solid var(--line);
  border-radius: 20px;
  background: var(--white);
  box-shadow: none;
  flex-wrap: wrap;
}

.topbar h1 {
  margin-top: 4px;
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(24px, 2.5vw, 36px);
  letter-spacing: -0.05em;
  color: var(--black);
}

.top-actions, .topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* Dataset Switcher / Role Switcher */
.dataset-switcher, .role-switcher {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border: var(--hairline) solid var(--line);
  border-radius: 999px;
  background: var(--paper);
}

.dataset-pill, .role-button {
  min-height: 34px;
  padding: 0 16px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
}

.dataset-pill:hover, .role-button:hover {
  color: var(--black);
  background: rgba(0, 0, 0, 0.04);
}

.dataset-pill.active, .role-button.is-active {
  background: var(--black);
  color: var(--white);
  box-shadow: none;
}

/* Labels, Eyebrows, Kickers */
.micro-label, .eyebrow, .kicker, .section-label, .article-label, .panel-code, .op-number {
  margin: 0;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.16em;
  line-height: 1.35;
  text-transform: uppercase;
  color: var(--muted);
}

.kicker-acid {
  color: var(--accent) !important;
}

/* Badges */
.badge, .synthetic-badge, .factual-badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: var(--hairline) solid var(--line);
  background: var(--white);
  color: var(--black);
}

.synthetic-badge, .badge.blue {
  background: var(--accent-tint);
  color: var(--accent);
  border-color: var(--accent-line);
}

.factual-badge, .badge.green {
  background: var(--black);
  color: var(--white);
  border-color: var(--black);
}

.badge.amber {
  border-color: var(--amber);
  color: var(--amber);
}

.badge.red {
  background: var(--red);
  color: var(--white);
  border-color: var(--red);
}

/* Buttons */
.button, .primary-button, .ghost-button, .mini-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: var(--hairline) solid var(--line);
  border-radius: 999px;
  min-height: 44px;
  padding: 0 24px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.15s ease;
}

.button-primary, .primary-button {
  background-color: var(--black);
  color: var(--white);
  border-color: var(--black);
}

.button-primary:hover, .primary-button:hover {
  background-color: var(--accent);
  border-color: var(--accent);
  color: var(--white);
  transform: none;
}

.button-ghost, .ghost-button {
  background: var(--white);
  color: var(--black);
  border-color: var(--line);
}

.button-ghost:hover, .ghost-button:hover {
  background: var(--black);
  color: var(--white);
  border-color: var(--black);
}

.button-secondary {
  background: var(--accent-tint);
  color: var(--accent);
  border-color: var(--accent-line);
}

.button-secondary:hover {
  background: var(--accent);
  color: var(--white);
  border-color: var(--accent);
}

.button-sm, .mini-button {
  min-height: 34px;
  padding: 0 16px;
  font-size: 10px;
  border-radius: 999px;
  background: var(--white);
  color: var(--black);
}

.button-sm:hover, .mini-button:hover {
  background: var(--black);
  color: var(--white);
  border-color: var(--black);
}

/* ==========================================================================
   Screen & View Panels Base
   ========================================================================== */

.screen {
  display: none;
  animation: reveal 0.24s ease-out;
}

.screen.active {
  display: flex;
  flex-direction: column;
  gap: 36px;
}

@keyframes reveal {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: none; }
}

.panel, .stat-card, .cap-card, .screen-guide-card, .opportunity-card, .statement-card, .outline-card, .kpi-card, .benchmark-card {
  border: var(--hairline) solid var(--line);
  border-radius: 22px;
  background: var(--white);
  box-shadow: none;
}

.panel {
  padding: 28px;
}

.panel-heading, .view-head, .panel-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  border-bottom: var(--hairline) solid var(--line);
  padding-bottom: 16px;
  margin-bottom: 20px;
}

.panel-heading h3, .view-head h2, .panel-head h3 {
  font-family: var(--font-serif);
  font-size: 24px;
  font-weight: 400;
  letter-spacing: -0.04em;
  color: var(--black);
  margin-top: 4px;
}

.body-copy, .panel-sub {
  margin-top: 8px;
  color: var(--black);
  font-size: 14.5px;
  line-height: 1.45;
}

/* ==========================================================================
   Screen 01: Executive Brief / Overview Hero
   ========================================================================== */

.overview-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(320px, 0.6fr);
  gap: 24px;
  padding: 40px;
  border: var(--hairline) solid var(--line);
  border-radius: 22px;
  background: var(--white);
  box-shadow: none;
}

.overview-hero-content {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
}

.overview-hero-content h2 {
  font-family: var(--font-serif);
  font-size: clamp(32px, 4vw, 54px);
  font-weight: 400;
  letter-spacing: -0.05em;
  line-height: 1.0;
  color: var(--black);
  margin-top: 6px;
}

.overview-lead {
  font-family: var(--font-serif);
  font-size: clamp(16px, 1.6vw, 20px);
  line-height: 1.35;
  color: var(--black);
}

.so-what-callout {
  margin-top: 8px;
  padding: 20px 24px;
  border: var(--hairline) solid var(--line);
  border-radius: 16px;
  background: var(--paper);
  border-left: 6px solid var(--accent);
}

.so-what-tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 6px;
}

.so-what-callout p {
  margin: 0;
  font-size: 14px;
  color: var(--black);
  line-height: 1.45;
}

.so-what-callout strong {
  color: var(--black);
  font-weight: 700;
}

.overview-hero-stats {
  display: flex;
  flex-direction: column;
  gap: 14px;
  justify-content: center;
}

.hero-stat-box {
  border: var(--hairline) solid var(--line);
  border-radius: 16px;
  padding: 20px 24px;
  background: var(--paper);
}

.hero-stat-box span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-stat-box strong {
  display: block;
  font-family: var(--font-serif);
  font-size: clamp(28px, 3vw, 42px);
  font-weight: 400;
  letter-spacing: -0.06em;
  line-height: 0.95;
  color: var(--black);
  margin-top: 8px;
}

.hero-stat-box small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
}

.hero-stat-box.accent-box {
  background: var(--accent-tint);
  border-color: var(--accent-line);
}

.hero-stat-box.accent-box span {
  color: var(--accent);
}

.hero-stat-box.accent-box strong {
  color: var(--accent);
}

/* 5-Stage Progression Ribbon */
.progression-ribbon {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
  align-items: stretch;
}

.prog-step {
  padding: 20px 18px;
  border: var(--hairline) solid var(--line);
  border-radius: 16px;
  background: var(--white);
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 150px;
}

.prog-step:hover {
  background: var(--paper);
  border-color: var(--accent);
  transform: translateY(-2px);
}

.prog-num {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  background: var(--black);
  color: var(--white);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 800;
  border-radius: 999px;
}

.prog-step strong {
  font-family: var(--font-serif);
  font-size: 16px;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--black);
}

.prog-step p {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.35;
}

.prog-tag {
  margin-top: auto;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--accent);
  background: var(--accent-tint);
  border: 1px solid var(--accent-line);
  padding: 3px 8px;
  border-radius: 999px;
  width: fit-content;
}

.prog-arrow {
  display: none;
}

/* Capability Grid */
.overview-section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  border-bottom: var(--hairline) solid var(--line);
  padding-bottom: 16px;
  margin-bottom: 20px;
}

.overview-section-header h3 {
  font-family: var(--font-serif);
  font-size: 24px;
  font-weight: 400;
  letter-spacing: -0.04em;
  color: var(--black);
  margin-top: 4px;
}

.capability-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.cap-card {
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 180px;
}

.cap-index {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 800;
  color: var(--accent);
  background: var(--accent-tint);
  border: 1px solid var(--accent-line);
  padding: 2px 8px;
  width: fit-content;
  border-radius: 999px;
}

.cap-card strong {
  font-family: var(--font-serif);
  font-size: 17px;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--black);
}

.cap-card p {
  margin: 0;
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.4;
}

.cap-card code {
  font-family: var(--font-mono);
  font-size: 11px;
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 2px 6px;
  border-radius: 4px;
}

/* Screen Guide Cards */
.screen-guide-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.screen-guide-card {
  padding: 22px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  min-height: 220px;
}

.screen-guide-card:hover {
  background: var(--paper);
  border-color: var(--accent);
  transform: translateY(-2px);
}

.sg-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.sg-screen-id {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}

.sg-badge {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 2px 8px;
  border-radius: 999px;
}

.screen-guide-card h4 {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -0.03em;
  color: var(--black);
  margin-bottom: 8px;
}

.screen-guide-card p {
  margin: 0 0 16px;
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.4;
}

.sg-commercial {
  margin-top: auto;
  padding: 12px 14px;
  background: var(--paper);
  border: var(--hairline) solid var(--line);
  border-radius: 12px;
}

.sg-commercial span {
  display: block;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.sg-commercial strong {
  display: block;
  margin-top: 3px;
  font-size: 12px;
  color: var(--black);
  font-weight: 600;
}

.sg-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 12px;
  padding-top: 10px;
  border-top: var(--hairline) solid var(--line);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 800;
  color: var(--accent);
}

/* Pitch & Pilot Steps */
.pitch-steps {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.pitch-step-item {
  padding: 16px 20px;
  border: var(--hairline) solid var(--line);
  background: var(--paper);
  border-radius: 14px;
}

.pitch-step-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 6px;
}

.p-num {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  background: var(--black);
  color: var(--white);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 800;
  border-radius: 999px;
}

.pitch-step-head strong {
  font-family: var(--font-serif);
  font-size: 16px;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--black);
}

.inline-go {
  margin-left: auto;
  border: var(--hairline) solid var(--accent-line);
  background: var(--accent-tint);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.inline-go:hover {
  background: var(--accent);
  color: var(--white);
  border-color: var(--accent);
}

.pitch-step-item p {
  margin: 0;
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.45;
}

.scope-highlight {
  padding: 18px 20px;
  background: var(--paper);
  border: var(--hairline) solid var(--line);
  border-left: 6px solid var(--accent);
  border-radius: 14px;
  margin-bottom: 16px;
}

.scope-highlight p {
  margin: 0 0 6px;
  font-weight: 700;
  font-size: 14px;
  color: var(--black);
}

.scope-highlight blockquote {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 15px;
  font-style: italic;
  color: var(--muted);
  line-height: 1.4;
}

.pilot-specs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 16px;
  background: var(--paper);
  border: var(--hairline) solid var(--line);
  border-radius: 14px;
  margin-bottom: 16px;
}

.pilot-specs div span {
  display: block;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.pilot-specs div strong {
  display: block;
  margin-top: 4px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--black);
}

/* Closing Callout Panel */
.closing-callout-panel {
  display: grid;
  grid-template-columns: 1fr 1.35fr;
  gap: 28px;
  align-items: center;
  padding: 36px 40px;
  background: var(--white);
  border: var(--hairline) solid var(--line);
  border-radius: 22px;
}

.closing-left .kicker {
  color: var(--accent);
}

.closing-left p {
  margin: 8px 0 0;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.45;
}

.closing-right {
  border-left: var(--hairline) solid var(--line);
  padding-left: 28px;
}

.closing-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}

.closing-right blockquote {
  margin: 0 0 16px;
  font-family: var(--font-serif);
  font-size: 19px;
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: -0.02em;
  color: var(--black);
}

.closing-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

/* ==========================================================================
   Screen 02: Connect Data & Stat Grid
   ========================================================================== */

.stat-grid {
  display: grid;
  gap: 16px;
}

.stat-grid-four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.stat-card {
  padding: 24px;
  min-height: 130px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.stat-card > span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.stat-card > strong {
  display: block;
  margin: 10px 0 4px;
  font-family: var(--font-serif);
  font-size: clamp(26px, 2.5vw, 38px);
  font-weight: 400;
  letter-spacing: -0.05em;
  line-height: 1.0;
  color: var(--black);
}

.stat-card > small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.accent-card {
  background: var(--accent-tint);
  border-color: var(--accent-line);
}

.accent-card > span, .accent-card > small {
  color: var(--accent);
}

.accent-card > strong {
  color: var(--accent);
}

.two-column {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.source-list {
  display: grid;
  gap: 14px;
}

.source-row {
  display: grid;
  grid-template-columns: 140px 1fr 40px;
  align-items: center;
  gap: 14px;
  font-size: 13.5px;
}

.source-row > div:first-child {
  display: flex;
  align-items: center;
  gap: 10px;
}

.source-row > span {
  color: var(--black);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  text-align: right;
}

.source-icon {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  color: var(--white);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 800;
  border-radius: 8px;
}

.source-icon.sf { background: #168ddd; }
.source-icon.hs { background: #ff6f3d; }
.source-icon.gm { background: #d44940; }
.source-icon.sl { background: #6b3d91; }

.source-meter {
  height: 12px;
  border-radius: 999px;
  background: var(--paper);
  border: var(--hairline) solid var(--line);
  overflow: hidden;
}

.source-meter i {
  display: block;
  height: 100%;
  background: var(--accent);
}

.pipeline-list {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.pipeline-list li {
  padding: 16px 12px;
  border: var(--hairline) solid var(--line);
  border-radius: 14px;
  background: var(--paper);
  text-align: center;
}

.pipeline-list li > span {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  margin: 0 auto 8px;
  color: var(--white);
  background: var(--black);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 800;
  border-radius: 999px;
}

.pipeline-list strong {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--black);
  min-height: 32px;
}

.pipeline-list small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
}

.evidence-strip {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 30px;
  padding: 24px 28px;
  border: var(--hairline) solid var(--line);
  border-radius: 20px;
  background: var(--white);
}

.evidence-strip > div:first-child strong {
  display: block;
  margin-top: 6px;
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--black);
}

.finding-metric {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-left: 24px;
  border-left: var(--hairline) solid var(--line);
}

.finding-metric strong {
  font-family: var(--font-serif);
  font-size: 32px;
  font-weight: 400;
  letter-spacing: -0.05em;
  color: var(--black);
}

.finding-metric span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ==========================================================================
   Trace Explorer
   ========================================================================== */

.trace-explorer-panel {
  margin-top: 8px;
}

.trace-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.trace-search-box {
  flex: 1;
  min-width: 260px;
  max-width: 440px;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 42px;
  padding: 0 16px;
  border: var(--hairline) solid var(--line);
  border-radius: 999px;
  background: var(--white);
}

.search-box span {
  color: var(--muted);
  font-size: 15px;
}

.search-box input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 13px;
  color: var(--black);
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.filter-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.filter-label select {
  height: 40px;
  padding: 0 28px 0 14px;
  border: var(--hairline) solid var(--line);
  border-radius: 999px;
  background: var(--white);
  font-size: 12px;
  font-weight: 700;
  color: var(--black);
}

.trace-explorer-grid {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 0;
  border: var(--hairline) solid var(--line);
  border-radius: 20px;
  overflow: hidden;
  background: var(--white);
  min-height: 600px;
}

.trace-list-pane {
  border-right: var(--hairline) solid var(--line);
  display: flex;
  flex-direction: column;
  background: var(--paper);
}

.trace-list-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  border-bottom: var(--hairline) solid var(--line);
  background: var(--paper);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.trace-list-items {
  overflow-y: auto;
  max-height: 580px;
  display: flex;
  flex-direction: column;
}

.trace-list-item {
  padding: 14px 18px;
  border-bottom: var(--hairline) solid var(--line);
  cursor: pointer;
  transition: all 0.15s ease;
  background: transparent;
}

.trace-list-item:hover {
  background: var(--white);
}

.trace-list-item.selected {
  background: var(--white);
  border-left: 4px solid var(--accent);
}

.trace-item-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.trace-id-badge-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.trace-id-badge-wrap strong {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--black);
}

.trace-item-time {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--muted);
}

.trace-item-company {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--black);
  margin-bottom: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.trace-item-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.trace-wf-tag {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  padding: 2px 8px;
  background: var(--white);
  border: 1px solid var(--line);
  color: var(--black);
  border-radius: 999px;
  max-width: 210px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.trace-realism-tag, .realism-badge-pill {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 999px;
}

.realism-straight-through {
  background: var(--black);
  color: var(--white);
}

.realism-policy-exception {
  background: var(--accent-tint);
  color: var(--accent);
  border: 1px solid var(--accent-line);
}

.realism-data-defect {
  background: var(--red);
  color: var(--white);
}

.realism-anomaly {
  background: var(--paper);
  border: 1px solid var(--amber);
  color: var(--amber);
}

.trace-detail-pane {
  padding: 28px;
  display: flex;
  flex-direction: column;
  background: var(--white);
}

.trace-detail-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding-bottom: 20px;
  border-bottom: var(--hairline) solid var(--line);
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.trace-detail-header-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.trace-wf-badge {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 800;
  padding: 3px 10px;
  background: var(--accent-tint);
  color: var(--accent);
  border: 1px solid var(--accent-line);
  border-radius: 999px;
  width: fit-content;
}

.trace-detail-header-info h4 {
  margin: 4px 0 2px;
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 400;
  letter-spacing: -0.03em;
  color: var(--black);
}

.trace-meta-line {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
}

.trace-tab-content {
  display: none;
}

.trace-tab-content.active {
  display: block;
  animation: reveal 0.2s ease-out;
}

/* Telemetry Stream */
.telemetry-panel-lead {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 14px 18px;
  background: var(--paper);
  border: var(--hairline) solid var(--line);
  border-radius: 14px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.telemetry-panel-lead strong {
  display: block;
  font-size: 13px;
  color: var(--black);
  font-family: var(--font-mono);
  font-weight: 700;
}

.telemetry-panel-lead p {
  margin: 2px 0 0;
  font-size: 12px;
  color: var(--muted);
}

.telemetry-stats-bar {
  display: flex;
  align-items: center;
  gap: 8px;
}

.t-stat {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  color: var(--black);
  background: var(--white);
  border: var(--hairline) solid var(--line);
  padding: 4px 10px;
  border-radius: 999px;
}

.t-stat em {
  font-style: normal;
  color: var(--muted);
}

.t-stat .error-text {
  color: var(--red);
}

.telemetry-event-stream {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 480px;
  overflow-y: auto;
  padding-right: 4px;
}

.telemetry-event-card {
  border: var(--hairline) solid var(--line);
  background: var(--white);
  border-radius: 14px;
  overflow: hidden;
}

.telemetry-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  background: var(--paper);
  border-bottom: var(--hairline) solid var(--line);
  flex-wrap: wrap;
}

.telemetry-head-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 240px;
}

.telemetry-seq {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 800;
  color: var(--accent);
}

.telemetry-tool-sig {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--black);
  word-break: break-all;
}

.http-status-pill {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 999px;
}

.http-status-pill.status-ok {
  background: var(--black);
  color: var(--white);
}

.http-status-pill.status-err {
  background: var(--red);
  color: var(--white);
}

.latency-chip {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  background: var(--white);
  border: 1px solid var(--line);
  color: var(--muted);
  border-radius: 999px;
}

.telemetry-event-narrative {
  padding: 10px 16px;
  font-size: 13px;
  color: var(--black);
  line-height: 1.4;
  background: var(--white);
  border-bottom: var(--hairline) solid var(--line);
}

.telemetry-payload-container {
  padding: 12px 16px;
  background: var(--paper);
}

.payload-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}

.telemetry-payload-box {
  margin: 0;
  padding: 10px 14px;
  background: var(--white);
  border: var(--hairline) solid var(--line);
  border-radius: 10px;
  color: var(--black);
  font-family: var(--font-mono);
  font-size: 11.5px;
  line-height: 1.5;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

.raw-json-box {
  margin: 0;
  padding: 16px;
  background: var(--paper);
  border: var(--hairline) solid var(--line);
  color: var(--black);
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.5;
  border-radius: 14px;
  overflow-x: auto;
  max-height: 480px;
}

/* ==========================================================================
   Screen 03: Workflow Map & Tables
   ========================================================================== */

.toolbar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  align-items: center;
}

.segmented {
  display: inline-flex;
  padding: 4px;
  border: var(--hairline) solid var(--line);
  border-radius: 999px;
  background: var(--paper);
}

.segmented button {
  min-width: 72px;
  padding: 6px 14px;
  border: 0;
  color: var(--muted);
  background: transparent;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.segmented button.active {
  color: var(--white);
  background: var(--black);
  box-shadow: none;
}

.table-shell, .table-wrap {
  overflow-x: auto;
  border: var(--hairline) solid var(--line);
  border-radius: 20px;
  background: var(--white);
  box-shadow: none;
}

table {
  width: 100%;
  min-width: 900px;
  border-collapse: collapse;
}

th {
  padding: 16px 20px;
  color: var(--muted);
  background: var(--paper);
  border-bottom: var(--hairline) solid var(--line);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-align: left;
  text-transform: uppercase;
}

td {
  padding: 16px 20px;
  border-bottom: var(--hairline) solid var(--line);
  font-size: 13.5px;
  color: var(--black);
}

tbody tr {
  cursor: pointer;
  transition: background 0.15s ease;
}

tbody tr:hover {
  background: var(--paper);
}

tbody tr:last-child td {
  border-bottom: 0;
}

.workflow-name {
  display: flex;
  align-items: center;
  gap: 12px;
}

.rank-cell {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  color: var(--black);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 800;
}

.workflow-name strong {
  display: block;
  font-family: var(--font-serif);
  font-size: 14px;
  font-weight: 500;
}

.workflow-name small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
}

.metric-bar {
  width: 96px;
  height: 6px;
  margin-top: 6px;
  background: var(--paper);
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid var(--line);
}

.metric-bar i {
  display: block;
  height: 100%;
  background: var(--accent);
}

.impl-badge {
  display: inline-flex;
  padding: 3px 8px;
  color: var(--black);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.savings {
  color: var(--black);
  font-family: var(--font-mono);
  font-weight: 800;
}

.open-arrow {
  color: var(--accent);
  font-size: 16px;
}

.empty-state {
  padding: 40px;
  color: var(--muted);
  text-align: center;
  font-size: 14px;
}

.map-footnote {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  margin-top: 14px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11px;
}

/* ==========================================================================
   Screen 04: Workflow Detail
   ========================================================================== */

.detail-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.workflow-select-label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.workflow-select-label select {
  min-width: 280px;
  height: 42px;
  padding: 0 34px 0 16px;
  color: var(--black);
  border: var(--hairline) solid var(--line);
  border-radius: 999px;
  background: var(--white);
  font-weight: 700;
  font-size: 13px;
}

.detail-summary {
  display: grid;
  grid-template-columns: 200px 1fr 280px;
  align-items: stretch;
  border: var(--hairline) solid var(--line);
  border-radius: 22px;
  background: var(--white);
  overflow: hidden;
}

.detail-number, .detail-copy, .decision-box {
  padding: 24px;
}

.detail-number {
  color: var(--white);
  background: var(--black);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.detail-number span, .decision-box span {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-line);
}

.detail-number strong {
  display: block;
  margin: 10px 0 4px;
  font-family: var(--font-serif);
  font-size: clamp(32px, 3.5vw, 44px);
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.06em;
  color: var(--white);
}

.detail-number small {
  color: var(--muted);
  font-size: 11px;
}

.detail-copy p {
  margin: 0 0 14px;
  color: var(--black);
  font-size: 14px;
  line-height: 1.45;
}

.tag-list, .factor-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag-list span, .factor-list span {
  padding: 4px 10px;
  color: var(--black);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.decision-box {
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: var(--black);
  background: var(--paper);
  border-left: var(--hairline) solid var(--line);
}

.decision-box span {
  color: var(--accent);
}

.decision-box strong {
  margin: 8px 0 4px;
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--black);
}

.decision-box small {
  color: var(--muted);
  font-size: 12px;
}

.procedure-track {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  margin: 16px 0 0;
  padding: 0;
  counter-reset: procedure;
  list-style: none;
}

.procedure-track li {
  position: relative;
  min-height: 90px;
  padding: 34px 14px 14px;
  border: var(--hairline) solid var(--line);
  border-radius: 16px;
  background: var(--paper);
  counter-increment: procedure;
  font-size: 12px;
  font-weight: 700;
  color: var(--black);
}

.procedure-track li::before {
  content: counter(procedure, decimal-leading-zero);
  position: absolute;
  top: 12px;
  left: 14px;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 800;
}

.detail-grid {
  display: grid;
  grid-template-columns: 1.5fr 0.9fr;
  gap: 18px;
  margin-top: 18px;
}

.quality-floor {
  padding: 3px 8px;
  color: var(--accent);
  background: var(--accent-tint);
  border: 1px solid var(--accent-line);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.pareto-chart {
  min-height: 250px;
}

.pareto-chart svg {
  display: block;
  width: 100%;
  height: 250px;
}

.benchmark-legend {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.legend-item {
  display: grid;
  grid-template-columns: 10px 1fr;
  gap: 8px;
  align-items: center;
  font-size: 12px;
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--color-1);
}

.legend-item:nth-child(2) .legend-dot { background: var(--color-2); }
.legend-item:nth-child(3) .legend-dot { background: var(--color-3); }
.legend-item:nth-child(4) .legend-dot { background: var(--amber); }

.legend-item strong {
  display: block;
  font-weight: 700;
  color: var(--black);
}

.legend-item small {
  display: block;
  color: var(--muted);
  font-size: 10.5px;
}

.eval-score {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  border-radius: 16px;
  color: var(--white);
  background: var(--black);
}

.eval-score strong {
  font-family: var(--font-serif);
  font-size: 38px;
  font-weight: 400;
  letter-spacing: -0.06em;
  line-height: 1;
}

.eval-score span {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.eval-facts {
  margin: 16px 0;
}

.eval-facts > div {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 12px;
  padding: 10px 0;
  border-bottom: var(--hairline) solid var(--line);
}

.eval-facts dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.eval-facts dd {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  color: var(--black);
}

/* Workflow Sample Trace Cards */
.workflow-sample-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.wf-sample-card {
  padding: 20px;
  border: var(--hairline) solid var(--line);
  border-radius: 18px;
  background: var(--white);
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 170px;
}

.wf-sample-card:hover {
  background: var(--paper);
  border-color: var(--accent);
  transform: translateY(-2px);
}

.wf-sample-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.wf-sample-card-body strong {
  display: block;
  font-family: var(--font-serif);
  font-size: 15px;
  font-weight: 500;
  color: var(--black);
  margin-bottom: 4px;
}

.wf-sample-card-body p {
  margin: 0 0 10px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.35;
}

.wf-sample-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--muted);
  border-top: var(--hairline) solid var(--line);
  padding-top: 8px;
}

/* ==========================================================================
   Screen 05: Opportunity View
   ========================================================================== */

.opportunity-hero {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  align-items: end;
  gap: 36px;
  padding: 40px;
  border-radius: 22px;
  background: var(--black);
  color: var(--white);
  border: var(--hairline) solid var(--black);
}

.opportunity-hero .kicker {
  color: var(--accent-line);
}

.opportunity-hero h2 {
  margin: 8px 0;
  font-family: var(--font-serif);
  font-size: clamp(3rem, 6.5vw, 5.2rem);
  font-weight: 400;
  line-height: 0.9;
  letter-spacing: -0.075em;
  color: var(--white);
}

.opportunity-hero h2 span {
  font-size: 0.28em;
  letter-spacing: 0;
}

.opportunity-hero p {
  max-width: 560px;
  margin: 16px 0 0;
  color: var(--line-dark);
  font-size: 15px;
  line-height: 1.45;
}

.hero-equation {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: baseline;
  gap: 4px 14px;
  padding: 24px;
  border-radius: 16px;
  background: var(--white);
  color: var(--black);
  border: var(--hairline) solid var(--line);
}

.hero-equation span {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.hero-equation strong {
  font-family: var(--font-serif);
  font-size: 26px;
  font-weight: 500;
  letter-spacing: -0.04em;
  text-align: right;
  color: var(--black);
}

.hero-equation i {
  grid-column: 1 / -1;
  font-style: normal;
  color: var(--accent);
  font-weight: 700;
  font-size: 13px;
  margin-top: 4px;
}

.hero-equation small {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 11px;
}

.opportunity-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.opportunity-card {
  min-height: 320px;
  display: flex;
  flex-direction: column;
  padding: 28px;
}

.opportunity-card h3 {
  margin: 16px 0 8px;
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 400;
  letter-spacing: -0.03em;
  color: var(--black);
}

.opportunity-card p {
  margin: 6px 0 16px;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.4;
}

.op-metric {
  display: block;
  margin-top: 8px;
  font-family: var(--font-serif);
  font-size: 2.5rem;
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.05em;
  color: var(--black);
}

.op-metric small {
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0;
}

.op-proof {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding: 14px 18px;
  border-radius: 14px;
  background: var(--paper);
  border: var(--hairline) solid var(--line);
}

.op-proof span {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.op-proof strong {
  font-family: var(--font-serif);
  font-size: 24px;
  font-weight: 500;
  letter-spacing: -0.03em;
  color: var(--black);
}

.compile-card {
  color: var(--white);
  background: var(--black);
  border-color: var(--black);
}

.compile-card h3, .compile-card .op-metric {
  color: var(--white);
}

.compile-card p, .compile-card .op-metric small {
  color: var(--line-dark);
}

.compile-card .op-number {
  color: var(--accent-line);
}

.compile-card a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  padding-top: 16px;
  color: var(--white);
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.value-share-panel {
  display: grid;
  grid-template-columns: 0.75fr 1.25fr;
  align-items: center;
  gap: 30px;
  padding: 28px;
  border: var(--hairline) solid var(--line);
  border-radius: 22px;
  background: var(--white);
}

.value-share-panel h3 {
  margin: 6px 0;
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 400;
  letter-spacing: -0.03em;
  color: var(--black);
}

.value-share-panel p {
  margin: 0;
  color: var(--muted);
  font-size: 13.5px;
}

.value-math {
  display: grid;
  grid-template-columns: 1fr auto 0.7fr auto 1fr;
  align-items: center;
  gap: 12px;
}

.value-math div {
  padding: 14px 16px;
  border-radius: 14px;
  background: var(--paper);
  border: var(--hairline) solid var(--line);
}

.value-math span, .value-math strong {
  display: block;
}

.value-math span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.value-math strong {
  margin-top: 4px;
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--black);
}

.value-math i {
  color: var(--muted);
  font-style: normal;
  font-size: 16px;
}

.value-math .value-result {
  color: var(--white);
  background: var(--black);
  border-color: var(--black);
}

.value-math .value-result span {
  color: var(--line-dark);
}

.value-math .value-result strong {
  color: var(--white);
}

.asset-line {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
  padding: 16px;
  color: var(--black);
  border: 1px dashed var(--line);
  border-radius: 14px;
  background: var(--paper);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
}

.asset-line i {
  color: var(--accent);
  font-style: normal;
}

/* Range input */
.range-label {
  display: grid;
  gap: 8px;
  margin-top: 20px;
  font-size: 12px;
  font-weight: 700;
  color: var(--black);
}

.range-label strong {
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 12px;
  margin-left: 4px;
}

input[type="range"] {
  width: 100%;
  accent-color: var(--black);
  height: 6px;
  border-radius: 999px;
  background: var(--paper);
  border: var(--hairline) solid var(--line);
  outline: none;
  margin-top: 6px;
}

/* Footer */
footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 24px 0 0;
  color: var(--muted);
  border-top: var(--hairline) solid var(--line);
  font-size: 12px;
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */

@media (max-width: 1120px) {
  .stat-grid-four { grid-template-columns: repeat(2, 1fr); }
  .two-column, .detail-grid, .overview-hero, .closing-callout-panel { grid-template-columns: 1fr; }
  .trace-explorer-grid { grid-template-columns: 280px 1fr; }
  .workflow-sample-cards { grid-template-columns: 1fr 1fr; }
  .detail-summary { grid-template-columns: 1fr; }
  .decision-box { border-left: 0; border-top: var(--hairline) solid var(--line); }
  .procedure-track { grid-template-columns: repeat(3, 1fr); }
  .opportunity-grid { grid-template-columns: 1fr 1fr; }
  .value-share-panel { grid-template-columns: 1fr; }
  .capability-grid, .screen-guide-grid { grid-template-columns: repeat(2, 1fr); }
  .progression-ribbon { grid-template-columns: 1fr; gap: 10px; }
  .closing-right { border-left: 0; padding-left: 0; border-top: var(--hairline) solid var(--line); padding-top: 20px; }
}

@media (max-width: 800px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed;
    inset: auto 0 0;
    width: auto;
    height: 68px;
    flex-direction: row;
    align-items: center;
    padding: 8px 12px;
    gap: 8px;
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.05);
  }
  .brand-lockup, .sidebar-foot { display: none; }
  .nav-list { width: 100%; display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; margin: 0; }
  .nav-item { min-height: 50px; flex-direction: column; justify-content: center; gap: 2px; padding: 4px; font-size: 9px; text-align: center; }
  .nav-index { font-size: 8px; }
  .main-area { margin-left: 0; padding: 20px 18px 88px; }
  .topbar { min-height: 72px; padding: 14px 18px; border-radius: 16px; }
  .topbar h1 { font-size: 20px; }
  .synthetic-badge, .factual-badge { display: none; }
  .evidence-strip { grid-template-columns: 1fr; gap: 15px; }
  .finding-metric { padding: 12px 0 0; border-left: 0; border-top: var(--hairline) solid var(--line); }
  .trace-explorer-grid { grid-template-columns: 1fr; }
  .trace-list-items { max-height: 240px; }
  .workflow-sample-cards { grid-template-columns: 1fr; }
  .opportunity-hero { grid-template-columns: 1fr; gap: 24px; padding: 24px; }
  .opportunity-grid { grid-template-columns: 1fr; }
  .value-math { grid-template-columns: 1fr; }
  .value-math i { text-align: center; }
  .pilot-specs { grid-template-columns: 1fr; }
  footer { flex-direction: column; gap: 8px; }
}

@media (max-width: 560px) {
  .top-actions .button { padding: 0 12px; }
  .stat-grid-four, .capability-grid, .screen-guide-grid { grid-template-columns: 1fr; }
  .pipeline-list { grid-template-columns: 1fr; gap: 8px; }
  .toolbar { align-items: stretch; flex-direction: column; }
  .segmented { overflow-x: auto; }
  .segmented button { flex: 1; min-width: 62px; }
  .detail-toolbar { align-items: stretch; flex-direction: column; }
  .workflow-select-label select { width: 100%; min-width: 0; }
  .detail-summary { grid-template-columns: 1fr; }
  .procedure-track { grid-template-columns: 1fr 1fr; }
  .benchmark-legend { grid-template-columns: 1fr 1fr; }
}
