/* ==========================================================================
   Farol Comercial — B2B intelligence with progressive disclosure
   ========================================================================== */

:root {
  --paper-bg: #F4F2EC;
  --surface-sheet: #FFFFFF;
  --surface-muted: #EAE6DC;
  --surface-hover: #F9F8F4;

  --ink-primary: #122028;
  --ink-secondary: #4E5D65;
  --ink-muted: #78868E;

  --border-hairline: #DCD6C8;
  --border-strong: #122028;

  --brand-cobalt: #004E98;
  --brand-cobalt-hover: #003B73;
  --brand-cobalt-tint: #EBF3FA;

  --signal-vermilion: #B8332A;
  --signal-vermilion-tint: #FDECEB;

  --signal-ochre: #9A5800;
  --signal-ochre-tint: #FEF4E4;

  --signal-forest: #0F6B42;
  --signal-forest-hover: #0A5231;
  --signal-forest-tint: #E6F5ED;

  --font-sans: 'Satoshi', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background-color: var(--paper-bg);
  color: var(--ink-primary);
  font-size: 13.5px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

.mono-num {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

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

/* --------------------------------------------------------------------------
   1. Compact top bar
   -------------------------------------------------------------------------- */
.app-container {
  --dashboard-header-height: 56px;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  grid-template-rows: auto 1fr;
}

.dashboard-navigation {
  display: contents;
}

.topbar {
  grid-column: 1 / -1;
  background-color: var(--surface-sheet);
  border-bottom: 1px solid var(--border-hairline);
  height: var(--dashboard-header-height);
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-mark {
  width: 28px;
  height: 28px;
  background-color: var(--ink-primary);
  color: var(--surface-sheet);
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-name {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.025em;
  margin-right: 12px;
}

.nav-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-tab {
  text-decoration: none;
  color: var(--ink-secondary);
  font-size: 13.5px;
  font-weight: 600;
  padding: 6px 11px;
  border-radius: 2px;
  white-space: nowrap;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.nav-tab:hover {
  color: var(--ink-primary);
  background-color: var(--surface-hover);
}

.topbar .tool-menu-button {
  display: none;
}

.dashboard-sidebar {
  background-color: var(--surface-sheet);
  border-inline-end: 1px solid var(--border-hairline);
}

.tool-nav {
  position: sticky;
  top: var(--dashboard-header-height);
  display: grid;
  gap: 4px;
  padding: 20px 12px;
}

.tool-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 8px 10px;
  background: transparent;
  border: none;
  border-inline-start: 3px solid transparent;
  color: var(--ink-secondary);
  font-family: var(--font-sans);
  font-size: 13.5px;
  font-weight: 600;
  text-align: start;
  cursor: pointer;
}

.tool-nav-item:hover {
  background-color: var(--surface-hover);
  color: var(--ink-primary);
}

.tool-nav-item.active {
  background-color: var(--brand-cobalt-tint);
  border-inline-start-color: var(--brand-cobalt);
  color: var(--brand-cobalt);
  font-weight: 700;
}

.tool-nav-icon {
  flex-shrink: 0;
}

.tab-badge {
  margin-inline-start: auto;
  background-color: var(--paper-bg);
  color: var(--brand-cobalt);
  font-size: 11px;
  font-weight: 600;
  padding: 1px 6px;
}

.tool-nav-item.active .tab-badge {
  background-color: var(--surface-sheet);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.profile-trigger {
  background-color: var(--paper-bg);
  border: 1px solid var(--border-hairline);
  padding: 6px 12px;
  font-family: var(--font-sans);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-primary);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.profile-trigger:hover {
  border-color: var(--ink-primary);
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: var(--signal-forest);
}

.profile-trigger-action {
  color: var(--brand-cobalt);
  padding-left: 8px;
  border-left: 1px solid var(--border-hairline);
}

/* --------------------------------------------------------------------------
   2. Workspace and summary badges
   -------------------------------------------------------------------------- */
.workspace {
  min-width: 0;
  width: 100%;
  max-width: 1360px;
  margin: 0 auto;
  padding: 24px 28px 48px;
}

.workspace-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 18px;
}

.workspace-header h1 {
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.025em;
}

.workspace-subtitle {
  font-size: 13.5px;
  color: var(--ink-secondary);
  margin-top: 2px;
}

.summary-pills {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.summary-pill {
  background-color: var(--surface-sheet);
  border: 1px solid var(--border-hairline);
  padding: 6px 12px;
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
}

.summary-pill.pill-highlight {
  background-color: var(--signal-forest-tint);
  border-color: #A7DBC0;
  color: var(--signal-forest);
}

.pill-label {
  font-size: 12px;
  color: var(--ink-secondary);
  font-weight: 500;
}

.summary-pill strong {
  font-size: 14px;
  font-weight: 600;
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

.active-filter-strip {
  background-color: var(--surface-sheet);
  border: 1px solid var(--border-hairline);
  border-bottom: none;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 12.5px;
  color: var(--ink-secondary);
}

/* --------------------------------------------------------------------------
   3. Scannable lead list (progressive disclosure level 1)
   -------------------------------------------------------------------------- */
.table-sheet {
  background-color: var(--surface-sheet);
  border: 1px solid var(--border-hairline);
}

.table-head {
  display: grid;
  grid-template-columns: 72px 1.6fr 1.6fr 1.1fr 150px 130px;
  align-items: center;
  gap: 16px;
  padding: 10px 18px;
  background-color: var(--surface-muted);
  border-bottom: 1px solid var(--border-hairline);
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-secondary);
}

.table-body {
  display: flex;
  flex-direction: column;
}

.lead-list-status {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  min-height: 132px;
  padding: 24px 18px;
  color: var(--ink-secondary);
  font-size: 14px;
  text-align: center;
}

.lead-list-status[data-state='loading']::before {
  content: '';
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  border: 2px solid var(--border-hairline);
  border-top-color: var(--brand-cobalt);
  border-radius: 50%;
  animation: lead-list-spin 0.8s linear infinite;
}

@keyframes lead-list-spin {
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .lead-list-status[data-state='loading']::before {
    animation: none;
  }
}

.lead-row {
  display: grid;
  grid-template-columns: 72px 1.6fr 1.6fr 1.1fr 150px 130px;
  align-items: center;
  gap: 16px;
  padding: 13px 18px;
  border-bottom: 1px solid var(--border-hairline);
  cursor: pointer;
}

.contact-reveal {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

#drawerContactCost {
  margin: 0 0 10px;
  font-size: 12.5px;
}

.lead-row:last-child {
  border-bottom: none;
}

.lead-row:hover {
  background-color: var(--surface-hover);
}

/* Column 1. Fit score */
.fit-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 13px;
  font-weight: 600;
  padding: 4px 8px;
  border: 1px solid var(--border-hairline);
  background-color: var(--paper-bg);
}

.fit-high {
  background-color: var(--signal-forest-tint);
  color: var(--signal-forest);
  border-color: #9ED6B8;
}

.fit-medium {
  background-color: var(--signal-ochre-tint);
  color: var(--signal-ochre);
  border-color: #E8C589;
}

/* Column 2. Company and location */
.row-company {
  min-width: 0;
}

.row-company-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.row-company-sub {
  font-size: 12px;
  color: var(--ink-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

/* Column 3. Detected opportunities, with up to two badges and a count */
.row-signals {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.signal-tag {
  font-size: 11.5px;
  font-weight: 600;
  padding: 3px 8px;
  border: 1px solid var(--border-hairline);
  white-space: nowrap;
}

.tag-critical {
  background-color: var(--signal-vermilion-tint);
  color: var(--signal-vermilion);
  border-color: #EBB5B1;
}

.tag-warning {
  background-color: var(--signal-ochre-tint);
  color: var(--signal-ochre);
  border-color: #E8C995;
}

.tag-opportunity {
  background-color: var(--signal-forest-tint);
  color: var(--signal-forest);
  border-color: #A5D9BE;
}

.tag-info {
  background-color: var(--brand-cobalt-tint);
  color: var(--brand-cobalt);
  border-color: #B7D2EC;
}

.tag-more {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-secondary);
  background-color: var(--paper-bg);
  padding: 2px 6px;
  border: 1px solid var(--border-hairline);
}

/* Column 4. Domain and status */
.row-domain {
  font-size: 12.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.domain-active {
  color: var(--ink-primary);
  font-weight: 500;
}

.domain-missing {
  color: var(--signal-vermilion);
  font-weight: 600;
}

/* Column 5. Contact */
.row-contact {
  font-size: 12.5px;
  color: var(--ink-secondary);
}

/* Column 6. Action */
.row-actions {
  display: flex;
  justify-content: flex-end;
}

.col-actions {
  text-align: right;
}

/* --------------------------------------------------------------------------
   4. Compact filters (progressive disclosure level 2)
   -------------------------------------------------------------------------- */
.filter-bar {
  background-color: var(--surface-sheet);
  border: 1px solid var(--border-hairline);
  margin-bottom: 16px;
}

.filter-bar-primary {
  display: grid;
  grid-template-columns: 1fr 1.2fr 1.2fr 1.1fr 1.4fr;
  gap: 12px;
  padding: 16px 18px;
}

.filter-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.filter-field label {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-secondary);
}

input[type="text"],
input[type="password"],
input[type="email"],
select,
textarea {
  font-family: var(--font-sans);
  font-size: 13px;
  color: var(--ink-primary);
  background-color: #FFFFFF;
  border: 1px solid var(--border-hairline);
  padding: 7px 10px;
  width: 100%;
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="email"]:focus,
select:focus,
textarea:focus {
  border-color: var(--brand-cobalt);
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink-primary);
}

.brand-logo-img {
  flex-shrink: 0;
  border: 1px solid var(--border-hairline);
  object-fit: cover;
}

.btn-lg {
  padding: 10px 18px;
  font-size: 13.5px;
}

.full-width {
  width: 100%;
}

.plan-badge {
  font-size: 11.5px;
  font-weight: 600;
  padding: 4px 10px;
  background-color: var(--signal-ochre-tint);
  color: var(--signal-ochre);
  border: 1px solid #E8C995;
}

.plan-badge.plan-pro {
  background-color: var(--signal-forest-tint);
  color: var(--signal-forest);
  border-color: #A5D9BE;
}

.paywall-inline-banner {
  margin-top: 14px;
  padding: 16px 20px;
  background-color: var(--surface-sheet);
  border: 1px solid var(--brand-cobalt);
  border-left: 4px solid var(--brand-cobalt);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
}

/* --------------------------------------------------------------------------
   7. Editorial landing page and free search
   -------------------------------------------------------------------------- */
.hero-section {
  max-width: 1320px;
  margin: 0 auto;
  padding: 44px 28px 36px;
}

.hero-container {
  display: grid;
  grid-template-columns: 1.25fr 0.95fr;
  gap: 40px;
  align-items: start;
}

.hero-kicker {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--brand-cobalt);
  margin-bottom: 10px;
}

.hero-headline {
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.12;
  color: var(--ink-primary);
  max-width: 24ch;
}

.hero-lead {
  font-size: 15.5px;
  line-height: 1.55;
  color: var(--ink-secondary);
  margin-top: 14px;
  max-width: 62ch;
}

.hero-cta-block {
  margin-top: 32px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
}

.btn.btn-hero-cta {
  padding: 20px 36px;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.015em;
  background-color: var(--brand-cobalt);
  color: #FFFFFF;
  border: 2px solid var(--border-strong);
  box-shadow: 6px 6px 0px var(--border-strong), 0 12px 28px rgba(0, 78, 152, 0.25);
  transition: transform 0.2s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.2s cubic-bezier(0.22, 1, 0.36, 1), background-color 0.2s ease;
  position: relative;
}

.btn.btn-hero-cta::after {
  content: "→";
  font-family: var(--font-mono);
  font-size: 20px;
  font-weight: 700;
  margin-left: 8px;
  transition: transform 0.2s ease;
}

.btn.btn-hero-cta:hover {
  background-color: var(--brand-cobalt-hover);
  transform: translate(-2px, -2px);
  box-shadow: 8px 8px 0px var(--border-strong), 0 16px 34px rgba(0, 78, 152, 0.32);
}

.btn.btn-hero-cta:hover::after {
  transform: translateX(4px);
}

.btn.btn-hero-cta:active {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0px var(--border-strong);
}

.hero-cta-badge {
  display: inline-block;
  background-color: var(--signal-forest);
  color: #FFFFFF;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  padding: 3px 8px;
  margin-left: 6px;
}

.hero-trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--signal-forest);
}

/* --------------------------------------------------------------------------
   8. Onboarding wizard and scan transition
   -------------------------------------------------------------------------- */
.wizard-sheet {
  background-color: var(--surface-sheet);
  border: 2px solid var(--border-strong);
  width: 100%;
  max-width: 840px;
  max-height: 92vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.wizard-topbar {
  padding: 16px 24px;
  background-color: var(--paper-bg);
  border-bottom: 1px solid var(--border-hairline);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.wizard-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13.5px;
}

.wizard-progress-steps {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-muted);
}

.w-step.active {
  color: var(--brand-cobalt);
  font-weight: 700;
}

.w-step.done {
  color: var(--signal-forest);
}

.w-sep {
  color: var(--border-hairline);
}

.wizard-step-body {
  padding: 28px 32px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.wizard-step-header h2 {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.025em;
  color: var(--ink-primary);
}

.wizard-step-header p {
  font-size: 14px;
  color: var(--ink-secondary);
  margin-top: 4px;
}

.wizard-form-block {
  background-color: var(--paper-bg);
  border: 1px solid var(--border-hairline);
  padding: 20px;
}

.wizard-sub-label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--ink-primary);
}

.wiz-cep-shortcut {
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-hairline);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 12.5px;
  color: var(--ink-secondary);
}

.wizard-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  border-top: 1px solid var(--border-hairline);
}

/* Scan transition (step 3) */
.scanner-stage {
  padding: 28px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 16px;
}

.scanner-pulse-ring {
  width: 84px;
  height: 84px;
  border: 3px solid var(--brand-cobalt);
  background-color: var(--brand-cobalt-tint);
  display: flex;
  align-items: center;
  justify-content: center;
}

.scanner-core {
  font-size: 20px;
  font-weight: 700;
  color: var(--brand-cobalt);
}

.scanner-title {
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink-primary);
  max-width: 48ch;
}

.scanner-sub {
  font-size: 13.5px;
  color: var(--ink-secondary);
}

.scanner-progress-track {
  width: 100%;
  max-width: 480px;
  height: 8px;
  background-color: var(--surface-muted);
  border: 1px solid var(--border-hairline);
  overflow: hidden;
  margin: 6px 0;
}

.scanner-progress-fill {
  height: 100%;
  width: 0%;
  background-color: var(--brand-cobalt);
  transition: width 0.08s linear;
}

.scanner-Checklist {
  width: 100%;
  max-width: 520px;
  background-color: var(--paper-bg);
  border: 1px solid var(--border-hairline);
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: left;
}

.scan-item {
  font-size: 13px;
  color: var(--ink-muted);
  display: flex;
  align-items: center;
  gap: 8px;
}

.scan-item::before {
  content: "○";
  font-family: var(--font-mono);
  color: var(--ink-muted);
}

.scan-item.scan-done {
  color: var(--ink-primary);
  font-weight: 600;
}

.scan-item.scan-done::before {
  content: "✓";
  color: var(--signal-forest);
  font-weight: 700;
}

.unlock-account-box {
  background-color: var(--paper-bg);
  border: 1px solid var(--border-strong);
  padding: 20px 22px;
}

.unlock-account-box h4 {
  font-size: 15px;
  font-weight: 800;
  margin-bottom: 12px;
  color: var(--ink-primary);
}

/* --------------------------------------------------------------------------
   9. Onboarding page (/start) and transitions
   -------------------------------------------------------------------------- */
.onboarding-page-body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--paper-bg);
  overflow-x: hidden;
}

.onboarding-topbar {
  height: 68px;
}

/* Animated horizontal stepper */
.stepper-rail {
  display: flex;
  align-items: center;
  gap: 10px;
}

.stepper-node {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border: 1px solid var(--border-hairline);
  background-color: var(--paper-bg);
  color: var(--ink-muted);
  font-size: 12.5px;
  font-weight: 600;
  transition: all 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.stepper-node .node-index {
  font-size: 11.5px;
  padding: 2px 5px;
  background-color: var(--surface-muted);
  color: var(--ink-secondary);
  transition: all 0.35s ease;
}

.stepper-node.active {
  background-color: var(--surface-sheet);
  border-color: var(--brand-cobalt);
  color: var(--ink-primary);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 78, 152, 0.08);
}

.stepper-node.active .node-index {
  background-color: var(--brand-cobalt);
  color: #FFFFFF;
}

.stepper-node.completed {
  border-color: #9ED6B8;
  background-color: var(--signal-forest-tint);
  color: var(--signal-forest);
}

.stepper-node.completed .node-index {
  background-color: var(--signal-forest);
  color: #FFFFFF;
}

.stepper-connector {
  width: 36px;
  height: 2px;
  background-color: var(--border-hairline);
  position: relative;
  overflow: hidden;
}

.connector-fill {
  height: 100%;
  width: 0%;
  background-color: var(--signal-forest);
  transition: width 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Step transition stage */
.onboarding-stage {
  flex: 1;
  display: flex;
  justify-content: center;
  padding: 40px 24px 64px;
}

.onboarding-Viewport {
  width: 100%;
  max-width: 960px;
  position: relative;
}

#stepScreen4 .table-head,
#stepScreen4 .lead-row {
  grid-template-columns: 60px 1.8fr 1.6fr 1.3fr 135px 135px;
  gap: 12px;
}

.step-screen {
  display: none;
  opacity: 0;
}

.step-screen.active-step {
  display: block;
  animation: stepEnter 0.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes stepEnter {
  0% {
    opacity: 0;
    transform: translateY(18px) scale(0.985);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.step-card {
  background-color: var(--surface-sheet);
  border: 1px solid var(--border-strong);
  padding: 36px 40px;
  box-shadow: 0 14px 36px rgba(18, 32, 40, 0.05);
}

.step-card-wide {
  padding: 32px 36px;
}

.step-eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  color: var(--brand-cobalt);
  margin-bottom: 8px;
}

.step-card-header h1 {
  font-size: 28px;
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: var(--ink-primary);
}

.step-card-header p {
  font-size: 15px;
  color: var(--ink-secondary);
  margin-top: 6px;
}

.step-form-surface {
  margin: 26px 0;
  padding: 24px;
  background-color: var(--paper-bg);
  border: 1px solid var(--border-hairline);
}

.input-elevated {
  padding: 10px 12px !important;
  font-size: 14px !important;
  font-weight: 500;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.input-elevated:focus {
  box-shadow: 0 0 0 3px rgba(0, 78, 152, 0.12);
}

.step-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 18px;
  border-top: 1px solid var(--border-hairline);
}

/* Interactive choice cards (step 2) */
.interactive-choice-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.choice-tile {
  background-color: var(--surface-sheet);
  border: 1px solid var(--border-hairline);
  padding: 16px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  position: relative;
  transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.22s ease, background-color 0.22s ease, box-shadow 0.22s ease;
}

.choice-tile input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.choice-tile:hover {
  transform: translateY(-2px);
  border-color: var(--brand-cobalt);
  box-shadow: 0 6px 16px rgba(18, 32, 40, 0.06);
}

.choice-tile.selected {
  border: 2px solid var(--brand-cobalt);
  background-color: var(--brand-cobalt-tint);
  transform: translateY(-2px);
}

.tile-indicator {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid var(--ink-muted);
  margin-top: 2px;
  flex-shrink: 0;
  position: relative;
  transition: all 0.2s ease;
}

.choice-tile.selected .tile-indicator {
  border-color: var(--brand-cobalt);
  background-color: var(--brand-cobalt);
}

.choice-tile.selected .tile-indicator::after {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  background-color: #FFFFFF;
}

.tile-content strong {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink-primary);
}

.tile-content small {
  display: block;
  font-size: 12.5px;
  color: var(--ink-secondary);
  margin-top: 3px;
}

/* Animated radar (step 3) */
.radar-visualizer {
  width: 132px;
  height: 132px;
  border-radius: 50%;
  border: 2px solid var(--brand-cobalt);
  background-color: var(--brand-cobalt-tint);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
}

.radar-wave {
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1.5px solid var(--brand-cobalt);
  opacity: 0;
  animation: radarPulse 2.4s cubic-bezier(0.16, 1, 0.3, 1) infinite;
}

.radar-wave.wave-2 {
  animation-delay: 0.8s;
}

.radar-wave.wave-3 {
  animation-delay: 1.6s;
}

@keyframes radarPulse {
  0% {
    transform: scale(0.85);
    opacity: 0.75;
  }
  100% {
    transform: scale(1.55);
    opacity: 0;
  }
}

.radar-sweep {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(from 0deg, rgba(0, 78, 152, 0.32) 0deg, transparent 95deg);
  animation: radarSpin 1.8s linear infinite;
}

@keyframes radarSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.radar-center-score {
  position: relative;
  z-index: 2;
  background-color: var(--surface-sheet);
  border: 1px solid var(--brand-cobalt);
  padding: 6px 12px;
  font-size: 18px;
  font-weight: 700;
  color: var(--brand-cobalt);
}

.phrase-fade-in {
  animation: phraseFade 0.42s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes phraseFade {
  0% {
    opacity: 0;
    transform: translateY(8px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.scan-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background-color: var(--border-hairline);
  display: inline-block;
  transition: all 0.3s ease;
}

.scan-item {
  transition: transform 0.3s ease, color 0.3s ease;
}

.scan-item.scan-done {
  transform: translateX(4px);
}

.scan-item.scan-done .scan-dot {
  background-color: var(--signal-forest);
  box-shadow: 0 0 0 3px var(--signal-forest-tint);
}

.scan-item::before {
  display: none;
}

/* Staggered entrance for the three results (step 4) */
.row-stagger-in {
  opacity: 0;
  animation: rowSlideUp 0.45s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes rowSlideUp {
  0% {
    opacity: 0;
    transform: translateY(12px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.unlock-box-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-hairline);
}

.unlock-box-head h3 {
  font-size: 18px;
  font-weight: 800;
}

.unlock-form-actions {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--border-hairline);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.verify-code-banner {
  background-color: var(--paper-bg);
  border: 1px solid var(--border-hairline);
  padding: 14px 16px;
}

.dev-code-hint {
  margin-top: 10px;
  padding: 8px 12px;
  background-color: var(--brand-cobalt-tint);
  border: 1px dashed var(--brand-cobalt);
  font-size: 12.5px;
  color: var(--ink-primary);
}

.input-verification-code {
  font-size: 24px !important;
  font-weight: 700;
  letter-spacing: 8px;
  text-align: center;
  padding: 12px !important;
}

/* Locked controls for free accounts that already used their search */
.locked-prime-banner {
  background-color: var(--surface-sheet);
  border: 1px solid var(--signal-ochre);
  border-left: 4px solid var(--signal-ochre);
  padding: 16px 22px;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.locked-prime-banner h3 {
  font-size: 16px;
  font-weight: 800;
  color: var(--ink-primary);
}

.locked-prime-banner p {
  font-size: 13px;
  margin-top: 2px;
}

.surface-disabled-lock {
  opacity: 0.58;
  filter: grayscale(0.25);
  user-select: none;
}

.surface-disabled-lock input:disabled,
.surface-disabled-lock select:disabled,
.surface-disabled-lock button:disabled {
  background-color: var(--surface-muted) !important;
  color: var(--ink-muted) !important;
  border-color: var(--border-hairline) !important;
  cursor: not-allowed !important;
}

.btn-disabled-visual {
  opacity: 0.55;
  cursor: not-allowed !important;
}

.free-search-box {
  margin-top: 24px;
  background-color: var(--surface-sheet);
  border: 1px solid var(--border-strong);
  padding: 20px;
}

.free-search-header {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-bottom: 14px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--border-hairline);
}

.free-search-header strong {
  font-size: 14.5px;
  color: var(--ink-primary);
}

.free-search-header span {
  font-size: 12.5px;
  color: var(--ink-secondary);
}

.free-search-form {
  display: grid;
  grid-template-columns: 1.2fr 0.9fr 1.1fr auto;
  gap: 12px;
}

.hero-artwork-frame {
  background-color: var(--surface-sheet);
  border: 1px solid var(--border-hairline);
  padding: 14px;
}

.hero-img {
  width: 100%;
  height: auto;
  display: block;
  border: 1px solid var(--border-hairline);
}

.hero-artwork-caption {
  padding-top: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-size: 11.5px;
  color: var(--ink-secondary);
}

.free-results-container {
  margin-top: 28px;
}

.free-results-bar {
  background-color: var(--surface-sheet);
  border: 1px solid var(--border-hairline);
  border-bottom: none;
  padding: 12px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.masked-phone {
  background-color: var(--surface-muted);
  padding: 2px 6px;
  border: 1px dashed var(--border-hairline);
  color: var(--ink-secondary);
}

.editorial-section {
  border-top: 1px solid var(--border-hairline);
  padding: 56px 28px;
}

.editorial-section.section-alt {
  background-color: #ECE8DF;
}

.editorial-container {
  max-width: 1320px;
  margin: 0 auto;
}

.section-heading {
  margin-bottom: 32px;
  max-width: 65ch;
}

.section-heading h2 {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.025em;
}

.section-heading p {
  font-size: 14.5px;
  color: var(--ink-secondary);
  margin-top: 6px;
}

.steps-grid,
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.step-sheet,
.pricing-sheet {
  background-color: var(--surface-sheet);
  border: 1px solid var(--border-hairline);
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
}

.step-num {
  font-size: 13px;
  font-weight: 600;
  color: var(--brand-cobalt);
  margin-bottom: 10px;
  display: block;
}

.step-sheet h3,
.pricing-sheet h3 {
  font-size: 17px;
  font-weight: 800;
  margin-bottom: 8px;
}

.step-sheet p {
  color: var(--ink-secondary);
  font-size: 13.5px;
}

.pricing-featured {
  border: 2px solid var(--brand-cobalt);
}

.pricing-badge {
  position: absolute;
  top: -11px;
  right: 18px;
  background-color: var(--brand-cobalt);
  color: #FFFFFF;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
}

.pricing-price {
  font-size: 28px;
  font-weight: 600;
  color: var(--ink-primary);
  margin: 8px 0;
}

.pricing-price span {
  font-size: 13px;
  font-weight: 400;
  color: var(--ink-secondary);
}

.pricing-list {
  list-style: none;
  margin: 18px 0 22px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13px;
  color: var(--ink-primary);
}

.pricing-list li::before {
  content: "✓ ";
  color: var(--signal-forest);
  font-weight: 700;
}

.faq-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.faq-item {
  background-color: var(--surface-sheet);
  border: 1px solid var(--border-hairline);
  padding: 20px;
}

.faq-item h3 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 6px;
}

.faq-item p {
  font-size: 13.5px;
  color: var(--ink-secondary);
}

.auth-mode-bar {
  padding: 12px 24px 0;
  display: flex;
  gap: 6px;
}

.auth-error {
  padding: 10px 12px;
  background-color: var(--signal-vermilion-tint);
  color: var(--signal-vermilion);
  border: 1px solid #EBB5B1;
  font-size: 12.5px;
  font-weight: 600;
}

/* Secure Stripe checkout */
.checkout-page-body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px;
}

.checkout-container {
  max-width: 880px;
  width: 100%;
  background-color: var(--surface-sheet);
  border: 1px solid var(--border-strong);
  display: grid;
  grid-template-columns: 1fr 1.1fr;
}

.checkout-summary-col {
  padding: 32px;
  background-color: var(--paper-bg);
  border-right: 1px solid var(--border-hairline);
  display: flex;
  flex-direction: column;
}

.checkout-benefits {
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--signal-forest);
}

.checkout-form-col {
  padding: 32px;
}

.filter-bar-footer {
  padding: 10px 18px;
  background-color: var(--paper-bg);
  border-top: 1px solid var(--border-hairline);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.filter-meta-left {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
}

.results-count {
  font-size: 13px;
  color: var(--ink-primary);
}

.link-toggle {
  background: none;
  border: none;
  color: var(--brand-cobalt);
  font-family: var(--font-sans);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.cep-inline-status {
  font-size: 12px;
  font-weight: 600;
  color: var(--signal-forest);
}

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

.filter-bar-drawer {
  padding: 14px 18px;
  border-top: 1px solid var(--border-hairline);
  background-color: #FAF9F5;
}

.filter-drawer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1.4fr;
  gap: 12px;
  align-items: end;
}

.inline-input-btn {
  display: flex;
  gap: 6px;
}

.check-inline {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--ink-primary);
  cursor: pointer;
  padding-bottom: 6px;
}

/* --------------------------------------------------------------------------
   5. Lead drawer (progressive disclosure level 3)
   -------------------------------------------------------------------------- */
.drawer-backdrop {
  position: fixed;
  inset: 0;
  background-color: rgba(18, 32, 40, 0.45);
  display: flex;
  justify-content: flex-end;
  z-index: 1000;
}

.dossier-drawer {
  background-color: var(--surface-sheet);
  border-left: 1px solid var(--border-strong);
  width: 100%;
  max-width: 600px;
  height: 100vh;
  display: flex;
  flex-direction: column;
}

.drawer-header {
  padding: 20px 24px;
  background-color: var(--paper-bg);
  border-bottom: 1px solid var(--border-hairline);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.drawer-score-line {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.drawer-meta-origin {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink-secondary);
}

.drawer-title {
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.drawer-subtitle {
  font-size: 12.5px;
  color: var(--ink-secondary);
  margin-top: 2px;
}

.btn-icon-close {
  background: none;
  border: none;
  font-size: 26px;
  line-height: 1;
  color: var(--ink-secondary);
  cursor: pointer;
}

.drawer-content {
  padding: 20px 24px;
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.drawer-Quickbar {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 14px;
  align-items: end;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-hairline);
}

.drawer-contact-summary {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 12.5px;
  color: var(--ink-secondary);
}

.drawer-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border-hairline);
}

.drawer-section:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.drawer-section h4 {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-primary);
}

.section-head-inline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.drawer-findings {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.finding-detail-item {
  padding: 10px 12px;
  border: 1px solid var(--border-hairline);
  background-color: var(--paper-bg);
}

.finding-detail-item strong {
  display: block;
  font-size: 13px;
}

.finding-detail-item span {
  font-size: 12px;
  color: var(--ink-secondary);
}

.tech-grid-clean,
.registry-grid-clean {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px 14px;
  background-color: var(--paper-bg);
  border: 1px solid var(--border-hairline);
  padding: 12px 14px;
}

.kv-cell {
  display: flex;
  flex-direction: column;
}

.kv-label {
  font-size: 11px;
  color: var(--ink-muted);
}

.kv-val {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-primary);
}

.val-danger { color: var(--signal-vermilion); }
.val-warn { color: var(--signal-ochre); }
.val-ok { color: var(--signal-forest); }

.channel-tabs {
  display: flex;
  gap: 4px;
}

.channel-tab {
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  padding: 5px 10px;
  background-color: var(--paper-bg);
  border: 1px solid var(--border-hairline);
  color: var(--ink-secondary);
  cursor: pointer;
}

.channel-tab.active {
  background-color: var(--brand-cobalt);
  border-color: var(--brand-cobalt);
  color: #FFFFFF;
}

.drawer-footer {
  padding: 14px 24px;
  background-color: var(--paper-bg);
  border-top: 1px solid var(--border-hairline);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* --------------------------------------------------------------------------
   6. Buttons and workbench (tabs 3 and 4)
   -------------------------------------------------------------------------- */
.btn {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  padding: 8px 14px;
  border: 1px solid var(--border-strong);
  background-color: var(--surface-sheet);
  color: var(--ink-primary);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-decoration: none;
  white-space: nowrap;
}

.btn-sm {
  padding: 6px 11px;
  font-size: 12px;
}

.btn-cobalt {
  background-color: var(--brand-cobalt);
  border-color: var(--brand-cobalt);
  color: #FFFFFF;
}

.btn-cobalt:hover {
  background-color: var(--brand-cobalt-hover);
}

.btn-forest {
  background-color: var(--signal-forest);
  border-color: var(--signal-forest);
  color: #FFFFFF;
}

.btn-forest:hover {
  background-color: var(--signal-forest-hover);
}

.btn-secondary {
  background-color: var(--surface-sheet);
  border-color: var(--border-hairline);
  color: var(--ink-primary);
}

.btn-secondary:hover {
  border-color: var(--ink-primary);
}

.btn-quiet {
  background-color: transparent;
  border-color: transparent;
  color: var(--ink-secondary);
}

.btn-quiet:hover {
  color: var(--ink-primary);
  background-color: var(--surface-muted);
}

.workbench-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.workbench-card {
  background-color: var(--surface-sheet);
  border: 1px solid var(--border-hairline);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.workbench-card h3 {
  font-size: 16px;
  font-weight: 800;
}

.card-desc {
  font-size: 13px;
  color: var(--ink-secondary);
}

.stack-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.stack-form h4 {
  font-size: 13.5px;
  font-weight: 700;
}

.divider-bottom {
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border-hairline);
}

.split-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.split-3 {
  display: grid;
  grid-template-columns: 1.5fr 70px 1.6fr;
  gap: 10px;
}

.result-panel {
  background-color: var(--paper-bg);
  border: 1px solid var(--border-hairline);
  padding: 14px;
}

/* Kanban board */
.kanban-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.kanban-card {
  padding: 12px;
  border: 1px solid var(--border-hairline);
  background-color: var(--paper-bg);
  cursor: grab;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.kanban-card:active {
  cursor: grabbing;
}

.kanban-card:hover {
  border-color: var(--brand-cobalt);
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(18, 32, 40, 0.06);
}

.kanban-card-dragging {
  opacity: 0.45;
  transform: scale(0.97);
  border: 1px dashed var(--brand-cobalt);
}

.kanban-col {
  background-color: var(--surface-sheet);
  border: 1px solid var(--border-hairline);
  min-height: 460px;
  display: flex;
  flex-direction: column;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.kanban-head {
  padding: 12px 14px;
  background-color: var(--surface-muted);
  border-bottom: 1px solid var(--border-hairline);
  display: flex;
  justify-content: space-between;
  font-weight: 700;
  font-size: 13px;
}

.kanban-body {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.kanban-col-drop-active {
  background-color: var(--brand-cobalt-tint);
  border-color: var(--brand-cobalt);
}

/* Criteria modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background-color: rgba(18, 32, 40, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 1100;
}

.modal-sheet {
  background-color: var(--surface-sheet);
  border: 1px solid var(--border-strong);
  width: 100%;
  max-width: 780px;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-header {
  padding: 18px 24px;
  background-color: var(--paper-bg);
  border-bottom: 1px solid var(--border-hairline);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.modal-header h3 {
  font-size: 17px;
  font-weight: 800;
}

.modal-header p {
  font-size: 12.5px;
  color: var(--ink-secondary);
  margin-top: 2px;
}

.modal-body {
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.config-group h4 {
  font-size: 13.5px;
  font-weight: 700;
  margin-bottom: 8px;
}

.check-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.check-card {
  padding: 10px 12px;
  border: 1px solid var(--border-hairline);
  display: flex;
  align-items: flex-start;
  gap: 8px;
  cursor: pointer;
}

.check-card strong {
  display: block;
  font-size: 12.5px;
}

.check-card small {
  font-size: 11.5px;
  color: var(--ink-secondary);
}

.inline-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 9px 12px;
  border: 1px solid var(--border-hairline);
}

.inline-checks label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12.5px;
  cursor: pointer;
}

.modal-footer {
  position: sticky;
  bottom: 0;
  background-color: var(--surface-sheet);
  padding: 14px 0 2px;
  border-top: 1px solid var(--border-hairline);
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.toast {
  position: fixed;
  bottom: 24px;
  left: 24px;
  background-color: var(--ink-primary);
  color: #FFFFFF;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 600;
  z-index: 2000;
}

.hidden {
  display: none !important;
}

/* ==========================================================================
   10. Responsive styles for tablets and phones
   ========================================================================== */

@media (max-width: 1024px) {
  .hero-container {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .steps-grid,
  .pricing-grid,
  .faq-grid,
  .workbench-grid,
  .kanban-grid,
  .filter-bar-primary,
  .filter-drawer-grid {
    grid-template-columns: 1fr;
  }

  .table-head,
  #stepScreen4 .table-head {
    display: none;
  }

  .lead-row,
  #stepScreen4 .lead-row {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 16px;
  }

  .row-company-name,
  .row-company-sub,
  .row-domain {
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
  }

  .row-actions {
    justify-content: flex-start;
    margin-top: 4px;
  }

  .row-actions .btn {
    width: 100%;
  }
}

@media (max-width: 960px) {
  .app-container {
    display: flex;
    flex-direction: column;
  }

  .dashboard-navigation {
    display: block;
    position: sticky;
    top: 0;
    z-index: 100;
  }

  .topbar {
    position: static;
    height: auto;
    min-height: var(--dashboard-header-height);
    padding-block: 8px;
    flex-wrap: wrap;
    gap: 10px;
  }

  .topbar .tool-menu-button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
  }

  .dashboard-sidebar {
    display: none;
    position: absolute;
    inset-block-start: 100%;
    inset-inline: 0;
    max-height: 60vh;
    overflow-y: auto;
    border-inline-end: 0;
    border-bottom: 1px solid var(--border-hairline);
    box-shadow: 0 12px 18px rgba(18, 32, 40, 0.10);
  }

  .dashboard-sidebar[data-open] {
    display: block;
  }

  .tool-nav {
    position: static;
    padding: 10px 12px;
  }

  .topbar .tool-menu-button[aria-expanded='true'] {
    background-color: var(--brand-cobalt-tint);
    color: var(--brand-cobalt);
  }
}

@media (max-width: 768px) {
  /* Prevent horizontal overflow on mobile */
  html, body {
    overflow-x: hidden;
    width: 100%;
  }

  html:has(.app-container),
  body:has(.app-container) {
    overflow-x: clip;
  }

  /* Prevent iOS Safari auto-zoom on form controls */
  input[type="text"],
  input[type="email"],
  input[type="password"],
  input[type="search"],
  select,
  textarea {
    font-size: 16px;
  }

  /* 1. Responsive top bar (shared + per-page polish) */
  .topbar,
  .onboarding-topbar {
    height: auto;
    min-height: 52px;
    padding: 8px 14px;
    flex-wrap: wrap;
    gap: 8px;
  }

  .brand-logo-img {
    width: 32px;
    height: 32px;
  }

  .brand-name {
    font-size: 15px;
    margin-right: 0;
  }

  /* 1a. Landing page (Home) mobile header */
  .landing-body .topbar-left {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .landing-body .nav-tabs {
    width: 100%;
    justify-content: space-between;
    gap: 4px;
    padding-top: 8px;
    border-top: 1px solid var(--border-hairline);
    overflow-x: auto;
    scrollbar-width: none;
  }

  .landing-body .nav-tabs::-webkit-scrollbar {
    display: none;
  }

  .landing-body .nav-tab {
    font-size: 12.5px;
    padding: 4px 6px;
  }

  .landing-body .topbar-right {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--border-hairline);
  }

  .landing-body .topbar-right .btn {
    width: 100%;
    justify-content: center;
    text-align: center;
    padding: 8px 10px;
    font-size: 12.5px;
  }

  /* 1b. Dashboard (/app) mobile header: strictly 2 clean rows */
  .dashboard-navigation .topbar-left {
    width: 100%;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
  }

  .dashboard-navigation .topbar-right {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: nowrap;
    gap: 6px;
    padding-top: 8px;
    border-top: 1px solid var(--border-hairline);
  }

  .dashboard-navigation .topbar-right:has(#btnHeaderUpgrade:not(.hidden)) {
    flex-wrap: wrap;
  }

  .dashboard-navigation .plan-badge {
    font-size: 10.5px;
    padding: 4px 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 45%;
    flex-shrink: 1;
  }

  .dashboard-navigation .topbar-right:has(#btnHeaderUpgrade:not(.hidden)) .plan-badge {
    max-width: none;
  }

  .dashboard-navigation .profile-trigger {
    padding: 4px 7px;
    font-size: 11px;
    gap: 5px;
    flex: 1 1 auto;
    min-width: 0;
    justify-content: space-between;
  }

  .dashboard-navigation #sidebarCompanyName {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
  }

  .dashboard-navigation .profile-trigger-action {
    padding-left: 5px;
    flex-shrink: 0;
  }

  .dashboard-navigation #btnHeaderUpgrade {
    padding: 4px 8px;
    font-size: 11px;
    flex-shrink: 0;
  }

  .dashboard-navigation #btnLogout {
    padding: 4px 8px;
    font-size: 11px;
    flex-shrink: 0;
    border: 1px solid var(--border-hairline);
    background-color: var(--surface-sheet);
    color: var(--ink-secondary);
  }

  /* 1c. Onboarding (/start) mobile header: logo + voltar on row 1, stepper on row 2 */
  .onboarding-topbar .topbar-left {
    width: auto;
    flex: 1;
  }

  .onboarding-topbar .topbar-right {
    width: auto;
  }

  /* 2. Mobile hero and landing page */
  .hero-section {
    padding: 24px 16px 28px;
  }

  .hero-headline {
    font-size: 27px;
    line-height: 1.16;
    max-width: 100%;
  }

  .hero-lead {
    font-size: 14.5px;
    line-height: 1.5;
  }

  .hero-cta-block {
    margin-top: 22px;
    width: 100%;
  }

  .btn.btn-hero-cta {
    width: 100%;
    padding: 16px 18px;
    font-size: 15px;
    white-space: normal;
    text-align: left;
    justify-content: space-between;
    line-height: 1.3;
    box-shadow: 4px 4px 0px var(--border-strong), 0 8px 20px rgba(0, 78, 152, 0.2);
  }

  .hero-cta-badge {
    margin-left: 4px;
    flex-shrink: 0;
  }

  .hero-trust-row {
    flex-direction: column;
    gap: 6px;
    font-size: 12px;
  }

  .hero-artwork-frame {
    padding: 10px;
  }

  .hero-artwork-caption {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .editorial-section {
    padding: 36px 16px;
  }

  .section-heading h2 {
    font-size: 21px;
  }

  .step-sheet,
  .pricing-sheet {
    padding: 18px;
  }

  .legal-footer {
    padding: 16px;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  /* 3. Mobile onboarding stepper and cards */
  .stepper-rail {
    order: 3;
    width: 100%;
    overflow-x: auto;
    padding: 8px 0 2px;
    border-top: 1px solid var(--border-hairline);
    gap: 6px;
    justify-content: flex-start;
    scrollbar-width: none;
  }

  .stepper-rail::-webkit-scrollbar {
    display: none;
  }

  .stepper-node {
    padding: 5px 8px;
    font-size: 11.5px;
    flex-shrink: 0;
  }

  .stepper-node:not(.active) .node-label {
    display: none;
  }

  .stepper-connector {
    width: 16px;
    flex-shrink: 0;
  }

  .onboarding-stage {
    padding: 16px 12px 40px;
  }

  .step-card,
  .step-card-wide {
    padding: 20px 16px;
  }

  .step-card-header h1 {
    font-size: 21px;
  }

  .step-card-header p {
    font-size: 13.5px;
  }

  .step-form-surface {
    margin: 18px 0;
    padding: 14px;
  }

  .split-2,
  .split-3,
  .interactive-choice-grid,
  .check-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .step-card-footer {
    flex-direction: column-reverse;
    align-items: stretch;
    gap: 10px;
  }

  .step-card-footer .btn {
    width: 100%;
    white-space: normal;
    text-align: center;
  }

  .wiz-cep-shortcut {
    flex-direction: column;
    align-items: stretch;
  }

  .wiz-cep-shortcut .inline-input-btn {
    width: 100%;
  }

  .wiz-cep-shortcut input {
    flex: 1;
    width: auto !important;
  }

  .scanner-title {
    font-size: 18px;
  }

  .scanner-Checklist {
    padding: 12px 14px;
  }

  /* 4. Mobile dashboard and lead drawer */
  .workspace {
    padding: 14px 12px 40px;
  }

  .workspace-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 14px;
  }

  .workspace-header h1 {
    font-size: 19px;
  }

  .workspace-subtitle {
    font-size: 12.5px;
  }

  .summary-pills {
    width: 100%;
    overflow-x: auto;
    flex-wrap: nowrap;
    gap: 6px;
    padding-bottom: 4px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .summary-pills::-webkit-scrollbar {
    display: none;
  }

  .summary-pill {
    flex-shrink: 0;
    padding: 5px 10px;
    gap: 6px;
  }

  .pill-label {
    font-size: 11px;
  }

  .summary-pill strong {
    font-size: 13px;
  }

  .active-filter-strip {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    padding: 10px 12px;
    font-size: 12px;
  }

  /* Compact 2-column grid lead card on mobile (Fit badge + Company title on row 1) */
  .lead-row,
  #stepScreen4 .lead-row {
    grid-template-columns: auto 1fr;
    align-items: start;
    gap: 8px 12px;
    padding: 14px 12px;
  }

  .lead-row > :nth-child(1),
  #stepScreen4 .lead-row > :nth-child(1) {
    grid-column: 1;
    grid-row: 1;
  }

  .lead-row > :nth-child(2),
  #stepScreen4 .lead-row > :nth-child(2) {
    grid-column: 2;
    grid-row: 1;
    min-width: 0;
  }

  .lead-row > :nth-child(3),
  .lead-row > :nth-child(4),
  .lead-row > :nth-child(5),
  .lead-row > :nth-child(6),
  #stepScreen4 .lead-row > :nth-child(3),
  #stepScreen4 .lead-row > :nth-child(4),
  #stepScreen4 .lead-row > :nth-child(5),
  #stepScreen4 .lead-row > :nth-child(6) {
    grid-column: 1 / -1;
  }

  .row-actions .btn {
    min-height: 40px;
  }

  .filter-bar {
    padding: 14px 12px;
  }

  .filter-bar-footer {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .filter-meta-right {
    flex-direction: column-reverse;
    align-items: stretch;
    width: 100%;
    gap: 8px;
  }

  .filter-meta-right .btn {
    width: 100%;
    min-height: 38px;
  }

  .locked-prime-banner,
  .paywall-inline-banner {
    padding: 14px;
    flex-direction: column;
    align-items: stretch;
  }

  .locked-prime-banner .btn,
  .paywall-inline-banner .btn {
    width: 100%;
  }

  /* The lead drawer fills the viewport on mobile */
  .dossier-drawer {
    max-width: 100%;
    width: 100%;
  }

  .drawer-header,
  .drawer-content,
  .drawer-footer {
    padding: 12px 14px;
  }

  .drawer-title {
    font-size: 18px;
  }

  .drawer-Quickbar {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .tech-grid-clean,
  .registry-grid-clean {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .registry-grid-clean .kv-cell[style*="span 3"] {
    grid-column: span 2 !important;
  }

  .drawer-footer {
    flex-direction: row;
    gap: 8px;
  }

  .drawer-footer #btnCopyScript {
    flex: 0 0 auto;
    width: auto;
  }

  .drawer-footer #btnSendContact {
    flex: 1;
    width: auto;
  }

  /* Mobile modals & toast */
  .modal-backdrop {
    padding: 8px;
    align-items: flex-end;
  }

  .modal-sheet {
    max-height: 92vh;
  }

  .modal-header,
  .modal-body {
    padding: 14px;
  }

  .auth-mode-bar {
    padding: 10px 14px 0;
  }

  .modal-footer {
    flex-direction: column-reverse;
    padding: 12px 0 4px;
  }

  .modal-footer .btn {
    width: 100%;
    min-height: 40px;
  }

  .toast {
    left: 12px;
    right: 12px;
    bottom: 16px;
    text-align: center;
  }

  .checkout-container {
    grid-template-columns: 1fr;
  }

  .checkout-summary-col,
  .checkout-form-col {
    padding: 20px 16px;
  }
}
