:root {
  --bg: #f6f8fa;
  --surface: #ffffff;
  --surface-alt: #f1f5f9;
  --ink: #0f172a;
  --ink-secondary: #334155;
  --ink-muted: #64748b;
  --border: #cbd5e1;
  --border-subtle: #e2e8f0;
  --navy: #0b132b;
  --navy-mid: #1e293b;
  --accent: #0284c7;
  --accent-hover: #0369a1;
  --accent-soft: #e0f2fe;
  --emerald: #059669;
  --emerald-soft: #ecfdf5;
  --amber: #d97706;
  --amber-soft: #fffbeb;
  --crimson: #dc2626;
  --crimson-soft: #fef2f2;
  --radius: 10px;
  --radius-lg: 14px;
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 10px 28px rgba(15, 23, 42, 0.08);
  --font-sans: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

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

/* Safety Airgap Banner */
.airgap-bar {
  background: #0f172a;
  border-bottom: 1px solid #1e293b;
  color: #cbd5e1;
  font-size: 12px;
  padding: 8px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.airgap-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(16, 185, 129, 0.16);
  color: #34d399;
  border: 1px solid rgba(52, 211, 153, 0.35);
  padding: 2px 8px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 11px;
}

/* Top Navigation */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-subtle);
  padding: 12px 24px;
}
.topbar-inner {
  max-width: 1260px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
}
.brand-lockup {
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: linear-gradient(135deg, #0b132b 0%, #0284c7 100%);
  color: #fff;
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 15px;
  letter-spacing: -0.03em;
}
.brand-title {
  font-weight: 800;
  font-size: 19px;
  letter-spacing: -0.025em;
  color: var(--ink);
}
.brand-sub {
  font-size: 12px;
  color: var(--ink-muted);
  display: block;
}

.mode-switch {
  display: inline-flex;
  background: var(--surface-alt);
  padding: 4px;
  border-radius: 10px;
  border: 1px solid var(--border-subtle);
  gap: 4px;
}
.mode-btn {
  border: none;
  background: transparent;
  color: var(--ink-secondary);
  font-weight: 600;
  font-size: 13px;
  padding: 8px 14px;
  border-radius: 7px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.mode-btn.active {
  background: var(--navy);
  color: #ffffff;
  box-shadow: var(--shadow-sm);
}

/* Main Container */
.container {
  max-width: 1260px;
  margin: 0 auto;
  padding: 28px 24px 72px;
}
.hidden {
  display: none !important;
}

/* Hero Section */
.hero {
  background: linear-gradient(135deg, #0b132b 0%, #172554 100%);
  color: #f8fafc;
  border-radius: var(--radius-lg);
  padding: 36px 40px;
  margin-bottom: 26px;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}
.hero-eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 12px;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.28);
  padding: 4px 10px;
  border-radius: 6px;
  margin-bottom: 14px;
}
.hero h1 {
  margin: 0 0 12px;
  font-size: clamp(26px, 3.3vw, 38px);
  line-height: 1.15;
  letter-spacing: -0.025em;
  max-width: 850px;
}
.hero p {
  margin: 0 0 24px;
  color: #cbd5e1;
  font-size: 16px;
  max-width: 780px;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 28px;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 600;
  font-size: 14px;
  padding: 10px 18px;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
}
.btn:hover {
  text-decoration: none;
}
.btn-primary {
  background: #0ea5e9;
  color: #082f49;
  font-weight: 700;
}
.btn-primary:hover {
  background: #38bdf8;
}
.btn-dark {
  background: var(--navy);
  color: #ffffff;
}
.btn-dark:hover {
  background: #1e293b;
}
.btn-outline-light {
  background: rgba(255, 255, 255, 0.08);
  color: #f8fafc;
  border-color: rgba(255, 255, 255, 0.24);
}
.btn-outline-light:hover {
  background: rgba(255, 255, 255, 0.16);
}
.btn-outline {
  background: #fff;
  color: var(--ink);
  border-color: var(--border);
}
.btn-outline:hover {
  background: var(--surface-alt);
}
.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
  border-radius: 6px;
}
.btn-emerald {
  background: var(--emerald);
  color: #fff;
}
.btn-emerald:hover {
  background: #047857;
}
.btn-crimson {
  background: var(--crimson);
  color: #fff;
}

.hero-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 14px;
  border-top: 1px solid rgba(148, 163, 184, 0.22);
  padding-top: 22px;
}
.hero-kpi strong {
  display: block;
  font-size: 23px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.02em;
}
.hero-kpi span {
  font-size: 12px;
  color: #94a3b8;
}

/* Section Headers & Cards */
.section-block {
  margin-bottom: 32px;
}
.section-hdr {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}
.section-hdr h2 {
  margin: 0;
  font-size: 21px;
  letter-spacing: -0.02em;
}
.section-hdr p {
  margin: 4px 0 0;
  font-size: 14px;
  color: var(--ink-muted);
}

.card {
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  padding: 20px 22px;
  box-shadow: var(--shadow-sm);
}

/* Filter Bar */
.filter-bar {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 16px;
}
@media (max-width: 860px) {
  .filter-bar {
    grid-template-columns: 1fr 1fr;
  }
}
.filter-group label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-muted);
  margin-bottom: 4px;
}
.filter-group input,
.filter-group select {
  width: 100%;
  padding: 8px 10px;
  border-radius: 7px;
  border: 1px solid var(--border);
  font-size: 13px;
  font-family: inherit;
  color: var(--ink);
  background: #fff;
}

/* Lead Explorer Grid */
.leads-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}
.lead-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.lead-item:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
}
.lead-item-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}
.badge-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}
.pill {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 5px;
  letter-spacing: 0.02em;
}
.pill-navy {
  background: var(--navy-mid);
  color: #38bdf8;
  font-family: var(--font-mono);
}
.pill-overdue {
  background: var(--crimson-soft);
  color: var(--crimson);
  border: 1px solid #fecaca;
}
.pill-soon {
  background: var(--amber-soft);
  color: var(--amber);
  border: 1px solid #fde68a;
}
.pill-ok {
  background: var(--emerald-soft);
  color: var(--emerald);
  border: 1px solid #a7f3d0;
}
.pill-mono {
  font-family: var(--font-mono);
  background: var(--surface-alt);
  color: var(--ink-secondary);
  border: 1px solid var(--border-subtle);
}
.ticket-est {
  font-size: 13px;
  font-weight: 700;
  color: var(--emerald);
}
.lead-title {
  margin: 0 0 8px;
  font-size: 17px;
  font-weight: 700;
}
.lead-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 6px 16px;
  font-size: 13px;
  color: var(--ink-secondary);
  margin-bottom: 10px;
}
.lead-defect {
  background: #f8fafc;
  border-left: 3px solid var(--accent);
  padding: 9px 12px;
  font-size: 13px;
  color: var(--ink);
  margin-bottom: 12px;
  border-radius: 0 6px 6px 0;
}
.lead-ftr {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border-subtle);
  font-size: 12px;
  color: var(--ink-muted);
}

/* Two-Column ROI & Pricing */
.two-col {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 20px;
}
@media (max-width: 920px) {
  .two-col {
    grid-template-columns: 1fr;
  }
}
.slider-row {
  margin-bottom: 14px;
}
.slider-hdr {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 4px;
}
.slider-row input[type="range"] {
  width: 100%;
  accent-color: var(--accent);
}
.roi-result-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 14px;
}
.roi-stat {
  background: var(--surface-alt);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 12px 14px;
}
.roi-stat strong {
  display: block;
  font-size: 22px;
  color: var(--ink);
}
.roi-stat span {
  font-size: 12px;
  color: var(--ink-muted);
}

/* Pricing Cards */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 22px;
}
@media (max-width: 920px) {
  .pricing-grid {
    grid-template-columns: 1fr;
  }
}
.price-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.price-card.featured {
  border: 2px solid var(--accent);
  box-shadow: var(--shadow-md);
  position: relative;
}
.featured-tag {
  position: absolute;
  top: -11px;
  right: 18px;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
}
.price-num {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin: 8px 0 4px;
}
.price-num span {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-muted);
}
.price-list {
  padding-left: 18px;
  margin: 14px 0 20px;
  font-size: 13px;
  color: var(--ink-secondary);
}
.price-list li {
  margin-bottom: 7px;
}

/* Territory Table */
.table-wrap {
  overflow-x: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
th, td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-subtle);
}
th {
  background: var(--surface-alt);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-muted);
}
tr:last-child td {
  border-bottom: none;
}

/* Founder Ops Console Specifics */
.ops-timer-banner {
  background: var(--navy);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 22px 26px;
  margin-bottom: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}
.timer-readout {
  font-family: var(--font-mono);
  font-size: 34px;
  font-weight: 800;
  color: #34d399;
  letter-spacing: -0.02em;
}
.step-pills {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 24px;
}
@media (max-width: 860px) {
  .step-pills {
    grid-template-columns: repeat(2, 1fr);
  }
}
.step-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 12px 14px;
  font-size: 13px;
}
.step-card.done {
  border-color: var(--emerald);
  background: var(--emerald-soft);
}
.step-card strong {
  display: block;
  margin-bottom: 3px;
}

.kpi-grid-4 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}
.stat-tile {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
}
.stat-tile .lbl {
  font-size: 12px;
  color: var(--ink-muted);
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.03em;
}
.stat-tile .val {
  font-size: 26px;
  font-weight: 800;
  color: var(--ink);
  margin: 4px 0;
  letter-spacing: -0.02em;
}
.stat-tile .sub {
  font-size: 12px;
  color: var(--emerald);
  font-weight: 600;
}

.chart-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
}

.audit-log {
  font-family: var(--font-mono);
  font-size: 12px;
  background: #0f172a;
  color: #cbd5e1;
  border-radius: 8px;
  padding: 14px;
  max-height: 210px;
  overflow-y: auto;
}
.audit-log div {
  margin-bottom: 5px;
}

/* Modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 100;
}
.modal-panel {
  background: var(--surface);
  border-radius: var(--radius-lg);
  max-width: 720px;
  width: 100%;
  max-height: 88vh;
  overflow-y: auto;
  padding: 26px 28px;
  box-shadow: var(--shadow-md);
}
.modal-hdr {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 12px;
  margin-bottom: 16px;
}
.modal-hdr h3 {
  margin: 0;
  font-size: 19px;
}
.close-x {
  background: transparent;
  border: none;
  font-size: 22px;
  cursor: pointer;
  color: var(--ink-muted);
}
pre.code-preview {
  background: #0f172a;
  color: #e2e8f0;
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 14px;
  border-radius: 8px;
  white-space: pre-wrap;
  word-break: break-word;
}
.form-field {
  margin-bottom: 12px;
}
.form-field label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 4px;
}
.form-field input, .form-field select {
  width: 100%;
  padding: 9px 11px;
  border: 1px solid var(--border);
  border-radius: 7px;
  font-size: 14px;
}
