:root {
  /* Universally Relatable, Warm, Optimistic, Friendly-Futuristic Daylight Palette */
  --bg-daylight: #f8fafc;
  --bg-card: #ffffff;
  --bg-soft-sky: #f0f7ff;
  --bg-soft-amber: #fffbeb;
  --ink-navy: #0f172a;
  --ink-slate: #334155;
  --ink-muted: #475569;
  --sky-blue: #0284c7;
  --royal-blue: #2563eb;
  --cyan-bright: #06b6d4;
  --amber-warm: #f59e0b;
  --amber-deep: #d97706;
  --emerald-ok: #10b981;
  --emerald-deep: #059669;
  --border-soft: #e2e8f0;
  --border-sky: #bae6fd;
  --border-amber: #fde68a;
  --radius: 20px;
  --radius-sm: 12px;
  /* Compatibility tokens */
  --bg-espresso: #120d0a;
  --brass: #d4af37;
  --mission-green: #1b4d3e;
  --cream: #0f172a;
  --cream-muted: #334155;
  --cream-dim: #475569;
  --brass-bright: #0284c7;
  --font-sans: "Plus Jakarta Sans", "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  --shadow-float: 0 14px 36px rgba(15, 23, 42, 0.08), 0 4px 12px rgba(2, 132, 199, 0.06);
  --shadow-hover: 0 20px 44px rgba(2, 132, 199, 0.14), 0 6px 16px rgba(15, 23, 42, 0.08);
  --shadow-amber: 0 18px 40px rgba(245, 158, 11, 0.16), 0 4px 14px rgba(15, 23, 42, 0.07);
}

@keyframes friendlyPulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.5);
  }
  50% {
    transform: scale(1.08);
    box-shadow: 0 0 0 6px rgba(16, 185, 129, 0);
  }
}

@keyframes stepFadeIn {
  0% {
    opacity: 0.35;
    transform: translateY(6px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background-color: var(--bg-daylight);
  color: var(--ink-navy);
  font-family: var(--font-sans);
  font-size: 18px;
  line-height: 1.65;
}

body {
  margin: 0;
  background-color: var(--bg-daylight);
  background-image:
    radial-gradient(circle at 18% 8%, rgba(56, 189, 248, 0.18), transparent 45%),
    radial-gradient(circle at 85% 12%, rgba(245, 158, 11, 0.15), transparent 42%),
    radial-gradient(circle at 50% 55%, rgba(16, 185, 129, 0.08), transparent 55%),
    linear-gradient(180deg, #ffffff 0%, #f8fafc 45%, #f0f7ff 100%);
  color: var(--ink-navy);
  overflow-x: hidden;
}

code, pre {
  font-family: var(--font-mono);
}

code {
  background: #e0f2fe;
  border: 1px solid #bae6fd;
  color: #0369a1;
  padding: 2px 7px;
  border-radius: 6px;
  font-size: 0.85em;
  font-weight: 600;
}

a {
  color: var(--royal-blue);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.15s ease;
}

a:hover,
a:focus-visible {
  color: var(--sky-blue);
  text-decoration: underline;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 10px;
  background: var(--royal-blue);
  color: #ffffff;
  padding: 10px 16px;
  border-radius: 10px;
  font-weight: 800;
  z-index: 1000;
}

.skip-link:focus {
  left: 14px;
}

.container {
  max-width: 1260px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Top Welcome Ribbon & Daylight Header */
.top-ribbon {
  background: linear-gradient(90deg, #0f172a 0%, #1e3a8a 50%, #0f172a 100%);
  color: #f8fafc;
  font-size: 0.82rem;
  padding: 9px 0;
}

.top-ribbon a {
  color: #7dd3fc;
}

.top-ribbon-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: linear-gradient(135deg, #e0f2fe 0%, #fef3c7 100%);
  border: 1.5px solid #7dd3fc;
  color: #0369a1;
  padding: 5px 14px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.top-ribbon .badge-pill {
  background: #f59e0b;
  border-color: #fde68a;
  color: #0f172a;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: #ecfdf5;
  border: 1.5px solid #6ee7b7;
  color: #047857;
  padding: 4px 12px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.pulse-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--emerald-ok);
  display: inline-block;
  animation: friendlyPulse 2s infinite ease-in-out;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-soft);
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.05);
}

.nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 0;
  gap: 18px;
  flex-wrap: wrap;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--ink-navy);
  text-decoration: none;
}

.brand-lockup:hover {
  text-decoration: none;
}

.brand-crest {
  width: 50px;
  height: 50px;
  border-radius: 14px;
  border: 2px solid var(--sky-blue);
  object-fit: cover;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.2);
}

.brand-title {
  font-size: 1.32rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--ink-navy);
  display: block;
  line-height: 1.15;
}

.brand-sub {
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--sky-blue);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  display: block;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.nav-links a {
  color: var(--ink-slate);
  font-weight: 700;
  font-size: 0.9rem;
}

.nav-links a:hover {
  color: var(--royal-blue);
  text-decoration: none;
}

/* Tactile Daylight Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 14px;
  font-weight: 800;
  font-size: 0.92rem;
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform 0.14s ease, box-shadow 0.16s ease, background 0.16s ease;
  text-decoration: none;
}

.btn:hover {
  transform: translateY(-2px);
  text-decoration: none;
}

.btn-brass {
  background: linear-gradient(135deg, #fbbf24 0%, var(--amber-warm) 55%, #d97706 100%);
  color: #0f172a;
  border-color: #fde68a;
  box-shadow: 0 8px 22px rgba(245, 158, 11, 0.32);
}

.btn-brass:hover,
.btn-brass:focus-visible {
  color: #0f172a;
  box-shadow: 0 12px 28px rgba(245, 158, 11, 0.45);
}

.btn-mission {
  background: linear-gradient(135deg, var(--royal-blue) 0%, var(--sky-blue) 100%);
  color: #ffffff;
  border-color: #38bdf8;
  box-shadow: 0 8px 22px rgba(37, 99, 235, 0.28);
}

.btn-mission:hover,
.btn-mission:focus-visible {
  color: #ffffff;
  box-shadow: 0 12px 28px rgba(2, 132, 199, 0.4);
}

.btn-outline {
  background: #ffffff;
  color: var(--royal-blue);
  border-color: #93c5fd;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.05);
}

.btn-outline:hover {
  border-color: var(--royal-blue);
  background: #f0f7ff;
  color: var(--ink-navy);
}

/* Hero Section */
.hero {
  padding: 48px 0 44px;
  border-bottom: 1px solid var(--border-soft);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.06fr 1fr;
  gap: 38px;
  align-items: center;
}

.hero h1 {
  font-size: clamp(2.05rem, 3.6vw, 3.1rem);
  line-height: 1.13;
  letter-spacing: -0.02em;
  margin: 12px 0;
  color: var(--ink-navy);
}

.hero h1 .brass-text {
  background: linear-gradient(90deg, var(--royal-blue) 0%, var(--sky-blue) 50%, var(--amber-deep) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.slogan-banner {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 2px 0 14px;
  padding: 7px 16px;
  border-radius: 12px;
  background: linear-gradient(90deg, #eff6ff 0%, #fffbeb 100%);
  border: 2px solid #93c5fd;
  font-size: 0.96rem;
  font-weight: 800;
  color: var(--ink-navy);
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.1);
}

.hero-lead {
  font-size: 1.02rem;
  color: var(--ink-slate);
  margin: 0 0 20px;
}

.hero-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 22px;
}

.hero-guarantees {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(175px, 1fr));
  gap: 12px;
  padding-top: 14px;
  border-top: 1px solid var(--border-soft);
  font-size: 0.84rem;
  color: var(--ink-slate);
}

.hero-guarantees > div {
  background: #ffffff;
  border: 1.5px solid var(--border-sky);
  border-left: 4px solid var(--sky-blue);
  border-radius: 14px;
  padding: 10px 12px;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.04);
}

.hero-guarantees strong {
  color: var(--ink-navy);
  font-size: 0.86rem;
  display: block;
  margin-bottom: 2px;
}

.hero-stage {
  background: linear-gradient(160deg, #ffffff 0%, #f0f9ff 100%);
  border: 2px solid #7dd3fc;
  border-radius: var(--radius);
  padding: 14px;
  box-shadow: var(--shadow-float);
  position: relative;
}

.hud-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 4px 8px 10px;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--sky-blue);
}

.hero-stage-frame {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  background: #e0f2fe;
  border: 2px solid #bae6fd;
}

.hero-photo {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
}

.hero-svg-fallback {
  width: 100%;
  height: auto;
  display: block;
  background: linear-gradient(180deg, #f0f9ff 0%, #e0f2fe 100%);
  border-top: 2px solid #bae6fd;
}

.hero-caption {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 6px 2px;
  font-size: 0.8rem;
  color: var(--ink-slate);
}

/* Interactive 4-Pillar Strip (Clickable -> Jumps to Workbench Tab) */
.pillars-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(245px, 1fr));
  gap: 16px;
  margin-top: 28px;
}

.pillar-card {
  background: #ffffff;
  border: 2px solid var(--border-sky);
  border-top: 5px solid var(--sky-blue);
  border-radius: var(--radius);
  padding: 16px 18px;
  box-shadow: var(--shadow-float);
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.pillar-card:nth-child(even) {
  border-top-color: var(--amber-warm);
}

.pillar-card:hover,
.pillar-card:focus-visible {
  transform: translateY(-3px);
  border-color: var(--royal-blue);
  box-shadow: var(--shadow-hover);
  outline: none;
}

.pillar-word {
  font-size: 0.92rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--royal-blue);
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.pillar-card:nth-child(even) .pillar-word {
  color: var(--amber-deep);
}

.pillar-desc {
  font-size: 0.86rem;
  color: var(--ink-slate);
  font-weight: 600;
  margin: 0 0 10px;
}

.pillar-jump {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 800;
  color: var(--sky-blue);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* Sections */
.section {
  padding: 64px 0;
  border-bottom: 1px solid var(--border-soft);
}

.section-header {
  max-width: 860px;
  margin-bottom: 32px;
}

.section-header h2 {
  font-size: clamp(1.75rem, 3vw, 2.35rem);
  letter-spacing: -0.015em;
  margin: 8px 0 10px;
  color: var(--ink-navy);
}

.section-header p {
  color: var(--ink-slate);
  margin: 0;
  font-size: 1.02rem;
}

/* Meet the Squad */
.lineup-banner {
  background: #ffffff;
  border: 2px solid var(--border-sky);
  border-radius: var(--radius);
  padding: 16px;
  margin: 0 0 28px;
  box-shadow: var(--shadow-float);
}

.lineup-banner img {
  width: 100%;
  max-height: 390px;
  object-fit: cover;
  border-radius: 14px;
  display: block;
}

.lineup-banner figcaption {
  font-size: 0.86rem;
  color: var(--ink-slate);
  padding-top: 10px;
  text-align: center;
  font-weight: 600;
}

.squad-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin-bottom: 34px;
}

.bot-card {
  background: #ffffff;
  border: 2px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--shadow-float);
  transition: border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
  cursor: pointer;
}

.bot-card:hover,
.bot-card:focus-visible,
.bot-card.active {
  border-color: var(--sky-blue);
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  outline: none;
}

.bot-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.bot-callsign {
  font-family: var(--font-mono);
  font-size: 0.96rem;
  font-weight: 800;
  color: #ffffff;
  background: linear-gradient(135deg, var(--royal-blue), var(--sky-blue));
  padding: 5px 12px;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(2, 132, 199, 0.25);
}

.bot-suit {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 800;
  color: #047857;
  background: #ecfdf5;
  border: 1.5px solid #6ee7b7;
  padding: 3px 10px;
  border-radius: 999px;
}

.bot-role {
  font-size: 1.12rem;
  font-weight: 800;
  margin: 6px 0 8px;
  color: var(--ink-navy);
}

.bot-desc {
  font-size: 0.92rem;
  color: var(--ink-slate);
  margin: 0 0 12px;
}

.bot-meta {
  border-top: 1px solid var(--border-soft);
  padding-top: 10px;
  font-size: 0.78rem;
  color: var(--ink-muted);
  font-weight: 600;
}

/* Interactive Mission Simulator */
.mission-simulator {
  background: linear-gradient(165deg, #f0f9ff 0%, #ffffff 55%, #fffbeb 100%);
  border: 2.5px solid #38bdf8;
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow-float);
}

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

.sim-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.sim-tab {
  background: #ffffff;
  color: var(--ink-navy);
  border: 2px solid #93c5fd;
  border-radius: 12px;
  padding: 9px 15px;
  font-weight: 800;
  font-size: 0.86rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.sim-tab:hover {
  border-color: var(--royal-blue);
  background: #eff6ff;
}

.sim-tab[aria-selected="true"] {
  background: linear-gradient(135deg, var(--royal-blue), var(--sky-blue));
  color: #ffffff;
  border-color: var(--royal-blue);
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.3);
}

.sim-board {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(225px, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.sim-step {
  background: #ffffff;
  border: 2px solid var(--border-sky);
  border-top: 5px solid var(--sky-blue);
  border-radius: 16px;
  padding: 16px;
  animation: stepFadeIn 0.25s ease forwards;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.05);
}

.sim-step:nth-child(even) {
  border-top-color: var(--amber-warm);
}

.sim-step-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: var(--royal-blue);
  font-weight: 800;
  margin-bottom: 6px;
}

.sim-step-head span:last-child {
  color: var(--amber-deep);
  font-size: 0.74rem;
}

.sim-step p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--ink-navy);
}

.sim-statusbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  background: #ffffff;
  border: 2px solid var(--border-sky);
  border-radius: 14px;
  padding: 12px 16px;
  font-size: 0.82rem;
  color: var(--ink-slate);
}

.sim-statusbar strong {
  color: var(--royal-blue);
}

/* ============================================================================
   BOT SQUAD™ COMMAND CENTER v2 — 4-PILLAR INTERACTIVE SOFTWARE WORKBENCH
   ============================================================================ */
.workbench-shell {
  margin-top: 34px;
  background: #ffffff;
  border: 2.5px solid var(--sky-blue);
  border-radius: 22px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.11), 0 6px 20px rgba(2, 132, 199, 0.09);
  overflow: hidden;
}

.wb-appbar {
  background: linear-gradient(90deg, #0f172a 0%, #1e3a8a 55%, #0f172a 100%);
  color: #ffffff;
  padding: 16px 24px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  border-bottom: 2px solid #38bdf8;
}

.wb-appbar-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.wb-window-dots {
  display: inline-flex;
  gap: 6px;
}

.wb-window-dots span {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  display: inline-block;
}

.wb-statusbar {
  background: #f0f9ff;
  border-bottom: 1.5px solid var(--border-sky);
  padding: 10px 24px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--ink-slate);
}

/* 5-Mode Workbench Tab Switcher */
.wb-tablist {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 14px 24px;
  background: #f8fafc;
  border-bottom: 2px solid var(--border-soft);
}

.wb-tab {
  font-family: var(--font-sans);
  background: #ffffff;
  color: var(--ink-slate);
  border: 2px solid var(--border-soft);
  border-radius: 12px;
  padding: 10px 15px;
  font-size: 0.82rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.wb-tab:hover {
  border-color: var(--sky-blue);
  color: var(--ink-navy);
  background: #f0f9ff;
}

.wb-tab[aria-selected="true"] {
  background: linear-gradient(135deg, var(--royal-blue), var(--sky-blue));
  color: #ffffff;
  border-color: var(--royal-blue);
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.28);
}

.wb-body {
  padding: 26px 24px 30px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.wb-pane {
  display: block;
}

.wb-pane[hidden] {
  display: none !important;
}

/* All-in-One Executive Split Overview Banner */
.wb-exec-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}

.wb-kpi-card {
  background: linear-gradient(160deg, #ffffff 0%, #f0f9ff 100%);
  border: 2px solid var(--border-sky);
  border-left: 5px solid var(--royal-blue);
  border-radius: 16px;
  padding: 14px 16px;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.05);
}

.wb-kpi-card:nth-child(2) {
  border-left-color: var(--amber-warm);
}

.wb-kpi-card:nth-child(3) {
  border-left-color: var(--emerald-ok);
}

.wb-kpi-card:nth-child(4) {
  border-left-color: #7c3aed;
}

.wb-kpi-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-muted);
  display: block;
}

.wb-kpi-val {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--ink-navy);
  margin: 4px 0 2px;
  display: block;
}

.wb-kpi-sub {
  font-size: 0.76rem;
  color: var(--ink-slate);
}

/* Workbench Pillar Section Blocks */
.wb-pillar-section {
  background: #ffffff;
  border: 2px solid var(--border-soft);
  border-radius: 18px;
  padding: 22px;
  margin-bottom: 24px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}

.wb-pillar-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding-bottom: 14px;
  margin-bottom: 18px;
  border-bottom: 2px solid #f1f5f9;
}

.wb-pillar-head h4 {
  margin: 4px 0 0;
  font-size: 1.18rem;
  color: var(--ink-navy);
}

.wb-two-col {
  display: grid;
  grid-template-columns: 1.12fr 1fr;
  gap: 22px;
  align-items: start;
}

.wb-subcard {
  background: #f8fafc;
  border: 1.5px solid var(--border-soft);
  border-radius: 14px;
  padding: 16px;
}

.wb-subcard h5 {
  margin: 0 0 10px;
  font-size: 0.94rem;
  color: var(--ink-navy);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

/* Provider Cards & Ollama Probe */
.cc-group-label {
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--royal-blue);
  margin: 0 0 8px;
  display: block;
}

.cc-provider-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.cc-model-btn {
  text-align: left;
  background: #ffffff;
  border: 2px solid var(--border-soft);
  border-radius: 12px;
  padding: 10px 12px;
  color: var(--ink-navy);
  cursor: pointer;
  transition: all 0.15s ease;
}

.cc-model-btn:hover {
  border-color: var(--sky-blue);
  transform: translateY(-1px);
}

.cc-model-btn[aria-pressed="true"] {
  background: linear-gradient(135deg, #eff6ff 0%, #fef3c7 100%);
  border-color: var(--royal-blue);
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.16);
}

.cc-model-name {
  font-size: 0.84rem;
  font-weight: 800;
  color: var(--ink-navy);
  display: block;
}

.cc-model-sub {
  font-size: 0.72rem;
  color: var(--ink-muted);
  display: block;
  margin-top: 2px;
}

/* Per-Unit Model Assignment Matrix */
.unit-matrix-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
  margin-top: 8px;
}

.unit-matrix-table th,
.unit-matrix-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--border-soft);
  text-align: left;
}

.unit-matrix-table th {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  color: var(--ink-muted);
  background: #f1f5f9;
}

.unit-select {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  padding: 5px 8px;
  border-radius: 8px;
  border: 1.5px solid #93c5fd;
  background: #ffffff;
  color: var(--ink-navy);
  font-weight: 700;
}

/* Interactive KB File Explorer */
.kb-explorer-grid {
  display: grid;
  grid-template-columns: 235px 1fr;
  gap: 14px;
  margin-top: 10px;
}

.kb-file-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.kb-file-btn {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-align: left;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1.5px solid var(--border-soft);
  background: #ffffff;
  color: var(--ink-navy);
  cursor: pointer;
  font-weight: 700;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.kb-file-btn:hover {
  border-color: var(--sky-blue);
  background: #f0f9ff;
}

.kb-file-btn[aria-selected="true"] {
  background: var(--royal-blue);
  color: #ffffff;
  border-color: var(--royal-blue);
}

.kb-viewer {
  background: #0f172a;
  color: #f8fafc;
  border-radius: 12px;
  padding: 14px;
  border: 2px solid #38bdf8;
}

.kb-viewer-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  padding-bottom: 8px;
  margin-bottom: 10px;
  border-bottom: 1px solid #334155;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: #7dd3fc;
}

.kb-viewer pre {
  margin: 0;
  font-size: 0.76rem;
  line-height: 1.5;
  color: #e2e8f0;
  white-space: pre-wrap;
  max-height: 220px;
  overflow-y: auto;
}

/* Pillar 2 — Policy Router & Side-by-Side Arena */
.cc-privacy-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 10px 0;
}

.cc-route-btn {
  background: #ffffff;
  border: 2px solid var(--border-amber);
  color: var(--ink-navy);
  padding: 8px 13px;
  border-radius: 10px;
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
}

.cc-route-btn[aria-pressed="true"] {
  background: var(--amber-warm);
  color: #0f172a;
  border-color: var(--amber-deep);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.25);
}

.arena-input-row {
  display: flex;
  gap: 10px;
  margin: 10px 0;
  flex-wrap: wrap;
}

.wb-input {
  flex: 1;
  min-width: 220px;
  padding: 9px 12px;
  border-radius: 10px;
  border: 1.5px solid #93c5fd;
  font-family: var(--font-sans);
  font-size: 0.84rem;
  color: var(--ink-navy);
  background: #ffffff;
}

.arena-compare-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 12px;
}

.arena-card {
  background: #ffffff;
  border: 2px solid var(--border-sky);
  border-top: 4px solid var(--royal-blue);
  border-radius: 14px;
  padding: 14px;
}

.arena-card.offline-card {
  border-top-color: var(--emerald-ok);
  background: #f0fdf4;
  border-color: #86efac;
}

.arena-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 800;
  margin-bottom: 8px;
}

.arena-output {
  font-size: 0.82rem;
  color: var(--ink-navy);
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  padding: 10px;
  margin-bottom: 8px;
  min-height: 78px;
}

.arena-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--ink-slate);
}

/* Pillar 3 — Observed JSONL Trace Stream, Redaction Gate & Health Monitor */
.trace-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.trace-span-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 12px;
}

.trace-span-btn {
  display: grid;
  grid-template-columns: 150px 1fr 90px;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: #ffffff;
  border: 1.5px solid var(--border-soft);
  border-radius: 10px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--ink-navy);
  cursor: pointer;
  text-align: left;
}

.trace-span-btn:hover,
.trace-span-btn[aria-selected="true"] {
  border-color: var(--royal-blue);
  background: #eff6ff;
}

.trace-bar-wrap {
  background: #e2e8f0;
  height: 8px;
  border-radius: 999px;
  overflow: hidden;
}

.trace-bar-fill {
  background: linear-gradient(90deg, var(--sky-blue), var(--emerald-ok));
  height: 100%;
  border-radius: 999px;
}

.heartbeat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.hb-metric {
  background: #ecfdf5;
  border: 1.5px solid #6ee7b7;
  border-radius: 10px;
  padding: 9px 11px;
  font-family: var(--font-mono);
  font-size: 0.74rem;
}

.hb-metric strong {
  display: block;
  color: #047857;
  font-size: 0.88rem;
}

/* Pillar 4 — Measured ROI Calculator, Spend-Guard Caps, 3-Part Calibration & Checkup Scorecard */
.cc-metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.cc-metric {
  background: #ffffff;
  border: 1.5px solid var(--border-soft);
  border-radius: 12px;
  padding: 10px 12px;
}

.cc-metric-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--ink-muted);
  display: block;
}

.cc-metric-val {
  font-family: var(--font-mono);
  font-size: 0.96rem;
  font-weight: 800;
  color: var(--royal-blue);
  margin-top: 3px;
  display: block;
}

.cc-metric.savings {
  background: #ecfdf5;
  border-color: #6ee7b7;
}

.cc-metric.savings .cc-metric-val {
  color: #047857;
}

.calibration-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.78rem;
  margin-top: 10px;
  background: #ffffff;
  border-radius: 10px;
  overflow: hidden;
}

.calibration-table th,
.calibration-table td {
  padding: 9px 10px;
  border-bottom: 1px solid var(--border-soft);
  text-align: left;
}

.calibration-table th {
  background: #eff6ff;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  color: var(--royal-blue);
}

.score-bar-row {
  margin-bottom: 9px;
  font-size: 0.8rem;
}

.score-bar-head {
  display: flex;
  justify-content: space-between;
  font-weight: 700;
  margin-bottom: 3px;
}

/* Pricing Packages (Class 042) */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(295px, 1fr));
  gap: 24px;
  margin-bottom: 28px;
}

.price-card {
  background: #ffffff;
  border: 2px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 26px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--shadow-float);
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.price-card:hover {
  transform: translateY(-3px);
  border-color: var(--sky-blue);
  box-shadow: var(--shadow-hover);
}

.price-card.featured {
  border: 3px solid var(--amber-warm);
  box-shadow: var(--shadow-amber);
}

.price-tier-label {
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--royal-blue);
  font-weight: 800;
}

.price-title {
  font-size: 1.25rem;
  margin: 6px 0 10px;
  color: var(--ink-navy);
}

.price-amount {
  font-size: 1.58rem;
  font-weight: 800;
  color: var(--amber-deep);
  margin-bottom: 8px;
}

.price-sub {
  font-size: 0.88rem;
  color: var(--ink-slate);
  margin-bottom: 16px;
}

.price-list {
  list-style: none;
  padding: 0;
  margin: 0 0 20px;
}

.price-list li {
  padding: 7px 0;
  border-bottom: 1px solid var(--border-soft);
  font-size: 0.92rem;
  color: var(--ink-slate);
}

.price-list li::before {
  content: "✓ ";
  color: var(--emerald-deep);
  font-weight: 900;
}

.addons-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
  margin-bottom: 26px;
}

.policy-box {
  background: #ffffff;
  border: 2px solid var(--border-sky);
  border-left: 6px solid var(--amber-warm);
  border-radius: var(--radius);
  padding: 22px 26px;
  font-size: 0.9rem;
  color: var(--ink-slate);
  box-shadow: var(--shadow-float);
}

.policy-box ul {
  margin: 10px 0 0;
  padding-left: 20px;
}

/* Class 009 Starter Kit */
.kit-box {
  background: #ffffff;
  border: 2.5px solid var(--sky-blue);
  border-radius: var(--radius);
  padding: 30px;
  display: grid;
  grid-template-columns: 1.08fr 1fr;
  gap: 28px;
  align-items: start;
  box-shadow: var(--shadow-float);
}

.code-panel {
  background: #0f172a;
  border: 2px solid #38bdf8;
  border-radius: 16px;
  overflow: hidden;
}

.code-tabs {
  display: flex;
  background: #1e293b;
  border-bottom: 1px solid #334155;
}

.code-tab {
  font-family: var(--font-mono);
  background: transparent;
  color: #cbd5e1;
  border: none;
  padding: 11px 16px;
  font-weight: 700;
  font-size: 0.84rem;
  cursor: pointer;
}

.code-tab[aria-selected="true"] {
  background: #0284c7;
  color: #ffffff;
}

.code-pre-wrap {
  padding: 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.code-pre-wrap pre {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.86rem;
  color: #f8fafc;
  overflow-x: auto;
}

.copy-btn {
  font-family: var(--font-mono);
  background: var(--amber-warm);
  color: #0f172a;
  border: none;
  border-radius: 10px;
  padding: 8px 14px;
  font-size: 0.8rem;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
}

/* How It Works & FAQ */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 22px;
}

.step-card {
  background: #ffffff;
  border: 2px solid var(--border-sky);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-float);
}

.step-card h3 {
  margin: 10px 0;
  color: var(--ink-navy);
  font-size: 1.15rem;
}

.faq-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 20px;
}

.faq-item {
  background: #ffffff;
  border: 2px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow-float);
}

.faq-item h3 {
  margin: 0 0 8px;
  font-size: 1.02rem;
  color: var(--royal-blue);
}

.faq-item p {
  margin: 0;
  font-size: 0.92rem;
  color: var(--ink-slate);
}

.cta-band {
  background: linear-gradient(135deg, #e0f2fe 0%, #fef3c7 100%);
  border-top: 2px solid #7dd3fc;
  border-bottom: 2px solid #fcd34d;
  padding: 54px 0;
  text-align: center;
}

/* Footer */
.site-footer {
  padding: 48px 0 56px;
  background: #0f172a;
  color: #cbd5e1;
  font-size: 0.9rem;
}

.site-footer a {
  color: #7dd3fc;
}

.site-footer .brand-title {
  color: #ffffff;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 28px;
  margin-bottom: 28px;
}

.footer-legal {
  border-top: 1px solid #334155;
  padding-top: 20px;
  font-size: 0.84rem;
  color: #94a3b8;
}

@media (max-width: 960px) {
  .hero-grid,
  .kit-box,
  .wb-two-col,
  .kb-explorer-grid,
  .arena-compare-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }
}


/* ==========================================================================
   Mobile-First UX, Progressive Disclosure & Touch Ergonomics (#220)
   ========================================================================== */

html,
body {
  overflow-x: hidden;
  max-width: 100vw;
}

.mobile-nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  min-width: 48px;
  padding: 10px 14px;
  background: #eff6ff;
  border: 2px solid var(--sky-blue);
  border-radius: 12px;
  color: var(--ink-navy);
  font-family: var(--font-sans);
  font-size: 0.88rem;
  font-weight: 800;
  cursor: pointer;
}

.mobile-nav-toggle[aria-expanded="true"] {
  background: var(--royal-blue);
  border-color: var(--royal-blue);
  color: #ffffff;
}

/* 30-Second Plain-English Quick-Start Banner & Simple/Engineer View Toggle */
.wb-quickstart-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  background: linear-gradient(135deg, #eff6ff 0%, #fef3c7 100%);
  border: 2px solid #7dd3fc;
  border-radius: 16px;
  padding: 14px 18px;
  margin-bottom: 18px;
  box-shadow: 0 6px 18px rgba(2, 132, 199, 0.08);
}

.wb-quickstart-steps {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.88rem;
  color: var(--ink-navy);
  max-width: 720px;
}

.wb-quickstart-steps strong {
  color: var(--royal-blue);
  font-size: 0.94rem;
}

.wb-view-toggle {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
  background: #ffffff;
  padding: 5px;
  border-radius: 12px;
  border: 1.5px solid var(--border-sky);
}

.view-mode-btn {
  min-height: 44px;
  padding: 8px 14px;
  border-radius: 9px;
  font-size: 0.8rem;
  font-weight: 800;
}

/* Plain-English Owner Outcome Callout Card */
.owner-outcome-card {
  background: linear-gradient(135deg, #ecfdf5 0%, #eff6ff 100%);
  border: 2px solid #6ee7b7;
  border-left: 6px solid var(--emerald-ok);
  border-radius: 14px;
  padding: 13px 16px;
  margin-bottom: 14px;
  font-size: 0.88rem;
  color: var(--ink-navy);
  line-height: 1.55;
}

.owner-outcome-card strong {
  color: #047857;
}

#roi-plain-summary {
  font-weight: 700;
  color: #065f46;
}

/* Collapsible Progressive-Disclosure Technical Drawers */
details.tech-drawer {
  margin-top: 12px;
  border: 1.5px solid var(--border-sky);
  border-radius: 12px;
  background: #f8fafc;
  overflow: hidden;
}

summary.tech-drawer-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 48px;
  padding: 10px 14px;
  background: #eff6ff;
  color: var(--royal-blue);
  font-family: var(--font-sans);
  font-size: 0.84rem;
  font-weight: 800;
  cursor: pointer;
  list-style: none;
  user-select: none;
}

summary.tech-drawer-summary::-webkit-details-marker {
  display: none;
}

summary.tech-drawer-summary::after {
  content: "▾ Tap to toggle technical telemetry";
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--ink-muted);
  white-space: nowrap;
}

details.tech-drawer:not([open]) summary.tech-drawer-summary::after {
  content: "▸ Tap to expand technical telemetry";
}

details.tech-drawer > *:not(summary) {
  padding-left: 12px;
  padding-right: 12px;
}

details.tech-drawer > *:last-child:not(summary) {
  padding-bottom: 12px;
}

/* Large, Touch-Friendly Range Sliders for ROI & Spend-Guard Calculator */
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  min-height: 48px;
  background: transparent;
  cursor: pointer;
  margin: 4px 0;
}

input[type="range"]::-webkit-slider-runnable-track {
  height: 12px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--sky-blue), var(--emerald-ok));
  border: 1px solid #93c5fd;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #ffffff;
  border: 3px solid var(--royal-blue);
  box-shadow: 0 3px 10px rgba(15, 23, 42, 0.25);
  margin-top: -9px;
}

input[type="range"]::-moz-range-track {
  height: 12px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--sky-blue), var(--emerald-ok));
  border: 1px solid #93c5fd;
}

input[type="range"]::-moz-range-thumb {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #ffffff;
  border: 3px solid var(--royal-blue);
  box-shadow: 0 3px 10px rgba(15, 23, 42, 0.25);
}

/* Sticky Mobile Nav Drawer (@media max-width: 860px) */
@media (max-width: 860px) {
  .mobile-nav-toggle {
    display: inline-flex;
  }

  .nav-links {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding-top: 12px;
    border-top: 1px solid var(--border-soft);
  }

  .nav-links.nav-open {
    display: flex;
  }

  .nav-links a,
  .nav-links .btn {
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 14px;
    border-radius: 12px;
    background: #f8fafc;
    border: 1px solid var(--border-soft);
    text-align: center;
  }

  .nav-links .btn-brass {
    background: linear-gradient(135deg, #fbbf24 0%, var(--amber-warm) 55%, #d97706 100%);
    color: #0f172a;
  }
}

/* Mobile-First Responsive Layout & Stacked Table Cards (@media max-width: 768px) */
@media (max-width: 768px) {
  html {
    font-size: 16px;
  }

  .container {
    padding: 0 14px;
    max-width: 100%;
  }

  .top-ribbon-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .hero {
    padding: 24px 0 36px;
  }

  .hero-title {
    font-size: 1.85rem;
    line-height: 1.2;
  }

  .hero-actions .btn,
  .btn,
  .cc-btn,
  .sim-tab,
  .wb-tab,
  .kb-file-btn,
  .trace-span-btn,
  .code-tab,
  .copy-btn {
    min-height: 48px;
  }

  /* Stack all multi-column grids cleanly into 1 column */
  .hero-grid,
  .pillars-strip,
  .squad-grid,
  .sim-board,
  .wb-two-col,
  .kb-explorer,
  .arena-compare-grid,
  .unit-matrix-grid,
  .cc-metric-grid,
  .heartbeat-grid,
  .pricing-grid,
  .addons-grid,
  .kit-box,
  .steps-grid,
  .faq-grid,
  .footer-grid {
    grid-template-columns: 1fr !important;
  }

  .command-center-shell,
  .wb-panel,
  .wb-subcard,
  .bot-card,
  .price-card,
  .kit-box,
  .step-card,
  .faq-item {
    padding: 16px;
    min-width: 0;
    max-width: 100%;
  }

  /* Swipeable / Scrollable Segmented Pill Bar for the 5-Mode Workbench */
  .wb-tablist {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    gap: 8px;
    padding: 8px;
    max-width: 100%;
  }

  .wb-tab {
    flex: 0 0 auto;
    scroll-snap-align: start;
    min-height: 48px;
    padding: 10px 14px;
    white-space: nowrap;
  }

  .wb-quickstart-banner {
    flex-direction: column;
    align-items: stretch;
    padding: 14px;
  }

  .wb-view-toggle {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .view-mode-btn {
    min-height: 48px;
    width: 100%;
    justify-content: center;
  }

  summary.tech-drawer-summary {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .trace-span-btn {
    grid-template-columns: 1fr;
    gap: 6px;
    padding: 10px 12px;
  }

  .code-pre-wrap {
    flex-direction: column;
    align-items: stretch;
  }

  .code-pre-wrap pre,
  .kb-viewer,
  .trace-detail-box {
    max-width: 100%;
    overflow-x: auto;
    word-break: break-word;
    overflow-wrap: anywhere;
  }

  /* Convert wide tables (.kb-table, .calibration-table) into Stacked Mobile Summary Cards */
  .table-responsive-wrap {
    overflow-x: visible;
  }

  table.kb-table,
  table.calibration-table,
  table.kb-table thead,
  table.calibration-table thead,
  table.kb-table tbody,
  table.calibration-table tbody,
  table.kb-table tr,
  table.calibration-table tr,
  table.kb-table td,
  table.calibration-table td {
    display: block;
    width: 100%;
  }

  table.kb-table thead,
  table.calibration-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
  }

  table.kb-table tr,
  table.calibration-table tr {
    background: #ffffff;
    border: 1.5px solid var(--border-sky);
    border-radius: 12px;
    margin-bottom: 10px;
    padding: 8px 12px;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
  }

  table.kb-table td,
  table.calibration-table td {
    padding: 6px 0;
    border-bottom: 1px dashed var(--border-soft);
    text-align: left;
    font-size: 0.82rem;
    word-break: break-word;
  }

  table.kb-table td:last-child,
  table.calibration-table td:last-child {
    border-bottom: none;
  }

  table.kb-table td::before,
  table.calibration-table td::before {
    content: attr(data-label);
    display: block;
    font-family: var(--font-mono);
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--royal-blue);
    margin-bottom: 2px;
  }
}


/* ==========================================================================
   4-Step "Launch Your Squad" Self-Serve Workspace Hub (#launch-workspace)
   ========================================================================== */

.launch-workspace-hub {
  background: linear-gradient(180deg, #ffffff 0%, #f0f9ff 100%);
  border: 2.5px solid var(--sky-blue);
  border-radius: 18px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-float);
}

.launch-workspace-header {
  margin-bottom: 14px;
}

.launch-steps-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.launch-step-card {
  background: #ffffff;
  border: 1.5px solid var(--border-sky);
  border-radius: 14px;
  padding: 14px;
}

.launch-select,
.launch-input {
  width: 100%;
  min-height: 48px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1.5px solid #94a3b8;
  background: #ffffff;
  color: var(--ink-navy);
  font-family: var(--font-sans);
  font-size: 0.84rem;
  font-weight: 600;
}

.launch-select:focus,
.launch-input:focus {
  outline: 2px solid var(--royal-blue);
  border-color: var(--royal-blue);
}

.vault-badge {
  margin-top: 6px;
  padding: 6px 10px;
  background: #ecfdf5;
  border: 1px solid #6ee7b7;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 700;
  color: #065f46;
}

.launch-status-pill {
  margin-top: 10px;
  padding: 9px 12px;
  background: #eff6ff;
  border: 1.5px solid #93c5fd;
  border-radius: 10px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--ink-navy);
  word-break: break-word;
  overflow-wrap: anywhere;
}

.connector-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.connector-card {
  background: #ffffff;
  border: 1.5px solid var(--border-sky);
  border-radius: 12px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: opacity 0.15s ease, border-color 0.15s ease;
}

.connector-card.is-disconnected {
  background: #f8fafc;
  border-color: var(--border-soft);
  opacity: 0.82;
}

.connector-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.connector-card-top strong {
  display: block;
  font-size: 0.9rem;
  color: var(--ink-navy);
}

.connector-sub {
  display: block;
  font-size: 0.73rem;
  color: var(--ink-muted);
}

.connector-toggle-btn {
  min-height: 44px;
  padding: 6px 12px;
  font-size: 0.76rem;
}

.connector-bot-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.bot-pill-btn {
  min-height: 44px;
  padding: 6px 10px;
  border-radius: 8px;
  border: 1.5px solid #cbd5e1;
  background: #f8fafc;
  color: var(--ink-slate);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 800;
  cursor: pointer;
}

.bot-pill-btn[aria-pressed="true"] {
  background: #dbeafe;
  border-color: var(--royal-blue);
  color: var(--royal-blue);
}

.connector-scope-label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--ink-slate);
}

.workspace-task-runner {
  background: #f8fafc;
  border: 1.5px solid var(--border-sky);
  border-radius: 14px;
  padding: 14px;
}

.workspace-task-bar {
  display: flex;
  gap: 10px;
  align-items: stretch;
  margin-bottom: 10px;
}

.workspace-task-bar .btn {
  white-space: nowrap;
  min-height: 48px;
}

.workspace-task-output {
  margin: 0;
  padding: 12px;
  background: #0f172a;
  color: #e2e8f0;
  border: 1.5px solid #38bdf8;
  border-radius: 10px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: anywhere;
  max-width: 100%;
  overflow-x: auto;
}

@media (max-width: 768px) {
  .launch-workspace-hub {
    padding: 14px;
  }

  .launch-steps-grid,
  .connector-cards-grid {
    grid-template-columns: 1fr !important;
  }

  .workspace-task-bar {
    flex-direction: column;
  }

  .workspace-task-bar .btn,
  .connector-toggle-btn,
  .bot-pill-btn {
    min-height: 48px;
  }
  .unit-row,
  .unit-matrix-row {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    min-width: 0;
    max-width: 100%;
    width: 100%;
  }

  .unit-row select,
  .unit-matrix-row select,
  [data-unit-select],
  #quickstart-code {
    min-width: 0;
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
  }
}


/* =========================================================================
   SIGN-IN GATE MODAL (#login-modal) & AUTHENTICATED DASHBOARD (#dashboard-app)
   ========================================================================= */
[hidden] {
  display: none !important;
}

.login-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(5, 9, 20, 0.86);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  overflow-y: auto;
}

.login-modal-card {
  width: 100%;
  max-width: 560px;
  background: linear-gradient(165deg, rgba(16, 26, 48, 0.98), rgba(9, 15, 30, 0.99));
  border: 1px solid rgba(56, 189, 248, 0.42);
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.65);
}

.login-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.login-modal-header h2 {
  font-size: 1.35rem;
  margin: 0.25rem 0 0;
}

.login-modal-sub {
  color: var(--text-muted);
  font-size: 0.94rem;
  margin-bottom: 1.1rem;
}

.login-demo-callout {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.38);
  border-radius: 12px;
  padding: 1rem;
  margin-bottom: 1rem;
}

.login-demo-callout p {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin: 0.35rem 0 0.75rem;
}

.login-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1rem 0;
  color: var(--text-muted);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.login-divider::before,
.login-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(148, 163, 184, 0.22);
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.dashboard-app-section {
  min-height: calc(100vh - 140px);
}

.dashboard-session-bar {
  background: rgba(16, 185, 129, 0.12);
  border-bottom: 1px solid rgba(16, 185, 129, 0.35);
  padding: 0.75rem 0;
}

.dashboard-session-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.dashboard-session-left,
.dashboard-session-right {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

@media (max-width: 768px) {
  .login-modal-card {
    padding: 1.15rem;
  }
  .dashboard-session-inner {
    flex-direction: column;
    align-items: stretch;
  }
  .dashboard-session-right {
    width: 100%;
  }
  .dashboard-session-right .btn {
    width: 100%;
    min-height: 48px;
  }
}


.app-route-nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  padding: 0.75rem 1rem;
  margin: 0.75rem 0 1rem;
  background: rgba(15, 23, 42, 0.04);
  border: 1px solid rgba(2, 132, 199, 0.25);
  border-radius: 12px;
}

.app-route-tab {
  text-decoration: none;
  font-size: 0.82rem;
  padding: 0.45rem 0.75rem;
}

.app-route-tab[aria-current="page"],
.app-route-tab.active {
  background: var(--royal-blue, #0284c7);
  color: #ffffff !important;
  border-color: var(--royal-blue, #0284c7);
}

.app-route-tab[aria-current="page"] code,
.app-route-tab.active code {
  color: #e0f2fe !important;
}

.route-focused-card {
  outline: 2px solid #0284c7;
  box-shadow: 0 0 0 4px rgba(2, 132, 199, 0.15);
}

@media (max-width: 768px) {
  .app-route-nav {
    flex-wrap: nowrap;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
  }
  .app-route-tab {
    flex: 0 0 auto;
    scroll-snap-align: start;
  }
}

/* =========================================================================
   MINIMAL 3-SECTION LANDING & SINGLE-VIEW SUB-ROUTE REFINEMENTS
   ========================================================================= */
.hero {
  padding: 56px 0 48px;
}

.hero-stage-clean {
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(11, 19, 43, 0.12);
  box-shadow: 0 24px 48px -18px rgba(11, 19, 43, 0.25);
  background: #0b132b;
}

.hero-photo-clean {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

#public-landing .section {
  padding: 48px 0;
}

#public-landing .section-header {
  margin-bottom: 24px;
}

.bot-card {
  padding: 20px;
}

.wb-two-col > .wb-subcard:only-child,
.wb-two-col > .wb-subcard:not([hidden]):first-child:nth-last-child(1) {
  grid-column: 1 / -1;
}

/* =========================================================================
   INTERACTIVE AGENTIC WORKFLOW SIMULATOR HUB (PUBLIC LANDING EXPERIENCE)
   ========================================================================= */
.wf-hero-section {
  padding: 28px 0 48px;
}

.wf-intro-banner {
  display: grid;
  grid-template-columns: 1.45fr 0.85fr;
  gap: 20px;
  align-items: center;
  margin-bottom: 20px;
  padding: 18px 22px;
  background: linear-gradient(135deg, #0b132b 0%, #172554 100%);
  border: 1px solid rgba(202, 138, 4, 0.38);
  border-radius: 16px;
  color: #f8fafc;
}

.wf-intro-copy h1 {
  margin: 0 0 8px;
  font-size: clamp(1.55rem, 2.6vw, 2.2rem);
  line-height: 1.15;
  color: #ffffff;
}

.wf-intro-sub {
  margin: 0;
  font-size: 0.96rem;
  line-height: 1.5;
  color: #cbd5e1;
}

.wf-intro-sub code {
  color: #fde68a;
  background: rgba(255, 255, 255, 0.08);
  padding: 2px 6px;
  border-radius: 5px;
}

.wf-intro-art {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.wf-hero-thumb {
  width: 100%;
  max-width: 300px;
  height: auto;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  object-fit: cover;
}

.wf-launch-link {
  font-size: 0.78rem;
  padding: 6px 12px;
  min-height: 36px;
  color: #fde68a;
  border-color: rgba(253, 230, 138, 0.45);
}

.wf-simulator-hub {
  margin-top: 0;
  padding: 22px;
}

.wf-filter-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 14px;
  margin-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

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

.wf-filter-label {
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #94a3b8;
  margin-right: 4px;
}

.wf-filter-pill {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(15, 23, 42, 0.7);
  color: #e2e8f0;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 6px 11px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.wf-filter-pill[aria-pressed="true"] {
  background: var(--brass-gold);
  border-color: var(--brass-gold);
  color: #0b132b;
}

.wf-scenario-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}

.wf-scenario-card {
  text-align: left;
  background: rgba(15, 23, 42, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  padding: 12px 14px;
  color: #f8fafc;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: all 0.15s ease;
}

.wf-scenario-card:hover {
  border-color: rgba(253, 230, 138, 0.6);
}

.wf-scenario-card[aria-selected="true"] {
  background: rgba(30, 58, 138, 0.55);
  border: 2px solid var(--brass-gold);
  box-shadow: 0 8px 20px -8px rgba(202, 138, 4, 0.45);
}

.wf-scen-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.wf-tier-badge {
  color: #fde68a;
}

.wf-cloud-tag {
  color: #93c5fd;
}

.wf-scenario-card strong {
  font-size: 0.92rem;
  color: #ffffff;
}

.wf-scenario-card > span {
  font-size: 0.78rem;
  color: #cbd5e1;
  line-height: 1.35;
}

.wf-arch-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(147, 197, 253, 0.28);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 16px;
}

.wf-arch-left {
  flex: 1 1 520px;
}

.wf-active-label {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fde68a;
  margin-bottom: 2px;
}

.wf-arch-title-row h2 {
  margin: 0 0 4px;
  font-size: 1.18rem;
  color: #ffffff;
}

.wf-arch-problem {
  margin: 0 0 10px;
  font-size: 0.84rem;
  color: #cbd5e1;
}

.wf-stack-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.wf-stack-pill {
  font-size: 0.74rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
  background: rgba(30, 64, 175, 0.45);
  border: 1px solid rgba(147, 197, 253, 0.4);
  color: #e0f2fe;
}

.wf-arch-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}

.wf-arch-metrics {
  display: flex;
  gap: 14px;
}

.wf-arch-metrics > div {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 6px 10px;
  text-align: right;
}

.wf-arch-metrics span {
  display: block;
  font-size: 0.68rem;
  text-transform: uppercase;
  color: #94a3b8;
}

.wf-arch-metrics strong {
  font-size: 0.88rem;
  color: #6ee7b7;
}

.wf-pipeline-board .wf-bot-step {
  background: rgba(15, 23, 42, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #f8fafc;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.wf-pipeline-board .wf-bot-step.active {
  border: 2px solid var(--brass-gold);
  background: rgba(30, 58, 138, 0.45);
}

.wf-step-io {
  margin-top: 8px;
  padding-top: 6px;
  border-top: 1px dashed rgba(255, 255, 255, 0.16);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.72rem;
  color: #93c5fd;
}

.wf-approval-gate-card {
  margin-top: 14px;
  padding: 12px 16px;
  border-radius: 12px;
  background: rgba(202, 138, 4, 0.14);
  border: 1px solid rgba(253, 230, 138, 0.45);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.wf-approval-left {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1 1 460px;
}

.wf-gate-pill {
  display: inline-block;
  width: fit-content;
  font-size: 0.7rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(253, 230, 138, 0.2);
  color: #fde68a;
}

.wf-gate-pill.approved {
  background: rgba(16, 185, 129, 0.25);
  color: #6ee7b7;
}

.wf-gate-pill.rejected {
  background: rgba(239, 68, 68, 0.25);
  color: #fca5a5;
}

.wf-approval-left strong {
  font-size: 0.88rem;
  color: #ffffff;
}

.wf-gate-meta {
  font-size: 0.76rem;
  color: #cbd5e1;
}

.wf-approval-actions {
  display: flex;
  gap: 8px;
}

@media (max-width: 900px) {
  .wf-intro-banner {
    grid-template-columns: 1fr;
  }
  .wf-intro-art {
    align-items: flex-start;
  }
  .wf-scenario-grid {
    grid-template-columns: 1fr;
  }
  .wf-arch-right {
    align-items: stretch;
    width: 100%;
  }
}

/* =========================================================================
   ZERO-NOISE AUTOMATED WORKFLOWS LAYOUT (UNIFIED SINGLE-SCREEN MOBILE + DESKTOP)
   ========================================================================= */
body {
  background: #f8fafc;
}

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

.site-header {
  background: #ffffff;
  border-bottom: 1px solid #e2e8f0;
  padding: 8px 0 !important;
}

.site-header .nav-bar {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: space-between !important;
  min-height: 36px !important;
}

.site-header .mobile-nav-toggle {
  display: none !important;
}

.site-header .nav-links {
  display: flex !important;
  width: auto !important;
  flex-direction: row !important;
  padding-top: 0 !important;
  border-top: 0 !important;
}

.site-header #btn-nav-signin {
  min-height: 34px !important;
  padding: 6px 14px !important;
  font-size: 0.82rem !important;
  border-radius: 999px !important;
}

.clean-wf-page {
  padding: 12px 0 14px !important;
}

.clean-wf-card.unified-workflow-shell {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 16px;
  padding: 16px 20px !important;
  box-shadow: 0 12px 28px -12px rgba(15, 23, 42, 0.08);
}

/* Row 1: Single-Row Swipeable Workflow Switcher */
.clean-wf-tabs {
  display: flex !important;
  flex-wrap: nowrap !important;
  overflow-x: auto !important;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  gap: 6px !important;
  padding-bottom: 10px !important;
  margin-bottom: 12px !important;
  border-bottom: 1px solid #f1f5f9;
}

.clean-wf-tabs::-webkit-scrollbar {
  display: none;
}

.clean-wf-tab {
  appearance: none;
  flex: 0 0 auto !important;
  white-space: nowrap !important;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  padding: 6px 13px !important;
  min-height: 34px !important;
  font-size: 0.8rem !important;
  font-weight: 700;
  color: #334155;
  cursor: pointer;
  transition: all 0.15s ease;
}

.clean-wf-tab:hover {
  border-color: #94a3b8;
  color: #0f172a;
}

.clean-wf-tab[aria-selected="true"] {
  background: #0f172a;
  border-color: #0f172a;
  color: #ffffff;
  box-shadow: 0 4px 10px -2px rgba(15, 23, 42, 0.25);
}

/* Row 2: Active Workflow Header + Run Button */
.clean-wf-card-header {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: wrap !important;
  justify-content: space-between !important;
  align-items: flex-start !important;
  gap: 10px 16px !important;
  padding-bottom: 10px !important;
  margin-bottom: 12px !important;
  border-bottom: 1px solid #f1f5f9;
}

.clean-wf-header-left {
  min-width: 280px;
  flex: 1 1 520px;
}

.clean-wf-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 3px;
}

.clean-wf-title-row h2 {
  margin: 0;
  font-size: 1.15rem !important;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.2;
}

.clean-cloud-badge {
  font-size: 0.68rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
  white-space: nowrap;
}

.clean-wf-summary {
  margin: 0;
  font-size: 0.83rem !important;
  line-height: 1.35;
  color: #475569;
}

.clean-wf-controls {
  flex: 0 0 auto;
}

#btn-run-mission {
  min-height: 36px !important;
  padding: 7px 14px !important;
  font-size: 0.8rem !important;
  border-radius: 999px !important;
  white-space: nowrap;
}

/* Row 3: Connected 4-Step Interactive Progress Rail (Always 4 Columns on Desktop & Mobile!) */
.clean-wf-steps.unified-step-rail {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 8px !important;
  margin-bottom: 10px !important;
  align-items: stretch;
}

.clean-step-card {
  position: relative;
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px !important;
  padding: 8px 10px !important;
  cursor: pointer;
  opacity: 0.78;
  transform: scale(0.985);
  transition: transform 0.24s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.24s cubic-bezier(0.22, 1, 0.36, 1),
              border-color 0.2s ease,
              opacity 0.2s ease,
              background-color 0.2s ease;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
  min-width: 0;
}

.clean-step-card:hover {
  opacity: 0.96;
  border-color: #93c5fd;
  transform: translateY(-1px) scale(1.005);
}

.clean-step-card.completed {
  opacity: 0.92;
  background: #f0fdf4;
  border-color: #86efac;
}

.clean-step-card.active {
  opacity: 1;
  background: #ffffff;
  border: 2px solid #2563eb;
  transform: translateY(-2px) scale(1.025);
  box-shadow: 0 10px 22px -10px rgba(37, 99, 235, 0.35), 0 0 0 2px rgba(37, 99, 235, 0.12);
  z-index: 2;
}

.clean-step-card.active::after {
  content: "";
  position: absolute;
  bottom: -7px;
  left: 50%;
  width: 11px;
  height: 11px;
  background: #f8fafc;
  border-top: 2px solid #2563eb;
  border-left: 2px solid #2563eb;
  transform: translateX(-50%) rotate(45deg);
}

.clean-step-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 4px;
  margin-bottom: 0 !important;
}

.clean-step-status {
  font-size: 0.66rem;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 999px;
  background: #e2e8f0;
  color: #475569;
  white-space: nowrap;
}

.clean-step-status.live {
  background: #2563eb;
  color: #ffffff;
}

.clean-step-status.done {
  background: #16a34a;
  color: #ffffff;
}

.clean-step-bot {
  font-size: 0.64rem;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: 5px;
  background: #f1f5f9;
  color: #334155;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.clean-step-card.active .clean-step-bot {
  background: #dbeafe;
  color: #1d4ed8;
}

.clean-step-num {
  font-size: 0.78rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Row 4: Directly Connected Zoomed-In Live Step Stage */
.zoom-spotlight-shell {
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  border: 1.5px solid #93c5fd;
  border-radius: 13px !important;
  padding: 12px 15px !important;
  box-shadow: inset 0 1px 0 #ffffff, 0 8px 20px -12px rgba(15, 23, 42, 0.12);
}

.zoom-spotlight-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
  padding-bottom: 8px;
  margin-bottom: 10px;
  border-bottom: 1px solid #e2e8f0;
}

.zoom-spotlight-title-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  min-width: 0;
}

.zoom-live-badge {
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 3px 9px;
  border-radius: 999px;
  background: #1d4ed8;
  color: #ffffff;
  white-space: nowrap;
}

#zoom-step-heading {
  font-size: 0.92rem;
  font-weight: 800;
  color: #0f172a;
}

.zoom-step-desc {
  font-size: 0.78rem;
  color: #475569;
}

.zoom-next-btn {
  appearance: none;
  flex: 0 0 auto;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  padding: 5px 11px !important;
  min-height: 30px !important;
  font-size: 0.74rem;
  font-weight: 700;
  color: #1e293b;
  cursor: pointer;
  white-space: nowrap;
}

.zoom-next-btn:hover {
  border-color: #2563eb;
  color: #1d4ed8;
  background: #eff6ff;
}

.zoom-spotlight-grid {
  display: grid;
  grid-template-columns: 1.15fr 1.1fr 1fr;
  gap: 10px !important;
  margin-bottom: 10px !important;
}

.zoom-col {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 9px 11px !important;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.zoom-col-label {
  font-size: 0.66rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
}

.zoom-input-title {
  display: block;
  font-size: 0.8rem;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 2px;
}

.zoom-input-snippet {
  margin: 0;
  font-size: 0.75rem;
  line-height: 1.32;
  color: #475569;
}

.zoom-pill-list {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 5px;
}

.zoom-action-pill {
  display: inline-flex;
  align-items: center;
  font-size: 0.74rem !important;
  font-weight: 700;
  padding: 4px 8px !important;
  border-radius: 7px;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #065f46;
}

.zoom-action-pill.warn {
  background: #fffbeb;
  border-color: #fde68a;
  color: #92400e;
}

.zoom-result-box {
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  padding: 8px 10px;
  height: 100%;
  justify-content: center;
}

.zoom-result-title {
  font-size: 0.8rem;
  font-weight: 800;
  color: #1e3a8a;
}

.zoom-result-sub {
  font-size: 0.73rem;
  line-height: 1.3;
  color: #1d4ed8;
}

/* Integrated 1-Line Approval Bar */
.clean-approval-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 8px 12px !important;
}

.clean-approval-quote {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  flex: 1 1 320px;
  min-width: 0;
}

.clean-approval-tag {
  font-size: 0.68rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 999px;
  background: #fef3c7;
  color: #92400e;
  white-space: nowrap;
}

.clean-approval-tag.approved {
  background: #d1fae5;
  color: #065f46;
}

.clean-approval-tag.rejected {
  background: #f1f5f9;
  color: #475569;
}

.clean-approval-quote q {
  font-size: 0.8rem;
  line-height: 1.3;
  color: #0f172a;
  font-style: normal;
}

.clean-approval-btns {
  display: flex;
  gap: 6px;
}

.clean-approval-btns .btn {
  min-height: 32px !important;
  padding: 5px 12px !important;
  font-size: 0.76rem !important;
  border-radius: 8px !important;
}

.clean-footer {
  background: transparent;
  border-top: 1px solid #e2e8f0;
  padding: 8px 0 !important;
  color: #64748b;
  font-size: 0.76rem;
}

/* =========================================================================
   MOBILE-FIRST VIEWPORT BUDGET (375x812 iPhone Single-Screen Fit!)
   ========================================================================= */
@media (max-width: 768px) {
  .clean-wf-page {
    padding: 8px 0 10px !important;
  }

  .clean-wf-card.unified-workflow-shell {
    padding: 11px 12px !important;
    border-radius: 14px !important;
  }

  .clean-wf-tabs {
    padding-bottom: 8px !important;
    margin-bottom: 9px !important;
    gap: 5px !important;
  }

  .clean-wf-tab {
    padding: 5px 10px !important;
    min-height: 30px !important;
    font-size: 0.74rem !important;
  }

  .clean-wf-card-header {
    padding-bottom: 8px !important;
    margin-bottom: 9px !important;
    gap: 8px !important;
  }

  .clean-wf-title-row h2 {
    font-size: 0.96rem !important;
  }

  .clean-cloud-badge {
    font-size: 0.62rem !important;
    padding: 2px 6px !important;
  }

  .clean-wf-summary {
    display: none !important;
  }

  #btn-run-mission {
    min-height: 32px !important;
    padding: 5px 11px !important;
    font-size: 0.74rem !important;
  }

  /* Keep all 4 steps in ONE compact horizontal row on mobile! */
  .clean-wf-steps.unified-step-rail {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 5px !important;
    margin-bottom: 8px !important;
  }

  .clean-step-card {
    padding: 6px 5px !important;
    border-radius: 8px !important;
  }

  .clean-step-status {
    font-size: 0.6rem !important;
    padding: 1px 4px !important;
  }

  .clean-step-bot {
    font-size: 0.56rem !important;
    padding: 1px 3px !important;
  }

  .clean-step-num {
    font-size: 0.65rem !important;
    white-space: normal !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    line-height: 1.15 !important;
  }

  .zoom-spotlight-shell {
    padding: 9px 10px !important;
    border-radius: 11px !important;
  }

  .zoom-spotlight-bar {
    padding-bottom: 6px !important;
    margin-bottom: 7px !important;
  }

  .zoom-live-badge {
    font-size: 0.62rem !important;
    padding: 2px 7px !important;
  }

  #zoom-step-heading {
    font-size: 0.82rem !important;
  }

  .zoom-step-desc {
    display: none !important;
  }

  .zoom-next-btn {
    padding: 4px 9px !important;
    min-height: 26px !important;
    font-size: 0.68rem !important;
  }

  .zoom-spotlight-grid {
    grid-template-columns: 1fr !important;
    gap: 6px !important;
    margin-bottom: 7px !important;
  }

  .zoom-col {
    padding: 7px 9px !important;
    gap: 3px !important;
  }

  .zoom-col-label {
    font-size: 0.6rem !important;
  }

  .zoom-input-title,
  .zoom-result-title {
    font-size: 0.76rem !important;
  }

  .zoom-input-snippet,
  .zoom-result-sub {
    font-size: 0.71rem !important;
    line-height: 1.26 !important;
  }

  .zoom-action-pill {
    font-size: 0.69rem !important;
    padding: 3px 7px !important;
  }

  .zoom-result-box {
    padding: 6px 8px !important;
  }

  .clean-approval-bar {
    padding: 7px 9px !important;
    gap: 6px !important;
  }

  .clean-approval-quote {
    gap: 5px !important;
  }

  .clean-approval-quote q {
    font-size: 0.72rem !important;
    line-height: 1.24 !important;
  }

  .clean-approval-btns {
    width: 100%;
    justify-content: flex-end;
  }

  .clean-approval-btns .btn {
    min-height: 30px !important;
    padding: 4px 10px !important;
    font-size: 0.72rem !important;
  }
}


/* Exact 375x812 single-screen fit (< 812px total scrollHeight on mobile) */
@media (max-width: 768px) {
  .site-header {
    padding: 5px 0 !important;
  }
  .site-header .nav-bar {
    min-height: 30px !important;
  }
  .clean-wf-page {
    padding: 6px 0 6px !important;
  }
  .clean-wf-card.unified-workflow-shell {
    padding: 9px 10px !important;
  }
  .clean-wf-tabs {
    padding-bottom: 6px !important;
    margin-bottom: 7px !important;
  }
  .clean-wf-tab {
    padding: 4px 9px !important;
    min-height: 28px !important;
    font-size: 0.72rem !important;
  }
  .clean-wf-card-header {
    padding-bottom: 6px !important;
    margin-bottom: 7px !important;
  }
  .clean-wf-title-row {
    margin-bottom: 0 !important;
  }
  .clean-wf-title-row h2 {
    font-size: 0.9rem !important;
  }
  #btn-run-mission {
    min-height: 28px !important;
    padding: 4px 10px !important;
    font-size: 0.72rem !important;
  }
  .clean-wf-steps.unified-step-rail {
    margin-bottom: 6px !important;
    gap: 4px !important;
  }
  .clean-step-card {
    padding: 5px 4px !important;
  }
  .zoom-spotlight-shell {
    padding: 7px 9px !important;
  }
  .zoom-spotlight-bar {
    padding-bottom: 5px !important;
    margin-bottom: 5px !important;
  }
  .zoom-spotlight-grid {
    gap: 5px !important;
    margin-bottom: 6px !important;
  }
  .zoom-col {
    padding: 5px 8px !important;
    gap: 2px !important;
  }
  .zoom-result-box {
    padding: 4px 7px !important;
  }
  .clean-approval-bar {
    padding: 5px 8px !important;
    gap: 4px !important;
  }
  .clean-approval-btns .btn {
    min-height: 27px !important;
    padding: 3px 9px !important;
    font-size: 0.7rem !important;
  }
  .clean-footer {
    padding: 4px 0 !important;
    font-size: 0.7rem !important;
  }
}


/* =========================================================================
   WORKFLOW DROPDOWN (<select id="wf-select">) & LIVE SYSTEM CRUD OPS BADGES
   ========================================================================= */
.clean-wf-picker-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}

.wf-select-label {
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #475569;
  white-space: nowrap;
}

.wf-dropdown-select {
  appearance: auto;
  background: #f8fafc;
  border: 2px solid #2563eb;
  border-radius: 10px;
  padding: 7px 12px;
  font-family: var(--font-sans);
  font-size: 0.94rem;
  font-weight: 800;
  color: #0f172a;
  cursor: pointer;
  box-shadow: 0 4px 12px -4px rgba(37, 99, 235, 0.18);
  max-width: 100%;
}

.wf-dropdown-select:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.25);
}

.zoom-pill-list {
  display: flex !important;
  flex-direction: column !important;
  gap: 5px !important;
}

.zoom-crud-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 5px 8px;
  font-size: 0.76rem;
  line-height: 1.25;
}

.crud-badge {
  font-family: var(--font-mono);
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  padding: 2px 6px;
  border-radius: 5px;
  text-transform: uppercase;
  white-space: nowrap;
}

.crud-badge.crud-read {
  background: #dbeafe;
  color: #1d4ed8;
  border: 1px solid #93c5fd;
}

.crud-badge.crud-insert {
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #86efac;
}

.crud-badge.crud-update {
  background: #fef3c7;
  color: #b45309;
  border: 1px solid #fcd34d;
}

.crud-badge.crud-delete {
  background: #ffe4e6;
  color: #be123c;
  border: 1px solid #fda4af;
}

.crud-sys {
  font-weight: 800;
  color: #0f172a;
  white-space: nowrap;
}

.crud-detail {
  color: #475569;
  font-size: 0.74rem;
}

@media (max-width: 768px) {
  .clean-wf-picker-row {
    gap: 6px !important;
    margin-bottom: 0 !important;
  }
  .wf-select-label {
    display: none !important;
  }
  .wf-dropdown-select {
    font-size: 0.8rem !important;
    padding: 5px 8px !important;
    border-radius: 8px !important;
    flex: 1 1 190px;
    min-width: 0;
  }
  .zoom-crud-row {
    padding: 4px 6px !important;
    gap: 5px !important;
    font-size: 0.7rem !important;
  }
  .crud-badge {
    font-size: 0.58rem !important;
    padding: 1px 5px !important;
  }
  .crud-detail {
    font-size: 0.68rem !important;
  }
}

.wf-copy-link-btn {
  appearance: none;
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  padding: 4px 10px;
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.wf-copy-link-btn:hover {
  background: #dbeafe;
  border-color: #93c5fd;
}

@media (max-width: 768px) {
  .wf-copy-link-btn {
    padding: 3px 8px !important;
    font-size: 0.66rem !important;
  }
}

.top-d3-link {
  font-size: 0.78rem;
  font-weight: 700;
  color: #475569;
  text-decoration: none;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.top-d3-link:hover {
  color: #0f172a;
  border-color: #94a3b8;
}


/* =========================================================================
   9-AGENT AUTONOMOUS SQUAD RAIL (.step-rail-9) & STORM EXCEPTION HIGHLIGHT
   ========================================================================= */
.clean-wf-steps.unified-step-rail.step-rail-9 {
  grid-template-columns: repeat(9, minmax(0, 1fr)) !important;
  gap: 6px !important;
}

.clean-wf-steps.unified-step-rail.step-rail-9 .clean-step-card {
  padding: 6px 6px !important;
  border-radius: 9px !important;
}

.clean-wf-steps.unified-step-rail.step-rail-9 .clean-step-top {
  gap: 4px !important;
  margin-bottom: 3px !important;
}

.clean-wf-steps.unified-step-rail.step-rail-9 .clean-step-status {
  font-size: 0.62rem !important;
  padding: 1px 5px !important;
}

.clean-wf-steps.unified-step-rail.step-rail-9 .clean-step-bot {
  font-size: 0.55rem !important;
  padding: 1px 4px !important;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.clean-wf-steps.unified-step-rail.step-rail-9 .clean-step-num {
  font-size: 0.68rem !important;
  line-height: 1.18 !important;
  display: -webkit-box !important;
  -webkit-line-clamp: 2 !important;
  -webkit-box-orient: vertical !important;
  overflow: hidden;
}

.clean-step-card.step-alert {
  border-color: #f59e0b !important;
  background: linear-gradient(180deg, #fffbeb 0%, #ffffff 100%) !important;
}

.clean-step-card.step-alert.active {
  border-color: #d97706 !important;
  box-shadow: 0 0 0 2px rgba(217, 119, 6, 0.22) !important;
  background: linear-gradient(180deg, #fef3c7 0%, #fffbeb 100%) !important;
}

@media (max-width: 768px) {
  .clean-wf-steps.unified-step-rail.step-rail-9 {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 3px !important;
    margin-bottom: 5px !important;
  }
  .clean-wf-steps.unified-step-rail.step-rail-9 .clean-step-card {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 4px !important;
    padding: 3px 5px !important;
    border-radius: 6px !important;
    min-height: 24px !important;
  }
  .clean-wf-steps.unified-step-rail.step-rail-9 .clean-step-top {
    margin-bottom: 0 !important;
    flex-shrink: 0 !important;
  }
  .clean-wf-steps.unified-step-rail.step-rail-9 .clean-step-status {
    font-size: 0.55rem !important;
    padding: 1px 4px !important;
  }
  .clean-wf-steps.unified-step-rail.step-rail-9 .clean-step-bot {
    display: none !important;
  }
  .clean-wf-steps.unified-step-rail.step-rail-9 .clean-step-num {
    font-size: 0.6rem !important;
    line-height: 1.1 !important;
    -webkit-line-clamp: 1 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }
}


/* =========================================================================
   AGENTIC WORKFLOW STANDARD BADGES & ISSUE #230 N1 / N3 POLISH
   ========================================================================= */
.zoom-stage-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  background: #eff6ff;
  color: #1e40af;
  border: 1px solid #bfdbfe;
  white-space: nowrap;
}

.crud-verify-pill {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  padding: 1px 6px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 800;
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
  white-space: nowrap;
}

.zoom-decision-pill {
  display: block;
  margin-top: 6px;
  padding: 5px 8px;
  border-radius: 7px;
  font-family: var(--font-mono);
  font-size: 0.69rem;
  line-height: 1.3;
  font-weight: 700;
  background: #f8fafc;
  color: #1e293b;
  border: 1px solid #cbd5e1;
  border-left: 3px solid #2563eb;
}

.clean-outcome-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 800;
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #6ee7b7;
}

/* Issue #230 N1: Clamp #wf-active-problem & #wf-gate-summary on 375x812 mobile when .step-rail-9 is active */
@media (max-width: 768px) {
  .zoom-stage-pill {
    font-size: 0.6rem !important;
    padding: 1px 6px !important;
  }
  .crud-verify-pill {
    font-size: 0.56rem !important;
    padding: 1px 4px !important;
  }
  .zoom-decision-pill {
    margin-top: 4px !important;
    padding: 3px 6px !important;
    font-size: 0.62rem !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 1 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
  }
  .clean-outcome-pill {
    font-size: 0.62rem !important;
    padding: 1px 6px !important;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .unified-workflow-shell.wf-rail-9-active #wf-active-problem,
  .unified-workflow-shell:has(.step-rail-9) #wf-active-problem,
  .unified-workflow-shell.wf-rail-9-active #wf-gate-summary,
  .unified-workflow-shell:has(.step-rail-9) #wf-gate-summary {
    display: -webkit-box !important;
    -webkit-line-clamp: 1 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
  }
}

/* Issue #230 N3: Reduced-motion transition resets */
@media (prefers-reduced-motion: reduce) {
  .clean-step-card,
  .wf-copy-link-btn,
  .top-d3-link {
    transition: none !important;
    animation: none !important;
  }
}


/* =========================================================================
   INTERACTIVE DEMO ENHANCEMENTS (PATH TOGGLE, IMPACT BAR, AUDIT JSON DRAWER)
   ========================================================================= */
.clean-wf-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.wf-path-toggle {
  display: inline-flex;
  align-items: center;
  background: #f1f5f9;
  border: 1.5px solid #cbd5e1;
  border-radius: 999px;
  padding: 2px;
  gap: 2px;
}

.wf-path-btn {
  appearance: none;
  border: none;
  background: transparent;
  color: #475569;
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 800;
  padding: 5px 10px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.wf-path-btn[data-wf-path="happy"].active,
.wf-path-btn[data-wf-path="happy"][aria-pressed="true"] {
  background: #ecfdf5;
  color: #065f46;
  box-shadow: 0 1px 4px rgba(5, 150, 105, 0.18);
  border: 1px solid #6ee7b7;
}

.wf-path-btn[data-wf-path="exception"].active,
.wf-path-btn[data-wf-path="exception"][aria-pressed="true"] {
  background: #fffbeb;
  color: #b45309;
  box-shadow: 0 1px 4px rgba(217, 119, 6, 0.22);
  border: 1px solid #fcd34d;
}

.wf-impact-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  background: linear-gradient(90deg, #f8fafc 0%, #eff6ff 55%, #ecfdf5 100%);
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  padding: 6px 12px;
  margin-bottom: 10px;
  font-size: 0.76rem;
}

.unified-workflow-shell.wf-exception-active .wf-impact-bar {
  background: linear-gradient(90deg, #fffbeb 0%, #fef3c7 60%, #fee2e2 100%);
  border-color: #fcd34d;
}

.wf-impact-pill {
  font-weight: 700;
  color: #0f172a;
}

.wf-impact-before {
  color: #475569;
}

.wf-impact-after {
  color: #065f46;
  font-weight: 800;
}

.unified-workflow-shell.wf-exception-active .wf-impact-after {
  color: #b45309;
}

.wf-impact-arrow {
  font-weight: 900;
  color: #2563eb;
}

.wf-impact-policy {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  color: #1e40af;
  background: #dbeafe;
  border: 1px solid #93c5fd;
  padding: 2px 8px;
  border-radius: 999px;
  white-space: nowrap;
}

.unified-workflow-shell.wf-exception-active .wf-impact-policy {
  color: #9a3412;
  background: #ffedd5;
  border-color: #fdba74;
}

.crud-verify-pill.verify-warn {
  background: #fffbeb;
  color: #b45309;
  border-color: #fcd34d;
}

.clean-outcome-pill.outcome-warn {
  background: #fffbeb;
  color: #b45309;
  border-color: #fcd34d;
}

.zoom-decision-pill.decision-warn {
  background: #fffbeb;
  color: #92400e;
  border-color: #fcd34d;
  border-left: 3px solid #d97706;
}

.zoom-spotlight-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.zoom-audit-btn {
  appearance: none;
  background: #f8fafc;
  color: #1e3a8a;
  border: 1.5px solid #93c5fd;
  border-radius: 8px;
  padding: 5px 10px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.zoom-audit-btn:hover,
.zoom-audit-btn[aria-expanded="true"] {
  background: #dbeafe;
  border-color: #2563eb;
  color: #0f172a;
}

.zoom-audit-drawer {
  margin-top: 10px;
  margin-bottom: 10px;
  background: #0f172a;
  color: #e2e8f0;
  border: 1.5px solid #334155;
  border-radius: 12px;
  padding: 12px;
}

.zoom-audit-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.zoom-audit-pane {
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 8px;
  padding: 8px 10px;
  overflow: hidden;
}

.zoom-audit-pane-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 6px;
  padding-bottom: 5px;
  border-bottom: 1px solid #334155;
  font-size: 0.74rem;
  color: #f8fafc;
}

.zoom-audit-schema {
  font-family: var(--font-mono);
  font-size: 0.64rem;
  color: #93c5fd;
}

.zoom-audit-pre {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  line-height: 1.35;
  color: #a7f3d0;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 190px;
  overflow-y: auto;
}

@media (max-width: 768px) {
  .wf-path-btn {
    font-size: 0.63rem !important;
    padding: 3px 7px !important;
  }
  .wf-impact-bar {
    padding: 4px 8px !important;
    margin-bottom: 6px !important;
    font-size: 0.65rem !important;
    gap: 5px !important;
  }
  .wf-impact-before {
    display: none !important;
  }
  .wf-impact-arrow {
    display: none !important;
  }
  .wf-impact-policy {
    font-size: 0.58rem !important;
    padding: 1px 6px !important;
  }
  .zoom-audit-btn {
    font-size: 0.62rem !important;
    padding: 3px 7px !important;
  }
  .zoom-audit-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .zoom-audit-pre {
    max-height: 130px;
    font-size: 0.62rem;
  }
}


/* =========================================================================
   WORKFLOW DROPDOWN (#wf-select) & HEADER CONTROLS LAYOUT FIX
   ========================================================================= */
.clean-wf-card-header {
  flex-wrap: wrap !important;
  align-items: flex-start !important;
}

.clean-wf-header-left {
  flex: 1 1 520px !important;
  min-width: 280px !important;
  max-width: 100% !important;
}

.clean-wf-picker-row {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  flex-wrap: wrap !important;
  width: 100% !important;
  margin-bottom: 5px !important;
}

.wf-dropdown-select,
#wf-select {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  flex: 1 1 300px !important;
  min-width: 240px !important;
  max-width: 100% !important;
  min-height: 38px !important;
}

.clean-wf-controls {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 8px !important;
  flex-wrap: wrap !important;
  flex: 0 1 auto !important;
}

@media (max-width: 768px) {
  .clean-wf-card-header {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 6px !important;
    padding-bottom: 6px !important;
    margin-bottom: 6px !important;
  }

  .clean-wf-header-left {
    width: 100% !important;
    min-width: 100% !important;
    flex: 0 0 auto !important;
  }

  .clean-wf-picker-row {
    flex-wrap: nowrap !important;
    width: 100% !important;
    gap: 6px !important;
    margin-bottom: 0 !important;
  }

  .clean-wf-picker-row .clean-cloud-badge {
    display: none !important;
  }

  .wf-dropdown-select,
  #wf-select {
    width: 100% !important;
    min-width: 200px !important;
    min-height: 34px !important;
    flex: 1 1 auto !important;
    font-size: 0.82rem !important;
    padding: 5px 8px !important;
  }

  .clean-wf-controls {
    width: 100% !important;
    justify-content: space-between !important;
    flex-wrap: nowrap !important;
    gap: 5px !important;
  }

  .wf-path-toggle {
    flex: 1 1 auto !important;
    justify-content: space-between !important;
    min-width: 0 !important;
  }

  .wf-path-btn {
    flex: 1 1 50% !important;
    text-align: center !important;
    font-size: 0.61rem !important;
    padding: 4px 5px !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  #btn-run-mission {
    flex: 0 0 auto !important;
    min-height: 28px !important;
    padding: 4px 9px !important;
    font-size: 0.7rem !important;
  }
}
